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
6.12 Nested Increments Write a program for spiritual lumberjacks who want to show their appreciation for each tree they 'kill' b
Nina [5.8K]

Answer:

trees_to_cut = int(input("How many trees do you wants to cut? "))

print(str(trees_to_cut) + " tree(s) will be cut.")

for i in range(trees_to_cut):

   print("Tree #" + str(i))

   

   rings = int(input("How many rings in tree " + str(i) + "? "))

   print("There are " + str(rings) + " ring(s) in this tree.")

   for j in range(rings):

       print("Celebrating tree #" + str(i) + "'s " + str(j+1) + ". birthday.")

Explanation:

*The code is in Python.

Ask the user to enter the number of trees to cut

Print this number

Create a for loop that iterates for each tree

Inside the loop:

Print the tree number. Ask the user to enter the number of rings. Print the number of rings. Create another for loop that iterates for each ring. Inside the inner loop, print the celebrating message for each birthday of the tree

7 0
4 years ago
What is the deference between touch screen phone and keypad phone
Mazyrski [523]
zzzzzzzzzkzkskdxjjeisiwis
8 0
3 years ago
A material systems developer typically combines the skills of a programmer with the multitasking expectations of a
shusha [124]

Explanation:

Material systems developer typically combines the skills of a programmer with the multitasking expectations of developing 3 dimensional models of objects, enhancing the graphical effects.

don't delete my answer this time i try to help ppl

3 0
3 years ago
How to disappear completely from the internet pc magazine
GREYUIT [131]

In order to disappear completely from the internet, one needs to delete their social media accounts, delete their emails, etc.

The internet is a network of interconnected computer systems. Despite its numerous advantages, it also has several disadvantages and there are some moments when we want to disappear from the internet.

The steps that are needed to disappear from the internet include:

  • Delete your social network accounts.
  • Delete your email accounts.
  • Use search engines to track your old activities online and delete them.
  • Falsify the accounts that can't be deleted.
  • Unsubscribe from mailing lists.

Read related link on:

brainly.com/question/24902823

4 0
3 years ago
The objectivity of a site relates to its a. Appearance c. Graphics b. Biases d. Quotes from other Internet authors Please select
FromTheMoon [43]

The objectivity of any site is related to the biases present in the content of the site because it creates an imbalance of information and it is unfair.

<h3>What is the objectivity of a site?</h3>

The content in a site represents the thoughts of a specific author. Objectivity comes to the role when there is an imbalance in the data or information available on the site.

The information available on the site represents the opinion that helps readers to understand or decide on anything. When the information is fair completely balanced then it becomes fair for the users to refer to that content. But when the data is biased or unbalanced then it becomes a problem.

Therefore, the objectivity of any site is related to the biases present in the content of the site because it creates an imbalance of information and it is unfair.

Learn more about objectivity of a site here:

brainly.com/question/2018782

5 0
3 years ago
Other questions:
  • Write an application program that creates and prints a random phone number of the form XXX-XXX-XXXX. Include the dashes in the o
    5·1 answer
  • Write a program that opens a text le called quiz.txt for reading. This le contains a single line with a student's rst name then
    15·1 answer
  • Stacey wants to change her document to landscape view instead of portrait. Jesse wants to change the scale of his document. Whic
    5·1 answer
  • You have just installed the microsoft windows 7 operating system on your pc. which web browser is bundled with windows 7 and is
    12·1 answer
  • To display rows from one table that do not have a corresponding row in the other table, you must create a(n) ___________________
    10·1 answer
  • Consider the following MARIE Code: 100 If, Load X /Load the first value 101 Subt Y /Subtract the value of Y, store result in AC
    8·1 answer
  • Which Windows 7 feature allows a user to open multiple programs at the same time?
    7·1 answer
  • Identfy two duties of the governer stationed at mombasa under portugues rule?​
    8·1 answer
  • How many votes does a candidate need to become president of the US ?
    12·2 answers
  • Use the round function to modify the program to display at most two digits of precision in the output number.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!