Topological string amplitudes and Seiberg-Witten prepotentials from the counting of dimers in transverse flux

Important illustration to the principle ``partition functions in string theory are $\tau$-functions of integrable equations'' is the fact that the (dual) partition functions of $4d$ $\mathcal{N}=2$ gauge theories solve Painlev\'e equations. In this paper we show a road to self-consistent proof of the recently suggested generalization of this correspondence: partition functions of topological string on local Calabi-Yau manifolds solve $q$-difference equations of non-autonomous dynamics of the ``cluster-algebraic'' integrable systems. We explain in details the ``solutions'' side of the proposal. In the simplest non-trivial example we show how $3d$ box-counting of topological string partition function appears from the counting of dimers on bipartite graph with the discrete gauge field of ``flux'' $q$. This is a new form of topological string/spectral theory type correspondence, since the partition function of dimers can be computed as determinant of the linear $q$-difference Kasteleyn operator. Using WKB method in the ``melting'' $q\to 1$ limit we get a closed integral formula for Seiberg-Witten prepotential of the corresponding $5d$ gauge theory. The ``equations'' side of the correspondence remains the intriguing topic for the further studies.


Introduction
Proposal of the paper. We are going to briefly explain the structure of the puzzle we are aiming to solve, as it is shown on Fig. 1, and our proposal how it could be solved. Then we will get a little bit more into context and motivation of it. Starting from Newton polygon, which is convex polygon with integral coordinates of vertices, one can construct two seemingly unrelated objects. Either go down to toric diagram, encoding some toric 3 Calabi-Yau manifold, partition function of topological string on which can be computed using topological vertices, and which sometimes coincides with the partition function of instantons of 5 = 1 gauge theory. We will call "Fourier" transorm of it to be dual partition function. Or go to the right of the figure, constructing bipartite graph on torus, which encodes cluster integrable system, whose spectral curve have the same Newton polygon. One can deautonomize this system in a canonical way, loosing involutive and preserved hamiltonians, but getting bilinear -difference equations on -cluster variables, for any element of cluster mapping class group of the quiver. It was checked in some examples [8], [12], [9] (all of which were of field-theoretic type), that the string-theoretic partition functions mentioned above are satisfy equations coming from cluster algebras. And despite of the simplicity of formulation, there is no proof for the general Newton polygon yet.
The proposal of this paper is to show how the partition functions of topological string can be obtained in purely cluster algebraic setting, building the missing red arrow on Fig. 1. We claim that in order to deautonomize the cluster integrable system, one has to uplift the Kasteleyn operator from torus to the plane, covering the torus. The deautonomization parameter plays a role of the transverse flux of discrete R >0 -connection. The partition function of dimers, which provided spectral curve in the autonomous case, becomes a partition function of dimers on the infinite plane. We claim, that being properly regularized and with certain scaling of parameters, this partition function reproduces the counting of topological vertices, which constitute topological string partition function.
This proposal is well agreed with the topological string/spectral theory correspondence like in [12], since the partition function of dimers on a plane can be computed using the determinant of Kasteleyn operator, which in this case is almost a quantization of spectral curve. Cluster algebraic interpretation of partition functions opens a room for proving bilinear relations among them as for -cluster variables related by mutations of the cluster seed.
Equations and partition functions. Conjecture that the instanton partition functions solve Painlevé equations was proposed for the first time in [31]. The motivation for the solution came there from a relation between the theory of isomonodromic deformations and the theory of holonomic fields [77]. The claim was that the -function of Painlevé VI equation, which encodes isomonodromic deformations of rank two Fuchsian system with four punctures on C 1 , is equal to the chiral correlating function of four generic primary operators in = 1 conformal field theory. Using AGT correspondence [3] this function was written there as Fourier transformation of 4 = 2 (2) gauge theory with = 4 flavours. The correspondence was immediately generalized by the same authors to the partition functions of theories with = 0, 1, 2, 3 as solutions to Painlevé III and V equations in [32]. It was promoted to higher rank [26], [30], [28], [33], with Virasoro algebra being replaced by algebra. In gauge theoretic terms it was shown that the partition function of ( ) theory with the linear quiver of length solves isomonodromic equations for the Fuchsian system of rank with 2 full and − 2 semi-degenerate punctures [28]. Important observation was that all of the conformal field theories involved in the correspondence were free-fermionic, so the -functions were shown to be free-fermionic then [48], [30], [28].
Natural deformation of the approach of [31] was to solve -difference Painlevé equations with the partition functions of 5 = 1 supersymmetric theories. The first example of this kind was the solution of -Painlevé III equation with the partition functions of 5 (2) gauge theory without matter in [6]. More general case of -Painlevé VI and theories with = 4 flavours was considered in [49]. In [12] it was suggested that there should be similar formulas for the solutions of all -Painleve equations, which might be classified using the Newton polygons 1 with one internal point [73], [8]. Since not all of the Newton polygons of this type might be brought into correspondence to some Lagrangian gauge theory with the well-defined partition function of instantons, it was suggested there to use in this case a grand canonical partition function of topological string instead.
The reason for this was that by any Newton polygon one can construct family of 3 toric Calabi-Yau manifolds (see e.g. [5]), and compactification of M-theory on those (or dual ( , ) branes web) defines 5 = 1 gauge theory [4]. The striking check of the correspondence between Calabi-Yau manifold and gauge theories was that in the cases when the gauge theory posses Lagrangian description, so that the partition function of instantons in Ω-background can be computed, it can be reproduced by the computation of the partition function of topological string on corresponding manifold [45], [46], [17]. The computation of the partition function exploited there was based on the "topological vertex" technique [5]: the Calabi-Yau manifolds under consideration are toric, so they can be cutted into C 3 pieces, glued one with another by transition maps. The geometry can be read off from the "toric diagram", which is dual as a graph to the triangulated Newton polygon, as on Fig. 1. Roughly speaking 2 , to compute the partition function by this picture one associates with each junction of three line segments the topological vertex function where the empty diagrams are associated with non-compact line segments. Taking summations over and , this becomes a partition function of (2) theory with no matter multiplets. Being modified by simple "perturbative" factor and "Fourier" transformed, as in definition of on Fig. 1, bottom, it becomes a general solution of -Painlevé III equation shown on Fig. 1, right, where = ( , ; | ), = ( , ; | −1 ).
Alternative way to compute the same partitions functions utilizes spectral curve [65], which is zero locus of Laurent polynomial with the same Newton polygon as those which were used to build the toric Calabi-Yau manifold, and defines its mirror-dual Calabi-Yau manifold. Topological string/spectral theory correspondence states that the partition function of topological string is equal to Fredholm determinant of infinite-dimensional linear operator, quantizing the spectral curve of the system [60].
Cluster algebras, dimer models and box-counting. The notion of cluster algebras appeared from the solution [24], [75] of the total positivity problem of "How to parametrize all matrices whose minors are strictly positive?". The main component of the solution was the certain anzatses for the factorization of matrices, which might be usefully encoded into planar bicoloured graphs with oriented paths on the graphs corresponding to the monomials in parametrization. The weights in the anzatses served as prototypes for -cluster variables, the minors in the matrices gave birth to -cluster variables, and transformations, identifying equivalent anzatses, became mutations of cluster seeds. The formal definition of cluster algebra was given first in [25]. It appeared soon, that the cluster algebras admit good Poisson structures [35], [36] which are nicely quantizable [7], [20], and provide a convenient language for parametrization of the spaces of local systems on surfaces [19], for theory of stability conditions in algebraic geometry [57] and theory of integrable systems [37], [27], [23].
The important equivalence of counting of paths and counting of dimers on graphs was observed in the context of cluster integrable systems in [27], [23]. Each configuration of dimers is such set of edges on graph, that each vertex is adjacent to exactly one edge from the set, and the difference of such configurations is always a set of closed paths then. The statistical models of random dimers configurations are well-studied [51], [58], and are free fermionic, and all correlators and partition function of the model might have been written using the minors of Kasteleyn operator, which is basically just the weighted adjacency matrix of the underlying graph. The spectral curve, which is generating function of Hamiltonians of the cluster integrable system was written in [27] in the form (3.19), where K 1 ( , ) is the Kasteleyn operator of the graph on torus. It was also shown there, how to construct cluster integrable system with the arbitrary Newton polygon of the spectral curve. The coordinates on phase space of cluster integrable system are -cluster coordinates , which can be conveniently interpreted as monodromies of discrete R >0 connection around the faces of the graph. They are naturally constrained by the condition ∏︀ = 1 because of the triviality of bundle. In [8] it was shown, that relaxation of the condition to ̸ = 1 breaks classical integrability of the model, but "deautonomize" dynamics generated by the elements of cluster mapping class group. It was also shown there, that -cluster variables provide bilinear form for this dynamics, and for the cases of Newton polygons with one internal point, the corresponding dynamical systems are all -Painlevé equations except two.
Another appearance of parameter was in the incarnation of dimer model as a model of statistical physics. The dimer models have nice alternative interpretation as an ensembles of stepped surfaces built from the "boxes" having shapes of the faces of graph, which are stacked one on another. The statistical weights of boxes are equal to weights of faces, and for large periodic graph with fixed boundary conditions the flux through the fundamental domain controls average volume under the surface. The explicit computations of correlating functions for general were done in [69], [70] for hexagonal lattice using the free-fermionic vertex operators, with various boundary conditions. In this case it was just explicitly the problem of the counting of boxes, staying along the wall of the room of complex shape. In the limit = − → 1 the "typical" surface acquires infinite volume ∼ −3 . The "limit shape" problem of finding its shape were solved first using variational methods in [14] for hexagonal lattice, and then in [56] for the general graph and boundary conditions. From the point of view of counting of instantons, the → 0 corresponds to Seiberg-Witten limit [67], where the partition function is dominated by single term, with the free-energy density being equal to Seiberg-Witten prepotential of 5d gauge theory [65].
Extensive number of attempts were made to connect topological string theory, counting of dimers and cluster algebras in the context of so-called "crystal melting" models, see e.g. [74], [44], [43], [62], [15], [79], [71], [63], [13], [1], [80]. The dimer models on bipartite graphs on torus also appeared in string theory in the context of "brane tiling" [38], [21], [42], [22] constructions of 4 = 1 theories. Closest to the exposition of this paper consideration were presented in [39], [40], [41], where the determinant of tight binding Hamiltonian of particle in magnetic field where attempted to be related to the partition function of topological string at | | = 1, and in [54] where both the ideas of "transverse magnetic flux" and of tropicalization were used. Also similar 2 lattice operators in the context of the theory of integrable systems were considered e.g. in [52], [78]. However, there is yet no consistent proof of the conjecture on how the partition functions of topological string should appear from the counting of dimers on the lattices, built by appropriate Newton polygon.
Structure of the paper. In the paper we illustrate all constructions using the single example on Fig. 1.
In Section 2 we introduce basic objects and recollect necessary facts on thermodynamic of dimer statistical models. Then we explain how the "deautonomization" of ∏︀ = ̸ = 1 can be achieved by replacing spectral parameters , in the Kasteleyn operator of dimers on torus by the -commuting operators of magnetic translationsT ,T . We also discuss degeneracy of their action on the space of functions on Z 2 due to their commutativity with the dual magnetic translations.
In Section 3 we discuss → 1 limit. We show how the solution of "limit shape" problem can be derived from the WKB approximation for Kasteleyn operator. We show then that the free energy of the model, properly regularized in this limit, gives closed formula for the Seiberg-Witten prepotential of corresponding 5 = 1 gauge theory. This also provides regularization for the formula of [72] on genus-0 contribution to the partition function of topological string.
In Section 4 we show how all the necessary box-counting degrees of freedom arise from the counting of dimers, resulting in the main formula of equality of partition function of dimers (in the proper limit) to the dual partition function of topological string Then, we discuss some issues of inconsistency of the requirements of "infinite distance" between the walls of the room, and of "freezing out" of non-boxcounting degrees of freedom. In Section 5 we outline results of the paper, and propose some directions for the future developments.

Kasteleyn operator of dimers in transverse flux
In this section we will show, how making edge weights linearly dependent on the position of fundamental cell, one can relax condition ∏︀ ∈ 1 = = 1, deautonomizing cluster integrable system.

Zero flux
Definition of the model. The dimer models are usually defined on bipartite graphs, such graphs Γ that the vertices can be decomposed into black and white subsets = ⊔ , and edges connect only vertices of the opposite colours, see example of Fig. 2. Throughout the paper we assume the graphs to be minimal in the sense of [27]. The edges ∈ are weighted by the positive real statistical weights ∈ R >0 for edges oriented from black to white vertex (which is assumed to be canonical in the following), and by weights − = −1 for the edges taken with opposite orientations. We also extend multiplicatively to any sets of edges by = ∏︀ ∈ . It is often instructive to consider edge weights as discrete connections in R >0 -bundle over Γ. The possible microscopic states of the model are dimers configurations ∈ (Γ) (also called perfect matchings) on Γ, which are such collections of edges of Γ, that each vertex have exactly one adjacent edge from this collection and all edges are taken with the canonical black-to-white orientation. The partition function can be defined, as usual, as a sum of statistical weights over all configurations .
where is R >0 -valued function on vertices, and ( ), ( ) are starting and terminal vertices of edge . So it is meaningful to consider the partition function normalized by the weight of some fixed dimers configuration 0 which depends, for planar graphs, only on gauge invariant face weights = ∏︀ ∈ , since for any dimers configurations , 0 holds ( − 0 ) = 0 and any cycle in a disk is contractible.
Kasteleyn operator. The dimer models are "free fermionic": it simply follows from the definition of determinant, that their partition functions can be effectively computed [51] as determinants where Kasteleyn matrix K Γ : C | | → C | | is twisted by additional signs weighted adjacency matrix of Γ and signs (−1) κ , called Kasteleyn orientation, for every face are required to satisfy condition For planar graph all Kasteleyn orientations are equivalent up to Z/2Z gauge transformations  If the weighting on periodic graph is also periodic = T = T , then by factorization of plane by Z 2 action we obtain associated model on graph Γ 1 embedded in torus T 2 , with the sets of vertices, edges and faces 1 , 1 and 1 , and ℎ, , , projected to cycles ℎ , generating 1 (T 2 , Z). Since any closed cycle on Γ 1 can be decomposed as are some cycles on Γ 1 homotopic to ℎ and , the set of gauge-invariant functions on the space of edge weights is generated by face weights and pair of "monodromies" ℎ = ∏︀ The face weights of dimer model on torus are not independent, they always satisfy a "vanishing of total transverse flux" constraint = ∏︁ since ∑︀ ∈ 1 = 0. We will construct the weighting for the model with non-vanishing flux in the next paragraph. Also, there is no canonical choosing for cycles ℎ , , however there is a "twist" of edge weights by , where ⟨ , ⟩ is a skew-symmetric intersection form with the orientation fixed by ⟨ ℎ , ⟩ = 1, which do not change face weights, but shifts ℎ ↦ → ℎ , ↦ → . We will be using , ∈ 1 and , as a full set of fugacities, determining model with the vanishing flux.

Non-vanishing flux
Below we will use the additive notations for gauge transformations, edge and face weights where g, w and x are cochains from the discrete de Rham complex Using these differentials the gauge transformations and fluxes can be written as w ↦ → w + 0 g and x = ( 1 w)( ). (2.14) We will also refer to elements of 2 (Γ, R) which are not necessary exact as to face weightings. The classification of discrete R >0 -connections on with arbitrary translation invariant fluxes is provided by the following: Lemma. Choose any face weightingx on periodic graph, which is translation invariant T ,x =x. Denote total flux through the fundamental cell by − = ∑︀ ∈ 1x and fix decompositioñ where x, are translation invariant face weightings of zero flux through the fundamental cell is the face, which the crossing ℎ, ∩ , belongs to, and , ′ = 1 if = ′ , and , ′ = 0 otherwise. Then there is a unique up to gauge transformation discrete connectionw such that 1w =x, and its gauge equivalence class is presented by edge weighting where w and are translation invariant edge weightings with fluxes 1 w = x, 1 = , are intervals of ℎ, and , bounded by , , , +1 and ℎ, , ℎ, +1 respectively.
Remark. The illustrating example to this Lemma can be found in Fig. 2, right. Note, that we separated part of face weighting of zero total flux into x and , in order to fix fluxes in → 0 limit by x and to control 'direction' along which the total flux vanishes by . We also put sign "−" at to have < 1 for exponentiated flux = − at positive values of .
Proof. To prove existence of w and , push translation invariant fluxes x and down to Γ 1 . The conditions that x, ∈ Im 1 are equivalent there to x, ⊥ Ker 2 where codifferential 2 : x ′ x ′′ , (2.18) or explicitly by where * is the edge of dual graph, obtained from by counter-clockwise rotation by 90 ∘ . Space Ker 2 is one-dimensional and generated by the constant function Ω : Ω = 1 ∀ ∈ 1 , so orthogonalities (x, Ω) 2 = 0 and ( , Ω) 2 = 0 are guaranteed by (2.16).
This can be computed in any example, and then checked that upon adding vertices to × ( , ) and moving them in a way, which keeps ℎ, ∩ , inside of × ( , ) and do not put other intersection points inside of it, flux remains the same. Intersections of boundaries of other faces with ℎ,• and ,• come in pairs, whose contributions from these terms cancel each other.
To show uniqueness of the gauge orbit, take difference of any pair of discrete connections w 0 =w ′ −w ′′ both having fluxx. It is closed 1 w 0 = 0 and exact where 0, is any path connecting some fixed vertex 0 with , and the sum is path independent as ∑︀ ∈ (w 0 ) = 0 for any closed path , so g is well defined. Thus, g provides desired gauge transformationw ′ =w ′′ + 0 g.
where = − is exponentiated flux per fundamental cell, and the translation operator ← − T ( ) is ordered along the edge product over its intersections with ℎ , , which are images of ℎ, of the basic -commuting "magnetic translations"T , : The notationK 1 (T ,T ) means that we can considerK as a finite matrixK 1 : . For example, this matrix presentation for Kasteleyn operator of the network drawn in Fig. 2 is The space C |Z 2 | as a representation of the algebra of -difference operators byT andT is largely reducible. The degeneracy can be lifted utilizing the algebra of −1 -difference operators, represented by "dual magnetic translations"T Therefore any operator, which is a skew Lauren polynomialQ =Q(T ∨ ,T ∨ ) inT ∨ ,T ∨ , commutes withK in the sense that The form (2.21) of Kasteleyn operator survives under gauge transformations constant inside of fundamental cells, the universal condition determining operators of dual translations is The operatorQ is hypostasis of eponymous Laurent polynomial from [56], which was shown there to label possible limit shapes of dimer model. In the next section we will show that the complex Burgers equation controlling limits shapes in [56] is simply the WKB approximation in → 1 limit to the spectral problem for the Kasteleyn operator (2.21).

Seiberg-Witten integrability in WKB approximation
In this Section we look at the "melting" → 1 limit of vanishing flux for dimer model. The usual arguments of quantum mechanical quasi-classics are applicable to Kasteleyn operator (2.24) in this limit. The main result of this Section is that the free energy (3.24), which is a regularized volume under the "limit shape" (3.18), satisfies Seiberg-Witten equations (3.25). We will use only the example (2.24) throughout the Section, but all arguments of it can be generalized in a straightforward way.

Quasiclassics of vanishing flux at → 1 and height function of limit shape
The main observable in dimer models is "height" function, which counts portions of dimers oriented "horizontally" and "vertically" in average configuration. Its meaning becomes more clear, once the configurations of dimer model are interpreted as stepped surfaces. Let's choose some reference configuration 0 as in (2.3). As for any ∈ (Γ) holds = − , the difference − 0 is a collection of closed and non-intersecting (having no common vertices) cycles on plane, which we interpret as boundaries of "steps". The orientation of cycle determines whether its step is upward or downward. Assuming each step to be of heights 1, the difference of heights between the pair of faces 1 , 2 of Γ is ⟨ * 2, 1 , − 0 ⟩, where * 2, 1 is any path on the dual graph Γ * connecting 1 and 2 and ⟨ , ⟩ is an intersection pairing. Since ( − 0 ) = 0, the heights difference is independent on choosing of path * 2 , 1 for planar Γ. The averaged height function ℎ : × → R computes the mean difference of heights over the ensemble of stepped surfaces It is clear from this definition, that the fugacity in = − controls the "volume" under the stepped surface made out of these loops, since each loop = contributes to the statistical weight of configuration in partition function by ∼ − ·Area( ) . The infinite volume limit corresponds to → 0, and the problem of finding the height function and its fluctuations in this limit is called the limit shape problem.
Due to free-fermionic nature of the model, all correlating functions of any local observables in it can be computed by bare knowledge of two-point Green function G, defined by the equations 3 K · G = Id , [Q, G] = 0. (3. 2) The problem (3.2) for generic is fully solved only for hexagonal lattices with various boundary conditions using free fermionic vertex operators in [69,70]. The knowledge of the solution of (3.2) in few leading orders in at → 0 limit is enough for any purposes of the limit shape problem, but this is still a cumbersome problem. However, the information about height function itself can be heuristically extracted from the structure of KerK ∩ KerQ, which is the solution of the simpler problem K = 0,Q = 0. In coordinates = , = , considered as continuous coordinates on R 2 , these equations become They can be solved order-by-order in using standard quasi-classical anzaets for wave-function In the leading orders 1 # and 0 the consistency conditions for the equations (3.3) become Commutativity ofK andQ implies in the quasiclassical limit that the differential is closed, so the quasiclassical action (0) = (0) ( , ) can be defined by its integration from. In the simplest case when = , the conditions (3.6) and (3.7) can be solved by ∨ =¯, ∨ =¯and one can simplify (3.8) to which up to exact terms is (−2) times an imaginary part of integral of the meromorphic differential , called Seiberg-Witten differential, over the complex curve (3.10) To compute the height function, let's assume now that the local behaviour of model with flux in → 0 limit mimics those of the "homogeneous" model of zero flux on the torus. For homogenous model the height function can be easily computed using an expression for free energy density [58] since the average number of "horizontal" and "vertical" dimers are dual to the "twist" parameters ( , ) At the same time, the zero-mode of homogeneous model is Applying in (3.13) coordinates = / , = / and comparing it with (3.5), one can guess the height function of the model with flux in → 0 limit to be (3.14) The WKB quantization condition coming from single-valuedness of wave-function becomes also the natural condition for height difference between frozen regions of the model [56] to be integral. In the case of = comparing formulas (3.6), (3.7) with (3.12), one can deduce The function Q appears then as a free function, parametrizing the space of solutions of this equation, and controlling the boundary conditions for solutions. So the equation, which in our setup is a consistency condition supporting Hamilton-Jacobi equation, appears also to be the stationary-action principle for 2 field theory. Expression for height function similar to (3.14) was also derived in [56].

Free energy density is Seiberg-Witten prepotential.
The WKB arguments can be also applied to computation of partition function in → 0 limit. The usual heuristics gives the integral formula for the partition function of the model 18) The proportionality of the free energy of the model to the volume 5 under the limit shape is a natural thing: in the leading order, the partition function is dominated by single configuration, and the free energy determined by it is proportional to the sum of areas of all contours which this configuration contains (which is basically volume). It is diverging, and proper regularization of determinant in (3.18) and extension of the formula to the case ̸ = requires careful consideration of the boundary conditions for the model and role of . We will instead define some regularization of Vol guided by its properties and natural equation satisfied by it. In order to to this we need first to make a closer look to the properties of spectral curve ( , ) = 0 and function ℛ. For the purposes of this Section the rescalings ( , ) ↦ → · ( , ) are immaterial, so we will be using here in the equivalent form where are face variables labelled following Fig. 2, left. Curves appearing in planar dimer models are Harnak [55], which means that the logarithmic projection ( , ) ↦ → (log | |, log | |) of spectral curve to R 2 is 2 to 1 mapping in the interior of amoeba 6 ( ) = {( , ) ∈ R 2 | ∃ ( , ) ∈ R 2 : ( +i , +i ) = 0}, (3.22) and 1 to 1 at its boundary. The inverse is also true: any Harnak curve in C * × C * can be obtained from some planar dimer model. For Laurent polynomial (3.19) the curve is Harnak if ∈ R ≥0 , ≥ 0 = 2( √ + 1) which is satisfied because of ∈ R ≥0 , following from positivity of edge weights. The corresponding amoeba is drawn on Fig. 3, left. Complement of amoeba of Harnak curve consists of disjoint regions R 2 ∖ ( ) = ∪ Ω , which are bounded and unbounded ovals. Their combinatorics of ovals is captured by Newton polygon of polynomial -the convex hull of such ( , ) ∈ Z 2 , that is contained in ( , ) with non-zero coefficient. Bounded ovals correspond to integral internal points of , unbounded ovals to integral boundary points, so the amoeba can be contracted to the graph, dual to some triangulation of Newton polygon. The function ℛ, called Ronkin function of in mathematical literature, in case of Harnak is concave function on R 2 , linear of slope ( , ) on oval corresponding to point ( , ) of Newton polygon, and interpolating slopes of ovals in the interior of amoeba, as shown on Fig. 3 It is finite, since at large , graphs or Ronkin functions for with the same values of but different are exponentially close. The overall normalization and presence of boundary terms is justified by the following Claim, which is natural due to the reasons explained in Introduction: Claim. The prepotential ℱ defined in (3.24) satisfies Seiberg-Witten equation where and = − 0 are simple cycles on curve, which intersect with ∩ = 1, as shown on Fig. 3, and orientation of -cycle is such, that it is directed from 0 to 3 when goes along the upper sheet of .
Proof. Firstly, note that = ( ) is analytic function at a generic point, so (3.25) is equivalent to ℱ = , (3.26) and that since ℛ( , ; ) − ℛ( , ; 0 ) is exponentially small at infinity, we can interchange integration and differentiation ∫︁ ∫︁ Decompose R 2 = Ω 0 ∪ ∪ Ω 1 ∪ Ω 2 ∪ Ω 3 ∪ Ω 4 , and consider integrals over the regions separately. For any of Ω or , their shapes depend on , so change of the order of differentiation and integration over any single of them would change integral by additional contact term.
• Let ( , ) ∈ Ω 0 , then where the contour of integration is deformed first from Re = to Re = −∞, keeping Re = , and picking pole at * , such that ( * , +i ) = 0, see Fig. 4. Then the remaining integration over becomes integral of −i over -cycle, and we use that 0 = / = + , assuming that = ( , ) 7 . As ℛ( , ) does not depends on ( , ) ∈ Ω 0 , it remains to compute where we used that = = 0 at 0 . 7 These two steps are equivalent to deformation of 2 contour and picking Poincaré residue of ∧ at = 0 Re = *( ) Figure 4: Slice of the curve by = const section, plotted in coordinate, shown by ovals. The is such that the = const line crosses a hole of amoeba. Red dots are points with the same . Dashed circle is integration contour in (3.28), which has to be contracted to zero.
• For any ( , ) ∈ we can shift integration contour to → −∞, along any sequence of straight segments of rational slope. The poles are picked as in (3.28), because of SL(2, Z) invariance of integration measure where =˜+˜, =˜+˜, with , , , ∈ Z, − = 1. As the integrand is a holomorphic form, the integration contour might be deformed to any convenient smooth contour which goes from = ( , ) to 3 , and then to¯, on another sheet. Using that inside of we can present area element ∧ as we apply integration by parts, to get − ∫︁ ∫︁ (︂∫︁¯( Using that the contours in ∫︀¯( / ) are now closed (since =¯at ), and some of them can be contracted to points at infinity, where ( )/ is exponentially suppressed, the first integral reduces to Using also the values of , ∈ Z on at upper sheet of , which are indicated on Fig. 3, and SL(2, Z) invariance (3.30), we get for the remaining (3.34) All contributions brought together give us identity (3.26).
Another interesting limit can be taken now. It is called perturbative or tropical or decompactification in different contexts. In it, the parameters scale as The amoeba shrinks then to its spine, which is a union of intervals as shown on Fig. 5, and pre-image of projection → becomes 1 over the internal points of intervals, and pairs of triangles, connecting these circles, over the joints of intervals. The Ronkin function in the leading in 5 order become piecewise linear function of , , and integrations in (3.24) becomes trivial exercises in computations of polyhedron volumes. Taking 0 = 2( √ + 1) at which domain Ω 0 shrinks to point, one gets This completely "frozen" by extreme values of parameters configuration will be the starting point in the next Section. However we will "unfroze" it in a different way, keeping finite under extreme values of . Figure 5: Amoeba of the curve in tropical limit. Coordinates here are normalized by 5

Boxcounting in tropical limit
In this Section we will show, how the Fourier-transformed topological string amplitude (1.3) comes combinatorially from the counting of dimers in the running example as on Fig. 2: we identify degrees of freedom corresponding to 0 boxes constituting 3 Young diagrams, 1 boxes constituting 2 Young diagrams and 2 boxes constituting 1 Young diagrams. We also suggest how the properly taken tropical limit for face weights = 5 +x , 5 → ∞ might suppress all the other degrees of freedom, but it appears to be inconsistent with the thermodynamic limit.

Combinatorics of boxcounting
The starting point for the box counting combinatorics is the "empty room" dimers configuration, which is drawn on all four panels of Fig. 6 by coloured dimers. The structure of configuration is similar to the structure of amoeba drawn on Fig. 3: there are four unbounded domains corresponding to Ω 1 , Ω 2 , Ω 3 , Ω 4 , and one internal domain Ω 0 . Dimers configurations in unbounded domains are just the tilings by configurations corresponding to four "external" monomials at , −1 , , −1 in (3.19), and configuration in Ω 0 is one of those at 0 0 . Two parameters defining this configuration are width and height of central domain. For the configuration on Fig. 6 we have = 4, = 5 by the number of fundamental domains filled by purple dimers plus 1. The "rotation in the set of faces" is a transition from one dimers configuration to another by choosing such a set of faces that exactly half of edges on their common boundary (each second edge) is contained in dimers configuration, and exchanging sets of occupied and non-occupied edges on this boundary. This changes the weight of the dimers configuration by the product of the corresponding face weights. There are four classes of transformations of the "empty room" configuration (and configurations obtained from it by these transformations), which correspond to adding of different types of boxes to the room: • Four rotation in the sets of faces as on Fig. 6, left, top. Each rotation of this type is weighted by = 0 = 1 2 3 4 , and corresponds to the addition of 0 box to one of four 3 Young diagrams located in the corners of the room. First rotation of this type opens possibility for three more similar rotations in the adjacent locations, which is in agreement with the fact that there are three 3 Young diagrams containing two boxes. Similar matching works further, until the diagram growing in one corner touches diagram from another corner. This can be easily seen considering e.g. left top corner of the "room" and erasing edges between the faces 2 and 3, 3 and 4, 4 and 1, which are not covered by any dimers there and are not involved into transformations then. Making reduction of pairs of adjacent 2-valent vertices of bipartite graph after erasing, we get hexagonal lattices, which provides 3 box counting [74]. • Rotation shown on a bottom right panel is weighted by 2 and results in the change ( , ) ↦ → ( + 2, + 2). In terms of the boxes, this can be viewed as change of the level of "floor" in the room. Since you can repeatedly apply this transformations, they are enumerated by N or 1 Young diagrams.
• There are also two types of transformations of infinite weights, shown on Fig. 7, left. They change ( , ) ↦ → ( + 1, ) and ( , ) ↦ → ( , + 1), and do not contribute to the partition, since we assume boundary conditions at infinity to be fixed. However, we will be back to them in the Discussion section, we expect them to play an important role in the context of solutions of -difference equations with the partition functions of dimers. From the point of view of box counting, these transformations are corresponding to shifts of the "walls" of the room.
Summation of 3 and 2 boxes is given by boxes ( , , ) in (1.3), 2 , and in the formula are taken at some large fixed values of ( , ). The weight in front of boxes ( , , ) originates from multiplication by 2 factors for ( , ), ( + 2, + 2),...,( + 2 − 2, + 2 − 2). The growth rate 4 3 3 in the exponent is related to the volume of pyramid. It matches nicely with the leading in term in (3.36), where 2 i comes from the different normalization of prepotential compared to the volume. The external summation over is for the summation over the "heights" of the floor, or divergences of size of central domain from ( , ). It has to go in the limits −min( , ) ≤ ≤ +∞, but we can take it to be two-sided infinite, since we are working in approximation , → +∞, which is also important for 3 Young diagrams to not to touch each other. Right: different types of rotation possible in the central region, which are freezing out in tropical limit.
The weights of rotations shown on picture by lime color are

Inconsistency of "freezing out" and thermodynamic limit
We are going to suggest now how to freeze all non-boxcounting "rotations" at once by the proper tuning of weights of faces, and show then why thermodynamically this is incompatible with , → +∞ limit. First of all, there are no possible local rotations of size ≪ , in non-bounded domains Ω 1 , Ω 2 , Ω 3 , Ω 4 , since the dimers configurations which tile them are "extremal": the difference with any other configuration will be a collection of paths which go in one direction and can't go back. There are many possible local rotations in the central domain, as it is shown on Fig. 7, right. We are looking for such limit of faces' weights to zeroes or infinities (tropical limit), that weights of all rotations in this domain are suppressed. We also want to keep finite , so we will assume now 1 2 3 4 = 1 in compare with the weights of individual faces. Then, the partition function of local rotations can be estimated, by selecting the term at 0 0 in the partition function on large torus of size × [58], which can be estimated as Using additive variables in = 5 +x at 5 → +∞, all terms except 1 are vanishing if As a check, one can see that all of the rotations shown on Fig. 7, right, are suppressed in this limit. It also has to be shown that these bounds are enough to suppress all the local rotations in between of domain Ω 0 and other domains Ω . We do not know how to show this systematically though.
Another issue with thermodynamic limit is the instability due to the multiplier ∼

Discussion
In the paper we made several steps towards understanding the role of cluster algebras in the theory of topological string. We have shown how starting from the "deautonomization" of cluster integrable system one naturally gets objects related to topological string: either Seiberg-Witten prepotential in the "melting" limit, or boxcounting of topological vertices in the "tropical" limit. Despite of inconsistencies, outlined in the Section 4.2, this consideration seems to provide proper framework for the construction of the arrow shown on Fig. 1 in the Introduction.
We want to sketch now how the missing arrow from Fig. 1 can be constructed, after resolving of inconsistencies of Section 4.2. First, it has to be understood how the transformations of the weighted bipartite graph on torus, corresponding to the mutations in -cluster algebra, should be properly uplifted to the transformation of quasi-periodically bipartite graph on a plane. Then, in the theory of total positivity, many of -cluster variables are come as minors of the transfer matrices of paths on the bipartite graphs [24], [11], [75], or equivalently to the different minors of the Kasteleyn operator of this graph. We can relate then the different minors of infinitedimensional -difference Kasteleyn operator to the different -cluster variables in deautonomized case. These minors also correspond to the partition functions of dimers with the different boundary conditions. Those, which are related by the unbounded "rotations" from Fig. 7, left, in the boxcounting limit present the same partition functions, but with the slightly shifted parameters. In our example, one can produce four different partition functions in this way, corresponding to ( , ) and its shifts which reproduces shifts of parameters in four -functions in [8]. Then, the -difference equations, satisfied by the dual topological string amplitudes become a Plucker relations between the regularized infinite dimensional minors of Kasteleyn operator, or exchange relations in the corresponding -cluster algebra. The evidences of proper combinatorics, underlying this problem, might be contained in [34], [76], [18].
There is also a number of other intriguing directions, in which the developments of this paper might be continued: • It is conjectured that all the fluctuations of the height function above the limit shape at "infinite volume" → 1 limit can be described using the Gaussian free field in the properly chosen complex structure, see e.g. [53]. In Section 3.1 using the quasi-classical computation for the zero-mode of Kasteleyn operator we provided a heuristic derivation for the height function of the limit shape. Similar quasi-classical computation for the Green function (3.2) would provide a solution for a problem of uniformization of fluctuations in spirit of [56]: for any bipartite lattice and boundary conditions.
However, this equation does not fix -dependence completely. There are also the so-called residue formulas and WDVV equations, which are differential equations on prepotential, involving / derivatives [59], [29]. These formulas would be important approbations for prepotential (3.24) as for the physical prepotential related to gauge theory.
The formula (3.24) has to be extended also beyond the Harnak locus, since it essentially uses the property that the complex curve ( , ) = 0 projects 2 to 1 inside its amoeba. Another promising direction of studies is their extension to the case ̸ = . This is a completely novel direction with no known analogue of Seiberg-Witten equation.
• In [8] the quantization of cluster algebras [7], [20] was also applied, and the non-commutative -difference bilinear equation on quantum -functions where derived there as a result of application of several mutations. The solutions of these equations were provided there in terms of 5 Nekrasov functions with the generic Ω-background, which generalizes the self-dual background of the commutative case. Our approach can be also generalized to this case in a straightforward way, promoting the face variables to be -commutative, and performing the proper normal ordering. In this case, we expect the boxcounting formulas to be upgraded to the ( , ) counting of "refined topological vertices" [47]. Similar ideas were proposed in [66]. Also the property of refined topological amplitude to intertwine the action of quantum toroidal algebra [2] might find its "cluster" interpretation using two-parametric quantization of classical -matrix of [36]. It would be also interesting to "refine" results of [16] in this setting.
• The dimer models are similar to the Hermitian matrix models, since both can be described as specifications of Schur processes [69], [61]. One of the most fundamental properties of matrix models is the genus expansion, when the diagrams of perturbation theory are interpreted as ribbon graphs, and the entire series is interpreted as a summation over all topologies. Similar expansion in -case is more tricky and there is no final answer what to count as "expansion over genuses" in that case yet [64]. However, the dimer models might shed some light on this.
By bipartite graph on surface one can construct bipartite graph on dual surface by twisting all of its ribbons [27]. This can be also done with the graph Γ on the plane R 2 , getting the graphΓ on the infinite genus, but "regular", dual surface˜. Uplifting the paths, which are contributions to the normalized partition function of dimers, to the dual surface, one gets the set of cycles of non-trivial topology on˜. Shrinking all the cycles on˜, which are not winded by these paths, one gets finite genus curve, so the entire partition function becomes a summation over the surfaces of different topologies.
Once the expansion is properly formulated, one can find the observables for -deformed resolvent, cut and joint, and check operators to obtain the loop equations and formulate -topological recursion. This topological recursion might be also useful for the enumerative problems of [50] and [16].
• The phase space of cluster integrable system, as -cluster variety, is equipped with the logarithmically quadratic Poisson bracket for the face variables. For our main example from Fig. 2 the quiver encoding this bracket is drawn on Fig. 2  of coherent sheaves on Hirzebruch surface F 0 = P 1 × P 1 [10]. More striking coincidence is that the formula (4.22) from [10] for the Chern classes [ ; ( 1,1 , 1,2 ); 2 ] of the dual objects ↔ deg 2 , 1,1 ↔ deg 1, , 1,2 ↔ deg 1, , 2 ↔ deg 0 . (5.5) The correspondences above are precise to be just coincidence, so the dimer statistical model should have the deeper meaning in the counting of geometric objects, and there is a point to start. The local 3 Calabi-Yau, a mirror dual to the one defined by = ( , ) with from (3.20), is the total space of the canonical bundle over F 0 [4], and -branes on this total space are in correspondence with the exceptional collection of sheaves on the base [10]. And there is a straightforward way to produce more examples of this kind for check, since the both sides (either local 3 CY and cluster integrable system with the spectral curve ) can be conveniently constructed starting from the Newton polygon.