This one is from a statistical mechanics problem set (the original PDF is linked at the end of the post). I like it as an example because the “polymer” turns out to be nothing more than a random walk, and its typical size comes out of a partition function trick that is worth knowing.
A directed polymer is made of atoms i=0,1,2,…,N sitting at positions (xi,yi)∈Z2 on a square lattice. The atom at the origin is fixed at x0=y0=0, and the other atoms are chained together such that
xi−xi−1=1
∣yi−yi−1∣=1
The polymer is therefore oriented along the x-direction, and it cannot intersect itself.
With these two rules we can draw the polymer as a set of points on Z2 joined by straight segments.
Origin.O=(0,0).
Steps in x. Each atom sits exactly one unit to the right of the previous one, xi−xi−1=1.
Steps in y. Each step goes either one unit up or one unit down, yi−yi−1=±1.
All 23 = 8 paths up to x = 3. The numbers on the right count how many paths end at each height (1, 3, 3, 1, the binomial coefficients). One path is highlighted.
So at every step to the right, the polymer has two options in y (up or down), and for a polymer of length N this gives
(2 choices after origin)×(2 choices after node 1)×⋯=2N total choices
The first question is how many microstates the polymer has in total. Put a particle on every node. The first one is fixed at the origin, and every following particle has 2 choices (up or down) relative to the one before it,
Finally, how far does the end of the chain typically wander from the axis, i.e. what is ⟨yN2⟩? One could do the sum over binomial coefficients by brute force, but there is a cleaner route.
where at β=0 we used sinh0=0 and cosh0=1. Dividing by Z(0),
⟨yN2⟩=Z(0)Z′′(0)=2N2N⋅N=N
This is what one should expect. The directed polymer is a random walk of N steps of size ±1, and for a random walk the variance (the typical deflection squared) grows linearly with the number of steps N. So the end of the chain typically sits about N away from the x-axis.