### The general idea

Several interesting problems appear when one wants to count states that preserve some fraction of the supersymmetry in quantum field theory or string theory or in M-theory. Dualities relate counting problems that appear to be rather different and unrelated. For instance, the counting of chiral primaries in a superconformal field theory gets mapped to counting different supergravity solutions using the AdS-CFT correspondence.

In most counting problems, it turns out to be simpler to construct generating functions as one does in statistical mechanics. Recall, that in statistical mechanics the canonical partition function may be thought of as a weighted sum over configurations with a fixed energy, $E$, with the weight given by $\exp(-\beta E)$. Similarly, the grand partition function introduces chemical potentials for every species of particles in the system — thus each term in grand partition gives the number of configurations with a fixed energy as well as fixed number of particles. The counting of BPS states proceeds in a similar manner — every BPS state carries a certain number of charges, introduce the analogue of the chemical potential for every independent charge — both electric and magnetic charges are to be included. The Dirac-Schwinger-Zwanziger quantisation makes these charges live on a *lattice*. One thus schematically writes

where $\mathbf{n}$ runs over some lattice, $d(\mathbf{n})$ is the number of configurations associated with the charge vector $\mathbf{n}$ and $\mathbf{q}$ is the generalised fugacity vector. Now apriori, the fugacity seems like just a mathematical curiosity. However, it usually turns out to be related to some physical parameter in the system like a Kahler modulus or string coupling and so on. The lattice that appears is usually an interesting one — for instance, in $\mathcal{N}=4$ string theory, it may be the Narain lattice and hence is even self-dual and Lorentzian. String and other dualities usually lead to additional properties — it may lead to a reduction in the effective number of fugacities that are really needed. Further, it may turn out that $\mathcal{Z}(\mathbf{q})$ may be a modular function of some group acting on the space of fugacities. Then, the modular property enables one to more or less uniquely fix this function.

### Some examples

Let us list a few examples of such counting problems

- The number of BPS states in a superconformal field theory. For instance, one can count $1/2,~1/4$,~\ldots,~1/16$ BPS states in $\mathcal{N}=4$ SYM theory. In the gravity dual, i.e., one may wish to count the equivalent BPS states such as
*giant gravitons*or*dual giant gravitons*and more generally, objects carry 3 $U(1)$ charges and 2 angular momenta. Generic non-zero values to all five charges leads to $1/16$ BPS states. The counting apparently involves symplectic quantisation of the moduli space of various probes. See for instance, - The number of dyonic states in CHL strings — these are string theories with $\mathcal{N}=4$ supersymmetry and there are several descriptions of them — as compactifications of the heterotic string, the type IIA and type IIB string theories to four-dimensions. The generating function here is a genus-two modular function and Lorentzian lattices of signature $(m,6)$ with $6\leq m \leq 22$ making an appearance. Dijkgraaf, Verlinde and Verlinde proposed that the degeneracies of dyons in the heterotic string compactified on $T^6$ is given by

where $\Phi_{10}(\mathbf{Z})$ is a genus-two modular form of weight $10$ and $\mathbf{Z}=\left(\begin{smallmatrix} z_1 & z_2 \\ z_2 & z_3 \end{smallmatrix}\right)$ is a point on the Siegel upper-half space $\mathbb{H}_2$ with $q=\exp(2\pi i z_1)$, $r=\exp(2\pi i z_2)$ and $s=\exp(2\pi i z_3)$.

- The counting on instantons in $U(1)$ gauge theories in four-dimensions with $\mathcal{N}=4$ supersymmetry in ALE spaces — the instantons may be thought of as zero-branes in the background of a single four-brane wrapping the ALE space. In flat-space, the partition function turns out to be proportional to inverse of the Dedekind $\eta(q)$ function, its argument being related to the complexified gauge coupling, $\tau=\tfrac{\theta}{2\pi}+i \tfrac{g^2}{4\pi}$ via $q=e^{2\pi i\tau}$. In ALE spaces, there are new kinds of zero-branes corresponding to two-branes wrapping two-cycles (of zero size in the strict orbifold limit). The generating function will now pick up additional fugacities related to the Kahler classes of the various two-cycles. The answer gets related to theta-functions related to characters of the affine Kac-Moody algebra — this seems to follow from the work of Nakajima.

### Using representations of quivers to count BPS states

The idea is that the generating function $\mathcal{Z}(\mathbf{q})$ may appear as the RHS of the denominator formula. It implies that there might be a product representation for the generating function. Now, in complicated examples, it is not clear that such a representation should exist though examples such as the generating function of 3d partitions due to MacMahon give hope that there are many more that must arise from quivers that arise from orbifolds of $\mathbb{C}^3$ and other such toric examples. MacMahon's formula leads to a generalisation of the eta-function

(3)where $P_{3D}(n)$ is the number of 3D Young tableaux with $n$ cubes. This function arises in the Gopakumar-Vafa counting of zero-branes in M-theory and in the counting of chiral primaries (in the scalar sub-sector) of $\mathcal{N}=4$ SYM theory. Is there some algebra underlying this function? Recall that for GKM algebras, there were two kinds of roots — those associated with a $sl(2)$ algebra and those associated with the Heisenberg algebra. Combining these two leads to the affine KM which naturally lead to the appearance of the eta-function.