Wall-Crossing from Boltzmann Black Hole Halos

A key question in the study of N=2 supersymmetric string or field theories is to understand the decay of BPS bound states across walls of marginal stability in the space of parameters or vacua. By representing the potentially unstable bound states as multi-centered black hole solutions in N=2 supergravity, we provide two fully general and explicit formulae for the change in the (refined) index across the wall. The first,"Higgs branch"formula relies on Reineke's results for invariants of quivers without oriented loops, specialized to the Abelian case. The second,"Coulomb branch"formula results from evaluating the symplectic volume of the classical phase space of multi-centered solutions by localization. We provide extensive evidence that these new formulae agree with each other and with the mathematical results of Kontsevich and Soibelman (KS) and Joyce and Song (JS). The main physical insight behind our results is that the Bose-Fermi statistics of individual black holes participating in the bound state can be traded for Maxwell-Boltzmann statistics, provided the (integer) index \Omega(\gamma) of the internal degrees of freedom carried by each black hole is replaced by an effective (rational) index \bar\Omega(\gamma)= \sum_{m|\gamma} \Omega(\gamma/m)/m^2. A similar map also exists for the refined index. This observation provides a physical rationale for the appearance of the rational Donaldson-Thomas invariant \bar\Omega(\gamma) in the works of KS and JS. The simplicity of the wall crossing formula for rational invariants allows us to generalize the"semi-primitive wall-crossing formula"to arbitrary decays of the type \gamma\to M\gamma_1+N\gamma_2 with M=2,3.


Introduction and summary
In quantum field theories and string theory vacua with extended supersymmetry, the spectrum of BPS states can sometimes be determined exactly in a weakly coupled region of the space of parameters (or vacua). In extrapolating the BPS spectrum to another point in parameter space, one must be wary of two issues: BPS states may pair up and disappear, and single particle states may decay into the continuum of multi-particle states. The first issue can be evaded by considering a suitable index Ω(γ; t a ), where γ is the vector of electric and magnetic charges carried by the state and t a parametrizes the value of the couplings (or moduli), designed such that contributions from long multiplets cancel. The index Ω(γ; t a ) is then a piecewise constant function of the parameters t a . To deal with the second problem, it is important to understand how Ω(γ; t a ) changes across certain codimension-one subspaces of the parameter space, known as walls of marginal stability, where a single-particle BPS state becomes marginally unstable against decay into two (or more) BPS states [1,2,3,4,5].
Initial progress in this direction for four-dimensional string vacua came from supergravity, where BPS states are represented by (in general multi-centered) classical black hole solutions. Since the class of multi-centered solutions potentially unstable at a certain wall of marginal stability exists only on one side of the wall [6,7,8], the discontinuity ∆Ω(γ) in Ω(γ, t a ) is equal to the index of the multi-centered solutions with total charge γ, up to a sign depending whether one enters or leaves the side on which these solutions exist [9]. Based on this physical picture, one easily finds that the jump of the index in the simplest case, where the only configuration that may appear or disappear across the wall is a two-centered solution with primitive charge vectors γ 1 , γ 2 , is given by the "primitive wall-crossing formula" [9]: ∆Ω(γ) = (−1) γ 12 +1 |γ 12 | Ω(γ 1 ) Ω(γ 2 ) . (1.1) With some more effort one can also compute ∆Ω(γ) in "semi-primitive" cases, where the relevant multi-centered solutions which appear or disappear across the wall of marginal stability are halos of black holes with charges in multiple of γ 2 , orbiting around a core of charge γ 1 [9]. While applying this method to the general "non-primitive" case seemed out of reach up until now, the breakthrough came from the mathematical front, with the works of Kontsevich and Soibelman (KS) [10,11] and Joyce and Song (JS) [12,13,14]. In these works, general formulae were derived for the discontinuity of generalized Donaldson-Thomas (DT) invariants under changes of stability conditions. It is generally believed that generalized DT invariants are the appropriate mathematical embodiment of the physical BPS invariants. Although the KS and JS wall-crossing formulae look very different, there is by now much evidence that they are equivalent 1 . Since these two formulae appeared, much efforts have been devoted towards interpreting, deriving and checking these wall-crossing formulae in various physical settings [15,16,17,18,19,20,21,22,23]. Our goal in this paper is to rederive the wall-crossing formula using multi-centered black hole solutions in supergravity and extend the original black hole halo picture to the general "non-primitive" case. We also carry out extensive comparisons between our formulae and those of KS and JS.
One intriguing aspect of the KS and JS wall-crossing formulae is the appearance of two types of BPS-invariants, an integer-valued invariant Ω (roughly Tr (−1) F ) and a rationalvalued invariantΩ. The two are related by the "multi-cover formula" where the sum runs over all positive integers m such that γ/m lies in the charge lattice. We shall take (1.2) as the definition ofΩ. Similar divisor sums appear in various instances in quantum field theory, e.g. in Schwinger's computation of pair creation in an external electric field (see e.g. Eqs. (4.118) and (4.119) in [24]), and in enumerative geometry, e.g. the multicover formulae for Gromov-Witten invariants [25], which indeed are naturally understood from pair creation arguments [26,27]. The rational invariantsΩ also arose in constructions of modular invariant black hole partition functions consistent with wall-crossing [28,29,30], and in studies of D-brane instanton corrections to the hypermultiplet moduli space metric [17,31,32].
For the purposes of computing the jump in the BPS spectrum, the rational invariants turn out to be especially convenient. Indeed, one consequence of the JS/KS wall-crossing formulae is that the variation ∆Ω(γ) of the rational invariants across a wall of marginal stability, when expressed in terms of the rational invariantsΩ(γ ) on one side of the wall, involves only "charge conserving" terms, i.e. sums of products ofΩ(γ i ) for different γ i such that i γ i = γ. In contrast, the variation of the integer invariants ∆Ω(γ), expressed in terms of the integer invariants Ω(γ), does not satisfy this property, and as a result, involves considerably more terms. Needless to say, physical charge is conserved no matter what invariant one chooses to consider.
Our main new insight, at the basis of the results presented below, is the following physical explanation of this phenomenon. In computing ∆Ω(γ) from the index associated with a ncentered black hole solution carrying total charge γ = n i=1 γ i , each center must be treated as a point-like particle carrying |Ω(γ i )| internal states. When some of the γ i coincide, the corresponding centers must in addition obey Bose or Fermi statistics, depending on the sign of Ω(γ i ). As a result of (anti-)symmetrizing the many-body wave-function, the total index associated with such a configuration involves, in addition to the product n i=1 Ω(γ i ), terms of lower degree in Ω(γ i ) -e.g. two identical bosons of degeneracy Ω will give a degeneracy of Ω(Ω + 1)/2. The terms of lower degree in Ω violate the charge conservation property defined above. However, due to special properties of the interactions between centers (namely, the no-force condition between centers with mutually local charges), we show that it is possible to map the problem of computing the index of multi-centered black holes with individual centers satisfying Bose/Fermi statistics to an equivalent problem where the centers satisfy instead Maxwell-Boltzmann statistics. In this Boltzmannian reformulation, each center carries an effective (in general non integer) indexΩ(γ) related to Ω(γ) via (1.2), and charge conservation is manifest. This provides a physical rationale of the charge conservation property of the wall-crossing formula written in terms of the rational invariantsΩ.
The same argument generalizes for the refined 'index' Ω ref (γ, y), defined roughly as Tr (−1) F y 2J 3 , which keeps track of the angular momentum of the BPS states. However this refined 'index' is only protected (i.e. immune to contributions of long multiplets) in the presence of a SU (2) R symmetry [21]. Such a symmetry exists in N = 2 supersymmetric field theory, but not in string theory or supergravity. As a result, this refined 'index' will in general be different at weak and strong coupling (more generally its value will depend on both vector multiplets and hypermultiplets). Nevertheless, one may still investigate the variation of Ω ref (γ, y) across lines of marginal stability in vector multiplet moduli space. In fact, KS have provided a wall-crossing formula for motivic Donaldson-Thomas invariants, which are conjectured to be equal to the refined invariants Ω ref (γ, y) at weak coupling, where the derived category description of D-branes is appropriate [33,34]. Similarly, one may ask about the wall-crossing formula in the strong coupling region where the supergravity picture is appropriate. As for the standard index, we find that the variation ∆Ω ± ref (γ, y) can be computed by treating centers as Boltzmannian particles carrying internal states with effective refined indexΩ In this formulation, charge conservation is again manifest. At y = 1, Ω ref (γ, y) reduces to Ω(γ) and (1.3) to (1.2). While the arguments above rely on representing BPS states as multi-centered solutions in supergravity, it is clear that it extends to the case of N = 2 supersymmetric gauge theories which can be obtained as rigid limits of supergravity theories [35]. In general, we expect that BPS solitons in the Coulomb phase can be represented as classical multi-centered solutions of the Abelian gauge theory at low energy, albeit singular ones. For the purposes of computing the wall-crossing, the singularity is irrelevant, and the problem can still be reduced to the quantum mechanics of point-like particles interacting by Coulomb law and scalar interactions. In particular, solitons with mutually local charges ( γ 1 , γ 2 = 0) do not interact, and the above Bose-Fermi/Boltzmann equivalence carries over.
Finally, it is worth pointing out that a similar phenomenon occurs for non-primitive wall-crossing in N = 4 supersymmetric string theories [36]. In this case only two-centered configurations contribute, and the only non-trivial effect comes from symmetrization [37,38]. The variation of the index is thus given by the primitive wall-crossing formula (1.1), provided Ω(γ) is replaced by withΩ(γ) = m|γ Ω(γ/m) in this formula. Note that in contrast to the effective index (1.2) relevant for N = 2 BPS states, the effective indexΩ(γ) relevant for N = 4 dyons does not include any factor of 1/m 2 in its definition. This difference can be traced to the presence of extra fermion zero modes carried by a quarter BPS dyon in N = 4 supersymmetric theories. Trace over these fermion zero modes for a system of identical particles produces an extra factor of m 2 in (1.2) compared to that for half BPS dyons in N = 2 supersymmetric theories.
We shall now summarise our main results. Consider a wall of marginal stability on which the central charges Z γ 1 and Z γ 2 of two charge vectors γ 1 and γ 2 align. Assume further that, possibly after a change of basis in the lattice spanned by γ 1 and γ 2 , BPS states carrying charge M γ 1 + N γ 2 exist only for (M ≥ 0, N ≥ 0) and (M ≤ 0, N ≤ 0). Then on one side of the wall, which we call the chamber c − , we have γ 1 , γ 2 Im(Z γ 1Z γ 2 ) > 0, and there are multi-centered bound states with individual centers carrying charges of the form m i γ 1 + n i γ 2 with different integers m i , n i ≥ 0. Here γ 1 , γ 2 is the symplectic inner product between γ 1 and γ 2 . On the other side of the wall, called the chamber c + , there are no bound states of this form. Let us denote by Ω ± (α) the index Tr (−1) 2J 3 on the two sides of the wall for a charge vector α = M γ 1 + N γ 2 with M, N ≥ 0. ( Tr denotes the trace after removing the fermion zero modes associated with broken supersymmetries.) Then the physical reasoning outlined above shows that the wall-crossing formula, expressed in terms of the rational invariants (1.2), must take the form Ω − (γ) −Ω + (γ) = n≥2 {α 1 ,...,αn} γ=α 1 +···+αn where the sum runs over all possible unordered decompositions of α into vectors α 1 , . . . , α n , each of which is a linear combination of γ 1 and γ 2 with non-negative integer coefficients. Here, |Aut({α i })| is the symmetry factor appropriate for Maxwell-Boltzmann statistics, namely the order of the subgroup of the permutation group of n elements which preserves the ordered set (α 1 , . . . , α n ), for a fixed (arbitrary) choice of ordering. 2 Of course, one could instead decide to absorb this symmetry factor in the normalization of g({α i }). The point of the normalization chosen in (1.4) is that g(α 1 , . . . , α n ) can now be identified as the index associated with an n-centered black hole configuration in supergravity, with the individual centers carrying charges α 1 , α 2 , . . . , α n and treated as distinguishable particles, and furthermore carrying no internal degeneracy. Clearly, the same considerations imply that the wall-crossing formula for refined invariants takes an analog form where g ref ({α i }, y) computes the refined 'index' of the same n-centered black hole configuration, and reduces to g({α i }) at y = 1. In order to complete the wall-crossing formula we need to specify the factor g ref ({α i }, y) (or its y = 1 limit g({α i }) ). While these factors can be extracted from the KS and JS formulae, we shall present two novel ways for computing them, which we call the "Higgs branch" and the "Coulomb branch" formulae. We have checked in many cases the equivalence of these prescriptions with the KS and JS formulae, although we have not yet been able to prove the equivalence rigorously. The "Higgs branch" formula is based on Denef's observation [7] that the spectrum of supersymmetric bound states of multi-centered black holes can be computed in the framework of quiver quantum mechanics. This description is appropriate at weak coupling, the arrows of the quiver describing the open strings stretched between two D-branes. Due to the fact that the charges carried by the various centers lie on a two-dimensional sublattice of the full charge lattice, the relevant quiver turns out to have no oriented loops. A formula for the motivic invariants of such quivers was given by Reineke in [39]. Furthermore, since the constituents of the bound states are to be treated as distinguishable particles without internal multiplicity, the relevant quiver carries dimension one vector spaces at each node (equivalently, corresponds to a U (1) n gauge theory). Reineke's formula simplifies in this case, leading to (1.6) Here we have denoted by α ij = α i , α j the symplectic inner product between the vectors α i and α j , and have ordered the α i 's such that α i , α j > 0 for i < j (assuming that none of the vectors α i coincide). The sum runs over all ordered partitions of ( When some of the α i 's coincide, the value of g ref (α 1 , . . . , α n , y) can still be obtained from (1.6) by taking the limit α i → α j : even though the α i 's are supposed to be valued in the two dimensional lattice spanned by γ 1 and γ 2 , eq. (3.1) defines a continuous function of the α i 's and this limit is well-defined. We have checked agreement with the KS and JS formulae for distinct α i with n ≤ 5, and in many cases where some of the α i coincide. While it is not surprising that the Reineke formula is consistent with the JS formula (since the latter applies to moduli space of quiver representations), it is remarkable that Abelian quivers (i.e. quivers carrying a dimension-one vector space at each node) encode the complete information about wall-crossing. In Appendix §D we show that the index of certain non-Abelian quivers without oriented loops can be reduced to the Abelian case using the same black hole halo picture. Our second way of computing g ref ({α i }, y) instead follows from quantizing the moduli space of multi-centered BPS solutions, as first proposed in [40]. This description is most appropriate at strong coupling, when the classical supergravity description is valid. Using the fact that the moduli space M n of n-centered solutions carries a natural symplectic structure and a Hamiltonian action of SU (2), we evaluate the integral of y 2J 3 over this classical phase space by localization. The fixed points of the action of J 3 on M n are collinear configurations where all centers lie on the z-axis, with relative distances determined by where Λ is a positive real constant which can be removed by rescaling the z i 's, and σ is the permutation which determines the order of the centers along the axis, z σ(i) < z σ(j) if i < j.
In this way we arrive at the "Coulomb branch formula" where the sum runs over the subset of the permutation group in n elements for which the equations (1.7) admit a solution. The factor s(σ) originates from the determinant of the action of J 3 on the tangent space at the fixed points, and evaluates to the sign While eq. (1.8) is still implicit, since it requires solving the equations (1.7) (or rather, characterizing the permutations σ such that (1.7) admits a solution), it provides us with an economic way of determining g ref ({α i }, y), since each permutation has a unique y dependence and hence there are no cancellations between different permutations. In contrast both the JS formula and "Higgs branch" formula (1.6) involves extensive cancellations between different terms. We shall in fact see in §3.3 that motivated by the Coulomb branch formula one can find an algorithm to identify the uncancelled contributions in the Higgs branch formula without having to evaluate all the terms given in (1.6). The use of the rational invariantsΩ also allows us to use the KS formula to derive explicit formulas for the change in the index in some special cases. This includes sectors carrying charges of the form 2γ 1 + N γ 2 and 3γ 1 + N γ 2 for primitive vectors γ 1 , γ 2 and arbitrary integer N . This generalizes the semi-primitive wall-crossing formula of [9] which describes the change in the index in the sector with charge γ 1 + N γ 2 , and some earlier results on higher-rank ADHM and DT invariants [41,42,43].
The rest of the paper is organised as follows. In §2 we describe how the problem of computing the index of multi-centered black holes can be mapped to an equivalent problem with the individual centers obeying Maxwell-Boltzmann statistics. We use this to derive some general properties of the wall-crossing formula e.g. charge conservation, and also reproduce the primitive and semi-primitive wall crossing formula. We also generalize the results to the case of refined index. In §3 we compute the index associated to n-centered black hole configurations in two different ways, first by mapping the problem to a quiver quantum mechanics and second by quantizing the classical phase space of multi-centered solutions. This leads to the Coulomb and Higgs branch formulae described above. In §4 we review the KS wall-crossing formula, and recast it in terms of the rational invariantsΩ, making the charge conservation property manifest. We verify that the motivic KS formula agrees with the results of §2 and §3 in many cases, and obtain higher order generalizations of the semiprimitive wall-crossing formula. In §5 we review the wall-crossing formula due to Joyce and Song and compare it to the KS, Higgs branch and Coulomb formulae. We find agreement in all cases that we consider. In Appendix A we illustrate the general wall crossing formulae in some special cases. In Appendix B we apply the results of §4 to analyze the spectrum of D0-D6 bound states on a Calabi-Yau 3-fold. In Appendix C we check our results against the spectrum of BPS states in N = 2 SU (2) gauge theories. In Appendix D we show how our Boltzmann gas picture allows one to express the Poincaré polynomial associated with quiver quantum mechanics with U (N ) factors in terms of the Poincaré polynomial of Abelian quivers. This lends further support to the validity of the Boltzmann gas picture of multi-centered black holes.
2. Boltzmannian view of the wall-crossing 2.1 BPS states in N = 2 supergravity We consider N = 2 supergravity in 4 dimensions, coupled to n v vector multiplets. Let M be the vector multiplet moduli space, parametrized by complex scalar fields t a , a = 1, . . . , n v , and Γ be the lattice of electromagnetic charges. Γ is a lattice of rank dimension 2n v + 2, equipped with an integer symplectic pairing. We choose a Lagrangian decomposition Γ = Γ m ⊕ Γ e , such that the symplectic pairing is given by . The mass of a BPS state with charge γ is equal to the absolute value of the central charge Z γ , defined by where K, X Λ and F Λ are appropriate functions of the moduli fields {t a }. Let H γ (t a ) be the Hilbert space of states with charge γ in the vacuum where the scalars asymptote to t a at spatial infinity. The index defines an integer Ω(γ; t a ), which counts the number of BPS states with sign (the overall coefficient ensures that a half-hypermultiplet contributes one unit to Ω(γ; t a )). Alternatively we could define the index as where Tr denotes trace over BPS states, computed after removing the contribution from the fermion zero modes associated with the supersymmetries broken by the state. Mathematically, the BPS invariants {Ω(γ; t a ), γ ∈ Γ} are the generalized Donaldson-Thomas (DT) invariants for the derived category of coherent sheaves (in type IIA on a Calabi-Yau threefold X ) or the Fukaya category (in type IIB on a Calabi-Yau threefold X ).

Wall crossing: Preliminaries
The BPS invariants Ω(γ; t a ) are locally constant functions of t a , but may jump on codimension one subspaces of M (line of marginal stability), where γ can be written as the sum γ = M γ 1 + N γ 2 , where M, N are two non-zero integers and γ 1 and γ 2 are two primitive (non-zero) vectors such that the phases of Z γ 1 and Z γ 2 are aligned. We denote the hyperplane where the phases of γ 1 , γ 2 are aligned by P(γ 1 , γ 2 ). Since the dependence of Ω(γ; t a ) on {t a } is mild, we shall drop t a from the argument of Ω and use superscripts ± to indicate which side of P(γ 1 , γ 2 ) we are computing the index.
Clearly, P(γ 1 , γ 2 ) depends only on the two-plane spanned by γ 1 and γ 2 inside Γ. For a given choice of γ and of this two plane, (M, N ) and (γ 1 , γ 2 ) are uniquely defined up to a common action of SL(2, Z). We shall now make a special choice of (γ 1 , γ 2 ) such that there are no BPS states carrying charges of the form M γ 1 − N γ 2 or −M γ 1 + N γ 2 with M, N > 0 [22]. For this reason it will be convenient to introduce the notatioñ and focus on BPS states carrying charge inΓ. For definiteness we shall choose γ 1 , γ 2 < 0. We shall be considering the jump in the index Ω(M γ 1 + N γ 2 ) across the wall P(γ 1 , γ 2 ) for non-negative integers M, N . We shall denote by Z γ the central charge associated with the charge γ, and choose Ω + to describe the index in the chamber in which arg(Z γ 1 ) > arg(Z γ 2 ). In this case arg(Z M γ 1 +N γ 2 ) is greater (less) than arg(Z M γ 1 +N γ 2 ) if M/N is greater (less) than M /N . We shall denote this chamber by c + . For Ω − the ordering of arg(Z M γ 1 +N γ 2 ) is reversed, and the corresponding chamber will be called c − . Using the fact that γ 1 , γ 2 < 0 we now get in the chamber c + This is the condition under which two-centered bound states of black holes carrying charges M γ 1 + N γ 2 and M γ 1 + N γ 2 do not exist [6]. Thus Ω + 's label the index in the chamber in which there are no two centered black holes with each center carrying charge iñ Γ. Generalizing this argument (see §3.2) one can show that in the chamber c + there are also no multi-centered black holes carrying charges of the form In contrast Ω − 's label the index in the chamber where such bound states are present. Note that Ω + can receive contribution both from single and multi-centered black holes, but these multi-centered configurations consist of centers whose charges lie outside the sublattice spanned by γ 1 and γ 2 . Due to this the distances between the centers remain finite as the wall P(γ 1 , γ 2 ) is approached. In contrast the distance between the centers carrying charges inΓ -appearing in a configuration contributing to Ω − -goes to infinity in this limit. Thus the configurations which contribute to Ω + , even though not necessarily single centered black holes, can be treated as a single unit near this wall of marginal stability. For this reason we shall refer to Ω + (M γ 1 + N γ 2 ) as the index associated with a black hole molecule of charge M γ 1 +N γ 2 . Using this analogy, the full system, containing multiple molecules loosely bound to each other near the wall P(γ 1 , γ 2 ), may be thought of as a molecular cluster. While the black hole molecule may itself be made of atoms (i.e. single centered black holes), the nature of these constituents is irrelevant for the problem at hand.
Our aim is to provide a wall-crossing formula which expresses Ω − in terms of Ω + . In supergravity the difference Ω − − Ω + is accounted for by the bound states of multiple black hole molecules carrying charges of the form M i γ 1 + N i γ 2 , since they contribute to Ω − but not to Ω + . Our goal in the rest of this section and the next section will be to use this viewpoint to derive the wall-crossing formula.

Bose/Fermi statistics to Maxwell-Boltzmann statistics
Let γ 0 be a primitive point on the charge lattice and let d(sγ 0 ) be the number of bosonic states minus the number of fermionic states of a black hole molecule 3 carrying charge sγ 0 moving in some appropriate background. We shall consider a system carrying total charge kγ 0 consisting of a gas of mutually non-interacting black hole molecules carrying charges sγ 0 for different integers s. A typical configuration will contain m s black hole molecules with charge sγ 0 , subject to the constraint s sm s = k . (2.7) The net contribution to the index from such configurations is given by For bosons d(sγ 0 ) > 0, and the above result follows from the fact that m identical bosons occupying d states produce a degeneracy of d B = d(d + 1) · · · (d + m − 1)/m!. For fermions d(sγ 0 ) < 0, and the result follows from the fact that m fermions occupying |d| states have total degeneracy d F = (|d|)(|d|−1) · · · (|d|−m+1)/m! and index (−1) m d F = d(d+1) · · · (d+ m − 1)/m!. It will be convenient to encode (2.8) into a generating function We shall now prove that exactly the same contribution to the index is obtained if for each γ we replace d(γ) byd (γ) ≡ m|γ m −1 d(γ/m) (2.10) and treat the particles as obeying Maxwell-Boltzmann statistics rather than Bose or Fermi statistics. For this we calculate the generating function of the index of a gas of non-interacting Boltzmann black hole molecules carrying charges sγ 0 for different integers s. This is given by The m s ! in the denominator in the first line is the symmetry factor required for resolving the Gibbs paradox. Comparing (2.11) with (2.9) we see that the generating functions f (x) and g(x) are the same. Thus we are allowed to treat the black hole molecules as Boltzmann particles as long as we use the effective indexd(γ). In general d(sγ 0 ) receives contribution from the intrinsic index Ω + (sγ 0 ) of the black hole molecules and from the orbital degeneracy describing its motion in the background of other charges. The contribution to the orbital part of a black hole molecule of charge sγ 0 is expected not to be affected by the presence of the other black hole molecules carrying charges lγ 0 for any integer l since the symplectic product kγ 0 , lγ 0 vanishes and as a consequence the particles are mutually noninteracting. In particular the repulsive electromagnetic interactions cancel against the attractive gravitational and scalar exchange interactions. 4 On the other hand the orbital degeneracy is expected to depend on the background produced by other black hole molecules carrying charge not proportional to γ 0 . We shall not need the explicit form of this contribution which is hard to compute in general when there are multiple other black hole molecules distributed in space, but use the fact that for a charged particle in a magnetic field the number of states per unit area in the lowest Landau level is proportional to the charge carried by the particle. To be more specific, we compare a configuration of a molecule of charge sγ 0 moving in the background of other molecules carrying arbitrary charges with a configuration of s closeby molecules each of charge γ 0 moving in the same background. In this case the phase space volume element for the molecule of charge sγ 0 will be s times the phase space volume element for each molecule of charge γ 0 . Thus for a fixed background the orbital density of states for a black hole molecule carrying charge sγ 0 , being proportional to the phase space volume element, will be s times the orbital density of states of a molecule of charge γ 0 . Thus we have d(sγ 0 )/d(γ 0 ) = sΩ + (sγ 0 )/Ω + (γ 0 ), and hence we see that replacing d(γ) byd(γ) is equivalent to replacing Ω + (γ) bȳ (2.14) We shall see in §4 that the fractional DT invariantsΩ(γ) arise naturally in the KS wallcrossing formula. We end this section with a word of caution. For a generic interacting system of bosons or fermions the effect of statistics and interaction cannot always be disentangled to map the problem to an equivalent problem with Boltzmann particles. Consider for example the case of an interacting system of two identical particles for which at a certain energy eigenvalue E we have n s symmetric and n a anti-symmetric wave-functions. In this case we shall not get any simple map from the bosonic or fermionic system to a system of Boltzmann particles. Only if the identical particles are non-interacting so that multi-particle wave-functions can be constructed from (anti-)symmetric products of single particle wave functions, we have a simple map from a Bose/Fermi gas to a Boltzmann gas.

General wall-crossing formula and charge conservation
The analysis of §2.3 leads to the following prescription for computing wall-crossing from supergravity black holes. Suppose in the chamber c − we have a configuration of multicentered black hole molecules, consisting of m r,s centers of charge (rγ 1 + sγ 2 ) for different values of (r, s). These molecules interact via long range electromagnetic, gravitational and other massless particle exchange interactions. We now consider a quantum mechanics of this system regarding the different centers as distinguishable particles, each with unit degeneracy, and denote by g({m r,s }) trace of (−1) 2J 3 in this quantum mechanics. Then the wall-crossing formula will be given by  are somewhat ill defined since the total index in the sector of charge (M γ 1 + N γ 2 ) can receive contribution also from unbound multiparticle states carrying charges (M γ 1 + N γ 2 )/s for integers s |(M, N ). Thus the unambiguous quantity is the effective index which enters the formula for the index of a bigger system of which the system with charge (M γ 1 + N γ 2 ) may form a subsystem [22]. This is what we callΩ ± and this is the quantity whose jump is computed by the right hand side of (2.15). A slightly different way of expressing (2.15) is: where the sum runs over all possible unordered decompositions of α into vectors α 1 , . . . , α n ∈ Γ. The integer |Aut({α i })| is defined as follows. If all the α i 's are distinct then |Aut({α i })| = 1. If on the other hand the set (α 1 , . . . , α n ) consists of m 1 copies of a vector β 1 , m 2 copies of a vector β 2 etc. then |Aut({α i })| = a m a !. Finally g(α 1 , . . . , α n ) represents the index associated with an n-centered black hole configuration in supergravity, with the individual centers carrying charges α 1 , α 2 , . . . , α n and treated as distinguishable particles carrying no internal degeneracy. Note that by an abuse of notation we have used for the argument of g two different representations of the index of multi-centered black holes -one where the arguments are charges carried by individual centers and the other where the arguments are integers specifying how many of the centers carry a given charge vector rγ 1 + sγ 2 . An immediate consequence of (2.16) is 'charge conservation' -the sum of the charges appearing in the arguments ofΩ + on the right hand side of the equation is equal to the argument of ∆Ω on the left hand side of this equation. In contrast if we had written the wall-crossing formula using the indices Ω + on the right hand side then there is no manifest charge conservation. This is a consequence of the fact that the use ofΩ allows us to use Maxwell-Boltzmann statistics for computing the contribution to the index due to multiple black hole molecules. In contrast if we had used Bose or Fermi statistics then manifest charge conservation is spoiled by the symmetrization effect since the degeneracy of k identical particles carrying index Ω + not only contains a term proportional to (Ω + ) k but also other terms containing lower powers of Ω + .

Semi-primitive wall-crossing from Boltzmann gas of black hole molecules
In this section we shall derive the semi-primitive wall-crossing formula by counting the index of a gas of black hole molecules carrying charges sγ 2 for different integers s, forming a halo around another black hole molecule of primitive charge γ 1 . We denote by kγ 2 the total charge carried by the black hole gas. As noted in section §2.3, for this calculation we can regard the gas as one obeying Maxwell-Boltzmann statistics as long as we replace the index Ω + (sγ 2 ) of a black hole molecule carrying charge sγ 2 byΩ + (sγ 2 ). The orbital motion of a black hole molecule of charge sγ 2 around a molecule of charge γ 1 produces states carrying angular momentum (| γ 1 , sγ 2 | − 1)/2, and gives a contribution (−1) γ 1 ,sγ 2 +1 | γ 1 , sγ 2 | to the index [9]. Taking into account this additional factor we get the total contribution to the index from a single black hole molecule of charge sγ 2 to be (−1) γ 1 ,sγ 2 +1 | γ 1 , sγ 2 |Ω + (sγ 2 ) . (2.17) Since we have already chosen γ 1 , γ 2 to be negative we can drop the absolute value sign and the +1 from the exponent. Thus if the halo consists of m s black hole molecules of charge sγ 2 then the net contribution to the index is Summing over all possible values of m s subject to the condition s sm s = N , and multiplying this by the index Ω + (γ 1 ) of the black hole molecule of charge γ 1 we get a total contribution Ω + (γ 1 ) Ω halo (γ 1 , N ), where This is the jump in the index due to a bound state of a black hole molecule of charge γ 1 and a halo of black hole molecules carrying charges sγ 2 for different integers s. In order to calculate the total change in the index in the sector of charge γ 1 + N γ 2 across the wall of marginal stability P(γ 1 , γ 2 ), we need to sum over all possible bound states containing a core of charge γ 1 + lγ 2 and a halo of total charge (N − l)γ 2 . Thus we have to sum over several terms of the form (2.19) with γ 1 replaced by γ 1 + lγ 2 and N replaced by (N − l) for different integers l. This gives where we have used the primitivity of γ 1 + γ 2 to replace Ω ± (γ 1 + γ 2 ) byΩ ± (γ 1 + γ 2 ) for 0 ≤ ≤ N . This can be formalized in terms of the partition function Then (2.20) can be written asZ We shall see later that this agrees with the KS and JS wall-crossing formula restricted to the semi-primitive case (eqs.(4.29), (4.30) and (5.26)). For N = 1 using γ 12 < 0, we recover the primitive wall-crossing formula (1.1).
To recover the semi-primitive wall-crossing formula of [9] from (2.22), (2.23), we proceed as follows. First of all we note that the relation (2.14) can be inverted as where µ(d) is the Möbius function (i.e. 1 if d is a product of an even number of distinct primes, −1 if d is a product of an odd number of primes, or 0 otherwise). Using the identity Eqs. (2.22), (2.25) give precisely the semi-primitive wall-crossing formula of [9].

Refined 'index' in supergravity
Kontsevich and Soibelman also analyzed the wall crossing formula for the motivic DT invariants, which are quantized versions of the numerical DT invariants Ω(γ; y). They enumerate the Betti numbers of the moduli space of BPS-states for given charge γ in the weak string coupling regime, whereas Ω(γ) equals the Euler characteristics of this moduli space, up to a sign. Physically, the motivic DT invariants keep track of the angular momentum quantum numbers carried by the black hole at weak string coupling where the system may be represented as a collection of D6-D4-D2-D0 branes wrapped on a Calabi-Yau 3-fold [33,34]. A simple way to do this is to introduce an extra factor of y 2J 3 inside the trace in (2.4) besides the (−1) 2J 3 factor that is already present in this definition of the index. Thus at a given point in moduli space, the refined 'index' 6 Ω ref (γ, y) is defined by [10,33,34] where Tr denotes the trace over BPS states computed after removing the contribution from the fermion zero modes associated with the supersymmetries broken by the black hole. Alternatively we could compute the ordinary trace over all the BPS states and then divide the result by (2 − y − y −1 ) which represents the contribution from the fermion zero modes. The usual generalized DT invariants are obtained by setting y = 1, In string theory (2.26) is not an index since it is not protected against quantum corrections as we switch on the string coupling. In supersymmetric gauge theories one can define an alternative version of this index as [21], where I 3 is the third component of the SU (2) R symmetry. This is protected against quantum corrections. We shall however proceed with the definition (2.26) since our main interest is in string theory. Even though there is no general argument that protects this 'index' from changing as we vary the string coupling, and hence the DT invariants and the black hole degeneracies may not be equal, we may nevertheless expect that the structure of the wallcrossing formula at fixed coupling will remain the same. Thus we can regard the motivic KS formula as giving the change in Ω ref (γ, y) across a wall of marginal stability at fixed value of the string coupling. With this in mind we shall analyze the jump in the motivic 'index' in supergravity and then compare this with the KS formula. Our supergravity analysis, compared to that in §2.3, will be somewhat heuristic; however the final result of this analysis will turn out to be consistent with the KS motivic wall-crossing formula. We begin by introducing some notations. We have already denoted by Ω ref (γ, y) the refined 'index' computed by introducing a weight factor of y 2J 3 into the trace in (2.4). More generally we shall use the subscript ref to denote various quantities in which the trace over different angular momentum states has been performed with a weight factor of y 2J 3 . With this the analog of (2.10) takes the form (2.29) A word of caution is warranted here. Since the full system is rotationally invariant, the states of this system can be characterized by their angular momentum. However when we examine the motion of one subsystem in the background of the other, the background generically breaks rotational invariance and hence states can no longer be classified by their angular momentum unless the background is generated by a point source (or a spherically symmetric source). We shall nevertheless proceed as if each subsystem consisting of a set of identical particles moved in the background produced by a point source so that an assignment of angular momentum quantum numbers to such individual subsystems were possible. Based on this assumption we shall arrive at an expression for the motivic index of the whole system in terms of the index carried by the individual molecules. This procedure can be justified a posteriori by the fact that it allows for a physical understanding of the motivic generalization of the KS wall-crossing formula.
After multiplying (2.29) by y 2J 3 and summing over J 3 we get Our next task is to find the generalization of (2.12). Let us denote by d orb (γ, J 3 ) the degeneracy due to orbital motion of a black hole molecule of charge γ in some fixed background. Again we pretend that the background is spherically symmetric so that it makes sense to assign definite angular momentum quantum numbers to the orbital states of individual subsystems. Then we have Eq. (2.30) and (2.31) now givē We shall now try to express d orb;ref (γ/m, y m ) in terms of d orb;ref (γ, y). For this (still pretending that we have a rotationally invariant subsystem) we shall decompose the orbital spectrum into SU (2) representations and denote by b(γ, J) the coefficient of the character of the representation of spin J . Then we have We now use the fact that for any m ∈ Z + , and for spherically symmetric background, we Effectively (2.35) follows from the fact that increasing the charge of the molecule by a factor of m changes the angular momentum carried by the lowest Landau level such that the degeneracy of the Landau level gets scaled by a factor of m. Using this we get Substituting this into (2.33) we arrive at where the "rational motivic invariants"Ω ref are defined bȳ This shows that in computing the refined index of the full system we can treat the particles as obeying Maxwell-Boltzmann statistics provided we replace Ω ref byΩ ref . As in the case of the classical DT invariants, the use of these invariants ensures that only charge preserving terms appear in any wall-crossing formula.
The rational motivic invariants have appeared earlier in other contexts, for example in the construction of modular invariant partition functions in [29]. We would also like to point out that their structure is very similar to the free energy which arises in the computations by Gopakumar and Vafa [27]. The only difference is that in the Euclidean setup of [27], the factor (y d − y −d ) on the right-hand side of (2.38) is replaced by (y d − y −d ) 2 . As in this case, the generating function of the rational invariantsΩ ref leads to a product formula where φ is a vector of chemical potentials conjugate to the charge vector γ. Note that this product structure is lost in the limit y → 1. The analog of (2.15) now takes the form 7 r,s rmr,s=M, r,s smr,s=N consistently with the charge conservation property of the motivic wall crossing formula when expressed in terms of the combinationsΩ ± ref . Note that even though our derivation of (2.41) has been marred by unreasonable assumption of spherical symmetry in the dynamics of various subsystems, each term in (2.41) is defined unambiguously so that it can be put to test against known results.
We can also easily derive the semi-primitive version of the motivic wall-crossing formula by following the logic of §2.5. It takes the form 8 We shall see later that this is in perfect agreement with the prediction of KS motivic wallcrossing formula (4.72).

Multi-black hole bound states and quiver quantum mechanics
In order to have a complete wall-crossing formula we need to find explicit expressions for the functions g({α i }), g ref ({α i }, y) appearing in eqs.(2.16) and (2.41) respectively. This requires finding the spectrum of supersymmetric bound states of multi-black hole configurations in supergravity. As argued by Denef [6], the supersymmetric quantum mechanics of multicentered BPS configurations can be viewed as the "Coulomb phase" of a quiver matrix model, valid at strong coupling. At weak coupling, the wave function is instead supported on the Higgs branch. It should be possible to compute the function g({α i }), g ref ({α i }, y) from either description. In this section we shall describe both these approaches. As we shall see, the description on the Higgs branch, described in §3.1, allows us to solve the problem completely. On the other hand the description on the Coulomb branch, described in §3.2, also gives a complete algorithm for finding g({α i }), but it is more difficult to solve it explicitly. Furthermore with some guesswork we can also arrive at a specific proposal for g ref ({α i }, y) from the analysis on the Coulomb branch. Without any loss of generality we can arrange the α i 's so that Now if we represent a vector M γ 1 + N γ 2 inΓ by the point (M, N ) in the Cartesian coordinate system, then in this representation a pair of vectors (α, β) will follow clockwise (anti-clockwise) order if α, β is positive (negative). The condition (3.1) then implies that the vectors α 1 , · · · α n are arranged in a clockwise fashion. Throughout this section we shall work with this particular ordering of the α i 's.

Higgs branch analysis
As has been argued by Denef [7], the bound state spectrum of multi-centered black holes can also be computed using quiver quantum mechanics. For computing g ref ({α i }, y) we need to study the bound states of n distinguishable particles. In this case the quiver takes a simple form with n-nodes each carrying a U (1) factor, and α ij arrows from the node i to the node j for i < j. In particular since the arrows always go from lower to higher node, there are no oriented loops. Now for quivers without oriented loops, Reineke [39] has computed the generating function of the Betti numbers of the space of semi-stable solutions to the D-flatness conditions. Physically they determine the number of supersymmetric quantum states carrying given angular momentum J 3 . The formula takes a simple form when all nodes carry U (1) factors and we shall state the formula for this special case. According to this formula Tr (−y) 2J 3 , which can be identified with the function g ref ({α i }, y), is given by where the sum runs over all ordered partitions of (α 1 +· · ·+α n ) into s vectors β (a) (1 ≤ a ≤ s, Using the fact that in the chamber c − arg(Z α ) > arg(Z β ) implies α, β > 0, we can express In (3.2) L is a constant given by in such a way that (3.2) is invariant under y → y −1 . Physically L represents the maximum 2J 3 eigenvalue that the system can carry.

Coulomb branch analysis
In this subsection we shall try to reproduce the results of §3.1 by directly quantizing a configuration of multi-centered black holes. We begin by reviewing some relevant properties of these solutions. Consider a supersymmetric solution describing n black holes, with different centers carrying charges α 1 , . . . , α n ∈Γ located at r 1 , . . . , r n . We shall define The equations governing the locations r i are [6] n j=1 j =i where Here Z α denotes the central charge for the charge α, computed with the asymptotic values of the moduli fields. The constants c i depend on the moduli through Z α , and satisfy i=1,...,n c i = 0. 9 First we shall show that in the chamber c + none of these solutions exist. For this note that at the wall of marginal stability P(γ 1 , γ 2 ) the central charges of γ 1 and γ 2 , and hence of all the vectors α i , become aligned. As a result, near this wall the real parts of e −iφ Z α i are all positive; we shall denote these by A i . On the other hand it follows from (3.1) that for i = 1 the left hand side of (3.18) is positive and for i = n it is negative. Thus we must have This gives a necessary condition for the multi-centered solution to exist, On the other hand the chamber c + has been defined such that the right hand side of (3.21) is negative (see (2.6)). This shows that a multi-centered solution of the type analyzed above cannot exist in the chamber c + . Note that this also proves that scaling solutions [7,49,9], whose existence does not depend on the moduli, cannot exist for charges α 1 , . . . , α n ∈Γ. 10 From now on we work in the chamber c − . For an n-centered configuration, the location of the centers is specified by 3n coordinates r i (1 ≤ i ≤ n). Removing the trivial center of mass degrees of freedom we are left with 3n − 3 coordinates. For multi-centered BPS solutions, the relative distances r ij ≡ | r i − r j | must satisfy (3.18) for i = 1, . . . , n. These equations are linearly dependent, since the sum over i is trivially satisfied. This gives (n − 1) independent constraints. The moduli space of multi-centered solutions is then a (2n − 2) dimensional space M n (c 1 , . . . , c n ). In the case of interest here, where all α i lie inΓ, M n is compact.
As shown in [40], for fixed values of c i , M n carries a symplectic form ω given by the restriction of the two-form 11 from R 3n−3 to the moduli space M n (c 1 , . . . , c n ). This symplectic form is invariant under SU (2) rotations. The moment map associated to an infinitesimal rotation δ r = ∧ r is just is the angular momentum. Thus the spectrum of supersymmetric bound states can in principle be obtained from geometric quantization of this phase space and the information on angular momentum, required for computing g ref , can be found by studying the J 3 eigenvalues of these bound states. We now review the results of [40] for the bound state spectrum of 3-centered black holes in the chamber c − . 12 In this case we have α i , α j Im (Z α iZ α j ) > 0 and hence the clockwise ordering of the α i 's will imply clockwise ordering of the Z α i 's. Furthermore we shall restrict the α i 's to satisfy α 12 > α 23 (3.24) so that the clockwise ordering of the α i 's and their various linear combinations are given by eq.(3.8). Thus the same is true for the corresponding Z's. We now explicitly write out the equations (3.18) as follows: Thus we can parametrize the c i 's as We can express the general solution to (3.25) as [40] for some constant real parameter λ. The range of λ is restricted by the positivity of each r ij and also the triangle inequality satisfied by the r ij 's. The positivity of the r ij 's together with (3.26) To study the consequences of the triangle inequality we express them as 12 Note that if the three charge vectors α i 's do not lie in a plane, then we can compute the bound state degeneracy using attractor flow trees [6], e.g. we could first approach a wall where the system splits into a pair of molecules, one with charge α 1 + α 2 and another with charge α 3 and so the index will be given by (−1) α13+α23+1 (α 13 + α 23 )Ω(α 1 + α 2 )Ω(α 3 ). Then we can approach another wall where the system with charge α 1 + α 2 breaks up into a pair of molecules of charges α 1 and α 2 with index (−1) α12+1 α 12 Ω(α 1 )Ω(α 2 ). But when the three α i 's are in the same plane spanned by γ 1 and γ 2 , they all move away from each other at a similar rate when we approach the wall of marginal stability P(γ 1 , γ 2 ) and we need to solve the 3-body bound state problem explicitly. Similarly if we have n centers with their charges lying in a plane then we need to explicitly solve the n-body bound state problem.
We need to find solutions to these inequalities in the range a ≤ λ ≤ a + b. We begin near λ = a + for some small . At this point r 23 is large and the last of eqs.(3.28) is violated. As we increase λ, at some value the last equality is saturated when It is easy to see that at this point the other two inequalities hold and hence above this bound the allowed range of λ begins. This continues till one of the other inequalities fail to hold. It is easy to see that second inequality continues to hold for λ ≤ a + b but the first inequality is violated beyond some value of λ close to a + b when The allowed range of angular momentum is given by the classical angular momentum carried by the system in the two extremes. At (3.29) the points ( r 2 , r 1 , r 3 ) lie along a line and hence the angular momentum is given by (α 13 +α 23 −α 12 )/2. On the other hand at (3.30) the points ( r 1 , r 2 , r 3 ) lie along a line and we have total angular momentum (α 13 + α 23 + α 12 )/2. Thus we have As was shown in [40] in quantum theory the upper limit J + is shifted to J + − 1 and states of all angular momentum between J − and J + − 1 occur exactly once. This gives [40] in agreement with (3.10).
We shall now generalize Eqs. (3.32) to an arbitrary number n of centers. For this we shall first simplify (3.18). Since we are interested in the situation where the α i 's lie in a two dimensional plane we have for some positive constant Λ. This constant can be removed by a rescaling of the variables r i , but we shall keep it in our subsequent equations. This allows us to express (3.18) as: Our strategy will be to relate Tr (−1) 2J 3 y 2J 3 to an integral over the classical phase space M n of solutions to eq. (3.34). Now, (−1) 2J 3 is a rapidly varying function on M n and does not have a smooth classical limit. Our experience with the quantum theory for n = 2 and n = 3 nevertheless suggests that it takes the same value over all the quantum states and is given by (−1) 2Jmax−n+1 , where J max = i<j α ij /2 is the maximum allowed classical angular momentum. On the other hand, for y close to 1, y 2J 3 is a slowly varying function over the classical phase space and one expects that for large |α ij |, its quantum expectation value is well approximated by integrating y 2J 3 over the classical phase space. Thus, we are led to consider This formula should well approximate the refined index g ref at large |α ij | and y close to 1, but could in principle be corrected in the full quantum theory. Our experience with the two and three centered cases, as well as an explicit evaluation of the 4-centered case presented below, suggests that at y = 1 the classical phase space integral (3.35) in fact agrees with the exact quantum index g({α i }). In addition, the same integral (3.35), after a minor amendment to be described shortly, appears to agree with the exact refined index g ref ({α i }) for all values of y. Now using the localization theorem of [50], we can express (3.35) as a sum over contributions from fixed points of the Hamiltonian vector field associated to the moment map J 3 , i.e. rotations along the z-axis. Fixed points are therefore multi-centered black hole configurations in which all centers are aligned along the z-axis, in an appropriate order consistent with (3.34). Furthermore, since all the relative distances between the centers are fixed by (3.34), the fixed points are isolated. Thus, fixed points of J 3 are labelled by permutations σ of 1, 2, . . . , n such that the centers are arranged in a given order along the z-axis, satisfying z σ(i) < z σ(j) if i < j. In this case the constraint (3.34) takes the form which is equivalent to the extremization of the "superpotential" At such a fixed point the third component of the classical angular momentum is given by The localization formula of [50] now gives where σ denotes sum over only those permutations for which a solution to (3.36) exists, and s(σ) is the sign of the Hessian of the matrix representing the action of 2ν J 3 on the tangent space of M n at the fixed point. To compute s(σ) we make a convenient choice of coordinates on M n . Without any loss of generality we can choose r 1 to be at the origin. At a fixed point of the action of J 3 , all the other points are then along the z-axis. We now note that to first order the relative distances between the centers remain unchanged if we displace each of the r i for i ≥ 2 in the (x − y) plane. Thus these (2n − 2) coordinates provide us with a convenient parametrization of the moduli space of the solution near this fixed point. Let us denote them by (x i , y i ) (2 ≤ i ≤ n). The action of J 3 on these coordinates is simply an independent rotation in the (x i , y i ) plane for each i. The Hessian of 2νJ 3 is given by (2ν) n−1 up to a sign s(σ). To determine the sign we note that in the coordinate system {x i , y i } introduced above, J 3 and ω take the form: where · · · denote higher order terms and (3.41) It is worth noting that the matrix M ij is also equal to the Hessian of the superpotential (3.37) with respect to the n − 1 variables z 2 , . . . z n , with z 1 being set to zero. The sign s(σ) of the Hessian associated with the fixed point is thus given by Although the prescription (3.42) appears to treat z 1 on a different footing than the other z i due to the gauge condition z 1 = 0, one could just as well have computed s(σ) using a symmetric gauge condition i=1...n z i = 0. Indeed, the same sign s(σ) can be obtained as (the opposite of) the sign of the determinant of the Hessian of the superpotential with respect to all z i , i = 1 . . . n and to the Lagrange multiplier λ. To see this, note that the Hessian ofŴ with respect to (λ, z 1 , z i=2...n ) is given bŷ where both A and W 1 are (n−1) dimensional row matrices, with A = (1/n, · · · 1/n) and W 1 = (∂ 2 W/∂z 1 ∂z 2 , · · · ∂ 2 W/∂z 1 ∂z n ). By adding the third to (n+1)'th rows to the second row and third to (n+1)-th columns to the second column and using the fact that n i=1 ∂ 2 W/∂z i ∂z j = 0 due to translation invariance, we can bring (3.44) to the form where 0 denotes an (n − 1)-dimensional row matrix with all entries 0. From this we see that detM = − det M . If there are more than one solution of (3.36) for a given permutation σ then the right hand side of (3.42) should be replaced by a sum of sign det M over all solutions. Numerical evidence indicates however that there is at most one fixed point for a given permutation. Moreover, it suggests that s(σ) can be expressed in terms of the permutation σ through This is easily proven for the special critical points of W with sign(z σ(i) − z σ(j) ) = sign(i − j) and sign(z σ(i) − z σ(j) ) = sign(j − i). This also suggests that if there are more than one fixed points for a given permutation their contributions should cancel pairwise leaving behind the contribution from 0 or 1 fixed point. We do not expect the classical formula (3.35) and hence (3.39) to reproduce the full y dependent quantum answer for Tr (−y) 2J 3 -after all the quantization of angular momentum is not visible classically. This is apparent from (3.39): while the terms inside the sum involve integral powers of y = e ν and hence are compatible with charge quantization, the overall factor (2ν) 1−n does not respect charge quantization. Comparison with the exact results (3.2), (3.32) suggests a remedy 13 : replace the factor of (2ν) 1−n by (2 sinh ν) 1−n = (y − y −1 ) 1−n . In the y → 1 limit this will approach the classical result in accordance with the earlier observation that in this limit the classical and quantum results agree. Thus our proposal for the full quantum version of (3.39) is This reduces the problem of computing the function g ref to identifying which of the permutations σ are consistent with (3.36). This is a tedious but straightforward procedure. Below we give the results for n = 3 and n = 4 for the same order of various linear combinations of the α i 's as given in (3.8) and (3.13). For n = 3 the detailed analysis of the configuration space was carried out in [40] some relevant details of which were reviewed earlier in this section. Two of the four collinear configurations are given in (3.29) and two others are given by (3.30). 14 This gives the following order of the centers along the z-axis and the value of s(σ), 14 For each of (3.29) and (3.30) we have two configurations related by z → −z symmetry.

Comparison of the results of Higgs branch and Coulomb branch analysis
To compare the results of the Coulomb branch analysis described in §3.2 with the Higgs branch computation described in §3.1, note that the power y i<j α σ(i)σ(j) in (3.47) matches the power of y in (3.2), provided the ordered decomposition β is chosen as follows: break the sequence {σ(i), i = 1, . . . , n} into increasing subsequences {σ(i a−1 + 1), . . . , σ(i a )}, 0 = i 0 < i 1 < · · · < i s = n, where s is the number of such increasing subsequences. The vectors β (a) are then is now given by (3.53) where in the second step we have used the fact that if k, l belong to different subsequences labeled by a and b then a > b will imply k > l. On the other hand if they belong to the same subsequence then, since the subsequence is increasing, the condition σ(l) < σ(k) will imply l < k. The right hand side of (3.53) gives precisely the power of y associated with the permutation σ as given in (3.47). The sign associated with the partition (3.52) in (3.2) is (−1) s−1 . If the increasing subsequences are maximal, ı.e. chosen so that it is not possible to build bigger increasing subsequences, then this sign is in agreement with the rule given in (3.46). It is easy to convince oneself that all possible partitions of the vectors (α 1 , . . . , α n ), whether or not they satisfy the condition (3.3), are in one to one correspondence with the set of all increasing subsequences of all the permutations of (12 . . . n) via the rule (3.52). So, the complete Higgs branch contribution can be generated by beginning with the maximal increasing subsequences associated with a given permutation and combining them with the contribution from other increasing subsequences associated with the same permutation. The following observations are now in order: 1. If a given partition is not allowed by the rule (3.3) then all its subpartitions are also disallowed. For example in the example of the previous paragraph, once we know that {α 1 + α 2 , α 4 , α 3 } is not allowed, we can immediately conclude that {α 2 , α 1 , α 4 , α 3 } is also not allowed.
2. If there are two or more maximal increasing subsequences of length two or more, then each of the maximal increasing subsequences can be independently broken up into smaller increasing subsequences. The compatibility of a partition of a particular maximal increasing sequence with the condition (3.3) or not is independent on the partitioning of the other maximal increasing subsequences. For example for the partition {α 1 + α 2 , α 3 + α 4 }, the compatibility of the splitting of α 3 + α 4 into {α 4 , α 3 } can be determined independently of whether α 1 + α 2 is kept as a single element, or has been split into {α 2 , α 1 }. For this reason we can associate, to each maximal increasing subsequence, a weight given by a sum of ±1 for each of the allowed splittings of that subsequence (+1 for splitting into odd number of subsequences, including the original maximal increasing subsequence, and −1 for splitting into even number of subsequences). The final weight is given by the product of the weights computed from each maximal increasing subsequence.
In the example above the weight factor associated with α 3 + α 4 is 1 since it cannot be split, while the weight factor associated with α 1 + α 2 vanishes since it allows a split {α 2 , α 1 } with opposite sign. As a result the net weight is 1 × 0 = 0.
3. The problem of determining the contribution from a given permutation now reduces to computing the weight factor associated with each maximal increasing subsequence of that permutation. This can be done as follows. We begin with a particular maximal increasing subsequence and first consider all possible partitions of this subsequence into two smaller increasing subsequences. For this we need to simply insert a comma at one place that indicates how we divide the original subsequence. Not all such subsequences may generate partitions allowed by (3.3); let us assume that there are k possible places where we are allowed to insert the comma. This gives k terms, each with weight −1. Now consider the possible partitions of the same maximal increasing subsequence into three increasing subsequences. It follows from the rule (3.3) that the allowed partitions are obtained by inserting a pair of commas into two of the same k possible positions. Thus there are k(k − 1)/2 possible terms, each with weight 1. This generalizes to partitioning into arbitrary number of increasing subsequences. Thus the net weight factor is 1 − k + k 2 − k 3 + · · · = (1 − 1) k . This shows that the weight factor vanishes for k ≥ 1, and is 1 for k = 0 ı.e. when it is not possible to subpartition an increasing subsequence satisfying (3.3).
This leads to the following simple rule for deciding when a given permutation contributes and the sign of the contribution: A given permutation contributes if its maximal increasing subsequences generate a partition satisfying (3.3) via (3.52), and none of the other (nonmaximal) increasing subsequences generate an allowed partition. The sign of the contribution is given by (3.46).
We should of course keep in mind that the algorithm described above is not an independent result derived from the Coulomb branch, it is required to ensure that the Coulomb and the Higgs branch results agree. It will be interesting to find an independent derivation of this from the Coulomb branch analysis by directly examining the condition for the existence of solutions to (3.34).
Before concluding this section we shall demonstrate how the algorithm given above can be used to give a derivation of the semi-primitive wall-crossing formula. We choose α n to be γ 1 and α 1 , · · · α n−1 to consist of m 1 copies of γ 2 , m 2 copies of 2γ 2 etc. in some fixed order (which can be decided by adding some arbitrary small vector to each of these charges which will be taken to zero at the end). Thus we have n = 1+ s m s and i<j α ij = −γ 12 s sm s . Since γ 1 + kγ 2 , γ 1 + s sm s γ 2 < 0 for k < s sm s , it follows from the (3.3) that γ 1 must be part of the last partition. Consider now a permutation of 1, · · · n. In order that γ 1 is part of the last partition, the first maximal increasing subsequence in this permutation must contain the element n as its last element. This subsequence cannot be partitioned into smaller increasing subsequences since then γ 1 will not be part of the last partition. Furthermore in order that the permutation gives a non-vanishing contribution the rest of the maximal increasing subsequences must each have length 1, since any maximal increasing subsequence of length 2 or more can be partitioned into smaller increasing subsequences without violating

Wall crossing from the Kontsevich-Soibelman formula
The first solution to the problem of determining g({α i }) was given by Kontsevich and Soibelman [10] and also independently by Joyce and Song [13,14]. In this section we shall review the results of [10] and compare them with our results. Subsection 4.1 states the KS wallcrossing formula, Subsection 4.2 explains charge conservation and the following subsections apply the KS formula to determine the jump of Ω(γ) in various cases. In subsections 4.7 and 4.8 we describe generalization of the KS formula to the motivic index.

The KS formula
To state the KS formula, we introduce the Lie algebra A spanned by abstract generators {e γ , γ ∈ Γ}, satisfying the commutation rule [e γ , e γ ] = κ( γ, γ ) e γ+γ , (4.1) where we defined At a given point in moduli space labeled by the parameters {t a }, we introduce the operator in the Lie group generated by A. The KS wall-crossing formula [10,16] states that the product ordered so that as we move from the left to the right the corresponding Z γ 's are ordered clockwise, ı.e. according to decreasing values of arg(Z γ ), stays constant across the hyperplane of marginal stability P(γ 1 , γ 2 ). As t a crosses this locus, Ω(γ; t a ) jumps and the order of the factors is reversed, but the operator A γ 1 ,γ 2 stays constant. Thus, the KS formula may be stated as the equality where M/N ↓ means that the terms in the product are arranged from left to right in the order of decreasing values of M/N while M/N ↑ implies opposite ordering of the factors, and U ± γ are defined as in (4.3) with Ω(γ; t a ) replaced by Ω ± . Noting that the operators U kγ for different k ≥ 1 commute, one may combine them into and rewrite (4.4) into a product over primitive vectors only, (4.7) Using the definition of Ω ± given in §2.2 the wall-crossing formula takes the form where V ± γ are defined as in (4.6) withΩ replaced byΩ ± . The invariantsΩ − (M γ 1 + N γ 2 ) on one side of the wall can be determined in terms of the invariantsΩ + (M γ 1 + N γ 2 ) on the other side by expressing both sides of (4.8) into single exponentials using the Baker-Cambell-Hausdorff (BCH) formula, and then comparing the coefficients of each e γ on either side. These equations can be solved iteratively to determinē Ω − (M γ 1 + N γ 2 ) in terms of theΩ + 's, starting with the lowest values of (M, N ). This is most conveniently done by projecting the relation (4.8) to the finite-dimensional algebra A M,N = A/{ m>M and/or n>N R · e mγ 1 +nγ 2 } , (4.9) and using the Baker-Campbell-Hausdorff (BCH) formula to commute the factors (see later). Since A M,N is a finite dimensional algebra generated by mγ 1 + nγ 2 for 0 ≤ m ≤ M and 0 ≤ n ≤ N , we have a finite number of equations relating Ω − (mγ 1 + nγ 2 ) to Ω + (mγ 1 + nγ 2 ). For example a trivial consequence of (4.8) is the relation Ω − (M γ 1 + N γ 2 ) = Ω + (M γ 1 + N γ 2 ) (4.10) whenever M = 0 or N = 0. This follows from the fact the algebras A M,0 and A 0,N are commutative.
In order to derive the semi-primitive wall-crossing formula and generalizations thereof, it is also practical to work with the infinite dimensional algebra A M,∞ , and consider the generating functions for fixed value of M . These two objects are related bȳ (4.12)

Charge conservation from KS formula
In this section we shall draw attention to one specific feature of the wall-crossing formula given in (4.8), namely 'charge conservation'. It follows from the algebra (4.1), and the definition of V γ given in (4.6) that after combining each side into a single exponential, the coefficient of e γ consists of a sum of products of the form iΩ (γ i ) with i γ i = γ, up to an overall numerical constant. Thus, any relation that follows from (4.8) has the property that the sum of the charges in the argument ofΩ's has the same value for all the terms on either side of (4.8). Thus when we solve this to findΩ − (γ) in terms ofΩ + (γ) and products of Ω + (γ i )'s, each term in the expression will have the property that the charges in the argument ofΩ + in the product will add up to γ. This is precisely the 'charge conservation' rule that followed from the use of Maxwell-Boltzmann statistics in §2.4. Note that the wall-crossing formula written in terms of Ω ± does not have any such manifest charge conservation. We shall see examples of this 'charge conservation' rule in the explicit examples to be described below.
When several walls are crossed consecutively, the black hole molecules and bound molecular clusters can be decomposed into smaller molecules and eventually just single atoms. This is the attractor flow conjecure [6]. Knowing the indices of the atoms, one can in principle determine the contribution to the index of the total molecule, or equivalently flow tree. These flow trees are naturally parametrized by nested lists, e.g. ((γ 1 , γ 2 ), γ 3 ), which need to satisfy the 'charge conservation' rule. The structure of the nested lists is identical to the commutation relations of the KS formula in terms ofΩ(γ), and allows to determine easily the contribution of a molecule to the index [28].

Primitive wall-crossing
In A 1,1 the BCH formula reduces to e X e Y = e X+Y + 1 2 [X,Y ] , (4.13) since all multiple commutators involving three or more generators vanish. The wall-crossing equation takes the form (4.14) From this we find the primitive wall-crossing relation where for simplicity we have denotedΩ ± (M γ 1 + N γ 2 ) byΩ ± (M, N ) and γ 1 , γ 2 by γ 12 .

Generic 3-body and 4-body contributions
We shall now extract the generic n-body contribution from the KS wall-crossing formula. To explain what is meant by 'generic', let n = 3, and α 1 , α 2 , α 3 be three distinct (not necessarily primitive) elements ofΓ such that their central charges Z α i , i = 1, 2, 3 are arranged in clockwise order in c − . Then α ij ≡ α i , α j > 0 for i < j. For definiteness we shall choose the α i 's such that α 12 > α 23 . In this case, in the convention described below (3.1), the different linear combinations of the α i 's will follow clockwise order as we move from left to right in the list (3.8). Furthermore, as we move from the left to the right in this list, the central charges will follow clockwise order in the chamber c − and anti-clockwise order in the chamber c + . We can now ask the following question: what is the coefficient ofΩ + (α 1 )Ω + (α 2 )Ω + (α 3 ) in the expression ofΩ − (α 1 + α 2 + α 3 ) −Ω + (α 1 + α 2 + α 3 ) in terms of sum of products ofΩ + 's ?
We refer to this coefficient as the generic 3-body contribution to wall-crossing. In order that the KS formula be consistent with the explicit computation of bound state degeneracies of black hole molecules, this coefficient must agree with the quantity g(α 1 , α 2 , α 3 ) computed in §3.
Happily, this agrees with the result (3.11) from the black hole bound state analysis. In a similar fashion, let us consider the generic 4-body contribution. We assume the same ordering of the different linear combinations of the α i 's as given in (3.13). Then one finds for the jump across the wall Finally note that this method can be easily generalized to the case when some of the α i 's are equal. For example if we are looking for a term i Ω + (α i ) m i in the expression forΩ − ( i m i α i ), then we must expand the left hand side of (4.8) so that in V α i we keep the Ω + (α i ) e α i m i /m i ! term, then carry out the rearrangement described above, and finally identify the coefficient of e i m i α i in the resulting expression. Alternatively we could simply use the generic n-body formula for non-identical particles, take the limit when several of the α i 's approach each other and then include the symmetry factor 1/ i m i ! in accordance with (2.16). It is easy to see how this rule arises from the KS formula, -given a factor of (e β ) m for any vector β we can replace it by e β (1) e β (2) · · · e β (m) for m distinct vectors β (1) , . . . , β (m) with slightly different phases, 15 carry out the abovementioned manipulations for rearranging the vectors and then take the limit when all the β (i) 's approach each other to recover the desired result. There is a priori an ambiguity in this procedure since in the final configuration the relative ordering between two vectors which only differ by the replacement of β (i) by β (j) for some pair (i, j) is arbitrary, but this does not affect the final result since changing this relative order picks up a commutator factor that vanishes as β (i) → β (j) . Thus the only effect of having identical particles will be the Boltzmann symmetry factor 1/m!.

Semi-primitive wall-crossing formulae and generalizations
A general wall-crossing formula involves computing Ω − (mγ 1 + nγ 2 ) in terms of Ω + (kγ 1 + γ 2 ) for k ≤ m, ≤ n. We define the order of the wall-crossing formula as the smaller of m and n. In this and the following subsections we give wall-crossing formulae for increasing order, starting with order one in this section and ending at order three. For simplicity we shall give the result for the case when m is fixed to be 1, 2 or 3, but the result can be easily generalized to the case when n is 1, 2 or 3 (see §4.6). In the D6-D0 example described in appendix B, order corresponds to the number of D6-branes or the rank of the sheaf.

Order one
To extract the semi-primitive wall-crossing formula from the KS formula, we project (4.7), (4.8) to the algebra A 1,∞ : Thus we have Noting that e γ 1 +N γ 2 all commute in A 1,∞ , this can be rewritten as It follows from (4.21) that To evaluate the right hand side of (4.23) we first observe that, for a single term in Y , Thus, 25) and from eq, (4.23), Using the relation between X − 1 andΩ − (γ 1 + N γ 2 ) given in (4.22) we now get where we defined In terms of the partition function Z ± (1, q) =Z ± (1, q) defined in (4.11), we obtain reproducing (2.22), (2.23).

Order two
We now extend the semi-primitive wall-crossing formula to order 2, i.e. compute Z − (2, q).
To this aim we project (4.7), (4.8) to the algebra A 2,∞ , We can combine all factors of V ± γ 1 +N γ 2 and V ± 2γ 1 +N γ 2 on either side into a single exponential, by using the level two truncation (4.13) of the BCH formula. Thus, we now have where X ± 1 , Y are the same as in (4.22), while Eq.(4.32) now implies that Using the analog of (4.27) with γ 1 → 2γ 1 and eq, (4.33) we get where Ω halo is defined in (4.28). Combining this with (4.27), (4.34), we arrive at This result generalizes eq. (4.10) in [43]. The partition functions (4.11) for M = 2 are most conveniently expressed in terms of "modified partition functions" where the star product is defined by The relation (4.36) then simplifies to a simple wall-crossing identity for the modified partition functions, where Z halo (2γ 1 , q) is given by the same formula as in (4.30) with γ 1 → 2γ 1 . Thus, the effective description is still in terms of a halo of non-interacting Boltzmannian particles around a core with effective degeneracy Ω ± 2 (N ).

γ 12 > 0 case
We shall now briefly discuss what happens when γ 12 > 0. We can of course use all the formulae derived in this section with γ 1 ↔ γ 2 , but then e.g. eq, (4.51) will give the wallcrossing formula in the charge sector N γ 1 + 3γ 2 . So if we want to find the wall-crossing formula for 3γ 1 + N γ 2 we cannot get the result by exchanging γ 1 and γ 2 in (4.51). Instead we keep γ 12 > 0 and carefully examine how the subsequent equations are affected. It is easy to see that the only place where the sign of γ 12 enters is in eq, (2.6); for γ 12 > 0 the < sign in (2.6) is replaced by a > sign. So if we continue to define Ω ± as in §2.2 then Ω + will denote the index in the chamber in which the multi-centered bound states of black hole molecules exist. We would however like to define Ω + as the index associated with single black hole molecules, and for this we exchange the definitions of Ω + and Ω − . Thus for example in eq, (4.51) we have to now exchange Ω + with Ω − so that we have an expression for Ω + in terms of Ω − . We can in principle solve these equations iteratively to find Ω − in terms of Ω + , but we shall now suggest a simpler method. For this note that exchanging Ω + and Ω − in the wall-crossing formula (4.8) is equivalent to changing the order of the products on both sides of (4.8). This in turn is equivalent to keeping the same order as in (4.8) but changing the sign of all the structure constants in the algebra (4.1). This can be achieved by changing γ 12 to −γ 12 . Thus if we replace γ 12 by −|γ 12 | in the formulae we have derived (e.g. (4.51)), we shall get the correct wall-crossing formula for both signs of γ 12 .

Refined wall-crossing and motivic invariants
We have already introduced the refined invariants in §2. 6. In this subsection we shall review the KS motivic wall-crossing formula that computes the jump in the refined index across walls of marginal stability and compare it with our wall-crossing formula based on the analysis of supergravity bound states. In order to describe the motivic generalization of the wall-crossing formula [10], we consider a set of generators {ê γ , γ ∈ Γ} satisfying the quantum torus relationŝ e γêγ = (−y) γ,γ ê γ+γ . (4.55) The associated Lie algebra is Let us also introduce the quantum dilogarithm, This satisfies the pentagon identity where x 1 , x 2 are two non-commutative variables satisfying x 1 x 2 /y = yx 2 x 1 ≡ −x 12 , and reduces to the ordinary dilogarithm for log y ≡ ν → 0, We attach to the charge vector γ the generator 16 The motivic version of the KS wall-crossing formula [10,33,34] again states that the product ordered so that as we move from left to right the corresponding Z γ 's are ordered clockwise, stays constant across the hyperplane of marginal stability P(γ 1 , γ 2 ). As in the classical case, it is advantageous to combine the generatorsÛ kγ for k ≥ 1 in a single factorV γ . For this purpose, rewrite the operatorÛ γ , using the identity for the quantum dilogarithm Then the product ofÛ γ over all ≥ 1, γ being a primitive vector, can be written in terms ofΩ ref (γ, y) defined in (2.38): satisfy the commutation relations (4.1). Moreover in this limit Ω ref (γ, y) approaches Ω(γ). ThusV ± defined in (4.64) reduce to V ± and we recover (4.8). 16 In supersymmetric gauge theories, for a vector multiplet with unit degeneracy,Û γ reduces toÛ γ = E (yê γ ) E y −1ê γ while for a hypermultiplet one hasÛ γ = E (e γ ) −2 .
(4.76) This is in perfect agreement with (3.10) computed from the spectrum of bound states of a 3-centered configuration in supergravity. Similarly the 4-body contribution can be computed by replacing κ(α) by κ(α, y) in (4.18). The result is in perfect agreement with (3.14) and (3.51). We have also carried out a similar computation for 5-body contribution and compared with the results obtained by following the procedure of §3, but we shall not give the details.

KS vs. supergravity
Eventually one would like to prove that the KS wall crossing formula given in (4.65) is equivalent to the one obtained from quantization of multi-black hole solutions as given in (1.5), (1.6). We have not yet reached this goal, but would like to point out some common aspects of these two formulae. The summand in (1.6) depends analytically on the α ij 's, but the analyticity of the sum is broken by the third condition described below (1.6). In particular this constraint measures whether a β (a) , represented as a vector in the two dimensional plane in the convention described below (3.1), lies to the left or the right of the vector α 1 +· · ·+α n . Let us denote by B the set of all vectors of the form i m i α i with m i = 0 or 1, and arrange them in an order following the convention described below (3.1). Let B denote the subset of elements of B which lie to the left of the central element α 1 + · · · + α n . In this case the expression for g ref given in (1.6) depends on the subset B . As we vary the α i 's this subset may change and in that case g ref will be given by a different analytic function of the α ij 's. Note however that g ref does not depend on the relative ordering of the vectors inside the subset B . Now this lack of analyticity is also manifest in the KS wall-crossing formula. To see this, recall the procedure for manipulating the KS formula given in §4.4. Here we are supposed to begin with the product e αn · · · e α 1 and bring it to the order in which the vectors appear in the set B. Changing this order leads to a different final order of the e β 's and hence we expect g ref (α 1 , . . . , α n , y), given by the coefficient of e α 1 +···+αn in the final state, to change. This in turn prevents g ref to be given by an analytic formula involving the α ij 's for all choices of α i . Now, the KS prescription for computing g ref a priori seems to depend on more information than (1.6) since the KS formula requires the detailed ordering of the vectors in B, rather than just the unordered list of the ones which lie to the left of α 1 + · · · + α n . We shall now show that the KS formula in fact only depends on the unordered list of vectors which lie to the left of α 1 + · · · + α n . For this let us consider a given order of all the α i 's and supppose that we have brought e αn · · · e α 1 to the required order. Now consider the effect of switching the relative order between two neighbouring vectors β 1 and β 2 on the left of α 1 + · · · + α n . This will require to switch the corresponding e β 1 and e β 2 and will produce an extra factor of e β 1 +β 2 . But since β 1 and β 2 both lie to the left of α 1 + · · · + α n , β 1 + β 2 will also lie to the left of α 1 + · · · + α n . Thus such switchings can never produce a factor of e α 1 +···+αn . The same argument holds if we switch two vectors on the right of α 1 + · · · + α n . Thus a term proportional to e α 1 +···+αn can arise only if we switch a vector from the left of α 1 + . . . α n with a vector to the right of α 1 + · · · + α n . This shows that the non-analyticity of (1.6) and the KS formula are controlled by the same data.

Wall-crossing from the Joyce-Song formula
In their work on Donaldson-Thomas invariants for coherent sheaves on a Calabi-Yau threefold X [14] (which presumably count D6-D4-D2-D0 bound states in type IIA string theory compactified on X ), Joyce and Song give a fully explicit expression for the rational DT invariantsΩ − on one side of the wall, in terms of the rational DT invariantsΩ + on the other side. Thus, the JS formula can be viewed as the solution to the implicit relation given by KS. In particular, it directly provides the functions g({α i }) appearing in (2.16), i.e. the solution to the black hole bound state problem. It should be noted however that the JS wall-crossing formula involves sums over many terms with large denominators and large cancellations, and is less computationally efficient that the KS formula (compare for instance table (5.16) with the analogous computation for KS given in eq. (4.18)). In addition, the simple rule for dealing with identical particles mentioned at the end of §4.4 is not at all obvious from the JS formula.
One way of understanding the large redundancy is that JS work with Abelian categories, where constituents are either a subobject or a quotient object of the complete object. In physical terms this means that different terms in the JS wall-crossing formula keep track of the order in which the constituents (molecules) make the complete object (bound molecular cluster). But in physics (and in the derived category on which KS analysis is based) such a distinction is not present. For example the existence and index of a bound state of two primitive constituents carrying charges γ 1 and γ 2 is independent of the order in which we choose γ 1 and γ 2 . For this reason, the JS formula contains many terms which must combine at the end to ensure the independence of the final answer of the order in which the constituents are chosen. The KS formula is less redundant, at the cost of being implicit and perhaps less rigorously established.
After stating the JS formula in §5.1 and its implication for the black hole bound state problem in §5.2, we verify the equivalence of the JS and KS formulae for generic three and four body contribution, and semi-primitive wall-crossing in §5.3 and §5.4.

Statement of the JS formula
In [13,14], the authors define rational-valued generalized Donaldson-Thomas invariants D T γ (τ ) for any class γ ∈ C(X ), where X is a Calabi-Yau three-fold, C(X ) is a positive cone 17 inside K(X ) and τ is a stability condition. They furthermore establish a general wall-crossing formula for the variation ofDT γ (τ ) under a change of stability condition.
Finally, departing slightly from the presentation in [13], let us define the L factor L(α 1 , . . . , α n ) ≡ connected oriented trees: vertices {1,...,n}, edge i→j, implies i<j edges i→j α i , α j , (5.4) where the sum runs over all connected trees g with n vertices labelled from i = 1 to i = n. We denote by g (0) = {1, . . . , n} the set of vertices, and by g (1) the set of oriented edges (i, j), with the orientation inherited from the standard order i < j on g (0) . In other words given any labelled tree, and an edge of this tree connecting i to j, we associate to this edge an orientation from i → j if i < j. In order to implement this formula on a computer, it is useful to note that there are n (n−2) labeled trees with n vertices, which are in one-to-one correspondence with their Prüfer code, an element in {1, . . . , n} n−2 . 18 Having defined the S, U and L factors, we can now state the JS wall-crossing formula (eq. (5.13) in [13]): where the second sum runs over all ordered decompositions γ = α 1 + · · · + α n with α i ∈ C(X ). Note that due to this constraint, eq, (5.5) is automatically consistent with the charge conservation property.

Index of supersymmetric bound states from the JS formula
It is useful to rewrite the JS formula (5.5) as a sum over unordered decompositions {α i } of the charge vector γ,

Generic 2-body, 3-body and 4-body contributions
Let us first derive the primitive wall-crossing formula γ → γ 1 + γ 2 from the JS wall crossing formula. In this case there is only one tree -connecting the nodes 1 and 2 with the arrow directed from 1 to 2. If we choose the first node to be γ 1 and the second node to be γ 2 then since γ 12 < 0 possibility (a) in (5.7) is realized, and we have U (γ 1 , γ 2 ) = S(γ 1 , γ 2 ) = −1. Since n = 2, (5.13) now gives a contribution of 1 2 (−1) 1+γ 12 γ 12 (−1). An identical contribution comes from the term where we put γ 2 in the first node and γ 1 in the second node since now we have U = S = 1 and the α σ(i) , α σ(j) factor in (5.13) is now equal to γ 21 . Adding the two contributions we recover the primitive wall-crossing formula (4.15). We summarize the S, U and L factors for the two permutations in the table below. σ(12) S U L 12 a −1 γ 12 21 b 1 −γ 12 (5.14) Next we reproduce the result of Sec. 4.4 for the generic three body contribution to the wall-crossing from centers carrying charges (α 1 , α 2 , α 3 ). The order of the α i 's is given by (3.8). With the definition of the ordering explained below (3.1) we see that if (α, β) follow a clockwise order then α, β > 0. Since the phases are assumed to be generic, the U and S factors coincide, ı.e. U (α i , α j , α k ; t,t) = S(α i , α j , α k ; t,t), for any permutation {i, j, k} of {1, 2, 3}. In this case, there are three trees contributing. The S, U, L-factors are summarized in the table below. Substitution of these data into eq. (5.5) reproduces directly Eqs.

Semi-primitive wall-crossing formula from JS
Let us now derive the semi-primitive wall-crossing formula from (5.5), i.e. computeΩ(γ; c − ) in terms ofΩ(γ; c + ) for γ = (1, N ) ∈Γ. We mostly follow the discussion in [41], Section 3, suitably generalized. At given order n, the most general ordered decomposition γ = i=1,...,n α i is The U -factor therefore reduces to Now, let j * be the packet in which the vector (1, N i * ) lies. In view of (5.18), the factor S(β 1 , β 2 , . . . , β m ; c + , c − ) vanishes unless j * = 1 (which happens if i * = 1) or j * = 2 (which happens whenever i * > 1 and we group all the vectors (0, N 1 ), . . . , (0, N i * −1 ) in a single packet). In either case, the contraction of the head set is trivial, and we are left with where the sum runs over ordered partitions of the n − i * elements in the tail set, i.e. integer sequences {p r , 1 ≤ r ≤ len(p)}, p r ≥ 1 such that r p r = n − i . This evaluates, for all i * ≥ 1, to the binomial coefficient a result which is in particular independent of the partition {N i }. Now, we turn to the sum over graphs g. Due to the Landau factors α i , α j in (5.5), the only contributing graph is a tree rooted at i * , with leaves 1, . . . , i * − 1, i * + 1, . . . , n. The Landau factor is then given by Taking into account the additional factor 1/2 n−1 , we thus arrive at

(5.23)
Plugging this expression in the partition function (4.11), we can easily carry out the sum over N i and obtainZ where Z halo (γ 1 , q) is the same function introduced in (4.30). The sum over i * leads tō [log Z halo (γ 1 , q)] n−1 (n − 1)! (5.25) and the sum over n finally leads tō Finally we note that the derivation given above can be simplified using the Boltzmann gas picture in which we analyze identical particle contribution to wall-crossing as a limit of non-identical particle contribution and then include an extra symmetry factor 1/N ! for N identical particles. To see how this works, we consider the case where we have (N + 1) different α i 's satisfying α ij > 0 for i < j, with the understanding that we shall eventually take the limit in which the first N α i 's approach γ 2 or its multiple and α N +1 approaches γ 1 . Now the S and the U factors coincide as in §5.3. Furthermore since eventually we shall take the limit in which the first N α i 's coincide, the requirement of a non-vanishing L tells us that only trees which contribute are those in which α N +1 is connected to all the other α i 's.
We can still choose the direction of the arrows arbitrarily. Let us consider a configuration in which m of the arrows are directed towards α N +1 and n = N − m are directed away from it. In this case the arrows go from the nodes 1 to m towards the central node (m + 1) and from the central node to the nodes (m + 2) to (N + 1). The Landau factor associated with these nodes is (−1) m N i=1 α N +1 , α i . Next we need to assign the α i 's to the different nodes. First of all there are N m ways of deciding which of the α i 's will be assigned to the first m nodes. Once this is done there is no further freedom of rearranging the α i 's among the first m nodes or the last (N − m) nodes; in order that U = S does not vanish, the α i 's must be arranged in a clockwise order among the first m nodes and anti-clockwise order among the last (N − m) nodes. In this arrangement the possibility (a) is realized (N − m) times and the possibility (b) is realized m times. Hence the corresponding U is given by (−1) N −m . Substituting these into eq, (5.13) we now get If we now take the set (α 1 , . . . , α N ) to contain m l copies of lγ 2 with lm l = N then, including the symmetry factor l 1/m l !, we get the coefficient of theΩ + (γ 1 ) lΩ

A. Wall crossing formulae in special cases
In this appendix we give explicit wall-crossing formulae in some special cases. These cases illustrate the general results of §4 and §5, and serve as tests of the equivalence of the JS and KS wall-crossing formulae . For brevity we state the results for the classical rational invariants Ω, but the same formulae also hold for the motivic rational invariants with the replacement (4.69). For notational convenience we shall denoteΩ ± (M γ 1 +N γ 2 ) byΩ ± (M, N ). The result for (M, N ) = (2, 2) below is in agreement with [28], Eq (2.13).

B. D6-D0 bound states
In this subsection, we test and apply the wall-crossing formula on generalized DT-invariants for dimension zero sheaves on a Calabi-Yau threefold X , for which many results are already known in the literature [10,42,41,51].
The stability conditions for coherent sheaves on X depend on the complexified Kähler moduli t a = B a + iJ a . The holomorphic central charge Z γ is given, in the large J limit, by Z γ = − X e −t Td(X ) ∧ γ. Let us denote by Ω(r, n; t) the generalized DT-invariant for a sheaf of rank r, vanishing first and second Chern class, and third Chern class n. Physically, Ω(r, n) counts the number of bound states of r D6-branes and n D0-branes, with charge vector γ = rγ 1 + nγ 2 , γ 12 = −1.
It is known that for infinite volume and small B-field, a configuration of r ≥ 1 D6-branes and n ≥ 1 D0 branes do not form any bound state [52]. Moreover, there are no bound states of r > 1 D6-branes, while n ≥ 1 D0 bind into precisely |χ| bosonic (fermionic) bound states for negative (positive) χ, where χ is the Euler number of X . Thus the only non-vanishing DT invariants in this chamber are [10,13] Ω + (1, 0) = 1 , where we have used the notation Ω ± (m, n) = Ω ± (mγ 1 + nγ 2 ). Similarly, the motivic invariants are given by where P (y) = 1 + b 2 y 2 − b 3 y 3 + b 2 y 4 + y 6 is the Poincaré polynomial of X , such that (B.2) reduces to (B.1) in the classical limit y → 1. By increasing the magnitude of the B-field, one reaches the wall of marginal stability P(γ 1 , γ 2 ). We refer to the chamber across this wall as the 'DT' chamber. We shall obtain the motivic DT invariants in this chamber for r ≤ 3 by applying the formulae derived in Section 4, suitably generalized to the motivic case according to the discussion in Section 4.7.
To apply the semi-primitive wall-crossing formulae and its higher order generalizations, it is useful to introduce partition functions 3) for fixed value of M . These two objects are related bȳ Moreover, the partition function of the halo degeneracies follows from (4.73), where we have made a change of variable j → k + 1 − j in the last two terms to make the y → y −1 symmetry manifest. Applying (4.71), we immediately obtain the partition function of the motivic invariants with r = 1, In the classical limit y → 1, this reduces to [53,54,55,56]. For comparison with the higher rank formulae of [42,41] below, it is useful to note that the expansion of this formula in powers of χ reads For r = 2, we have (B.11) In the classical limit, this reduces to (B.12) This agrees with [42],Thm 1.2 and [41],(2.9), who obtain where it is understood that the third term is zero if n is odd.