1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Norma-Jean [14]
3 years ago
8

Random Walker Collisions In lecture, we saw how to model the behavior of a random walker on a 2D grid using a Monte Carlo simula

tion. In this problem, we will investigate collisions between two of these random walkers. Specifically, use your simulation to track the distances of the two walkers until they collide. 1. Start by writing a MATLAB script to simulate the path that the single random walker A takes on an 11 x 11 grid of tiles. Let this random walker use a random compass as shown in class. Thus, the probability p of moving in the North, East, South, and West directions is given by 0.2. The remaining probability is the one used to stay put. If the random walker tries to move "past" one of the boundaries on its turn, his position does not change (you can think of this as a particle bumping into a wall and staying still). Choose a random tile to let the random walker A start his walk. Lastly, write a function to update the position of the random walker A. The function must use exactly the function header shown below, i.e. the function name and number and ordering of inputs and outputs must be followed exactly. function (x,y) = Randwalk_2D (x0, y0, BC) Here, x0 and y0 are the initial positions of the random walker, BC is the array of boundary conditions, and x and y are the updated positions of the random walker. 2. Add the random walker B to your simulation who moves according to its own randomly generated values using the same compass as the random walker A in Part 1. Let the random walker B start his walk on the tile that is furthest away from the start tile of walker A. At each iteration, both walkers move simultaneously to an adjacent tile using the rules outlined in Part 1. Continue updating the position of both walkers until a collision occurs (or until the maximum number of iterations, which is set to 1000, is reached). More precisely, a collision occurs when both random walkers occupy the same tile after both have completed their move. Furthermore, a collision occurs when both random walkers are next to each other and move to the other one's tile. Note that in this instance, the collision appears on their way, but both random walkers will end up on tiles that are again next to each other. In other words, collision also appears when their paths cross. 3. Track the movement of each random walker by storing their positions in four 1D-arrays associated with their x- and y-positions in the grid. After the simulation, calculate for each iteration the distance between the random walkers A and B, and plot the results vs. the number of iterations to see when the two random walkers A and B came close to each other and when they were far away from each other.
Computers and Technology
1 answer:
vlabodo [156]3 years ago
6 0

Answer:

dang how long did i take for you to wright all this and that lecture was cool

Explanation:

You might be interested in
When planning a comprehensive security system, the first step is designing _____, which use a combination of hardware and softwa
Brums [2.3K]

Answer:

Fault tolerant system

Explanation:

Fault tolerance is the property that keeps a system operating properly in the event of a failure of one of the components within the system

A fault tolerant system enables the system to continue its operation possibly at a reduced level, rather than having the whole system breakdown.

A good security expert understands the need for fault tolerance in a comprehensive security system, as the absence of this can lead to serious security breaches once the whole system is down.

6 0
3 years ago
Write a complete program that declares an integer variable, reads a value from the keyboard into that variable, and writes to st
vovikov84 [41]

Answer:

#include <iostream>

using namespace std;

int main ()

{

int num;

cin>>num;

cout << num<< " " << 2 num << " " << numnum;

return 0;

}

Explanation:

See answer

5 0
3 years ago
What are authorization rules?
nasty-shy [4]
An authorization rule specifies the policy that applies to an object and that is based on various conditions, such as context and environment. Each authorization rule has a unique name and can be applied to multiple objects in a domain.
8 0
1 year ago
In cell b16, enter a function to calculate the total attendance for the years 2014 through 2018 using the totals in the range B1
balu736 [363]
Columns are represented as letters and rows are in numbers. Since B12 and F12 use the same number, it means that they are in the same row. There are no given numbers for the cells so the shown numbers are just examples. Just click B16 where the answer and formula would be put unto and encode =sum(b12:f12) 







6 0
3 years ago
Which one of these is an example of unnecessary debt?
Alex73 [517]
C. you charge clothes you don’t really need on a high-interest store card

hope this helps :)
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is an example of an Internet access problem?
    15·2 answers
  • BI systems have eliminated a common organizational problem, which is simultaneously having too much data but somehow not enough.
    14·1 answer
  • ______ is an example of unauthorized access to your computer or accounts.
    14·1 answer
  • Dynamic alliance networks work best in industries: a. that are mature and stable in nature. b. where the coordination of product
    9·1 answer
  • Chemical reaction to metal​
    6·1 answer
  • You are creating a presentation and you have come to the last slide. You still have more information to add. What should you do?
    7·1 answer
  • Vicky is investigating multiple hacking attempts on her cloud-based e-commerce web servers. She wants to add a front-end securit
    5·1 answer
  • The computer virus is simply a.......... a. diseases b.set of computer instrustruction or code c. types of bacteria​
    9·1 answer
  • What is the base of a number system?
    8·1 answer
  • A third party that provides a computer system such as Windows, programming applications, databases, and web servers is demonstra
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!