Question: Exercise 1 . ( 5 0 points ) DiffusionIn this exercise, we use a 3 D random walk to simulate a diffusion process. Imagine a
Exercise points DiffusionIn this exercise, we use a D random walk to simulate a diffusion process. Imagine a particle starting at the origin that has equal probabilities to go in possible directions left, right, backward, forward, down, and up For example, when the particle is at r y z with equal probability its next location isat y V or The particle will conduct the random walk for n steps. We are interested in the distribution of the final locations of particles after each takes n steps. Specifically, we would like to know the distribution of the distance between the final location and the origin. In order to obtain this distribution, we simulate m such particles, and check the proportion of the particles that lies within rn distance from the origin, where r is a real number between and Note all the particles will be within a sphere with radius n since particles only move n steps and the furthest they can go is a distance n from the origin. In our simulation, we will calculatethe proportion of particles that are within rn from the origin for r Below is the main function for this program. Note how we use command line arguments. int main int argc, char argv
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
