BPS counting for knots and combinatorics on words

We discuss relations between quantum BPS invariants defined in terms of a product decomposition of certain series, and difference equations (quantum A-polynomials) that annihilate such series. We construct combinatorial models whose structure is encoded in the form of such difference equations, and whose generating functions (Hilbert-Poincar\'e series) are solutions to those equations and reproduce generating series that encode BPS invariants. Furthermore, BPS invariants in question are expressed in terms of Lyndon words in an appropriate language, thereby relating counting of BPS states to the branch of mathematics referred to as combinatorics on words. We illustrate these results in the framework of colored extremal knot polynomials: among others we determine dual quantum extremal A-polynomials for various knots, present associated combinatorial models, find corresponding BPS invariants (extremal Labastida-Mari\~no-Ooguri-Vafa invariants) and discuss their integrality.


Introduction
Counting of BPS states provides an important information about supersymmetric theories and has led to important advances in high energy physics and mathematical physics. In this paper we present a universal construction of combinatorial models related to the counting of a certain class of BPS states. While BPS counting is related to numerous mathematical fields, our discussion on one hand focuses on the issues of quantum curves and A-polynomials, and on the other hand it reveals intimate links of BPS counting with a relatively new area of discrete mathematics, referred to as combinatorics on words [2][3][4].
There are certain classes of BPS invariants, which are defined in terms of a product decomposition of some generating series. One example of such invariants are Gopakumar-Vafa invariants considered in the context of closed topological string theory [5,6]. Analogous invariants for open topological strings were discussed in [7,8], and in particular they were related to knots in [9][10][11]. Integrality of BPS invariants related to topological strings was subsequently discussed among others in [12][13][14][15]. In mathematics invariants defined in terms JHEP11(2016)120 of a product decomposition arise also in Donaldson-Thomas theory. A general theory of Donaldson-Thomas invariants was formulated in [16], and its physical interpretations have been discussed among others in [17,18]. Donaldson-Thomas invariants defined in terms of product decompositions of certain series have been analyzed in particular in [1,19]. There are two classes of all above mentioned BPS invariants, referred to as classical and quantum. The definition of the latter ones, also called refined or motivic, involves an additional parameter q, such that the classical invariants are recovered in the q → 1 limit.
While our results are of more general interest, the analysis in this paper is conducted primarily in the context of Labastida-Mariño-Ooguri-Vafa (LMOV) invariants associated to knots [9][10][11]. From physics perspective LMOV invariants count the number of M2-branes attached to M5-branes in the conifold geometry. The three-dimensional part of M5-branes spans a lagrangian submanifold in the conifold, whose geometry is determined by a type of a knot. LMOV invariants can be regarded as a reformulation of colored HOMFLY polynomials P R (a, q), which are labeled by arbitrary representations (Young diagrams) R and depend on two parameters a and q. In order to determine LMOV invariants one needs to combine colored HOMFLY polynomials into a generating series and consider its product decomposition, with the argument q of HOMFLY polynomials identified as the quantum parameter.
HOMFLY polynomials P r (a, q) ≡ P S r (a, q) labeled by symmetric representations R = S r form an interesting class [20][21][22]. On one hand, it is known that such polynomials satisfy recursion relations that can be represented in terms of generalized quantum Apolynomials [23][24][25][26][27][28], closely related to augmentation polynomials [29]. On the other hand, they form a closed subsystem, within which LMOV invariants can be consistently defined [22]. Therefore the structure of this class of LMOV invariants should be encoded in quantum A-polynomials, and one aim of this work is to reveal such a connection. Moreover, in the classical limit q → 1 quantum A-polynomials reduce to classical algebraic curves, and it was shown in [22] that such algebraic curves indeed encode classical LMOV invariants. Our present work can be therefore regarded as a generalization of [22] to the quantum case. As in [22], in this work we also introduce one additional simplification and consider extremal HOMFLY polynomials, namely coefficients of the highest or lowest powers of a in a given colored HOMFLY polynomial, which we denote respectively as P ± r (q), or simply P r (q). One advantage of the analysis of extremal polynomials is a chance of obtaining explicit, exact results that represent main features of a problem, without delving into technicalities. We denote the corresponding extremal LMOV invariants as N ± r,j or simply N r,j .
Note that (extremal) quantum A-polynomials are examples of quantum curves, which are objects that have been actively studied in last years [30][31][32][33][34][35]. One interesting problem in this field is how to determine whether a given classical algebraic curve is quantizable, and how to formulate a general quantization procedure, which lifts such an algebraic curve into a quantum curve. We believe that the relation between quantum curves and BPS counting that we analyze, and in particular integrality of BPS invariants associated to a given quantum curve, provides an interesting perspective on these problems. An important aspect of our work is an explicit computation of dual extremal quantum A-polynomials JHEP11(2016)120 for some twist and torus knots, summarized in (4.11) and (4.54) and in the attached Mathematica file. In particular an interesting toy model of quantum BPS invariants arises as m = 2 case of (4.11), which defines a novel q-deformed version of Catalan numbers that encode integral invariants; analogous results for other values of m define interesting q-deformations of Fuss-Catalan numbers.
Let us stress that one of the motivations for this work have been the results of Markus Reineke on Donaldson-Thomas invariants for m-loop quivers [1]. It turns out that these particular invariants are closely related to extremal LMOV invariants for framed unknot and twist knots. In general combinatorial models presented in this work are motivated by the construction in [1], and after some redefinitions reduce to that construction in case of framed unknot or twist knots. For this reason some of our notation follows [1] and we discuss relations to that work when appropriate. In particular the results of [1] imply that all maximal LMOV invariants for framed unknot and twist knots are integer, which immediately proves integrality of corresponding classical LMOV invariants for twist knots and divisibility statements, discussed in [22]. What is novel in our approach is that we associate combinatorial models to quantum curves (which have not been discussed in the context of Donaldson-Thomas invariants for quivers), our construction works for quite general class of quantum curves (not restricted to a rather special class of difference equations related to m-loop quivers), and it leads to interesting results in the realm of knot invariants, seemingly unrelated to [1].
The main results of this work are as follows. First, we introduce a generating function of unnormalized colored (extremal) HOMFLY polynomials P (x, q) = r P r (q)x r = r≥1;j;l≥0 1 − x r q j+2l+1 N r,j (1.1) whose product decomposition that involves LMOV invariants N r,j in exponents follows from the general LMOV decomposition [10,11]. It can also be shown [22] that P (x, q) satisfies a difference equation that can be written in the form A( x, y, q)P (x, q) = 0, (1.2) where A( x, y, q) is an (extremal) dual quantum A-polynomial (which is simply related to the operator that encodes recursion relations for colored polynomials P r (q)), x acts by multiplication by x, and yP (x, q) = P (qx, q). We then argue that, instead of considering colored polynomials P r (q) or their generating series P (x, q), it is of advantage to focus on the ratio Y (x, q) = P (q 2 x,q) P (x,q) , which can be regarded as a functional representation of the operator y 2 .
Our main result is a construction of a combinatorial model, whose building blocks are encoded in coefficients of the (dual) quantum A-polynomial A( x, y, q) and can be interpreted as letters in a formal language. One can build words and sentences (series of words) out of these letters. There are two gradings in this model: each letter has a weight q and each word (created out of original letters) in a given sentence is weighted by x. This model is designed in such a way that its generating function (Hilbert-Poincaré series) JHEP11(2016)120 where sgn(s) denotes a sign assigned to a sentence s, wt(s) denotes the total number of original letters in a given sentence, and T n is a (finite) set of sentences consisting of n words and built recursively according to the rules that we specify in detail in what follows.
In general, we believe that combinatorial properties of coefficients Y n (q) deserve thorough studies, especially in the context of knot theory. A further motivation to construct the combinatorial model is that, apart from reproducing Y (x, q) according to (1.3), it provides insight into the structure of LMOV invariants. Namely, regarding sentences built out of original letters as words in a new language, one can consider a set T L of Lyndon words in this language. A Lyndon word, defined as a word that is lexicographically strictly smaller than all its cyclic shifts, is one of basic notions in the field known as combinatorics on words [2][3][4]. In order to take into account signs that appear in the decomposition (1.1) we enlarge slightly a set of Lyndon words and construct related sets T L,+ r consisting of sentences of length r, such that BPS numbers are reconstructed as The integrality of N r,j requires that the sum on the right hand side of the above equation is divisible by [r] q 2 , which is a non-trivial condition that can be regarded as a reformulation and sharpening of the LMOV conjecture. For framed unknot and twist knots such divisibility follows from the results in [1], and we also verify it for some range of r for various torus knots.
The combinatorial model that we construct leads to other interesting results. First, we deduce from it recursion relations directly for LMOV invariants N r,j . Second, in the classical limit q → 1 the dual quantum A-polynomial (1.2) reduces to a classical algebraic curve referred to as a dual extremal A-polynomial in [22] A(x, y) = 0, (1.5) whose solution y = y(x) decomposes as and encodes classical LMOV invariants b r = j N r,j . In terms of the combinatorial model so the integrality condition for classical LMOV invariants amounts to the statement that for each r the sum in the above expression is divisible by r. The interplay between classical JHEP11(2016)120 LMOV invariants and algebraic curves was analyzed in [22], and the above statements explain how those results are related to combinatorial models discussed here. The results presented in this paper could be generalized in various directions. It is desirable to prove divisibility by [r] q 2 in (1.4) for all r, and hence integrality of all extremal LMOV invariants, for other classes of knots. Such relations should be interesting also from the viewpoint of number theory, similarly as discussed in [22]. Apart from extremal invariants, it should be intersting to consider full colored HOMFLY polynomials and include dependence on a in combinatorial models that we construct. Similarly a dependence on the Poincaré parameter t could be included, and models that we consider could be related to colored homological invariants (knot homologies, superpolynomials, super-A-polynomials), considered e.g. in [20,24,26]. In general, combinatorial interpretation of Y n (q) introduced in (1.3) deserves further studies and might lead to interesting reformulations of standard knot invariants. Furthermore, relations between BPS invariants and quantum A-polynomials that we discuss should shed light on quantization of algebraic curves [30][31][32][33][34][35].
The plan of this paper is as follows. In section 2 we review a construction of extremal LMOV invariants and dual A-polynomials. In section 3 we present a construction of a combinatorial model for BPS states and discuss its relations to quantum A-polynomials and combinatorics on words. In section 4 we illustrate our results in examples that include twist and torus knots, and peculiar q-deformations of Catalan numbers. In the appendix we present some technical computations, discuss relations to results in [1], and provide explicit form of LMOV invariants in various examples.

(Extremal) BPS invariants and (dual) A-polynomials
In this section we recall two important features of HOMFLY polynomials colored by symmetric representations: on one hand they encode Labastida-Mariño-Ooguri-Vafa (LMOV) invariants, and on the other hand they satisfy recursion relations, which can be encoded in quantum A-polynomials. We also introduce corresponding extremal invariants, following [22].
First we recall the construction of LMOV invariants [9][10][11] and present its specialization to the case of S r -colored and extremal HOMFLY polynomials [22]. The starting point is to consider the Ooguri-Vafa generating function where U = P exp K A is the holonomy of U(N ) Chern-Simons gauge field along a knot K, V can be interpreted as a source, and the sum runs over all representations R, i.e. all two-dimensional partitions. The LMOV conjecture states that

JHEP11(2016)120
where the expectation value of the holonomy is identified with the unreduced HOMFLY polynomial of a knot K, Tr R U = P R (a, q), for the unknot in the fundamental representation normalized as P 0 1 (a, q) = a−a −1 q−q −1 . The functions f R (a, q) take form where N R,i,j are conjecturally integer BPS degeneracies (LMOV invariants), which count M2-branes ending on M5-branes that wrap a Lagrangian submanifold associated to a given knot K in the conifold geometry. For a fixed R there is a finite number of non-zero N R,i,j . Consider now a one-dimensional V ≡ x. In this case Tr R V = 0 only for symmetric representations R = S r (labeled by partitions with a single row with r boxes) and Tr S r (x) = x r . Denoting P r (a, q) = P S r (s, q), N r,i,j = N S r ,i,j , f r = f S r , in this case we can write (2.2) as so that f r (a, q) are expressed solely in terms of S r -colored HOMFLY polynomials, e.g.
In consequence LMOV invariants N r,i,j for symmetric representations can be consistently defined and form a closed system. Furthermore, we recall that S r -colored HOMFLY polynomials satisfy a linear qdifference equation [27], which for all r ∈ Z (with P r (a, q) = 0 for r < 0) can be written in terms of an operator A( M , L, a, q) called quantum (a-deformed) A-polynomial A( M , L, a, q)P r (a, q) ≡ m,l A l,m (a, q) M 2m L l P r (a, q) = 0, (2.7) where M and L are operators that satisfy the relation M L = q L M and are represented as M P r (a, q) = q r P r (a, q), LP r (a, q) = P r+1 (a, q). (2.8) Multiplying (2.7) by x r , summing over all integers r, then acting with L l M 2m , and denoting the maximal power of L by l max , we can transform (2.7) into l,m A l,m (a, q) x l max −l y 2m P (x, a, q) = 0, (2.9) where x and y are operators acting on the generating function P (x, a, q) as xP (x, a, q) = xP (x, a, q), yP (x, a, q) = P (qx, a, q). (2.10)

JHEP11(2016)120
Finally, we define a dual quantum A-polynomial A( x, y, a, q) = l,m A l,m (a, q) x l y 2m , A l,m (a, q) = A l max −l,m (a, q), (2.11) in terms of which (2.9) is written simply as A( x, y, a, q)P (x, a, q) = 0. (2.12) In the limit q → 1 one can consider classical versions of (dual) A-polynomials and LMOV invariants. In this limit the dual quantum A-polynomial reduces to an algebraic curve A(x, y, a) = 0, (2.13) whose solution y = y(x) = lim q→1 P (qx) P (x) decomposes as where b r,i = j N r,i,j are classical LMOV invariants. Following [22], we can also restrict the results reviewed above to extremal cases, i.e. focus only on coefficients of lowest or highest (bottom and top) powers of a in colored HOMFLY polynomials. To this end we focus on (a large class of) knots that satisfy for some integers c ± and for every natural number r, where p r,r·c ± (q) = 0, and define P ± r (q) = p r,r·c ± (q). (2.16) Likewise, we can consistently introduce extremal LMOV invariants N ± r,j = N r,r·c ± ,j , so that If P r (a, q) is annihilated by A( M , L, a, q), then its extremal part P ± r (q) is annihilated by the operator A ± ( M , L, q) obtained by multiplying A( M , L, a ∓1 , q) by a ±rc ± and then setting a = 0, so that (2.12) reduces to In the classical limit we obtain extremal dual A-polynomial equation A ± (x, y) = 0, whose solution y = y(x) encodes extremal classical LMOV invariants b ± In most of this paper we focus on extremal invariants, so we often suppress superscripts ± and denote extremal HOMFLY polynomials and their generating series, LMOV invariants, dual A-polynomials, etc. simply as P r (q), P (x, q), N r,j , b r , A( x, y, q), A l,m , A(x, y), etc.

BPS counting and combinatorics on words
In this section we introduce a combinatorial model for BPS state counting. We focus on extremal invariants and suppress indices ± in various expressions. A generalization to full HOMFLY polynomials (including a-dependence) or superpolynomials (depending on an additional parameter t) is also possible, however the extremal case enables us to illustrate the essence of the construction, without additional technical complications.
First, we propose to consider the following ratio of generating functions (2.17), which can be considered as a functional representation of y 2 operator where coefficients Y n (q) on the right hand side are defined upon an expansion in x and in particular Y 0 (q) = 1. The function Y (x, q), similarly to P (x, q) in (2.17), encodes all quantum LMOV invariants N r,j , however it has an important advantage: Y n (q), as a coefficient at x n , is a finite polynomial in q (this is not so in case of (2.17), for which coefficients at various powers of x are rational functions in q). This is a crucial feature that enables to construct a combinatorial model. In the classical limit q → 1, Y (x, 1) is identified as a square of (2.14) that solves the classical dual extremal A-polynomial equation A(x, y) = 0. Note that dividing (2.18) by P (x, q), it can be rewritten in the form where the m'th q-power of a function f (x, q) is defined as Our construction of the combinatorial model will be based on the recursive analysis of the equation (3.2), which is expressed in terms of coefficients in the extremal A-polynomial A l,m (q). It is clear that these coefficients cannot be arbitrary -the existence of integer LMOV invariants imposes strong constraints on the form of the generating function (2.17), and so on the equation it satisfies. While precise conditions on A-polynomials that guarantee integrality are quite subtle [30], in what follows we consider a large class of equations (3.2) of the form where Λ is finite subset of N. In the above equation coefficients A l,m (q) take form All examples of quantum A-polynomials for knots that we analyzed are of this form. In particular, this form implies that Y (x, q) ∼ 1 for small x, which is consistent with (3.1).

JHEP11(2016)120
Due to the presence of the last term l∈Λ A l,0 (q)x l we call the equation (3.4) as nonhomogeneous. In what follows we consider first a homogeneous equation (3.6) which is characterized by A l,0 (q) = 0 for l ≥ 1. The combinatorial model associated to the nonhomogeneous equation (3.4) is a generalization of the model for the homogeneous case, and in fact, depending on a knot, A-polynomials yield either homogeneous or nonhomogeneous equations, so in any case it is important to analyze both these cases. For this reason we present first a construction of the combinatorial model for the case of (3.6), and subsequently generalize it to the case of (3.4). In what follows we also use the notation Our aim is to construct a combinatorial model associated to A( x, y, q), whose gener- Therefore Y (x, q) can be thought of as a (signed) Hilbert-Poincaré series of a bigraded free algebra B whose basis is a graded set T = ∞ n=0 T n , sgn(s) denotes a sign of an element s, and an integer-valued weight wt(s) provides the second grading [1].

Combinatorial model, homogeneous case
We construct first a combinatorial model associated to a homogeneous equation (3.6). Note that expanding (3.6) in powers of x we obtain recursion relations for Y n (q) introduced in (3.1) with the initial condition Y 0 (q) = 1. Our first aim is to construct the set T = ∞ n=0 T n introduced in (3.8) in a way consistent with the recursion (3.9), which in particular suggests that T n should be obtained by concatenation of elements of Our construction of T is based on the notion of a formal language, natural in the context of a free algebra. We recall first a few basic definitions. Consider a countable, totally ordered set Σ called an alphabet, whose elements are letters. Strings of letters are called words; an empty word is denoted ε. The set of all words made of letters from the alphabet Σ is denoted by Σ * . Lists of words are called sentences. We denote by Σ * * the set of all sentences made of words from Σ * . For appropriately defined alphabet Σ, our set T will arise as a subset of Σ * * .
The length lt(s) of a sentence s is defined as the number of words it consists of. The weight wt(µ) of a word µ is defined as the number of letters it consists of. We also define an antiword µ as a word µ with the opposite weight assigned, wt(µ) = −wt(µ).

JHEP11(2016)120
A weight of a sentence s = [σ 1 , . . . , σ S ] is defined by wt(s) = S i=1 wt(σ i ). Note that wt([ ]) = wt([ε]) = 0, so wt(s) is insensitive to the number of words in s (as [ ] contains no words whereas [ε] contains one). We denote a concatenation of two words µ, ν ∈ Σ * by µ * ν, and for positive j we define Concatenation of sentences s = [σ 1 , . . . , σ S ] and t = [τ 1 , . . . , τ T ] is also denoted by * In particular for a sentence consisting of one word [µ] For two sentences of the same length s = [σ 1 , . . . , σ S ] and t = [τ 1 , . . . , τ S ] we also define We can present now a recursive construction of a combinatorial model. The initial condition Y 0 (q) = 1 means that T 0 consists of one element of trivial weight, so that it is natural to identify it with the empty list (3.14) Furthermore we choose an alphabet Σ that consists of I = l≥1,m≥1,j |A l,m,j | letters and out of those letters construct I different one letter words, which we assign uniquely to all I units represented by coefficients in the relation (3.9). In order to define the recursion step that determines T n let us: • assume that we have constructed sets T 0 , T 1 , . . . , T n−1 , • fix a partition k 0 + . . .
• fix l, m, j for which A l,m,j is non-vanishing, • fix a one letter word µ corresponding to one unit in A l,m,j .
Then we define a new sentence where ε is an empty word. As sign behaves under concatenation like under multiplication,

JHEP11(2016)120
We define T n as a set of all sentences s constructed in (3.15), considering all possible choices of (l, m, j; s k 0 , . . . , s k m−1 ; µ). Each T n consists therefore of sentences of length n and we denote It follows from the above construction that Y (x, q) defined in (3.1) can be represented as which is the result (3.8) that we have been after. Note that if we define B as the free algebra generated by elements of T with the multiplication identified with the concatenation of sentences (3.11), and bigraded by the number of words and the number of letters, then its Hilbert-Poincaré series is equal to where B n,j is generated by all sentences of n words and j letters (so dimB n,j is the number of such sentences in T ). Therefore (3.18) can be regarded as a signed analogue of HP (B).
In what follows we also illustrate the above construction graphically, by representing words as columns of labeled boxes with letters (growing upwards), and sentences as horizontal series of columns. Therefore elements of T n consist of n columns and their weight is given by the total number of boxes in all those columns (excluding boxes with an empty word ε). Here is an example of a sentence made of 3 words and of weight 5: (3.20)

Extremal LMOV invariants from Lyndon words
Having expressed Y (x, q) as a generating series of the combinatorial model described above, we now show that LMOV invariants encoded in (3.1) also have a natural interpretation in this model and are related to an important notion of Lyndon words. In what follows we consider the following combinations of LMOV invariants N r,j To start with we introduce a set T 0 ⊂ T of primary sentences, i.e. sentences which cannot be presented as a concatenation of other sentences This set decomposes into subsets of primary sentences of length n

JHEP11(2016)120
Elements of T 0 generate a free algebra, which we denote by B 0 . Since every sentence from T can be uniquely represented as a concatenation of primary sentences, there is an isomorhpism of a tensor algebra T B 0 and the algebra B This isomorphism induces a bijection where T 0 * is a formal language over an alphabet T 0 with a lexicographic ordering induced by one from Σ * * . The isomorphism ϕ on s ∈ T 0 is defined as where on the left hand side we treat s as a one-letter word w ∈ T 0 * , whereas on the right hand side s is a sentence [σ 1 , . . . , σ S ] ∈ Σ * * . The action of ϕ on words that contain more letters can be obtained from the fact that ϕ translates concatenation of words in T 0 * into concatenation of sentences in Σ * * Note that the notion of words has now a multiple meaning, which we hope will be clear from the context. In particular words in the language T 0 * can be identified with elements of T , which are sentences from Σ * * . Let us recall now a definition of a Lyndon word: it is a word that is lexicographically strictly smaller than all its cyclic shifts. For example, in the usual lexicographic ordering [abcd] is a Lyndon word, because it is smaller than all its cyclic shifts [bcda], [cdab], and [dabc]. An important Chen-Fox-Lyndon theorem asserts that every word can be written in a unique way as a concatenation of Lyndon words, weakly decreasing lexicographically [2,3].
Consider now a set of all Lyndon words in the language T 0 * and denote by T L the image of this set under ϕ. T L is doubly graded by the number of words and the number of letters and in analogy to (3.23) can be decomposed into subsets of length n Let us rewrite now the generating series (3.18) taking advantage of the Chen-Fox-Lyndon theorem. Consider first the Hilbert-Poincaré series (3.19) and note, that the Chen-Fox-Lyndon theorem implies that every term in the expression s∈T ∼ =(T 0 ) * q wt(s) x lt(s) corresponds to a product of Lyndon words. Since in the Chen-Fox-Lyndon theorem factors decrease weakly, we have to consider all possible numbers of copies s * i of a given Lyndon word s. Ordinary multiplication is commutative so the order in the product over Lyndon words does not matter, although keeping it fixed is crucial for proper counting. It follows that the Hilbert-Poincaré series (3.19) can be determined by considering the product of generators corresponding to Lyndon words (3.29)

JHEP11(2016)120
Analogously, the generating series Y (x, q) can be written as (3.30) and to determine it we have to include the sign dependence in (3.29) and change every Furthermore, we can treat 1 − q 2wt(s) x 2lt(s) −1 as coming from extra sentences. Following [1] we define a new set and denote by T L,+ r a subset of T L,+ consisting of sentences of r words, so that and by T L,+ p,r denote a subset of T L,+ r containing sentences of p letters. Note that is a net number of elements of T L,+ p,r . We can interpret the equation (3.35) as the correspondence between elements of T L,+ and bosonic (for sgn (s) = 1) or fermionic (for sgn (s) = −1) generators. In addition we define (3.37) By comparison of two expressions for Y (x, q) given in (3.1) and (3.35) we then find This is one of our main results. Note that Q r,p are integer and can be constructed for any equation of the form (3.6) (as well as (3.4), as discussed in the next section). However divisibility of Q r (q) by [r] q 2 = 1−q 2r 1−q 2 is not guaranteed, and it equivalent to integrality of BPS invariants N r,j .

Nonhomogeneous case
In this section we generalize the above construction to the nonhomogeneous case (3.4), with A 0,0 (q) = −A 0,1 (q) = 1, A 0,m (q) = 0 for m ≥ 2, and A l,0 (q) = j A l,0,j q j = 0. This generalization does not affect the form of the recursion (3.9) for n > l max , where l max is the largest element in Λ. However it modifies expressions for Y n (q) for n ≤ l max , which we can interpret as a new set of initial conditions. It turns out that we can consider first the homogeneous equation (3.6) as in section 3.1, and modify its solution in order to take the nonhomogeneous term into account. Let us denote sets associated to the homogeneous equation, obtained as in sections 3.1 and 3.2, with an additional a superscript hom. These are the sets of sentences of the form (3.15) T hom = ∞ n=0 T hom n , primary sentences T hom,0 , Lyndon words T hom,L and its modified version, T hom,L,+ ; we also identify the language T hom,0 * with T hom . Now we construct a combinatorial model for the nonhomogeneous equation (3.4). Its first ingredient is a set T nonh = ∞ n=0 T nonh n , similarly as before determined recursively, and with the same initial condition as in the homogeneous case (3.40) Furthermore, we introduce two sets of letters. First, we consider l≥1,m≥1,j |A l,m,j | = I letters assigned to the coefficients of the homogeneous equation, in the same way as before. Second, we augment the alphabet Σ by l∈Λ,j |A l,0,j | = J new letters, which are lexicographically strictly smaller than letters from the first set, and assign |A l,0,j | one letter words to every A l,0,j in A(x, Y, q). We denote one letter words corresponding to every unit in l∈Λ,j |A l,0,j | by α, β, γ, . . ., and one letter words corresponding to every unit in l≥1,m≥0,j |A l,m,j | by µ, ν, ξ, . . .. Now for each one letter word α corresponding to one unit in A l,0,j we define a new sentence of l words and j letters (3.41) Note that this can be regarded a generalization of (3.15) to the case m = 0. We assume that the sets T nonh Note that sentences s(l, j, α) corresponding to nonhomogeneous terms are present in the recursion for T nonh n in two ways: as themselves and as subsentences s k i , but they never contribute to their own recursion with the expression for a new sentence starting with sgn(A l,0,j ) [ε] * (l−1) * [α * j ]. Having constructed all sets T nonh n we form (3.43) We also consider a free algebra B nonh , generated by elements of T nonh . Following section 3.2 we define now a set of primary sentences that generate the free algebra B nonh,0 . We also introduce a formal language T nonh,0 * over an alphabet T nonh,0 , a set of Lyndon words (which are strictly smaller than all their cyclic shifts) T nonh,L in this language, and a modified set then the tensor product of two such elements s belongs to T B nonh,0 , but This is a consequence of the fact that nonhomogeneous terms A l,0 (q)x l do not correspond to the recursion, while A l,m (q)x l Y (x, q) (m;q 2 ) do. In other words, there are "too many words" in T nonh,0 * and this set cannot be identified with T nonh . We can still define a map ϕ that translates words from T nonh,0 * into sentences from Σ * * , analogously to (3.26) and (3.27), however T nonh is a subset of the image of ϕ. To fix this we introduce an equivalence relation on words in T nonh,0 * , by imposing that two words w 1 , w 2 ∈ T nonh,0 * are equivalent, w 1 ∼ w 2 , if their factorizations differ by Lyndon words whose images under ϕ: • are not primary sentences and the first subsentence is s(l, j, α) from (3.41) for some l, j, α, or • are the second or next copies of s(l, j, α) from (3.41) for some l, j, α in the image of factorization.

JHEP11(2016)120
For example w 1 = s from (3.41) is in relation with w 2 = s * s from (3.47), because their factorizations differ by s, whose image under ϕ is the sentence s(l, j, α) that appears the second time in the image of factorization. We can interpret this equivalence relation as trivializing these words in T nonh,L , whose images under ϕ would have arisen in the recursion corresponding to s(l, j, α) from (3.41) for some l, j, α. Now we can define a bijectionφ that maps the conjugacy class in (T nonh,0 ) * /∼ to the image of its shortest representative under ϕ.φ preserves the concatenation, so we can write We also define 3.4 Y n (q) vs. Q r (q) and explicit recursions for LMOV invariants So far we have provided a recursive construction of a combinatorial model that yields Y n (q) and Q r (p) = pmax p=p min Q r,p q p on the level of generating series, so that Let us point out that, apart from the recursive construction, also a direct relation between Y n (q) and Q r (p) can be given. This relation takes form Similarly, the equation (3.53) can be interpreted as a generalization of a multinomial formula, which corresponds to elements of growing size (1v 1 + . . . + nv n = n versus ordinary v 1 + . . . + v n = n) that can be multiplied only in one particular order. This is in fact the case of the Chen-Fox-Lyndon theorem, where every sentence (from T = ϕ((T 0 ) * ) in our construction) can be written in a unique way as a concatenation of elements (from T L ) weakly decreasing lexicographically. In other words, there is a one-to-one correspondence between sentences from T n and Lyndon factorizations, i.e. weakly decreasing concatenations of v 1 elements from T L 1 , v 2 elements from T L 2 , etc., such that 1v 1 + . . . + nv n = n. Equation (3.53) is simply a signed and weighted sum over two sides of this correspondence: a summation over elements of T L gives s∈Tn sgn(s)q wt(s) = Y n (q), while a signed and weighted sum over all Lyndon factorizations gives the right hand side of (3.53).
Furthermore, the result (3.53) can be also transformed into an explicit recursion relation for LMOV invariants N r,j . We present an example of such a recursion relation in section 4.2.

Classical limit
In the classical limit q → 1 the equation (3.2) reduces to an algebraic curve where A(x, Y (x)) is an extremal dual A-polynomial [22].

Examples
In this section we present several examples of combinatorial models associated to knots. We take advantage of formulas for normalized (reduced) colored superpolynomials P K,norm r (a, q, t) derived in [24][25][26]. To determine LMOV invariants we need to consider unreduced polynomials P K r (a, q) = P 0 1 r (a, q)P K,norm r (a, q, −1), (4.1) where colored HOMFLY polynomials for the unknot take form P 0 1 r (a, q) = a −r q r (a 2 , q 2 ) r (q 2 , q 2 ) r (4.2)

JHEP11(2016)120
where (x, q) r = r−1 k=0 (1 − xq k ). P 0 1 r (a, q) satisfy the recursion relation Following section 2 this relation yields the equation for the generating series of colored HOMFLY polynomials, which can be written as and which encodes just two LMOV invariants N 1,−1,0 = −1 and N 1,1,0 = 1. When discussing extremal invariants, colored polynomials should be normalized by extremal colored polynomials of the unknot, which can be read off from (4.2)

Twist knots and q-Fuss-Catalan numbers
There is a large class of knots, whose extremal normalized colored polynomials take form In the language of [20] these are knots whose homological diagrams have a single generator in a top or bottom row (i.e. corresponding to a maximal or minimal degree of variable a).
Including the unknot normalization (4.6) and introducing m = m − for the minimal case and m = m + + 1 for the maximal one, unnormalized polynomials corresponding to (4.7) read P m r (q) = (−1) rm q r 2 m−r(m−1) (q 2 ; q 2 ) r . (4.8) In fact many objects are characterized by this expression. First, twist knots K p form one class of knots whose extremal colored polynomials take form (4.8). In this case p = −1, −2, −3, . . . denotes 4 1 , 6 1 , 8 1 , . . . knots and their maximal invariants correspond to m = m + +1 = 2|p|+1, while p = 1, 2, 3, . . . denotes 3 1 , 5 2 , 7 2 , . . . knots whose maximal invariants correspond to m = m + + 1 = 2p + 2. Minimal invariants for all twist knots K p with p < 0 correspond to m = m − = −2, however minimal invariants for twist knots with p > 0 are not of the form (4.8). In addition m = 0, 1 correspond respectively to the minimal and maximal colored polynomials for the unknot. The case m = 2 does not correspond to any knot, however it is related to a certain (non-standard) q-deformation of Catalan numbers, and similarly arbitrary m is related to a (non-standard) q-deformation of Fuss-Catalan numbers. Values of m corresponding to twist knots are summarized in will take advantage of these results to show integrality of LMOV invariants corresponding to (4.8). Note that P m r (q) satisfies a recursion relation of the form which equivalently can be written as Upon redefinitions discussed in section 2 we find a difference equation for the generating series P m (x, q) = ∞ r=0 P m r (q)x r . In terms of Y m (x, q) = P m (q 2 x,q) P m (x,q) defined in (3.1) this can be rewritten in the form (3.2) and we can construct a combinatorial model, following the prescription presented in sections 3.1 and 3.2. Since in this case l≥1,m≥1,j |A l,m,j | = 1, the alphabet Σ consists of one letter and all words and sentences in the model are built out of a unique one letter word µ.

JHEP11(2016)120
of weight wt(φ) = wt(s) = φ 1 + φ 2 + · · · + φ n . Now (4.14) is equivalent to with all operations on lists inherited from respective operations on sentences (note that φ (k i ) denotes a list equivalent to the sentence s k i from T k i , whereas φ i denotes the i-th element from the list φ). Using (4.16) recursively we can construct a set of all n-element lists φ = (−1) (m+1)n [φ 1 , φ 2 , . . . , φ n ] such that If φ satisfies these conditions we call it a maximally-2(m − 1)-step list. It follows that T n is equivalent to the set of all maximally-2(m − 1)-step lists of n elements, and T = n T n is the set of all maximally-2(m − 1)-step lists. Furthermore, following (3.22), we call a list φ primary if (4.18) and T 0 = n T 0 n is a set of all primary maximally-2(m − 1)-step lists. We can build T 0 recursively. Note that a list φ is primary if and only if it is of the form so it corresponds to the partition k 0 = 0, k 1 + k 2 + . . . + k m−1 = n − 1. In consequence we can write that T 0 n is a set of all φ(m, [], φ (k 1 ) , . . . , φ (k m−1 ) ) for all choices of partitions k 1 + . . . + k m−1 = n − 1 and lists φ (k 1 ) , . . . , φ (k m−1 ) from T k 1 , . . . , T k m−1 respectively. Having constructed T 0 , we identify it as a new alphabet with the ordering induced from N. Following section 3.2 we define also the set of Lyndon words T L , and T L,+ , and ultimately LMOV invariants are given as in (3.39) Interestingly, the model discussed above, associated to colored polynomials (4.8), is equivalent to the combinatorics of the degenerate Cohomological Hall algebra of the mloop quiver considered in [1]. In particular it is proven in [1] that Donaldson-Thomas invariants for m-loop quiver DT (m) r (q) determined from such a model are integer, and in appendix B we show that these invariants are related to our LMOV invariants by a simple redefinition N m r (q) = (−1) (m+1)r q 3r−2 DT (m) r (q 2 ). In consequence LMOV invariants N m r,j are integer too, which proves the LMOV conjecture in the extremal case for a large class of knots. Moreover, in the classical limit this proves divisibility statements presented in [22].

Explicit recursion relation for LMOV invariants
From the knowledge of the dual A-polynomial equation one can determine an explicit recursion relation for LMOV invariants. We illustrate this statement in the case of the equation of the form (4.12), corresponding to colored polynomials in (4.8). Let us consider first a non-negative integer m and consider combinations N m r (q) = j N m r,j q j+1 introduced in (3.21). In this case The leading term (of order x 0 ) in (4.12) reads 1 − Y m (0, q) = 0, which implies the initial condition N m 0 (q) = 1. Comparing coefficients at higher powers of x we get a relation (4.23) The condition 1v 1 + . . . + nv n + (n + 1)v n+1 = n + 1 in the summation in the left hand side is satisfied either for v n+1 = 1 and v 1 = . . . = v n = 0, or for v n+1 = 0 and 1v 1 + . . . + nv n = n + 1. It follows that (4.23) can be written as which constitutes an explicit recursion relation for N m r (q). Analogous computation for the equation (4.12) with negative m, for leads to the same initial condition N m 0 (q) = 1 and a recursion of the form .

JHEP11(2016)120
For example the minimal dual A-polynomial for twist knots K p with p < 0 knot reads A( x, y, q) = y 4 − y 6 − q 5 x, or equivalently it takes form (4.11) with m = −2, which imposes an equation (1 − y 2 + q x y −4 )P (x, q) = 0, so that (4.12) takes form Solving then (4.26) with m = −2 we find that N −2 r (q) have integer coefficients and encode correct extremal LMOV invariants for K p knots with p < 0, for example (4.28)

m = 2 and novel q-deformed Catalan numbers
As a more specific example let us consider (4.8) with m = 2. This case does not correspond to any twist knot, however it provides a certain non-standard q-deformation of Catalan numbers, which is interesting in its own right. In this case the equation (4.12) takes form (4.29) and it leads to the following recursion relation for C n (q) = (−1) n Y n (q) with the initial condition C 0 (q) = 1. In the classical limit (4.29) reduces to 1 − Y (x) − xY (x) 2 = 0, which is also the classical dual A-polynomial equation for 5 2 knot (however the quantum equation (4.29) does not encode quantum LMOV invariants for this knot). For Y (x) = n Y n x n , the coefficients C n = (−1) n Y n are ordinary Catalan numbers that satisfy C n = k 0 +k 1 =n−1 C k 0 C k 1 , hence C n (q) can be regarded as q-deformed Catalan numbers. The crucial property of C n (q) is that they encode integer invariants N r,j through (3.1), which is not the case for another, more standard q-deformation of Catalan numbers c n (q) defined via c n (q) = k 0 +k 1 =n−1 q k 1 c k 0 (q)c k 1 (q) [36], so that C n (q) = q n c n (q 2 ). Let us construct now a combinatorial model, following the prescription given in section 4.1. As m = 2, T n is a set of all maximally-2-step lists of n elements and sign (−1) n , which can be represented in terms of lists or column of boxes (all filled with µ, which we suppress): The above representation can be also translated to a familiar representation of Catalan numbers in terms of Dyck paths, i.e. paths above a diagonal in a square grid, connecting JHEP11(2016)120 bottom left and top right corners of the square. In this case columns in the above pictures correspond to rows in the grid of the Dyck path, and every box is translated to one triangle left to the diagonal, respectively of the form and . For example [1,1] = corresponds to two triangles in two rows, so the resulting Dyck path is shown in the left in figure 1. Similarly [1,3] = corresponds to one triangle in the bottom row and three triangles , , and in the top row, and the resulting Dyck path is shown in the right in figure 1. Ordinary Catalan numbers C n are given by the number of Dyck paths in a square of size n. In addition the exponent of q in ordinary q-Catalans c n (q) counts the number of full squares above the diagonal and restricted by a given path, whereas for C n (q) defined via (4.30) the power of q counts all over-diagonal triangles or . Let us illustrate other ingredients of the combinatorial construction. T 0 in the Catalan case is a set of all primary maximally-2-step lists, and its subsets with up to 3 elements are Counting the number of boxes in the above pictures and including signs we get 40) thus BPS invariants N r,j for r = 1, 2, 3 take form N 1,0 = −1, N 2,1 = 1, N 3,4 = −1.

m = 3 and 4 1 knot
Let us illustrate the construction from section 4.1 also in the case m = 3, which corresponds to maximal invariants for 4 1 knot. In this case the equation (4.12) reads and the recursion relation (4.13) takes form  and therefore T 2 = {[1, 1], [1,3], [1,5]} in the notation of lists, or in more detail which is the set of all maximally-4-step lists of 2 elements. For n = 3 there are 6 partitions of n − 1 which correspond to:

Torus knots
In this section we find quantum dual extremal A-polynomials and determine LMOV invariants for torus knots of type (2, 2p+1), and present in detail a construction of a combinatorial model for the trefoil knot. For (2, 2p + 1) torus knot colored normalized superpolynomials (labeled by appropriate p) take form [26] P p,norm r (a, q, t) = a 2pr q −2pr 0≤kp≤...≤k 2 ≤k 1 ≤r where n k = (q 2 ;q 2 )n (q 2 ;q 2 ) k (q 2 ;q 2 ) n−k . Extremal unnormalized HOMFLY polynomials P p r (q) are obtained by including an appropriate unknot factor (4.6), setting t = −1 and ignoring a 2pr ; in addition in the minimal case the product k 1 i=1 (1 + a 2 q 2(i−2) t) must be ignored, while in the maximal case one should pick up from this product only the coefficient (−1) r q 2 r i=1 (i−2) = (−1) r q r 2 −3r (at the highest power of a) and fix k 1 = r in the overall expression.

JHEP11(2016)120
To determine dual extremal quantum A-polynomials we first find -using [37] -quantum extremal A-polynomials that annihilate (or impose recursion relations for) the above extremal colored HOMFLY polynomials, and then, as explained in section 2, we determine their dual counterparts that annihilate generating series (2.17), according to (2.18). Dual extremal quantum A-polynomials for 3 1 and 5 1 knots found in this way take form These results, together with results for 7 1 and 9 1 knots, are summarized in the attached supplementary Mathematica file. These dual quantum A-polynomials are quantum versions of, and in the limit q → 1 reduce (possibly up to some simple factor) to, classical dual extremal A-polynomials introduced in [22]. Note that maximal colored polynomials and dual quantum A-polynomial for the trefoil correspond to m = 4 in (4.8) and (4.11), however all other A-polynomials for torus knots are more complicated than those discussed in section 4.1. Moreover, dual minimal A-polynomials for torus knots are of the nonhomogeneous form (coefficients in (3.4) include A l,0 = 0 for some l) discussed in general in section 3. 3. In what follows we present in detail a combinatorial model associated to the minimal A-polynomial for the trefoil knot and determine corresponding LMOV invariants. Moreover, both for trefoil and for 5 1 , 7 1 and 9 1 knots, in appendix C we illustrate that Q r (q) are indeed divisible by [r] q 2 -which is a consequence of the structure of associated combinatorial models -and so quantum LMOV invariants, identified as coefficients of N r (q), are indeed integer.
Let us construct a combinatorial model for minimal invariants for the trefoil knot 3 1 , following section 3.3. From the form of A − 3 1 ( x, y, q) in (4.54) it follows that (3.4) takes form so that A 1,0 = 1. We focus first on the homogeneous version of this equation that does not include the term q −1 x, and construct T hom = n T hom n as described in section 3.1. Since I = l≥1,m≥1,j |A l,m,j | = 4, we consider an alphabet of four letters and corresponding four one-letter words, which we assign to terms in the homogeneous version of (4.55), see table 2.

JHEP11(2016)120
Furthermore, according to (3.44), we pick primary sentences T nonh,0 = n T nonh,0 n from T nonh . In particular for n = 1, 2 we find Now we treat T nonh,0 as an alphabet and construct a language T nonh,0 * . However recall that this time T nonh T nonh,0 * . Let us show this explicitly. We define T nonh,0 * n as a subset of T nonh,0 * whose elements, when mapped by ϕ defined in (3.26) and (3.27), consist of n words. For n = 1, 2 we have Following section 3.3 we define a set of Lyndon words T nonh,L in the language T nonh,0 * and T nonh,L n = T nonh,0 * n ∩ T nonh,L . For n = 1, 2 we obtain In the next step we define T nonh,L,+ according to (3.45)

JHEP11(2016)120
In order to adjust T nonh,0 * to T nonh we define a relation ∼ as explained in section 3.3. This relation trivialises some elements of T nonh,0 * 1 and T nonh,0 * For classes with one elementφ reduces to the action of ϕ on the representative, for example (4.73) Now we define T L according to (3.49) and T L n =φ T nonh,L n /∼ , in particular and then determine T L,+ r and T L,+ , in particular (4.75) Counting boxes in these sets and including signs, we determine Q r (q) and N r (q) as in (3.50) (4.76) We conclude that quantum LMOV invariants for r = 1, 2 take form Results for Q r (q) and N r (q) up to r = 9, which in particular confirm integrality of quantum LMOV invariants, are given in table 6.
A Relation between Y n (q) and Q r (q) In this appendix we prove the relation (3.53) by a direct computation. From (3.1) is non-zero at x = 0 only for r = 1. To get a non-zero result for r > 1 we need to take additional r − 1 derivatives of −rx r−1 q j+1+2l ∂ r xỸr,l,j (x, q) Furthermore, only derivatives of multiple orders in r give non-zero contribution at x = 0 ∂ rv xỸr,l,j (x, q) x=0 = 1 v! rv r, r, . . . , r r!N r,j q j+1+2l r! (N r,j + 1) q j+1+2l × . . .
and analogously Note that the expansion of r−1 l=1 N r (q)q 2l (v) in terms of (N r (q)q 2l ) (t l ) is the same as in an ordinary multinomial formula.
Once we found ∂ rv xỸ r (x, q) x=0 we can calculate ∂ n x Y (x, q) x=0 using the Leibniz rule. Note that the n-th derivative ∂ n x in ∂ n x rỸ r (x, q) x=0 , when acting onỸ r (x, q) with r > n, always gives 0. Therefore B Relation to the model in [1] Extremal colored polynomials for twist knots labeled by non-negative m, discussed in section 4.1, are closely related to generating series associated to m-loop quivers analyzed in [1]. For this reason the combinatorial model presented in section 4.1 is equivalent to the model describing combinatorics of the degenerate Cohomological Hall algebra of the m-loop quiver, introduced in [1]. In this section we present precise relation between these two models.
Open Access. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.