Q:

(Simulation: self-avoiding random walk) Write a simulation program to show that the chance of getting dead-end paths increases as the grid size increases

0

6 (Simulation: self-avoiding random walk) Write a simulation program to show that the chance of getting dead-end paths increases as the grid size increases. Your program simulates lattices with size from 10 to 80. For each lattice size, simulate a self-avoiding random walk 10,000 times and display the probability of the dead-end paths, as shown in the following sample output:

For a lattice of size 10, the probability of dead-end paths is 10.6%

For a lattice of size 11, the probability of dead-end paths is 14.0%

...

For a lattice of size 80, the probability of dead-end paths is 99.5% 

All Answers

total answers (0)

Similar questions


need a help?


find thousands of online teachers now