Q:

(Simulation: self-avoiding random walk) A self-avoiding walk in a lattice is a path from one point to another that does not visit the same point twice

0

(Simulation: self-avoiding random walk) A self-avoiding walk in a lattice is a path from one point to another that does not visit the same point twice. Selfavoiding walks have applications in physics, chemistry, and mathematics. They can be used to model chain-like entities such as solvents and polymers. Write a program that displays a random path that starts from the center and ends at a point on the boundary, as shown in Figure 15.37a or ends at a dead-end point (i.e., surrounded by four points that have already been visited), as shown in Figure 15.37b. Assume the size of the lattice is 16 by 16.

FIGURE 15.37 (a) A path ends at a boundary point. (b) A path ends at dead-end point. 

All Answers

total answers (0)

Similar questions


need a help?


find thousands of online teachers now