{'fraction_non_alphanumeric': 0.03830071022796419, 'fraction_numerical': 0.015835308893183467, 'mean_word_length': 4.084096421323566, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 37, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Crystal Melting and Wall Crossing Phenomena

This paper summarizes recent developments in the theory of Bogomol'nyi-Prasad-Sommerfield (BPS) state counting and the wall crossing phenomena, emphasizing in particular the role of the statistical mechanical model of crystal melting. This paper is divided into two parts, which are closely related to each other. In the first part, we discuss the statistical mechanical model of crystal melting counting BPS states. Each of the BPS state contributing to the BPS index is in one-to-one correspondence with a configuration of a molten crystal, and the statistical partition function of the melting crystal gives the BPS partition function. We also show that smooth geometry of the Calabi-Yau manifold emerges in the thermodynamic limit of the crystal. This suggests a remarkable interpretation that an atom in the crystal is a discretization of the classical geometry, giving an important clue as to the geometry at the Planck scale.In the second part we discuss the wall crossing phenomena. Wall crossing phenomena states that the BPS index depends on the value of the moduli of the Calabi-Yau manifold, and jumps along real codimension one subspaces in the moduli space. We show that by using type IIA/M-theory duality, we can provide a simple and an intuitive derivation of the wall crossing phenomena, furthermore clarifying the connection with the topological string theory. This derivation is consistent with another derivation from the wall crossing formula, motivated by multi-centered BPS extremal black holes. We also explain the representation of the wall crossing phenomena in terms of crystal melting, and the generalization of the counting problem and the wall crossing to the open BPS invariants.


Introduction and Overview
One of the most fundamental problems in theoretical physics in the 21st century is to construct a theory of quantum gravity. General relativity and quantum mechanics, which are the cornerstones of the 20th century physics, are mutually inconsistent. For example, general relativity is not renormalizable, and conventional perturbative techniques in quantum field theory does not apply. Not only are these two theories inconsistent, but there are indications that theoretical consistency requires unification of these two theories. In general relativity, there is a celebrated singularity theorem 1 , which predicts the existence of singularities where general relativity breaks down. In this sense general relativity is not a consistent theory in itself, and singularity occurs precisely when quantum effects are expected to play problem. The strategy we take is to simplify the problem -to replace the problem of gravity with a problem of gauge theory. In string theory compactifications, this corresponds to taking the Calabi-Yau manifold to be non-compact. Of course, the notion of a black hole is subtle in this limit since the gravity decouples and the Newton constant becomes zero. However, part of the important data in gravity theory still remain. For example, we can still discuss entropy of black holes since we can take a scaling limit where the mass of the black hole goes to infinity, while the entropy is kept finite. Moreover, it is generally believed that microstate degeneracies of black holes are captured by the BPS index, which is deformation invariant and stays constant in the decoupling process. The counting of black hole microstates is now turned into a counting problem of BPS states in supersymmetric gauge theories.
The counting problem of BPS states in string theories and in supersymmetric gauge theories is an important problem in itself, even if we forget about the motivation from black hole physics. For example, they provide primary tools to test various dualities in supersymmetric gauge theories and in string theory (e.g. non-perturbative checks 25 of Montonen-Olive duality 26 for N = 4 supersymmetric Yang-Mills theory). BPS solitons in supersymmetric gauge theories have a rich structure, and provides a classic example of fruitful collaboration between physics and mathematics, as exemplified in the ADHM 27,28 and Nahm 29 construction. Furthermore, as we will see in later sections BPS state counting has an intimate connection with another counting problem in string theory, the topological string theory (mathematically Gromov-Witten theory).
In the first part of this paper, we show that when X is a toric Calabi-Yau manifold (this roughly means that X has an action of the three-dimensional complex torus; see Refs. 30, 31 for review), we can give explicit answers to the BPS counting problem. More precisely, each of the BPS states contributing to the BPS index (defined in Section 2.1) is in one-to-one correspondence with a configuration of a molten crystal, and the BPS partition function Z BPS (defined in Section 2.1) is the same as the statistical partition function of a crystal melting model 32 : (1.1) Section 3 is devoted to the explanation of this result. Remarkably, the derivation of the formula above depends on the newly developed mathematical theory, the noncommutative Donaldson-Thomas theory 33,34 . This theory gives a new invariant for Calabi-Yau manifolds, which exactly coincides with the BPS index we are interested in. This means that BPS counting problem is important not only to physicists but also to the mathematicians alike.
In the next section (Section 4), we discuss the implication of these results to quantum gravity. We show that the thermodynamic limit of the crystal gives a projection of the shape of the mirror Calabi-Yau manifold 35 . This in particular suggests that if we start from a classical smooth geometry and goes to smaller and smaller scales, the geometry gets discretized into a set of atoms when we finally arrive at the Planck scale. In this sense an atom in the crystal melting model is "an atom/quark of internal geometry", a discretized version of the geometry at the Planck scale. We therefore see that the two problems posed earlier are now related. Each of the microstate, which is an atom of the crystal, is the discretized version of the geometry; thus the problem of identifying black hole microstates is solved by the quantum structure of geometry! In the second half of the paper, we move on to the discussion of the wall crossing phenomena (see Section 2.2 for an introduction). Wall crossing phenomena states that the BPS degeneracy jumps as we change the value of the moduli of the Calabi-Yau manifold. Wall crossing phenomena, first discussed in Ref. 36 in the context of supersymmetric N = (2, 2) theories in two dimensions, have a long history of nearly two decades. They also play important roles in the Seiberg-Witten theory 37,38,39,40 and its stringy realization 41,42 (see also Refs. 43, 44 as well as Ref. 45).
In these old days, it was possible to derive the jump of BPS states in simple cases, but generalization seemed to be difficult.
The recent breakthrough was partly triggered by the paper of Kontsevich and Soibelman 46 , who proposed a rather general formula for the jumps of BPS degeneracies (or mathematically "generalized Donaldson-Thomas invariants"), generalizing the "semi-primitive" wall crossing formula previously proposed by Denef and Moore 47 . Physical interpretations of the formulas were subsequently given in Refs. 48,49,50,51,52. We discuss these formulas in Section 6 and in Appendix A. 3.
The wall crossing formulas are rather general, and can be applied to our setup, namely compactification on the toric Calabi-Yau manifold. In particular, the example of the resolved conifold is analyzed in Ref. 53 and independently in Ref. 54. There it was shown that the non-commutative Donaldson-Thomas invariants (which are just generalized Donaldson-Thomas invariants in a certain chamber) discussed in Section 3 is related by wall crossing to the commutative (i.e. ordinary) Donaldson-Thomas invariants. In physics language, this means that the crystal melting partition function is related by wall crossings to the topological string partition function. This clarifies the connection of our crystal melting model and another crystal melting model proposed in Ref. 55, which describes the topological vertex 56 . This is not the end of the story, however. First, it was observed in the literature that the BPS partition function computed by the non-commutative Donaldson-Thomas theory takes a beautiful infinite product form, and there should be an intuitive explanation of this result. From the viewpoint of non-commutative Donaldson-Thomas theory, this seems miraculous: we first compute the BPS indices separately by intricate mathematics, and only after summing up all of them and going through combinatorics can we see that the partition function takes such a simple form. Second, the partition function obtained in Section 3 is very similar to the topological string partition function, and it is necessary to understand the precise relation and to explain why the topological string partition function enters into the story.
In Section 5 we give a simple, yet another derivation of the wall crossing phe-nomena from the viewpoint of M-theory 57 . This answers the questions raised in the previous paragraph. By lifting type IIA brane configurations to M-theory and by using the 4d/5d correspondence 58,59 , the problem of counting BPS states is mapped (under certain conditions explained in Section 5) to a counting problem of free M2-brane particles in five dimensions, which span the free particle Fock space. This naturally explains the infinite product form of the BPS partition function. Also, the counting problem of M2-brane particles is a generalization of the Gopakumar-Vafa (GV) argument 60,61 , which explains the appearance of the topological string partition function. More precisely, we prove a formula which schematically takes a form This derivation is consistent with another derivation from the wall crossing formula. As a bonus, we have new mathematical predictions for non-toric examples, which can be tested by future mathematical developments.
There is a generalization of the above-mentioned story to the case of open BPS invariants. Closed BPS invariants discussed up to this point are defined by counting D2-branes wrapping 2-cycles of the Calabi-Yau manifold. Open BPS invariants are defined by counting D2-branes wrapping on disks ending on another D-branes (D4-branes). Open BPS invariants are natural generalizations of closed invariants. Moreover, they give a useful computational tool to study closed invariants for complicated geometries, as shown in the topological vertex formalism 56 . In Section 7 we first give a definition of the "non-commutative topological vertex", which gives a basic building block for computing open BPS invariants. The definition uses the crystal melting model, and we perform several consistency checks of the proposal. We also discuss the wall crossing phenomena for the open BPS invariants both with respect to the open and closed string moduli, by again using the viewpoint of M-theory.
In the final section (Section 8), we close this paper by pointing out several interesting problems which suggest directions for future research. We also collect slightly technical results in the appendices. This paper is essentially the author's Ph.D thesis (submitted to University of Tokyo on November 2009), which in turn is mostly based on his papers Refs. 32,35,57,62,63. We tried our best to make the presentation consistent and to present a unified perspective on the problem. However, BPS state counting and wall crossing phenomena are very active areas of research with long history, and is still growing very rapidly as of this writing. This inevitably means that there are many important omissions. For example, in this review there is almost no discussion of the wall crossing phenomena from 4d N = 2 gauge theory viewpoint (see e.g. Refs 48,49,51 in this direction). and our discussion is mostly on the 6d Calabi-Yau side. Moreover, in order to keep this paper to a reasonable length we could not include enough introductory material in this review. The complete introduction will require another review, but the good starting point is the lecture note Ref. 64.
The interdependence of the sections are shown in Fig. 1. For the convenience of the reader, each section begins with a short summary of the section. The connections between different sections are emphasized throughout this review in order to organize the whole material into a unified framework. However, some sections are mostly independent, and do not require prior reading of earlier sections. For examples, most of section 5 does not require the prior reading of part I.

Basic Notions
Before venturing into the study of crystal melting and wall crossing phenomena beginning Section 3, we here give a brief summary of the BPS states, BPS indices and their wall crossing phenomena. The material in this section is standard, and can safely be skipped by readers familiar with these topics.

BPS States and BPS Index
In theories with extended (N > 1) supersymmetry in four dimensions, the supersymmetry algebra has a central extension Z MN (M, N = 1, . . . , N ), which appears in the commutation relation of two supercharges Q M α (in the two-component notation): From the above equation it follows that Z MN is an antisymmetric matrix. In the case of N = 2 supersymmetry treated in this paper, Z MN has just one component (a complex number) Z ≡ Z 12 . We can then show, purely from symmetry arguments, that the mass M of a particle always satisfies the BPS inequality a M ≥ |Z| .

(2.2)
States which saturates this inequality are called BPS states. BPS states have played special roles in the study of supersymmetric gauge theories and string theories. This is because BPS states are protected from quantum corrections. In other words, quantum corrections may renormalize the value of Z, but the BPS inequality holds for all values of the coupling constant. This is basically due to the fact that BPS states are annihilated by certain combination of supercharges and thus their representation have smaller dimensions (i.e. they belong to short representations) as compared with non-BPS states (which belong to long representations). Therefore BPS states provide an indispensable tool to study the strong coupling behavior of supersymmetric gauge theories. They are also important for understanding black hole microstates, and also are related to mathematical invariants, as discussed in the introduction.
Let us try to be more specific. In this paper, we are going to study the counting problem of BPS states arising from type IIA string theory compactified on a Calabi-Yau manifold X. Depending on whether X is compact or non-compact, we have a 4d N = 2 supergravity or 4d N = 2 supersymmetric gauge theory.
We want to study BPS states which preserve half of the N = 2 supersymmetry in the theory. These states span the BPS Hilbert space b H BPS , and we want to study the structure of this Hilbert space.
The BPS states have charges γ, which takes value in the (Z-valued) cohomology of X γ ∈ Γ = H 6 (X; Z) ⊕ H 4 (X; Z) ⊕ H 2 (X; Z) ⊕ H 0 (X; Z), (2.3) and this means that the BPS Hilbert states can be decomposed into sectors with a This inequality was originally discovered by Bogomol'nyi, Prasad and Sommerfield 65,66 in the context of topological solitons, and was later shown to arise from the supersymmetry algebra 67 . b This space is equipped with a product structure 68 . specific charge γ: c We define the BPS index Ω(γ) as an important quantity to understand the structure of H BPS . This index is defined in such a way that the index does not jump when two short multiplets combine into a long multiplet. In four-dimensional N = 2 supersymmetry the answer is unique, and is given by d where J 3 is the 3rd component of the SO(3) spatial rotation symmetry. Also, the factor − 1 2 is just a convention, which will turn out to be useful later. We can calculate the index explicitly for an N = 2 SUSY multiplet. For our purposes we only need a massive multiplet, and a massive multiplet of N = 2 theory is either (1) a massive long representation, where S 0 is a hypermultiplet and S 1/2 is a vectormultiplet. Their contributions to the BPS index are Ω(S j ) = (−1) 2j (2j + 1), Ω(L j ) = 0. (2.9) This explicitly verifies that the long multiplets do not contribute, and that hypermultiplets and vectormultiplets contribute 1 and −2 to the index. Every BPS particle in an N = 2 theory has a universal half-hypermultiplet obtained from quantizing the fermionic degrees of freedom associated to its center The final result is simply that we have the Witten index Tr(−1) F , the number of boson minus the number of fermions, where bosons/fermions refer to the spin j in (2.7). This quantity is important since in many examples it is this index which gives the correct microstate degeneracies of black holes e .
Let us define the generating function of the BPS index. As we will see later in examples, it is often more useful to study the generating function rather than to study each of the BPS index separately. Decompose the charge lattice Γ into electric and magnetic charges lattices: In type IIA compactification of a Calabi-Yau manifold, we have Γ e = H 6 (X; Z) ⊕ H 4 (X; Z), Γ m = H 2 (X; Z) ⊕ H 0 (X; Z), (2.11) and when we write γ = (q 0 , q I , p I , p 0 ) ∈ H 6 (X; Z) ⊕ H 4 (X; Z) ⊕ H 2 (X; Z) ⊕ H 0 (X; Z), (2.12) the electric charges are q Λ = (q 0 , q I ) and the magnetic ones p Λ = (p I , p 0 ). Here I and Λ run over I = 1, . . . , dim H 4 (X; Z) f and Λ = 0, . . . , dim H 4 (X; Z), respectively. We define the generating function Z BPS by a Z BPS (φ Λ , p Λ ) = qΛ Ω γ = (q Λ , p Λ ) e −φ Λ qΛ . (2.13) This means that we are considering microcanonical ensemble of magnetic charges p Λ and a canonical ensemble for electric charges q Λ with chemical potentials φ Λ . Such a mixed microcanonical/canonical ensemble appears in the Ooguri-Strominger-Vafa conjecture 19 . In particular, it was shown there that F (φ Λ , p Λ ) := log Z BPS (φ Λ , p Λ ) (2.14) is the Legendre transform of the entropy S BH (q Λ , p Λ ) of the black hole

Wall Crossing Phenomena
In the previous section we defined the BPS index Ω(γ) and its generating function Z BPS (φ Λ , p Λ ). From the viewpoint of counting BPS states all we need to do is to determine these numbers. However, there is an interesting twist, the wall crossing phenomena. The wall crossing phenomena states that the BPS index Ω(γ) depends on the value of moduli of the Calabi-Yau manifold at infinity g . More concretely, consider the Kähler moduli of the Calabi-Yau manifold. Then wall crossing phenomena states that the BPS index jumps along the real codimension 1 subspace of the Kähler moduli space. The codimension 1 subspace is often called the walls of marginal stability (or sometimes simply walls), and the walls of marginal stability divides the Kähler moduli space into several regions, called chambers. The BPS index is piecewise constant inside each of the chambers, but jumps as we cross the walls of marginal stability. We sometimes use the notation Ω(γ; t) to explicitly show the dependence on Kähler moduli. What is the physics behind such a jump? Naively, the jump seems to be inconsistent with the common wisdom that index stays invariant under continuous deformations. The resolution to this puzzle is given by the fact that H BPS,γ used in the definition of the BPS index (2.6) is in fact a one-particle Hilbert space.
Consider the following situation: there is a stable particle with charge γ when the Kähler moduli is t = t 1 . When we change the Kähler moduli to t = t 2 , the particle becomes unstable and decays into two particles with charges γ 1 and γ 2 (see Fig. 2. Of course, the charge conservation dictates that γ = γ 1 + γ 2 .). This means that the one-particle Hilbert space at t = t 1 is larger than that at t = t 2 . This explains the jump of the BPS index: although the index is deformation invariant, the Hilbert space over which we are taking the trace jumps as we move around the Kähler moduli space h . Of course, the reverse process is also possible: the stable particles can combine to make a new bound state. g We added "at infinity" here in order to emphasize that the value of the moduli is not the horizon value determined by the attractor mechanism 73,74 . h There is a neat supergravity picture for this, which will be explained in Appendix A.2. Now the next question is how to determine the positions of walls of marginal stability. In fact, this is easy. Consider the decay γ → γ 1 + γ 2 . Then the particle with charge γ is stable (unstable) if its mass M (γ) is larger (smaller) than the mass or particles γ 1 and γ 2 . In other words, on the walls of marginal stability we have At the same time, since the particles are BPS the mass is given by the central charge (2.2) M (γ) = |Z(γ)|.
Since the central charge is a linear function with respect to charges, we have Z(γ) = Z(γ 1 ) + Z(γ 2 ).
The only way to make the above three equations consistent is to have Arg (Z(γ 1 )) = Arg (Z(γ 2 )) .
(2. 16) This is the equation determining the position of walls of marginal stability. From (2.16) it follows that the position of walls of marginal stability for the decay process γ → γ 1 + γ 2 is the same as that for the process γ → N 1 γ 1 + N 2 γ 2 . We can also consider more complicated decay patterns, for example γ → N 1 γ 1 + N 2 γ 2 + N 3 γ 3 . However, such a decay occurs in a higher codimension subspace of the Kähler moduli, which in this case is determined by Arg (Z(γ 1 )) = Arg (Z(γ 2 )) = Arg (Z(γ 3 )) .
Since these decay patterns are non-generic, we are not going to consider these complicated decay patterns in the rest of this paper.
In this section we have formulated the problem: to determine the BPS index or its generating function in each chamber of the moduli space. In the following sections we will see that this problem is beautifully solved using the crystal melting model.

Crystal Melting
In this section we discuss the crystal melting model proposed in Ref. 32. The work 32 is motivated by and is based on earlier results in mathematics 33,34 .

Formulation of the Problem
We already discussed BPS state counting in Section 2.1, but here we would like to be more specific and would like to prepare some notations used throughout the rest of this paper.
There are different versions of BPS counting problems depending on which string theory and what kind of branes we consider. As in the previous section, in this paper we concentrate on the BPS counting problem of Type IIA string theory compactified on a Calabi-Yau manifold X i . We emphasize here that the problem in this paper is the counting in the physical string theory, not in the topological string theory. Topological string theory comes later into the story, somewhat surprisingly (see Section 5 for clarification on this point).
In this section and the following, we assume in addition that X is a toric Calabi-Yau manifold. The advantage of this choice is that thanks to the torus action on X we can often perform explicit computations, therefore making quantitative statements possible. Since X is non-compact, the four-dimensional theory is an N = 2 supersymmetric gauge theory.
We consider 1/2 BPS states of this N = 2 theory. In string theory, BPS states are realized as supersymmetric BPS bound states of D-branes wrapping holomorphic cycles. We concentrate on the configuration of D-branes which are particles in 4d: in other words, we consider Dp-branes wrapping p-cycles. D-branes which are vortex strings and domain walls in 4d are also of potential interest, and we will see such examples in the discussion of open BPS invariants in Section 7.
In type IIA string theory, we have Dp-branes with p even. We therefore consider D0/D2-branes wrapping holomorphic compact 0/2-cycles of the Calabi-Yau manifold. Due to the slightly technical reasons explained later, we do not include D4-branes wrapping 4-cycles. We also consider a single D6-brane filling the entire Calabi-Yau manifold. The D6-brane is different from other D-branes in that it wraps the whole X, which is non-compact (recall toric Calabi-Yau manifold is noncompact). We will see later that the D6-brane plays crucial roles in the discussion of the wall crossing phenomena.
Let us denote the D-brane charges of the particles by j γ = (n, β, 0, 1) ∈ H 6 (X; where β = {β I } collectively denotes an element of H 4 (X; Z). As in the introduction, the question is how to compute the BPS index Ω(γ), or its generating function where Q = {Q I } and Q β := I Q βI I .
i By string duality this is sometimes related to the BPS state counting in different string theories. For example, type IIA string theory on K3 × T 2 is dual to Heterotic string theory on T 6 . j We are changing the notation from the previous section. The notation here will be used throughout the rest of this paper.

The Connection with Topological String Theory
Before discussing the crystal melting model, let us summarize the known connection between the BPS partition function and the topological string theory. In the literature, the partition function Z BPS we define here is related to topological string theory partition function Z top in two different contexts. First, as explained in Section 2.1 the quantity Z BPS is the same the black hole partition function Z BH which appears in the context of Ooguri-Strominger-Vafa conjecture 19 . The conjecture states that when the D-brane charges are chosen such that bound states become large black holes with smooth event horizons, the generating function Z BH of a suitable index for black hole microstates is equal to the absolute value squared of the topological string partition function Z top , to all orders in the string coupling expansion. Second, when there is a single D6 brane with D0 and D2 branes bound on it, it has been proposed 75 that the bound states are counted by the Donaldson-Thomas invariants 76,77 of the moduli space of ideal sheaves k on the D6 brane. For a noncompact toric Calabi-Yau manifold, the Donaldson-Thomas invariants are related to the topological string partition function 55,75,78 using the topological vertex construction 56 . Recently the connection between the topological string theory and the Donaldson-Thomas theory for toric Calabi-Yau manifolds was proven mathematically in Ref. 79. Given the conjectural relation between the counting of D-brane bound states and the Donaldson-Thomas theory, it is natural to expect the relation, Note that these two conjectures are supposed to hold in different regimes of validity, as we will discuss in the final section (Section 8).
From the viewpoint of counting BPS states in type IIA string theory, the parameters q and Q are just formal variables for the generating function. We will see later that in the context of topological string theory they are related to the topological string coupling constant and the Kähler moduli (see (3.34)).
k An ideal sheaf I is mathematically defined to be a torsion-free sheaf of rank 1 with trivial determinant. Given such an I, we can determine the subscheme Y ⊂ X (roughly speaking, the subspace spanned by the D-brane) by Donaldson-Thomas invariants N n,β counts the "number" of such ideal sheaves with where n and β are D0 and D2-brane charges as defined previously. In this paper we do not use this explicit definition of (commutative) Donaldson-Thomas invariants, and assume no prior familiarity with them on the side of the reader.

What is Discussed in This Section
The purpose of this section is to understand the case (3.4) better. We start with the left-hand side of the relation, namely the counting of BPS states. Recently, the noncommutative version of the Donaldson-Thomas theory is formulated by Szendröi 33 for the conifold and by Mozgovoy and Reineke 34 for general toric Calabi-Yau manifolds l . In this section, we will establish a direct connection between the noncommutative Donaldson-Thomas theory and the counting of BPS bound states of D0 and D2 branes on a single D6 brane. Using this correspondence, we will find a statistical model of crystal melting which counts the BPS states. The formula we prove will be written as m Some readers will be more familiar with the crystal melting description of the topological string theory on the right-hand side of (3.4). It was shown in Refs. 55,75 that the topological string partition function on C 3 , the simplest toric Calabi-Yau manifold, and the topological vertex can be expressed as sums of three-dimensional Young diagrams, which can be regarded as complements of molten crystals with the cubic lattice structure n . Since the topological vertex can be used to compute the topological string partition function for a general non-compact toric Calabi-Yau manifold, it is natural to expect that a crystal melting description exists for any such manifold. To our knowledge, however, this idea has not been made explicit. The crystal melting model defined in this section is different from the one suggested by the topological vertex construction, and the precise relation will be explained in the discussion of wall crossing phenomena in part II.
We should next explain how the crystal arises. The short answer is that it arises from quiver quantum mechanics o .
Instead of studying the full dynamics of four-dimensional gauge theory, we can use the low energy effective theory on the D-brane worldvolume to compute the index. The low energy effective theory of D0 and D2 branes bound on a single D6 brane is a one-dimensional supersymmetric gauge theory, which is a dimensional reduction of an N = 1 gauge theory in four dimensions. Since the index is deformation invariant and thus invariant under the process of dimensional reduction, the BPS index reduces to the Witten index of this one-dimensional theory, i.e. quantum mechanics. The Witten index of quantum mechanics is in turn given by the Euler l See Refs. 80,81,54,82,83,84,32,35,62,85,53,86,87,88,89,90 for further developments. m As will be discussed in detail in Section 5, this is a specialization of the formula (1.2). n See Refs. 91,92,59,93,94,95,96 for further developments. o One should keep in mind that the appearance of quantum mechanics (and the computation of the BPS index by it) is more universal than in our toric setup, and should apply to any Calabi-Yau manifold. The advantage of our setup is that the precise form of the quantum mechanics is known, thanks to the brane tiling techniques. The torus action also helps to compute the index of the quantum mechanics, since we compute the Euler character of the moduli space by localization with respect to the torus action originating from the toric condition.
character of the vacuum moduli space p . This statement will be made more precise in Section 3.2.
The field content of the quantum mechanics is encoded in a quiver diagram and the superpotential can be found by the so-called brane tiling techniques 97,98,99,100 q . From these gauge theory data, we define a crystalline structure in three dimensions. The crystal is composed of atoms of different colors, each of which corresponds to a node of the quiver diagram and carries a particular combination of D0 and D2 charges. The chemical bond is dictated by the arrows of the quiver diagram. There is a special crystal configuration, whose exterior shape lines up with the toric diagram of the Calabi-Yau manifold. Such a crystal corresponds to a single D6 brane with no D0 and D2 charges. We define a rule to remove atoms from the crystal, which basically says that the crystal melts from its peak. By using the non-commutative Donaldson-Thomas theory 33,34 , we show that there is a one-to-one correspondence between molten crystal configurations and BPS bound states carrying non-zero D0 and D2 charges. The statistical model of crystal melting computes the index of D-brane bound states.
The number of BPS states depends on the choice of the stability condition, and the BPS countings for different stability conditions are related to each other by the wall crossing formulas. In this section, we find that, under a certain stability condition, BPS bound states of D-branes are counted by the noncommutative Donaldson-Thomas theory. As we will see in Section 5, we can relate non-commutative Donaldson-Thomas theory to the commutative Donaldson-Thomas theory by a series of wall crossings. Since the topological string theory is equivalent to the commutative Donaldson-Thomas theory for a general toric Calabi-Yau manifold 79 , the relation (3.4) is indeed true for some choice of the stability condition, as expected in Ref. 75. In general, the topological string partition function and the partition function of the crystal melting model are not identical, but their relation involves the wall crossing, Z crystal melting ∼ Z top (modulo wall crossings). (3.6) This does not contradict with the result in Refs. 55, 75 since there is no wall crossing phenomenon involved between commutative and non-commutative Donaldson-Thomas invariants for C 3 . This shows that wall crossing phenomena (to be explained in part II) is crucial for understanding the precise relation between crystal melting and topological string theory. The rest of this section is organized as follows (see Fig. 3). In Section 3.2, we will p More precisely, the correct statement is where Mvac is the vacuum moduli space and T Mvac is the tangent space of the moduli space 33 . The sign has the effect of shifting the sign of chemical potentials of the crystal melting model, as will be explained in more detail in (3.22) in Section 3.5. q See Refs. 101, 102 for reviews of the quiver gauge theory and the brane tiling method.
summarize the computation of D-brane bound states from the gauge theory perspective. In Section 3.3, we will discuss how this is related to the recent mathematical results on the non-commutative Donaldson-Thomas invariants. In Section 3.4, we will formulate the statistical model of crystal melting for a general toric Calabi-Yau manifold, whose partition function is computed in Section 3.5. The final section is devoted to the summary of our result and discussion on the wall crossing phenomena. The equivalence of a configuration of molten crystal with a perfect matching of the bipartite graph is explained in appendix Appendix A.1.

Quiver Quantum Mechanics
Let us begin with the description of quiver quantum mechanics. The first problem is to give a precise identification of the quantum mechanics on the worldvolume of D-branes. In the classic paper by Douglas and Moore 103 , it was shown that the low energy effective theories of D-branes on a class of orbifolds are described by gauge theories associated to quiver diagrams. Subsequently, this result has been generalized to an arbitrary non-compact toric Calabi-Yau threefold. A toric Calabi-Yau threefold X ∆ is a T 2 × R-fibration over R 3 , where the fibers are special Lagrangian submanifolds. The toric diagram ∆ tells us where and how the fiber degenerates. For a given X ∆ and a set of D0 and D2 branes on X ∆ , the following procedure determines the field content and superpotential of the gauge theory on the branes. We will add a single D6 brane to the system later in this section.

Quiver Diagram and Field Content
The low energy gauge theory is a one-dimensional theory given by dimensional reduction of an N = 1 supersymmetric gauge theory in four dimensions. The field content of the theory is encoded in a quiver diagram, which is determined from the toric data and the set of D-branes, as described in the following. A quiver diagram Q = (Q 0 , Q 1 ) consists of a set Q 0 of nodes, with a rank N i > 0 associated to each node i ∈ Q 0 , and a set Q 1 of arrows connecting the nodes. The corresponding gauge theory has a vector multiplet of gauge group U (N i ) at each node i. There is also a chiral multiplet in the bifundamental representation associated to each arrow connecting a pair of nodes.
In the following, we will explain how to identify the quiver diagram. Readers are encouraged to consult Fig. 4, which describes the procedure for the Suspended Pinched Point (SPP) singularity, which is a Calabi-Yau manifold defined by the toric diagram in Fig. 4-(a) or equivalently by the equation, in C 4 .  To identify the quiver diagram, we take a T-dual of the toric Calabi-Yau manifold along the T 2 fibers 98,104 . The fibers degenerate at loci specified by the toric diagram ∆, and the T-duality replaces the singular fibers by NS5 branes 105 . Some of these NS5 branes divide T 2 into domains as shown in the red lines in Fig. 4-(b) 106,107,108,102 . The D0 branes become D2 branes wrapping the whole T 2 . The original D2 are still D2 branes after the T-duality, but each of them is in a particular domain of T 2 suspended between NS5 branes. In addition, there are some domains that contain NS5 branes stretched two-dimensionally in parallel with D2 branes r . Let us denote the domains without NS5 branes by i ∈ Q 0 and the domains r The NS5 branes are also filling the four-dimensional spacetime R 1,3 while the D2 branes are with NS5 branes by a ∈ I. In Fig. 4-(b), the Q 0 -type domains are shown in white, and the I-type domains are shown with shade. There are two types of shades, corresponding to two different orientations of NS5 branes. This distinction will become relevant when we discuss the superpotential.
The Q 0 -type domains are identified with nodes of the quiver diagram since open strings ending on them can contain massless excitations. The rank N i of the node i ∈ Q 0 is the number of D2 branes in the corresponding domain. On the other hand, I-type domains give rise to the superpotential constraints as we shall see below. Though two domains i, j ∈ Q 0 never share an edge, they can touch each other at a vertex. In that case, open strings going between i and j contain massless modes. We draw an arrow from i → j or i ← j depending on the orientation of the massless open string modes, which is determined by the orientation of NS5 branes. Note that the quiver gauge theory we consider in this section are in general chiral. This completes the specification of the quiver diagram.
As another example, the quiver diagram for the conifold geometry has two nodes connected by two sets of arrows in both directions. The ranks of the gauge groups are n 0 and n 0 + n 2 , where n 0 and n 2 are the numbers of D0 and D2 branes s . The gauge theory is a dimensional reduction of the Klebanov-Witten theory 109 when n 2 = 0 and the Klebanov-Strassler theory 110 when n 2 > 0.

Superpotential and Brane Tiling
Each domain a ∈ I containing an NS5 brane is surrounded by domains i 1 , i 2 , ..., i n ∈ Q 0 without NS5 branes, as in Fig. 4-(b). By studying the geometry T-dual to X ∆ in more detail, one finds that the domain is contractible. Since open strings can end on the domains i 1 , i 2 , ..., i n , the domain a can give rise to worldsheet instanton corrections to the superpotential.
This fact, combined with the requirement that the moduli space of the gauge theory agrees with the geometric expectation for D-branes on X ∆ , determines the superpotential. Depending on the NS5 brane orientation, the I-type domains are further classified into two types, I + and I − , and thus the regions of torus is divided into three types Q 0 , I + and I − . Such a brane configuration, or a classification of regions of T 2 , is called the brane tiling t . In Fig. 4-(b), the brane tiling is shown by the two different shades. The superpotential W is then given by

8)
localized along a timelike path in four dimensions. s In the context of 4d N = 1 quiver gauge theories, these branes are called D3 and D5-branes, the latter often called fractional branes. t In the literature the word brane tiling refers to the bipartite graph explained below. Here the word brane tiling refers to a brane configuration as shown Fig. 4-(b). Such a graph is called the fivebrane diagram in Ref. 111. where the relation e ∈ a means that an edge e is one of the boundary edges of the face a ∈ I ± , and the product is over all such edges in a (counter)clockwise manner. This formula is tested in many examples. In particular, it has been shown that the formula reproduces the toric Calabi-Yau manifold X ∆ as the moduli space of the quiver gauge theory 112,113 .
In the literature of brane tiling, bipartite graphs are often used in place of brane configurations as in Fig. 4-(b). A bipartite graph is a graph consisting of vertices colored either black or white and edges connecting black and white vertices. Since bipartite graphs will also play roles in the following sections, it would be useful to explain how it is related to our story so far. For a given brane configuration, we can draw a bipartite graph on T 2 as follows. In each domain in I + (I − ), place a white (black) vertex. Draw a line connecting a white vertex in a domain i ∈ I + and a black vertex in a neighboring domain j ∈ I − . The resulting graph Γ is bipartite. See Fig. 5 for the comparison of the brane configuration and the bipartite graph in the case of the Suspended Pinched Point singularity. We can turn this into a form that is more commonly found in the literature, for example in Ref. 98, by choosing a different fundamental region as in Fig. 6. shade. The edge of the bipartite graph corresponds to an intersection of I − and in I + . From this construction, it automatically follows that the graph so obtained is bipartite. Fig. 6. By choosing a different fundamental region of T 2 , we find a bipartite graph which is more commonly found in the literature.

D-term Constraints and the Moduli Space
The F-term constraints are given by derivatives of the superpotential, which can be determined as in the above. The moduli space of solutions to the D-term constraints is then described by a set of gauge invariant observables divided out by the complexified gauge group G C 114 . The theorem by King 115 states that an orbit of G C contains a solution to the D-term conditions if and only if we start with a point that satisfies the θ-stability, a condition defined in the next section. Thus, we can think of the moduli space as a set of solutions to the F-term constraints obeying the θ-stability condition, modulo the action of G C .

Adding a Single D6 Brane
To make contact with the Donaldson-Thomas theory, we need to include one D6 brane. Since the D6 brane fills the entire Calabi-Yau manifold, which is noncompact, it behaves as a flavor brane. In the low energy limit, the open string between the D6 brane and another D-brane gives rise to one chiral multiplet in the fundamental representation for the D-brane on the other end. The D6 brane then enlarges the quiver diagram by one node and one arrow from the new node. To understand why we only get one arrow from the D6 brane, let us take T-duality along the T 2 fiber again. The D6 brane is mapped into a D4 brane which is a point in some region in T 2 . This means that we only have one new arrow from the new node corresponding to the D6 brane to the node corresponding to the D2 branes in the region u . See Refs. 94, 116 for related discussion in the literature.

Non-commutative Donaldson-Thomas Theory
In the previous section, we discussed how to construct the moduli space of solutions to the F-term and D-term constraints in the quiver gauge theory corresponding to a toric Calabi-Yau manifold X ∆ with a set of D0/D2 branes and a single D6 brane.
In this section, we will review and interpret the mathematical formulation of the non-commutative Donaldson-Thomas invariant in Refs. 33, 34 for X ∆ . We find that it is identical to the Euler number of the gauge theory moduli space.

Path Algebra and its Module
For the purpose of this section, modules are the same as representations. Consider a set of all open paths on the quiver diagram Q = (Q 0 , Q 1 ). By introducing a product as an operation to join a head of a path to a tail of another (the product is supposed to vanish if the head and the tail do not match on the same node) and by allowing formal sums of paths over C 3 , the set of open oriented paths can be made into an algebra CQ called the path algebra. Note that we are including both gauge variant as well as gauge invariant operators. In physics we usually do not consider such a huge algebra, but it has turned out to be a useful language for our purposes.
We would like to point out that there is a one-to-one correspondence between a representation of the path algebra and a classical configuration of bifundamental fields of the quiver gauge theory. Suppose there is a representation M of the path algebra. For each node i ∈ Q 0 , there is a trivial path e i of zero length that begins and ends at i. It is a projection, (e i ) 2 = e i , and satisfies e i a i = a i for any arrow a i starting from vertex i. Since every path starts at some node i and ends at some node j, the sum i e i acts as the identity on the path algebra. Therefore, For each path from i to j, one can assign a map from M i to M j . In particular, there is an N i × N j matrix for each arrow i → j ∈ Q 1 of the quiver diagram. By identifying this matrix as the bifundamental field associated to the arrow i → j, we obtain a classical configuration of bifundamental fields with the gauge group U (N i ) at the node i. By reversing the process, we can construct a representation of the path algebra for each configuration of the bifundamental fields.

F-term Constraints and Factor Algebra A
Let us turn to the F-term constraints. Since the bifundamental fields of the quiver gauge theory is a representation of the path algebra, the F-term equations give relations among generators of the path algebra. It is natural to consider the ideal F generated by the F-term equations and define the factor algebra A = CQ/F . The bifundamental fields obeying the F-term constraints then generate a representation of this factor algebra. Namely, classical configurations of the quiver gauge theory obeying the F-term constraints are in one-to-one correspondence with A-modules.
As an example, the algebra A for the conifold geometry contains an idempotent ring C[e 1 , e 2 ] generated by two elements and is given by the following four generators and relations: v Each A-module for this algebra corresponds to a choice of ranks of the gauge groups and a configuration of the bifundamental fields a i , b i satisfying the F-term constraints. F-term constraints have a nice geometric interpretation on the quiver diagram, which we will find useful in the next section. We observe that each bifundamental field appears exactly twice in the superpotential with different signs of coefficients v The center Z(A) of this algebra A is generated by x ij = a i b j + b j a i (i, j = 1, 2), and is given by (3.9) which is the ring of functions of the conifold singularity.
in the superpotential shown in (3.8). By taking a derivative of the superpotential with respect to a bifundamental field corresponding to a given arrow, the resulting F-term constraint states that the product of bifundamental fields around a face of the quiver on T 2 on one side of the arrow is equal to that around the face on the other side. See Fig. 7 for an example. Therefore, when we have a product of bifundamental fields along a path, any loop on the path can be moved along the path and the resulting product is F-term equivalent to the original one. In Ref. 34, it is shown that for any point i, j ∈ Q 0 , we can find a shortest path v i,j from i to j such that any other path a from i to j is F-term equivalent to v i,j ω n with non-negative integer n, where ω is a loop around one face of the quiver diagram. It does not matter where the loop ω is inserted along the path v i,j since different insertions are all F-term equivalent. This means that any path is characterized by the integer n and the shortest path v i,j . Fig. 7. Representation of F-term constraints on the quiver diagram on T 2 . In this example, if we write by X AB the bifundamental corresponding to an arrow starting from vertex A and ending at B etc., then the superpotential (3.8) contains a term W = −tr(X AB X BC X CA ) + tr(X AB X BD X DE X EA ), and the F-term condition for X AB (multiplied by X AB ) says that the product of bifundamentals fields along the triangle ABC and that along the square ABDE is the same.
In the next subsection, we will impose the D-term constraints on the space of finitely generated left A-modules, mod A. Before doing this, however, it is instructive to discuss topological aspects of mod A by considering its bounded derived category w D b (mod A). In mathematics, the algebra A gives the so-called "noncommutative crepant resolution" x 118 . For singular Calabi-Yau manifolds such as X ∆ , the crepant resolution means a resolution that preserves the Calabi-Yau condition y . For a crepant resolution Y ∆ of X ∆ , we have the following equivalence of categories z :

11)
w See Ref. 117 for an introductory explanation of derived categories in the context of string theory.
x The origin of the name "non-commutative" stems from the fact that the algebra A is noncommutative. y Mathematically, we mean a resolution f : where D b (coh(Y ∆ )) is a bounded derived category of coherent sheaves of crepant resolution Y ∆ , and D b (mod A) is the bounded derived categories of finitely generated left A-modules. The equation (3.11) is also interesting from the physics viewpoint. Since D b (coh(Y ∆ )) gives a topological classification of A branes aa on the resolved space Y ∆ , the equivalence means that D b (mod A) also classifies D-branes, which is consistent with our interpretation above that A-modules are in one-to-one correspondence with a configuration of bifundamental fields obeying the F-term constraints.
We should note that the paper 34 , which computes the non-commutative Donaldson-Thomas invariants for general toric Calabi-Yau manifolds, requires a set of conditions on brane tilings, namely on the superpotential. It is easy to show that the conditions specified in lemma 3.5 and conditions 4.12 of Ref. 34 are automatically satisfied for any quiver gauge theories for D-branes on general toric Calabi-Yau manifold. To prove the condition 5.3 is more difficult (see Ref. 124 for a proof ab ).

D-term Constraints and θ-Stability
We saw that the derived category D b (mod A) of A-modules gives the topological classification of D-branes in the toric Calabi-Yau manifold X ∆ . To understand the moduli space of D-branes, however, we also need to understand implications of the D-term constraints. This is where the θ-stability comes in ac . Let θ ∈ N Q0 be a vector whose components are real numbers. Consider an A-module M , and recall that this M is decomposed as for every submodule M ′ of M ad . When > is replaced by ≥, the module M is called θ-semistable.
In the language of gauge theory, the stability condition (3.12) is required by the D-term conditions. Some readers might wonder why the D-term conditions, which are equality relations, can be replaced by an inequality as (3.12). In fact, the similar story goes for the Hermitian Yang-Mills equations. There instead of solving the Donaldson-Uhlenbeck-Yau equations, we can consider holomorphic vector bundles with a suitable stability condition, the so-called µ-stability or Mumford-Takemoto aa Some readers may wonder whether this should be B branes, since it is often stated in the literature that coherent sheaves classify B branes. However, in those references we consider Dbranes filling the whole R 3,1 , whereas in our context D-branes spread only in the time direction in R 3,1 . This means coherent sheaves also describe particle-like D-branes in type IIA string theory. ab See Refs. 121, 125, 126 for more on consistency conditions in the mathematics literature. ac The θ-stability is a special limit of Π-stability as discussed in Refs. 127, 128. ad In some literature, an additional condition i∈Q 0 θ i (dim M i ) = 0 is imposed for a choice of θ. This is trivially satisfied for the choice θ = (0, 0, . . . , 0) we choose below. stability 129,130 . As we mentioned at the end of section 2, it is known that a configuration of bifundamental fields is mapped to a solution to the D-term equations by a complexified gauge transformation G C if and only if the configuration is θ-stable.
Since each A-module M gives a representation of G C = i∈Q0 GL(N i , C), where GL(N i , C) is represented by M i = e i M at each node, each A-module specifies a particular G C orbit. Thus, finding a θ-stable module is the same as solving the D-term conditions.
Up to this point we have not specified the value of θ. Physically, θ's correspond to the Fayet-Iliopoulos (FI) parameters, which are needed to write down D-term equations 127 . Although the Euler number of the space of θ-stable A-modules does not change under infinitesimal deformation of θ, it does change along the walls of marginal stability 54,82 . The noncommutative Donaldson-Thomas invariant defined by Ref. 33 is in a particular chamber in the space of θ's. Following Ref. 34, we hereafter take θ = (0, 0, . . . , 0) ae . We will comment more on this issue in the final section.

D6 Brane and Compactification of the Moduli Space
We have found that solutions to the F-term and D-term conditions in the quiver gauge theory are identified with θ-stable A-modules. We want to understand the moduli space of such modules and compute its Euler number.
Since D-brane charges correspond to the ranks of the gauge groups, we consider moduli space of θ-stable modules with dimension dim M i = N i (i ∈ Q 0 ), which we denote by M N (A). To compute its Euler number, we need to address the fact that the moduli space of stable A-modules is not always compact. In mathematics literature, the necessary compactification is performed by enlarging the quiver diagram by adding one more node in the following way.
Let us fix an arbitrary vertex i 0 , and define a new quiverQ = (Q 0 ,Q 1 ) bŷ Namely, we have added one new vertex * and one arrow * → i 0 to obtain the extended quiver diagramQ. As in the previous case for Q, we can define the path algebra CQ, the idealF generated in CQ by F , and the factor algebraÂ = CQ/F. Defineθ ∈ N Q0+1 byθ = (θ, 1) and defineθ-stable and semistableÂ-modules using stability parameterθ. It is shown in lemma 2.3 of Ref. 34 thatθ-semistableÂmodules are alwaysθ-stable af , and the moduli spaceM N i0 (A) ofθ-stable modules with specified dimension vectorN ∈ N Q0+1 is compact (the boundary of moduli space ofθ-stable modules are given byθ-semistable modules which are notθ-stable).
ae This sounds like a rather degenerate choice, making all module to be θ-semistable but not θstable according to (3.12). However, as we will see in the next subsection we add an extra node corresponding to the D6-brane and use the stability parameterθ = (θ, 1). af It is easy to see this fact from the definition (3.12). Suppose that a moduleM isθ-semistable Adding the extra node allows us to compactify the moduli space. In the language of D-branes, this corresponds to adding a single D6 brane filling the entire Calabi-Yau manifold, which is necessary to interpret the whole system as a sixdimensional U (1) gauge theory related to the Donaldson-Thomas theory. As we mentioned in Section 3.2.4, the D6 brane serves as a flavor brane and adds an extra node exactly in the way described in the above paragraph. Note that, in the above paragraph, the idealF is generated by the original ideal F . In the quiver gauge theory, this corresponds to the fact that the flavor brane does not introduce a new gauge invariant operator to modify the superpotential. In this way, we arrive at the definition of non-commutative Donaldson-Thomas invariant as the Euler characteristic χ(M N i0 (A)) of cohomologies ag . With our identification ofM N i0 (A) with the moduli space of solutions to the F-term and D-term conditions, χ(M N i0 (A)) computes the Witten index of bound states of D0 and D2 branes bound on a single D6 brane ignoring the trivial degrees of freedom corresponding the center of mass of D-branes in R 1,3 (see Section 2.1).
We have chosen a specific vertex i 0 to define the non-commutative Donaldson-Thomas invariant. The i 0 dependence drops out in simple cases such as C 3 and conifold, but in general χ(M N i0 (A)) depends on the choice of the i 0 . We note that the quiver gauge theory discussed in Section 3.2 also has an apparent dependence on i 0 .
The most systematic method for computing the number and direction of arrows in the quiver diagram is to use fractional branes, or more mathematically exceptional collections ah . The resolved conifold X is a normal bundle O C (−1) ⊕ O C (−1) over a curve C ≃ P 1 , and the fractional branes are given by O C and O C (−1)[1] 136 , where [1] means the shift of the complex by one ai . These sheaves correspond to the nodes of the quiver diagram, and we have 4 (=2+2) arrows since (3. 15) In this language, the D6-brane is given by the structure sheaf O X [1] of the whole X, with a suitable shift (in this case, 1). By computing the Ext groups, we can determine the quiver diagram including the D6-brane node and the arrows starting but notθ-stable. This means thatM has a submoduleM ′ such that i∈Q 0θ This is impossible, however, since the left hand side is dim e * M ′ = 1. ag More precisely, this invariant should be defined from the Euler class of the obstruction bundle over the moduli space. The existence of obstruction theory guarantees the equivalence of these two quantities up to a possible sign 33 from it aj . As a digression, this understanding gives a bonus. As is well-known, the choice of the fractional branes is far from unique. For example, instead of O X [1], , where n is a positive integer. Computing the Ext group of the quiver diagram, we have a different quiver, shown in Fig. 8. Physically, the quivers are related by Seiberg dualities (called mutations in mathematics ak ). Note that in the construction given below, different quivers (and different superpotential) give a different path algebra, and thus a different crystal. This means that the BPS index changes, which is reminiscent of the wall crossing phenomena. Indeed, this is not an analogy; as clarified in Refs. 86, 54, in the quiver language wall crossing phenomena can be understood as Seiberg dualities on the quiver. We will return to the issue of wall crossing in part II. But before that, let us describe the structure of the crystal.

Crystal Melting
In this section, we define a statistical mechanical model of crystal melting and show that the model reproduces the counting of BPS bound state of D-branes. Using the quiver diagram and the superpotential of the gauge theory, we define a natural crystalline structure in three dimensions. We specify a rule to remove atoms from the crystal and show that each molten crystal corresponds to a particular BPS bound state of D-branes. We use the result of Ref. 34 to show that all the relevant BPS states are counted in this way.
aj Computation of the superpotential by this method is in general difficult, although possible in some examples. See Ref. 136. ak There is a conjecture that Seiberg duality is the same as the mutation of exceptional collections 134 .

Crystalline Structure
Mathematically, the three-dimensional crystal we define here is equivalent to a set of basis for Ae i0 , where A is the factor algebra A = CQ/F of the path algebra CQ divided by the ideal F generated by the F-term constraints and e i0 is the path of zero length at the reference node i 0 , which is also the projection operator to the space of paths starting at i 0 . Colloquially, the crystal is a set of paths starting at i 0 modulo the F-term relations. As we shall later, it corresponds to a single D6 brane with no D0 and D2 charges. We interpret Ae i0 in terms of a three-dimensional crystal as follows.
The crystal is composed of atoms piled up on nodes in the universal covering Q on R 2 . By using the projection, π :Q → Q, each atom is assigned with a color corresponding to the node in the original quiver diagram Q. The arrows of the quiver diagram determines the chemical bond between atoms. We start by putting one atom on the top of the reference node i 0 . Next attach an atom at an adjacent node j ∈Q 0 that is connected to i 0 by an arrow going from i 0 to j. The atoms at such nodes are placed lower than the atom at i 0 . In the next step, start with the atoms we just placed and follow arrows emanating from them to attach more atoms at the heads of the arrows.
As we repeat this procedure, we may return back to a node where an atom is already placed. In such a case, we use the following rule. As we explained in Section 3.3.2, modulo F-term constraints, any oriented path a starting at i 0 and ending at j can be expressed as v i0,j ω n , where ω is the loop around a face in the quiver diagram and v i0,j is one of the shortest paths from i 0 to j ( Fig. 9 for an example). This defines an integer h(a) = n for each path a. The rule of placing atoms is that, if a path a takes i 0 to j and if h(a) = n, we place an atom at the n-th place under the first atom on the node j ( Fig. 10). If there is already an atom at the n-th place, we do not place a new atom. . This example shows that the green path is F-term equivalent to the shortest path (blue path) plus a loop.
By repeating this procedure, we continue to attach atoms and construct a pyramid consisting of infinitely many atoms. Since atoms are placed following paths from i 0 modulo the F-term relations, it is clear that atoms in the crystal are in one-to-one correspondence with basis elements of Ae i0 . Note that by construction the crystal has a single peak at the reference node i 0 .
This defines a crystalline structure for an arbitrary toric Calabi-Yau manifold. In particular, it reproduces the crystal for C 3 discussed in Refs. 55, 75, and the one for conifold in Ref. 33. See Fig. 11 (Fig. 12) for the crystalline structure corresponding to the resolved conifold (Suspended Pinched Point singularity). In these two examples, the ridge of the crystal (shown as blue lines in Fig. 12) coincides with the (p, q)-web of the toric geometry. As we will discuss later, this is a general property of our crystal.

BPS State and Molten Crystal
In the forthcoming discussions, the crystal defined above will be identified with a single D6 brane with no D0 and D2 charges. Bound states with non-zero D0 and D2 charges are obtained by removing atoms following the rule specified below. In order for a molten crystal to correspond to U (1) 2 invariantθ-stable Amodules, we need to impose the following rule to remove atoms from the crystal.
Let Ω be a finite set of atoms to be removed from the crystal.

The Melting Rule:
If aα ∈ Ω for some a ∈ A, then α ∈ Ω. (3.16) Since atoms of the crystal correspond to elements of Ae i0 , we used the natural action of A on Ae i0 to define aα in the above. This means that crystal melting starts at the peak at i 0 and takes place following paths in Ae i0 . An example of a molten crystal satisfying this condition is shown in Fig. 13. The melting rule means that a complement I of the vector space spanned by Ω in Ae i0 gives an ideal of A. To see this, we just need to take the contraposition of the melting rule. It states: For any β ∈ I and for any a ∈ A, aβ is also in I.
Generally speaking, an ideal of an algebra defines a module. To see this, consider a vector |I which is annihilated by all elements of the ideal I. From |I , we can generate a finite dimensional representation of the algebra A by acting with elements of A on it. However, the converse is not always true. Fortunately, when modules areθ-stable and invariant under the U (1) 2 symmetry, it was shown in Refs. 33, 34 that there is a one-to-one correspondence between ideals and modules. It follows that our molten crystal configurations are also in one-to-one correspondence with A-modules and therefore with relevant BPS bound states of D-branes. This proves that the statistical model of crystal melting computes the index of D-brane bound states.
It would be instructive to understand explicitly how each molten crystal configuration corresponds to a BPS bound state. Starting from a molten crystal specified by Ω, prepare a one-dimensional vector space V α with basis vector e α for each atom α ∈ Ω. For each arrow a ofQ, define the action of a on V α by a(e α ) = e β when the arrow a begins from α and ends an another atom β ∈ Ω. Otherwise a(e α ) is defined to be zero. Since an arbitrary path is generated by concatenation of arrows, we have defined an action of a ∈ A on each V α . By linearly extending the action of a onto the total space M = ⊕ α∈Ω V α , we obtain a A-module M .
There are several special properties concerning this module M . First, the F-term relations are automatically satisfied. This is because when there exist two different paths a, b ∈ A starting at α and ending at β, a(e α ) and b(e α ) are both defined to be e β . Second, by construction M is generated by the action of the algebra A on a single element e i0 ∈ V i0 . In such a case M is called a cyclic A-module, and At the beginning of this subsection, we stated without explanation that the original crystal corresponds to a single D6 brane with no D0 and D2 charges, and removing atoms correspond to adding the D-brane charges. To understand this statement, let us recall that, in Section 3.2, we started with a configuration of D0 and D2 branes on the toric Calabi-Yau manifold and took a T-duality along the fiber to arrive at the brane configuration. Thus, the number of D2 branes at each node j of the quiver diagram Q is a combination of D0 and D2 charges before T-duality. It is this number that is equal to the rank of the gauge group at j.
By using the projection π : In particular, the formula (3.17) means that the rank of the gauge group N j = dim M j at the node j is equal to the number of atoms with the color corresponding to the node j that have been removed from the crystal. Thus, removing an atom at the node j is equivalent to adding D0 and D2 charges carried by the node j. It is interesting to note that each atom in the crystal does not correspond to a single D0 brane or a single D2 brane, but each of them carries a specific combination of D0 and D2 charges. In the crystal melting picture, fundamental constituents are not D0 and D2 branes but the atoms. This reminds us of the quark model of Gell-Mann and Zweig 137,138 , where the fundamental constituents carry combinations of quantum numbers of hadrons, as opposed to the Sakata model 139 , where existing elementary particles such as the proton, neutron and Λ particle are chosen as fundamental constituents.

Observations on the Crystal Melting Model
We would like to make a few observations on the statistical model of crystal melting that counts the number of BPS bound states of D-branes. We have studied several examples of toric Calabi-Yau manifolds and found that the crystal structure in each case matches with the toric diagram. In particular, the ridges of the crystal, when projected onto the R 2 plane, line up with the (p, q) web of the maximally degenerate toric diagram. This phenomenon is discussed in Appendix A.1. There, we also explain the correspondence between molten crystal configurations and perfect matching of the bipartite graph introduced in Section 3.2.2.
In the last subsection, we found it useful to describe BPS bound states using ideals of the algebra A. In the case when the toric Calabi-Yau manifold is C 3 , ideals are closely related to the quantization of the toric structure as discussed in Ref. 75. The gauge theory for C 3 is the dimensional reduction of the N = 4 supersymmetric Yang-Mills theory in four dimensions down to one dimension, and the bifundamental fields are three adjoint fields. The F-term and D-term conditions require that they all commute with each other. Thus chiral ring is generated by three elements x, y, z which commute with each other without any further relation. In this case, any ideal I π is characterized by the three-dimensional Young diagram π. Locate each box in the 3d Young diagram π by the Cartesian coordinates (i, j, k) (i, j, k = 1, 2, 3, ...) of the corner of the box most distant from the origin, and define Ω π to be a set of the 3d Cartesian coordinates (i, j, k) for boxes in π. We can then define the ideal I π of the chiral ring by, In Ref. 75, this description was obtained by quantizing the toric geometry by using its canonical Kähler form and by identifying x i−1 y j−1 w k−1 as states in the Hilbert space. This can be generalized to an arbitrary toric Calabi-Yau manifold X ∆ as follows. One starts with the quiver diagram corresponding to X ∆ and use the brane tiling to identify the F-term equations. This gives the chiral ring generated by bifundamental fields obeying the F-term and D-term relations. As we saw in Section 3.4.3, each BPS bound state is related to an ideal of the chiral algebra. We expect that such ideals arise from quantization of the toric structure. BPS bound states of Dbranes emerging from the quantization of background geometry is reminiscent of the bubbling AdS space of Ref. 140 and Mathur's conjecture on black hole microstates 141 .

The BPS Partition Function
We have seen that a molten crystal is in one-to-one correspondence with a BPS state contributing to the index. It automatically follows that the BPS partition function, which is defined in Section 2.1 by summing over BPS states contributing to the index, is the same as the statistical partition function of the crystal melting model.
From the explanation around (3.17), the partition function expressed in terms of the crystal is given by where w i (Ω), which is the same as dim M j , is the number of atoms in Ω with the i-th color. The parameters q i , counting the rank of the dimension of the vector space at vertex i, is a combination of D0/D2-brane chemical potentials. For example, in the conifold example dimension vectors are related to the D-brane charges n 0 , n 2 by (see the discussion at the end of Section 3.2.1) This means that the relation between parameters are given by In the discussion so far we have not discussed the sign in (3.19), which should be properly taken into account when we discuss the BPS index. Namely the correct statement is that the BPS index is the same as the number of configuration of molten crystals times a sign, which mathematically comes from the dimension of the tangent space of the vacuum moduli of the quantum mechanics, as mentioned in footnote p in Section 3.1.3. Recall that we are actually computing the BPS index, which is defined as the number of boson and that of fermions, and therefore can take negative as well as positive values. In general, for a configuration of molten crystal Ω, Theorem 7.1 of Ref. 34 says that the sign is given by is the Ringel form of the quiver, given by In general we have to insert this sign to each term of the crystal melting partition function separately. When the toric Calabi-Yau manifold X does not have a compact 4-cycle, however, these signs are simply taken care of by the change of the signs of the chemical potentials in the partition function. To show this, we begin with the fact that in these examples the quiver diagram takes the following form al .
Suppose that the quiver has N nodes, together with one node corresponding to the D6-brane. Then we can number the N nodes by i = 1 . . . , N such that (a) there is always exactly one arrow from node i to node i + 1, (b) there is always exactly one arrow from node i to node i − 1, and (c) there may or may not be an arrow from node i to node i. In this situation contributions from arrows of type (a), (b) cancel out in the second term of (3.22), and the only remaining contribution is from (c): Thus the total sign can also be written as This means that the sign is conveniently taken care of by the replacement am (we use p i for the parameters in the generating functions of the crystal without signs) In other words, the precise relation between the BPS partition function (3.19) and the crystal partition function (defined by (3.19) without signs) is given by under the identification in (3.25).
As an example, for the resolved conifold there is no arrow of type (c), and we have {S} = {1} and This concludes the discussion of signs in the BPS partition function (3.19).
Since we already know the explicit form of the crystal and the sign, we can compute Z BPS from lowest order terms. For example, for the conifold example we have (see Fig. 14) which becomes, under the parameter identification (3.21), We can perform similar computations for any crystal, however complicated it is.
In some examples we can write down a closed expression for the BPS partition function, instead of computing each term separately. For example, for the resolved conifold Young 80 has proven combinatorially that This means, using (3.27) and (3.21), where M (q) is the MacMahon function This is very similar to the Gopakumar-Vafa 60,61 expansion of the topological string partition function

33)
am As emphasized previously, this is not the case in general, e.g. for the canonical bundle of P 1 ×P 1 . where the parameters q and Q in the above expression are related to the topological string coupling constant g s and the Kähler moduli t by an In fact, we can write Similar expressions hold in all the toric Calabi-Yau 3-folds without compact 4-cycles.
To explain the appearance of the topological string theory, as well as the relation an For notational simplicity, in the following sections we will be sloppy and often absorb the minus sign in (3.34) into the definition of q to write q = e −gs .
(3.35), will be the topic of Section 5.

Summary
In this section, we established the connection between the counting of BPS bound states of D0 and D2 branes on a single D6 brane to the non-commutative Donaldson-Thomas theory. We studied the moduli space of solutions to the F-term and D-term constraints of the quiver gauge theory which arises as the low energy limit of the brane configuration. We found the direct correspondence between the gauge theory moduli space and the space of modules of the factor algebra of the path algebra for the quiver diagram quotiented by its ideal related to the F-term constraints, subject to a stability condition to enforce the D-term constraints. Using this correspondence, we found a new description of BPS bound states of the D-branes in terms of the statistical model of crystal melting. The crystalline structure is determined by the quiver diagram and the brane tiling which characterize the low energy effective theory of D-branes. The crystal is composed of atoms of different colors, each of which corresponds to a node of the quiver diagram, and the chemical bond is dictated by the arrows of the quiver diagram. BPS states are constructed by removing atoms from the crystal. We naturally encounter the wall crossing phenomena, the theme of the second half of this paper, by studying the relation between the commutative and non-commutative Donaldson-Thomas invariants. The degeneracy of D-brane bound states changes when the value of θ, used to define the stability condition, which is the wall crossing phenomena discussed in Section 2.2 ao . The jump in the degeneracy can be computed by the wall crossing formula 47,46 , and if we start from a particular chamber and apply the wall crossing formula, we can obtain the value of χ(M N i (A)) in any chamber we want. We will see this explicitly in the conifold example in Section 6. As will be discussed there, wall crossing relates non-commutative Donaldson-Thomas invariants to commutative Donaldson-Thomas invariants and to new invariants defined by Pandharipande and Thomas 142 . This story is further generalized by Ref. 82 when ∆ has no internal lattice point.
It has been proven recently that the topological string theory is equivalent to the commutative Donaldson-Thomas theory for a general toric Calabi-Yau manifold 75,79 . Since the commutative Donaldson-Thomas theory count BPS states for some choice of stability condition, is indeed true in some chamber. On the other hand, our result shows that the relation,

37)
ao The FI parameters θ is a function of the Kähler moduli.
holds in another chamber, where Z ′ BH is the BPS state counting for another choice of the stability condition. Combining these two results, we find that the topological string theory and the statistical model of crystal melting are related by the wall crossing, and we have Since there is no wall crossing phenomenon between the commutative and noncommutative Donaldson-Thomas theory on C 3 , this result does not contradict with Ref. 75, where a direct identification of the topological string theory and the crystal melting is made for C 3 . In general, we expect that a proper understanding of the relation between the topological string theory and the crystal melting requires that we take the wall crossing phenomena into account. This motivates the study of wall crossing phenomena in part II.

Thermodynamic Limit
In this section we study the thermodynamic limit of the crystal melting model defined in the previous section. This section is based on the work 35 .

Overview: Why Thermodynamic Limit?
In the previous section we have seen that the BPS counting problem is beautifully solved by the crystal melting model, making an explicit computation possible. However, the question still remains whether the crystal expansion is just a technical tool to obtain the answer, or whether it has much deeper significance. There is one notable feature of the crystal melting model: it is a strong coupling expansion with respect to the (topological) string coupling constant. In the usual string theory, we consider a perturbative, weak coupling (g s ≪ 1) expansion whereas the crystal expansion gives where we used the parameter identification (3.34), which holds for any toric Calabi-Yau manifold. Due to the exponential factor, this expansion is good when g s ≫ 1. This in particular means that crystal melting provides a tool to study the physics at the Planck scale ap . When g s is small, as is usually the case, the string scale l s is ap The following explanation is a bit imprecise in that gs here is the topological string coupling, and is different from the physical string coupling constant which really determines the relation between the string scale and the Planck scale. However, the topological string theory is relevant for counting of microstates of black holes in the superstring theory 19 , and we expect that our result sheds some light on quantum nature of spacetime in the superstring theory also. larger than the Planck scale l p . This means that we see stringy corrections first, and quantum corrections are obscured. When g s is large, however, l s is smaller than the Planck scale l p kicks in first. This means that we can explore the 'quantum' aspects of geometry.
The natural question is to understand the relation between the two descriptions. In this section, following the result of Ref. 35 we will show how the smooth Calabi-Yau geometry emerges from the discrete structure of the crystal melting model in the limit g s → 0. Since g s is the chemical potential for the total number of atoms removed, g s → 0 means that we are in the thermodynamic limit (high temperature limit), where an infinite number of atoms are removed. It is reasonable to expect that a classical geometric picture emerges in the limit of large D0 and D2 charges since it can represent a large black hole in the superstring theory. The corresponding thermodynamic limit in the dimer model was studied in Ref. 143. There are two main results proved in this section. First, the limit shape (see Fig. 15) of the crystal in the thermodynamic limit coincides with a projection (amoeba) of the mirror Calabi-Yau manifold. . Limit shape of the crystal, in the C 3 example. In the thermodynamic limit, the boundary of the molten region (where the atoms are taken away) becomes a smooth curve, which is called the limit shape. The claim is that this curve is the same as the amoeba of the mirror curve, which is shown in Fig. 17 This is proven as follows. A toric Calabi-Yau 3-fold X is a Kähler quotient of C F +3 by U (1) F , and its mirror manifold X is defined by the polynomial equation 144,132 , Here P (z, w) is a Newton polynomial of the form, and c i (t)'s are functions of the Kähler moduli t of the original toric 3-fold X.
The exponents (n i , m i ) ∈ Z 2 correspond to lattice points of the toric diagram. For example, for the mirror of C 3 , P (z, w) is given by and for the mirror of the resolved conifold In this section, we will show that the Newton polynomial P (z, w) for the mirror of a Calabi-Yau manifold is identical to the characteristic polynomial of the corresponding dimer model, which is the partition function of the model on a torus. The relation between P (z, w) and the characteristic polynomial had been discussed earlier in Ref. 104. Here, we will prove their precise equality including the dependence on the moduli t. As discussed in Appendix A.1, the dimer model is equivalent to the crystal melting model discussed in the previous section. Since we can show from the result of Ref. 143 that the amoeba of the characteristic polynomial gives the limit shape of the crystal, this proves our result.
As the second important result in this section, we will show that the partition function of the dimer model evaluated in the thermodynamic limit is equal to the genus-0 limit of the partition function of the topological string theory on X. As discussed in Section 3.6, the dimer model has been formulated to describe the noncommutative Donaldson-Thomas theory 33,34 , while the topological string theory for a general toric Calabi-Yau manifold is equivalent to the commutative Donaldson-Thomas theory 76 , as shown by Ref. 79. Despite the non-trivial wall crossing factors between the two theories discussed in Section 3.6, the thermodynamic limit of the crystal partition function gives the topological string partition function.
Our results suggests that the atoms in the crystal are a discretization of the Calabi-Yau geometry at the Planck scale, and the thermodynamic limit is a process where a smooth geometry emerges from a collection of such discretized piece of the geometry. The emergence of Calabi-Yau geometry from the thermodynamic limit has been observed in Ref. 55 in the case of C 3 , and is interpreted in Ref. 75 from the viewpoint of Kähler gravity Ref. 145. In this section, we make the connection sharper and more explicit by showing the direct connection between the partition functions of the crystal melting model and the topological theory for a general toric Calabi-Yau 3-fold.

Thermodynamic Limit of the Crystal Melting Model
The main object of study in this section is the partition function, where Ω(n, β) is the Witten index for bound states of n D0 branes and β = (β I ) D2 branes on the I-th 2-cycle (I = 1, ..., dim H 2 (M )) with a single D6 brane on a toric Calabi-Yau manifold. According to the dictionary in the previous section, the Witten index is equal (up to a sign) to the number of molten crystal configurations where n is the total number of atoms removed, whereas the relative numbers of different types of atoms removed from the crystal are specified by β I 's. The variables g s and t I are chemical potentials for D0 and D2 charges, and as we have seen in (3.21) aq we will identify g s as the topological string coupling constant and t I as the Kähler moduli of the toric Calabi-Yau manifold X. The behavior of Z as g s → 0 can be evaluated by the result of Ref. 143. Consider a finite covering the original quiver diagram, N times in one direction and N times in another direction on T 2 . N is introduced as an infrared regulator, and we will take N → ∞ at the end of the computation so that we have the dimer model on the plane R 2 . The surface of the crystal is determined by the height function h over the plane. To define h, we start with the canonical perfect matching m 0 of the dimer model corresponding to the initial crystal configuration with no D0 or D2 charges (in this section, we heavily use the language of dimer models, whose equivalence with crystal melting is explained in Appendix A.1.). For any other perfect matching m, the superposition of m 0 and m gives a set of closed loops on the dimer graph. If m corresponds to a bound state with finite D0 and D2 charges, m and m 0 differ only in a finite region on the graph. The value of the height function h at i-th node of the N × N cover is defined so that it is 0 far away from the region where m and m 0 differ, and it increases by 1 every time we cross a closed loop as we move inside of the region (see Fig. 37 for an example). The corresponding molten crystal configuration is obtained by removing h(i) atoms of the initial crystal over the node i. In particular, where n is (as before) the D0-brane charge, or equivalently the total number of atoms removed.
To take the thermodynamic limit, it is useful to introduce the Cartesian coordinates (x, y), 0 ≤ x, y ≤ 1, on the N × N covering of T 2 . In the limit where g s ≪ 1 and 1 ≪ N , the height h(i) becomes a smooth function h(x, y). We rescale the aq For simplicity we here neglect the sign in (3.21).
height function by the factor of 1/N so that to take into account the large N scaling of the partition function discussed in Ref. 146 and quoted as Theorem 2.1 in Ref. 143 ar . The statistical weight in the thermodynamic limit is given by an integral of a surface tension σ(∂h), which is a function of the gradient of h, as as The integral of g s N h(x, y) in the exponent comes from the weight factor e −gsn in (4.2), and we used (4.9). Note that interestingly the combination g s N appears, which is the 't Hooft parameter. In the thermodynamic limit, we look for a height function h(x, y) which maximize the exponent.
In order to derive the macroscopic surface tension from the microscopic crystal melting model, we need a few definitions. We first define a characteristic polynomial P (z, w) as the partition function per fundamental domain, i.e. the sum of perfect matchings with weights assigned to edges of the dimer model on T 2 143 . The parameters z and w specify the height difference in the language of dimer models.
Let us explain the meaning of parameters z and w in more detail, using the Suspended Pinched Point shown in Fig. 16 as an example. In this example, the bipartite graph has 7 edges and 6 perfect matchings. When we denote the weight for the i-th edge by e wi , the characteristic polynomial is given by e w5+w7 + e w2+w5 + e w4+w7 + e w2+w4 + e w3+w6 + e w1+w3 . (4.11) This is a function of seven variables, but there is a redundancy in the description. We call this redundancy "gauge symmetry". For example, we can simultaneously multiply by a constant c all the weights for edges incident to the vertex a (i.e. w 1 , w 4 , w 5 , w 6 ), and the partition function stays the same up to the overall multiplication; this is because every perfect matching has exactly one edge incident to vertex a. This means that we can use this gauge degrees of freedom to set w 5 = 0. If we repeat the similar procedure for the other vertices, we can also set w 3 = w 7 = 0, and we have fixed all gauge degrees of freedom. The characteristic polynomial now simplifies to 1 + e w2 + e w4 + e w2+w4 + e w6 + e w1 . Instead to introducing redundant variables with gauge symmetry as above, we can be more economical and express this result in terms of gauge invariant variables.
ar This statement is consistent with our intuition that the height diverges in the same order as the size of the enlarged torus. as Here we only show the gs dependence explicitly and the dependence on the Kähler moduli t I is in σ. The gauge invariant observables are given by the "magnetic flux" 143 . To define this, let us fix an oriented loop γ We then define the magnetic flux along γ to be where w (wi,bi) is the weight assigned to an edge (w i , b i ) connecting a white vertex w i and a black vertex b i . This is clearly gauge invariant. In general, when we denote the number of faces of the bipartite graph by F (this is the same as the number of nodes of the quiver diagram), we have F + 1 independent gauge invariants: 2 of them comes from α and β-cycles of the torus, and F − 1 comes from the flux around each of the F faces, with one condition that the sum of the fluxes of all faces sum up to zero. In the Suspended Pinched Point example, we have F + 1 = 4 independent parameters, and correspondingly we define where the parameters z and w correspond to the fluxes along the α and β-cycles, and t 1 and t 2 to those along cycles around a face. In these variables the previous equation (4.12) becomes (after setting w 3 = w 5 = w 7 = 0 as before) (4.14) GivenP (z, w), we next define its Ronkin function 147 R(x, y) by The integrand in this definition diverges when P (e x+iθ , e y+iφ ) = 0, however the function itself is well-defined. To see this, let us compute the its derivative: This can be evaluated as a residue integral. For example, suppose that (x, y) is outside amoeba at , which is a subset of R 2 defined by au Amoeba = {(x, y) ∈ R 2 : P (e x+iθ , e y+iφ ) = 0 for some (θ, φ)}. Then the only pole contributing to (4.16) is located at infinity. When the leading contribution ofP (z, w) at infinity is given by z m w n , we can easily obtain (∂ x R(x, y), ∂ y R(x, y)) = (m, n). In other words, Ronkin function is linear in the complement of amoeba 147,152 . Let us here give the simplest example: C 3 , whose toric diagram is given in Fig. 17 (a). The characteristic polynomial is given by and its amoeba is shown in Fig. 17 (b). The derivatives of the corresponding Ronkin function are computed to be , and their plots are given in Fig. 18. Note that the derivatives of the Ronkin function takes a constant value at each complement of amoeba, as expected.
(a) Ronkin function (b) gradient of Ronkin function We now come back to the thermodynamic limit of the partition function (4.10). The reason we introduced the Ronkin function of the characteristic polynomial is that the surface tension σ(∂ x h, ∂ y h) is the Legendre transform of the Ronkin (4.22) The first step in relating the dimer model to the topological string theory is to show that the characteristic polynomial P (z, w) of the dimer model is equal to the Newton polynomial P (z, w) (4.4) for the mirror Calabi-Yau manifold (4.3), (4.23) According to Ref. 112, there is a one-to-one correspondence between perfect matchings of the dimer model on T 2 and bi-fundamental fields of gauged linear sigma model appearing in the Kähler quotient construction of the toric Calabi-Yau manifold X. They are then related, by change of variables described in Ref. 112, to lattice points of the toric diagram and to terms z ni w mi in the Newton polynomial (4.4). This shows that there is a one-to-one correspondence between terms in P (z, w) andP (z, w), as pointed out by Ref. 104. Furthermore we can show that their coefficients agree. The Kähler moduli of X are the Fayet-Iliopoulos (FI) parameters of the quiver quantum mechanics. According to the dictionary between quiver gauge theories and dimer models (Section 3.2), FI parameters are associated with nodes of the quiver diagram, or equivalently to faces of the dimer model. Thus, we can identify the FI parameters with the magnetic fluxes through faces of the dimer model (4.13), which parametrize the energy of each perfect matching of the dimer model (recall the example of the Suspended Pinched Point discussed previously; there the magnetic fluxes along faces are denoted by t 1 and t 2 ). Each perfect matching appears in P (z, w) with the weight given by an exponential of the fluxes. On the other hand, the Newton polynomial is a sum of z ni w mi , each of which corresponds to a lattice point of the toric diagram and is weighted by an exponential of the Kähler moduli t 144 . We have verified that the weight for perfect matchings and the weight for lattice points of the toric diagram agree, and this proves the identity (4.23).
Combining (4.10) and (4.22) and discarding a term in total derivative in (x, y), which is justified by the subtraction of the linear piece in R(x, y) discussed in the av Let us given a rough outline of why the Ronkin function arises here. (4.10) shows that in the thermodynamic limit the surface tension is related to 20) where Z N is defined for dimer model with fundamental domain enlarged by N × N . Now since the characteristic polynomial can be written as a determinant of the Kasteleyn matrix 153 it follows that 143 Plugging (4.21) into (4.20), the product is turned into a Riemann sum, which is nothing but the integral in the definition of the Ronkin function in (4.15).
next paragraph, we find By rescaling (x, y) by the factor of g s N/2, this becomes Note that the N dependence has disappeared except that the range of the (x, y) integral has been rescaled by the factor of g s N/2. For N → ∞ with small but fixed g s , we have an integral over the whole (x, y) plane. The integral (4.24) in the large N limit is divergent. To identify and subtract the divergent part, we use the amoeba of the characteristic polynomial defined in (4.18). In the thermodynamic limit, the amoeba corresponds to the liquid phase of the crystal 143 aw . If there are no interior points in the toric diagram, the complement of the amoeba is the solid phase, where the crystal retains its original shape. There, the Ronkin function R(x, y) is linear. If there are interior lattice points in the toric diagram, the amoeba acquires holes, inside of which are in the gas phase, where the Ronkin function is again linear but the slope of the crystal surface is different from the original one. The integral (4.24) becomes finite if we subtract the linear piece of the Ronkin function in the solid phase so that the partition function is normalized to be 1 for the initial crystal configuration.

Topological String at Genus 0
Our next task is to compute the genus-0 topological string partition function F 0 of the toric Calabi-Yau manifold X and compare it with the thermodynamic limit of the partition function of the crystal melting model (4.24). For this purpose, it is convenient to use the mirror Calabi-Yau manifold X defined by the equation (4.3) since F 0 can be evaluated by the classical period integral as, where Ω is the holomorphic 3-form on the mirror, and C 0 is the Lagrangian 3-cycle which is the mirror of the 6-cycle filling the entire toric Calabi-Yau manifold. According to the microscopic derivation of the mirror symmetry by Hori and Vafa 144 , the sigma-model on the toric Calabi-Yau manifold is equivalent to the aw The paper Ref. 143 gives three different phases of the dimer model: solid, liquid and gas. In the solid phase (frozen phase), the height difference between points arbitrary far away are deterministic. Non-solid phases are classified into either a gas phase (rough phase) or a liquid phase (smooth phase) depending on whether or not the height difference between the two point is bounded independently of the choice of the points. It was shown in Ref. 143 that an unbounded exterior region, an interior region and a bounded exterior region of the amoeba correspond to a solid, liquid and gas region, respectively. Landau-Ginzburg model with the superpotential W (u, x, y) = e u P (e x , e y ). (4.26) It was shown in Ref. 132 that an integral of e W in a 3-dimensional subspace of the (u, x, y) plane can be transformed into a period integral of the holomorphic 3-form Ω on the mirror Calabi-Yau manifold. Thus, we should be able to evaluate (4.25) as an integral of e W . To do so, we need to identify the contour of the integral.
Since g s and t I 's in (4.2) are taken to be real in the dimer model, the Newton polynomial P (x, y) in our case is with real coefficients. The mirror manifold (4.3) has the complex conjugation involution, and thus the fixed point set is a natural candidate for C 0 . In fact, following the mirror symmetry transformation as described in Ref. 144, we find that the 6-cycle of the original toric Calabi-Yau manifold X corresponds to the real section in the (u, x, y) space in the mirror X. Thus, we find (4.27) The divergent part of the integral in the (x, y)-plane can be removed by subtracting a linear term in ln P (e x , e y ) for x, y → ∞ as we did for (4.24). The integral (4.27) is almost equal to the exponent of the partition function (4.24) of the crystal melting model, except that we do not have the averaging over the phases (θ, φ) to define the Ronkin function as in (4.15). It turns out that the integral over (x, y) in (4.27) removes the dependence on (θ, φ), and thus the averaging process is not necessary. To see this, let us define a generalization of F 0 for an integral of (x, y) with arbitrary phases as F (θ, φ) = dxdy ln P (e x+iθ , e y+iθ ). (4.28) Taking derivatives of F with respect to (θ, φ), we find the integrand becomes a total derivative in (x, y) as in If we choose (α, β) so that it is not in the directions of the tentacles of the amoeba (4.18), the boundary term is removed by the regularization and we find (α∂ θ + β∂ φ )F = 0. Since α, β is arbitrary except in the directions of tentacles of amoeba, F is independent of (θ, φ) and agrees with its average. Namely, Thus, we found that the thermodynamic limit of the partition function of the crystal melting model given by (4.24) is equal to exp(− 4 g 2 s F 0 ), which is the genus-0 partition function of the topological string theory. This is what we wanted to show.
The fact that that crystal melting gives the topological string theory in the thermodynamic limit, despite the non-trivial wall crossing phenomena between the two, poses a puzzle. We will see later in Section 5 how this puzzle is solved in the analysis of the wall crossing phenomena.

Wall Crossing and M-theory
In section 3 we succeeded in computing the BPS partition function as a statistical partition function of crystal melting. However, the crystal melting gives only an expansion of the BPS partition function, and whether the partition function can be expressed in a closed expression is a different issue. In Section 3.5, we have seen that in the example of the resolved conifold the BPS partition function takes a simple expression, which is essentially a square of the topological string partition function. The question we would like to address in this section is to understand this curious fact. Interestingly, this also gives a nice intuitive derivation of the wall crossing phenomena. This section is based on the results of Ref. 57.

Overview: Topological Strings and Wall Crossings
Since one of the goals of this section is to relate the BPS partition function with the topological string partition function, let us begin with an overview of topological string theory.
The topological string theory gives solutions to a variety of counting problems in string theory and M-theory (see Refs. 154, 155, 156 for review). From the worldsheet perspective, the A-model topological string partition function Z top generates the Gromov-Witten invariants, which count holomorphic curves in a Calabi-Yau 3-fold X. On the other hand, from the target space perspective, Z top computes the Gopakumar-Vafa (GV) invariants, which count BPS states of spinning black holes in 5 dimensions constructed from M2 branes in M-theory on X 60 . Moreover, the absolute-value-squared |Z top | 2 has been related to the partition function of BPS extremal black holes in 4 dimensions, which are bound states of D-branes in type II string theory on X 19 .
The topological string partition function Z top also counts the numbers of D0 and D2 brane bound states on a single D6 brane on X, namely the Donaldson-Thomas (DT) invariants defined in Refs. 76,77 . The relation between the Gopakumar-Vafa invariants and DT invariants was suggested and formulated in Refs. 75, 78, and its physical explanation was given in Ref. 59 using the 4D/5D connection 58 . More recently, a mathematical proof of the GV/DT correspondence was given in Ref. 79 when X is a toric Calabi-Yau 3-fold.
However, the number of BPS states has background dependence. As we vary moduli of the background geometry and cross a wall of marginal stability, the number can jump (this is the wall crossing phenomena discussed in 2.2). This means that the Kähler moduli is implicitly assumed in most of the above computations, and we need to understand at which value of the Käher moduli the statement holds and what happens if we change the value of the moduli.
In this section we will generalize the results of Ref. 59 to include the background dependence of the M-theory computation. We show BPS bound states are organized into a free field Fock space, whose generators correspond to BPS states of spinning M2 branes in M-theory compactified down to 5 dimensions by a Calabi-Yau 3-fold X. This enables us to write the generating function Z BPS of BPS bound states of D-branes as a reduction of the square of the topological string partition function, The rest of this section is organized as follows. In Section 5.2, we will explain the basic idea: to use M-theory to count bound states of a single D6 brane with D0 and D2 branes on a Calabi-Yau 3-fold. In Section 5.3, we will describe the counting procedure in more detail and derive the generating function for the numbers of BPS bound states using a free field Fock space in any chamber of the background Kähler moduli space. In Section 5.4, we will compare the Fock space picture with the known results for the the resolved conifold and its generalizations. We also discuss in Section 5.5 the representation of the wall crossing phenomena in the language of the crystal melting model.

The Basic Idea
In this section we will explain the basic idea. We will apply this idea, in the following sections, to find a concrete expression for BPS state degeneracies in various chambers for Calabi-Yau 3-folds with no compact 4-cycles. As we will see, this technical assumption about compact 4-cycles will ensure that M2 brane particles are mutually BPS, and thus the partition function takes an infinite product form ax .
We are interested in counting the BPS partition function of one D6 brane bound to an arbitrary number of D2 and D0 branes. The idea is the following: In M-theory, the D6 brane lifts to the Taub-NUT space with the unit charge. D2 branes are M2 branes transverse to the S 1 , and D0 branes are gravitons with Kaluza-Klein momenta along the S 1 . The Taub-NUT space is an S 1 fibration over R 3 , and S 1 shrinks at the position of D6. Thus the problem of finding bound states to the D6 brane becomes simply the problem of finding BPS states in the Taub-NUT geometry. Suppose we have BPS states for flat R 4,1 background. Then for each such BPS state we can consider the corresponding possible BPS states in the Taub-NUT geometry. For each single particle BPS state we can consider its normalized wave ax See Ref. 158 for cases with compact 4-cycles.
functions in this geometry. Such states would constitute BPS states which in the type IIA reduction correspond to BPS particles bound to the D6 brane. However, this would only constitute single particle BPS states bound to the D6 brane.
Now consider multiple such particles in the Taub-NUT background. This problem may sound formidable, because now we will have to consider the interaction of such particles with each other and even their potentially forming new bound states. We will now make the following two assumptions: Assumption 1: We can choose the background moduli of Calabi-Yau as well as the chemical potential so that a maximal set of BPS states have parallel central charge and thus exert no force on one another. Therefore, at far away separation, the bound states correspond to single particle wave function in the Taub-NUT geometry. To satisfy assumption 1, we need to make sure that differently wrapped M2 branes all have the same phase for Z. This in particular means that we need to choose the Kähler classes so that the 2-cycles of Calabi-Yau have all shrunk to zero size, i.e. A(M 2) = 0 for all the classes. Even though this may sound singular and it could lead to many massless states, by turning on the C(M 2) we can avoid generating massless states in the limit. The condition that different states have the same central charge is simply that Note that, in going to type IIA, this condition is simply the statement that the B fields are turned on along 2-cycles of Calabi-Yau and the M2 branes wrapping them will have B(D2) 0 branes induced. Moreover n, being the momentum along the Taub-NUT translates to D0 brane charge and as long as the net number of 0 branes is positive, they correspond to BPS states of the same type, i.e. preserving the same supersymmetry. Now we are ready to put together all these mutually BPS states as a gas of particles in the Taub-NUT geometry. By the fact that they are mutually BPS, they will exert no force on one another. Moreover, as long as they are far away, we can simply consider the product of the individual wave functions. One may worry what happens if they come close together. Indeed they can form bound states, but that is already accounted for by including all single particle bound states of M2 brane. Here is where the assumption 2 becomes important: If we in addition had 4-cycles, then wrapped M5 branes along 4-cycles, which also wrap the S 1 of Taub-NUT can now form new bound state with the gas of M2 brane particles on the Taub-NUT ba . But in the absence of 4-cycles of Calabi-Yau, we can simply take the single particle wave functions (taking their statistics into account) and write the total degeneracy of such BPS states, by taking suitable bosonic/fermionic creation operators, one az Note that C(M 2) is periodic with period 1/R. To see this, note that we can view it as a holonomy of the gauge field obtained by reducing the 3-form on the 2-cycle of Calabi-Yau, around the Taub-NUT circle. The holonomy of a gauge field on a circle of radius R is periodic, with period 1/R. In terms of the IIA quantities, we have where B(D2) is the NS-NS B-field through the 2-cycle in IIA on the Calabi-Yau wrapped by the corresponding D2 brane (which has periodicity B → B + 1). We are denoting by 1/R the central charge of the D0 brane. As such, it does not have to be positive, and in fact it does not have to be real either. A better way to think about this is that the quantity we denote by 1/R is proportional, up to a complex constant, to the inverse radius of the M-theory circle. For simplicity of the notation, we will identify the two, but this fact has to be kept in mind. Note also that relative to Ref. 53 we are keeping the D6 brane charge fixed (for example, to Z(D6)=1), and varying the D0 and D2 brane central charges. ba From gravity viewpoint, we have black strings.
for each state satisfying C(M 2) + n/R > 0. Finally, while the assumption 1 is satisfied only for special backgrounds where A(M 2) vanishes, the degeneracies are guaranteed to be the same everywhere within a given chamber, and are independent of this choice. This is all we need to compute all the degeneracies of BPS states in various chambers as we will show in the following sections.

BPS State Counting and Wall Crossing
We will use this section to spell out, in a little more detail, how to use M-theory to compute the degeneracies of one D6 brane on X bound to D2 branes wrapping 2-cycles in X and D0 branes. The D6-D2-D0 partition function is the Witten index bb of the theory on where we have compactified the Euclidean time on a circle of radius ǫ. The type IIA geometry with one D6 brane lifts to to M-theory on where the asymptotic radius of the Taub-NUT circle R is related to IIA string coupling. Since the D6 brane is geometrized, the computation of the BPS bound states of D2 branes and D0 branes with D6 brane lifts to a question of computing the degeneracies of M 2 branes with momentum around the Taub-NUT circle. Suppose we know the degeneracies of M-theory in the This corresponds to taking the R → ∞ limit, where the Taub-NUT just becomes R 4 (Fig. 19). As is clear from the previous section, at fixed B the degeneracies are unchanged by varying R since no states decay in the process -all the central charges simply get re-scaled. Thus, the knowledge of these allows us to compute the degeneracies on X×Taub-NUT×S 1 background as well.
The Kaluza-Klein momentum around the Taub-NUT circle gets identified, in terms of the theory in the R → ∞ limit, with the total spin of the M2 brane. This can be understood by comparing the isometries of the finite and the infinite R theory, as explained in Ref. 59. We can view taking R to infinity as zooming in to the origin of the Taub  Each such 5D BPS particle can in addition have excitations on R 4 . Namely, for each 5D particle we get an analytic field Φ(z 1 , z 2 ) on R 4 with z 1,2 as the complex coordinates. In the usual way, the modes of this field correspond to the ground-state wave functions of the particle with different momenta on R 4 . (We are suppressing a Gaussian factor that ensures the wave functions are normalizable). Since U (1) ⊂ SU (2) L acts on z 1 , z 2 with charge 1, the particle corresponding to carries, in addition to the M2 brane charge β and intrinsic momentum m, a total angular momentum bc .
Which of these 1-particle states are mutually BPS? The answer depends on the background, and a priori, we need to consider particles in four dimensions coming from both the M2 branes and the anti-M2 branes in M-theory. Along the slice in the moduli space we have been considering, the central charges of the particle with M2 brane charge β and total spin n is where C(β), B(β) are the C-field (B-field) flux through the 2-cycle β. The states with all preserve the same supersymmetry and bind to the D6 brane (we could have picked the opposite sign, and than the particles would bind to anti-D6 branes). See Fig. 20 for illustration. Note that although all the D0/D2 particles are mutually BPS, they preserve different supersymmetry from that of the D6-brane, which is why we have a stable bound state. It is easy to analyze the condition (5.9). For example, for along side M2 branes with β > 0, and for sufficiently large n also the anti-M2 branes with β < 0 have positive Z > 0 and contribute to the BPS partition function. So in general we need to consider both signs of β. It is important to note that the degeneracies N m β of the 5D particles are independent of the background. The choice of background only affects which half of the supersymmetry the states preserve. Now, we can put these all together and compute the BPS partition function in a given chamber. Simply, in each chamber, the BPS partition function is the character in the Fock space of single particle states preserving the same supersymmetry! In fact, a useful way to go about computing the partition function is in the following steps: Step 1. Start with the unrestricted partition function -the character in the full Fock space. The oscillators of charge β and intrinsic spin m and arbitrary 4d momenta contribute a factor In addition, both the M2 branes, and the anti-M2 branes contribute, and the total character is Step 2. The 5d degeneracies N m β of M-theory on X × R 4,1 are computed by the topological string partition function on X 60,61 . This allows us to write In particular, the knowledge of topological string amplitude allows us to compute the BPS degeneracies in any chamber. The topological string partition function has an expansion where q and Q are determined by the string coupling constant g s and the Kähler moduli t by q = e −gs and Q = e −t bd . The MacMahon function M (q) was defined bd As compared with (3.34), we are here absorbing the minus sign in (3.34) into the definition of q. We will use this notation throughout the rest of this paper. Of course, the topological strings partition function itself is the same in both notations.
previously in (3.32), and χ(X) is the topological Euler characteristic of X. Note that topological string involves only the M2 states with positive β > 0. On the other hand, the full Fock space includes also anti-M2 branes. Since M2 branes and anti-M2 branes are CPT conjugates in 5d, this gives another factor of Z top with Q → Q −1 .
Note that we also have states with β = 0. These are the pure KK modes, the particles with no M2 brane charge. To count the number of BPS states of this type, we note that, for each R 4 momentum (ℓ 1 , ℓ 2 ) we get a classical particle whose moduli space is the Calabi-Yau X. Quantizing this, we get a particle for each element of the cohomology of X. On a (p, q) form SU (2) R acts with the Lefshetz action, and SU (2) L acts trivially. We get that m R eigenvalue of a (p, q) form on X is m R = p + q − 3. Therefore, the pure KK modes contribute with N β=0 = −χ(X). This agrees with the power of the MacMahon function M (q) we get from Z top (q, Q)Z top (q, Q −1 ).
Step 3. We identify the walls of marginal stability as places where, the central charge vanishes be for one of the oscillators contributing to Z top (q, Q) or Z top (q, Q −1 ).
Step 4. In any chamber, the BPS partition function is a restriction of Z Fock to the subspace of states that satisfy Z(β, n) > 0 in that chamber.
There is a simple way to keep track of the chamber dependence. For the bookkeeping purposes, it is useful to identify the central charge with the chemical potentials. Then, in a given chamber, the BPS states are those for which q n Q β < 1 (5.16) where n = l+m = ℓ 1 +ℓ 2 +m is the total spin (5.7). As we vary the background, and cross into a chamber where this is no longer satisfied for some (n, β) in Z top (q, Q) or in Z top (q, Q −1 ), we drop the contribution of the corresponding oscillator.
For example, consider some special cases. When for all Kähler classes, Z(β, n) = (βB + n)/R > 0 implies that In this case, only M2 branes contribute to the partition function. This is the chamber discussed in Ref. 59. By taking the limit (5.17) in (5.15), we find be This is a degenerate limit of (2.16).
The partition function in this chamber computes DT invariants. In Ref. 79, it was shown that, for a toric Calabi-Yau, Z BPS is equal to Z top up to a factor which depends only on q. Here we derived the relation between Z BPS and Z top including the factor of M (q) χ(X)/2 . On the other hand, when 0 < B ≪ 1, the BPS partition function is given by This gives the non-commutative DT invariants studied in Section 3. When X is toric, the partition function is computed by the crystal melting picture 34,32 , generalizing the previous result of Refs. 55,75 for C 3 . In Section 4, we have seen that the thermodynamic limit of the partition function of the crystal melting model gives the genus-0 topological string partition function. This result was mysterious since the relation between Z top and Z BPS was supposed to hold in the DT chamber discussed in the previous paragraph, not in the NCDT chamber. We now understand why there is such a relation in the non-commutative DT chamber also as in (5.19).

Examples
In this section we give some examples of geometries without compact 4-cycles. We first study toric cases, namely resolved conifold and generalized conifolds. We also give a simple example of a non-compact, non-toric Calabi-Yau manifold as well.
In each of these cases, we will use our methods to lay out the chamber structure, identifying walls where BPS states jump, and the BPS partition function in each chamber. In some of the cases we study, the jumps were studied by other means. We will show that they agree with the M-theory results.

Resolved Conifold
The topological string partition function for the resolved conifold was given previously in (3.33), which means that the only non-vanishing Gopakumar-Vafa invariants are and that all BPS states in 5 dimensions has no intrinsic spin 60,61 . Our formula (5.15) then implies that BPS states are counted by The product is over β = 0, ±1 and n = 1, 2, ... such that Z(β, n) > 0. The chamber structure is easy to identify in this case since the Kähler moduli space is one-dimensional. When R > 0 and m − 1 < B < m (5.22) with some m ≥ 1, the formula (5.21) gives In particular, the chamber at m = ∞ counts the DT invariants 76 , while the chamber at m = 1 counts the non-commutative DT invariants 33 , On the other hand, when In particular, the chamber at m = ∞ counts the Pandharipande-Thomas invariants 142 , Summarizing, wall crossing of the resolved conifold is essentially a onedimensional problem (see Fig. 21) bf . For later reference, we defined by chamber Fig. 21. Chamber structure for the resolved conifold. The charge γ 2 for the decay pattern γ → γ 1 + γ 2 is shown for each wall.
bf Strictly speaking, only half of the chambers are shown in Fig. 21. There are also chambers for the flopped geometry, which correspond to R > 0, −n − 1 < B < −n and R < 0, n − 1 < B < n. This means that the there are two different ways to go from the core region to the NCDT chamber, and the chambers actually line up on the S 1 , rather than on R as depicted in Fig. 21.
C n and C n as a region where R < 0, −n − 1 < B < −n and R > 0, n − 1 < B < n, respectively. The partition function is trivial in the chamberC 0 (the so-called core region 47 ), and each time we cross the wall we obtain one factor. On the left most side, we have Z NCDT (q, Q) = Z top (q, Q)Z top (q, Q −1 ).
As we will see in the next section, these results agree with the predictions from the wall crossing formula in all chambers.

Toric Calabi-Yau without Compact 4-cycles
We can also test our formula (5.15) for a more general toric Calabi-Yau without compact 4-cycles. A toric Calabi-Yau is characterized by a convex polygon on a square lattice, and the absence of compact 4-cycles means that there is no internal lattice point in the polygon 30,31 . By SL(2, Z) transformations of the lattice, one can move one of the edges of the polygon along the positive x-axis, and one of the vertices to (x, y) with −y < x ≤ 0. If we require that there is no internal lattice point, there are essentially two possibilities: (x, y) = (0, 1) and (0, 2). In the former case, the polygon is a trapezoid of height 1, and the corresponding Calabi-Yau is the so-called generalized conifold, which has L − 1 P 1 's where L is the area of the trapezoid. We will describe the resolved geometry in more detail below. In the latter case, we have a isosceles right triangle with two legs of length 2, which corresponds to C 3 /Z 2 × Z 2 .
For the generalized conifold, the topological string partition function has been computed in Ref. 161 using the topological vertex 56 . The counting of BPS states has been carried out in all chambers in Ref. 82. Thus, we will use this case to test our formula (5.15). For C 3 /Z 2 × Z 2 , the counting in the non-commutative DT chamber has been done in Ref. 81.
Homology 2-cycles of the generalized conifold correspond to the simple roots α 1 , · · · , α L−1 of the A L−1 algebra. To identify them in the toric diagram, we divide the trapezoid into L triangles of area 1 and label the internal lines dividing the triangles as i = 1, · · · , L − 1. Each line i corresponds to the blowing up P 1 at α i . We will denote the D2 charge by In general, there are several ways to divide the trapezoid, and they correspond to different crepant resolutions of the singularity. If the two triangles across the line i form a rhombus, we have a resolution by O(−1, −1). On the other hand, if the two triangles form a triangle of area 2, the resolution is by O (−2, 0). Both the topological string partition function and the BPS counting depend on the choice of the resolution. The topological string partition function for this geometry is given by where

A Non-toric Example
Our discussion in Section 5.2 and 5.3 are not limited to toric Calabi-Yau's, and applies to any Calabi-Yau without compact 4-cycles. In order to illustrate this point in a concrete setting, let us describe the geometry shown in Fig. 22. This geometry arises by identifying two of the four external legs of the (p, q)-web of the resolved conifold. This is one of the simplest the non-toric (albeit formally toric) geometries studied in Ref. 162, and it is straightforward to repeat the following analysis to other non-toric geometries discussed in Ref. 162. In addition to the P 1 of the resolved conifold, the geometry of Fig. 22 has another compact P 1 which arises from identification. Let us denote their homology classes by β original and β new , respectively. As a basis of the homology class, we choose β 1 = β original and β 2 = β original + β new .
The topological string partition function is given by 162 where Q 1 and Q 2 are the variables corresponding to β 1 and β 2 . The Gopakumar-Vafa invariants are therefore given by The formula for the central charge is with corresponding Gopakumar-Vafa invariants nonvanishing, determines the position of walls of marginal stability. This is a new result which has not been discussed in the literature to the best of our knowledge.

Wall Crossing and Crystal Melting
We finally explain how the wall crossing phenomena described in this section is recast in the language of crystal melting described in Section 3. Let us describe the example of the resolved conifold for simplicity; more general discussions, applicable to any chamber for generalized conifolds, is included in Section 7 as a special case of more general open BPS invariants. The crystal melting model described in Section 3 is for the chamber C 0 (see Fig. 11). In the chamber C n , we have to change the ground state of the crystal. The new ground state (see Fig. 23) has n + 1 atoms on top. Using the same melting rule, we have the function Z crystal,Cn . In Ref. 80 it was shown combinatorially (see Section 5.6 for derivation from vertex operators) that the partition function takes a simple form where q (n) 0,1 are weights in the n-th chamber C n . If we take and substitute back into (5.41), we have which coincides with the result of (5.23) under the parameter identification (3.21). This means that the wall crossing is represented as (1) a change of the ground state and (2) change of the weight in the crystal melting model. This is consistent with the discussion at the end of Section 3.3, where different choice of the fractional brane leads to Seiberg duality of the quiver. The fact we have 3 atoms on the top of the crystal corresponds to 3 arrows starting from the D6-brane node in Fig. 8. When we send n → ∞, the ridges of the crystal approaches to the (p, q) web of the resolved conifold with larger and larger P 1 inside, and we begin to see two different corners of the crystal, each corresponding to the one for C 3 . This is how the combinatorial expression (5.41) has been derived, and clarifies the connection between the crystal melting model of Section 3 and those in the topological vertex model. In other words, the limit n → ∞ of our crystal gives the crystal melting model appearing in topological vertex constructions.
We can also construct crystal melting models for the chambersC n , where the partition function is a finite product. See Refs. 54, 86 for discussion.

Wall Crossing and Free Fermions
There is yet another representation of the wall crossing phenomena, from the viewpoint of free fermions bg . This is well-known for the C 3 crystal; the topological vertex can be computed in the transfer matrix approach 55 . In this section we are going to see that this can be generalized to our more general toric geometries. We moreover see that this gives another perspective on the wall crossing phenomena . This section is based on the papers 81,84,85 . For simplicity we specialize the conifold example in this section. More complete discussion, including the open BPS invariants, will be given in Section 7.4. See also Ref. 167 for combinatorial description.
We begin with two-dimensional free fermions bh , which have the mode expansion we can construct a state where λ ≻ µ denotes the interlacing condition where the commutator means the multiplicative commutator [x, y] = xyx −1 y −1 here. This can be concisely summarized as for ǫ 1,2 = ±1, ι 1,2 = ±1, if we write Γ + ± (p) ≡ Γ ± (p) and Γ − ± (p) ≡ Γ ′ ± (p). Now the claim is that the BPS partition function in non-commutative Donaldson-Thomas chamber can be expressed in the following form (as before, we define q ≡ q 0 q 1 ):

when we introduce
This can also be expressed in a suggestive form when we introduce It is easy to check (5.58) directly by explicit commutation. Indeed, from (5.55) we have This is precisely the BPS partition function of the conifold. Of course, the next natural question is where the expression (5.57) comes from. The answer is that it arises from a sequence of Young diagrams obtained as the slice the crystal. As shown in Fig. 24 we can slice the conifold crystal by an infinite number of parallel planes, and we have a set of Young diagrams {λ(n + 1/2)} n∈Z , where we choose the label the planes (and therefore Young diagrams) by halfintegers. By looking at the crystal structure carefully the melting rule (3.16) is translated into the condition that Young diagrams satisfy the interlacing conditions where we used the notation λ respectively. The vertex operators Γ ± and Γ ′ ± in (5.57) implement (in the language of free fermions) the interlacing conditions (5.63).
It is also easy to generalize this analysis to other chambers. For example, in the chamber C 2 where the crystal takes the form shown in Fig. 23, the analysis of the melting rule for the crystal suggests that we consider We can again easily verify explicitly that this coincides with (5.23). Note that the vertex operators appearing in (5.64) are the same as in (5.57), and we are just changing their orders! This means that wall crossings are described by commuting vertex operators! We will see in Section 7.4.2 that they hold more generally.

Wall Crossing Formulas
In the previous section we gave a derivation of the wall crossing phenomena by using the M-theory viewpoint and reformulating the BPS state counting problem as a counting problem of free spinning M2-branes. We have seen that when we cross a wall we obtain/lose one factor Historically, the M-theory argument was not the first method to derive these results. There is an independent derivation of the results, using the wall crossing formulas. The aim of this section is to explain the wall crossing formula, and to apply it to the examples we studied in the previous section.

Overview: What Wall Crossing Formula Tells Us
Let us first explain the meaning of the wall crossing formula before discussing the explicit form of it. Suppose that we already know the positions of walls of marginal stability (for example, by the central charges (2.16)). Consider two chambers separated by a wall. Due to the wall crossing phenomena, the BPS index Ω(γ) in general jumps along the wall. The wall crossing formula relates the BPS indices on both sides of the wall. In other words, given an index on one side of the wall, wall crossing formula tells us the index on the other side of the wall.
This means that given the chamber structures and the BPS index in one chamber of the moduli space, wall crossing formula reproduces the BPS index in all the other chambers of the moduli space. Of course, we still need to know the BPS index in at least one chamber. In the example of the resolved conifold discussed in Section 5.4.1, as well as in the examples of generalized conifolds in Section 5.4.2, there is a special chamber (core region) where the BPS partition function becomes trivial, and starting from this chamber we can reproduce the partition function in all other chambers.
In the literature there are several different versions of the wall crossing formula. The first one is the primitive/semi-primitive wall crossing formula, which is proposed by Denef and Moore in the context of supergravity and is discussed in detail in the next section. The second is the Kontsevich-Soibelman wall crossing formula 46 . There is also yet another formula by Joyce and Song 170,171 . See also the recent paper 172 . In this section we only discuss the semi-primitive wall crossing formula, and comment on the more general Kontsevich-Soibelman formula in Appendix A.3.

Semi-Primitive Wall Crossing Formula
Let us begin with the primitive wall crossing formula. Suppose that at the walls of marginal stability the decay pattern is γ → γ 1 + γ 2 , where γ 1 and γ 2 are primitive charges. Here primitive means that particle with that charge is stable at any value of the Kähler moduli. In this case, the primitive wall crossing formula says that the jump of Ω(γ) is given by ∆Ω(γ) = (−1) γ1,γ2 γ 1 , γ 2 Ω(γ 1 )Ω(γ 2 ), (6.1) where , refers to the symplectic paring of the charge lattice Γ. We do not need to specify the value of Kähler moduli for Ω(γ 1 ) and Ω(γ 2 ) since we assumed that γ 1 , γ 2 are primitive. Semi-primitive wall crossing formula deals with the decay pattern γ → γ 1 +N 2 γ 2 . The formula says that where p is a formal variable. Note that the term constant in p gives a trivial relation, and the linear term gives the primitive wall crossing formula.
In general, the decay pattern is γ → N 1 γ 1 + N 2 γ 2 (see the comment below (2.16) in Section 2.2), and we need a more general wall crossing formula, the one proposed by Kontsevich and Soibelman. However, the story simplifies considerably for a noncompact Calabi-Yau manifold with a single D6-brane. Since we are counting D6/D2/D0 bound states, γ has one D6-brane charge. The fact that the Calabi-Yau manifold is non-compact with a single D6-brane means that it is impossible for a D6-brane to decay into an anti D6-brane and two D6-branes, for example; that will cost infinite energy. This means that either γ 1 or γ 2 has D6-brane charge one, while the other has charge zero. Without losing generality we can assume that γ 1 contains a D6-brane, while γ 2 contains none. This means that the decay pattern is always γ → γ 1 + N 2 γ 2 . Note that this is not the case if we have multiple D6-branes.
Two further simplifications occur in our setup. First, the wall of marginal stability is determined by γ 2 alone. As we have seen in (2.16), the wall of marginal stability is determined by However, since γ 1 contains D6-brane having an infinite mass, we have  .32)) says bk that Gopakumar-Vafa invariants vanish when we have more than one (anti) D2-branes. This means that when γ 2 contains (anti) D2, semi-primitive wall crossing formulas simplifies to .

(6.5)
Let us now use apply these formulas to the resolved conifold, whose chamber structure is summarized in Fig. 21. We start with the simplest example, the wall betweenC 0 andC 1 . AtC 0 (core region), the degeneracies are simply Ω(D6) = 1, all others zero, (6.6) and the decay pattern at the wall of marginal stability is γ → γ 1 + N 2 γ 2 with This means, when combined with the expressions for the Gopakumar-Vafa invariants (5.20) and the wall crossing formula (6.5), Ω(γ 1 + γ 2 ;C 1 ) = 1, Ω(γ 1 + N 2 γ 2 ;C 1 ) = 0 for all N 2 > 1. The partition function is then given by In general, on the wall γ → γ 1 + N 2 γ 2 with γ 2 = D2 + n D0, we have from (6.5) γ1 where q = (q, Q) collectively refers to the D0-brane chemical potential q and the D2-brane chemical potential Q. If we set p = q γ2 = q n Q we have Z BPS (q, Q;C n ) = Z BPS (q, Q;C n−1 ) (1 − (−1) n q n Q) n . (6.16) This means in general and in particular The chamber betweenC ∞ and C ∞ is special, since this is the wall where the D6brane makes a bound state with pure D0-branes without D2-branes, and therefore we should use the original formula (6.2) instead of (6.5). The wall crossing formula (6.2) gives Repeating similar analysis, we have and in particular These results coincide with those of Section 5 (see Section 5.4.1). The same argument applies to the generalized conifolds discussed in Section 5.4.2.

Derivation of the Wall Crossing Formulas
In the previous section we have seen that the semi-primitive wall crossing formula correctly reproduces the results obtained in Section 5. However, we still do not see the physics behind the formula. In this section we give a derivation of the semi-primitive wall crossing formula following Ref. 47. This will uncover tantalizing connections with the multi-centered black hole solutions described in Appendix A.2. In supergravity, a particle with primitive charge is described by a single-centered black hole. The BPS state with charge given by the sum of primitive charges, γ = γ 1 + N 2 γ 2 , correspond to a multi-centered black hole. Since γ 1 contains the D6brane and has an infinite mass, γ 1 is called the "core" of the black hole. The D0/D2 particles, which are sometimes called "halos", surround the core of the black hole (see Fig. 25). Let us begin with the primitive wall crossing formula. Suppose that on one side of the wall we have a stable bound state with charge γ = γ 1 + γ 2 , where γ 1 , γ 2 are primitive. Suppose moreover that this particle become unstable on the other side of the wall. In supergravity, the particle corresponds to a 2-centered black hole, whose distance between the two centers given in (A.7). Since (A.7) contains the central charge, the distance depends on the value of the Kähler moduli. The distance between the two centers become infinite on the wall of marginal stability; this means that there is no longer a stable bound state, and the index jumps.
Since the two centers are far away from each other on the wall, the Hilbert space splits into direct products: where we have included the rotational degrees of freedom coming from the angular momentum of the 2-centered black hole (A.12). This means which is the primitive wall crossing formula, when we use the expression for J 12 in (A.12). We can also derive the semi-primitive wall crossing formula (6.2) from supergravity viewpoint. The formula (6.2) is written in the form of a generating function, and contains several terms when expanded with respect to p. For example, the quadratic term for p contains two different contributions, one with two factors of Ω(γ 2 ), and one with a single Ω(2γ 2 ). What this means is simple: we can distribute the charge 2γ 2 into two particles each with charge γ 2 , or to a single particle with 2γ 2 . Since the distance between the centers in (A.7) depends on the charges, the corresponding halos have different radius.
Consider the more general situation γ → γ 1 + N 2 γ 2 . We can again distribute the charge N 2 γ 2 to halos with different radius, each having k i γ 2 . Since each halo has mutually zero symplectic pairing, we can ignore the interactions and use the 2-centered black hole solution for each halo bl . This situation is concisely expressed if we introduce the generating function: kγ2 ] H(γ 2 ) represents a Fock space spanned by halos with charge kγ 2 , and , represents a formal sum and a product, respectively. This is a generalization of (6.22). Now the each halo [J γ1,kγ2 ] H(γ 2 ) contributes a factor 1 − (−1) k γ1,γ2 p k k| γ1,γ2 |Ω(kγ2) .
bl The two assumptions in Section 5.2 are the underlying assumptions behind this derivation.
As this derivation shows, it is not a coincidence that the methods of Section 5 and those of this section give the same answer. The derivation of the semi-primitive wall crossing formula uses the Fock space spanned by D2/D0 halos, whereas when lifted to M-theory we have a Fock space spanned by spinning M2-branes and the graviton. We should keep in mind, however, that the argument of Section 5 does not require the validity of supergravity approximation.

Open BPS Wall Crossing
In this section, we generalize the analysis in previous sections to include "open BPS invariants". The BPS invariants in previous sections, which should be called "closed BPS invariants" more precisely, count D0/D2/D6-branes wrapping holomorphic 0/2/6-cycles. In this section, we also consider D2-branes wrapping disks whose boundaries are on D4-branes wrapping non-compact Lagrangian 3-cycles. The open BPS invariants counts the degeneracy of such D-brane configurations. Since D4branes break the supersymmetry to half and fill R 1,1 in R 3,1 , from gauge theory viewpoint we are discussing the wall crossing in the two-dimensional N = (2, 2) theory.
The notion of open counting exists already in the topological string theory; of course, this is the open topological string theory. One of the most important results in the open topological string theory is that the partition function can be computed by gluing the topological vertex 56 , assigned to each trivalent vertex of the (p, q)web.
Motivated by this result in the topological string theory, we propose a generalization of the topological vertex, which we call the "non-commutative topological vertex" and which capture the open BPS invariants in the sense mentioned above. The vertex is defined combinatorially using the crystal melting model proposed recently, and depends on the value of closed string moduli at infinity. The vertex in one special chamber gives the same answer as that computed by the ordinary topological vertex.
We prove an identify expressing the non-commutative topological vertex of a toric Calabi-Yau manifold X as a specialization of the closed BPS partition function of an orbifold of X, thus giving a closed expression for our vertex. We also clarify the action of the Weyl group of an affineÂ L−1 Lie algebra on chambers, and comment on the generalization of our results to the case of refined BPS invariants.
We The vertex operator representation for closed BPS invariants is also discussed in Ref. 85.

Overview: Open BPS Invariants
We begin this section by reformulating the closed BPS invariants for generalized conifolds (Section 7.2). In this formulation, the closed BPS partition function bm Z c BPS,(σ ′ ,θ ′ ) , which is defined in Section 2.2 as the generating function of the degeneracy of Dbrane BPS bound states, depends on maps σ ′ , θ ′ specifying a chamber in the Kähler moduli space bn . The use of these maps is natural from the viewpoint of affineÂ L−1 algebra. As we have seen in Section 5.3 (see the discussion around (5.17)), in one special chamberC top of the Kähler moduli space, the BPS partition function is equivalent the topological string partition function bo (up to the change of variables, which we do not explicitly show here for simplicity): depending on maps σ, θ specifying the chamber in the Kähler moduli space, such that the partition function reduces to the open topological string partition function in a special chamber C top : The question is how to define open BPS degeneracies such that the generating function follows the conditions above. As a guiding principle of our following argument, we use the crystal melting model developed in Section 3. As we have seen, this crystal melting model generalizes the result of Ref. 55 for C 3 to an arbitrary toric Calabi-Yau manifold. In the case of C 3 , the crystal melting partition function with the boundary conditions specified by three Young diagrams λ 1 , λ 2 , λ 3 gives the topological vertex 56 C λ1,λ2,λ3 . By using these vertices as a basic building block, we can compute open topological string partition function with non-compact D-branes wrapping Lagrangian 3-cycles of the topology topological string partition function corresponds to the change of the boundary condition for the crystal melting model for C 3 . Now the results presented in Section 3 show that the closed BPS partition function discussed above can be written as a statistical mechanical partition function of the crystal model. This model applies to any toric Calabi-Yau manifold, and for C 3 the BPS partition function coincides with the topological string partition function. Similarly to the case of the topological string story mentioned in the previous paragraph, we hope to define the open version of the BPS invariants by changing the boundary condition for the crystal melting model. The invariants defined in this way will be defined in any chamber in the Kähler moduli space, and reduces to the ordinary topological vertex in a special chamber. We call such a generalization of the topological vertex "the non-commutative topological vertex" bq , following "the orbifold topological vertex" named in Ref. 177.
We will see that this expectation is indeed true. We adopt the definition proposed in the mathematical literature 83,84 , although we hope to have clarified the presentation by using the language of the crystal melting model. Our non-commutative topological vertex is defined for a Calabi-Yau manifold X without compact 4-cycles, and a set of representations λ assigned to external legs of the toric diagram. As in the case of topological vertex, λ encodes the boundary condition of the D4-branes wrapping Lagrangian 3-cycles. We propose our vertex as the building block of open BPS invariants.
We can provide several consistency checks of our proposal (see Section 7.3.4 for more details). First, our vertex by definition reduces to the closed BPS invariant when all the representations λ are trivial. Second, our vertex shows a wall crossing phenomena as we change the closed string Kähler moduli, and the vertex coincides with the topological vertex computation in the chamber where the closed BPS partition function reduces to the closed topological string partition function. Third, the wall crossing factor is independent of the boundary conditions on D-branes, and is therefore the partition function factorizes into the closed string contribution and the open string contribution, as expected from Ref. 178 and the generalization of the arguments of Section 5.
Given a combinatorial definition of the new vertex, the next question is whether we can compute it, writing it in a closed expression. We show that the answer is affirmative, by proving the following statement. For a Calabi-Yau manifold X, the non-commutative topological vertex C BPS,(σ,θ;λ) (X) is equivalent to the closed BPS partition function Z c BPS,(σ ′ ,θ ′ ) (X ′ ) for an orbifold X ′ of X , under a suitable bq The word 'non-commutative' stems from the mathematical terminologies such as "noncommutative crepant resolution" 118 and "non-commutative Donaldson-Thomas invariant" 33 . The non-commutativity here refers to that of the path algebra of the quiver, and is different from the more familiar one (e.g. Refs. 174,175) in string theory contexts. The quiver (together with a superpotential) determines a quiver quantum mechanics, which is the low-energy effective theory on the D0/D2-brane worldvolume (see Section 3). See also Ref. 176 for "closed topological vertex", which correspond to C 3 /Z 2 × Z 2 .
identification of variables explained in the following sections br : We will give an explicit algorithm to determine X ′ and σ ′ , θ ′ , starting from the data on the open side. Since an infinite-product expression for Z c BPS,(σ ′ ,θ ′ ) (X ′ ) is already known 82,57 , this gives a closed infinite-product expression for our vertex.
The rest of this section is organized as follows. We begin in Section 7.2 by slightly reformulating the results obtained in Section 5 the closed BPS invariants, their wall crossings, and their relation with the topological string theory. In Section 7.3 we define our new vertex using the crystal melting model. We also perform several consistency checks of our proposal. Section 7.4 contains our main result (7.3), which shows the equivalence of our new vertex with a closed BPS partition function under suitable parameter identifications. We also give an explicit algorithm for constructing the closed BPS partition function starting from our vertex. In Section 7.4.1 we treat several examples in order to illustrate our general results. We also include Appendices Appendix A.4, Appendix A.5 and Appendix A.6 for mathematical proofs and notations.

Closed BPS Invariants Revisited
Before discussing the open BPS invariants, we summarize in this section the definition and the properties of the closed BPS invariants. This section hopefully serves as a self-explanatory introduction to the closed BPS invariants, and prior reading of Section 5 is not necessary for the first reading of this section.
Throughout this section, we concentrate on the case of the so-called generalized conifolds (see Section 5.4.2). The reason for this is that wall crossing phenomena is understood well only in cases without compact 4-cycles (see Section 5), which means X is either a generalized conifold or By a suitable SL(2, Z) transformation, we can assume that the toric diagram of a generalized conifold is a trapezoid with height 1, with length L + edge at the top and L − at the bottom (see Fig. 26) bt . If we denote by L = L + + L − the sum of the length of the edges on the top and the bottom of the trapezoid, this geometry has L − 1 independent compact P 1 's. We label them by α i , borrowing the language of the root lattice ofÂ L−1 algebra.
The language of the root lattice will be used extensively throughout this section bu . We can also make more P 1 's by combining them. For example, combining all the P 1 's between i-th and j-th P 1 (assume i < j), we have another P 1 which we denote br More precisely, we need to specify the resolution of X and X ′ . We also need to impose the condition that two of the representations λ are trivial. See the discussions in the main text.   Suppose that we have a Calabi-Yau manifold X without compact 4-cycles. We also consider a single D6-brane filling the entire X and D0/D2-branes wrapping compact holomorphic 0/2-cycles specified by n ∈ H 0 (X; Z) and β ∈ H 2 (X; Z), respectively. We can then define the BPS degeneracy Ω(n, β) counting BPS degeneracy of D-branes bv . The closed BPS partition function is then defined by (see  bv More precisely, this BPS degeneracy is defined by the second helicity supertrace. bw This is not essential, since by varying the value of the Kähler moduli we can go to the geometry with other choices of resolutions. We just need to specify an arbitrary resolution in order to begin the discussion. See Appendix A.4 for more on this. Given σ, the topological string partition function is given by 56,161 (7.8) where N g=0 β is the genus 0 Gopakumar-Vafa invariant bx . For the 2-cycle β = α i + . . . + α j , the explicit form of N 0 β depends on σ and is given by (see (5.32)) By CPT invariance in five dimensions 57 , we have N g=0 β=−(αi+...αj ) = N g=0 β=αi+...αj . We also have N 0 β=0 = χ(X), where the Euler character χ(X) for a toric Calabi-Yau manifold is the same as twice the area of the toric diagram.
As shown in Section 5, the closed BPS partition function is given by where the central charge Z(β, n) is given in (5.8). There 1/R denotes (up to proportionality constants) the central charge of the D0 brane, and following the discussion in Section 5.2 we choose the complexified Kähler moduli to be real. Now suppose that 1/R is positive by . From (7.10) and (5.8), it follows that the wall crossing occurs when the integer part of the value of the B-field through the cycle change. For the cycle α i + . . . + α j , this is given by Since there are L − 1 P 1 's in X, there are L(L − 1)/2 such parameters. We can take a special limit B(α i ) → ∞ for all i. Let us denote this special chamber byC top . As discussed at the end of Section 5.3, in this limit the BPS partition function reduces to the closed topological string partition function: just as advertised in (7.1).
For concreteness, let us discuss the example of the Suspended Pinched Point (L = 3) using the triangulation σ 1 in (7.7). In this example, the topological string partition function is where M (q) is the MacMahon function defined previously in (3.32).The BPS partition function is given by (7.14) The parameters [B(α i + . . . + α j )] specify the chamber, but as we can see from the definition they are not completely independent parameters. Since we only have L − 1 real parameters B i , it is likely that this parametrization is redundant. Indeed, as explained in the Appendix A.4 we can specify the chamber by a map θ, which is specified by L half-integers, θ(1/2), θ(3/2), . . . , θ(L − 1/2), satisfying one constraint This means we can indeed parametrize the chamber by L − 1 independent (half-)integers, which is what we expected. As discussed in Appendix A.4, θ is an element of the Weyl group ofÂ L−1 .

The Noncommutative Topological Vertex
In this section we give a general definition of the non-commutative topological vertex using the crystal melting model. This definition is equivalent to the one given in Ref. 83   For later purposes, we combine µ 1 , . . . , µ L into a single representation µ by In other words, we choose µ such that L-quotients of µ give µ 1 , . . . , µ L . By abuse of notation, we use the same symbol µ for a set of representations µ 1 , . . . , µ L as well as a single representation define above.
In the following we drop the subscript BPS for simplicity. Before going into the general definition, we first illustrate our idea using simple example of the resolved conifold.

Example: Resolved Conifold
In this example there is only one P 1 and the BPS partition function depends on a single positive integer N := [B(α 1 )]. In the language of θ, θ(1/2) = 1/2 − N, θ(3/2) = 3/2 + N. (7.17) We fix σ to be σ(1/2) = +, σ(3/2) = −. (7.18) Without losing generality we concentrate on N ≥ 0, since N < 0 corresponds to a flopped geometry, where σ is replaced by −σ (see Appendix A.4). The ground state crystal for N = 2 is shown in Fig. 29 (this is the same figure as Fig. 23, reproduced here for the convenience of the reader). This crystal, sometimes called a pyramid, consists of infinite layers of atoms, the color alternating between black and white 33,80 . In the N -th chamber there are N + 1 atoms on the top. The closed BPS partition function is defined by removing a finite set of atoms Ω from the crystal. When we do this, we follow the melting rule (3.16) such that whenever an atom is removed from the crystal, we remove all the atom above it. We then define the partition function by summing over such Ω: where w 0 (Ω) and w 1 (Ω) are the number of white and black atoms in Ω, respectively. The weights q 1 ) assigned to white (black) atoms in the N -th chamber are determined as follows. We can slice the crystal by the plane, and each slice is specified by an integer i (see Fig. 30). We choose i so that the slice i = 0 cuts through the center of the crystal.
The weight q (N ) i depends on the chamber and is given by 20) when N is odd, and when N is even. This coincides with the expression in (5.42), up to the exchange of two nodes of the quiver when N is odd. For example, q The change of variables arises from the Seiberg duality on the quiver quantum mechanics 86 , geometrically mutations in the derived category of coherent sheaves 86,54 (see Section 3.3.4), or in more combinatorial language the dimer shuffling 80 . The parameters q 0 , q 1 defined here are related to the D0/D2 chemical potentials introduced in Section 7.2 by (see (3.21)) ca q = q 0 q 1 , Q = q 1 . (7.23) Now let us discuss the open case. When non-trivial representations are assigned to each of the four external legs of the (p, q)-web, the only thing we need to do is to change the ground state of the crystal.
The crystal has four ridges, corresponding to four external legs of the (p, q)-web. When we assign a representation, we remove the atoms with the shape of the Young diagram. More precisely, we remove the atoms with the shape of the Young diagram in the asymptotic direction of the (p, q)-web, as well as all the atoms above them, so that the melting rule is satisfied. See Fig. 31 for an example.
The partition function is defined in exactly the same way by (7.19), and the result is denoted by C (σ,θ;λ) .
Several comments are now in order. First, let us explain the origin of the name "the non-commutative topological vertex". Recall that, in commutative case, topological vertex is defined for C 3 . For ca The equation (7.21) is the same for N odd and even if we suitably exchange the two nodes of the quiver diagram. The relation (7.23) can also be written as 22) when N is even, and q  a general affine toric Calabi-Yau manifold X, we divide the polygon into triangles and assign a topological vertex to each trivalent vertex of the dual graph. We can get the topological string partition function for the smooth toric Calabi-Yau manifold Y (resolution of X) by gluing the topological vertices with propagators. Similarly, assume that a polygon is divided into trapezoids. Then we can assign a non-commutative topological vertex to each vertex of the dual graph and glue them by propagators. The BPS partition function defined in this way is related to the topological string partition function via wall-crossing cb . In Refs. 177, 179 they study the case when a polygon is divided into (not necessary minimal) triangles.
Second, it is possible to give more geometric definition of the vertex (see Ref. 84). For the closed BPS invariants, the crystal arises as a torus fixed point of the moduli space of the modules of the path algebra quiver (under suitable θ-stability conditions). The moduli space is the vacuum moduli space of the quiver quantum mechanics arising as the low-energy effective theory of D-branes (Section 3). The similar story exists in our case. Namely, the crystal is in one-to-one correspondence with the fixed point of the moduli space arising from a quiver diagram. For example, for conifold with λ = , the quiver is given in Fig. 32.
Third, in the case of C 3 , our vertex reproduces the topological vertex for C 3 by definition.
cb Given a division of a polygon into trapezoids, we get a partial resolution of X and a noncommutative algebra A over the partial resolution, which is derived equivalent to Y . The BPS partition function given by gluing non-commutative topological vertices counts torus invariants A-modules.  = (1, 1). This is the Klebanov-Witten quiver 109 with an extra node and extra three arrows starting from it. The three arrows correspond to three red atoms in Fig. 31. Note that this is different from the quiver in Fig. 8.

General Definition from Crystal Melting
We next give a general definition of the vertex. Readers not interested in the details of the definition of the non-commutative topological vertex can skip this section on first reading.
Given a boundary condition specified by σ, θ and λ = (µ, ν), we would like to construct a ground state of the crystal, and determine the weights assigned to the atoms of the crystal.
The basic idea is the same as in the conifold example. First, the closed string BPS partition function is equivalent to the statistical partition function of crystal melting. The ground state crystal can be sliced by an infinite number of parallel planes parametrized by integers n ∈ Z, just as in Fig. 30. On each slice, there are infinitely many atoms, labeled by integers (x, y) ∈ Z 2 ≥0 . Therefore, the atoms in the crystal are label by (n, x, y) ∈ Z × Z 2 ≥0 .
Let us show this in the example of the Suspended Pinched Point. The crystal in Fig. 33 clearly shows this structure.
Another way of explaining this is to construct a crystal starting from a bipartite graph on R 2 , shown in Fig. 34 cc . In this example, the bipartite graph consists of hexagons and squares, and periodically changes its shape along the horizontal directions.
The atoms of the crystal are located at the centers of the faces of the bipartite graph. and it thus follows we can slice the crystal along the horizontal axis. Each slice consist of an infinite number of atoms labeled by two integers (x, y) ∈ (Z ≥0 ) 2 , since there are two directions, the horizontal direction and the perpendicular direction to the paper cd .
Now consider the open case. In this case, we construct a new ground state by removing atoms from the closed ground state. By the melting rule, the atoms removed from the n-th plane should be labeled by (x, y) ∈ V(n), where V(n) is a cc This is a universal cover of the bipartite graph on T 2 , which appears in the study of fourdimensional N = 1 quiver gauge theories. See Section 3.2. cd In general the bipartite graph is determined by σ. A hexagon (a square) corresponds to O(−2, 0)curve (O(−1, −1)-curve). In other words, the i-th polygon is a hexagon (square) if σ(i) = σ(i + 1)(σ(i) = σ(i + 1)).  Young diagram. Depending on the representations on external legs, V(n) increases or decreases as we change n. Thus the ground state crystal for open BPS invariants are determined by such a sequence of Young diagrams {V(n)}, called transitions below. In the following we make this idea more rigorous.
Let us begin with some notations. Let µ and µ ′ be two Young diagrams. We say µ + ≻ µ ′ if the row lengths satisfy and µ − ≻ µ ′ if the column lengths satisfy We define a transition V of Young diagrams of type (σ, θ; µ, ν) as a map from the set of integers Z to the set of Young diagrams such that • V(n) = ν − for n ≪ 0 and V(n) = ν + for n ≫ 0, Then as shown in Ref. 83 there is a minimal transition V min of Young diagrams of type (σ, θ; µ, ν) such that for any transition V of Young diagrams of type (σ, θ; µ, ν) and for any n ∈ Z we have V(n) ⊇ V min (n). For a transition V of Young diagram of type (σ, θ; µ, ν), the corresponding crystal configuration can be defined by A(V) := {a(n, x, y) | n ∈ Z, x, y ∈ Z ≥0 , (x, y) / ∈ V(n)}.
where a(n, x, y) denotes the atom at position (n, x, y). In particular, A(V min ) gives the ground state crystal.
Having defined the ground state crystal, the partition functions is defined again as the sum over a subset Ω of A(V min ) satisfying the following two conditions: ce • Ω is finite set, and • Ω satisfies the melting rule (3.16). In other words, if a ′ ∈ Ω and a ′ = aα for an arrow α, then a ∈ Ω cf .

Refinement
We can also generalize the definition to include the open refined BPS invariants cg . Let us start by recalling the meaning of the refined BPS counting, first in the closed case 181 . As we have seen in Section 5, when the type IIA brane configuration is lifted to M-theory 60 and when we use the 4d/5d correspondence 58,59 , the D0/D2-branes are lifted to spinning M2-branes in R 5 , which has spin under the little group in 5d, namely SO(4) = SU (2) L × SU (2) R . The ordinary BPS invariant is defined as an index (5.5); it keeps only the SU (2) L spin, while taking an alternate sum over the SU (2) R spin. The refined closed BPS invariants is defined by taking both spins into account.
The situation changes slightly when we consider open refined BPS invariants. The D4-branes wrapping Lagrangians, when included, are mapped to M5-branes on R 3 . This means that SO(4) is broken to SO(2), and we have only one spin. However, there is an SO(2) R-symmetry for N = 2 supersymmetry in three dimensions, and in the definition of the ordinary open BPS invariants we keep only one linear combination of the two, while tracing out the other combination 182 . The refined open BPS invariants studied here takes both of the two charges into account.
In the language of crystal melting used in this paper, the open refined BPS invariants are defined simply by modifying the definition of the weights. Here, we explain how to modify the weights in the case of µ = ∅.

Consistency Checks of Our Proposal
In Appendix A.6 we gave a purely combinatorial definition of the non-commutative topological vertex. We now claim that is captures open BPS invariants in the following sense. Consider a generalized conifold (a toric Calabi-Yau manifold without compact 4-cycles) with representations assigned to each leg of the (p, q)-web. Each representation specifies a boundary condition on the non-compact D4-brane wrapping Lagrangian 3-cycle of topology R 2 × S 1 173 .
In the absence of D4-branes, we are counting particles of D0/D2-branes wrapping 0/2-cycles, which makes a bound state with a single D6-brane filling the entire Calabi-Yau manifold. When the D4-branes are included, D2-branes can wrap disks ending on the worldvolume of D4-branes. The degeneracy of such D-brane configurations is what we mean by the open BPS degeneracies. Note that supersymmetry is broken by half due to the inclusion of D4-branes; our counting of BPS particles makes sense because we are counting BPS states in lower dimensions, where the minimal amount of supersymmetry is lower.
We can provide several consistency checks of our proposal. First, our vertex by definition reduces to the closed BPS invariant when all the representations λ are trivial: C BPS,(σ,θ;λ=∅) = Z c BPS,(σ,θ) . The third consistency check comes from the fact that the wall crossing factor is independent of representations. In other words, does not depend on θ 83,84 (see also Section 7.4.2 for an explanation) ch . This means that the open BPS partition function, which is defined by the sum over representations, takes a factorized form Since Z c BPS /Z c top takes an infinite product form as explained in Section 7.2 and Z o top also takes the infinite product form 178 , Z o+c BPS itself should take an infinite product form, which is consistent with a suitable generalization of the argument of Section 5. We will see discuss this in more detail in Section 7.5. Using (7.42), we can compute our vertex using the ordinary topological vertex formalism. In the next section, we give a yet another way of computing the noncommutative topological vertex. The advantage of our approach is that the final expression manifestly takes a simple infinite product form, and we do not have to worry about the summation of Schur functions.

The Closed Expression for the Vertex
In this section we give a closed expression for our non-commutative topological vertex. We do this by proving a curious identity stating the equivalence of our vertex for a toric Calabi-Yau manifold X with a closed BPS partition function for an orbifold of X ci . We also comment on another method via vertex operators.
ch To be exact, we have to normalize the generating function by a monomial. See Ref. 84, Corollary 3.21, for the precise statement. ci This is reminiscent of story of Ref. 183, where the 'bubbling geometry' X ′ is constructed for given a toric Calabi-Yau manifold X such that the open+closed topological string partition function on X is equivalent to closed topological string partition function on X ′ . However, our story is different in that the vertex computes only a part of the full open BPS partition function; the partition function itself is given by summation of our vertices over representations.
Start from a non-commutative topological vertex for a generalized conifold X, which has L − 1 compact P 1 's. As we discussed above, for the definition of the vertex we need (1) σ for a choice of the crepant resolution of X, (2) a map θ specifying the chamber together with σ (3) a set of representations λ = (µ, ν), and the resulting vertex is denoted by C σ,θ;λ (q, Q). In the following we consider the special case ν = (λ + , λ − ) = (∅, ∅).
Choose an integer M and consider the Z M orbifold X ′ of X. We choose the orbifold action such that when the toric diagram of X is a trapezoid with a top and the bottom edge of length L + and L − respectively, X ′ has length M L + and M L − . We also choose map and where i = 0, . . . , L − 1. See Appendix A.6 for an explicit method for choosing such M, σ ′ , θ ′ satisfying (7.45) as well as generalization of (7.46) to the case of refined BPS invariants.
Since an infinite-product expression for closed BPS partition function for a generalized conifold is already known (Section 7.2), we have a closed expression of our vertex when ν = ∅.

Examples
Let us illustrate the above procedure by several examples.
Example: C 3 First, we begin with the non-commutative topological vertex for C 3 . Since there is no wall crossing phenomena involved in this case cj , the vertex should coincide with the ordinary topological vertex, thus providing a useful consistency check of our proposal. For C 3 , we have L = 1, σ(1/2) = −1, θ = id.
Take C 3 with representation λ = (µ, ν = ∅) with µ = (N, N − 1, . . . , 1) at one leg. The method in Appendix A.6 gives M = 2 (therefore X ′ = C 2 /Z 2 × C), and θ ′ (1/2) = 1/2 − N, θ ′ (3/2) = 3/2 + N, σ ′ = −1, (7.47) cj There is one wall between R > 0 and R < 0, however we do not discuss such a wall since we are specializing to the case R > 0. The weight is given by (7.20) or (7.21). By solving for we have in the case of N odd. Substituting this into the closed BPS partition function we have and The closed BPS partition function corresponding to the B-field (7.56) is the following: where as in (7.32) we defined up to the wall crossing factor and the normalization by a monomial as remarked in footnote ch.

Expression via Vertex Operators
As we have seen the computation of our vertex from the relation (7.46) is always possible but time-consuming in general. One efficient method is to use the vertex operator formalism, explained in Section 5. where The fact that ( where Z o+c. * top (q, Q −1 , v −1 ), whose closed string part coincides with Z c top (q, Q −1 ), will be defined shortly.
We first begin in Section 7. and the D0 branes we had before, and pin them to the D4 branes. These are the open BPS invariants that we would like to count co .
A D2 brane ending on a D4 brane is magnetically charged under 5d gauge field A on the D4 brane, and electrically charged under the corresponding dual two-form B, dA = * dB. Suppose b 1 (L) = r. We get r 1−cycles on L that are contractible in X and fill in to holomorphic disks in X. We will assume, for simplicity that r = 1, tough the generalization to arbitrary r is manifest. Integrating the B-field on the S 1 we get a U (1) M magnetic gauge group generated by The BPS particles are now labeled by their U (M ) representation R, bulk class β, spin s and R-charge r. The presence of the M5 branes breaks the symmetries: SO(4) = SU (2) L × SU (2) R is now broken to SO(2) L × SO(2) R : these now correspond to the little group of a particle in three dimensions and the R-symmetry of co The counting of open BPS states was also studied in Ref. 187. In that context, the instead of the D6 branes wrapping X the authors had N D4 branes on a divisor in X. cp In fact, as we will need later, u = disk k + i S 1 A, where A is the electric U (1) on the D4 brane. We can write this, equivalently as u = disk (k + iB NS ), since on the D4 brane B NS − dA is the gauge invariant combination. the N = 2 theory. More precisely s L = s + r, s R = s − r where s is the spin and r is the R-charge. s R permutes the fields within the same multiplet, and s L annihilates the state.
We denote the number of M2-brane particles with intrinsic spin (s L , s R ) and wrapping β and representation R by N (sL,sR) β,R , and define the index Now, again, each such 3d particle gives rise to a field Φ, and excitations of this field on R 2 are the particles we want to count Φ(z) = n α n z n .
Here we have set z = z 1 , since M5 brane wraps the and z 2 = 0 subspace of R 4,1 .
The partition function of these particles can be written as follows. Introduce chemical potentials q, corresponding to the spin s, Q corresponding to the charge β and v i corresponding to the charges of the M2 branes under the U (1) M . For each field in representation R, β, s, we get a contribution where the product is over the weight vectors k R are of the representation R, m kR are the corresponding multiplicities and The full Fock-space partition function is and where N R,β,s is an integer counting M2-brane particles with R, β and s cq . The symbol Tr R V denotes the holonomy of the gauge field on the D4-brane. Here V captures the BPS masses of the open M2 branes, namely We can write where k R i are the weights of the representation R and m kR their multiplicities. Then expression (7.68) can be rewritten as the Fock space trace: i . This naturally corresponds to the half of the Fock space corresponding to M2 branes wrapping holomorphic curves only. In other words, we have where Z o, * top contains the contributions of the anti-M2 branes, where we used the (7.67) and the fact that TrRV = Tr R V −1 . Note that Z o, * top (q, Q, v) is almost the same as Z o top (q, Q, v), the only difference being that the spin s in the power of q is replaced by −s.

Open BPS Wall Crossing and M-theory
Up to this point we discuss all M2-brane particles. Consider the central charges of the particles, which determine which ones are mutually BPS. The central charge of the open D2 brane wrapping a holomorphic disk in class k R , bulk class β and D0 brane charge n is given by cr Z(D2) = (u(k R ) + t(β) + n) /R, (7.73) cq We have shifted the definition of spin by 1/2 relative to Ref. 182. In that paper, spins were taken to be half integral, while here we take them to be integral. This means that the complete open+closed BPS partition function is where the Fock-space partition function is computed by the open+closed topological string partition function, cs The 4d N = 2 bulk vector multiplet splits into two twisted chiral multiplets. These determines the 2d N = (2, 2) central charges of the 4d electrically and magnetically charged states. Namely, the twisted chiral multiplet coupling to electrons contains the the d = 4 complex scalar, and the longitudinal components A 0,1 of the d = 4 vector. The twisted chiral multiplet coupling to monopoles is slightly more complicated. Start with the chiral multiplet containing two transverse components of the gauge fields A 2,3 . The dual twisted chiral multiplet determines the d = 2 central charge of the magnetically charged particles, in particular of the D6 brane. We will need this in a later section.
where u i are as defined in section 3. This is because then, fixing R, and u i and taking Re(t) to infinity one indeed recovers the topological string amplitude. For example, when 0 < Re(t) < 1, we have . and when Re(t) → ∞, we have Z BPS = Z o+c top (q, Q, v). In this case, taking Re(t) to infinity in addition, only M2 branes ever contribute, and no anti-M2 branes. This means that Z BPS has the same open part as the topological string theory.
We can consider another extreme 0 < Re(u i ) < 1. In this case, open part has contributions both from M2-branes and anti M2-branes. For example if 0 < Re(t) < 1 . We can also consider R < 0. For example, there is a chamber R < 0, Re(u i ) → ∞, Re(t) → ∞, where the partition function simply becomes one.

Relation to the Work of Cecotti and Vafa
The wall crossing of the closed BPS invariants discussed in Chaps. 5, 6 is a special case of a more general problem, the wall crossing of BPS bound states in four dimensional theories with N = 2 supersymmetry. In this context, Kontsevich and Soibelman 46 recently conjectured that the degeneracies on two sides of the wall are related by commuting certain symplectomorphisms of complex tori. In the special case of N = 2 gauge theories in four dimensions, this remarkable structure was explained from several different perspectives 48,49,50 . In particular, in Ref. 50 both the appearance, and the particular choice of symplectomorphism, was beautifully illuminated. In some cases, the statements that follow from Ref. 46 are particularly simple, and were predicted in physics literature 47 a while back. As we saw in Section 6, when the state of charge γ decays into two primitive states γ 1 and γ 2 = γ − γ 1 , γ → γ 1 + γ 2 , the degeneracies of single particle states Ω(γ) jump ct as 46,47 More generally, when the central charges of γ 1 and γ 2 align, they do so for any multiple of γ 1 and γ 2 as well, so one can a-priori lose an infinite number of states. While there are no known such simple formulas for the general case, Refs. 46,47 predicted that in the semi-primitive case, where only one of the charges is primitive, the degeneracies Ω(γ 1 + nγ 2 ) jump as where we defined As noted in Section 5, M-theory provides a derivation of this formula when γ 2 carries D0 and D2 brane charges, and γ 1 in addition carries one unit of D6 brane charge. Note that the jumps are governed by a Mac-Mahon function type formula, ∞ n=1 (1− q n ) −nω(n) .
In the present context, we count open BPS states. We have seen that M-theory predicts that the BPS states jump as Ω(γ) → Ω(γ) + Ω(γ 1 ) Ω(γ 2 ). (7.75) in the primitive case, and more generally as, ct In what follows, we will be cavalier about whether we gain or lose the states in the jump, i.e. about the sign of ∆Ω, since that depends on the direction of crossing.
The particles in two dimensions are solitons. This is so even for fundamental matter, simply because a particle is a codimension one object, so the vacuum of the theory can change from one side to the other. Soliton spectra of the massive N = (2, 2) theories were studied in Refs. 189,36. The fact that the spectrum of BPS states can jump was in fact discovered in this context. We will now first review the essential results from Ref. 36, and then explain how to apply them in the present context.

Review of the Results by Cecotti and Vafa
Consider a massive N = (2, 2) theory. BPS particles are solitons ∆ ik interpolating between the vacua i and k at spatial infinities. Let µ ik = Tr ik (−1) F F be the "number" of such solitons, or more precisely the index that weights the solitons with their fermion number charge F . Only the BPS solitons contribute to the index. These live in short, two dimensional representations of the N = (2, 2) supersymmetry, and the index is the same as counting the multiplets weighted by (−1) F , where F is the fermion number of the lowest component in the multiplet 36 .
The central charge, Z(∆ ik ) of the soliton depends only on the vacua i and k, so we can define W i , so that If the theory at hand is a Landau-Ginsburg theory, then W i is the value of the superpotential W in the i-th vacuum. If, as we cross the line of marginal stability, W j crosses the line in the W -plane interpolating between W i and W k , the soliton ∆ ik decays as and moreover the number of solitons jumps as This has a simple interpretation. The jump corresponds to counting all the chains of BPS solitons interpolating from vacuum i to vacuum k via the intermediate vacua.
More precisely, we are counting the lowest components of these multiplets, weighted by (−1) F . Since the net fermion number is simply the sum of the fermion numbers, the result is simply the product of the BPS degeneracies in the individual sectors of the chain.

Counting of Open BPS States
In the case at hand, we are counting massive BPS particles, which carry charges under the U (1) gauge fields from the D4 brane and the bulk. The corresponding central charge that enters the N = (2, 2) supersymmetry algebra is determined by the lowest components σ α of the twisted chiral multiplets Σ α cu . For a particle γ of charge q α , the central charge is Per definition then, the solitons of the theory are the fundamental particles. Consider a vacuum of the theory |i . Adding a BPS particle γ to it changes the vacuum of the theory from |i on one side to |j on the other where, again per definition, We can think of the vacua as labeled by the charges of the particles needed to create it, from an arbitrary but fixed vacuum. Note that we have extra structure here, that is not present in an arbitrary massive N = (2, 2) theory. Namely, given any vacuum |i ′ , the BPS particle γ takes it to a vacuum |j ′ where W j ′ and W i ′ differ by the BPS mass of γ, W j ′ − W i ′ = Z(γ). Among the particles in the theory is a D6 brane wrapping the whole non-compact Calabi-Yau. The focus of our paper has been understanding the wall crossing of particles carrying one unit of D6 brane charge. However, the corresponding central charge is strictly speaking infinite. If |k is a vacuum with one unit of D6 brane charge, then W k is strictly at infinity in the W plane. To deal with this infinity we need a regulator. The correct way to do this, it turns out, is to cut off the W-plane at some large but finite radius Λ. ∆ ik is then a non-compact cycle with a boundary. The relevant data that affects the problem is only the angle θ that W k − W i makes with the real axis in the W -plane cv (see Fig. 35). Moreover, it is easy to see that θ is independent of any additional D2 or D0 brane charges that the D6 brane may carry, since the central charges of these are finite. So, any soliton ∆ jk where W j is in |W | ≤ Λ, corresponds to a state with the same value of θ, but whose central charge Z(∆ jk ) differs from Z(∆ ik ) by a finite amount W j − W i . Fix now γ = ∆ ik , corresponding to one unit of D6 brane charge, and some D2 brane and D0 brane charges. The degeneracy µ ik of domain walls interpolating between the vacua i and k is simply the degeneracy of the 1-particle states with charge γ, µ ik = Ω(γ).
cu In this section, for simplicity of the notation, we use σ to denote both open and closed twisted masses of the particles on the D4 branes. These include the central charges of D0, D2 and D6 branes, bound to open D2 branes. In addition, since we are not interested in the dynamics of the gauge theory on the D4 branes, but only in the BPS particle content, we have been viewing Σα as non-dynamical, so that the charges q α are simply the global symmetry charges. cv This parallels the treatment in Ref. 53 where the wall crossing of closed BPS bound states corresponding to D6 branes on non-compact Calabi-Yau was studied. Fig. 35. In the W -plane, all the W j i 's are on a single line emanating from W i . W k is infinitely large, and we cut off the W -plane at large radius Λ, shown here in green.
As we vary the moduli, suppose vacuum j inside the cutoff W -plane crosses the straight line between i and k. This then implies that corresponding state γ 2 is a single particle state, with some D0 and D2 brane charges, and no D6 brane charge. So, ∆ ij = γ 2 , and ∆ jk = γ − γ 2 = γ 1 carries one unit of D6 brane charge. The soliton degeneracies are simply the degeneracies of the corresponding one-particle states, so µ ij = Ω(γ 2 ), µ jk = Ω(γ 1 ), and the jump (7.78) in the degeneracies of γ predicted from Ref. 36 agrees with (7.75). Moreover, if the vacuum |j corresponding to γ 2 crosses the ik line in the W plane, a large number of other vacua will cross as well. These are vacua which can be obtained from |i by adding n γ 2 particles. They are all collinear, located at points W jn = W i + nZ(γ 2 ). This holds for any n, as long as W jn is inside the cut-off W-plane. These additional critical points lead to more complicated decays. Let's fix γ 1 = ∆ jnk , the decay product with one unit of D6 brane charge, and consider all the different ways that we can obtain it from γ = ∆ ik . There is is a two-soliton decay, where γ = γ 1 + nγ 2 decays into γ 1 and nγ 2 = ∆ ijn This, according to Ref. 36 corresponds to a change in the degeneracies or Ω(γ) → Ω(γ) + Ω(γ 1 )Ω(nγ 2 ). This is exactly as predicted from M-theory.
There are also channels where nγ 2 is split into more particles, each carrying some multiple of γ 2 charge. Here we need to be careful. Much of the discussion of Ref. 36 assumes that no three vacua are collinear in the W -plane cw . Here, we are in the opposite regime, of a large number of collinear vacua. In this regime, a very naive application of (7.78) overcounts the change in the soliton number.
Recall that, from (7.78), the number of solitons gained or lost, is Ω(γ 1 ) times the number of ways of assembling a chain of solitons of total charge nγ 2 out of the available Ω(kγ 2 ) one particle BPS states particles of charge kγ 2 , where k = 1, 2 . . .. In counting the number of possibilities, the order of in which we string the γ 2 -solitons in a chain would matter. When the vacua are not collinear, the order indeed matters. However here this manner of counting would lead to a contradiction. Consider example, in a decay channel where γ splits into γ 1 and n copies of γ 2 , The n γ 2 particles are all mutually BPS, so in counting the number of such n particle states, we can simply use the free Fock-space, generated by 1 particle states. The dimension of the corresponding n-particle Hilbert space is not Ω(γ 2 ) n , as the naive application of Ref. 36 would suggest, but Ω(γ 2 )(Ω(γ 2 )+1) . . . (Ω(γ 2 )+n−1)/n!. The number of states we gain or lose is just this times Ω(γ 1 ). One should in principle be able to verify this by a careful computation of n-soliton contributions to the index in Ref. 189,36. More generally, we can consider more complicated splits, where n units of γ 2 charge are split among m ℓ particles of charge ℓγ 2 , with ℓ m ℓ ℓ = n. The number of states is just the product of the dimensions of m ℓ particle Hilbert spaces. Of course, this is precisely the counting predicted from M-theory. .

Discussion and Future Directions
In this paper we have seen that many problems in the BPS state counting and wall crossing phenomena have natural and beautiful solutions, which are obtained by rapid developments in this field over the last a few years. However, there are many interesting and important topics which require further exploration. Of course, many of the problems are interrelated, and the solution of one problem is likely to shed light on other problems as well.
• The formula we proved in Section 5 is highly reminiscent of the Ooguri-Strominger-Vafa relation 19 cw If collinearity is coincidental, one can remove it without loss of generalities, simply by displacing the vacua slightly. However in the present case it is physical, and there is no small deformation of the theory that can remove it.
It would be interesting to clarify the relation between them. Of course, one should keep in mind that there are important differences between the two. First, the former relation is verified only for the Calabi-Yau manifold without compact 4-cycles, whereas the latter is believed to hold for any Calabi-Yau. Second, the first relation applies to any chamber, while the second holds only in a special chamber of the moduli space. In particular, as emphasized in Ref. 47, we need to specify the chamber of Z BPS in order to even formulate OSV conjecture. Third, the arguments of Z top are different in the two relations. Finally, we are typically considering different set of D-brane charges; OSV is mostly for D4/D2/D0, whereas (8.1) is currently only for D6/D2/D0. • It would be interesting to extend our analysis to a Calabi-Yau manifold with compact 4-cycles and with multiple D6-branes. As we have seen, it seems to be rather non-trivial to extend the arguments in Section 5 and Section 6 to these situations. This is an important problem since Calabi-Yau geometry with compact 4-cycles frequently appears in geometric engineering and in black hole physics, and comparison with semiclassical entropy formula of black holes (e.g. BMPV black hole 190 ) often requires large D6-brane charges. See Refs. 191,192,193 for recent discussion of multiple D6-brane charges. One should remember that in simple examples, the answer is given by using the non-commutative topological vertex in Section 7.3. For example, if we have a canonical bundle over P 1 × P 1 and if the B-field through one of the P 1 's is very large, we can divide the toric diagram into two along the P 1 and glue the two non-commutative vertices by a propagator as in the usual topological vertex. However, this simply gives the topological string partition function of P 1 × P 1 times the wall crossing factor for C 3 /Z 2 . The interesting question is what happens when the B-fields through both P 1 's become small.
One should also remember that crystal melting model we defined in Section 3 can be defined for toric Calabi-Yau manifolds with compact 4-cycles. The only question is how that partition function is related to the topological string theory, where we have fewer parameters.
Further generalization is to consider compact Calabi-Yau manifolds. This will lead us back to the original motivation in the introduction. This is a notoriously difficult problem in general, but the recent results on the computation of topological string partition function on a some compact example up to high genus 194 will be helpful for this purpose.
• It is an interesting problem to generalize our crystal melting model to string theory compactifications other than Calabi-Yau 3-folds. In principle, when we compactify string theory on a non-compact manifold preserving N ≥ 2 supersymmetry and we have BPS particle of D-branes, the computation of BPS index should reduce to the computation of the Witten index of the supersymmetric quantum mechanics arising as the low energy effective field theory of D-branes. The possible drawback is that in general the connection with topological string theory will be lost. Moreover, identifying the precise form of the quantum mechanics, especially the superpotential, is a difficult problem in general. However, a technique generalizing the brane tiling method in Section 3.2 is available for M2-branes probing Calabi-Yau 4-fold singularities cx , giving rise to a 3d Chern-Simons-matter theories generalizing the ABJM theory 203 . We should also note that there is a quiver description for compact examples, such as quintic 204 . • It would be an important problem to check our prediction for non-toric examples, for example the one in Section 5.4.3. Recently the paper Ref.
89 studies examples C 2 /γ × C, where γ is a discrete subgroup of SU (2). The subgroup γ has a ADE classification, and even for D and E type singularities they proved the relation  195,196,197,198,199,200,201  Since there has recently been significant developments in the understanding of D-brane instantons, these works can provide a different perspective on the problem discussed in this paper, as well as phenomenological motivations. • Crystals similar to the one discussed in this paper appear in the context of counting gauge invariant operators in four-dimensional N = 1 supersymmetric quiver gauge theories (see for example Refs. 223, 224) cy . The difference is that they only consider gauge invariant operators, whereas in our construction of the crystal we used a path algebra, an algebra consisting of all possible operators (regardless of whether gauge invariant or not). This means that our crystal contains the crystal of Ref. 223 as a subset (sublayers). Also, in the definition of the partition function we are using a set of atoms (satisfying the melting rule) , whereas Ref. 223 counts the atoms themselves. This is attributed to the difference between the Euler character and the Hilbert series of the moduli space. Despite these differences, there are some similarities and it would be interesting to understand the relation better. For example, the paper Ref. 223 observes that their crystal changes as they change the value of the B-field and go through the flop transition. This is part of the chamber structure of the Kähler moduli space. Also, the counting of gauge invariants operators in toric examples reduces to counting of the lattice points in the convex polytope (image of the moment map), which is in the same spirit of the discretization of cy This counting problem is also related to the index of 4d N = 1 superconformal field theories 225 . space we saw in Section 4.
• As mentioned in Section 3, the atomic structure we have discovered would have possible implications for quantum aspects of black hole physics. Such discretized structures are common in geometric quantizations, and is reminiscent of the bubbling geometry 140 and Fuzzball conjecture 141 • Fluctuation of the dimer model from the thermodynamic limit is an interesting problem. In Section 4, we have seen that the thermodynamic limit of the crystal partition function gives a genus 0 topological string partition function, and the dependence on the wall crossing disappears in the thermodynamic limit. By studying the fluctuation of the crystal from the limit shape, we should be able to see the higher genus topological string partition function as well as chamber dependence of BPS invariants cz . This should be a doable problem since the dimer model is a kind of an exactly solvable model whose correlation function is known 227,143 in the mathematics literature. The list can go on, but let us stop here. We hope that future developments will solve some of these problems, and will ultimately lead to a better understanding of string theory as a theory of quantum gravity. Note added for the journal version: I would like to thank the anonymous referee for careful reading of the manuscript and for pointing out numerous typos and mistakes in the original version of this paper. In this appendix we are going to explain the one-to-one correspondence between a molten crystal discussed in Section 3 and a perfect matching of the bipartite graph. This means that the problem of counting BPS states can also be reformulated as a problem of counting perfect matchings of the bipartite graph da . Such a description is useful for the discussion of thermodynamic limit in Section 4. The contents of this appendix is basically a recapitulation of Ref. 34. In Section 3.4.1 we considered a quiverQ = (Q 0 ,Q 1 ), which is a universal cover of the quiver Q on T 2 . The dual graph ofQ, which we denote byγ, can be made bipartite using orientation of arrows ofQ, and is a universal cover of the bipartite graph γ on T 2 described in Section 3.2.2. What we are going to do is to give an explicit correspondence between a perfect matching of the bipartite graphγ and a configuration of molten crystal.
We first construct a perfect matching from a molten crystal. Given a molten crystal as shown in Fig. 36, choose all the arrows ofQ which are along the surface of the crystal. In the example of Fig. 36, such arrows are colored green in Fig. 36, while the remaining arrows are colored red. Take the set of the dual of edges colored red. It is proven by Ref. 34 that such a subset of edges ofγ is a perfect matching. This is the perfect matching we wanted to construct.  36. Given a configuration of a molten crystal, we can construct a perfect matching of the bipartite graph. Each arrow is colored green if it is along the surface of the crystal, and red otherwise. The set of dual of arrows colored red gives a perfect matching of the bipartite graph. da A bipartite graph is a graph with vertices colored either black or white and edges connecting vertices of different colors. A perfect matching of a bipartite graph is a subset of edges of the bipartite graph such that each vertex is contained exactly once. See Ref. 237 for an introduction to the dimer model.
In the case when no atoms are removed from the crystal, the perfect matching obtained by this method is called the canonical perfect matching, which we denote by m 0 . Since only a finite number of atoms are removed from the crystal, the perfect matching obtained from a molten crystal by the above method coincides with m 0 when sufficiently away from the reference point i 0 .
Conversely, given a perfect matching m which coincides with m 0 when sufficiently away from the reference point i 0 , we can reproduce a molten crystal. Let us superimpose m with m 0 , and we have a finite number of loops, as shown in Fig. 37 in the case of Suspended Pinched Point. Define a height function h m such that (1) h m (j) = 0 when sufficiently away from i 0 .
(2) h m increases by one whenever we cross the loop and go inside it.
The example of h m for the case of Suspended Pinched Point is shown in Fig. 37. By removing h m (j) atoms from each j ∈Q 0 , we can construct a molten crystal. It was proven in Ref. 34 that the set of atoms removed from the crystal so defined satisfies the melting rule of Section 3.4.2. This establishes the one-to-one correspondence between a molten crystal and a perfect matching of the bipartite graph, meaning that BPS states can also be counted by perfect matchings of the bipartite graphγ.
Finally, let us finish this appendix by pointing out an interesting connection of the canonical perfect matching m 0 with toric geometry. The example of canonical perfect matching m 0 for the Suspended Pinched Point is shown in Fig. 38. In this example, the asymptotic form of the bipartite graph has four different patterns. Each of four patterns is periodic and therefore an be thought of as a perfect matching of the bipartite graph on T 2 . In the brane tiling literature, a perfect matching on the bipartite graph on T 2 is known to correspond to one of the lattice points of the toric diagram 97,112 db . We recognize that the four perfect matchings are identified with the four corners of the toric diagram in Fig. 4-(a) and that the borders between different patterns are identified with the blue lines in Fig. 4-(b), which makes the (p, q)-web of the diagram. In general, for an arbitrary toric Calabi-Yau manifold, we can use the same pattern to construct a perfect matching. Divide the universal covering of the bipartite graph into segments separated by the (p, q)-web of the toric diagram dc . The perfect matching in each segment is periodic and is identified with one of the perfect matchings of bipartite graphs on T 2 , which corresponds to one of the lattice points of the toric diagram and the lattice point in question is precisely the vertex surrounded by the two (p, q)-webs on T 2 dd . This determines a perfect matching. In particular, db For this correspondence, we consider superimposition of perfect matchings and define a Z 2valued height function, which is similar to the height function hm defined previously. dc We choose the diagram that corresponds to the most singular Calabi-Yau manifold. dd In a consistent quiver gauge theory, it is believed that the multiplicity of perfect matchings at the vertices of the toric diagram is one 100 . this means that the ridges of the crystal line up with the (p, q)-web of the toric diagram.
This pattern holds for all toric Calabi-Yau manifolds without compact 4-cycles, and we conjecture that the perfect matching constructed in this way is canonical. We would like to stress again that this conjecture is not needed to construct the crystal melting model. Here we are simply pointing out that, in the examples we have studied, the crystalline structures fit beautifully with the corresponding toric geometries.

Appendix A.2. Multi-Centered Black Holes
In this appendix we briefly summarize the multi-centered black hole solutions discovered in Refs. 238, 239, 240, 241. Why do we need to bother about these black holes? In many examples in the literature, including the Strominger-Vafa paper 8 , the D-brane configurations correspond to single centered black holes. This is not always the case 238 , however, and the BPS index for the D-branes contain contribution from multi-centered black holes in general 242 . In these cases, we need to discuss multi-centered black holes in order to correctly account for the BPS index of the D-branes. Indeed, most of the BPS states discussed in this paper correspond to multi-centered black holes. Moreover, the supergravity viewpoint provides an intuitive description of BPS bound states and their wall crossing phenomena, and even yields the (semi-)primitive wall crossing formula as discussed in Section 6.3. We should also keep in mind, however, that there is a limitation to the supergravity approach, since some of the D-brane configuration discussed in this paper does not have large black holes and therefore validity of supergravity approximation is not guaranteed.
Multi-centered black holes are specified by a set of charges γ i at the "centers" x i of the black hole . The Ansatz for the metric is of the form where the function U ( x) is a warp factor and ω is a one-form. They are determined by BPS equations of motion. In this appendix we neglect higher derivative corrections to the equations of motion. where * 3 is the Hodge star in R 3 , H is a function with values in the even cohomology (specifying D-brane charges) of the Calabi-Yau manifold, and , is the symplectic paring of the even cohomology, as in the main text. The function H, which determines ω through (A.3), is a harmonic function with poles at the position x i of the charges. For N -centered black holes it is given by The equation (A.3) has a nonsingular solution if and only if the following integrability condition is satisfied: where we acted d * 3 on both sides of (A.3) and used the relation In particular, for 2-centered black holes this simplifies to Since the distance between the center should clearly be positive, we have the condition γ 1 , γ 2 Im Z(γ 1 )Z(γ 2 ) > 0. (A.8) which is sometimes called the Denef stability condition de . Wall crossing occurs when r 12 goes to infinity. This is the case when Z(γ 1 ) = cZ(γ 2 ), c ∈ R + . (A.9) This coincides with the result of Section 2.2. Finally, the black hole carries the angular momentum In particular, for a two-centered configuration, This is a classical result, but there is a quantum correction 243 which modifies the result to J 12 = 1 2 (| γ 1 , γ 2 | − 1). (A.12) de In general multi-centered black holes, the integrability is not enough to ensure the existence of physically interesting solutions. For example, we have to check that the discriminant is positive, and that Kähler moduli remain in the physical moduli space. In general, it was conjectured in Ref. 47 that the components of the moduli space of multi-centered black hole solutions is classified by attractor flow trees.
This angular momentum plays crucial roles in the derivation of the primitive wall crossing formula in Section 6.3.

Appendix A.3. Kontsevich-Soibelman Formula
In this appendix we briefly comment on the more general Kontsevich-Soibelman formula. Since the formula itself is not needed in the rest of this paper, the discussion is brief and the interested readers are referred to the original papers 46,244 for more information.
Let us start from the charge lattice Γ, which is the even coholomogy of the Calabi-Yau manifold. We have a natural symplectic pairing , on Γ. Consider a Lie algebra with generators e γ , γ ∈ Γ, satisfying the commutation relations [e γ1 , e γ2 ] = (−1) γ1,γ2 γ 1 , γ 2 e γ1+γ2 . (A.13) We also define a multiplication by e γ1 e γ2 = e γ1+γ2 . (A.14) We define a group element As we have seen in Section 2.2, on the generic walls of marginal stability the decay pattern is γ → N 1 γ 1 + N 2 γ 2 with Z(γ 1 )/Z(γ 2 ) ∈ R + . On both sides of the walls of marginal stability consider the product where the ordering of the product is given by the clockwise ordering of the central charge Z(γ). When we cross the wall of marginal stability, the ordering of the central charges changes, and also the BPS invariants Ω(γ; t) jumps. However, the wall crossing formula states that the whole product (A.17) stays invariant: where t ± is the value of the Kähler moduli on different sides of the wall.
Let us derive the primitive wall crossing formula from the Kontsevich-Soibelman formula. For a decay γ → γ 1 + γ 2 with γ 1 , γ 2 primitive, the wall crossing formula says Since what matters here is only the part generated by e γ1 , e γ2 and e γ1+γ2 , we consider a quotient of the Lie algebra with all other generators. It is easy to see that this is consistent with the commutation relation (A.13). We have Ω(γ i ; t + ) = Ω(γ i ; t − ) for i = 1, 2 because γ 1,2 are primitive. We simply use the notation Ω(γ i ) in the following. We also note that γ 1 + γ 2 is a central element of the quotient Lie algebra. This means that This is (up to an overall sign, which depends on the definition of ∆Ω) the primitive wall crossing formula (6.1). It is also straightforward to derive the semi-primitive wall crossing formula from the Kontsevich-Soibelman formula df .  In this case, we consider the quotient algebra by e N1γ1+N2γ2 with N 1 > 1. This means that e γ1+N2γ2 's commute each other in the quotient algebra. Also, since γ 2 is primitive Ω(N 2 γ 2 ) does not have moduli dependence (at general value of Kähler moduli) . This means that Now recall that Ω(γ 1 + kγ 2 ) with k > 0 is zero on one side of the wall. This means Ω(γ 1 + kγ 2 ; t − ) = 0 for k > 0 dg and we have Ω(γ 1 ) + k>0 ∆Ω(γ 1 + kγ 2 ; t + )p k = l>0 1 − (−1) l γ1,γ2 p l l γ1,γ2 Ω(lγ2) Ω(γ 1 ), (A. 26) which coincides with the semi-primitive wall crossing formula (6.2). This is what we wanted to show.

Appendix A.4. The Parametrization of Chambers by the Weyl Group
In this section we explain the parametrization of chambers of closed BPS invariants by maps σ and θ, as claimed in the main text. The map θ is defined to be a map from the set of half-integers Z h to itself satisfying the following two conditions. First, θ(h + L) = θ(h) + L (A. 27) for any h ∈ Z h . In other words, θ is periodic with period L. Second, Therefore θ is specified by L − 1 (half-)integers, namely L half-integers θ(1/2), . . . , θ(L − 1/2), subject to one constraint (A.28). Let us assume for the moment that θ satisfies the condition We will discuss other cases later. Given σ, we have a specific choice of resolution having L − 1 P 1 's. Moreover, given a map θ we can determine the corresponding value of the B-field B θ by [B θ (α i + . . . + α j )] = ♯{m ∈ Z | θ(i − 1/2) < mL < θ(j + 1/2)}. (A.30) It is easy to see that this gives well-defined values of the integer parts of the B-field, which parametrize the chamber as explained in the main text. Conversely, it can also be proven that given any B-field, we can find a corresponding θ uniquely dh .
When the condition (A.29) is not satisfied, we need to change the choice of the crepant resolution. Choose a permutation Σ of {1/2, . . . , L − 1/2} such that holds. Then we replace θ by θ ′ := θ • Σ and we choose σ ′ so that σ • θ = σ ′ • θ ′ di . Note that the combination σ • θ, which appears in the definition of the vertex in Section 7.3, remain invariant under this process. This means that sometimes different σ, θ and σ ′ , θ ′ corresponds to the same chamber. We can either fix σ and change θ to parametrize chambers, or change both σ and θ for convenience. The latter parametrization is redundant, but sometimes useful.
In the above discussion θ appears somewhat artificially, but θ is often used in the mathematical literature. The reason is that the maps θ makes a group, which is the Weyl group ofÂ L−1 . As is well-known, the Weyl group of A L−1 is the L-th symmetric group, which is a set of isomorphism {1/2, . . . , L − 1/2} → {1/2, . . . , L − 1/2}. The map θ gives a generalization to the affine case. The affine Lie algebraÂ L−1 appears in the formula for the BPS partition function 82,57 , and as we have seen specifies a chamber structure. This is reminiscent of the appearance of the Weyl group of the Borcherds-Kac-Moody algebra in N = 4 wall crossing 212,213 . It would be interesting to explore this point further (see Section 8 for more on this). and this integer N parametrize the chambers. This integer N is the same integer N appearing in (7.17). When N ≥ 0, condition (A.29) is satisfied and we are in one resolution σ. When N < 0, (A.29) is not satisfied and by a flop transition we are in a different crepant resolution specified by σ ′ (1/2) = −, σ ′ (3/2) = +. If we define θ ′ by θ ′ (1/2) = 1/2 + N, θ ′ (3/2) = 3/2 − N, then σ, θ for N > 0 and σ ′ , θ ′ for N < 0 parametrize the same chamber. In this sense, we can either choose σ to be fixed and change θ, or change both σ and θ, although the latter is a redundant parametrization. The chamber corresponding to topological string theory for one resolution σ is given by N → ∞ in (A.32), and another resolution σ ′ given by N → −∞.
dj Sometimes they give the same chamber. This happens, for example for C 2 /Z 2 × C, where there is a unique choice of crepant resolution. Suppose that M is chosen such that the representation λ i is trivial for all i = 1, . . . , M . This means that λ i can be written as In this appendix we give a proof of (7.46). First, the following is clear from the definition: Proposition: Let σ, θ to be maps specifying the chamber for a Calabi-Yau manifold X. Choose an integer M and σ ′ , θ ′ for X ′ = X/Z M such that the following condition holds: Then we have This is because the both sides of the equation are defined by the same crystal with the same weights. The crystal for an orbifold is the same as the original crystal, the only difference being the difference of the weights; the crystal for the orbifold has more colors (variables). However, in the above equation we are specializing the variables so the weights are also the same.