SAW DIY Write your own self-avoiding walk code! The goal is to generate random chains in two dimensions on a square lattice (steps are east-west-north-south). You can use any language that prints out the code in something like English (no APL, please!). Most computer programming languages will have a random number generator to help you decide the direction for each monomer. So, starting at one end of the chain, try to place N+1 monomers (i.e., N bonds). If the next monomer you place hits a lattice cell where any previous monomer landed, you have to reject that conformation. After you have generated a chain of N+1 monomers, you have to do it about 100 times (more would be better) to estimate the root mean square end-to-end distance (<r2> for that chain length. Store that or print it out. Then repeat for a different value of N. You might try N = 5, 10, 15, 20…100. Simulation programs (that's what these are) in some ways resemble an experiment, so make observations! For example, you might notice the amount of time it takes to generate 100 (or more) successful conformations as a function of N. Use the average <r2> data to determine the exponent in two dimensions. Show the <r2> vs N plot. What is your uncertainty on ? Does the answer make sense compared to in 3 dimensions? In addition to , also report df. Hints For me, this code involves the usual elements: dimension space (to hold the x,y coordinates of the chain, several loops (“Do loops” in Fortran, “For-next” loops in Basic, While-wend loops, etc.), and conditional testing to see if the spot the random number generator selects for you is actually available. Undoubtedly, there are books on how to do this, but it’s a fun little puzzle in its own right. So have fun.