# Is partition function algorithm-dependent or configuration-dependent?

I am reading this resource to learn statistical mechanics: http://blancopeck.net/Statistics.pdf

I am trying to learn about the partition function, which as I understand it, is equal to the number of legal configurations, in some of these randomized systems that we study to simulate molecular dynamics (hard disks, clothes pins on a line, etc.).

In general, it makes sense to me that the partition function can be related to the probability of acceptance of a configuration via the following:

$$Z(\eta) = Z(0) \,P_\text{accept}(\eta)$$

However, on page 99, in equation 2.8, I see the following form of that partition function:

$$Z(\eta) \approx V^N \exp[-2(N-1)\eta] \, .$$

It seems to me like this equation is only for use with hard disks, since at the bottom of page 98, it says at the beginning of the paragraph, "We shall now determine $P_\text{accept}(\eta)$ for the hard-disk system". Is this only for hard disks?

Then, I see another expression for the partition function on page 270, equation 6.5:

$$Z(\eta) = (L-2 N \sigma)^N$$

From the explanation given in the book, this equation 6.5 seems to be true only for the case when we are using Monte Carlo sampling.

Is the partition function algorithm-dependent, or configuration-dependent? Equation 2.8 is dependent on hard disks which is a configuration, which makes me think it is configuration dependent, but then equation 6.5 makes me think it is algorithm-dependent, since it is derived from using Monte Carlo algorithm.

Which one is it?

The partition function fully determines the thermodynamics of a system, and hence cannot be "algorithm-dependent". However, it is not "configuration-dependent" either. It depends on the system at hand (or, more precisely, on the Hamiltonian of the system) and on the thermodynamic state point (as specified by the thermodynamic variables $\eta$, $T$, etc.).
• It is just for hard disks. As you can see, it is derived from Eq. (2.7), which uses the fact that configurations where two disks are closer than 2$\sigma$ are forbidden (see the first equation of page 99). Since partition functions contain all the thermodynamics of a system, different systems have (generally speaking) different partition functions. – lr1985 Jul 18 '18 at 14:04
• I am still trying to see how it is NOT a function of the algorithm. There are two things that make me think it is a function of the algorithm: 1) when I look at the preceding explanation, it uses the fact that the algorithm is sorting, in order to derive an analytical expression for $Z(\eta)$ (this is analytical, not an approximation like in eq 2.8). 2), underneath equation 6.6, it talks about the probability of acceptance (which is certainly dependent on the algorithm) as using this result from $Z(\eta)$ in equation 6.5. – Candic3 Jul 19 '18 at 7:36