Decomposing Nekrasov Decomposition

AGT relations imply that the four-point conformal block admits a decomposition into a sum over pairs of Young diagrams of essentially rational Nekrasov functions - this is immediately seen when conformal block is represented in the form of a matrix model. However, the q-deformation of the same block has a deeper decomposition - into a sum over a quadruple of Young diagrams of a product of four topological vertices. We analyze the interplay between these two decompositions, their properties and their generalization to multi-point conformal blocks. In the latter case we explain how Dotsenko-Fateev all-with-all (star) pair"interaction"is reduced to the quiver model nearest-neighbor (chain) one. We give new identities for q-Selberg averages of pairs of generalized Macdonald polynomials. We also translate the slicing invariance of refined topological strings into the language of conformal blocks and interpret it as abelianization of generalized Macdonald polynomials.


Introduction
Conformal blocks [1] are among the most interesting and important quantities under study in modern theoretical physics. Perturbatively they are defined as series of matrix elements in highest weight representations of Virasoro algebra, see [2] for recent reviews. Non-perturbatively they are examples of matrix-model τ -functions [3], associated with peculiar conformal [4] (also known as Dotsenko-Fateev [5] or Penner [6]) matrix models, and exhibit non-trivial and almost unexplored behavior in various regions of moduli space [7]. Their modular transformations [8] are important for the study of knot polynomials (Wilson loop averages in Chern-Simons theory [9]), see [10] for a recent outline. AGT relations [11] connect conformal blocks to LMNS quantization [12] of the Seiberg-Witten theory [13] and express them in terms of Nekrasov functions [14]. Both the matrix model and Nekrasov function formalisms imply natural lifting of original conformal blocks to (q, t)-dependent quantities -looking from different perspectives this can be either a β-or a q-deformation, associated with 5d generalization of Seiberg-Witten theory [15]. It is at this level that the full duality pattern gets clear and manifest.
Finally, as a quintessence of all this, conformal blocks are expressible through topological vertices [16] -and this will be the story we concentrate on in the present paper. This relation involves not only the full-scale theory of Schur and Macdonald functions [19], but also conceptually important notions of star-chain duality and Selberg factorization. The idenitification between q-deformed CFT blocks and topological vertices has been used in [20] to prove the spectral duality [21] of the former. In the present paper we generalize this identification to the higher-point case. We also clarify the relation between preferred direction in refined topological strings and the basis of states in conformal field theory Hilbert space.

Conformal blocks and characters
Conformal blocks are best described by the version of Dotsenko-Fateev (DF) conformal matrix model, introduced and investigated in [22] where B U (1) is an explicit function representing the contribution of an extra free boson. We find it most convenient to use the number k of independent integration contours as a parameter -then what we get is a (k + 2)-point conformal block, while the number of bifundamentals in the gauge theory description below will be k − 2. The parameters of conformal block can be conveniently summarized in a diagram, such as one shown in Fig. 1. External dimensions are parameterized by the "momenta" v i , while internal dimensions β ∆ a = α 0 + v 1 + . . . + v a−1 + βN 1 + . . . + βN a−1 α 0 + v 1 + . . . + v a−1 + βN 1 + . . . + βN a−1 + β − 1 (3) are expressed through the numbers N a of screening integrations, i.e. conformal block is considered as analytical continuation of the integral in the number of integrations. It is important for this description that the integral is of Selberg type [23] and analytical continuation in N a is actually under control. The next important fact [24] is that the inter-screening coupling is reduced to a square of with i.e. to a bilinear combination of Jack characters J A , which for β = 1 are just ordinary Schur functions χ A . Since (4) still needs to be squared, this reduces the four-point conformal block to a bilinear combination of bi-character Selberg averages [23] over x and y, which are exactly calculable rational combinations of v-parameters, and are basically nothing but Nekrasov functions [14], labeled by arbitrary pairs A, B of Young diagrams. This line of reasoning reduces AGT relation [11] between conformal block and Nekrasov functions to Hubbard-Stratanovich resummation of Selberg integrals [22]. There are important details, making the story a little more technically involved, especially for β = 1 (i.e. for the central charge c = 1) [25], [20], but in what follows we try to separate concepts from technicalities, putting simplified general considerations before exact, but overloaded, formulas.
After q-deformation (which in the Seiberg-Witten theory framework means going from 4d to 5d Yang-Mills theories [15]), the integral remains basically the same, only the integration is replaced by Jackson q-integration 3 [26]: (1 − q m Λ 2 · · · Λ k z i ) Most importantly, now it acquires additional, refined decomposition -which for k + 2 = 4 is not bi linear, but rather quadri linear: -and this is the decomposition which is related to topological vertex [16], [17], [18] and geometric engineering [27]. The origin of two extra Young diagrams is simple: summation over them substitutes integration over x and y variables in the definition of averages in (6) -this appears to be the right way to interpret the multiple Jackson integrals/sums in (7).

Seiberg-Witten theory and topological string pattern
To better understand the origin of the multi-character decomposition let us investigate the structure on the gauge theory side of the AGT duality. Conformal blocks correspond to instanton partition functions of quiver gauge theories which are given by Nekrasov formulas. The comb-like (k + 2)-point conformal blocks on a sphere N fund correspond to linear quiver theories, in which the gauge group is a product of (k − 1) U (N ) factors and the matter content is encoded in the quiver diagram as, e.g. in Fig. 2.
Here a circle is a gauge group, a box denotes a collection of matter hypermultiplets, a outgoing (resp. incoming) link connecting a circle with a box indicates that the corresponding hypermultiplets transform as a fundamental (resp. antifundamental) under the gauge group. The structure of the corresponding Nekrasov function is modelled after the quiver diagram above: where the definitions of the rational factors z fund,vect,... are given in Appendix A. The structure of each term in the decomposition is linear, in particular for a (k + 2)-point conformal block there are k − 1 vector multiplet contributions and k − 2 bifundamental matter hypermultiplets. Such quiver or chain decomposition of the conformal block is obtained by inserting a special basis of states |∆, Y labelled by a pair of Young diagrams in the intermediate channels of the block: In the language of DF integrals this corresponds to the decomposition of the measure µ DF (x) in sets of orthogonal polynomials as in Eq. (4). Each matrix element in Eq. (10) is then given by the Selberg average of a collection of orthogonal polynomials as in Eq. (6). For c = 1 the special basis which reproduces the corresponding factor in the Nekrasov function (9) is given by Schur polynomials. We will compute the most general matrix element using q-Selberg averages and show that it is indeed given by the Nekrasov expression. For 5d gauge theories compactified on a circle of radius R 5 the structure of Nekrasov function remains basically the same. The only change is that all the monomial factors in the rational functions z fund,vec,... are transformed into q-analogues roughly as x → q x − 1, where q = e − 2 R5 . However, quite remarkably in this case Nekrasov partition function -or conformal block -turns out to have yet another interpretation. Gauge theory in five dimensions can be obtained by compactification of M-theory on a toric Calabi-Yau threefold. Partition function of the resulting theory is equal to the (refined) topological string partition function, which can be computed by the topological vertex technique as follows.
One first draws the toric diagram of the CY threefold and assigns to each internal edge the complexified Kähler parameter Q of the corresponding two-cycle. One also assigns a Young diagram to each internal edge, and an empty diagram to each external edge. There are in general only trivalent vertices in the diagram, and to each of them one assigns a certain function C Y1Y2Y3 (q) -the topological vertex [16] -depending in a cyclically symmetric way on three Young diagrams Y a residing on the adjacent edges and also on the parameter q = e − 1R5 : where q ρi = q 1 2 −i and κ(A) = (i,j)∈A 2(j − i). The partition function is computed by summing up over all the Young diagrams with weights given by the product of all topological vertices and the "propagators" of the form (−Q) |Y | f Y (q) n where n is the framing factor depending on the relative orientation of the edges adjacent to the given edge.
The toric diagram corresponding to a gauge theory with a product of k U (N ) groups is drawn using the recipe of geometric engineering. It is the crossing of N horizontal and k vertical lines, which intersect as shown e.g. in Fig. 3. There is a natural decomposition of the toric diagram depicted on Fig. 3 which leads to the same quiver structure as in Fig. 2 and the Nekrasov expression (9). One should perform the sums over all Young diagrams except those residing on the horizontal edges marked with Q B,i , which are related to positions of the vertex operators in the conformal block and the gauge theory couplings Λ i . In this way one obtains a sum over a chain of pairs of Young diagrams of certain rational factors, which turn out to coincide with z vect,fund,... for t = q (we introduce t = q β ). The resulting expression has exactly the form of Nekrasov function (9). Moreover, each term in the Nekrasov decomposition can now be decomposed into an infinite sum of simpler building blocks Z R AB , related to the four-point topological string amplitude on resolved conifold. In the language of CFT this leads to the decomposition and we show that the r.h.s. is nothing but the q-deformed version of DF integral expression for the matrix element in the l.h.s. Another natural decomposition of the toric diagram -cutting along the vertical edges marked with Q F,i (related to Coulomb moduli of the gauge theory and intermediate dimensions in the conformal block)corresponds to the spectral dual Nekrasov function. The gauge theory origin of this dual description is that in 5d instantons are BPS particles as are the gauge bosons. Spectral duality exchanges these two sets of BPS objects and therefore leads to a nontrivial identification between two gauge theories. We will show that the spectral dual decomposition of the toric diagram has a natural interpretation in terms of DF integrals of q-CFT -it is the sum featuring in the discrete Jackson integrals, each vertical leg corresponding to a separate integration contour in (1). Therefore, the spectral dual decomposition over horizontal lines of the diagram corresponds to the DF integrals themselves, while the original Nekrasov decomposition is the sum over a complete set of intermediate basis states in the CFT: Our goal in this paper is to explain the relation between Eq. (7), Eq. (9), and Fig. 3. We will learn that the identification between conformal block and Nekrasov function requires a nontrivial rewriting of the Vandermonde determinant (which is the product of all-with-all form) into the sum of Nekrasov form (which is of nearest-neighbour form). We first clarify the relation of the toric diagram and the DF integral schematically in the simplest case of the four-point conformal block (k = 2). Extension to arbitrary k involves an a priori non-trivial star-chain identity, which is in fact the key to understanding DF description of conformal blocks and relies upon the basic properties of representation theory. Another crucial property is Selberg factorization -a mysterious conspiracy between the integrands and integration measure in DF theory, between what is averaged and how it is done. This property guarantees that the averages of certain polynomials over the q-Selberg measure factorize into products of linear factors depending on the parameters of the integral. The last mystery is that the elementary building block in the quadrilinear decomposition of conformal blocks, i.e. the topological vertex, is closely related to the modular kernel and therefore to certain knot polynomials.

Refinement and slicing invariance
The calculation we have just described yields the Nekrasov function of the 5d gauge theory with the particular choice of Ω-deformation parameters, i.e. 1 = − 2 , or equivalently t = q, which corresponds to c = 1 in CFT. To obtain the partition function in a general Ω-background, one has to use refined topological vertex 4 [17]: where ||A|| 2 = i A 2 i and M (q,t) C (x) are Macdonald polynomials. Notice that one of the legs in the diagram is marked with a double stroke and the other two bear t and q labels on them. This is to indicate the right order of the indices and arguments of the refined vertex, which depends on two deformation parameters and is not cyclically symmetric as was the case for t = q.
The calculations generally get more technically involved, though the strategy remains the same. The only essentially new feature in this case is the naive loss of rotation symmetry of the diagram: the vertical and horizontal lines are no longer equivalent. However, it turns out that the symmetry in fact survives even for general t and q, though the individual vertices and propagators are not symmetric. This statement came to be known as the slicing invariance hypothesis. For toric geometries, which we consider, slicing invariance is also equivalent to spectral duality [21] of the corresponding Nekrasov partition functions, since the two sides of the duality are related to the π 2 rotation of the whole toric diagram including the choice of preferred direction. We look at different choices of "slicing" of the toric diagram and relate them to different choices of the basis in conformal field theory. One slicing direction corresponds to the "naive" basis of Schur polynomials χ A , the other -to the basis of generalized Macdonald polynomials M AB . The first set of polynomials does not have factorized q-Selberg averages and does not reproduce the Nekrasov factors, while our calculations indicate that the second one does. Schematically The last equality is a new generalization of the "factorization of averages" type of identities, studied in [25], [20]. We investigate the connection between the two sets of polynomials and introduce generalized Kostka functions K CD AB transforming one basis into the other: These functions are effectively performing the π 2 rotation of preferred direction. In more algebraic terms they are related to the abelianization map [29] acting on the basis in K-theory of instanton moduli space.
The paper is partitioned into a set of sections with increasing level of detail and complexity. After reviewing the basic steps of the construction at the simplified level in sec. 2 we fill in the details and provide full-fledged formulas for the unrefined case in sec. 3. We then treat the refined case in sec. 4. We provide a summary and point out future directions in sec. 5.

Basic steps
In this section we introduce our approach to Dotsenko-Fateev integral expansion without q-deformation. We consider first the most simple example of four-point conformal block and show how decompose the integrand in terms of Schur polynomials. Next we consider the multi-point block and observe that a nontrivial star-chain duality is required in this case. We demonstrate this duality explicitly using skew Schur functions.

Four point conformal block, no q-deformation
In the case of four-point conformal block there are two contours of integration: C 1 stretching from 0 to 1 and C Λ stretching from 0 to Λ −1 . Therefore, the variables in the integration in Eq. (1) are divided into two groups: x i and y i and the inter-screening pairings are decomposed into a product The vertex operator contributions also decompose into a product of two factors: Making a change of variables y i → yi Λ we can write the cross terms which we denote by µ cross (x, y) as follows: Employing the Cauchy completeness identity (4) we get the expansion of the cross contributions in terms of Jack polynomials: where

After this decomposition the DF integral becomes the double Selberg average of Jack polynomials
where the averages are taken with respect to the measure µ(x|u a , v a , N a , β) . For general β the averages (17) do not give the Nekrasov expansion of the conformal block (a more refined basis of generalized Jack functions J AB depending on a pair of diagrams is required [25]). However, for the special case β = 1 when Jack polynomials turn into Schur functions the structure of Nekrasov sum is indeed reproduced [22].
Thus, from the four-point case without q-deformation we learn that decomposing the inter-screening pairings in the DF integral in terms of characters and then taking the Selberg averages produces Nekrasov representation of the conformal block. We now move to the multi-point case where the star-chain duality is required to obtain Nekrasov decomposition.

An apparent paradox
If one approaches the multipoint case in a naive way one arrives at what seems to be a paradox. The DF representation contains a product of all pairings between screening operators, i.e. an expression of the form However, the gauge theory corresponding to the multipoint comb-like conformal block is a linear quiver of the form depicted in Fig. 2, and its Nekrasov partition function contains only the nearest neighbour pairings: Thus the multilinear decomposition of the DF integral should also have the nearest-neighbor structure. In the four-point case there are only two term in the product, so that all-with-all (star) type interaction is the same as nearest-neighbour (chain) one. But how can one decompose the multi-point product (19) into a sum of nearest-neighbour products, how can star become equivalent to a chain?

Skew characters
The resolution of the paradox is technically based on the properties of skew characters, where c A BC are the Littlewood-Richardson coefficients, describing multiplication of representations: Directly from the definitions, Moreover, this is straightforwardly generalized to Convolution with χ A [z] gives: i.e.

Resolution of the star/chain problem. From chain to star. Bifundamental kernel
We claim that the chain of skew characters indeed reproduces the star-like structure of the DF integrand. The basic building block of the chain decomposition is the bifundamental kernel where ]. Two such kernels, averaged over the Selberg measure like N AB [y]N CD [y] , correspond to a single bifundamental field in Nekrasov partition function of the gauge theory depending on two pairs of diagrams (A, B) and (C, D).
. We start with the case of five-point conformal block. Using the identities from the previous section, we can rewrite the chain answer into the Dotsenko-Fateev (star) form: Similarly for a general (k + 2)-point conformal block:

From star to chain
Inverting this short derivation, we see that it is an iteration of the two-step procedure, which starts from and ends at m = 2 with x = y 0 . In obvious notation: 5 There is another curious identity, which would be useful for toric blocks: Underlined piece goes directly to the chain-side of the identity, while the remaining multi-character is combined with the next product Since, whatever are the sets u and w, we get: (35) and we are ready for the next iteration. At k = 3 this can be pictorially represented as Dots here stand for characters, and arrows point from χ to χ * . At two steps we apply (22) to substitute the encycled product of characters by a single character. Note that only dots at the same place which are both either starting or end-points of the arrows can be merged in this way. Likewise at k = 4: The main secret behind this derivation is that the structure constants in (22) are always the same -do not depend on the number of "Miwa variables" y i in χ[y 0 , . . . , y m ] -what allows to merge entire collections of points and parallel arrows in above examples. This conspiracy between characters and the structure constants adds to associativity of multiplication and together they provide the star-chain equivalence.

Factorization of Selberg averages
The "chain" decomposition of DF integrals (31) is also tied with the structure of the Selberg averages. More concretely, the averages of the bifundamental kernels (29) are given by the factorized formulas: where and a = (a, −a), b = (b, −b). This factorization means that expansion of the DF integrand in terms of the bifundamental kernels N AB indeed reproduces the Nekrasov decomposition. In the next section we will compute the q-deformed averages and show how to decompose them even further to obtain topological vertices.

Complete formulas for t = q
In this section we flesh out the basic formulas introduced in the previous section and incorporate q-deformation into our framework. After q-deformation, we obtain the natural identification of DF integral decompositions with topological vertices. We start with especially symmetric example of the four-point conformal block of q-Virasoro algebra and then consider multi-point blocks. We calculate q-deformed Selberg averages of the skew characters and identify the elements of the multilinear decomposition with topological string amplitudes.

Four point conformal block (t = q)
The origin of the quadrilinear expansion of the four point conformal block is straightforward to see: two diagrams come from the character decomposition and two more represent the two integration contours in the DF integral (which becomes a sum in the q-deformed case [20]). The corresponding toric diagram is depicted in Fig. 4 and the four diagrams are denoted by A, B, R + and R − . The DF representation is given by the sum over DF poles labelled by two partitions R ± : The contribution of the q-Selberg measure µ (x|u, v, N, q, q can be evaluated explicitly and is written as follows: and χ

(N )
A (x) denotes Schur polynomial in N variables x i . The cross contribution reads where p n = N+ i=1 x n i , q n = N− j=1 y n j and we have employed the Cauchy identity and the identity χ A (−p n ) = (−1) |A| χ A T (p n ). Collecting all the contributions one obtains Using the identities where is the open topological string amplitude for the resolved conifold. Pictorially S AB (Q) is given by one corner of the toric diagram from Fig. 4. It is also equal to the Chern-Simons (or WZW) S-matrix. Figure 4: Toric diagram corresponding to the four-point q-deformed conformal block and 5d U (2) gauge theory with four fundamentals.
Using the AGT relations (81) one immediately obtains the identification between the Kähler parameters of the toric Calabi-Yau, CFT and the gauge theory parameters: Let us state once more the result for the four-point q-deformed conformal block for t = q. This block can be simultaneously decomposed in two ways: DF integral and the decomposition in terms of the complete basis of states. Using the simplest choice of basis states (Schur functions) one gets a symmetric quadri linear decomposition in terms of characters. Moreover, this decomposition is naturally identified with the corresponding topological string amplitude, computed using the topological vertex technique. We now move on to describe the multipoint case.

Multipoint (t = q)
In section 2.2.3 we understood the star-chain transformation for ordinary DF integrals. The q-deformed case goes along the same lines. Also, as in the four-point case above, we obtain a natural interpretation of the objects featuring in the decomposition from the point of view of the topological strings.
Using the star-chain relation we rewrite the Vandermonde measure in the multipoint DF integral as a sum over chains of skew Schur functions. We consider the corresponding expansion of the k-point DF integral in terms of k q-deformed Selberg averages of skew Schur functions (cf. Eq. (31)): where . . . ua,va,Na,q,q denotes the q-Selberg average with the corresponding parameters and Y 0 = Y k = (∅, ∅). Each average depends on two pairs of Young diagrams Y a−1 , Y a and corresponds to the element of the toric diagram depicted on Fig. 5. Notice that a certain U (1) factor appears in the left hand site. It can be nicely eliminated in the four-point case, though not for higher multipoints.
In the next section we show that each average in Eq. (47) indeed reproduces the bifundamental part of the Nekrasov function. The whole sum thus becomes the Nekrasov function for linear quiver gauge theory, of the form depicted in Fig. 2. Figure 5: Toric diagram corresponding to bifundamental field in the Nekrasov function. It is also equal to q-deformed Selberg average of two bifundamental kernels as in Eq. (47).

Factorization of averages
Let us check that the DF averages of the bifundamental kernel N AB [x] indeed factorizes. To do it we use the loop equations, which are given in Appendix B. We obtain a formula for the average of four Schur polynomials: where and the definition of G (q,t) AB and z (q,t) bifund are collected in Appendix A. This indeed proves that the average of four Schur polynomials gives the bifundamental Nekrasov contribution.

Identification with topological strings
We would like to further decompose the q-Selberg average in Eq. (48) to observe the structure of the corresponding topological string amplitude from Fig. 5. Notice that each average contains a product of two bifundamental kernels N AB [x]. This corresponds to the product of two four-point functions each having the form: where Q 2 = q N . Recall the expression for the q-deformed Selberg measure (41), which consists of two Schur polynomials. The product of two four-point amplitudes (52) therefore gives exactly the product of q-Selberg measure with two bifundamental kernels as in the average (47). More explicitly, gluing two amplitudes (52) one obtains the amplitude from Fig. 5, which is given by: where Q 1 = q −N −v , Q 2 = q N , Q F = q u+v+N −1 and S u,v,N,q,q is the q-Selberg integral without character insertions. Thus, the DF average of four Schur functions is the same as the topological string amplitude on two resolved conifold geometries glued together. Moreover, we explicitly identify the sum over intermediate states residing on the vertical edge of the diagram on Fig. 5 with the DF q-integration. What corresponds to the whole DF integrands on the topological string side? One uses the star-chain relation (30) to glue together a chain of bifundamental kernels and obtain the Vandermonde determinant, the main constituent of the DF integrand. This corresponds to gluing the topological string amplitudes (52) together as depicted in Fig. 6. Figure 6: Toric diagram corresponding to "half" of the DF integrand for the five-point conformal block. It also give the spectral dual Nekrasov expansion of the corresponding linear quiver gauge theory with gauge group U (2) 2 .
Performing the sums one gets the following expression for the glued amplitude: where Eq. (54) gives exactly half of the terms in the DF integrand. The whole integrand consists of the q-Selberg measure (41), which includes two Schur functions, and the "cross term" (43), which is given by a square of the Vandermonde determinant. The other half of the terms arises from the lower half of the toric diagram, so that the total integrand is obtained as in Fig. 3:

Refinement
In this section we lift the previous results to the case of t = q. In this setting topological string theory requires refinement. There exist two essentially equivalent forms of the refined topological vertex, IKV [17] and AK [18]. The two versions are related by a simple change of basis, so that the answer for any closed string amplitude is the same in both computations. However, open string amplitudes must be transformed by matrices, attached to each external leg of the diagram. We use IKV vertex throughout this paper since it seems to be more convenient for comparison with the results in the unrefined case. Refinement introduces a preferred direction and breaks the cyclic (rotation) invariance of each individual topological vertex. However, slicing invariance hypothesis states that the whole closed string amplitude remains invariant under rotations of the diagram, or equivalently under the change of the preferred direction.
In this section we elucidate the mechanism of slicing invariance by computing the partition function for vertical and horizontal slicings. We set the preferred direction to be vertical. We observe that while the horizontal slicing indeed reproduces the DF sum (and the corresponding spectral dual Nekrasov decomposition [21]), the vertical slicing does not give the factorized terms of the Nekrasov function. It requires a further change of basis from Schur functions to generalized Macdonald polynomials. Moreover, unlike the change of basis, which transforms the two types of refined topological vertices, this change of basis is "nonlocal", i.e. it does not factorize into a product of matrices each rotating its own external leg of the diagram. The matrix depends on the whole array of states on the parallel external legs of the diagram as well as on the distances (Kähler parameters) between the legs.
The total matrix of the transformation is a certain triangular matrix depending on the Kähler modulus for each external line. It is natural to call this matrix generalized Kostka function by analogy with the ordinary Kostka polynomials, which are the transition coefficients between Schur and Macdonald polynomials. We therefore explicitly identify the transformations corresponding to the change of preferred direction. Algebraic meaning of these transformations will be investigated elsewhere.

q-Selberg measure
Let us first write down the refinement of Eq. (43), i.e. express the q-Sleberg measure for t = q as a product of Macdonald polynomials. We recall [20] that the Jackson q-integral is in fact a sum with x i taking discrete values x R,i = q Ri+1 t N −i where R i are the columns of a Young diagram. The q-Selberg measure µ (x|u, v, N, q, t (1 − q a x i ) evaluated at x i (R) can be nicely expressed through Macdonald polynomials: Notice the following useful symmetry We will use this form of the Selberg measure to identify the DF integrals of the q-deformed CFT with the amplitudes of the topological string on toric CY backgrounds.

Generalized bifundamental kernel
Having understood the measure of the q-Selberg integrals in terms of Macdonald polynomials, we now proceed to describe what is being averaged in the Nekrasov decomposition of the conformal block. Recall that to obtain the chain or quiver-like decomposition of the block one needs to choose a special basis of intermediate states, so that the matrix elements reproduce the individual terms of the Nekrasov partition function. For the unrefined case this basis was simply given by the product of Schur polynomials, and the matrix elements were give by q-Selberg averages of two bifundamental kernels N AB [x] (as in Eq. (48)). For the refined case the basis is more elaborate: it is given by generalized Macdonald polynomials, which depend on two Young diagrams and do not factorize into products of two polynomials. The relevant matrix elements are given by the q-Selberg average of what we call generalized bifundamental kernel N AB,CD , a convolution of two generalized Macdonald polynomials: where ||M (q,t) E is the norm of Macdonald polynomials and generalized skew Macdonald polynomial is given by 6 M (q,t) AB (Q|p n ,p).
One can immediately notice that for t = q N (q,q) exactly reproducing the unrefined case (48). Generalized Macdonald polynomials are obtained from the kernel by forgetting about one of the two pairs of Young diagrams: One can also get the product of two ordinary Macdonald polynomials by setting the two "cross-wise" diagrams to be empty: The most remarkable property of the generalized bifundamental kernel is that its q-Selberg average is factorized into a product of simple monomials (90). More concretely, it is given by the bifundamental contribution to the Nekrasov function (hence the name of the kernel). Schematically Averages of this kind can be obtained by using the loop equations for q-Selberg integral (or (q, t)-matrix model).
The full form of the average (62) and technical details are summarized in Appendix B. Thus, we prove that generalized bifundamental kernel is indeed the relevant object to be averaged to get the chain-like decomposition of the DF integral. Let us now try to find similar objects in refined topological strings.

Vertical slicing
We start from the refinement of the basic building block, i.e. the four-point amplitude (52) and set preferred direction to be vertical. The general refined amplitude depending on four Young diagrams is given by Eq. (92). For our purposes we need the following specializations: and To make contact with DF integrals we make the identification We immediately notice that two Macdonald polynomials in Eqs. (63) and (64) each give precisely one "half" of the q-Selberg measure (56).
Skew Schur functions in Eqs. (63), (64) can be rewritten through the discrete q-Selberg "integration" variables x i (R) = q Ri+1 t N −i in the following way: Let us glue two four-point functions (63) and (64) to obtain the q-Selberg average: where S u,v,N,q,t is the q-Selberg integral without insertions. We have used the identity (56) and made the identification Q F = q u+v+ 1 2 t N − 3 2 . At this point one observes that the expression under the average is not the generalized bifundamental kernel (58), which would give the bifundamental contribution as an average. Instead it is simply a product of two Schur polynomials. However, closer look reveals that the arguments of the Schur polynomials exactly match (up to the factors 1−t n 1−q n ) the arguments of the generalized bifundamental kernel after the elementary transformation x i → q 1−v x −1 i as can be seen e.g. from Eq. (91). This leads us to the relation between Nekrasov functions and the vertical slicing of the refined amplitude. To get it we will need to introduce generalized Kostka functions.

Generalized Kostka functions
The basis of generalized Macdonald polynomials can be reexpanded in terms of Schur polynomials: where the coefficients K AB CD (Q, q, t) can naturally be called generalized Kostka functions by analogy with the ordinary Kostka polynomials 7 , defined as As an explicit example we give here generalized Kostka functions for the first level: To transform skew Schur into skew generalized Macdonald polynomials in the generalized bifundamental kernel we use the following identity, which is the consequence of the Cauchy completeness theorem: The combination of Macdonald functions of the conjugated power sums p n in the last line exactly reproduces that in the generalized bifundamental kernel (58). What is left is to transform Schur polynomials into generalized Macdonald ones with the help of generalized Kostka functions (68), (69). Eventually, we obtain the connection between refined topological string amplitude with vertical slicing and bifundamental Nekrasov function: . (74) 7 Our definition of generalized Kostka functions can be modified slightly to turn them into polynomials. This is achieved by using a different normalization of generalized Macdonald polynomials, called M (q,t) AB in Eqs. (19), (20) in [20].
Note that generalized Kostka functions in this formula depend on the "distance" (in the sense of Kähler parameters) between the pairs of horizontal external legs of the toric diagram. Let us also point out that our Kostka functions are q-deformation of the coefficients of the abelianization map acting on the instanton moduli space.

Horizontal slicing. DF representation and spectral dual Nekrasov function.
Let us glue three pieces (63) together horizontally to obtain the DF integrand for five-point conformal block and its AGT dual -U (2) 2 quiver gauge theory. The resulting amplitude is equal to "half" of the total DF measure µ DF (x (1) , x (2) , x (3) ) evaluated at discrete points x a,i = q Ra,i+1 t Na−i . We get: Three Macdonald polynomials in the second line can be thought of as a "half" of the three q-Selberg measures, corresponding to three integration contours in the DF representation. Moreover, the measure (75) can be evaluated explicitly and also gives the "half" of the spectral dual Nekrasov function with gauge group U (3), cf. (77) (the other half of the factors comes from the lower half of the diagram): where Z ∅ (Q) = Z ∅ ∅ ∅ ∅ Q, q, t . This is a manifestation of the spectral duality for Nekrasov functions [21]: while vertical slicing of the toric diagram gives Nekrasov function for U (2) 3 quiver gauge theory, the horizontal slicing yields its spectral dual -gauge theory with a single U (3) gauge group. In the language of conformal blocks [20] this means that both the Jackson integral and the sum over complete basis of generalized Macdonal polynomials have the form of Nekrasov decompositions, which are spectral dual to each other. For refined topological strings only one Nekrasov decomposition can be obtained for a given choice of preferred directionthe cut should dissect the preferred edges. If one cuts along a different direction the amplitudes do not reproduce the Nekrasov functions, as can be seen in Eq. (67). However, there is still a way to see the dual decomposition: preferred direction can be changed with the help of generalized Kostka functions (71), (72).

Conclusions and discussion
We have investigated the connection between q-deformed conformal blocks and topological strings. This connection arises in the following way. Due to the AGT relation conformal blocks are equal to Nekrasov partition functions, which can be obtained by the geometric engineering technique, as compactifications of type IIA strings (or, more generally, M-theory) on toric CY threefold. String partition function on the threefold is equal to partition function of topological strings.
We obtain an explicit dictionary between the objects in CFT and elements of the corresponding toric diagram, summarized in Table 1. For the case of t = q we introduce the bifundamental kernel (29), compute its q-Selberg averages (36) and show that they reproduce Nekrasov partition function. We also study spectral duality of conformal blocks and generalize the statements of [20] to multipoint blocks. Most importantly, we study the ever-troublesome case of t = q, where we introduce generalized bifundamental kernel (58). We compute the average of the generalized kernel -it satisfies the most general of all the so far encountered "factorization of averages" type identities (90) -and is again given by Nekrasov function. We interpret the change of preferred direction of refined topological strings as a change of basis between generalized Macdonald and Schur polynomials, which is performed by generalized Kostka functions (68), (69).

CFT Topological string
Conformal block B k , Fig. 1 Closed string amplitude on toric strip CY Z top , Fig. 3 q-Selberg measure (56) Two four-point conifold amplitudes (52), (53) DF integral (1) Horizontal slicing, vertical preferred direction (55), (75) Nekrasov/generalized Macdonald decomposition (10) Vertical slicing, horizontal preferred direction (76) Decomposition in Schur polynomials Vertical slicing, vertical preferred direction (67) Rotation of preferred direction by π 2 Generalized Kostka function (71), (72) Of course the expansion we have considered is not limited to the case of U (2) gauge theories and Virasoro conformal blocks. U (N )/W N story goes along the same lines. In this setting q-Selberg integrals are replaced by the A N q-Selberg integrals, their measure being given by the product of several basic building blocks (92). Generalized Macdonald polynomials, bifundamental kernels and Kostka functions can also be found for the U (N ) case.
It would be extremely interesting to understand the relation of the character/topological string decomposition of conformal blocks from the point of view of Seiberg-Witten integrable systems. One relation is provided by the quantum spectral curve for DF integrals [28], which in Nekrasov-Shatashvili limit reproduces the quantum spectral curve (Baxter TQ equation) of the relevant Seiberg-Witten system, the XXZ spin chain. Of course, a general method to obtain quantum spectral curves from the toric data is desirable. Let us also mention that in this way one can study the mirror symmetry between the B-model CY, encoded in the spectral curve and the A-side toric CY described by the topological vertex formalism.
In the four dimensional limit generalized Kostka polynomials coincide with the coefficients of the abelianization map acting on the fixed points in the cohomology of the instanton moduli space. Explicit combinatorial expressions for these coefficients were obtained in [29]. It would be interesting to understand these formulas from the point of view of refined topological strings.
The product of generalized Kostka matrices turns out to be an interesting algebraic object. We can reason in the following way. Let us first expand generalized Macdonald polynomials in terms of products of Schur polynomials using the Kostka matrix. Then we exchange the two Schur polynomials and apply the reverse Kostka transformation. Thus we obtain another set of generalized Macdonald polynomials. However the two sets are clearly related. Recall that generalized Macdonald polynomials are eigenfunctions of the operator H gen 1 = ∆(H 1 ), which is given by the Ding-Iohara coproduct, acting on trigonometric Ruijsenaars Hamiltonian H 1 . The second set of generalized Macdonald polynomials is obtained by acting on the same Ruijsenaars Hamiltonian with the opposite coproduct ∆ op . As in any quasitriangular Hopf algebra, there is an R-matrix performing the transformation from one coproduct to the other. The two sets of generalized Macdonald polynomials are therefore also related by the same R-matrix. This is the K-theoretic version of the instanton R-matrix [30] with spectral parameter being the parameter of generalized Macdonald polynomials. The implications of this observation and the relation between toric CY and integrable systems will be studied elsewhere. power sums p n ) M (q,t) AB q −u−1 t p −n + (t/q) n − q nv 1 − t n , −p −n − t q Finally, we were able to find the most general factorized formula for the average of two generalized Macdonald polynomials (or generalized bifundamental kernel N (q,t) AB,CD (u, v, N |x)), which gives all the averages above as special cases 8 : N (q,t) AB,CD (u, v, N |x) u,v,N,q,t where C A (q, t) = (i,j)∈A (1 − q Ai−j t A T j −i+1 ). Again, one can use the symmetry (86)  C Open topological string amplitude on resolved conifold In this appendix we write down the basic building block of the toric diagrams related to 5d quiver gauge theories. It is given by an open refined topological string amplitude in the resolved conifold background depicted in Fig. 7.
Using the IKV refined topological vertex one gets the following answer for this amplitude: 8 We have checked this formula up to the third level. where Z is the closed refined string amplitude on the conifold. One can perform a flop transformation on the conifold geometry. We employ the following symmetry of the closed string amplitude: The flopped open string amplitude is related to the original amplitude with Kähler parameter reversed: The multipliers in Eq. (94) combine with the change of framing in the adjacent edges induced by the flop. The answer for any closed string amplitude, which includes the flopped part is given simply by where in the right hand side the original Kähler parameter of the conifold is reversed and the Kähler parameters of the two-cycles adjacent to the flopped conifold are shifted by Q.

D Useful identities
One has the following identity for the power sum symmetric functions p n (x) = i≥1 x n i : where ρ i = 1 2 − i and Y is a Young diagram. Macdonald polynomials satisfy the following "transposition" identities: where Combining Eqs. (96) and (98) we get the identity, which will be useful in refined topological string computations: M (t,q) α p n (q β t ρ ) − p n (Qt ρ ) = (−1) |α| h α T (q, t)M (q,t) α T p n (t −β T q −ρ ) − p n (Qq −ρ ) .