Classwork ISC 5228 Fall 2007

  • Unless noted otherwise, each classwork count ten points.
  • 1. To be completed August 28 (e-mail date):
    Integrate the program pmar.f into your STMC classwork folder.
    Set iseed2 to your number on the sign-up sheet.
    Run the program and e-mail your first and eights random
    number with five digits accuracy to the instructor.
  • 2. To be completed August 30 (e-mail date):
    Download the compressed archive 0830dice.tgz and integrate it into your classwork folder of STMC.
    Use your seed for the random number generator and make two figures of the probability distribution of
    a dice, relying on (a) 12 and (b) 120 events. E-mail pdf files of the two figures to the instructor.
  • 3. To be completed September 4 (e-mail date):
    E-mail a pdf file, which corresponds to figure 1.5 of the book.
  • 4. To be completed September 6 (e-mail date):
    Download the compressed archive 0906piheapsort.tgz and integrate it into your classwork folder of STMC.
    Change iseed2 to your number. Compile the program piheapsort.f. Run in the background and measure the
    CPU time (use the provided file CPUtime as explained in the book). E-mail the plot of your empirical peaked,
    cumulative distribution function (epcdf) and answer the following questions:
    1. For what is the write_progress call in piheapsort.f good?
    2. How many data are sorted for the plot of the epcdf?
    3. On how many events does each of these data points rely?
    4. Report the CPUtime used for your run.
    5. Is the analytical pi inside the 70% confidence range of your estimate?
    6. Is the analytical pi inside the 95% confidence range of your estimate?
    7. How many clockcycles does the generation of one pi-event approximately take (use: cat /proc/cpuinfo)?
    One more point when you manage to get an arrow indicating the analytical pi into your plot.

    SIX POINTS for whoever sends the correct answer in before it is given in class: Why
    was the exact pi always very close to the median, much closer than one might have thought?
  • 5. To be completed September 13 (e-mail date):
    Modify the programs of the folder a0106_02new to generate, besides the empirical peaked CDF of
    Gaussian random numbers, also the peaked CDFs of y=x1+x2, y=(x1+x2)/sqrt(2) and y=(x1+x2)/2,
    where x1 and x2 are Gaussian random numbers.
    Calculate in each case the empirical, peaked CDF for 10,000 events. Plot them alltogether and
    compare with the result from Gaussian random numbers. E-mail your comments and the combined
    plot to the instructor.
    Repeat the exercise using Cauchy random numbers.

  • 6. To be completed September 18 (e-mail date), (2 points):
    Perform the Gaussian difference tests between the estimated 0.46928 (15) and 0.46960 (13)
    and e-mail the Q to the instructor (error bars are in the last digits given).

  • 7. To be completed September 20 (e-mail date), (3 points):
    Assignment a0303_01 of the book: Reproduce Figure 3.4 and e-mail the pdf file to the instructor.

  • 8. To be completed September 25 (e-mail date):
    (a) Plot the exact energy per spin function for an Ising model on a 40x40 lattice using the program
    ferdinand.f of ForProg/Ferdinand.
    (b) Use the programs of assignment a0303_06 to produce MC data on this lattice at ten beta-values.
    Use your random number generator seed, start with beta=0.06 and increase beta in increments of 0.06.
    For each data point include the energy estimate and its error bar into the plot (a).
    (c) Calculate the differences between the analytical results and the data and plot them together with
    their error bars. E-mail the pdf files of the (b) and (c) plots to the instructor.
    (d) At beta=0.36, 0.42 and 0.48 perform Gaussian difference tests between the energy estimates and
    the analytical energy values. Make a table with the columns beta, energy estimate (with error bar),
    analytical energy, Q of the Gaussian difference test, and e-mail the table to the instructor.
    (e) Use the beta-value of (c) to perform MC runs on a 20x20 lattice. Use Gaussian difference
    tests to decide, whether finite size effects are visible within the statistical error bars. Compile
    a table similar to the one in (c) and e-mail it with your comments to the instructor.

  • 9. To be completed October 12 (e-mail date):
    (a) Download and install NewSTMC.tgz .
    (b) Download and read cl09.pdf .
    (c) Use your random generator seeds and omplete the xx etc. values of the table (assignments 2-4).
    (d) E-mail also your version of Fig.3.9 of the handout.

  • 10. To be completed October 16 (e-mail date):
    Assignment a0305_05 of the rewised and extended handhout cl09.pdf from the classwork 9.
    Before starting: Integrate the file make77 and the folder a0305_05 into NewSTMC.

  • 11. To be completed October 23 (12:15 sharp):
    First, integrate the archive cl11.tgz into STMC. Do NOT change the initial seeds.
    Vary the parameter a of the program tau_int.f in the range 0.5 to 20.
    Record for each run your estimate of the integrated autocorrelation time (error bar), ittest, and the acceptance rate of the Metropolis updating.
    Before end of class mail a table to the instructor and:
    Give a value of the parameter a, which is about optimal.
    Describe the relationship between acceptance rate and integrated autocorrelation time.
    Which acceptance rate is about optimal?
    If time allows, make plots of the the integrated autocorrelation time versus the parameter a, as well as versus the acceptance rate and e-mail them too.
    Solution as a figure .

  • 12. To be completed October 25 (12:15 sharp):
    Use the programs in cl12.tgz to plot the probability formula for the two-headed coin (2 points).
    Explain the behavior as function of N and k (3 points).

  • 13. To be completed November 8 (12:15 sharp):
    Start the Metropolis generation of Gaussian random number with x=-100 and plot the time series until equilibrium (by visual inspection) is reached. E-mail the plot (4 points).

  • 14. To be completed November 14: (10 points)
    Download cano.tgz , integrate it into the Work folder of MPI_STMC, run the present simulation with your random number seeds, and estimate the integrated autocorrelation time (a) for the energy, (b) for Potts spins. You need also autcorfv.f and autcorvj.f in ForLib.

    Download 3MPI.tgz , integrate it into the Work folder of MPI_STMC, run the present MPI simulation with your random number seeds. Estimate the same integrated autocorrelation times as before. Report the improvement factors if any.

  • 15. To be completed December 6: (e-mail date)
    Set up and analyze a MPI Potts model replica-exchange simulation, so that you get a larger improvement factor for the Potts spin integrated autocorrelation time than in the previous assignment. Example solution: Improvement factor given in the readme file of the archive MPIptImprovement.tgz

  • 16. To be completed November 15 (12:15 sharp, 10 points):
    Calculate the energy and spin integrated autocorrelations times for each of the eight beta values of the MPI run of classwork 14. E-mail a table of the results (beta, tau_int, tau_intv).

  • 17A. To be completed December 6 (12:15 sharp, 2 points): Here are multicanonical data (txt) from a recent paper on the residual entropy of ordinary ice. The first column contains X=1/N, with N the number of H2O molecules, and the second column contains W1 and it error bar, where W=W1**N is the total number of configurations for N molecules in the (metastable) groundstate of ordinary ice. Perform extrapolations to infinite N with (A) the 2-parameter linear fit Y(X)=a1+a2*X (lfit.f together with subl_linear.f).

  • 17B+C. To be completed December 6 (12:15 sharp, 4 points): (B) the 3-parameter polynomial fit Y(X)=a1+a2*X+a3*X**2 (gfit.f together with subg_polynomial.f ) and (C) the 3-parameter power law fit Y(X)=a1+a2*X**a3 (gfit.f together with subg_powerc.f). Mail the Y(0) results together with their Q-values. Which fit would you take and why?

Back to MCMC main page.