This is a preprint of: “An algorithm for providing the normal forms of spatial quasi-homogeneous polynomial differential systems”, Belen Garcı́a, Jaume Llibre, Antón Lombardero, Jesús Suárez Pérez del Rı́o, J. Symbolic Comput., vol. 95, 1–25, 2019. DOI: [10.1016/j.jsc.2018.08.006] An algorithm for providing the normal forms of spatial quasi-homogeneous polynomial differential systems Belén Garcı́a1 , Jaume Llibre2 , Antón Lombardero1 , Jesús S. Pérez del Rı́o1 1 Departamento de Matemáticas, Universidad de Oviedo. Federico Garcı́a Lorca, s/n., 33007, Oviedo, Spain 2 Departament de Matemàtiques, Universitat Autònoma de Barcelona, 08193 Bellaterra, Barcelona, Catalonia, Spain Abstract Quasi-homogeneous systems, and in particular those 3-dimensional, are cur- rently a thriving line of research. But a method for obtaining all fields of this class is not yet available. The weight vectors of a quasi-homogeneous system are grouped into families. We found the maximal spatial quasi-homogeneous systems with the property of having only one family with minimum weight vector. This minimum vector is unique to the system, thus acting as iden- tification code. We develop an algorithm that provides all normal forms of maximal 3-dimensional quasi-homogeneous systems for a given degree. From these maximal systems can be trivially deduced all the other 3-dimensional quasi-homogeneous systems. We also list all the systems of this type of degree 2 using the algorithm. With this algorithm we make available to the researchers all 3-dimensional quasi-homogeneous systems. Keywords: quasi-homogeneous, polynomial differential system, algorithm, weight vector. 1. Introduction We deal with polynomial differential systems of the form ẋ = P (x, y, z), ẏ = Q(x, y, z), ż = R(x, y, z) (1) being P, Q, R ∈ C[x, y, z], with degrees n1 , n2 , n3 respectively. As usual C[x, y, z] denotes the ring of all polynomials with coefficients in C and the complex vari- ables x, y, z. The dot denotes derivative with respect to an independent vari- able t, which can be real or complex. We say that the degree of the system is n = max{n1 , n2 , n3 }. From now on a polynomial differential system (1) will be denoted by S (P, Q, R), or by S when it does not lead to confusion. Preprint submitted to Elsevier December 2, 2017 http://www.gsd.uab.cat Let Z+ denote the set of positive integers, and R+ the set of positive reals. A polynomial differential system S (P, Q, R) is quasi–homogeneous (from here on, simply QH) if there exist s1 , s2 , s3 , d ∈ Z+ such that for an arbitrary α ∈ R+ , P (αs1 x, αs2 y, αs3 z) = αs1 −1+d P (x, y, z), Q(αs1 x, αs2 y, αs3 z) = αs2 −1+d Q(x, y, z), (2) R(αs1 x, αs2 y, αs3 z) = αs3 −1+d R(x, y, z). We call s1 , s2 and s3 weight exponents of S, and d the weight degree with respect to the weight exponents s1 , s2 and s3 . Suppose that a system S is QH, with weight exponents s1 , s2 and s3 and with weight degree d. In this case we state that w = (s1 , s2 , s3 , d) is a weight vector of the system S. In the set of weight vectors of a QH system S it is possible to define a partial order relation as follows: given two weight vectors of S, w = (s1 , s2 , s3 , d) and v = (s∗1 , s∗2 , s∗3 , d∗ ), we write that w ≤ v when s1 ≤ s∗1 , s2 ≤ s∗2 , s3 ≤ s∗3 , d ≤ d∗ . (3) We say that a weight vector wm is the minimum weight vector of the QH system S if for any other weight vector w of the system S it is verified that wm ≤ w. A QH system is called maximal if any new monomial added to its structure prevents it to be QH. As an example consider the polynomial differential system ẋ = xyz + x2 , ẏ = y 2 z + xy, (4) ż = yz 2 + xz. It is a QH system with weight vector (2, 1, 1, 3), as can be seen from (2). But this system is not maximal, because it can be completed to ẋ = xyz + y 3 + x2 , ẏ = y 2 z + xz 2 + xy, (5) ż = yz 2 + y 2 + xz, which still is QH with the weight vector (3, 2, 1, 4). We will focus our study on the maximal systems, considering the rest as particular cases of these in which some monomials are zero. A non-maximal system will possess all the weight vectors of those maximal systems to which it can be completed, and perhaps other new weight vectors. All the weight vectors of (5), i.e. the set {(3a, 2a, a, 3a + 1) : a ∈ Z+ }, are also weight vectors of (4), 2 besides others as the mentioned (2, 1, 1, 3). The QH systems are a generalization of the homogeneous systems, to which they contain as a particular case. Several reasons motivate their study. For example, if a system S is QH with weight vector v = (s1 , s2 , s3 , d), being d > 1, then S is invariant under the changes of variable xi → αwi xi , t → α−1 t, for any α ∈ R+ , where wi = si / (d − 1) for i = 1, 2, 3. In addition, the structural properties of QH systems allow to find their possible analytic first integrals through the Kowalevski exponents, see Yoshida, [15]. In the literature many authors have made contributions to this field, and in recent times it generates an increasing interest. The integrability has been studied extensively, highlighting the contributions of Llibre-Zhang [12], Kozlov [8], and Garcı́a-Llibre-Pérez del Rı́o [3]. In Liang-Huang-Zhao [10] are studied the phase portraits. The centers and limit cycles are discussed in Tang-Wang- Zhang [13], Geng-Lian [5], Li-Wu [9] and Xiong-Han-Wang [14]. Chiba [2] and Yoshida [15] have explored the Kowalevski exponents. Other topics such as the period function of the sum of two quasi-homogeneous [1], or the isochronicity and normal forms [6] have also been treated recently. On the other hand, Garcı́a- Lombardero-Pérez del Rı́o [4] have studied the classification and counting of this class of systems in dimension 2. Although the mentioned previous papers deal with systems in the plane, the area of QH systems in the space has recently begun to be explored, as shown by the works of Huang-Zhao [7], devoted to the limit set of trajectories, and Liang-Torregrosa [11], which studies the centers of a certain class of 3-dimensional QH systems. The objective of this work is to develop an algorithm that provides, given a degree n supplied by the user, all normal forms of existing spatial QH polynomial differential systems of degree n. As we have said, we will restrict ourselves to maximal QH systems. A similar objective, but for systems in the plane, have been carried out in [3]. However, to the best of our knowledge, there is no work focused on supplying the complete set of 3-dimensional QH. We provide such algorithm in the present paper, which will be of valuable assistance for the development of future works in the field of study of polynomial differential systems This work is organized as follows. In section 2 we present some properties about weight vectors of QH systems, besides provide some concepts like the weight vector family. Section 3 deals with the particular case of homogeneous QH systems. In section 4 we introduce the concept of brick, the unitary element with which we will later build the QH systems. Section 5 contains some of the most important theoretical results, such as Theorem 16, which states that the maximal QH systems have a single family of weight vectors, or the fact that the minimum weight vector can be constituted as a unique identifier in this type of systems. In section 6 are the main practical results used directly by the algorithm, which is provided in pseudocode in section 7. The work is closed with the list of all QH systems of degree n = 2, obtained by applying the algorithm, see section 8. 3 2. Some results on weight vectors Given a QH system S (P, Q, R), where n1 X n2 X n3 X P = Pk , Q= Qk , R= Rk , (6) k=0 k=0 k=0 we define its homogeneous parts of degree k, Pk , Qk and Rk as: k k−p X X1 Pk (x, y, z) = ap1 p2 k−p1 −p2 xp1 y p2 z k−p1 −p2 (k = 1, 2, ..., n1 ) , (7) p1 =0 p2 =0 k k−q X X1 Qk (x, y, z) = bq1 q2 k−q1 −q2 xq1 y q2 z k−q1 −q2 (k = 1, 2, ..., n2 ) , q1 =0 q2 =0 k k−t X X1 Rk (x, y, z) = ct1 t2 k−t1 −t2 xt1 y t2 z k−t1 −t2 (k = 1, 2, ..., n3 ) . t1 =0 t2 =0 Now we are going to obtain some properties of the coefficients of the QH systems. The equations included in the following result provide information of great relevance about the structure of the QH systems, because they are the key for determining when a monomial is present in the system or not. Proposition 1. Given a QH system S (P, Q, R), being Pk , Qk and Rk its homogeneous parts of degree k, and p1 , p2 , q1 , q2 , t1 , t2 , p1 + p2 , q1 + q2 , t1 + t2 ∈ {0, 1, ..., k}, then ap1 p2 k−p1 −p2 6= 0 ⇒ (p1 − 1)s1 + p2 s2 + (k − p1 − p2 )s3 = d − 1, (8) bq1 q2 k−q1 −q2 6= 0 ⇒ q1 s1 + (q2 − 1)s2 + (k − q1 − q2 )s3 = d − 1, (9) ct1 t2 k−t1 −t2 6= 0 ⇒ t1 s1 + t2 s2 + (k − t1 − t2 − 1)s3 = d − 1, (10) for any weight vector w = (s1 , s2 , s3 , d) of S. If S is a maximal system, then the three reciprocal implications are also true. Proof. We will do the proof for the coefficients of Pk , because the proofs for the coefficients of Qk and Rk are identical. Let {wi }i∈I be the weight vector set of the QH system S. Due to (6) and (7) we have that X k k−p n1 X X1 P (x, y, z) = ap1 p2 k−p1 −p2 xp1 y p2 z k−p1 −p2 k=0 p1 =0 p2 =0 satisfies P (αs1 x, αs2 y, αs3 z) = 4 X k k−p n1 X X1 = ap1 p2 k−p1 −p2 αp1 s1 +p2 s2 +(k−p1 −p2 )s3 xp1 y p2 z k−p1 −p2 . k=0 p1 =0 p2 =0 Then it follows from the fact that S is QH (see (2)) that ap1 p2 k−p1 −p2 αp1 s1 +p2 s2 +(k−p1 −p2 )s3 = ap1 p2 k−p1 −p2 αs1 −1+d (11) for all coefficients, for all w ∈ {wi }i∈I and for any α ∈ R+ . Then we fix a coefficient ap1 p2 k−p1 −p2 , corresponding to the k-degree monomial ap1 p2 k−p1 −p2 xp1 y p2 z k−p1 −p2 . (12) Due to (11), if ap1 p2 k−p1 −p2 6= 0, (p1 − 1)s1 + p2 s2 + (k − p1 − p2 )s3 = d − 1 (13) is necessarily fulfilled for all w ∈ {wi }i∈I , and thus the necessary condition (⇒) is proved. We now study the sufficient condition (⇐) supposing that S is maximal. Fixed the values p1 , p2 , k, we have that (13) meets for any w ∈ {wi }i∈I . Suppose, by reductio ad absurdum, that ap1 p2 k−p1 −p2 = 0, that is the monomial (12) is not present in Pk . Let us see that a new monomial can be added to Pk by maintaining the QH character of the system. The new system S0 (P 0 , Q0 , R0 ) will be P 0 (x, y, z) = P (x, y, z) + xp1 y p2 z k−p1 −p2 , Q0 = Q, R0 = R. Then if we take any weight vector of S, w ∈ {wi }i∈I , we have due to (13) and since S is QH, that P 0 (αs1 x, αs2 y, αs3 z) = = P (αs1 x, αs2 y, αs3 z) + αp1 s1 +p2 s2 +(k−p1 −p2 )s3 xp1 y p2 z k−p1 −p2 = P (αs1 x, αs2 y, αs3 z) + αs1 −1+d xp1 y p2 z k−p1 −p2   = αs1 −1+d P (x, y, z) + xp1 y p2 z k−p1 −p2 = αs1 −1+d P 0 (x, y, z) , for an arbitrary α ∈ R+ . As this same property is also fulfilled for Q0 and R0 , we get that S0 is also a QH system. As a consequence S was not maximal, a contradiction. Corollary 2. If a QH system S has a monomial of degree k, then there exist x1 , x2 ∈ {−1, 0, ..., k}, −1 ≤ x1 + x2 ≤ k, verifying x1 s1 + x2 s2 + (k − x1 − x2 − 1)s3 = d − 1 5 for any weight vector (s1 , s2 , s3 , d) of S. Proof. It is deduced from Proposition 1 taking into account that pi , qi , ti ∈ {0, 1, ..., k} for i = 1, 2. Corollary 3. If a system S (P, Q, R) is QH, then P0 = Q0 = R0 = 0. Proof. The equivalence (8) shows that if P0 = a0,0,0 is not null, then d ≤ 0, a contradiction. Also, if Q0 or R0 are different from zero, we obtain the same conclusion from (9) and (10). The following results are a direct consequence of Corollary 2, taking into account that a system must have some coefficient different from zero. 4 Remark 4. (i) A necessary condition for a vector w = (s1 , s2 , s3 , d) ∈ (Z+ ) to be a weight vector of some QH system is that gcd(s1 , s2 , s3 ) be a divisor of d − 1. (ii) Given a QH system S, the weight degree d of any weight vector is uniquely determined by the weight exponents s1 , s2 and s3 . The following result proves that the set of weight vectors of a QH system is infinite, and also provides a method for constructing new weight vectors from a given one. Proposition 5. Given a weight vector (s1 , s2 , s3 , d) of a QH system S and r = pq ∈ Q+ with p and q coprime, the vector (rs1 , rs2 , rs3 , d∗ ) is also a weight vector of S if and only if q divides gcd (s1 , s2 , s3 ) and d∗ = r (d − 1) + 1. Proof. Note first that (rs1 , rs2 , rs3 , r (d − 1) + 1) is a vector of positive in- tegers if and only if q divides gcd (s1 , s2 , s3 , d − 1). Taking int account that gcd (s1 , s2 , s3 ) is a divisor of d − 1, it is enough that q divides gcd (s1 , s2 , s3 ). As (s1 , s2 , s3 , d) is a weight vector, for any α > 0, we have that P (αs1 x, αs2 y, αs3 z) = αs1 +d−1 P (x, y, z). On the other hand r ∈ Q+ , whereby αr > 0, and consequently s s s P (αrs1 x, αrs2 y, αrs3 z) = P ((αr ) 1 x, (αr ) 2 y, (αr ) 3 z) s1 +d−1 = (αr ) P (x, y, z) = αrs1 +r(d−1) P (x, y, z) . Therefore (rs1 , rs2 , rs3 , d∗ ) will be weight vector if only if d∗ = r (d − 1) + 1. Similar conclusions for Q and R. The next result provides another way to build a new weight vector. 6 Proposition 6. If (s1 , s2 , s3 , d) and (s∗1 , s∗2 , s∗3 , d∗ ) are weight vectors of a QH system S, then (s1 + s∗1 , s2 + s∗2 , s3 + s∗3 , d + d∗ − 1) is also a weight vector of S. Proof. As (s1 , s2 , s3 , d) and (s∗1 , s∗2 , s∗3 , d∗ ) are weight vectors of S, we have that for every α ∈ R+ , P (αs1 x, αs2 y, αs3 z) = αs1 −1+d P (x, y, z), ∗ ∗ ∗ ∗ ∗ P (αs1 x, αs2 y, αs3 z) = αs1 −1+d P (x, y, z). Then, ∗ ∗ ∗  ∗   ∗   ∗  P (αs1 +s1 x, αs2 +s2 y, αs3 +s3 z) = P (αs1 αs1 x , αs2 αs2 y , αs3 αs3 z ) ∗ ∗ ∗ = αs1 −1+d P (αs1 x, αs2 y, αs3 z) ∗ ∗ = αs1 −1+d αs1 −1+d P (x, y, z) ∗ ∗ −1) = α(s1 +s1 )−1+(d+d . We get the same for Q and R, obtaining that (s1 + s∗1 , s2 + s∗2 , s3 + s∗3 , d + d∗ − 1) is a weight vector of S. Given a QH system S and λ, µ ∈ Q+ , the weight vector family of S with ratio (λ, µ), FS (λ, µ), is defined as the set of weight vectors of S where the proportion between the exponents s1 and s2 is λ and the proportion between the exponents s1 and s3 is µ:   s1 s1 FS (λ, µ) = (s1 , s2 , s3 , d) weight vector of S : = λ and =µ . s2 s3 Note that in this definition is not relevant the value that can take the weight degree d, which is uniquely determined by s1 , s2 and s3 . Moreover, if we fix the system S and the family FS (λ, µ), the first weight exponent s1 of a weight vector uniquely determines the rest of the vector, because s2 = s1 /λ, s3 = s1 /µ and, as we said before, the weight degree d depends functionally on s1 , s2 and s3 . However, fixed λ and µ, and given two systems S and T, it can happen that families FS (λ, µ) and FT (λ, µ) are different. In this case the weight exponents of the vectors match but not necessarily the weight degrees. Given a weight vector family FS (λ, µ), a weight vector that minimizes the rest of vectors of the family in the sense of the order relation (3) is called the family generator and we denote it by g(λ,µ) . Now we will prove that g(λ,µ) exists for every family. As it happens in two dimensions (see [4]), we have: Proposition 7. Given a weight vector family FS (λ, µ) of a QH system S, it is verified that: 7 (i) The family generator g(λ,µ) exists. (ii) Given w = (s∗1 , s∗2 , s∗3 , d∗ ) ∈ FS (λ, µ), then g(λ,µ) = w if and only if gcd(s∗1 , s∗2 , s∗3 ) = 1. Proof. Let w = (s∗1 , s∗2 , s∗3 , d∗ ) be the only weight vector of the family FS (λ, µ) that verifies s∗1 ≤ s1 for every (s1 , s2 , s3 , d) ∈ FS (λ, µ). This weight vector al- ways exists, because the weight exponents are positive integers; and it is unique, as two weight vectors of FS (λ, µ) with the same weight exponent s∗1 are iden- tical. We will see that w is the generator of FS (λ, µ). Let v = (s1 , s2 , s3 , d) be any weight vector of FS (λ, µ). From s∗1 ≤ s1 we easily follow that s∗2 = s∗1 /λ ≤ s1 /λ = s2 and s∗3 = s∗1 /µ ≤ s1 /µ = s3 . For proving d∗ ≤ d, we suppose P 6= 0. As w and v are weight vectors of FS (λ, µ), for any α, β > 0 we have:   s∗ s∗ s∗ 1 1 ∗ ∗ P α x, α y, α z = αs1 −1+d P (x, y, z) 1 λ µ (14) and  s1 s1  P β s1 x, β λ y, β µ z = β s1 −1+d P (x, y, z) . (15) s∗ 1 Then, setting β = α s1 > 0, (15) becomes:   s∗ s∗ s∗ ∗ s∗ 1 1 P α x, α y, α z = αs1 + s1 (d−1) P (x, y, z) . 1 1 λ µ (16) So, by (14) and (16), and since P is not zero in the whole plane, we have ∗ s∗ 1 αd −1 = α s1 (d−1) . s∗ The exponential function is injective, hence d∗ −1 = 1 s1 (d − 1). As a conclusion, s∗1 ≤ s1 ⇔ d∗ ≤ d. (17) If P = 0, then Q 6= 0 or R 6= 0 , and the result is proved in a similar way. Thus w ≤ v and accordingly w = g(λ,µ) . Now let g(λ,µ) = (s∗1 , s∗2 , s∗3 , d∗ ) be the family generator, and we suppose that s1 , s2 and s3 share a common divisor q > 1. Making use of r = 1/q in Proposition 5, g(λ,µ) would not be the family generator. On the other hand, the fact that the weight exponents are coprime implies, also by Proposition 5, that they cannot be reduced more. Neither the weight degree, due to (17). The reason for calling such vector of FS (λ, µ) family generator is clear when we observe that the whole family can be constructed based on g(λ,µ) multiples. 8 It is clear from the above results that  FS (λ, µ) = (as∗1 , as∗2 , as∗3 , a (d∗ − 1) + 1) : a ∈ Z+ , being g(λ,µ) = (s∗1 , s∗2 , s∗3 , d∗ ) the family generator of FS (λ, µ) . As a consequence a weight vector family is always contained in an unidi- mensional linear variety of R4 passing through the point (0, 0, 0, 1). The linear variety that contains the family generated by (s∗1 , s∗2 , s∗3 , d∗ ) is x0 + L, where x0 = (0, 0, 0, 1) and L =< (s∗1 , s∗2 , s∗3 , d∗ − 1) > is the vector subspace with basis (s∗1 , s∗2 , s∗3 , d∗ − 1). For the same reason, a dimension 1 variety of R4 cannot contain two different families, even if the families belong to distinct systems. Or it contains a unique whole family, or it does not contain any. The next question is how many weight vector families can have a QH system. There are many examples of systems with more than one family of weight vec- tors. As an example, system (4) has {(a, b, a − b, a + 1) : a, b ∈ Z+ and a > b} as a set of weight vectors, which means that F (a/b, a/ (a − b)) is a weight vector family of (4) for every pair a, b ∈ Z+ verifying a > b. Therefore this is a case of infinite number of families. The fact that a system S has more than one weight vector family implies that the existence of the minimum weight vector wm of S is not guaranteed. If it exists, it should be the minimum of all family generators, and this minimum may not be reached. However in systems with a single family FS (λ, µ) we have that g(λ,µ) = wm . We will show in Theorem 16 that the maximal QH systems, the main object of our study, always fulfill the property of having a unique family, and therefore they have minimum vector of the system. 3. The homogeneous maximal case We say that a polynomial differential system S (P, Q, R) is homogeneous of degree n if P (αx, αy, αz) = αn P (x, y, z), Q(αx, αy, αz) = αn Q(x, y, z), R(αx, αy, αz) = αn R(x, y, z) for every α ∈ R. This is equivalent to verify that all the monomials that constitute S are of degree n. All homogeneous polynomial differential systems belong to the set of QH systems. In order to verify this property, it is enough to take (1, 1, 1, n), or any of its multiples, as weight vector. We will now see that the reciprocal is also true, whereby the homogeneous systems of degree n are totally determined as those having (1, 1, 1, n) as weight vector. Proposition 8. If the system S (P, Q, R) is QH and w = (s, s, s, d) is a weight vector of S, then the system is homogeneous. Proof. If n is the degree of S, we can apply Corollary 2 to the weight vector w 9 and k = n to obtain (n − 1)s = d − 1, so s − 1 + d = ns. Therefore, from (2) we get P (αs x, αs y, αs z) = αns P (x, y, z), Q(αs x, αs y, αs z) = αns Q(x, y, z), (18) R(αs x, αs y, αs z) = αns R(x, y, z). Now we observe that any positive parameter β can be written in the form 1 αs just taking α = β s > 0 and therefore, by using (18), the system verifies P (βx, βy, βz) = β P (x, y, z), Q(βx, βy, βz) = β n Q(x, y, z) and R(βx, βy, βz) = n β n R(x, y, z), that is, the system is homogeneous. The system constructed with all possible monomials of degree n is the only maximal homogeneous system of degree n. We will denote this system by Hn . The only weight vector family of Hn is  FHn (1, 1) = (a, a, a, a (n − 1) + 1) : a ∈ Z+ , being wm = (1, 1, 1, n) the minimum weight vector. Again non-maximal homo- geneous systems are very varied and generally have more weight vectors than the maximal one. 4. Bricks and compatibility We will use the weight vectors to list the set of maximal inhomogeneous QH systems. With the aim of reduce the total number of cases, in what follows we will consider only those weight vectors (s1 , s2 , s3 , d) that verify s1 ≥ s2 ≥ s3 . (19) Also, taking into account Proposition 8, and with the aim of determine just the inhomogeneous systems, we impose that the condition s1 > s3 (20) must be also verified. That is, we are going to construct the maximal sys- tems that have among their weight vectors someone satisfying (19) and (20). In this way we simplify our study, significantly reducing the number of sys- tems to study. The rest of systems are symmetrical to those obtained with these restrictions, without doing more than permutations on the variables x, y and z. As an example, if we find system (5), whose weight vectors, the set {(3a, 2a, a, 3a + 1) : a ∈ Z+ }, verify the restrictions (19) and (20), we are auto- matically finding five more systems, as there are six possible permutations of the variables x, y and z. One of these systems is obtained by permuting the 10 variables x and y, and has as weight vectors the set {(2a, 3a, a, 3a + 1) : a ∈ Z+ }: ẋ = x2 z + yz 2 + xy, ẏ = xyz + x3 + y 2 , ż = xz 2 + x2 + yz. In order to simplify the equations involved in the process, and taking into account the restrictions (19), we define the new variables s¯1 , s¯2 , s¯3 and d¯ as follows: s¯1 = s1 − s3 , s¯2 = s2 − s3 , s¯3 = s3 , d¯ = d − 1 + s3 . (21) It follows from (19), (20), (21) and from the fact that the weight vectors are made of positive integers, that these new variables verify the constraints s¯1 , s¯2 , s¯3 , d¯ ∈ Z, (22) s¯1 ≥ s¯2 ≥ 0, (23) s¯1 > 0, (24) d¯ ≥ s¯3 > 0. (25) Given a weight vector w = (s1 , s2 , s3 , d) that satisfies (19) and (20), the new ¯ obtained by the change of variables (21) is called the vector w̄ = (s¯1 , s¯2 , s¯3 , d) transformed vector of w, and we denote the implicit bijection by w̄ = t (w). A transformed vector always verifies the conditions (22), (23), (24) and (25). ¯ its corresponding Reciprocally, given a transformed vector w̄ = (s¯1 , s¯2 , s¯3 , d), weight vector w = t−1 (w̄) = (s1 , s2 , s3 , d) can be obtained doing: s1 = s¯1 + s¯3 , s2 = s¯2 + s¯3 , s3 = s¯3 , d = d¯ − s¯3 + 1. (26) The transformed vectors are also grouped into families. That is the weight vector family FS (λ, µ) = {(as1 , as2 , as3 , a (d − 1) + 1) : a ∈ Z+ } is transformed by t into the set   F¯S (λ, µ) = as¯1 , as¯2 , as¯3 , ad¯ : a ∈ Z+ , which is called the transformed weight vector family of FS (λ, µ). While a weight vector family was contained in a straight line of R4 passing through the point (0, 0, 0, 1), a transformed weight vector family exists within a more simple unidimensional subspace of R4 . As previously, a subspace of R4 of dimension 1 cannot contain two different transformed weight vector families. The following result, an improved and simplified version of Corollary 2, will be an important tool in this work, and shows the close relationship between the monomials of a QH system and a certain type of homogeneous linear equations. 11 Proposition 9. A maximal QH system S has a monomial of degree k if and only if there exist x1 , x2 ∈ {−1, 0, ..., k}, −1 ≤ x1 + x2 ≤ k, verifying x1 s¯1 + x2 s¯2 + k s¯3 = d¯ (27) ¯ of S . for any transformed vector (s¯1 , s¯2 , s¯3 , d) Proof. Using of the change of variables (21), the equivalences of Proposition 1 can be rewritten for transformed vectors, as ¯ ap1 p2 k−p1 −p2 6= 0 ⇔ (p1 − 1)s¯1 + p2 s¯2 + k s¯3 = d, ¯ bq1 q2 k−q1 −q2 6= 0 ⇔ q1 s¯1 + (q2 − 1)s¯2 + k s¯3 = d, ¯ ct1 t2 k−t1 −t2 6= 0 ⇔ t1 s¯1 + t2 s¯2 + k s¯3 = d. Therefore, the proof concludes simply by taking into account that S is a maximal system and pi , qi , ti ∈ {0, 1, ..., k} for i = 1, 2. As a consequence of Proposition 9, we have an interesting property of the maximal QH systems: certain monomials of the same degree k, belonging to each of the three homogeneous parts Pk , Qk and Rk , are related. That is, if one of them appears in a given maximal system, the other two also appear. Corollary 10. Given a maximal QH system S (P, Q, R) of degree n, 1 ≤ k ≤ n, x1 , x2 ∈ {0, 1, ..., k − 1}, 0 ≤ x1 + x2 ≤ k − 1, then ax1 +1,x2 ,k−x1 −x2 −1 6= 0 ⇔ bx1 ,x2 +1,k−x1 −x2 −1 6= 0 ⇔ cx1 ,x2 ,k−x1 −x2 6= 0 Proof. By Proposition 9, the three inequalities of the statement are equivalents to the verification of equation (27) for every transformed vector of S. Fixed a degree k some monomials of Pk , Qk and Rk are not related with other monomials. They appear freely within the QH maximal systems. This happens because they have zeros as exponents of the variables x, y or z. These are the following: 1. Monomials of the homogeneous part Pk with exponent 0 in the variable x, as a0p2 k−p2 y p2 z k−p2 (0 ≤ p2 ≤ k) , which are present in the system when the equation −s¯1 + p2 s¯2 + k s¯3 = d¯ ¯ is verified for any transformed vector (s¯1 , s¯2 , s¯3 , d). 2. Monomials of the homogeneous part Qk with exponent 0 in the variable y, as ap1 0k−p1 xp1 z k−p1 (0 ≤ p1 ≤ k) , which are present in the system when the equation p1 s¯1 − s¯2 + k s¯3 = d¯ is ¯ verified for any transformed vector (s¯1 , s¯2 , s¯3 , d). 12 3. Monomials of the homogeneous part Rk with exponent 0 in the variable z, as ap1 k−p1 0 xp1 y k−p1 (0 ≤ p1 ≤ k) , which are present in the system when the equation p1 s¯1 + p2 s¯2 + k s¯3 = d, ¯ ¯ with p1 + p2 = k, is verified for any transformed vector (s¯1 , s¯2 , s¯3 , d). From now on, when we speak of a brick of a system, we will refer to one of these sets of linked monomials, that are the simplest constituent elements of the maximal QH systems. We denote by [x1 , x2 ; k] the brick associated with the equation (27). Bricks can contribute to the system with three monomials, one in each of the components P , Q and R, or with only one if they are in any of the special situations studied before. The brick [x1 , x2 ; k] contributes to the component P with the monomial ax1 +1,x2 ,k−x1 −x2 −1 xx1 +1 y x2 z k−x1 −x2 −1 , to the component Q with the monomial bx1 ,x2 +1,k−x1 −x2 −1 xx1 y x2 +1 z k−x1 −x2 −1 , and to the component R with the monomial cx1 ,x2 ,k−x1 −x2 xx1 y x2 z k−x1 −x2 . Although as we said two of these monomials may be null. When this be neces- sary, we will summarize the contributions of [x1 , x2 ; k] with  (P, Q, R) = xx1 +1 y x2 z k−x1 −x2 −1 , xx1 y x2 +1 z k−x1 −x2 −1 , xx1 y x2 z k−x1 −x2 . We denote by Bk the set of bricks of degree k, meaning brick of degree k those [x1 , x2 ; k] that contribute with monomials of such degree. From the constraints for x1 and x2 stated in Proposition 9 we deduce that given k ∈ Z+ we have Bk = {[x1 , x2 ; k] : x1, x2 ∈ Z and − 1 ≤ x1 , x2 , x1 + x2 ≤ k} . (28) Table 1 shows the bricks of B1 together with their associated equations and the contributions to the maximal systems in which they are present. Fixed a degree k the set of bricks Bk can be represented graphically in the plane without more than taking into account the restrictions on the integers x1 , x2 , which will act as abscissa and ordinate respectively in this graphic. In the region of the plane corresponding to B3 , shown in Figure 1, it is observed that the bricks that contribute with a single monomial correspond to the border points of the region. Proposition 11. An inhomogeneous QH system of degree n can be constructed 13 [x1 , x2 ; 1] x1 s¯1 + x2 s¯2 + s¯3 = d̄ (P, Q, R) [−1, 0; 1] −s¯1 + s¯3 = d¯ (z, 0, 0) [0, −1; 1] −s¯2 + s¯3 = d¯ (0, z, 0) [−1, 1; 1] −s¯1 + s¯2 + s¯3 = d¯ (y, 0, 0) [0, 0; 1] s¯3 = d¯ (x, y, z) [1, −1; 1] s¯1 − s¯2 + s¯3 = d¯ (0, x, 0) [0, 1; 1] s¯2 + s¯3 = d¯ (0, 0, y) [1, 0; 1] s¯1 + s¯3 = d¯ (0, 0, x) Table 1: The set of bricks of degree 1 (B1 ). with n3 29 + 2n2 + n 6 6 different bricks. Proof. An inhomogeneous QH system of degree n can be constructed with the bricks of the sets Bk , k ∈ {1, ..., n}. The cardinal of Bk , which matches the number of bricks of Hk , is (k + 1) (k + 6) 2 + 3 + ... + (k + 2) + (k + 1) = . 2 Then, the total number of available bricks is n X (k + 1) (k + 6) n3 29 = + 2n2 + n. 2 6 6 k=1 14 Figure 1: B3 region in the plane As an example, the maximal system (5) is splitted into the bricks that com- pose it. This QH system is built of five bricks with degrees running from 2 to 3. ẋ = +xyz +y 3 +x2 ẏ = +y 2 z +xz 2 +xy ż = +yz 2 +xz +y 2 Brick: [0, 1; 3] [1, −1; 3] [−1, 3; 3] [1, 0; 2] [0, 2; 2] In the next two results we will study when two given bricks can coexist in the same QH system, that is, their compatibility. It is obvious that in this sense there must be restrictions. Otherwise, there would only be one possible maximal 3 QH system of degree n, constituted by the n6 + 2n2 + 29 6 n bricks mentioned in Proposition 11. We will start by analyzing the compatibility of a pair of bricks, understanding for compatible bricks those that can coexist in a QH system, and incompatible those that cannot do so under any circumstances. Note that brick compatibility is not equivalent to the compatibility of their respective associated ¯ equations (27), because the equations can have common solutions (s¯1 , s¯2 , s¯3 , d), but without satisfying the conditions (22), (23), (24) and (25). Proposition 12. Let x1 , x2 , y1 , y2 , k, p ∈ Z be with −1 ≤ x1 , x2 , x1 + x2 ≤ k, −1 ≤ y1 , y2 , y1 + y2 ≤ p and 0 < p < k. The bricks [x1 , x2 ; k] and [y1 , y2 ; p] are compatible in an inhomogeneous QH system if and only if Y1 > 0, or Y1 +Y2 > 0, being Yi = yi − xi , i = 1, 2. Proof. First we note that the compatibility of [x1 , x2 ; k] and [y1 , y2 ; p] within the same inhomogeneous QH system means that there is some transformed vector ¯ that satisfy the system (s¯1 , s¯2 , s¯3 , d) 15 x1 s¯1 + x2 s¯2 + k s¯3 − d¯ = 0, y1 s¯1 + y2 s¯2 + ps¯3 − d¯ = 0. This system has the infinite set of solutions {(α, β, (Y1 α + Y2 β)/(k − p), (X1 α + X2 β)/(k − p)) : α, β ∈ R} , where Yi = yi − xi and Xi = kyi − pxi for i = 1, 2. But the solutions that count for compatibility are those that are a transformed vector, i.e., those verifying (22), (23), (24) and (25). We start proving that the compatibility implies Y1 > 0 or Y1 + Y2 > 0, that is, if Y1 ≤ 0 and Y1 +Y2 ≤ 0 then there are no values of α and β in the conditions of statements (22), (23), (24) and (25). Since k − p is positive, it is sufficient to prove that Y1 α+Y2 β is negative or zero, so consequently statement (25) does not hold. If Y1 ≤ 0 and also Y2 ≤ 0, then Y1 α + Y2 β ≤ 0 for all α, β ∈ N. Otherwise, if Y1 ≤ 0 and Y2 > 0, from condition Y1 + Y2 ≤ 0 it is deduced that Y1 ≤ −Y2 and since β − α ≤ 0, it follows that Y1 α + Y2 β ≤ (−Y2 ) α + Y2 β = Y2 (β − α) ≤ 0 for every α, β ∈ N. To study the reciprocal implication we distinguish two cases: Case Y1 > 0. Let α = k−p and β = 0, so we obtain the solution (k − p, 0, Y1 , X1 ). It is clear that conditions (22), (23), (24) are verified with these values, and also that s¯3 = Y1 > 0. To prove d¯ ≥ s¯3 , note that d¯ − s¯3 = X1 − Y1 = (k − 1) y1 − (p − 1) x1 and that Y1 > 0 implies y1 > x1 ≥ −1, so y1 ≥ 0. All this, together with 0 ≤ p − 1 < k − 1, means that (k − 1) y1 ≥ (p − 1) x1 , so d¯ ≥ s¯3 . Case Y1 + Y2 > 0. Now we set α = β = k − p, obtaining the solution (k − p, k − p, Y1 + Y2 , X1 + X2 ), and the proof is identical as in the previous case, although now d¯ − s¯3 = (X1 + X2 ) − (Y1 + Y2 ) = (k − 1) (y1 + y2 ) − (p − 1) (x1 + x2 ), and Y1 +Y2 > 0 implies y1 +y2 > x1 +x2 ≥ −1, so d¯ ≥ s¯3 . Note that in addition to the transformed vector obtained in the proof there is not a single family of transformed vectors, but there are infinity families, contained in a dimension 2 vector subspace of R4 . We have studied the compatibility for two bricks of different degrees. On the other hand, two bricks of the same degree k are always compatible; even all bricks of degree k are mutually compatible, giving rise to the maximal homoge- neous system Hk . But this is a compatibility that, in the search for exclusively inhomogeneous systems, we are not interested in. The following result estab- lishes the conditions of compatibility between bricks of the same degree in the case of inhomogeneous systems, those that consist of two or more different ho- mogeneous parts. Note that previous papers ([3], [4]) have shown that the mentioned type of compatibility does not exist in two-dimensional QH systems. Proposition 13. Let x1 , x2 , y1 , y2 , k ∈ Z be with −1 ≤ x1 , x2 , y1 , y2 , x1 +x2 , y1 + 16 y2 ≤ k, and k > 1. Two different bricks [x1 , x2 ; k] and [y1 , y2 ; k] are compatible in an inhomogeneous QH system if and only if Y1 = 0, or −Y2 /Y1 ≥ 1, being Yi = yi − xi for i = 1, 2. Proof. First we note that the compatibility of [x1 , x2 ; k] and [y1 , y2 ; k] within the same inhomogeneous QH system means that there is some transformed vector ¯ that satisfy the system (s¯1 , s¯2 , s¯3 , d) x1 s¯1 + x2 s¯2 + k s¯3 − d¯ = 0, y1 s¯1 + y2 s¯2 + k s¯3 − d¯ = 0. The matrix expression of the system, after Gaussian transformations, adopts the form   x1 x2 k −1 . Y1 Y2 0 0 The bricks are not the same, so it must be verified that Y12 + Y12 6= 0. As a conclusion the rank of the system is 2, and the set of solutions is {(Y2 α, −Y1 α, β, (Y2 x1 − Y1 x2 ) α + kβ) : α, β ∈ R} , (29) where Yi = yi − xi for i = 1, 2. We start by proving that the compatibility of the two bricks implies Y1 = 0, or −Y2 /Y1 ≥ 1, or equivalently, that when −Y2 /Y1 < 1 is verified, being Y1 6= 0, ¯ have to be of then the bricks are incompatible. The solutions (s¯1 , s¯2 , s¯3 , d) the form (29), so when −Y2 /Y1 < 1 is verified we have |s¯2 | > |s¯1 |. In that ¯ cannot be a transformed vector, and therefore there is no case (s¯1 , s¯2 , s¯3 , d) compatibility between the bricks. For proving the reciprocal implication we distinguish two cases: Case Y1 = 0. The solutions are in this case {(Y2 α, 0, β, Y2 x1 α + kβ) : α, β ∈ R} , where Y2 6= 0. Setting α = 1/Y2 and β = 1 we obtain the solution (1, 0, 1, x1 + k). Taking into account that x1 ≥ −1 and that k > 1, the solution is a vector that satisfies the requirements (22), (23), (24) and (25), so it is a transformed vector. Case −Y2 /Y1 ≥ 1. Note that in this case Y2 6= 0 and 0 < −Y1 /Y2 ≤ 1. To find a transformed vector, we will take from the solutions (29) the case α = 1/Y2 , β = 1:   ¯ = 1, −Y1 , 1, x1 − Y1 x2 + k . (s¯1 , s¯2 , s¯3 , d) Y2 Y2 This vector trivially satisfies the conditions (23) and (24). Also fulfills s¯3 > 0 17 of condition (25). Therefore we only need to prove d¯ ≥ s¯3 , that is, Y1 x1 − x2 + k ≥ 1. Y2 If x2 ≥ 0, as x1 ≥ 1 and k ≥ 2, then x1 −Y1 x2 /Y2 +k ≥ 1+(−Y1 /Y2 ) x2 ≥ 1. In the case x2 = −1, then x1 ≥ 0 because x1 + x2 ≥ −1, and as well k ≥ 2. Then x1 − Y1 x2 /Y2 + k = x1 − (−Y1 /Y2 ) + k ≥ 2 − (−Y1 /Y2 ) ≥ 1. Finally if the vector obtained is not formed by integers, it is suffice to mul- tiply it by |Y2 | to meet (22) and accordingly obtain a transformed vector. Remark 14. Proposition 13 does not study the compatibility between pairs of bricks of degree 1, that is, the bricks of B1 . If we study case by case all the possible compatibilities, we observe that here are some special situations that slightly modify the previous result. In general, Proposition 13 is true, but with the following exceptions: 1. The brick [−1, 0; 1] has as associated equation −s¯1 + s¯3 = d, ¯ which is incompatible with the requirements (24) and (25). Therefore, this brick can never exist in a QH system. 2. The compatibility between the bricks [0, −1; 1] and [−1, 1; 1] is not verified, contrary to what would be deduced from the application of Proposition 13. 5. wm as unique identifier of maximal QH systems Lemma 15. Given a brick [x1 , x2 ; k] belonging to Bk , it is satisfied that: (i) [x1 , x2 + 1; k], [x1 , x2 − 1; k], or both belong to Bk . (ii) [x1 + 1, x2 − 1; k], [x1 − 1, x2 + 1; k], or both belong to Bk . Proof. Let k ∈ Z+ be and [x1 , x2 ; k] ∈ Bk . From the definition (28) we know that the bricks of Bk are exactly those [p, q; k] that verify the conditions (a) p, q ∈ Z, (b) − 1 ≤ p ≤ k, (c) − 1 ≤ q ≤ k, (d) − 1 ≤ p + q ≤ k. (i) Let [x1 , x2 ; k] = [x1 , −1; k] ∈ Bk . Then (a) and (d) imply 0 ≤ x1 ≤ k, so [x1 , x2 + 1; k] = [x1 , 0; k] ∈ Bk . On the other hand, if [x1 , x2 ; k] ∈ Bk , being 0 ≤ x2 ≤ k, then [x1 , x2 − 1; k] belongs to Bk , except if x1 = −1 and x2 = 0. But in such a case [x1 , x2 + 1; k] = [−1, 1; k] ∈ Bk . (ii) Let [x1 , x2 ; k] ∈ Bk where x1 > x2 . Then, by (b) and (c), 0 ≤ x1 ≤ k and −1 ≤ x2 ≤ k − 1. As a consequence [x1 − 1, x2 + 1; k] verifies (a), (b), (c) and (d), so [x1 − 1, x2 + 1; k] ∈ Bk . 18 In a similar way we can prove that [x1 + 1, x2 − 1; k] ∈ Bk when x1 < x2 . Now let [x1 , x2 ; k] ∈ Bk being x1 = x2 . By (d), we have that −1 ≤ 2x1 , 2x2 ≤ k, so 0 ≤ x1 , x2 ≤ k/2, and being k ≥ 1, we conclude 0 ≤ x1 , x2 ≤ k − 1. Thus [x1 + 1, x2 − 1; k] , [x1 − 1, x2 + 1; k] ∈ Bk . Theorem 16. A maximal QH system has a unique weight vector family. Proof. The case of maximal homogeneous systems has already been studied in section 3. The maximal homogeneous system of degree n, Hn , only has the weight vector family FHn (1, 1). We will therefore analyze the case of inhomogeneous maximal systems. An inhomogeneous QH system of degree n must have at least two compatible bricks: one of the degree of the system n, [x1 , x2 ; n], and another of degree m < n, [y1 , y2 ; m]. Being compatible, we know from Proposition 12 that either Y1 > 0, or Y1 + Y2 > 0 must occur, with Yi = yi − xi for i = 1, 2. Distinguishing these two cases we will show that there is always a third brick compatible with the two previous ones, so that it can be added to the system. In addition, we will see that any maximal system formed from these three bricks has a unique family of weight vectors. Case Y1 > 0: By Lemma 15 we know that [x1 , x2 + 1; n], [x1 , x2 − 1; n], or both, belong to Bn . We suppose that [x1 , x2 + 1; n] ∈ Bn , because the other case is identical, and we will see that [x1 , x2 + 1; n] is compatible with [x1 , x2 ; n] and [y1 , y2 ; m]. The system of equations associated with these three bricks is x1 s¯1 + x2 s¯2 + ns¯3 − d¯ = 0, y1 s¯1 + y2 s¯2 + ms¯3 − d¯ = 0, (30) x1 s¯1 + (x2 + 1) s¯2 + ns¯3 − d¯ = 0. Solving it we observe that it is a system of rank 3 with the following infinite set of solutions of dimension 1:      Y1 n α, 0, α, Y1 + x1 α : α ∈ R . n−m n−m Using the inverse transformation (26), we obtain the solution set       Y1 Y1 Y1 n−1 + 1 α, α, α, Y1 + x1 α + 1 : α ∈ R , n−m n−m n−m n−m of the corresponding system (30) in the variables s1 , s2 , s3 and d. This space of solutions has dimension 1, and therefore can contain at most one weight vector family. We will see that it contains that family: if we set α = n − m, the solution of the obtained system is a weight vector. This solution is (s1 , s2 , s3 , d) = (Y1 + n − m, Y1 , Y1 , (n − 1) Y1 + (n − m) x1 + 1) , 19 whose components are integers. In order to (s1 , s2 , s3 , d) be a weight vector, we have to check that s1 ≥ s2 ≥ s3 > 0 and d > 0. Since Y1 > 0 and n > m, the first is evident. To prove d > 0, we observe that being n > m ≥ 1, Y1 > 0 and x1 ≥ −1, the unique problematic case could appear when x1 = −1. When it happens, we have that d = (n − 1) (y1 + 1) − (n − m) + 1 = (n − 1) y1 + m > 0, because y1 > x1 ≥ −1. It is possible to ask, since we deal with maximal systems, if adding a fourth brick, and therefore another equation to system (30), can reduce the number of solutions, thus losing the obtained family. If we add the brick [z1 , z2 ; p] we have the system of equations in the variables s¯1 , s¯2 , s¯3 and d¯ x1 s¯1 + x2 s¯2 + ns¯3 − d¯ = 0, y1 s¯1 + y2 s¯2 + ms¯3 − d¯ = 0, x1 s¯1 + (x2 + 1) s¯2 + ns¯3 − d¯ = 0, z1 s¯1 + z2 s¯2 + ps¯3 − d¯ = 0. If this new system of equations maintains the rank 3, it has the same solutions as (30) and therefore the corresponding QH system has a unique family of vectors. If the system reaches rank 4 it would be a determined compatible system with single solution (0, 0, 0, 0), which cannot be a transformed vector because it does not satisfy (24) nor (25). Thus any system containing these four bricks can be QH. Therefore as we add bricks to the system while maintaining the quality of being QH, we maintain the rank 3 in the corresponding systems of equations, and also maintain the existence of a unique family of weight vectors. Case Y1 +Y2 > 0: This case is proved almost identically to the case Y1 > 0, so we will only point out the differences. Now the third brick will be [y1 + 1, y2 − 1; m] or [y1 − 1, y2 + 1; m], depending on which of the two exists (see Lemma 15). If we assume that the first one exists, the system of equations is x1 s¯1 + x2 s¯2 + ns¯3 − d¯ = 0, y1 s¯1 + y2 s¯2 + ms¯3 − d¯ = 0, (y1 + 1) s¯1 + (y2 − 1) s¯2 + ms¯3 − d¯ = 0, whose solutions are      Y1 + Y2 n α, α, α, (Y1 + Y2 ) + x1 + x2 α : α ∈ R . n−m n−m Using the inverse transformation (26), we obtain the solutions in the variables s1 , s2 , s3 and d:      n−1 (A + 1) α, (A + 1) α, Aα, (Y1 + Y2 ) + x1 + x2 α + 1 : α ∈ R , n−m where A = (Y1 + Y2 ) / (n − m). 20 As in the previous case if we take α = n−m we obtain the particular solution s1 = s2 = Y1 + Y2 + n − m, s3 = Y1 + Y2 , d = (n − 1) (Y1 + Y2 ) + (n − m) (x1 + x2 ) + 1. This solution consists of integers, verifies s1 ≥ s2 ≥ s3 > 0 and verifies d > 0 providing that Y1 + Y2 > 0 implies y1 + y2 > x1 + x2 ≥ −1. It is, Therefore, it is a weight vector. Corollary 17. A maximal QH system is made up of at least three bricks. Proof. The homogeneous maximal system Hn has, as we have seen in Proposition 11, (k + 1) (k + 6) /2 bricks, which exceeds 2 for every n > 0. An inhomogeneous maximal QH system must have at least two bricks of different degrees. In the proof of Theorem 16 it is showed that there is always another compatible brick that can be added to the system. Corollary 18. A maximal QH system always has minimum weight vector of the system. Proof. Let S be the system, and FS (λ, µ) its unique family of weight vectors. Then, wm =g(λ,µ) . Corollary 19. Given a maximal QH system S, a weight vector (s1 , s2 , s3 , d) is the minimum weight vector of S if and only if gcd(s1 , s2 , s3 ) = 1. Proof. The proof is an easy consequence of Theorem 16 and Proposition 7. An important consequence of Theorem 16 is that a weight vector of a maxi- mal QH system S verifies conditions (19) and (20) if and only if all other vectors of S verify them. Because of this we avoid the possibility that, when filtering with (19) and (20), we did not consider other vectors of S (for example (1,2,3,4)) whose presence would imply a modification in the algebraic structure of the sys- tem. Proposition 20. Two different maximal QH systems of degree n have no com- mon weight vectors. Proof. Let S and T be two maximal QH systems of degree n that share the weight vector w = (s1 , s2 , s3 , d). Let FS (λ, µ) and FT (λ, µ) be the vector families to which w belongs in S and T respectively. We will show that S and T are the same system, proving that any monomial of S is contained in T and vice versa. 21 Let (12) be a monomial of S. Proposition 1 assure that w verifies the equa- tion of the right side of (8). Since, by Theorem 16, all the weight vectors of T are those of FT (λ, µ), so being of the form (rs1 , rs2 , rs3 , r (d − 1) + 1), with r a rational number, it is trivial that all of them also verify the equation (8). Therefore, due again to Proposition 1, the monomial (12) must be present in T. In the same way, we can show that all the monomials of T are in S, so S and T match. It should be noted that if we vary the degree n of the system, then the weight vectors could be repeated, and therefore also the families. For example, the weight vector w = (2, 2, 1, 2) and their corresponding family appears in the following maximal system of degree 2 ẋ = xz + yz, ẏ = xz + yz, ż = z 2 + x + y, and also in the following maximal system of degree 3 ẋ = z 3 + xz + yz, ẏ = z 3 + xz + yz, ż = z 2 + x + y. Remark 21. As a consequence of the previous results we have that, given a maximal QH system S of degree n, its minimum weight vector wm always exists and is a unique identifier of S within the set of maximal QH systems of degree n. 6. Constructing the set of maximal inhomogeneous QH systems By Corollary 17 we know that every inhomogeneous maximal QH system contains a minimum of three bricks. In addition, Theorem 16 assures that the system has a single family of weight vectors. Therefore given an n-degree system S of this type, we can always choose three bricks [x1 , x2 ; n], [y1 , y2 ; m] and [z1 , z2 ; k] in such a way that: (a) At least one of them is of the same degree as S, but they do not have all the same degree , i.e., 1 ≤ m < n, 1 ≤ k ≤ n. (b) Their respective associated equations form a system of rank 3, and therefore its solution space in R4 has dimension 1. (c) The bricks are compatible. That is, some of the solutions of (b) verify the constraints (22), (23), (24) and (25). 22 When three bricks of S satisfy these requirements we say that they form a seed of S. With requirement (a) we force that the three bricks belong to an inhomogeneous system of degree n. From conditions (b) and (c) it follows that the compatibility between the three bricks is reduced to a single family of weight vectors. Consequently two distinct maximal systems cannot share a seed, although they may share three or more bricks that do not form a seed. A maximal system always has at least one seed, although it usually owns more. In a later theorem we will show that if we have a seed of a system S, the rest of the system and its corresponding family of vectors are totally deter- mined. Thus, all the information about the algebraic structure of a maximal inhomogeneous QH system is in any of its seeds. So we will start by identifying them in the following result. Theorem 22. The bricks [x1 , x2 ; n], [y1 , y2 ; m] and [z1 , z2 ; k], with 1 ≤ m < n and 1 ≤ k ≤ n, form a seed of some n-degree maximal inhomogeneous QH system S if and only if the following three conditions hold: (i) T2 6= 0, T1 · T2 ≤ 0 and |T1 | ≤ |T2 |,   Y1 Y2 (ii) T2 > 0, T1 T2 Y1 T2 − Y2 T1 x2 T1 − x1 T2 (iii) ≥ , (n − m) T2 (n − 1) T2 where Yi = yi − xi , Ti = (k − m) xi + (n − k) yi + (m − n) zi , for i = 1, 2. Proof. The equations associated with these three bricks form the homogeneous linear system x1 s¯1 + x2 s¯2 + ns¯3 − d¯ = 0, y1 s¯1 + y2 s¯2 + ms¯3 − d¯ = 0, (31) z1 s¯1 + z2 s¯2 + k s¯3 − d¯ = 0. After Gaussian transformations the system can be represented in its matrix form as     s¯1   x1 x2 n −1  s¯2  0  Y1 Y2 m − n 0    =  0 . (32)  s¯3  T1 T2 0 0 0 d¯ The set of solutions obtained solving this system is     Y1 T2 − Y2 T1 n (Y1 T2 − Y2 T1 ) T2 α, −T1 α, α, + x1 T2 − x2 T1 α , (33) n−m n−m where α ∈ R. 23 In order to prove the necessary condition (⇒), we suppose that the three bricks form a seed. Then, by (c), some of the solutions of the set (33) verify (22), ¯ be one of these solutions, i.e., a transformed (23), (24) and (25). Let (s¯1 , s¯2 , s¯3 , d) vector obtained by setting a particular ᾱ ∈ R in (33). Consequently, s¯1 ≥ s¯2 ≥ 0 and s¯1 > 0, so (i) must be verified. Also, s¯1 and s¯3 have the same sign, so being n − m > 0, we get (ii). Finally, d¯ ≥ s¯3 , and then   n ᾱ ᾱ (Y1 T2 − Y2 T1 ) + x1 T2 − x2 T1 ≥ (Y1 T2 − Y2 T1 ) . n−m n−m As ᾱ and T2 are not null and have the same sign (because s¯1 > 0), the previous inequality is equivalent to n Y1 T2 − Y2 T1 x1 T2 − x2 T1 Y1 T2 − Y2 T1 · + ≥ , n−m T2 T2 (n − m) T2 and from this by simple algebraic operations we obtain Y1 T2 − Y2 T1 x2 T1 − x1 T2 ≥ , (n − m) T2 (n − 1) T2 so (iii) is proved. To prove the sufficient condition (⇐) we must verify (a), (b) and (c) of the seed definition. Being n > m, (a) is fulfilled trivially. Due to T2 6= 0, and being n 6= m, the system has rank 3, as can be seen just checking the matrix of (32). Also, as a homogeneous system of equations, it has solutions. Therefore (b) is true. Now let T2 > 0 be. Setting α = n − m we get the following particular solution of the set (33): s¯1 = T2 (n − m) , s¯2 = −T1 (n − m) , s¯3 = Y1 T2 − Y2 T1 , d¯ = n (Y1 T2 − Y2 T1 ) + (n − m) (x1 T2 − x2 T1 ) . This solution verifies (22), (23), (24) and (25), then (c) holds. If T2 < 0 we set α = m − n with the same conclusion. Theorem 23. If the bricks [x1 , x2 ; n], [y1 , y2 ; m] and [z1 , z2 ; k], with 1 ≤ m < n and 1 ≤ k ≤ n, form a seed of an n-degree maximal inhomogeneous QH system S, then (i) The brick [t1 , t2 ; l] with 1 ≤ l ≤ n, belongs to the system S if and only if T1 R2 = T2 R1 . ! sˆ1 sˆ2 sˆ3 d˜ (ii) The minimum weight vector of S is wm = , , , + 1 , where G G G G 24 Yi = yi − xi , for i = 1, 2, Ti = (k − m) xi + (n − k) yi + (m − n) zi , for i = 1, 2, Ri = (l − m) xi + (n − l) yi + (m − n) ti , for i = 1, 2, sˆ1 = |Y1 T2 − Y2 T1 | + (n − m) |T2 |, sˆ2 = |Y1 T2 − Y2 T1 | + (n − m) |T1 |, sˆ3 = |Y1 T2 − Y2 T1 |, d˜ = (n − 1) |Y1 T2 − Y2 T1 | + δ (n − m) (x1 T2 − x2 T1 ), δ = sgn (T2 ), G = gcd (sˆ1 , sˆ2 , sˆ3 ) . Proof. (i) Since [x1 , x2 ; n], [y1 , y2 ; m] and [z1 , z2 ; k] form a seed of S, we know that its associated system of equations (31) has rank 3. A fourth brick [t1 , t2 ; l] also belongs to S if and only if the increased system x1 s¯1 + x2 s¯2 + ns¯3 − d¯ = 0, y1 s¯1 + y2 s¯2 + ms¯3 − d¯ = 0, (34) z1 s¯1 + z2 s¯2 + k s¯3 − d¯ = 0, t1 s¯1 + t2 s¯2 + ls¯3 − d¯ = 0, which includes the equation associated to [t1 , t2 ; l] maintains the rank 3, because of the rank of (34) goes up to 4 the system becomes compatible determined with unique solution (0, 0, 0, 0), and in this case S would not be QH because it would not have weight vectors. Then the matrix expression of system (34), after Gaussian transformations, adopts the form      x1 x2 n −1 s¯1 0  Y1 Y2 m − n 0   s¯2   0     =  , (35)  T1 T2 0 0   s¯3   0  R1 R2 0 0 d¯ 0 with Yi , Ti and Ri being the values of the statement for i = 1, 2. Finally the matrix of (35) has rank 3 if and only if T1 R2 = T2 R1 . (ii) As seen in (i) the solution space of all the equations associated with bricks of S is the same as the solution space of (31). That is, it is the set defined in (33). Within (33) exists the transformed vectors of S. Applying to (33) the inverse transformation t−1 given in (26), we obtain the solutions corresponding to the equations in the variables s1 , s2 , s3 , and d, which are   Y1 T2 − Y2 T1 s1 = α + T2 , n−m 25   Y1 T2 − Y2 T1 s2 = α − T1 , (36) n−m   Y1 T2 − Y2 T1 s3 = α , n−m   Y1 T2 − Y2 T1 d = α (n − 1) + x1 T2 − x2 T1 + 1, n−m with α ∈ R and Yi , Ti being the values of the statement for i = 1, 2. The elements of (36) which are formed by positive integers are the weight vectors of the maximal QH system S. We now obtain a particular weight vector. For this we can take α = sgn (T2 ) (n − m). Taking into account that by Theorem 22 we know that Y1 T2 − Y2 T1 has the same sign of T2 , and also that when T1 is not null, it has the opposite sign of T2 , we obtain the weight vector of S ˆ where w = (sˆ1 , sˆ2 , sˆ3 , d), sˆ1 = |Y1 T2 − Y2 T1 | + (n − m) |T2 |, sˆ2 = |Y1 T2 − Y2 T1 | + (n − m) |T1 |, sˆ3 = |Y1 T2 − Y2 T1 |, dˆ = (n − 1) |Y1 T2 − Y2 T1 | + δ (n − m) (x1 T2 − x2 T1 ) + 1, being δ = ±1 with the same sign as T2 , i.e., δ = sgn (T2 ). By Proposition 5 and Corollary 19 we know how to obtain the minimum weight vector wm of a maximal system from one of its weight vectors w = (sˆ1 , sˆ2 , sˆ3 , d), ˆ namely ! sˆ1 sˆ2 sˆ3 dˆ − 1 wm = , , , +1 . gcd (sˆ1 , sˆ2 , sˆ3 ) gcd (sˆ1 , sˆ2 , sˆ3 ) gcd (sˆ1 , sˆ2 , sˆ3 ) gcd (sˆ1 , sˆ2 , sˆ3 ) In this way the result is proved without further action than setting d˜ = ˆ d − 1. Remark 24. Note that if the minimum weight vector of a system S is known, we have an alternative way to Theorem 23 (i) to determine if a brick [t1 , t2 ; l] is in S or not. It is enough to check if the minimum weight vector of S verifies the equation associated with the brick, that is t1 s1 + t2 s2 + (l − t1 − t2 − 1)s3 = d − 1. In the same way that happens with the seeds, if we fix the degree of S the 26 whole information about the algebraic structure of S is in its minimum weight vector. Then when the minimum weight vector has previously been calculated this is a faster method than the one proposed in Theorem 23 (i). 7. The algorithm The objective of our algorithm is to find all the maximal QH systems of a certain degree n. The only homogeneous maximal system is Hn , so the algorithm is focused on the inhomogeneous. The algorithm is mainly based on Theorem 22, Theorem 23, and Remark 24. Briefly any system of this type must have among its constituent bricks one or more seeds, and detected a seed all information about the structure of the system can be obtained by using Theorem 23 and Remark 24. Therefore, our first goal is to get a list of all possible seeds of n- degree systems, for which we will use Theorem 22 with the help of Propositions 12 and 13. In this way we will obtain all the wanted systems, although there can be repetitions because two different seeds can generate the same system. We will avoid these repetitions using the minimum vector of each system as unique identifier of it. It is an algorithm that requires quite computation, which also grows notably when the degree n of the required systems increases. Because of this, a basic principle of design has been to avoid unnecessary calculations. For this reason we have taken different steps that will be discussed later. The algorithm has a modular structure, and is formed by a main process together with four auxiliary functions. The criterion that we followed to extract computation from the main body to the functions has been to isolate those calculations that are repeatedly executed. In order to facilitate its practical implementation, but at the same time to provide a tool as general as possible, we present the algorithm written in pseudocode. The structure is highly detailed so that their later translation to any programming language will be simple. 27 Algorithm 1: Determines whether two bricks are compatible Input: Two bricks: Bi = [xi1 , xi2 ; k i ], Bj = [xj1 , xj2 ; k j ] Output: true if the bricks are compatible, f alse if not 1 Function areCompat(Bi , Bj ) 2 Y1 ← xj1 − xi1 ; Y2 ← xj2 − xi2 3 if (k i 6= k j ) and (Y1 > 0 or Y1 + Y2 > 0) then 4 return true 5 else if (k i = k j ) and (Y1 = 0 or −Y2 /Y1 ≥ 1) then 6 return true 7 else 8 return f alse The first function, areCompat(Bi , Bj ), receives two bricks and determines whether they are compatible or not. We try to avoid unnecessary computation by leaving the function as soon as possible. We do not consider the special cases of incompatibility stated in Remark 14, since these would fulfill their function of filtering in a very limited number of executions of the function, and in return we would have a remarkable computational cost. Besides, the few incompatible cases that are allowed to pass are subsequently filtered into other functions. We make use of Proposition 12 (Line 3) if both bricks are of different degree, and of Proposition 13 (Line 5) if the bricks are of the same degree. Note that in case of bricks of different degrees it is important the order of the inputs: the highest degree brick must be the first one. Algorithm 2: Determines whether three bricks form a seed Input: Three bricks:Bi = [xi1 , xi2 ; k i ], Bj = [xj1 , xj2 ; k j ], Bp = [xp1 , xp2 ; k p ] Output: true if the bricks form a seed, f alse if not 1 Function areSeed(Bi , Bj , Bp ) 2 T2 ← (k p − k j )xi2 + (k i − k p )xj2 + (k j − k i )xp2 3 if T2 = 0 then 4 return f alse 5 T1 ← (k p − k j )xi1 + (k i − k p )xj1 + (k j − k i )xp1 6 if T1 · T2 > 0 or |T1 | > |T2 | then 7 return f alse 8 Y1 ← xj1 − xi1 ; Y2 ← xj2 − xi2 9 if T2 · (Y1 T2 − Y2 T1 ) ≤ 0 then 10 return f alse Y1 T2 − Y2 T1 x2 T1 − x1 T2 11 if i j < then (k − k ) T2 (k i − 1) T2 12 return f alse 13 return true 28 Our second function, areSeed(Bi , Bj , Bp ), determines whether the three bricks Bi , Bj , and Bp , form a seed or not. The function verifies the requirements stated in Theorem 22. It avoids unnecessary computation exiting the function at the moment in which one of these conditions is not verified. The calculation of the values of Y1 , Y2 , T1 and T2 only takes place when it is indispensable. Condition (i) of Theorem 22 is checked in Lines 3 and 6; condition (ii) in Line 9; and condition (iii) in Line 11 of the function. Algorithm 3: Finds the minimum weight vector of a QH system Input: Three bricks that form a seed: Bi = [xi1 , xi2 ; k i ], Bj = [xj1 , xj2 ; k j ], Bp = [xp1 , xp2 ; k p ] Output: The minimum weight vector wm corresponding to that seed 1 Function calculateWm(Bi , Bj , Bp ) 2 Y1 ← xj1 − xi1 3 Y2 ← xj2 − xi2 4 T1 ← (k p − k j )xi1 + (k i − k p )xj1 + (k j − k i )xp1 5 T2 ← (k p − k j )xi2 + (k i − k p )xj2 + (k j − k i )xp2 6 δ ← sign(T2 ) 7 sˆ1 ← |Y1 T2 − Y2 T1 | + (k i − k j )|T2 | 8 sˆ2 ← |Y1 T2 − Y2 T1 | + (k i − k j )|T1 | 9 sˆ3 ← |Y1 T2 − Y2 T1 | 10 d˜ ← (k i − 1)|Y1 T2 − Y2 T1 | + δ(k i − k j )(xi1 T2 − xi2 T1 ) 11 G ← gcd(sˆ1 , sˆ2 , sˆ3 ) sˆ1 sˆ2 sˆ3 d˜ 12 wm ← ( , , , + 1) G G G G 13 return wm On the other hand, calculateWm(Bi , Bj , Bp ) function accurately repro- duces the statement of section (ii) of Theorem 23. That is, it receives three bricks, which are known to form a seed of a maximal QH system S, and calcu- lates the corresponding minimum weight vector of S. Algorithm 4: Determines if a brick is in a maximal QH system with a given minimum vector Input: The minimum weight vector wm = (s1 , s2 , s3 , d) of a QH system and a brick Bq = [xq1 , xq2 ; k q ] Output: true if the brick is in the system, f alse if not 1 Function isBrickInSystem(wm , Bq ) 2 if xq1 s1 + xq2 s2 + (k q − xq1 − xq2 − 1)s3 = d − 1 then 3 return true 4 else 5 return f alse 29 The last of the auxiliary functions is isBrickInSystem(wm , Bq ). As we have seen, the minimum vector of a maximal QH system stores all information about the algebraic structure of the system. This function receives the minimum vector wm of a system S together with a brick Bq , and decides if Bq is present in S or not (Line 2). It is based on the result stated in Remark 24, because when we have the minimum vector, this method requires much less computation than the one exposed in section (i) of Theorem 23. This brief function has the last word in the process of construction of the maximal QH systems. Algorithm 5: Provides all QH systems of a given degree Input: Degree of the systems (n) Output: List of all QH systems of degree n 1 N ← (k+1)(k+6) 2 n3 2 29 2 T ← 6 + 2n + 6 n 3 Aux ← empty matrix of 4 columns T  i i i 4 create ordered list of bricks {Bi }i=1 , where Bi = x1 , x2 ; k 5 for i ← 1 to N do 6 for j ← N + 1 to T do 7 if areCompat(Bi , Bj ) then 8 for p ← i + 1 to j − 1 do 9 if areCompat(Bi , Bp ) and areCompat(Bp , Bj ) then 10 if areSeed(Bi , Bj , Bp ) then 11 wm ← calculateWm(Bi , Bj , Bp ) 12 if wm is not a row of Aux then 13 add wm as a new row of Aux 14 for q ← 1 to T do 15 if isBrickInSystem(wm , Bq ) then 16 add Bq to system S 17 output system S The main process of the algorithm starts by asking the user for the only necessary input datum, that is, the degree n of the maximal QH systems that must to be listed. With this datum we apply Proposition 11 to obtain two values: N (Line 1) is the total number of n-degree available bricks, that is, the cardinal of Bn ; and T (Line 2) is the total number of bricks of degree less than n or equal to n, that is, the cardinal of {Bk }k=1 . To avoid repeating systems, we will store in the matrix Aux the minimum weight vector of each new system that we find. In Line 4 is made the ordered list of the T available bricks. These must be ordered so that we can go over them one by one. The only condition for this order is to place first the N bricks of maximum degree. Once this is done, the 30 rest of the ordination details are irrelevant to the operation of the algorithm. Subsequently, there is a series of nested for loops (Lines 5, 6 and 8) which are intended to run, without repetitions, all possible trios of bricks made up of at least one brick of degree n and at least one brick of degree less than n. Thus we assure two things: the degree of the systems obtained from these trios is n, and the systems are inhomogeneous. Obviously not all brick’s trios are a seed, so we check each of them by calling the function areSeed(Bi , Bj , Bp ) (Line 10). In fact, most of trios do not form a seed. So with the aim of saving computation of unnecessary calls to this expensive function, we include several conditional structures (Lines 7 and 9) in which we check every required compatibilities of pairs of bricks. This is done by means of function areCompat(Bi , Bj ). For each detected seed, we know that there is a maximal inhomogeneous QH system. But two different seeds can give rise to the same system, thus producing repetitions. To avoid them, we obtain the minimum weight vector associated with the seed by calling (Line 11) the function calculateWm(Bi , Bj , Bp ). The easiest way to identify this type of systems is through its minimum weight vectors. If the minimum weight vector obtained is already in the matrix Aux, it means that this system has already been found before, in which case we discard it. Otherwise we insert the vector into Aux and go to the process of building the system. The function isBrickInSystem(wm , Bq ) is called for each of the T avail- able Bricks (Line 15), even for the three bricks which, by forming the seed, we know that they are in the system. It is a function with little computation, so establishing filters to avoid calling it in these three particular cases would have more computational cost than leaving it that way. Every time the function isBrickInSystem(wm , Bq ) returns true implies that the brick Bq = [xq1 , xq2 ; k q ] belongs to the system S we are building. This means (Line 16) that the monomial q q q −xq1 −xq2 −1 axq1 +1,xq2 ,kq −xq1 −xq2 −1 xx1 +1 y x2 z k is added to the P component of S; the monomial q q q −xq1 −xq2 −1 bxq1 ,xq2 +1,kq −xq1 −xq2 −1 xx1 y x2 +1 z k is added to the Q component of S; and the monomial q q q −xq1 −xq2 cxq1 ,xq2 ,kq −xq1 −xq2 xx1 y x2 z k is added to the component R. We must take into account here the cases in which a brick contributes with a single monomial, studied previously in this work. Finally being the construction process finished, the algorithm returns S in the format that is considered most appropriated (Line 17). This task is done 31 recursively until the trios of bricks, and therefore the seeds and the possibility of forming new systems of these characteristics, are exhausted. 8. QH systems of degree 2 The following is the list of normal forms of 3-dimensional maximal inho- mogeneous QH systems of degree 2, obtained by the algorithm described in the previous section. The minimum weight vector wm of each system is also provided. Being wm the generator of the unique weight vector family of each system, it is easy to obtain from it the remaining weight vectors. Since these are maximal systems, the coefficients a, b and c of the systems in the list can take any complex value other than zero. ẋ = a020 y 2 + a011 yz + a002 z 2 + a100 x ẋ = a110 xy + a101 xz ẏ = b010 y + b001 z ẏ = b020 y 2 + b011 yz + b002 z 2 + b100 x S1 : S9 : ż = c010 y + c001 z ż = c020 y 2 + c011 yz + c002 z 2 + c100 x wm = (2, 1, 1, 1) wm = (2, 1, 1, 2) ẋ = a002 z 2 + a100 x + a010 y ẋ = a020 y 2 ẏ = b002 z 2 + b100 x + b010 y ẏ = b002 z 2 + b100 x S2 : S10 : ż = c001 z ż = 0 wm = (2, 2, 1, 1) wm = (6, 4, 3, 3) ẋ = a020 y 2 + a011 yz + a002 z 2 ẋ = a020 y 2 ẏ = b100 x ẏ = b002 z 2 S3 : S11 : ż = c100 x ż = c010 y wm = (3, 2, 2, 2) wm = (5, 3, 2, 2) ẋ = a002 z 2 ẋ = a011 yz ẏ = b002 z 2 ẏ = b002 z 2 S4 : S12 : ż = c100 x + c010 y ż = c100 x wm = (3, 3, 2, 2) wm = (5, 4, 3, 3) ẋ = a002 z 2 ẋ = a020 y 2 ẏ = b100 x ẏ = b002 z 2 S5 : S13 : ż = c010 y ż = c100 x wm = (5, 4, 3, 2) wm = (7, 5, 4, 4) ẋ = a011 yz + a100 x ẋ = a101 xz + a011 yz ẏ = b002 z 2 + b010 y ẏ = b101 xz + b011 yz S6 : S14 : ż = c001 z ż = c002 z 2 + c100 x + c010 y wm = (3, 2, 1, 1) wm = (2, 2, 1, 2) ẋ = a020 y 2 + a100 x ẋ = a101 xz + a020 y 2 ẏ = b002 z 2 + b010 y ẏ = b011 yz + b100 x S7 : S15 : ż = c001 z ż = c002 z 2 + c010 y wm = (4, 2, 1, 1) wm = (3, 2, 1, 2) ẋ = a011 yz ẋ = a101 xz + a020 y 2 ẏ = b002 z 2 + b100 x ẏ = b011 yz S8 : S16 : ż = c010 y ż = c002 z 2 + c100 x wm = (4, 3, 2, 2) wm = (4, 3, 2, 3) 32 ẋ = a020 y 2 ẋ = a110 xy ẏ = b101 xz ẏ = b020 y 2 + b101 xz S17 : S19 : ż = c010 y ż = c011 yz + c100 x wm = (4, 3, 1, 3) wm = (3, 2, 1, 3) ẋ = a020 y 2 ẋ = 0 ẏ = b101 xz ẏ = b101 xz S18 : S20 : ż = c100 x ż = c020 y 2 + c100 x wm = (5, 4, 2, 4) wm = (4, 2, 1, 4) We could add to this list of inhomogeneous systems the only homogeneous maximal QH system of degree 2, H2 , with wm = (1, 1, 1, 2), and thus we obtain the complete list of maximal systems of degree 2. In particular non-maximal QH systems are also represented in the above list. They are obtained from the maximals just canceling some of the coefficients, taking into account that we must always leave at least a monomial of degree 2, and that if we additionally want the system to be inhomogeneous, we must also leave some monomial of degree 1. Another aspect to consider is that, as we have seen, in order to simplify our algorithm this provides only those systems whose weight vector family satisfies the restriction (19). This is just one of the six possible restrictions of this type that we can establish. But the remaining QH systems are again easy to obtain from the list we have. We could add to the 20 inhomogeneous systems of the list those systems obtained from making permutations of the variables x, y, and z. In this way we arrive at a total of 102 maximal inhomogeneous systems of degree 2, and not to 120 as one would expect of multiplying the number of systems by 3!. This is because there are systems, such as S1 or S3 , which are symmetrical with respect to two of their variables, and therefore there are permutations that provide repeated systems. Thus, by adding the unique homogeneous system we have a total of 103 maximal QH systems of degree 2. The number of systems increases notably with the degree. There are 137 inhomogeneous systems of degree 3 verifying the restriction (19), and we have found 643 systems of degree 4 and 2119 systems of degree 5 making use of our algorithm. [1] Álvarez, M. J.; Gasull, A.; Prohens, R. Global behaviour of the period function of the sum of two quasi-homogeneous vector fields. J. Math. Anal. Appl. 449 (2017), 1553–1569. [2] Chiba, H. Kovalevskaya exponents and the space of initial conditions of a quasi-homogeneous vector field. J. Differential Equations 259 (2015), no. 12, 7681–7716. [3] Garcı́a, B.; Llibre, J.; Pérez del Rı́o, J. S. Planar quasi–homogeneous polynomial differential systems and their integrability, J. Differ. Equ. 255 (2013), 3185–3204. 33 [4] Garcı́a, B.; Lombardero, A.; Pérez del Rı́o, J. S. Classification and counting of planar quasi-homogeneous differential systems through their weight vectors, To appear in Qual. Theory Dyn. Syst. (2017). [5] Geng, F.; Lian, H. Bifurcation of limit cycles from a quasi-homogeneous degenerate center. Internat. J. Bifur. Chaos Appl. Sci. Engrg. 25 (2015), no. 1, 1550007, 8 pp. [6] Han, M.; Romanovski, V. G. Isochronicity and normal forms of poly- nomial systems of ODEs, Journal of Symbolic Computation 47 (2012), 1163–1174. [7] Huang, J; Zhao, Y. The limit set of trajectory in quasi-homogeneous system on R3 , Appl. Anal. 91 (2012), 1279–1297. [8] Kozlov, V. V. Rational integrals of quasi-homogeneous dynamical sys- tems. J. Appl. Math. Mech. 79 (2015), no. 3, 209–216. [9] Li, S.; Wu, K. On the limit cycles bifurcating from piecewise quasi- homogeneous differential center. Internat. J. Bifur. Chaos Appl. Sci. Engrg. 26 (2016), no. 7, 1650116, 10 pp. [10] Liang, H.; Huang, J.; Zhao, Y. Classification of global phase portraits of planar quartic quasi-homogeneous polynomial differential systems. Non- linear Dynam. 78 (2014), no. 3, 1659–1681. [11] Liang, H.; Torregrosa, J. Centers of projective vector fields of spatial quasi-homogeneous systems with weight (m,m,n) and degree 2 on the sphere. Electron. J. Qual. Theory Differ. Equ. (2016), Paper No. 103, 26 pp. [12] Llibre, J.; Zhang, X. Polynomial first integrals for quasi–homogeneous polynomial differential systems, Nonlinearity 15 (2002), 1269–1280. [13] Tang, Y.; Wang, L.; Zhang, X. Center of planar quintic quasi- homogeneous polynomial differential systems. Discrete Contin. Dyn. Syst. 35 (2015), no. 5, 2177–2191. [14] Xiong, Y.; Han, M.; Wang, Y. Center problems and limit cycle bifur- cations in a class of quasi-homogeneous systems. Internat. J. Bifur. Chaos Appl. Sci. Engrg. 25 (2015), no. 10, 1550135, 11 pp. [15] Yoshida, H. Necessary condition for existence of algebraic first integrals I and II. Celestial Mechanics 31 (1983), 363–379, 381–399. 34