QCD multiplet bases with arbitrary parton ordering

We develop an algorithm for recursively constructing orthogonal multiplet bases for the color space of QCD, for any order of partons and any Nc. This recipe is then applied for explicitly constructing some of these bases. Using the bases, a corresponding set of Wigner 6j coefficients are calculated. The Wigner coefficients offer a method of using multiplet bases without resorting to the explicit expressions of the basis vectors, which lead to a significant speed-up compared to other methods of treating full color structure.

Work on multiplet bases for an arbitrary number of partons was initiated in [18] by giving a general recipe for constructing multiplet bases, which in principle can be used for any number of quarks, antiquarks and gluons. The bases, presented in [18], have later been used for calculating Wigner 6j coefficients [20], which can be used to decompose amplitudes into multiplet bases and for performing amplitude recursion in multiplet bases [19].
In this article we generalize the basis construction from [18], by allowing arbitrary groupings of quark, antiquark and gluon representations. The recipe in [18] constructs basis vectors of the form (a) and (b) in figure 1, where the quarks and antiquarks are grouped into singlets and octets 1 . The new construction introduced in this paper avoids this requirement, and allows basis vectors of the form in (c), where the quarks and antiquarks attach directly to a chain of "backbone" representations. Using the new basis vectors, new Wigner 6j coefficients that can occur in the basis decomposition are calculated, in a similar manner as in [20]. With the algorithm in this paper, more general multiplet bases can thus be constructed and used for color decomposition. This allows for choosing a more appropriate multiplet basis for the problem at hand. This is particularly useful for applications of the multiplet basis in a recursion or parton shower context, as the choice of multiplet basis affects the efficiency significantly [19]. We remark, however, that all projectors and basis vectors considered here still have all external partons, quarks, antiquarks and gluons, attached to a "backbone" chain of general representations, α 1 ,. . . ,α n in figure 1. Lifting this condition, yet more general basis constructions can be imagined. This paper is organized as follows: In section 2 we recapitulate the method of [20,22] for decomposing scalar products into multiplet bases using Wigner 6j coefficients, and in section 3 the construction history method of [18] for achieving transversality for the SU (N c ) projectors is outlined. In section 4, an N cindependent notation for SU (N c ) representations is introduced. Section 5 introduces the recursive method of constructing projectors with one additional quark (or antiquark) from known projectors with any parton content. The construction from [18] for projectors with an additional gluon is briefly summarized in section 6. Then we show how to use the projectors to construct multiplet basis vectors in section 7 and in turn how to evaluate Wigner 6j coefficients with the vectors in section 8. Finally, we conclude in section 9.
2 Using Wigner 6j coefficients for color structure decomposition In this paper we make use of the birdtrack notation [22] for the group theoretical calculations. We will frequently use the completeness relation where Greek letters denote arbitrary representations and the denominator is a group invariant, called a Wigner 3j coefficient. We will also use Schur's lemma where the numerators in the ratios are group invariants, so-called Wigner 6j coefficients, and the sum over a runs over every instance 2 of γ in α ⊗β. For readability the representation labels of the inner representations in the 6j coefficients (β, δ and ζ in eq. (2.3)) are placed by the corners. For QCD we are interested in color summed/averaged quantities, due to confinement. Hence, we are concerned with evaluating scalar products of color structures. If c 1 and c 2 are two color structures, the scalar product is defined to be where a i = 1, . . . N c if parton i is a quark and a i = 1, . . . , N 2 c − 1 if i is a gluon. In the birdtrack notation, the scalar product is a fully contracted vacuum bubble, where the conjugated color structure has been mirrored and all representation arrows have changed direction, an example is shown in figure 2.
As described in [22] in general, and in [20] for QCD in particular, fully contracted color structures can be decomposed by repeatedly using completeness relations, Schur's lemma and the vertex correction 2 If a tensor product contains more than one instance of a representation an additional label a has to be used to distinguish them, for example in 8 ⊗ 8 = 1 ⊕ 8 ⊕ 8 ⊕ 10 ⊕ 10 ⊕ 27 (A ⊗ A for Nc = 3) the two copies of the octet have to be distinguished. These vertex labels are implicit in many places in this paper where they are not used. 3)) on loops, resulting in a vacuum bubble with fewer vertices. Any fully contracted color structure must, clearly, contain loops. For the scalar product between a basis vector, of the form considered here (i.e. with a backbone of general representations), and a leading order amplitude, e.g. as in figure 2, loops where all of the vertices in the loop are from the backbone of general representations, except for one vertex coming from the color structure to decompose can always be found. For such loops, there will only be two necessary types of steps in the contraction of the loop 3 [20]. The first step in reducing such a loop, is where single lines without arrows can carry the fundamental or the adjoint representation and is the vertex from the color structure to decompose, either the antisymmetric triple gluon vertex, , or the quark-gluon vertex, . (We remark that there will often be smarter ways of contracting indices where completeness relations are avoided, but the above contraction can always be performed.) This step can be applied to a loop of any length, and noting that the right hand side is of similar form, but contains a shorter loop than the left hand side, it is clear that this procedure will achieve large parts of the basis decomposition, when applied repeatedly. In the final step, only three vertices remain in the loop, and a vertex correction can be used to get (2.6) We note that eq. (2.5) and eq. (2.6) only require Wigner 6j coefficients of two specific forms. By considering all possible ways of assigning the thin lines to be in the triplet, antitriplet or octet representation, the Wigner 6j coefficients required to decompose color structures into the basis vectors considered in this paper, where the quarks, antiquarks and gluons can be in any order, are therefore of the form: where symmetries of the coefficients have been used to write down the minimal set of required coefficients. Compared to the coefficients that were needed in [20], the second and third coefficients in eq. (2.7) and the second coefficient in eq. (2.8) are new 4 . There will also be new allowed representations for α, β, γ and δ, in eq. (2.7) and eq. (2.8), as compared to [20], since the representations are no longer required to be in A ⊗ng , where A is the adjoint representation.
The more general multiplet bases introduced in this paper, allow for more Wigner 6j coefficients to be calculated. Using these for the basis decomposition for processes involving quarks avoids the complicated decomposition in [20] (appendix A.2). Constructing more general multiplet bases is especially useful for applications such as recursion relations with fermions or for full color parton showers [9,10,[23][24][25][26]. Requiring a certain grouping of the quarks and antiquarks will often result in expressions with more terms. In the recursion in [19], the pure gluon basis vectors had a gluon order chosen to minimize the number of terms required. In a generalization of that work to fermion recursion, a similar ordering of the partons, minimizing the number of terms, would be possible with the basis vectors introduced here. As the color structures encountered for a parton shower are similar to those encountered in recursion, due to the iterative way of adding one emission at the time, the additional freedom in the choice of multiplet basis ordering is equally useful in a parton shower context.

Transversality through construction history
Transversality of two projectors, P α and P β , is defined as P α P β = δ αβ P α , where we have used idempotency, P α P α = P α . As described in [16,18] the projection operators may be constructed to be transversal by successively combining partons into representations in a so-called construction history. One way of 4 In [20] an additional type Wigner 6j coefficient containing the symmetric triple gluon vertex was required, due to how the quarks were treated, but it is no longer required here since QCD does not contain symmetric triple gluon vertices. The required coefficient was of the form of the first coefficient in eq. (2.8), with the antisymmetric triple gluon vertex in the middle exchanged for a symmetric triple gluon vertex. achieving this is by combining the partons as shown in the following equation (3.1) Here the rectangles with two labels, e.g. α 1 and a 1 for the leftmost square, denote the instance a 1 of the projector α 1 . Hence, in the construction history used in this paper, the representations are combined two at a time, from top to bottom. In eq. (3.1), the first quark and gluon are thus combined into a representation α 1 ∈ V ⊗ A, where V is the fundamental representation (V is the complex conjugate of the fundamental representation). This is then combined with the next parton (in this case another gluon) into a representation α 2 ∈ α 1 ⊗ A, etc. until all partons on the left side are combined into one specific representation, here α 3 . For transversal projectors, the contraction of two projectors, of the form in eq. (3.1), would correspond to The transversality of the projectors will, as in [18], be used to construct vectors that are orthogonal under the scalar product in the color space, eq. (2.4) and figure 2 in birdtrack notation.
4 N c -independent Young tableau notation A representation M for the group SU (N c ) is associated with a Young diagram which, in general, depends on the number of colors, N c , see e.g. [27, secs. 7.12 & 10]. To achieve a basis construction in an N cindependent way, we need an N c -independent labeling of representations, which will be introduced in this section. This notation is used to perform the tensor products of arbitrary SU (N c ) representations with V , V and A. Every representation is in our notation associated with a quark diagram and a barred antiquark diagram 5 , Q,Q . (4.1) As an example consider , , where the left Young diagram is the quark diagram and the right, barred, diagram is the antiquark diagram. For a specific N c , the Young diagram this corresponds to, is obtained by conjugating the barred diagram and then merging it with the quark diagram. For the rest of this paper we will refer to the right diagram of eq. (4.1) and eq. (4.2) as the barred diagram and the, equivalent, conjugated diagram (which is an N c specific diagram) as the conjugated antiquark diagram. The conjugation denoted by the bar is performed by removing the bar, marking the boxes, rotating them 180 • , then adding boxes on top of each column until each column is N c boxes high and finally remove the marked boxes, see [22, sec. 9.8]. For the example, if N c = 3, the conjugated antiquark diagram is , as can be seen from The merging of the diagrams in eq. (4.2) is done by aligning the first rows and putting the diagrams next to each other with the conjugated antiquark diagram to the left. For the example in eq. (4.2), we attach the quark diagram to the right of the conjugated antiquark diagram, eq. (4.3), i.e.
where the numbers above each column indicate the length of the column for a general N c . For low enough N c , the resulting Young diagram might not be an admissible diagram, due to the rightmost column in the conjugated antiquark diagram being shorter than the leftmost column of the quark diagram. For the example, the chosen N c is the lowest N c for which the diagram is admissible, since for N c = 2 the third column of the conjugated antiquark diagram has zero boxes. In general, a representation will be present for N c larger than or equal to the length of the leftmost column of the barred diagram plus the length of the leftmost column of the quark diagram. This notation is introduced to handle tensor products between V , V and A and a general SU(N c ) representation in a N c -independent way. The tensor product with the fundamental representation can be divided into a part where a box is added to the quark diagram and a part where a box is removed from the barred diagram. To see this, we introduce a notation for tensor products with quarks The second term has quotation marks to indicate that it is not exactly a tensor product, the exact meaning of it will be explained and motivated below. Starting from eq. (4.4), the reason for why this notation can be used to uniquely describe Young tableau multiplication for general N c will be shown. The tensor product of the representation eq. (4.4) with V is For N c = 3 the second, grayed out, diagram is clearly not allowed, since the rows are not left-justified. However, if N c ≥ 4, then the third column of the diagram is ≥ 2 boxes high and it is then equal to or higher than the fourth column. The first two diagrams of eq. (4.7) correspond one-to-one to the two allowed ways of adding a box to the quark diagram in eq. (4.2). The corresponding statement is true for general representations, (Q,Q) as well, since all admissible ways of adding a box to the quark diagram correspond directly to a diagram in the tensor product of the representation with V , once the possibly disallowed diagram (where the box is placed in the leftmost column of the quark diagram) has been crossed out if N c is too small. If N c is high enough, the diagram coming from adding the box to the first column in the quark diagram will always be allowed.
That the two last diagrams in eq. (4.7) come from the two admissible ways of removing a box from the barred diagram in eq. (4.2) is possibly less clear. Considering the tensor product of the conjugated antiquark diagram with V , but leaving the diagram in the form of the middle diagram of eq. (4.3) such that it is easy to see which antiquark diagram gives each of the possible representations, we find (4.8) The first two representations correspond exactly to removing one box from the barred diagram (in an admissible way). The third diagram would correspond to adding N c − 1 boxes to the barred diagram, and is the difference between a proper tensor product and the "⊗"-product in eq. (4.6). It is omitted from the tensor product in quotation marks as it would add a column of length one in the middle of the combined Young diagram (as by the definition of the notation the quark diagram should be merged to the right of the conjugated antiquark diagram). The only case where it would lead to an admissible Young diagram after the merge is if the quark diagram is a singlet (i.e. has no boxes), but for this case that admissible Young diagram is already accounted for in the tensor product with the quark diagram and should not be counted twice. Hence we should never include this diagram, since it is either an inadmissible diagram or it is already accounted for in the tensor product with the quark diagram. In total we have for our example where line two corresponds to the first bracket on the right hand side of the first line, and the third line corresponds to the second bracket. A general tensor product will be of the same form, terms corresponding to removing a box from the barred diagram and terms corresponding to adding a box to the quark diagram. From this we conclude that the multiplication introduced in eq. (4.5) reproduces the result of M ⊗ V for any M . The case of M ⊗ V can clearly be dealt with analogously. Multiplication with V can then similarly as for V be seen as representations coming from adding a box to the barred diagram or removing a box from the quark diagram.
We have thus seen that the notation introduced in eq. (4.1) along with the multiplication in eq. (4.5) reproduces the result of Young tableau decomposition. It can therefore be used to label SU(N c ) representations for general N c .
For gluon multiplication we can use that (i) The box from V is removed by the barred box from V , meaning that both the quark and the antiquark act on either Q orQ, This is always possible in at least one way, the quark box is added to the first row of the quark diagram and then removed by the antiquark box. In general the boxes can cancel in up to N c different ways [18], out of which one way corresponds to the additional singlet in V ⊗ V and should be removed when considering the tensor product with A.
(ii) The V box and the V barred box both act on Q (orQ), but do not cancel each other out, This results in a different representation than M , but with the same number of quark boxes and barred boxes. Graphically this corresponds to moving one box within Q, or a barred box withinQ.
(iii) The V box acts onQ and the V barred box on Q, This results in a representation different from M with one less quark box and one less barred box.
(iv) The V box acts on Q and the V barred box onQ, This results in a representation different from M with one more quark box and one more barred box.

Equivalence of representations for finite N c
In constructing the basis vectors for each overall representation, every construction history of the left side has to be combined with every construction history of the right side. In general there will be representations which are different for a high enough N c , but are equivalent for a specific N c . This will only occur for representations with different quark and antiquark diagrams if some of the antiquark boxes are exchanged for quark boxes (or vice versa). One example of this is 15) for N c = 3, which gives the same representation as the example, eq. (4.2), i.e. the representation in eq. (4.4). This occurs because for a given N c , the totally antisymmetric tensor with N c fundamental indices is an invariant, meaning that for finite N c , quark boxes can be traded for anti-quark boxes. In the example in eq. (4.15) two antiquark boxes are exchanged for one quark box. This complication will not be present for perturbative QCD, precisely because the -tensor never appears in QCD vertices. Constructing multiplet bases that do not preserve baryon number would require the addition of -tensors in the construction of the basis vectors, and would make the bases N c specific.

Constructing projectors with quarks and antiquarks
In this section we address the construction of the transversal projectors required to decompose the space of N p partons and one quark (or antiquark). The construction is recursive and assumes that a set of projectors for N p partons and less are already known. The case of constructing projectors for N p partons and one gluon can be dealt with as in [18], where projectors for A ⊗ng were constructed. Together with the method presented in this section, projectors for any order of partons can be constructed. As in [18] transversality of projectors is achieved through the construction histories of the projectors.
The construction will, analogously to the recipe in [18], use the concept of "first occurrence" to classify projectors into projectors with representations that have already been encountered, and new representations. The projectors corresponding to previously encountered representations can be constructed by combining projectors that are, by assumption, already known.
In order to classify the representations occurring in SU (N c ) we thus need to define the concept of first occurrence. In [18], the first occurrence of a representation M , is defined as the smallest integer n f such that M ∈ A ⊗n f . For the construction of projectors with quarks, antiquarks and gluons this concept is here generalized into two integers, n q f and nq f , such that the first occurrence of a multiplet is defined by the lowest numbers n q f and nq f , such that Since V ⊗ V = 1 ⊕ A a representations in A ⊗ng for some number of gluons, n g , with some first occurrence n f , will have equal quark and antiquark first occurrences, i.e. n q f = nq f ≡ n f . In the quark and antiquark diagram notation, as in eq. (4.2), the quark first occurrence is the number of boxes in the quark diagram and the antiquark first occurrence is the number of boxes in the barred diagram. It is then easy to see that the example in eq. To construct the projectors with n f = (i, j) the recursion requires projectors with lower first occurrence, defined as: n f (M ) = (m, n) is lower than n f (M ) = (i, j) if m ≤ i, n ≤ j, and at least one of m and n is lower than i and j, respectively. Higher first occurrence is then naturally defined as the opposite, if n f (M ) is lower than n f (M ), then n f (M ) is higher than n f (M ). Representations which do not fall into either of these categories (i.e. n < i and m > j or n < i and m > j) do not occur in the construction and will not be considered further. In the construction, the representations will be classified based on their first occurrence. The representations in M ⊗ V that have n f = (n q f (M ) + 1, nq f (M )) are, by the above definition, representations with higher first occurrence, and the representations with n f = (n q f (M ), nq f (M ) − 1) have lower first occurrence. Note that no representation with the same first occurrence appears in the tensor product of M ⊗ V (M ⊗ V ), only representations with lower or higher first occurrence occur, whereas M ⊗ A contains representations with higher, lower and equal first occurrences.
For the M ⊗ V and M ⊗ V case, the projectors in the vector space of the N p partons plus one quark will be given by the representations in the tensor product of each projector for N p partons with the fundamental representation, V . This accounts for every possible instance of each representation, and the construction history will ensure transversality (that the new projectors are of the correct form will be shown in the coming subsections). The case of M ⊗ A is briefly discussed in section 6.
The construction of the projectors will be divided into three cases, based on the difference in first occurrence with respect to the previous representation in the construction history and the shape of the Young diagram corresponding to the representation. The first type to be constructed is when the representation has a lower first occurrence, this is treated in section 5.1. For the second type, where the first occurrence has increased, the construction is divided into two cases. First, in section 5.2.1, we consider a standard case in which uniqueness of the new projector can be inferred by building up the representation in two different ways. Then, in section 5.2.2, we address a special case where the quark (antiquark) diagram has rectangular shape, implying that the total representation can only come from the multiplication of one single representation with V (V ).

Projectors with lower first occurrence
In the tensor product of a representation M with a quark (antiquark) there can be representations M where the antiquark (quark) first occurrence of M is lower than for M , corresponding to removing a barred box from the barred diagram (box from the quark diagram). The only case when there is no such representation M is when nq f (M ) = 0 (n q f (M ) = 0), since in this case there are no barred boxes (boxes) to remove. The corresponding projectors can be constructed by sandwiching the projector for M (which is known by assumption) for fewer partons between the tensor product of M and a quark (antiquark), as follows where the gray blobs represent any connection of lines that makes the expression non-vanishing. The projector onto the representation M can have any combination of partons, but there must be at least one antiquark (quark) if the added parton is a quark (antiquark), or at least one gluon that can be split into a quark-antiquark pair (if not, there cannot be any representation M with lower nq f (n q f )). With respect to the equivalence of representations for finite N c , we note that adding a box to the conjugated antiquark diagram is always possible and will always result in a representation with lower nq f . Finite N c thus never requires any special treatment in the construction of projectors with lower first occurrence.

Construction from different tensor products
In this section we will first prove that the tensor products M 1 ⊗V and M 2 ⊗V for two general representations M 1 and M 2 can share at most one representation. We will then show how to use this to construct projectors where n q f is increased by one, i.e. the projectors corresponding to the first part of eq. (4.5). The case of addition of an antiquark M ⊗ V where nq f is increased by one can clearly be treated analogously.
For this section we will consider an example representation, M ∈ M ⊗V , for which we wish to construct the projector. The argument is valid for any M where the quark diagram is not rectangular, the remaining representations, with rectangular quark diagrams, will be dealt with in section 5.2.2. For now we take M to be where we have placed stars on every outer corner in the diagram on the bottom-right side. In general we require M to have at least two stars, implying that the quark diagram cannot be rectangular, but we have no requirements on the barred diagram,Q. The stars mark the places where we can remove a box, giving a diagram, M , with quark first occurrence reduced by one unit. Note that M ∈ M ⊗ V , since we will get the representation M by adding the box from V to M exactly at the spot where we removed a box to find M . Now consider two different representations, found by removing a starred box from M , M 1 and M 2 , for the example in eq. (5.4), there are (4 · 3)/2 different such choices. One possible choice is where M 1 is the representation where the starred box in the top row has been removed, and M 2 is the representation where the box in the second row has been removed. We will prove that only the representation, M , appears in both of the tensor products M 1 ⊗ V and M 2 ⊗ V . To see this, we first consider the representations corresponding to removing a barred box from the barred diagram (Q) in M 1 ⊗ V or M 2 ⊗ V . These sets of representations from M 1 ⊗ V and M 2 ⊗ V can clearly not have any overlap , since their quark diagrams are different. The representations corresponding to adding a box to the quark diagram will, by construction have M in both tensor products. However, no other representation can be in both tensor products, since they are missing one box each, at different places. Thus adding a box cannot make them equivalent, except if it is added such that the resulting representation as in section 5.2.1. Hence we can consider all representations M with Young diagram of form i.e. h boxes high and w boxes wide. For this section there will be three different cases to deal with, corresponding to different sizes of the quark diagram: (i) The quark diagram is a single box, Q = .
(ii) The quark diagram consists of two boxes, Q = or Q = .
(iii) The quark diagram consists of three or more boxes, e.g. , , .
For case (i) and (iii), we consider all representations M with lower first occurrence than M that have M ∈ M ⊗ V . The only option, in both cases, is the representation corresponding to the diagram where the bottom right corner of eq. (5.7) has been removed (i.e. the only box in the case of (i)). The tensor product of this representation with V is For case (i), where the quark diagram of M is , the quark diagram of M is the singlet, and the first and third terms of eq. (5.8) would not be present. For case (iii) the projectors corresponding to the first and third terms can be assumed to have been constructed as in section 5.2.1, and can thus be projected out. The projectors corresponding to the diagrams from the last term can also be projected out, as all contained representations have lower first occurrence and can be constructed as in section 5.1. Thus all representations, except the one corresponding to M can be projected out. More explicitly, the projector for M is thus constructed from construct the projectors also for the special case (ii), where the quark diagram is either or . For N c = 2 the quark diagram in the second term in eq. (5.10) is equivalent to the singlet representation, but the corresponding projector can anyway be constructed as in eq. (5.13), using the antisymmetrizer in the middle upper block.
Together with the construction in section 5.1, eq. (5.3), and in section 5.2.1, eq. (5.6), the projectors for any representation M in the tensor product of M ⊗ V can thus be obtained. The corresponding projectors for M ⊗ V are constructed analogously.
The projectors constructed by the methods of this section will all be hermitian (if the previously constructed projectors are hermitian). In the special case where all lines are incoming quarks (antiquarks) hermitian projectors can be constructed as in [29,30].

Constructing projectors with gluons
The recipe for constructing gluon projectors in [18] is also recursive, assuming that the projectors with lower first occurrence have already been constructed. In the tensor product of a representation with A, we found in eqs. (4.11-4.14) that the resulting representations have either lower first occurrence (by one unit of quark first occurrence, and one unit of antiquark first occurrence), the same first occurrence or higher first occurrence (one unit of both quark and antiquark first occurrence). The construction is divided into categories based on how the first occurrence changes. When the new representation has a lower first occurrence, a construction similar to section 5.1 is employed. For the case of unchanged first occurrence (eq. (4.11) and eq. (4.12)), there is no analogue in this paper, as that cannot occur in the tensor product of a representation with V . For the case of higher first occurrence, a construction similar to eq. (5.13) is used, where the quark and the antiquark parts of the diagram are separated.
We note that, when constructing the projectors for M in M ⊗ A, where there can be more than one occurrence of M , the invariance condition (color conservation) of color structures can be utilized to find the vertex for one of the instances of M , see section 4.4 in [22].

Construction of basis vectors from projectors
The multiplet basis vectors considered here are of the form where each vector corresponds to a different set of representations α i and vertices a i . Recall that the projectors constructed using the method described in section 5 and section 6 can have their partons in any order. These projectors can then be used to construct basis vectors with the partons in any order on the left side (e.g. in eq. (7.1) the order is q, g, g, q) and (in general a different) order on the right side (g, q, g, q in eq. (7.1)). For perturbative QCD, the vectors we are interested in have the same number of incoming and outgoing fermion lines. The basis vector of eq. (7.1) is proportional to a 4 a 5 a 6 a 6 a 5 α 1 α 2 α 3 α 2 α 1 α 5 α 4 α 3 α 4 α 5 a 1 a 2 a 3 a 2 a 1 , (7.2) where the gray blob in the middle is any non-vanishing connection of lines. Typically there are many different possibilities for the gray blob, but they will all give the same color structure up to a constant, by Schur's lemma, eq. (2.2). The absolute value can be fixed by normalizing the vector, but the sign of the vector has to be defined carefully (see section 7.1). Contractions of the form in eq. (7.2) can thus be used to construct basis vectors for any parton order on the left and right sides. The orthogonality of the basis vectors follows immediately from the transversality of the projectors (which is why the basis vectors with the same order of partons on the left and the right sides cannot have the trivial contraction in the gray blob, unless they are proportional to the projector).

Signs
Normally, the sign of a vector in a basis does not matter, since changing the sign of one vector in a basis still results in a valid basis. For the applications of the bases in this paper the signs are, however, important. The basis vectors can be seen as several vertices contracted with each other, e.g. eq. (7.1) consists of six vertices, hence its sign is related to the sign of other vectors which share some of the vertices. To consistently use the birdtrack notation, the vectors must also be related to the mirrored and conjugated vectors, which can be seen from the completeness relation, eq. (2.1), where a vertex always appears with its mirrored and conjugated version. In the completeness relation, a sign consistency between the two vertices introduced on the right hand side is required (since every term on the right hand side is a projector, which has a sign enforced by idempotency). The two vertices are related by hermitian conjugation, i.e. conjugating and transposing one of the vertices gives the other. In birdtracks, vertex conjugation is  where Yutsis' notation [31] has been used to denote a vertex in which the representations appear in reversed order. Hence we require σ αβγ,a c σ αβγ,a T = 1 for all vertices such that the completeness relation is fulfilled. This sign convention is also the reason that the scalar product of two color structures can be depicted by contracting one of the color structures with the mirror image of the other color structure with its arrows reversed, as in figure 2. The signs under conjugation σ αβγ,a c and transposition σ αβγ,a T can be chosen freely if neither of eq. (7.3) and eq. (7.4) has the same vertex on the left hand and right hand sides, since we can always redefine one of the vertices to be minus itself (the vertex related by hermitian conjugation would then also have to change sign) 6 . In eq. (7.3) the two vertices are the same if all three representations are real, in which case the sign is easily determined by conjugating the vertex. For eq. (7.4) the two vertices are the same if, at least, two of the representations are identical.
In the electronic appendix we have used the freedom of choice to set σ αβγ,a c/T = 1, when possible.

Calculation of 6j coefficients
From the basis vectors in section 7 we can evaluate scalar products as described in [20], to obtain all the Wigner 6j coefficients in eq. (2.8) and eq. (2.7). The coefficients in eq. (2.7) can be found by evaluating where, in the basis vectors, all representations except the representation at position i are identical. This can be simplified, using Schur's lemma, eq. (2.2), to remove the two-vertex loops, into a contraction of the form where n is the number of representations in the basis vectors and α 0 (which occurs in the first product) is the representation of the first leg (to the top left in eq. (8.1)) and α n+1 is the representation of the leg in the top middle of eq. (8.1). We can construct basis vectors such that in the contraction corresponding to eq. (8.1) the crossed lines can be in any of the representations V , V or A. The Wigner 3j coefficients are just vertex normalization factors, and can be set to, for example, unity. In this paper all Wigner 3j coefficients have been kept, hence all equations are valid for any choice of vertex normalization. In the electronic appendix however, a specific normalization has been chosen, where all vertices are normalized (including the ggg and qqg vertices) such that all non-vanishing 3j coefficients have value one. As the prefactors in eq. (8.2) are trivial to calculate, we will drop them now, and consider what happens if we replace the crossed lines in eq. (8.1) with V , V and A. If both of the lines are gluons we have i.e. the first 6j coefficient in eq. (2.7) (up to two vertex orderings). If one of the lines is a quark, we get Due to symmetries of the coefficients, the cases of antiquark lines instead of quark lines can always be related to the quark cases. Thus all Wigner 6j coefficients in eq. (2.7) can be calculated. The coefficients in eq. (2.8) are calculated similarly, but using one basis vector for N p partons and one for N p + 1 partons, where the gray blob can be the antisymmetric triple gluon vertex or the fermion-gluon vertex. Again we drop the trivial prefactor and only consider the rightmost vacuum bubble of eq. (8.6). If the gray blob is the antisymmetric triple gluon vertex we get corresponding to the first coefficient in eq. (2.8). The second coefficient of eq. (2.8), then corresponds to the case where two of the representations entering the gray blob are in the quark and antiquark representations, Hence, by calculating contractions of the form eq. (8.1) and eq. (8.6), all of the coefficients in eq. (2.7) and eq. (2.8) can be calculated.
Since the Wigner 6j coefficients have many symmetries, we only need to calculate a few of them. This has been done in the electronic appendix for up to four external quark-antiquark pairs or gluons, meaning that projectors and vectors with up to four incoming and outgoing quarks or antiquarks have been constructed along with the 6j coefficients in eq. (2.7) and eq. (2.8). The calculations are performed using ColorMath [32], and the resulting Wigner 6j coefficients are attached (in a human readable format) in Wigner6jCoefficientsWithQuarks.m.

Conclusions
This paper introduces an algorithm for constructing SU (N c ) projectors onto representations corresponding to quarks, antiquarks and gluons, grouped in any order onto a chain of backbone representations (see figure 1). These projectors can then be used to construct multiplet bases, and from the bases, Wigner 6j coefficients can be calculated. The Wigner coefficients allow for an efficient decomposition of color structures into multiplet bases.
As the more general projectors and basis vectors introduced in this paper remove constraints on groupings of partons for decompositions involving quarks, they are better suited for any application where the grouping matters, compared to the basis vectors in [18]. One such case is amplitude decomposition into multiplet bases for amplitudes with quarks. The method for using Wigner 6j coefficients, summarized in section 2, is more efficient if shorter loops can be used and for color structures with quarks, this is enabled with the Wigner 6j coefficients constructed here, as compared to the method presented in [20].
The grouping of partons also matter for amplitude recursion relations with quarks, since the efficiency of the recursion depends on how similar the N p parton multiplet basis is to the N p + 1 parton basis [19].
Loosening the requirement from [18] of grouping the quarks and antiquarks into singlets or octets, bases giving fewer terms in the recursion step can be chosen. As parton showers have similar color structures to recursion relations, due to the fact that one parton at the time is added, the bases in this paper could also be used for N c = 3 parton showers. As for the recursion relations in [19], this should give a very significant speed up compared to using trace or color flow bases for full color treatment.