The CHY representation of tree-level primitive QCD amplitudes

In this paper we construct a CHY representation for all tree-level primitive QCD amplitudes. The quarks may be massless or massive. We define a generalised cyclic factor $\hat{C}(w,z)$ and a generalised permutation invariant function $\hat{E}(z,p,\varepsilon)$. The amplitude is then given as a contour integral encircling the solutions of the scattering equations with the product $\hat{C} \hat{E}$ as integrand. Equivalently, it is given as a sum over the inequivalent solutions of the scattering equations, where the summand consists of a Jacobian times the product $\hat{C} \hat{E}$. This representation separates information: The generalised cyclic factor does not depend on the helicities of the external particles, the generalised permutation invariant function does not depend on the ordering of the external particles.

The CHY representation of the tree-level gluon amplitudes separates information: The Parke-Taylor factor does not depend on the helicities of the external particles, the permutation invariant function does not depend on the ordering of the external particles. We may ask, if this separation of information exists for other cyclic ordered amplitudes. It is known that this is the case for tree amplitudes in N = 4 super-Yang-Mills theories (SYM) and for tree amplitudes in QCD with one massless quark-anti-quark pair and an arbitrary number of gluons [14]. These amplitudes satisfy as the pure gluon amplitudes cyclic invariance, the Kleiss-Kuijf relations [37] and the Bern-Carrasco-Johansson relations (BCJ relations) [38]. These relations among amplitudes with different cyclic order are encoded within the CHY representation in the Parke-Taylor factor. As a consequence, amplitudes in N = 4 SYM and QCD amplitudes with one quark-anti-quark pair have a CHY representation with the same Parke-Taylor factor C(w, z) and a modified permutation invariant functionÊ(z, p, ε). The situation is more complicated for tree-level primitive QCD amplitudes with more than one quark-anti-quark pair. These amplitudes do not satisfy the full set of BCJ relations and the cyclic order can therefore not be represented by the standard Parke-Taylor factor. These amplitudes will require in addition to the generalisationÊ(z, p, ε) of the permutation invariant function a generalisationĈ(w, z) of the standard Parke-Taylor factor. For the simplest case of the QCD tree-level four-point amplitude A 4 (q, q,q ′ , q ′ ) with two quark-antiquark pairs this has been discussed in [14]. However, what is still missing is a treatment of an arbitrary tree-level primitive QCD amplitude. In order to construct a CHY representation for these amplitudes, we need to know the relations among the amplitudes with different external orderings. Quite recently it was discovered that tree-level primitive QCD amplitude satisfy apart from some well-known "no-crossed-fermion-lines"-relations a well-described restricted set of fundamental BCJ relations. This was first conjectured in [39] and subsequently proven in [40]. Equipped with this information one may first construct a minimal basis for the amplitudes, and as the number of the elements of the minimal basis never exceeds (n − 3)! construct a CHY representation. This is the content of this paper.
In this paper we show that all tree-level primitive QCD amplitudes have a representation of

Tree-level primitive QCD amplitudes
In this section we introduce our notation. We define words and shuffle algebras and review the various relations among primitive amplitudes. Dyck words are a convenient tool to label amplitudes with several quark-anti-quark pairs. At the end of this section we present a minimal amplitude basis.

Basic definitions
Let us consider a tree-level primitive QCD amplitude with n external particles, out of which n q particles are quarks, n q particles are anti-quarks and n g particles are gluons [43,44]. We have the obvious relation n = n g + 2n q .
Without loss of generality we may assume that all quarks have different flavours. The quarks may be massless or massive. We label the quarks by q 1 , q 2 , ..., q n q , the corresponding anti-quarks byq 1 ,q 2 , ...,q n q , and the gluons by g 1 , g 2 , ..., g n g . We call the set A = q 1 , q 2 , ..., q n q ,q 1 ,q 2 , ...,q n q , g 1 , g 2 , ..., g n g (4) an alphabet and the elements of this set letters. Ordered sequences of letters are called words: We are in particular interested in words with n letters, such that every letter from the alphabet occurs exactly once. We denote the set of these words by The set W 0 has n! elements and each element of W 0 can be considered as a permutation of the n letters of the alphabet A. For later purpose we define the reversed word w T by The word of length zero is denoted by e. The words from an alphabet form an algebra. The shuffle product ¡ of two words w 1 = l 1 l 2 ...l k and w 2 = l k+1 ...l r is defined by where the sum runs over all permutations σ, which preserve the relative order of l 1 , l 2 , ..., l k and of l k+1 , ..., l r . The shuffle product is commutative and associative: The name "ordered permutations" is also used for the shuffle product. The empty word e is the unit in this algebra: We can use the words w ∈ W 0 to encode the order of the external particles of tree-level primitive QCD amplitudes and we will write for such an amplitude. The external momenta for this amplitude are denoted by p 1 , p 2 , ..., p n . The n-tuple of external momenta will be denoted by p = (p 1 , ..., p n ). In a similar way we will denote the n-tuple of external polarisations by ε. The external polarisations are given by polarisation vectors ε j for external gluons, spinorsū j for out-going fermions and spinors v j for out-going anti-fermions. For simplicity we will assume all particles to be out-going. We will write if we would like to emphasize that the primitive amplitude depends apart from the external ordering w also on the external momenta p and the polarisations ε. In situations, where the main focus is on the dependence on w, we will simply write A n (w) as in eq. (11). It will be convenient to introduce the following notation: If λ 1 , λ 2 are numbers and w 1 , w 2 ∈ W 0 words, we write for In other words, we take A n as a linear operator on the vector space of words with basis W 0 . We will use this notation as a convenient way to express relations among primitive amplitudes.

Relations among primitive amplitudes
The primitive amplitudes are cyclic invariant: Eq. (15) is a first (and trivial) example of relations among primitive amplitudes with different external ordering. There are more relations among primitive amplitudes. A further example are the Kleiss-Kuijf relations [37]. Let be two sub-words, such that Then We recall that w T denotes the reversed word, defined in eq. (7), the symbol ¡ denotes the shuffle product, defined in eq. (8) and we used the notation of eq. (13). The Kleiss-Kuijf relations in eq. (18) allow us to fix two legs at specified positions. A special case of the Kleiss-Kuijf relation is the case, where w 1 is the empty word. In this case the Kleiss-Kuijf relation reduces to the reflection identity for primitive amplitudes A second special case is given for the situation, where the set β contains only one element. In this case the Kleiss-Kuijf relation reduces to the U (1)-decoupling identity where the sum is over the cyclic permutations of the first (n − 1) arguments. For amplitudes with more than one quark line (n q > 1) there are some trivial relations related to the fact that primitive amplitudes cannot have crossed fermion lines. Tree-level primitive amplitudes have a fixed cyclic order and all Feynman diagrams contributing to such an amplitude can be drawn in a planar way on a disc. If the amplitude has crossed fermion lines the diagrams can only be drawn in a planar way with flavour-changing currents. However, in QCD there are no flavour-changing currents and these amplitudes are zero. Thus we have the relations: For amplitudes with at least one gluon there are further relations. Let us assume that particle 2 is a gluon: The fundamental Bern-Carrasco-Johansson relations (BCJ relations) read These relations have first been conjectured for pure gluon amplitudes [38] and proven in this case in [45][46][47]. The conjecture was later extended to all tree-level primitive QCD amplitudes [39] and proven in [40]. Let us summarise: The relations among tree-level primitive QCD amplitudes are

Dyck words
Primitive amplitudes with crossed fermion lines vanish. The ones with no crossed fermion lines may be described by generalised Dyck words [48,49]. In order to define these generalised Dyck let us consider an alphabet consisting of n q distinct opening brackets "( i " and n q corresponding closing brackets ") i ". Closing brackets of type i only match with opening brackets of type i. A generalised Dyck word is any word from this alphabet with properly matched brackets. Originally, Dyck did not consider brackets of different types. We will use the term "Dyck word" if there is only one type of brackets and the term "generalised Dyck word" in the case of brackets with more than one type. We are mainly interested in the generalised Dyck words of length 2n q , where every opening and every closing bracket occurs exactly once. There are words of this type. The opening and the closing brackets of type i may be associated to the fermion line i. There are two possible orientations for each fermion line, either We define a standard orientation of the fermion lines by requiring, that every quark corresponds to an opening bracket and every anti-quark corresponds to a closing bracket, i.e. the standard orientation is given for each fermion line by eq. (25). This definition is not cyclic invariant, however we may always use the Kleiss-Kuijf relations to fix particle 1 to be q 1 and particle n to beq 1 . Let us define a projection P by We then set This set contains all words without crossed fermion lines and where all fermion lines have the standard orientation. It is always possible to reduce an amplitude with an arbitrary orientation of the fermion lines to the standard orientation of the fermion lines, by just using cyclic invariance, the Kleiss-Kuijf relations and the "no-crossed-fermion-lines"-relations [48,49]. In order to see this, let us assign for amplitudes with no crossed fermion lines a level to each fermion line. We draw the external order of the particles on the boundary of a disc and we draw on the disc for each quark-antiquark-pair a fermion line connecting the anti-quark with the corresponding quark. With the help of the Kleiss-Kuijf relations we may always put the quark q 1 at position 1 and the corresponding anti-quarkq 1 at position n. We assign level 0 to this fermion line. We assign level 1 to all fermion lines, which are not separated by another fermion line from the fermion line of level 0. We then iterate this procedure and we assign level k to all fermions line, which are not separated by another fermion line from some fermion line of level (k − 1), and which have not been assigned any level before.
There is an iterative procedure, which allows us to express an amplitude with an arbitrary orientation of the fermion lines as a linear combination of amplitudes with the standard orientation. This procedure brings first all fermion lines of level 1 into the standard orientation, then all fermion lines of level 2, etc.. The fermion line of level 0 is trivially brought into the standard orientation with the help of the Kleiss-Kuijf relations. At level k consider the amplitude where x k−1 , x k , w k+1 , y k and y k−1 are sub-words. We assume that the fermion line q i -q i is of level (k − 1). This fermion line has already the standard orientation and we assume that all fermion lines contained in the sub-words x k−1 and y k−1 have already been oriented. The fermion line q j -q j is of level k and has the wrong orientation. The sub-words x k and y k may contain further fermion lines of level k and higher level. The sub-word w k+1 may contain fermion lines of level (k + 1) and higher. We are going to orient the fermion line q j -q j , respecting the orientations of all fermion lines with level ≤ k. Let us write Then A n x k−1 q i x kq j w k+1 q j y kqi y k−1 = where |w k+1 | denotes the length of the sub-word w k+1 and with All fermion lines of w ′ k+1 are of level (k + 1) or higher. We call eq. (31) the "fermion orientation" relations. Note that some amplitudes in eq. (31) may be zero due to crossed fermion lines. This is either the case if a quark-anti-quark pair from x k is split between l i 1 ...l i a and w ′ k+1 or if a quark-anti-quark pair from y k is split between w ′ k+1 and l j b+1 ...l j s . We give a proof of eq. (31) in appendix A.

The amplitude basis
The relations among tree-level primitive QCD amplitudes allows us to express all amplitudes for a given set of external particles in terms of a set of basis amplitudes. The size of this basis is For later purpose we set (the subscript is a reminder that (n − 3)! is the number of inequivalent solutions of the scattering equations) and Note that and therefore we always have In order to find a CHY representation for tree-level primitive QCD amplitudes it is essential that the number of basis amplitudes does not exceed the number of inequivalent solutions of the scattering equations. Eq. (37) shows that this condition is always satisfied.
Let us now describe the amplitude basis for the various cases. For n q = 0 the set of words corresponding to a possible basis is given by [39] For n q = 1 we may choose For n q ≥ 2 we may choose Let us briefly review how to express an arbitrary amplitude A n (w) with w ∈ W 0 as a linear combination of amplitudes A n (w j ) with w j ∈ B, using the relations summarised in section 2.2.
We first use cyclic invariance as in eq. (15) to fix particle 1 to be g 1 (in the pure gluonic case n q = 0) or to be q 1 (in the case n q ≥ 1). Let us define a subset W 1 of W 0 by The set W 1 contains all words, where the first letter has been fixed. We then use the Kleiss-Kuijf relations in eq. (18) to fix particle n to be g n (in the pure gluonic case n q = 0) or to beq 1 (in the case n q ≥ 1). We define a subset W 2 of W 1 by The set W 2 contains all words, where the first and the last letter have been fixed. If n q ≥ 2 we then set to zero any amplitude with crossed fermion lines, in accordance with eq. (21). We then use eq. (31) to express amplitudes with no crossed fermion lines in terms of amplitudes with no crossed fermion lines and the standard orientation of the fermion lines. The standard orientation of the fermion lines has been defined in eq. (25). We define a subset W 3 of W 2 by The set W 3 contains all words, where the first and the last letter have been fixed. In addition W 3 excludes all words, which either correspond to crossed fermion lines or correspond to a nonstandard orientation of the fermion lines. Finally, we use the fundamental BCJ relation of eq. (23) to fix particle (n − 1) to be g n−1 (in the pure gluonic case n q = 0), to be g n−2 (in the case n q = 1) or to remove any gluon from position (n − 1) (in the case n q ≥ 2). In the latter case we then have necessarily an anti-quark at position (n − 1), as we already have chosen the standard orientation. This brings us down to the basis The set B contains all words corresponding to a possible basis, as already stated in eqs. (38)- (40). We have the inclusions We will use this chain of inclusions for constructions and proofs in this paper.
We already mentioned that we may view A n as a linear operator on the vector space of words with basis W 0 . Let us denote this vector space by V . The dimension of V is N permutations = n!. Let us assume, that there is another linear operatorÃ n on V . We would like to investigate, under which conditions A n andÃ n are identical. This is the case if and only if they agree on all basis vectors of V :Ã However, we further know that there are relations among the A n (w j ), and if A n andÃ n are identical operators, we must have the same relations among theÃ n (w j ). Therefore it is sufficient to check thatÃ n and A n agree on the smaller set B and to check that the imagesÃ n (w j ) satisfy all the relations of section 2.2. Actually it is sufficient to check, that 1.Ã n (w) satisfies for all w ∈ W 0 cyclic invariance, stated in eq. (15).
5.Ã n (w) agrees for all w ∈ B with A n : In order to see that these conditions are sufficient let us start with w ∈ B. Condition 5 guarantees thatÃ n (w) agrees with A n (w) on B. Let's then move to w ∈ W 3 \B. The fundamental BCJ relations of condition 4 ensure, thatÃ n (w) may be expressed as a linear combination ofÃ n (w ′ ) with w ′ ∈ B.
The same relation holds for A n (w) withÃ n (w) substituted by A n (w) andÃ n (w ′ ) substituted by A n (w ′ ). Since we already know thatÃ n (w) agrees with A n (w) on B, we conclude thatÃ n (w) agrees with A n (w) on W 3 . We may repeat this argumentation with condition 3 and show that A n (w) agrees with A n (w) on W 2 . Condition 2 allows us then to conclude that they agree on W 1 and finally condition 1 ensures thatÃ n (w) agrees with A n (w) on W 0 .

The scattering equations
In this section we introduce the scattering equations. We first treat the massless case and proceed afterwards to the massive case. We will also define the Jacobian J(z, p), which we will need later on. Let us denote by Φ n the momentum configuration space of n external particles: In other words, a n-tuple p = (p 1 , p 2 , ..., p n ) of momentum vectors belongs to Φ n if this n-tuple satisfies momentum conservation and the mass-shell conditions. For gluons we have p 2 g j = 0, while for quarks we have p 2 q j = p 2 q j = m 2 q j . The quarks may be massive or massless, in the latter case we have m q j = 0. Note that a quark and an anti-quark of the same flavour have the same mass.
We further denote byĈ = C ∪ {∞}. The spaceĈ is equivalent to the complex projective space CP 1 . For amplitudes with n external particles we consider the spaceĈ n . Points inĈ n will be denoted by z = (z 1 , z 2 , ..., z n ). We use the convention that z without any index denotes an n-tuple. We set for The quantity ∆ i j will be defined below. Differences like in the denominator will occur often in this article and we use the abbreviation

The massless case
Let us start our discussion with the massless case, for which The scattering equations, originally proposed in the massless case, read [3] For a fixed p ∈ Φ n a solution of the scattering equation is a point z ∈Ĉ n , such that the scattering equations in eq. (52) are satisfied. The scattering equations are invariant under the projective special linear group PSL(2, Each g ∈ PSL(2, C) acts on a single z i ∈Ĉ as follows: We further set If (z 1 , z 2 , ..., z n ) is a solution of eq. (52), then also (z ′ 1 , z ′ 2 , ..., z ′ n ) = g · (z 1 , z 2 , ..., z n ) is a solution. We call two solutions which are related by a PSL(2, C)-transformation equivalent solutions. We are in particular interested in the set of all inequivalent solutions of the scattering equations. As shown in [1,2], there are (n − 3)! different solutions not related by a PSL(2, C)-transformation. We will denote a solution by

The massive case
The extension of the scattering equations to the massive case has been considered in [11]. In the massive case the scattering equations remain invariant under PSL(2, C) provided The relations in eq. (58) remain valid provided that the quantities ∆ i j satisfy in addition Let us now consider primitive multi-quark amplitudes with n q quarks, n q anti-quarks and n g gluons. We may assume that the flavours of all n q quarks are distinct. In this case we have that to every external quark q a corresponds an external anti-quarkq a with the same mass m a . Eq. (59) and eq. (60) are satisfied if we set

The Jacobian
Let us define a n × n-matrix Φ(z, p) with entries Let  .
With the above sign included, the quantity det ′ Φ(z, p) is independent of the choice of {i, j, k} and {r, s,t}. One defines a Jacobian factor by .

The CHY representation of tree-level primitive QCD amplitudes
We would like to show that all tree-level primitive QCD amplitudes have a representation in the form or equivalently In eq. (65) the symbol dω denotes the invariant PSL(2, C) measure and the primed product of delta functions stands for taking into account that only (n − 3) scattering equations are independent. The form of eq. (65) or eq. (66) can be interpreted as a "factorisation of information": The information on the external polarisations enters only through ε inÊ, the information on the external order only through w in C. The information on the flavours of the external particles entersÊ (through ε) andĈ (through w). The Jacobian J is defined in eq. (64). Under a PSL(2, C) transformation the Jacobian J transforms as We require thatĈ andÊ transform under PSL(2, C) transformations aŝ The expression on the right-hand-side of eq. (66) is then PSL(2, C) invariant. We further require thatÊ is gauge-invariant.
It will be convenient to introduce the following short-hand notation: We define a N permutationsdimensional vector A w with components and a N solutions -dimensional vectorÊ j bŷ Then eq. (66) may be written compactly as where a sum over j is understood.

Normalisation
We may ask if a representation in the form of eq. (66) is unique. This is certainly not the case. We may always multiplyĈ by a non-zero constant λ and divide at the same timeÊ by the same constant. More generally, we may multiplyĈ by any function of cross-ratios of the variables z and divideÊ by the same function, as long as this function is independent of the external ordering. A function of cross-ratios of the variables z will not change the PSL(2, C) transformation laws in eq. (70). In order to eliminate this freedom we make a choice. We make the choice that the generalised cyclic factorĈ(w, z) agrees with the standard Parke-Taylor factor C(w, z) for pure gluonic amplitudes (n q = 0) and for amplitudes with one quarkanti-quark-pair (n q = 1). In the massless case these amplitudes are identical to their N = 4 SYM counterpart.
For n q ≥ 2 we make the choice that for amplitudes with the standard orientation of the fermion lines (defined in eq. (25)) the generalised cyclic factorĈ(w, z) agrees as well with the standard Parke-Taylor factor C(w, z). Amplitudes with this orientation of the fermion lines and one fermion line of the highest possible level (n q − 1) are identical to their single-flavour cousins (any non-trivial permutation of the quarks while keeping the anti-quarks fixed will lead to crossed fermion lines). In the massless case these single-flavour amplitudes are in turn identical to their N = 4 SYM counterparts (the couplings of the scalar particles in N = 4 are "flavour-changing", therefore there is no scalar exchange in single-flavour amplitudes). (These observations are the basic ideas behind the flavour recursion discussed in [49]).

Definition ofĈ
In this section we define the generalised cyclic factorĈ(w, z). We label the external particles of a primitive amplitude A n by 1, ..., n and the associated complex variables z j occurring in the scattering equations by z 1 , ..., z n , such that the complex variable z j corresponds to particle j. Our alphabet is then A = {1, 2, ..., n} and a word w = l 1 l 2 ...l n ∈ W 0 is equivalent to a permutation of (1, 2, ..., n). We define the standard cyclic factor C(w, z) for w = l 1 l 2 ...l n by .
The standard cyclic factor in eq. (75) is also called the Parke-Taylor factor. The standard cyclic factor C(w, z) satisfies for z a solution of the scattering equations cyclic invariance, the Kleiss-Kuijf relations and the fundamental BCJ relations with any choice of letter for l 2 . In other words, the standard cyclic factor C(w, z) satisfies all the relations of the pure gluonic primitive tree amplitudes. The requirement that z is a solution of the scattering equations is needed for the BCJ relations, but not for cyclic invariance nor for the Kleiss-Kuijf relations. It will be convenient to view C(w, z) andĈ(w, z) as linear operators on the vector space of words with basis W 0 , similar to eq. (13): Let us now give the definition of the generalised cyclic factorĈ: i.e. the generalised cyclic factorĈ(w, z) agrees on W 3 with the standard cyclic factor C(w, z), in agreement with the comments of section 4.1.

For
for all words corresponding to crossed fermion lines. For words with no crossed fermion lines we relateĈ(w, z) as in eq. (31) (by substitutingĈ for A n ) to a linear combination of C(w j , z)'s with w j ∈ W 3 . With the notation as in section 2.3 we have for sub-words the relationĈ x k−1 q i x kq j w k+1 q j y kqi y k−1 , z = x k−1 q i l i 1 ...l i a q j w ′ k+1q j l j b+1 ...l j sq i y k−1 , z , This relation allows us to define recursively the generalised cyclic factor for words with w ∈ W 2 \W 3 in terms of generalised cyclic factors of words with w ∈ W 3 . The recursion proceeds along the levels of the fermion lines, as explained in section 2.3.
Eq. (78) definesĈ(w, z) for words with crossed fermion lines. For these wordsĈ is simply zero. Eq. (80) defines recursively the generalised cyclic factorĈ(w, z) for words with a nonstandard orientation of the fermion lines in terms of generalised cyclic factors for words with a standard orientation of the fermion lines. The latter have already been defined in step 1.
3. For w ∈ W 1 \W 2 we set Eq. (82) defines the generalised cyclic factor for words, where the letter l n does not appear in the last place in terms of already defined generalised cyclic factors for words, where the letter l n occurs in the last place. We recognise in eq. (82) the Kleiss-Kuijf relation.
4. For w ∈ W 0 \W 1 we setĈ Eq. (83) defines the generalised cyclic factor for words, where the letter l 1 does not appear in the first place in terms of already defined generalised cyclic factors for words, where the letter l 1 occurs in the first place. We recognise cyclic invariance in eq. (83).

Definition ofÊ
In this section we define the generalised permutation invariant functionÊ(z, p, ε). We recall that we defined a N permutations × N solutions -dimensional matrixM w j bŷ Let us consider a N basis × N solutions -dimensional sub-matrixM red w j by restricting w ∈ B. Note that we always have therefore the matrixM red w j has less rows than columns. For w ∈ B the generalised cyclic factorĈ agrees with the standard Parke-Taylor factor Ĉ C w, z ( j) = C w, z ( j) (86) and the entries ofM red w j are given bŷ On a technical level, we will now do the following: We first establish that the matrixM red w j has full row rank: IfM red w j has full row rank, a right-inverseN red jw exists. The right-inverse might not be unique. We are interested in a right-inverseN red jw such that the entries in the j-th row ofN red jw depend only on z ( j) , but not on the other solutions z (1) , z (2) , ..., z ( j−1) , z ( j+1) , ..., z (n−3)! of the scattering equations.
The entries of the matrixM red w j are defined in eq. (87) in terms of the standard Parke-Taylor factor C(w, z) and the Jacobian J(z, p). Information on the flavour of the particles does not enter the definition of the individual entries of the matrixM red w j . The flavour information will only affect the set B, giving all the possible first indices w ∈ B ofM red w j . As the flavour information is to a large extent irrelevant, let us for simplicity consider the alphabet with the implicit understanding that we may recover the information on the flavour of the particles if needed. The set W 2 is then The set W 2 has (n − 2)! elements. Let us first consider the case n q ≤ 2. For n q ≤ 2 we have and an amplitude basis is given by The basis B n q ≤2 has N solutions = (n − 3)! elements. For n q ≤ 2 the matrixM red w j is a square N solutions × N solutions matrix. We will need this special matrix in the sequel and we denote this matrix without a hat: It is known that M red is invertible. We can give an explicit expression for the inverse matrix. Let w = l 1 l 2 ...l n−2 l n−1 l n ∈ B n q ≤2 be a word with l 1 = 1, l n−1 = n − 1 and l n = n. We denote byw the wordw = l 1 l 2 ...l n−2 l n l n−1 , i.e. the word where the last two letters are exchanged. We then define for w 1 = l 1 ...l n ∈ B n q ≤2 and w 2 = k 1 ...k n ∈ B n q ≤2 [2, 50-52] with θw 2 l j , l i = 1 if l j comes before l i in the sequence k 2 , k 3 , ..., k n−2 , 0 otherwise.
We then set The N solutions × N solutions -dimensional matrix N red jw is the inverse matrix to M red w j . Thus we have Of course, the inverse matrix is unique and a inspection of eq. (96) shows that the j-th row of N red jw depends only on z ( j) and not on the other solutions z (i) if i = j.
Let us now discuss the general case n q ∈ N 0 . For n q > 2 we have N basis < N solutions (98) and the matrixM red w j is now a rectangular N basis × N solutions -dimensional matrix, with first index given by w ∈ B. We first have to establish thatM red has full row rank, i.e. rankM red w j = N basis .
This would be easy, if However, this is not the case. For n q > 2 the elements of B do not have a unique letter at position (n − 1) and in general we have In order to get around this obstruction we recall that the standard cyclic factors C(w, z ( j) ) satisfy the BCJ relations and we may express the standard cyclic factor C(w, z ( j) ) for w ∈ B as a linear combination of standard cyclic factors C(w ′ , z ( j) ) with w ′ ∈ B n q ≤2 : where a sum over w ′ ∈ B n q ≤2 is understood. F ww ′ defines a N basis × N solutions -dimensional matrix. The explicit expressions of the entries of F ww ′ are given in appendix B. We note that the entries of the matrix F ww ′ depend only on the scalar products 2p i p j , but not on z ( j) . We then havê The case n q ≤ 2 is trivially included in eq. (103) by taking F ww ′ to be the N solutions × N solutions identity matrix. The matrix M red has rank N solutions and is invertible. It follows thatM red w j has rank N basis if and only if the N basis × N solutions -matrix F ww ′ (with w ∈ B and w ′ ∈ B n q ≤2 ) has rank N basis . We have verified for all cases with n ≤ 10 external particles and for generic kinematical configurations that the matrix F ww ′ (and henceM red w j ) has rank N basis . Based on this evidence we will in the sequel assume that F ww ′ has rank N basis : Note that eq. (104) is a purely kinematical statement, independent of flavour and independent of the variables z ( j) . We further note that by a suitable ordering of the bases B and B n q ≤2 the matrix F ww ′ can be brought into an upper triangle block structure. It is therefore sufficient to show that all (square) matrices on the main diagonal have full rank. The details are given in appendix C.
Assuming from now on that the matrix F ww ′ has maximal row rank, the N basis × N basisdimensional matrix FF T is invertible and the N solutions × N basis -dimensional matrix defines a right inverse to F: We then setN The N solutions × N basis -dimensional matrixN red is then a right inverse toM red : Having definedN red jw , we setÊ where a sum over all w ∈ B is understood. Putting everything together, we arrive along the lines of ref. [14] at the definition of the generalised permutation invariant functionÊ(z, p, ε): A few comments are in order: The attentive reader may ask, why we did not simply defineN red asM The reason is as follows: We would like to have thatÊ j depends only on the j-th solution of the scattering equations, but not on all the other solutions. Within our definition this is manifest. F and G are independent of z, and so is S[w 1 |w 2 ]. The z-dependence comes entirely from C v, z ( j) in eq. (96). ThereforeN red jw depends only on z ( j) and not on z (i) if i = j. We can therefore define a functionÊ (z, p, ε) onĈ n as done in eq. (110). On the other hand, this is far from clear for the expression in eq. (111).
A second comment is related to the uniqueness of our definition in eq. (110). For n q > 2 the right-inverse G w ′ w to the matrix F ww ′ is not unique. It is of course unique for invertible matrices, i.e. the case n q ≤ 2. We may parametrise the general form of the right-inverse as with an arbitrary N solutions × N basis -dimensional matrix X w ′ w . Plugging this into eq. (110) we find or equivalentlyÊ with some arbitrary N solutions -dimensional vector x w ′ . This arbitrariness does not affect expressions of the form as long asŶ has an expansion inĈ(w, z ( j) ) with w ∈ B: Then we may write and we have For the tree-level primitive QCD amplitudes we will always have that the factorŶ appearing in the sum as in eq. (115) is of the form as in eq. (116) with w ∈ B forĈ(w, z ( j) ). Therefore the non-uniqueness of the right-inverse does not affect tree-level primitive QCD amplitudes.

Proof of the CHY representation
Let us setÃ withĈ defined in section 4.2 andÊ defined in section 4.3. We would like to show that It is sufficient to check the five conditions at the end of section 2.4.
1. We start with w ∈ B. We havẽ Since w ∈ B we may replace the matrix rowM w j with the matrix rowM red w j (the two rows are identical). We therefore havẽ where we used eq. (108). Switching back to the word notation we havẽ 2. Let us now consider w ∈ W 3 \B. We have to verify the fundamental BCJ relation: In the definition ofÃ n onlyĈ depends on the cyclic order and therefore we should have 2p 2 p k Ĉ l 1 l 3 ...l i l 2 l i+1 ...l n−1 l n , z ( j) = 0 for all solutions z ( j) of the scattering equations. For w ∈ W 3 the cyclic factorĈ agrees with the standard Parke-Taylor factor:Ĉ The validity of can be inferred from the pure gluon case. Note that we have to require that the z ( j) 's are solutions of the scattering equations.
3. Let us now consider w ∈ W 2 \W 3 . We have definedĈ(w, z) = 0 whenever w corresponds to an external ordering with crossed fermion lines. This implies for words corresponding to crossed fermion lines. For words w ∈ W 2 \W 3 with no crossed fermion lines we have definedĈ through eq. (80). AsÃ n (w) depends on the external ordering only throughĈ(w, z), a similar relation holds forÃ n (w). In other words,Ã n satisfies eq. (31).
4. We may repeat this argumentation for w ∈ W 1 \W 2 and afterwards for w ∈ W 0 \W 1 . In both cases we have definedĈ(w, z) such that the required relations (Kleiss-Kuijf relations for w ∈ W 1 \W 2 and cyclic invariance for w ∈ W 0 \W 1 ) are fulfilled.
This completes the proof of eq. (121) and we have shown that any tree-level primitive QCD amplitude has a CHY representation in the form of eq. (66), withĈ defined in section 4.2 andÊ defined in section 4.3. The generalised cyclic factorĈ(w, z) defined in section 4.2 is always a linear combination of standard Parke-Taylor factors C(w, z) with z-independent coefficients. Since the standard Parke-Taylor factors C(w, z) transform under PSL(2, C) transformations as in eq. (70), it follows that C(w, z) transforms as well as in eq. (70). A similar argument applies to the PSL(2, C) transformation properties ofÊ(z, p, ε). Eq. (110) shows thatÊ(z, p, ε) is a linear combination of standard Parke-Taylor factors C(v, z) with z-independent coefficients. Therefore it follows thatÊ(z, p, ε) transforms as in eq. (70) under PSL(2, C) transformations.
Finally, let us comment on the gauge invariance ofÊ(z, p, ε): In section 4.3 we defined E(w, p, ε) in terms of amplitudes A n (w) from the basis w ∈ B. The amplitudes are gauge-invariant and the gauge-invariance ofÊ(z, p, ε) follows trivially.

An example
We would like to illustrate our construction with a concrete example. A non-trivial example is the six-point amplitude A 6 with three quark-anti-quark-pairs. We label the external particles from 1 to 6 and we set q 1 = 1, q 2 = 2, q 3 = 3,q 3 = 4,q 2 = 5,q 1 = 6. (130) Our alphabet is then The basis B consists of four elements: The set B n q ≤2 contains six elements: Note that in the basis B we will have either particle 4 or particle 5 at position 5, while all elements in the set B n q ≤2 have particle 5 at position 5. Since the permutation invariant functionÊ(z, p, ε) involves Parke-Taylor factors with particle 6 at position 5 and particle 5 at position 6 we introduce the setB n q ≤2 given bȳ The setB n q ≤2 is just the set B n q ≤2 with particles 5 and 6 exchanged. The permutation invariant function is then given as a double sum in amplitudes A n (w, p, ε) from the basis w ∈ B and Parke-Taylor factors C(v, z) from the setv ∈B n q ≤2 aŝ The coefficients cv w (p) depend only on the kinematical variables 2p i p j (and the masses m j ) and are given by Due to the inverse matrix in eq. (105) the explicit expressions for cv w (p) are rather long and not reported here.
Let us now consider the generalised cyclic factorĈ(w, z). For w ∈ B the generalised cyclic factor agrees with the standard Parke-Taylor factor. If w corresponds to an external ordering with crossed fermion lines, the generalised cyclic factor equals zero. Let us therefore consider as an example the word w = 153426. This word does not correspond to crossed fermion lines.

Conclusions
In this paper we have shown that a CHY representation exists for all tree-level primitive QCD amplitudes. We provided a definition of the generalised cyclic factorĈ(w, z) and a definition of the generalised permutation invariant functionÊ(z, p, ε). The virtue of the CHY representation lies in the fact that it separates the information on the external ordering (contained in the generalised cyclic factorĈ(w, z)) from the information on the helicities of the external particles (contained in the generalised permutation invariant functionÊ(z, p, ε)).

Acknowledgements
L.d.l.C. is grateful for financial support from CONACYT and the DAAD.

A Orientation of fermion lines
In this appendix we prove eq. (31). A slightly modified form of eq. (31) has been stated in [49] and the idea of the proof can be found in [48]. We consider A n = A n x k−1 q i x kq j w k+1 q j y kqi y k−1 .
Let us assume that the sub-words x k and y k consist of r letters and s letters, respectively: It will be convenient to set Using cyclic invariance we have A n = A n q i x kq j w k+1 q j y kqi w k−1 .
We now use the Kleiss-Kuijf relation to flip x k : If we would work out the shuffle product, we would obtain words, where the first a letters of x k occur after q j and the remaining (r − a) letters of x k occur before q j , with a ranging from 0 to r. Writing this out we have We then use a second time the Kleiss-Kuijf relation to flip the sub-wordq j [w k+1 ¡(l i r ...l i a+1 )]: The shuffle product is associative and therefore We may then use the (inverse) Kleiss-Kuijf relation to bring back (l i a ...l i 1 ) between q i and q j : In the shuffle product of [w T k+1 ¡(l i a+1 ...l i r )]q j with y kqi w k−1 only the terms whereq j occurs beforeq i are non-zero. The other terms have a crossed fermion line and the amplitude is zero for those. Writing the sub-word y k in terms of letters we obtain Finally, using cyclic invariance one arrives at with

B The matrix F ww ′
In this appendix we define the entries of the matrix F ww ′ , occurring in eq. (102). We may neglect flavour and it is therefore convenient to consider the alphabet We set as before and For a sub-word w = l 1 l 2 ...l k we set Let w 1 = l 1 l 2 ...l j and w 2 = l j+1 l j+2 ...l n−3 be two sub-words, such that w = 1w 1 (n − 1)w 2 n ∈ W 2 . For convenience we set l n−2 = n − 1. The standard cyclic factors C(w, z ( j) ) satisfy the BCJ relations and we have The sum is over all words occurring in For a given w we define F ww ′ = 0 if w ′ does not appear in the sum of eq. (154). Otherwise, the coefficients are given for w ′ = 1σ 1 σ 2 ...σ n−3 (n − 1)n = 1σ(n − 1)n by [38] where for ρ = 1σ(n − 1) the function F (ρ|l k ) is given by t a denotes the position of leg a in the string ρ, except for t l n−2 and t l j , which are always defined to be t l n−2 = t l n−4 , t l j = n.
For j = n − 4 this implies The function G is given by We used the notationŝ Let us mention that the coefficients F ww ′ are the ones appearing in the general BCJ relations for tree-level primitive QCD amplitudes [38,39]. We presented them here in a form which holds also for the massive case. The general form of the BCJ relations is as follows: Let w 1 = l 1 l 2 ...l j be a sub-word, where particles of any type may occur and w 2 = l j+1 l j+2 ...l n−3 a second sub-word consisting only of gluon legs. We further assume that w = 1w 1 (n − 1)w 2 n ∈ W 2 . The general BCJ relation reads As before, the sum is over all words occurring in and the coefficients F ww ′ are defined as above. The general BCJ relations of eq. (162) follow from the fundamental BCJ relations [47].

C Comments on the rank of F ww ′
We recall that the matrix F ww ′ is a N basis × N solutions -dimensional matrix with N basis ≤ N solutions , w ∈ B and w ′ ∈ B n q ≤2 . The conjecture in eq. (104) states that the matrix F has full row rank: In this appendix we show that in order to prove eq. (164) it is sufficient to prove a weaker statement. We first show that the matrix F has an upper triangle block structure. We do this by defining a suitable partial order for the elements of the basis B and for the elements of the basis B n q ≤2 . A sufficient condition for eq. (164) is therefore that all (square) matrices on the main diagonal have full rank. Let us start with w ∈ B. Let us write w = 1w 1 2w 2 w g (n − 1)w 3 n, with the condition that w 2 is either empty or ends with an antiquark and w g is either empty or contains only gluons. This defines uniquely the sub-words w 1 , w 2 , w 3 and w g . The sub-words may be empty. The sub-word w 1 encodes all particles which come after particle 1 and before particle 2 in the cyclic order, the sub-word w 3 encodes all particles which come after particle (n − 1) and before particle n in the cyclic order. The sub-word w g encodes all gluons which directly precede particle (n − 1), the sub-word w 2 encodes the remaining particles which come after particle 2 and before particle (n − 1) in the cyclic order. Let us now look at the antiquarks in w 3 . The corresponding quarks may either be in w 3 or in w 1 . They cannot be in w 2 (nor in w g ) since in this case they would have to cross the fermion line 2-(n − 1). We denote by n 1 the number of antiquarks in w 3 , where the corresponding quark is again in w 3 . We denote by n 2 the number of antiquarks in w 3 , where the corresponding quark is in w 1 . Furthermore we denote by n 3 the sum of the numbers of gluons in w 3 and w g . We associate to w ∈ B the triple N(w) = (n 1 , n 2 , n 3 ) .
We define an order for these triples through if there is an i such that n ′ i > n i and n ′ j = n j for all j < i. This is just the lexicographical order for the triples (n 1 , n 2 , n 3 ). The triples N(w) induce a partial order on B.
Let us now turn to w ′ ∈ B n q ≤2 . Let us write Let us assume that We now consider all possible splitting of w ′ 2 into two sub-words (with the empty words included) such that is an element of B. There is either one or no possibility for such a splitting. In the first case we set with N(w) defined by eq. (166), in the latter case we set This defines a partial order for B n q ≤2 . It is easy to see that there cannot be more than one possible splitting. Suppose w ′ 2 = u ′ v ′ is a possible splitting. Then v ′ is either empty or must start with an antiquark. All antiquarks in u ′ have the standard orientation and do not cross other fermion lines, while all antiquarks in v ′ either have the opposite orientation or cross the fermion line 2-(n − 1). These requirements make the splitting unique. If N ′ (w ′ ) = (n 1 , n 2 , n 3 ) = (−1, −1, −1), then n 1 counts the number of antiquarks in v ′ with the opposite orientation, while n 2 counts the number of antiquarks in v ′ , which cross the fermion line 2-(n − 1). The variable n 3 gives the sum of the trailing gluons of u ′ and the number of gluons in v ′ .
We may now order the basis B by putting the elements w with the highest N(w) first. In a similar way we order the basis B n q ≤2 by putting the elements w ′ with the highest N ′ (w ′ ) first. With respect to this ordering the matrix F ww ′ has an upper triangle block structure. This means that Eq. (174) is easily understood as follows: Let us consider a word w = 1w 1 2w 2 w g (n − 1)w 3 n ∈ B with N(w) = (n 1 , n 2 , n 3 ). The non-zero elements of the line F ww ′ with w ′ ∈ B n q ≤2 are the ones, where the letters of the sub-word w 3 are inserted in arbitrary positions between the letters 1 and (n − 1). Suppose now that w ′ = 1w ′ 1 2u ′ v ′ (n − 1)n with N ′ (w ′ ) = (n ′ 1 , n ′ 2 , n ′ 3 ) such that eq. (171) is satisfied. The maximal number of antiquarks with the opposite orientation which may appear in v ′ is exactly the number n 1 of antiquarks in w 3 , where the corresponding quark belongs also to w 3 . Thus we have n ′ 1 ≤ n 1 . Let us now assume that n ′ 1 = n 1 . Then the maximal number of antiquarks appearing in v ′ and crossing the line 2-(n − 1) is exactly (under the assumption n ′ 1 = n 1 ) the number n 2 of antiquarks in w 3 , where the corresponding quark belongs to w 1 . Thus we have n ′ 2 ≤ n 2 . Let us now look at the gluons. The maximal number of gluons appearing in v ′ is exactly the number n 3 of gluons appearing in w 3 and w g . Thus we have n ′ 3 ≤ n 3 . This completes the proof of eq. (174).
Having established the upper triangle block structure it follows that a sufficient condition for the matrix F ww ′ having full rank is the situation, where all the square matrices on the main diagonal have full rank. In other words, we may consider the square sub-matrices If for all sectors N(w) = N ′ (w ′ ) = (−1, −1, −1) the corresponding sub-matrices F red ww ′ have full rank, then it follows that F ww ′ has full rank. Eq. (175) allows us to work with matrices of smaller dimensions and reduces therefore the complexity of the problem.
We remark that for some sectors the matrix F red ww ′ has a diagonal block form and can be reduced further to smaller square sub-matrices. This is the case for sectors with 0 < n 1 < n q − 2, where we may decompose F red ww ′ with respect to the inequivalent antiquark flavour sets contributing to n 1 . Sectors with 0 < n 2 ≤ n q − 2 decompose with respect to the ordered sequences of antiquarks in w 3 contributing to n 2 (and the corresponding reversed sequences in v ′ ). The sector (n 1 , n 2 , n 3 ) = (0, 0, 0) contains all words w, which are at the same time elements of B and B n q ≤2 . The matrix F red ww ′ for this sector is always the unit matrix. However, the highest sector (n 1 , n 2 , n 3 ) = (n q − 2, 0, n g ) does in general not decompose further.
We have checked for all cases with n ≤ 10 external particles and generic external momenta that the corresponding matrices F red ww ′ have full rank.