Question: 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
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%
Step by Step Solution
3.52 Rating (169 Votes )
There are 3 Steps involved in it
Program follows to show that the chance of getting dead end paths increases as the grid size increases Compile javac Randomwalkjava V Run java Randomwalk Header file section import class declaration p... View full answer
Get step-by-step solutions from verified subject matter experts
