Computational Many-Body Physics
Exercise 1: TASEP
As shown in the lecture, the TASEP with parallel update corresponds to rule \(184\). Here we consider the TASEP with \(N=50\) sites and periodic boundary conditions.
a)
Choose a random starting configuration with \(M\) particles (\(M\approx 25\)) and calculate the average flow for \(N_t=100\) time steps. The flow is defined here as the number of particles per unit time transferred from site \(N\) to site \(1\).

Average flow over 0 time steps:

b)
Calculate the fundamental diagram (flow versus density) for this model for \(0\leq \rho\leq 1\) (\(\rho=M/N\)). Starting from a single configuration for each value of \(\rho\) is sufficient here, but the quality of the data improves when the flow is averaged over many starting configurations.

# start configurations averaged over:




Exercise 2: Metropolis algorithm
In the Metropolis algorithm (as applied to the Ising model), random changes in the spin configuration are either accepted or rejected. It might appear strange that, if a change is rejected, the same spin configuration appears twice (or even three times etc.) in a row of the Markov chain. It is essential, however, that the unchanged spin configurations are included in the Markov chain to get the proper probability distribution. This can be analysed in a much simpler context: the application of the Metropolis algorithm to a one-dimensional integral.

Consider the one-dimensional integral \[I=\int\limits_{-\infty}^{\infty}\mathrm{d}x\,w(x)\,g(x),\hspace{10px}\text{with}\,\,w(x)=\frac{1}{\sqrt{\pi}}e^{-x^2}.\] The Metropolis algorithm generates a Markov chain of random numbers \(\{x_i\}\), with a distribution given by \(w(x)\), from which the integral can be approximated as \[I\approx\frac{1}{N}\sum_{i=1}^Ng(x_i).\] The \(\bar{x}_{i+1}\) in the Metropolis algorithm can be calculated as \[\bar{x}_{i+1}=x_i+h\delta,\] wiht \(\delta\) a random number between \(-1\) and \(1\) (equally distributed). The maximum step site \(h\) can be set to \(h=1\).
a)
Implement an appropriate Metropolis algorithm and show that, indeed, the distribution of the random numbers \(\{x_i\}\) is given by \(w(x)\).

Metropolis steps:

b)
What happens when we remove the unchanged \(x_i\) from the Markov chain?