Question: Write an algorithm that simulates the random motion of 1 0 molecules in 1 D . Initially, all molecules are in position 0 of the

Write an algorithm that simulates the random motion of 10 molecules in 1D.
Initially, all molecules are in position 0 of the 1D domain. At each iteration of the algorithm, each particle moves of one step of size 1, in either positive or negative direction, with equal probabilities.
Demonstrate that after 100 iterations, the molecules have moved from the initial region of high concentration to regions of low concentration.
Is this system in steady state?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!