On mixed almost Moore graphs of diameter two

Mixed almost Moore graphs appear in the context of the Degree/Diameter problem as a class of extremal mixed graphs, in the sense that their order is one less than the Moore bound for mixed graphs. The problem of their existence has been considered before for directed graphs and undirected ones, but not for the mixed case, which is a kind of generalization. In this paper we give some necessary conditions for the existence of mixed almost Moore graphs of diameter two derived from the factorization in Q[x] of their characteristic polynomial. In this context, we deal with the irreducibility of Φi ( x2 + x − (r − 1) ) , where Φi(x) denotes the i-th cyclotomic polynomial.


Introduction
The relationship between vertices or nodes in interconnection networks can be undirected or directed depending on whether the communication between nodes is two-way or only one-way.Mixed graphs arise in this case and in many other practical situations where different kinds of connections are needed.Urban street networks being perhaps the most popular one.A mixed graph G may contain (undirected) edges as well as directed edges (also known as arcs).Mixed graphs whose vertices represent the processing elements and whose edges represent their links have been studied before ( [6,13]).It is therefore natural to consider network topologies based on mixed graphs, and investigate the Degree/Diameter problem in that kind of graphs.
the electronic journal of combinatorics 23(2) (2016), #P2. 3 • Degree/Diameter problem for mixed graphs: given three natural numbers r, z and k, find the largest possible number of vertices n(r, z, k) in a mixed graph with maximum undirected degree r, maximum directed out-degree z and diameter k.
Besides, when z = 0, that is, the mixed graph becomes an undirected graph, it is known that n(r, 0, k) < M (r, 0, k) = 1 + r + r(r − 1) unless r = 2 and any k > 3 (cycle graphs C 2k+1 ) or k = 2 and r = 2, 3, 7 (and possibly r = 57).Hoffman and Singleton [9] proved that unique Moore graphs exist for k = 2 and r = 2, 3, 7, whereas the case r = 57 remains as the most important open problem in this area.These latter bounds are easily derived just counting the number of vertices of a particular distance of any given vertex v in a [di]graph with given maximum [out-]degree and diameter.Nevertheless, the problem of finding a general formula for M (r, z, k) has been more difficult (see [5]).Here, we focus on the case of diameter two, where the Moore bound for mixed graphs is easily derived as M (r, z, 2) = 1 + z + (r + z) 2 .
In this context, we deal with mixed graphs containing at least one edge and one arc.Mixed graphs of diameter two, maximum undirected degree r 1, maximum out-degree z 1 and order this bound are called mixed Moore graphs.Such extremal mixed graphs are totally regular of degree d = r +z and they have the property that for any ordered pair (u, v) of vertices there is a unique trail of length at most 2 between them.Although some mixed Moore graphs of diameter two are known to exist and they are unique [12], the general problem remains unsettled.Bosak [3] gives a necessary condition for the existence of a mixed Moore graph of diameter two, but recently it has been proved that there is no mixed Moore graph for the (r, z) pairs (3, 3), (3,4), (7,2) satisfying such necessary condition (see [10]) and in general there are infinitely many pairs (r, z) satisfying Bosak necessary condition for which the existence of a mixed Moore graph is not yet known.

Mixed almost Moore graphs of diameter two
Here we deal with the problem of the existence of mixed graphs of diameter two with maximum undirected degree r, maximum directed out-degree z and order just one less than the Moore bound.We call these mixed graphs mixed almost Moore graphs of diameter two.For the case of undirected graphs, Erdős, Fajtlowitcz and Hoffman [7] proved that, apart from the cycle graph of length 4, almost Moore graphs of diameter two do not exist.In the other way around, for the case of directed graphs, Gimbert [8] enumerated all almost Moore digraphs of diameter two.As far as we know, the problem of the existence of mixed almost Moore graphs has not been treated before.An example of a mixed almost Moore graph of diameter two is given in Figure 1.This graph is totally regular with undirected degree r = 2 and directed degree z = 1.Next we see that a mixed almost Moore graph of diameter two must have undirected even degree.
Proposition 1.There is no mixed almost Moore graph of diameter two with undirected odd degree r.

Proof. The number of vertices of a mixed almost Moore graph is
No matter what the parity of z is, if r is odd we have that n is always odd too.If there was a mixed graph G of order n and with every vertex of undirected degree r, we could take the undirected subgraph derived from G by removing all its arcs.This undirected graph would be regular of odd degree r and it would have odd order n.But it is well known that regular graphs of odd degree must have even order.Hence, such undirected graph does not exist and neither its corresponding mixed almost Moore graph.
Notice that in the previous proposition we are assuming that every vertex in a mixed almost Moore graph of diameter two has undirected degree r (instead of maximum undirected degree).In fact, if there exists a vertex v with undirected degree r r − 1 and/or directed out-degree z z − 1, then the total number of vertices reached by v in length 2 would be 1+z +(r +z ) 2 .A simple observation gives 1+z +(r +z ) 2 < z +(r +z) 2 = M (r, z, 2) − 1 when r r − 1 or z z − 1.Hence, such mixed graph containing v would have order less than M (r, z, 2) − 1.As a consequence, every mixed almost Moore graph of diameter two must have undirected degree r and directed out-degree z.It remains to determine if every vertex has directed in-degree z.If so, this mixed graph is called totally regular.Figure 1 shows an example of a mixed almost Moore graph with r = 2 and z = 1 which is totally regular.Nevertheless, we do not know if there exist mixed almost Moore graphs which are not totally regular.It is known that this question has an affirmative answer for both undirected and directed graphs, but it is not proved for mixed graphs.We post a problem regarding this question in the last section of the paper.Despite the example given in Figure 1, it seems difficult to find more examples of these extremal mixed graphs.
Next, we study some properties related to the spectrum of a mixed almost Moore graph that help us to derive more conditions for the existence of these mixed graphs.Every mixed almost Moore graph G of diameter two has the property that for each vertex v ∈ V (G) there exists only one vertex, denoted by σ(v) and called the repeat of v, such that there are exactly two walks of length at most 2 from v to σ(v).If σ(v) = v, then v is called a selfrepeat vertex.As a consequence, the adjacency matrix A of G satisfies the following matrix equation depending on a (0, 1)-matrix P : where I and J denote the identity and the all-ones matrix, respectively.Indeed, each entry I + A + A 2 is 1 due to the uniqueness of the walks, except in the main diagonal (which corresponds to closed walks of length 2), where the fact that each vertex is incident to r edges gives exactly r closed walks (performed by edges) of length 2 at any vertex.Now every extra walk of length at most 2 from v to σ(v) is codified into matrix P (p ij = 1 iff σ(i) = j assuming V (G) = {1, . . ., n}), for every vertex v of G.Under these conditions, it is easy to see that G is a totally regular graph (AJ = JA = (r + z)J) if and only if P is a permutation matrix (P J = JP = J) preserving the adjacencies of G (AP = P A), that is, the map σ, which assigns to each vertex v ∈ V (G) its repeat σ(v), is an automorphism of G (see [1]).
From here on, we will focus on mixed almost Moore graphs that are totally regular.Seeing σ as a permutation, it has a cycle structure which corresponds to its unique decomposition in disjoint cycles.Such cycles will be called permutation cycles of G.The number of permutation cycles of G of each length i n will be denoted by m i and the vector (m 1 , . . ., m n ) will be referred to as the permutation cycle structure of G.In particular, m 1 is the number of selfrepeats vertices and it is also the number of 1's in the main diagonal of P , that is, Tr (P ) = m 1 , where Tr (P ) denotes the trace of the matrix P .

Moore graphs as mixed almost Moore graphs with z = 1
We point out that M (r + 1, 0, 2) = M (r, 1, 2) − 1, that is, the Moore bound for undirected graphs of diameter two coincides with the order that a mixed almost Moore graph, with z = 1 and one edge less, should have.Hence, Moore graphs of degree r + 1 and diameter two can be viewed as mixed almost Moore graphs with z = 1 and undirected degree r.In this case, every vertex is selfrepeat, so m 1 = n.From the matrix point of view, the adjacency matrix A of a Moore graph of degree r + 1 and diameter two satisfies the equation I + A + A 2 = J + (r + 1)I, which is a particular solution of Equation 1 when the permutation matrix P is the identity matrix I, that is, when Tr (P ) = m 1 = n.Since Moore graphs are well studied, we are interested in other solutions than the ones provided by Moore graphs.For instance, Petersen graph is a mixed almost Moore graph of diameter two with parameters r = 2 and z = 1, by replacing five vertex-disjoint edges by digons (one arc and its reverse).Next, we provide another example with the same set of parameters but where no vertex is selfrepeat.

Example
The mixed graph G depicted in Figure 1 has 10 vertices and is totally regular with undirected degree r = 2 and directed degree z = 1, moreover, it is easy to check that the electronic journal of combinatorics 23(2) (2016), #P2.3 G has diameter two.Since M (2, 1, 2) − 1 = 10, we have that G is a mixed almost Moore graph.Taking indexes modulus 5, we observe that the repeat of vertex a i is a i−2 since there are two different paths of length 2 joining them (a i a i−1 a i−2 and a i c i−1 a i−2 ).Besides, σ(c i ) = c i−2 since c i c i−2 and c i a i−1 c i−2 are again two differents paths of length 2. Hence, the permutation σ decomposes in two disjoint cycles of length five, that is, σ = (a 0 a 3 a 1 a 4 a 2 )(c 0 c 3 c 1 c 4 c 2 ).So, the permutation cycle structure (m 1 , . . ., m 10 ) of this graph is m 5 = 2 and m i = 0, for all i = 5.

Characteristic polynomial of mixed almost Moore graphs of diameter two
Let G be a mixed almost Moore graph with permutation cycle structure (m 1 , . . ., m n ) and let A be its adjacency matrix.From Equation 1, the spectrum of A and J + rI + P are closely related.In [2] it is computed the characteristic polynomial of J + P as , where Φ i (x) denotes the i-th cyclotomic polynomial, the factorization of det xI where m(i) = i|l m l represents the total number of permutation cycles of order multiple of i.Now, the mapping x → x − r gives, We just need to add another mapping x → 1+x+x 2 to have information about the factors of the characteristic polynomial of G.
The other factors of φ G (x) are the irreducible factors of (x 2 +x−r) and Φ i x 2 +x−(r−1) .Note that Φ 1 For instance, the mixed almost Moore graph G depicted in Figure 1 has characteristic polynomial φ G (x) = (x−3)(x−1)Φ 5 (x 2 +x−1), where (x−1) is a factor of Φ 1 (x 2 +x−1).In order to give more information about the existence of mixed almost Moore graphs, we should deal with the problem of the irreducibility of the polynomials Φ i x 2 + x − (r − 1) , for all i = 1, . . ., n.This problem was first solved in [8] for the particular case r = 0, where the study of the irreducibility of Φ i (x 2 + x + 1) was crucial to complete the enumeration of almost Moore digraphs of diameter two.Our case is a little bit difficult, since we have in addition parameter r 1.Let us observe that Φ iff 4r − 7 is not a square in Z.For the remaining cases, we next prove that Φ i x 2 + x − (r − 1) is always irreducible.
Theorem 1.The polynomials Φ i x 2 + x − (r − 1) are irreducible in Q[x] for all i 3 and r 1.
Then, if ε is a root of f i (x) there exists a primitive i-th root of unity ζ i such that We consider the following algebraic extensions where ϕ(i) stands for the Euler's function.Since we have assumed Φ From Equation 2 it follows that ε belongs to the ring of algebraic integers of [15,Theorem 2.6]).
the electronic journal of combinatorics 23(2) (2016), #P2.3 Taking into account that [15,Proposition 2.8]).If i is a prime or a power of a prime, If τ is a unit then its conjugate can be expressed as τ = α • τ , where α is a root of unity (see [15,Lemma 1.6]).If τ + 1 is a unit then τ = βζ i (ζ i − 1), where β = (τ + 1) −1 .Since β = γ • β, with γ a root of unity, it turns out τ = γβ(1 i , that is, τ = α • τ being α a root of unity as well.Furthermore, since the only roots of unity in Q(ζ i ) are of the form ±ζ i , it follows that α is a 2i-th root of unity.So, in any case τ = α • τ , where α 2i = 1.Now, in order to find a polynomial relation between α and ζ i , we use the following identities: Considering the complex conjugate of τ , from the first relation we have Then, multiplying the relation with τ 2 by α 2 and subtracting the former relation we get we have the relation

Equating this expression of τ with ζ
the electronic journal of combinatorics 23(2) (2016), #P2.3 Then, it is clear that More precisely, if i is odd both degrees are 1.Now, taking traces Tr Q(ζ 2i )/Q in the Equation 3 we obtain ).
From the properties of Tr Q(ζ i )/Q we have where µ is the Möbius function.In particular, In particular, if i is odd ϕ(i) = ϕ(2i) 2. Hence, i 3 if i is odd and 2i 12 if i is even, that is, i 6 if i is even.Therefore, Φ i x 2 + x − (r − 1) is irreducible for i > 6 and i = 5.The polynomials Φ 3 x 2 +x−(r−1) and Φ 6 x 2 +x−(r−1) considered in F 2 [x] coincide with the same polynomial for the cases i = 3 and i = 6.Unlike them, Φ 4 x 2 + x − (r − 1) factorizes in F 2 [x] and this argument does not work.In this case, Φ 4 2 + 1 does not have real roots and hence does not have linear factors.

Necessary conditions for the existence of mixed almost Moore graphs of diameter two
Next, we are ready to give a necessary condition for the existence of a mixed almost Moore graph.We recall that if a(x) = a n x n + a n−1 x n−1 + • • • + a 0 is a polynomial of degree n 1, with rational coefficients, then its trace, denoted by Tr a(x), is defined as the sum of all its complex roots, that is, Tr a(x) = − a n−1 an .In particular, the traces of the cyclotomic polynomials are Tr Φ i x 2 + x − (r − 1) = −ϕ(i).• case: Φ 1 x 2 + x − (r − 1) and Φ 2 x 2 + x − (r − 1) are irreducible, that is, 4r + 1 and 4r − 7 are not squares in Z, then Now, we express the trace of the adjacency matrix A of G in terms of the traces of the factors of φ G (x).
Then, taking into account the identity n i=1 m(i)ϕ(i) = n (see [8]), we have that, Therefore, the condition Tr A = 0 (G has no loops) implies that n = 2d + 1.Now, taking into account that n = d + d 2 − r, we have d(d − 1) = 1 + r.Since r < d, this equality holds only in the case r = 1 and d = 2. But, by Proposition 1 mixed almost Moore graph do not exist for odd r, so there is no mixed almost Moore graph in this case.
the electronic journal of combinatorics 23(2) (2016), #P2. 3 where a 1 +b 1 = m(1)−1.Now, we proceed as in the previous case, where we express the trace of the adjacency matrix A of G in terms of the traces of the factors of φ G (x): With the help of n i=1 m(i)ϕ(i) = n and taking into account that The condition Tr A = 0 implies, We can express this last identity in terms of c 1 and z by the equivalences 4 .Looking at it as a polynomial with variable c 1 , we get where As in the previous case, the condition Tr A = 0 implies n = 2d + c 2 (a 2 − b 2 ) + 1. Collecting this identity in terms of c 2 and z, we derive a polynomial equation in c 2 where a rational solution needs c 2 | (16z 2 + 40z − 23).
Note that the case when Φ 1 x 2 +x−(r−1) and Φ 2 x 2 +x−(r−1) are both reducible only happens when 4r+1 = c 2 1 and 4r All the integer solutions of this equation give r = 2, which is excluded in this theorem and it will be treated before.
The first even values for the undirected degree r that do not satisfy the conditions given above are r = 8, 10, 14, 16, 18, 22, 24, 26, 28.Hence, for this range of values (and beyond) we can guarantee that a mixed almost Moore graph with undirected degree r does not exist.Notice that r = 14 satisfies the first part of (b) in Theorem 2 since 4 • 14 − 7 = 7 2 , but then 7 should divide 16z 2 + 40z − 23 for at least one z 1 and this last divisibility condition never happens.More in general, Proposition 3.For any odd integer c ∈ Z there exist at most one r 1 satisfying either (a) or (b) in Theorem 2.

Conditions related to the permutation cycle structure
Next, we provide another existence condition for a mixed almost Moore graph of diameter two concerning its structure of vertices adjacent to their corresponding repeats.To this end, we will compute the trace of A 3 in two different ways.First of all, from Equation 1 and using the linearity of the trace, we get Tr (A 2 ).Indeed, Tr (I) + Tr (A) + Tr (A 2 ) = Tr (J) + rTr (I) + Tr (P ) and since Tr (A) = 0 and Tr (P ) = m 1 we get This is something that can be deduced using geometric reasoning too: Every vertex in a (totally regular) mixed almost Moore graph of diameter two contains exactly r closed walks of length 2 (those provided by the undirected edges), and (maybe) some others provided by digons (one arc and its reverse).In this last case, we would have selfrepeat vertices and we know that there are m 1 of them.Consequently, Tr (A 2 ) = rn + m 1 .We point out that the combination of Tr (A 2 ) = rn + m 1 together with Tr (A 2 ) = Tr (φ 2 G (x)) provides the same necessary conditions given in Theorem 2 for the existence of a mixed almost Moore graph of diameter two.One step beyond is the combined calculation of Tr (A 3 ): multiplying A from the left side in Equation 1, we obtain A + A 2 + A 3 = AJ + rA + AP .Taking into account that AJ = JA = (r + z)J we deduce Tr (A 3 ) = zn − m 1 + Tr (AP ). ( From the geometric point of view, Tr (AP ) is the number of vertices v of G adjacent to their corresponding repeat vertices σ(v), since (AP ) ii = n j=1 A ij P ji = A σ(i)i .By expressing Equation 5 in terms of the eigenvalues of G, we give another necessary condition for the existence of a mixed almost Moore graph.Proposition 4. Let G be a (totally regular) mixed almost Moore graph of diameter two, undirected (even) degree r > 2 and directed degree z 1.Then, m 1 (the number of selfrepeats vertices of G) is even and the total number of vertices adjacent to their corresponding repeat vertices is n 2 − m 1 2 , where n = d 2 + d − r.Proof.We compute Tr (A 3 ) using the roots of the characteristic polynomial φ G (x).As we saw in Theorem 2, the characteristic polynomial φ G (x) depends on the factorization of Φ 1 x 2 + x − (r − 1) and Φ 2 x 2 + x − (r − 1) .We are going to depict the second case, the electronic journal of combinatorics 23(2) (2016), #P2.3 that is, when Φ 1 x 2 + x − (r − 1) is reducible and Φ 2 x 2 + x − (r − 1) is not.In this case, we have, where γ ζ and δ ζ are the two roots of Using the identities ζ 1 = ϕ(i) and ζ ζ = µ(i) (see [8]) we have, Combining this equation with Equation 5and taking into account that m(1) = a 1 +b 1 +1, Using Equation 4together with Equation 6 yields the desired result Tr (AP ) = n 2 − m 1 2 .The case when Φ 1 x 2 + x − (r − 1) is irreducibe and Φ 2 x 2 + x − (r − 1) is reducible can be done with the same ideas and it results on the same identity Tr (AP ) = n 2 − m 1 2 .
The case r = 2 In Theorem 2 we have excluded the case r = 2.This is the case when

Open problems
This last section is devoted to several open problems, most of them related with the existence of this extremal class of mixed graphs.First of all, as we mention in section 2, almost Moore graphs are totally regular either in the directed or undirected case.We do not know if this is longer true for mixed graphs.
Question 1. Are mixed almost Moore graphs of diameter two totally regular? Figure 1 is an example of a mixed almost Moore graph of diameter two, with r = 2 and z = 1, but we do not know if there are mixed almost Moore graphs with r = 2 and z 2. For the values of the undirected degree r satisfying Theorem 2 we do not know if a mixed almost Moore graph do exist.Moreover, in Table 1 we provide a range of values for the directed degree z satisfying Theorem 2 when r is fixed, and the corresponding order n that a mixed almost Moore graph should have.

4 Figure 1 :
Figure 1: A mixed almost Moore graph with undirected degree 2 and directed degree 1.

Proposition 2 .
hence we can collect all of them in a simpler expression, The irreducible factors of the characteristic polynomial φ G (x) of a mixed almost Moore graph G are (x−d) and some of the irreducible factors of Φ i x 2 +x−(r−1) , for all 1 i n.

Question 2 . 2 ? 3 .
Are there mixed almost Moore graphs of diameter two, undirected degree r = 2 and directed degree z Question Does there exist a mixed almost Moore graph of diameter two with parameters (r, z) satisfying necessary conditions given in Theorem 2? r c 1 c 2 z n Existence 4 -3 1, 4, 7, 10, . .