On graphs whose orientations are determined by their Hermitian spectra

A mixed graph D is obtained from a simple graph G, the underlying graph of D, by orienting some edges of G. A simple graph G is said to be ODHS (all orientations of G are determined by their H-spectra) if every two H-cospectral graphs in D(G) are switching equivalent to each other, where D(G) is the set of all mixed graphs with G as their underlying graph. In this paper, we characterize all bicyclic ODHS graphs and construct infinitely many ODHS graphs whose cycle spaces are of dimension k. For a connected graph G whose cycle space is of dimension k, we also obtain an achievable upper bound 22k−1+2k−1 for the number of switching equivalence classes inD(G), which naturally is an upper bound of the number of cospectral classes in D(G). To achieve these, we propose a valid method to estimate the number of switching equivalence classes in D(G) based on the strong cycle basis, a special cycle basis introduced in this paper. Mathematics Subject Classifications: 05C50


Introduction
All graphs considered in this paper are finite and loopless. A mixed graph D G (or D, for short) is obtained from a simple graph G = (V, E), the underlying graph of D G , by orienting a subset of E(G). Accordingly, a mixed graph D G is also called an orientation of G, whose vertex set V (D) is same as the vertex set V (G) and whose edge set E(D) consisting of two parts: undirected edge set E 0 (D) and directed edge (or arc) set E 1 (D).
Denote by D(G) the set of all mixed graphs with G as their underlying graph. To distinguish undirected and directed edges, we denote an undirected edge between the vertices u and v by {u, v} and a directed edge from u to v by (u, v). If there is no confusion, we write uv (or vu) instead of {u, v} or (u, v). We may view undirected edges in a mixed graph as bi-directed edges. From this point of view, a mixed graph is indeed a digraph.
The Hermitian adjacency matrix of D is defined as The eigenvalues (spectrum) of H(D) are called the H-eigenvalues (Hspectrum) of D. The characteristic polynomial of H(D) is denoted by Φ(D, λ). Two mixed graphs are called H-cospectral (or cospectral for short) if they have the same Hspectrum. These terminologies were introduced by Liu and Li [11] and independently by Guo and Mohar [8]. They investigated the properties of characteristic polynomials and H-eigenvalues of mixed graphs and studied cospectral problems for mixed graphs. A number of linear algebraic properties of undirected graphs have been shown to hold for mixed graphs.
Problems about existence of cospectral graphs have long history, motivated by a natural question: can we determine a graph by its spectrum? The problem traces back to more than 50 years ago and has received a lot of attention from researchers in recent years. Formally, an undirected graph G is said to be determined by its spectrum (DS, for short) if every graph cospectral to G is isomorphic to G. For the background and known results about this problem, readers are referred to two surveys [5,6] and the references therein.
The same question has yielded fewer results for mixed graphs. So far, mixed graphs that can be determined by their H-spectra have proven elusive. From a spectral analysis point of view, one of leading causes is that a large number of mixed graphs with the same underlying graph have an identical H-spectrum. Thus, researchers have turned to spectral determination of classes of switching equivalent mixed graphs rather than individual mixed graphs.
Let G be a simple graph. Guo and Mohar [13] presented an operation on mixed graphs in D(G), called switching equivalence, that can preserve the H-spectrum of mixed graphs. Switching equivalence relationship naturally partitions D(G) into the equivalence classes. In this sense, mixed graphs in an equivalence class can be considered as having the same orientation. In addition, the number of switching equivalence classes of D(G), denoted by n s (G), can be used to estimate the number of mixed graphs in D(G) having the same H-spectrum. For instance, if n s (G) = 1, it implies that all mixed graphs in D(G) have the same H-spectrum. More on switching equivalence will be presented in Section 2.2.
Let D be a family of mixed graphs. Based on the above discussion, a mixed graph D ∈ D is said to be determined by its H-spectrum (or DHS, for short) on D if every graph in D cospectral to D is switching equivalent to D. If D is the set consisting of all mixed graphs, we say that D is DHS for short. Obviously, the property DHS is a stronger property than DS. Namely, if an undirected graph is DHS, then it is necessarily DS. However, the converse is not true as evidenced by the two graphs in Figure 2 of [13].
Recently, the H-spectrum of mixed graphs has been the subject of several publications. In addition to two fundamental papers [8,11] mentioned above, Mohar [13] characterized all mixed graphs with rank 2, that is mixed graphs whose Hermitian adjacency matrices have rank 2, and investigated which mixed graphs with rank 2 are DHS. Wang et al. [18] and Tian and Wong [16] extended the research in [13] to mixed graphs with rank 3 and shown all connected mixed graphs with rank 3 are DHS on their family. Guo and Mohar [9] determined all mixed graphs whose spectral radii with respect to their Hermitian adjacency matrices are less than 2 and investigated which paths are DHS. Wissing and van Dam [19] constructed the first infinite family of connected (strongly) DHS mixed graphs. For further research works concerned with the H-spectra of mixed graphs, readers are referred to the literature [2,3,4,7,10,20] and the references therein.
From a structural point of view, the structure of a mixed graph can be understood as two parts: the incidence structure, that is the structure of its underlying graph, and the orientation. Determining the former by spectrum is the familiar as "DS" problem and is widely studied. Orientations of graphs are closely related to colorings and flows of graphs. For instance, Minty [12] and Vitaver [17] proved that a graph G is k-colorable if and only if G has an orientation such that every cycle C of G contains at least |C|/k edges in each of the two directions around the cycle. Steinberg and Younger [14] proved that a bridgeless graph G admits a nowhere-zero 3-flow if and only if G has a modular 3-orientation. However, determining orientations of graphs by spectra has received less attention. This motivates us to discuss "DHS" on D(G). If for any D ∈ D(G), every graph in D(G) H-cospectral to D is switching equivalent to D, that is, D is DHS on D(G), we say that orientations of G are determined by their H-spectra (or G is ODHS, for short). Clearly, if G is not ODHS, then there are at least two mixed graphs (two switching equivalence classes) in D(G) which are not DHS.
The main purpose of our study is to determine which graphs are ODHS and which are not. The difficulty of this problem is that the switching equivalences of two mixed graphs are not well-understood. In Section 2, we will present a rough characterization of switching equivalences between two mixed graphs. In Section 4, we propose a valid method to estimate the number of switching equivalence classes in D(G) based on the strong cycle basis, and special cycle basis will be introduced in Section 3. As an application of the method, we prove that n s (G) is bounded above by 2 2k−1 + 2 k−1 for any connected graph G whose cycle space has dimension k, which is naturally an upper bound of the number of cospectral classes in D(G). In Section 5, some necessary conditions of ODHS graphs are proposed. Using these results, we characterize all bicyclic ODHS graphs and construct infinitely many ODHS graphs achieving the upper bound given in Section 4.

Characteristic polynomials of mixed graphs
Let D be a connected mixed graph and H(D) = [h ij ] be its Hermitian adjacency matrix. The value of a mixed walk W : v 1 v 2 . . . v s is defined as h 12 h 23 . . . h s−1,s and is denoted by h(W ). For a mixed cycle C, we assign a direction to C before calculating its value. Obviously, if in one direction the value of a mixed cycle or a mixed path is α, then in the reversed direction its value is α, the conjugate number of α. A cycle C is called positive (negative, resp.) if h(C) = 1 (−1, resp.). Positive or negative cycles are called real cycles, whose values are independent of their assigned direction.
For any cycle C of a mixed graph D, we assign a direction for C. The operation is called cycle orientation of D. Let D and D be two mixed graphs with the same underlying graph G. Taking a cycle in D , we obtain the corresponding cycle in D naturally. Hereafter, discussing two mixed graphs with the same underlying graph, we always suppose that they have the same cycle orientation, which is also called the cycle orientation of G. It is different to the terminology orientation of G mentioned in Section 1.
Let D be a mixed graph of order n. The characteristic polynomial of H(D) is denoted by Φ(D, λ) = λ n + c 1 λ n−1 + · · · + c n .
A Sachs subgraph is a subgraph only having K 2 or cycles as connected components. Let S be a Sachs subgraph of D. For a given cycle orientation of D, the signature of S, denoted by σ(S), is defined as |f − b|, where f denotes the number of forward arcs and b denotes the number of backward arcs in S. A Sachs subgraph S is called basic if each cycle C in S is real. Equivalently, C has an even number of directed edges, and σ(C) is even for each cycle C of S. For a basic subgraph B, let r(B) = 1 2 σ(B). It is clear that (−1) r(B) = C⊂B h(C), which is independent of the cycle orientation of D.
We state the following theorem from [11] in different format and notation. The authors of [21] proved the following theorem as a consequence of Theorem 1.

Theorem 2. [21]
Let D be a mixed graph and v ∈ V (D). Let C v be the set of all basic mixed cycles in D containing v. Then the electronic journal of combinatorics 27(3) (2020), #P3.55

The switching equivalence
In [8,13], the authors considered the so-called four-way switching operations, that preserve the H-spectrum of mixed graphs. We describe the definition in the matrix-theoretic language below. Proposition 4. [8,13] The four-way switching on any mixed graph D gives a mixed graph that is cospectral with D.
By Definition 3, it is easy to see that if D is obtained from D by a sequence of four-way switchings, then D can be obtained from D by a single four-way switching. In [8,13], the authors described the four-way switching as a special transformation between two mixed graphs with the same underlying graph. Their work implies that if D and D are two mixed forests with the same underlying graph, then D can be obtained from D by a four-way switching. This is naturally generalized as follows. Necessity. By Definition 3, there is a diagonal matrix S = diag{s 1 , . . . , s n } such that We prove the sufficiency by induction on k, the dimension of the cycle space of D . If k = 0, then D and D are two mixed trees with the same underlying graph, and thus the conclusion follows.
Assume that k 1 and that the assertion holds for the mixed graphs with dimension less than k. Let D be a mixed graph with dimension k. Take a cycle The corresponding cycle and edge in D is denoted by C and e , respectively. By the induction hypothesis, D − e can be obtained from D − e by a four-way switching, that is, there is a diagonal matrix S = diag{s 1 , . . . , the electronic journal of combinatorics 27(3) (2020), #P3.55 A mixed graph is positive if each cycle is positive. By Lemma 5, we immediately have the following corollary which was given by Liu and Li in [11]. Corollary 6. [11] Let D be a mixed graph with the underlying graph G. Then D is positive if and only if D can be obtained from G by a four-way switching.
Reversing all directed edges in mixed graph D, we obtain a mixed graph, called the converse of D, denoted by D . Obviously, D is cospectral to D because of H(D ) = H(D) . We immediately obtain the following lemma.
Lemma 7. Let D be a mixed graph, and let C and C be two corresponding cycles in D and D , respectively. Then h(C) = h(C ). By Lemma 7, the converse operation is different from the four-way switching operation because it does not preserve the cycle values while the four-way switching does. Mohar [13] defined that two mixed graphs D 1 and D 2 are switching equivalent if one can be obtained from the other by a sequence of four-way switchings and converse operations. By Lemma 5, Lemma 7 and Definition 10, we present the main theorem of this section, which characterizes the switching equivalence between two mixed graphs. Usually, it is difficult to find all corresponding cycles of D and D and compare their values while the edge density is enough large. Thus, Theorem 11 is only a rough characterization on switching equivalence. To refine it, the strong cycle basis, a special cycle basis, will be introduced in next section.

Strong cycle basis
The graphs considered in this section maybe have multiple edges, but have no loops. Denote by E(G) the set of all subsets of E(G) for a graph G. This set forms a vector space over the 2-element field F 2 under the symmetric difference, which is called the edge space of G. The cycle space C(G) is the subspace of E(G) spanned by the edge sets of cycles in G. In the other word, C(G) can be considered as the subspace of E(G) consisting of edge sets of all even subgraphs (that is, the subgraph whose all vertices have even degree) in G. Accordingly, denote byC(G) the set consisting of all cycles in G.
The dimension of the cycle space is equal to |E(G)| − |V (G)| + s(G), where s(G) is the number of connected components of G. A connected graph is said to be k-cyclic if the dimension of its cycle space is k. A cycle basis of G is a basis for the cycle space of G which consists entirely of cycles.
It is known that all induced cycles can generate cycle space which implies the existence of cycle basis for any graph.
Let G 1 and G 2 be two subgraphs of G. The symmetric difference of G 1 and G 2 , denoted by G 1 ⊕G 2 , is defined to be a subgraph of G induced by the symmetric difference of E(G 1 ) and E(G 2 ). Notably, it is possible that the symmetric difference of two connected graphs is not connected.
Let C 1 and C 2 be two cycles of G. It is easy to see that C 1 ⊕ C 2 is an even graph. If the intersection of C 1 and C 2 is exactly a non-trivial path P k (k 2), we say that cycle C 1 ⊕ C 2 is obtained from C 1 and C 2 by making a strong symmetric difference, and write Let F be a family of cycles of D. We recursively construct the family F as follows: (1) Initially, F = F .
(2) For any cycle C ∈C(G), if there are two cycles C 1 and C 2 in F such that C = C 1 ⊕ s C 2 , then we add C to F .
The above process will terminate as G is a finite graph and we finally obtain a set F , which is called the closed set of F with respect to strong symmetric difference.
The existence of cycle basis with some constraints is an important topic of cycle theory, and has received wide attention. One can refer to [1,15] and references therein for more details. In the following, we present the main theorem in this section.  Proof. Without loss of generality, we may assume that the graph considered is connected. Otherwise, the cycle space is the direct sum of the cycle spaces of the connected components.
Let G be a counterexample with the minimum number of edges. We can claim that G is a connected k-cyclic graph for k 2, since the assertion is trivial for trees and unicyclic graphs.
We may claim that G is 2-connected. If not, let v be a cut vertex of G. Then, G can be obtained from a number of connected subgraphs G 1 , . . . , G l (l 2) of G by identifying some vertex in each G i at a common vertex v. Since |E(G i )| < |E(G)| for each i (1 i l), G i contains a strong cycle basis, say C i . It is easy to verify that C 1 ∪ · · · ∪ C l is a strong cycle basis of G.
Take an edge e = uv in G. As G is 2-connected, e is not a cut edge. We consider the following cases.
Case 1: There is another edge f joining u and v.
Since G − e is a connected (k − 1)-cyclic graph, G − e admits a strong cycle basis, say {C 1 , . . . , C k−1 }. Denote by C 0 the digon consisting of e and f . We prove that C := {C 0 , C 1 , . . . , C k−1 } is a strong cycle basis of G, which contradicts to the choice of G. By Remark 13, it is enough to prove that C ∈ C for any cycle C ∈C(G) \ C . If e / ∈ E(C), then C ∈ C as C ∈ C (G − e). If e ∈ E(C), replacing e by f , we can obtain a cycle in G − e, denoted by C . Note that C = C ⊕ s C 0 and C ∈ C (G − e) ⊂ C . So, C ∈ C .
Case 2: The edge e is a unique edge joining u and v. Let U = {u 1 , . . . , u p } be the set of vertices which are adjacent to u, but not to v. Let V = {v 1 , . . . , v q } be the set of vertices which are adjacent to v, but not to u. Let W = {w 1 , . . . , w s } be the set of vertices which are adjacent to both u and v. Denote by G/e the graph obtained from G by contracting the edge e into a new vertex v e , which becomes adjacent to all the former neighbors of u and v. In particular, the edge uw i and vw i are relabeled as two parallel edges between v e and w i for 1 i s, denoted by v u e w i and v v e w i , respectively, see Figure 1. Now, we define a mapping φ fromC(G/e) toC(G) as follows, which is the key of remaining proof. For any C ∈C(G/e), if v e / ∈ C, then φ(C) is the cycle corresponding to Since e is the unique edge between u and v, contracting e from G does not create loops. Then, E u ∪ E v is the set consisting of all edges incident to v e in G/e. If f 1 and f 2 lie in the same set, say E u , then φ(C) is defined to be the cycle in G obtained from C by replacing the segment f 1 v e f 2 by the segment of f 1 uf 2 , where f i is the edge in G corresponding to is defined to be the cycle in G obtained from C by replacing the segment f 1 v e f 2 by the segment of f 1 uevf 2 .
Let C, C , C be three cycles in G/e. It is clear that if C = C ⊕ s C , then φ(C) = φ(C ) ⊕ s φ(C ). Since G/e is a connected k-cyclic graph with fewer number of edges and without loops, G/e admits a strong cycle basis, say {C 1 , . . . , C k }. Next, we prove that φ(C ) = {φ(C 1 ), . . . , φ(C k )} is a strong cycle basis of G, which yields a contradiction.
For any cycleC in G, if there exists a cycle C in G/e such that φ(C) =C, it is easy to check thatC ∈ φ(C ). If not, it implies that u, v ∈C and e / ∈C. We rewriteC by uP 1 vP 2 u, where P 1 and P 2 are paths with length at least two. Denote byC (C , resp.) the cycle obtained fromC by replacing P 1 (P 2 , resp.) by e. By the above discussion, C ∈ φ(C ) andC ∈ φ(C ). SinceC =C ⊕ sC , we haveC ∈ φ(C ).
Remark 15. Not all cycle bases are strong cycle bases. Consider the complete bipartite graph K 3,3 with vertex labeling shown in Figure 2. Let C 1 = 1b3c2a1, C 2 = 1b2c3a1, C 3 = 1c2b3a1 and C 4 = 1c3b2a1. It is easy to check that C = {C 1 , C 2 , C 3 , C 4 } is a cycle basis of K 3,3 , but not a strong cycle basis, since C = C .

The number of switching equivalence classes
Based primarily on strong cycle basis, in this section, we will refine the characterization of switching equivalence between two mixed graphs in Section 2, and give a method to estimate the number of switching equivalence classes in D(G). Using this method, an upper bound for n s (G) is obtained. Lemma 16. Let C, C 1 , C 2 be three cycles of simple graph G satisfying C = C 1 ⊕ s C 2 , and let w 1 , w 2 ∈ {±1, ±i} be two complex numbers. Under any given cycle orientation of G, h(C) is determined by h(C 1 ) and h(C 2 ). That is, for any mixed graph D ∈ D(G) with h(C 1 ) = w 1 and h(C 2 ) = w 2 , the value of C only depends on w 1 and w 2 .
Proof. Let C 1 = uP vP 1 u, C 2 = uP 2 vP u, and C = uP 2 vP 1 u (see Figure 3). Without loss of generality, we calculate the values of C, C 1 and C 2 anticlockwise, considering the values of P, P 1 and P 2 in the direction from u to v. For any mixed graph D ∈ D(G) with h(C 1 ) = w 1 and h(C 2 ) = w 2 , we have The result follows.
In the proof of Lemma 16, if the directions of C and C 1 are anticlockwise, the direction of C 2 is clockwise, it follows from the proof that h(C) = h(C 1 )h(C 2 ). Hereafter, the directions of C 1 , C 2 and C are said to be coincident if h(C) = h(C 1 )h(C 2 ) under these cycle orientations.
Let G be a connected k-cyclic simple graph. By Theorem 14, G admits a strong cycle basis, denoted by C = {C 1 , . . . , C k }. For any mixed graph D ∈ D(G) and its given cycle orientation, if we fix the values of C 1 , . . . , C k in D, by Lemma 16, the values of all cycles inC(D) are determined. Based on this, ordered sequence s(D) = (h(C 1 ), . . . , h(C k )) is called an essential vector of D, which depends on C and the given cycle orientation.
Let D and D be two mixed graphs with the same underlying graph G. We always assume that D and D have the same cycle orientation. Let s(D ) = (h(C 1 ), . . . , h(C k )) and s(D ) = (h(C 1 ), h(C 2 ), . . . , h(C k )), where C j (C j , resp.) is the corresponding cycle in D (D , resp.) of C j for any j(1 j k). Denote by S(G) the set of essential vectors of all mixed graphs in D(G). The conjugate equivalence naturally defines an equivalence relation on S(G). By Theorem 18, the determination of n s (G) is equivalent to find the number of conjugate equivalence classes in S(G). As an application, a natural upper bound of n s (G) is given in following theorem.
Proof. Let x j be the number of conjugate equivalence classes in S(G) whose essential vectors have exactly j imaginary entries at the same position. For j = 0, the corresponding essential vectors are real, so x 0 2 k . For 1 j k, x j 1 2 k j 2 k . Therefore This completes the proof.
A connected k-cyclic graph G is called free with respect to a strong cycle basis C if for any vector s = {s 1 , . . . , s k } whose components are in {±1, ±i}, there exists D ∈ D(G) such that s(D) = s. Clearly, the equality in Theorem 19 holds if and only if G is free with respect to some strong cycle basis. Unfortunately, not all graphs are free. While the edge density of a graph is enough large, it may be not free. For instance, it follows from a rough estimation that K n is not free for n 11. Here, we only give an obvious lemma which will be used in Section 5.
Lemma 20. Let C = {C 1 , . . . , C k } be a strong cycle basis of G. If for any i (2 i k), C i contains at least two edges which are not in other cycles in C , then G is free with respect to C .

ODHS graphs
We first introduce some families of graphs to be used later. Let G be a connected k-cyclic graph. The kernel of G, denoted byĜ, is the unique minimal connected induced k-cyclic subgraph of G. It is clear thatĜ is the unique k-cyclic induced subgraph of G containing no pendant vertices, and G can be obtained fromĜ by attaching trees to some vertices of G. A 2-cyclic graph is also called a bicyclic graph. A theta graph, denoted by θ(l 1 , l 2 , l 3 ), is a bicyclic graph consisting of three internally disjoint paths P 1 , P 2 , P 3 with the same endpoints, where P i has length l i for each i. A bicyclic graph G is said to be of theta-type graph, ifĜ is a theta graph. Hereafter, we always assume that l 1 l 2 l 3 , and denote C ij to be the cycle consisting of two paths P i and P j for 1 i < j 3.
Let D and D be two mixed graphs with the same underlying graph G. If C is a cycle of G, we always denote the corresponding cycle of C in D (D , resp.) by C (C , resp.).
In this section, we will characterize all bicyclic ODHS graphs, and construct infinitely many k-cyclic ODHS graphs, both of which can achieve the upper bound in Theorem 19. Note that two switching equivalent mixed graphs are cospectral. By the definition of ODHS graph, we immediately have the following lemma.

Lemma 21.
A simple graph G is ODHS if and only if n(G) = n s (G).
By Theorem 11, all mixed trees with the same underlying graph are switching equivalent, which implies that all trees are ODHS. For unicyclic graph G, by Theorem 1 and Theorem 11, it is clear that n(G) = n s (G) = 3, which implies that all unicyclic graphs are ODHS. Thus, it is natural to ask which k-cyclic graphs are ODHS for k 2. To answer this question, the following lemmas are needed.
Lemma 22. Let D and D be two mixed graphs with underlying graph G, and let Φ(D , λ) = n j=0 c j λ n−j (Φ(D , λ) = n j=0 c j λ n−j , resp.) be the characteristic polynomial of D (D , resp.). If the corresponding basic cycles whose lengths are less than p have the same values, then c j = c j for any j(1 j p − 1). Furthermore, if the difference of the number of positive cycles and the number of negative cycles of order p in D is not equal to that in D , then c p = c p .
Proof. Let E j and E j be two basic subgraphs of order j containing at least one cycle of D and D , respectively. Let M j and M j be two basic subgraphs of order j (for even j) consisting of j/2 isolated edges of D and D , respectively. By Theorem 1, for any j (1 j p), Note that for corresponding basic subgraphs E j and E j , s(E j ) = s(E j ) and c(E j ) = c(E j ). It is easy to check that c j = c j for any j (1 j p−1) and c p = c p . The result follows.
Lemma 23. Let G be a connected simple graph. If there exists a cycle C of G which has no common edge with other cycles of G, then G is not ODHS.
Proof. By Lemma 21, it is sufficient to prove that n(G) < n s (G). Since C is edgedisjoint to the other cycles, C must be contained in any strong cycle basis of G. Let  {C, C 1 , . . . , C k−1 } be a strong cycle basis of G. We will complete the proof by constructing two mixed graphs D and D in D(G) which are cospectral but not switching equivalent. Noting that the direction of E(C) is independent of the directions of the rest cycles, we construct two mixed graphs D and D in D(G) satisfying: is not a real vector. Clearly, s(D ) and s(D ) are not conjugate equivalent. It follows from Theorem 18 that D and D are not switching equivalent. Since C (C , resp.) is imaginary and edge-disjoint to the other cycles in D (D , resp.), any basic cycle in D (D , resp.) can be generated by {C 1 , . . . , C k−1 } ({C 1 , . . . , C k−1 }, resp.). By Lemma 16 and the fact (h(C 1 ), . . . , h(C k−1 )) = (h(C 1 ), . . . , h(C k−1 )), one can deduce that all corresponding basic cycles in D and D have the same value. By Lemma 22, c j = c j for any j, which implies that Φ(D , λ) = Φ(D , λ).
In what follows, we characterize bicyclic ODHS graphs. By Lemma 23, the question can be reduced to determine which theta-type graphs are ODHS.
Lemma 24. Let G be a theta-type bicyclic graph and let D and D be two mixed graphs with underlying graph G. Then D is cospectral to D if and only if where v is one of the common vertices of all cycles in G, and C v (C v , resp.) is the set of basic cycles in D (D , resp.) containing v.
Proof. By Theorem 2, we have Note that G − v is a forest. By Theorem 11, all mixed forests with the same underlying graph are switching equivalent, and therefore have the same spectrum. Thus we have This completes the proof.
Theorem 25. A bicyclic graph G is ODHS if and only if its kernel is θ(l 1 , l 2 , l 3 ) for some positive integers l 1 , l 2 , l 3 satisfying one of the following conditions: (1) l 1 , l 2 , l 3 are mutually distinct.
(2) If exactly two of l 1 , l 2 , l 3 are equal (that is, there are exactly two cycles having the same length, say C 1 and Proof. By Lemma 23, every bicyclic ODHS graph G must contain a theta graph as its kernel, say θ(l 1 , l 2 , l 3 ). Denote C = {C 1 , C 2 } to be a strong cycle basis of G and denote the third cycle of G by C 3 .
Without loss of generality, we assume that the directions of C 1 , C 2 , C 3 are coincident and C 1 C 2 C 3 , where C j is the length of C j for 1 j 3. It follows from Lemma 16 that the value of C 3 is the product of C 1 's and C 2 's for any mixed graph in D(G). Let D and D be two mixed graphs in D(G). Applying Lemma 24, we have the following Claims. We only prove one of them as their proofs are similar. Since the directions of C 1 , C 2 , C 3 are coincident, it follows from Lemma 16 that h(C 3 ) = −1 and h(C 3 ) = −1. Using Lemma 24 and assuming that v is one of the common vertices of C 1 , C 2 and C 3 , D is cospectral to D if and only if Noting that all mixed forests with the same underlying graph have the same characteristic polynomial which is the characteristic polynomial of their underlying graph, we have . This proves Claim 1.
To prove the necessity, it is enough to show that for any graph G not satisfying the conditions (1), (2) and (3), there exist two mixed graphs D and D in D(G) which are not switching equivalent, but cospectral. In fact, the Claims 1-4 imply the necessity.
To prove the sufficiency, denote Φ(D , λ) = n j=0 c j λ n−j (Φ(D , λ) = n j=0 c j λ n−j , resp.) to be the characteristic polynomial of D (D , resp.). Obviously, it is sufficient to prove that for any mixed graphs D and D with the same underlying graph G satisfying one of the conditions (1), (2) and (3), if s(D ) and s(D ) are not conjugate equivalent, then D and D are not cospectral, that is, c j = c j for some j (1 j n). Thus, we may assume that s(D ) or s(D ) contains at least one real component. We divide the remaining proof into three cases according to the conditions of the theorem.
Case 1: l 1 , l 2 , l 3 are mutually distinct. We can assume that j (1 j 2) is the first index such that one of h(C j ) and h(C j ) is real and h(C j ) = h(C j ). By Lemma 22, c C j = c C j , as required.
Case 2: Exactly two of l 1 , l 2 , l 3 are equal.
We can assume that C 1 = C  The problem which k-cyclic graphs with k 3 are ODHS is open. In the rest of paper, we construct an infinite family of k-cyclic ODHS graphs. They can achieve the upper bound in Theorem 19.
Let G(l 0 , l 1 , . . . , l k ) be a graph with two given vertices u, v and k+1 paths joining them, say P 0 , P 1 , . . . P k , where P i has length l i for all i (0 i k), satisfying C ij < C i j if and only if i < i , or i = i , j < j , where C ij is a cycle with length C ij consisting of P i and P j (0 i < j k). See Figure 4. It is easy to see that {C 01 , . . . , C 0k } is a strong cycle basis of G(l 0 , l 1 , . . . , l k ) as C ij = C 0i ⊕ s C 0j for all 1 i < j k. We suppose that the directions of any cycles in G(l 0 , l 1 , . . . , l k ) are clockwise. Thus C 0i , C 0j and C ij are coincident for all 1 i < j k.
Let D and D be two mixed graphs with underlying graph G(l 0 , l 1 , . . . , l k ). In order to prove that G(l 0 , l 1 , . . . , l k ) is ODHS, it is sufficient to prove that if s(D ) and s(D ) are not conjugate equivalent, then D and D are not cospectral.
We first assume that for any j (1 j k), either h(C 0j ) = h(C 0j ) or h(C 0j ) = h(C 0j ) ∈ {±i}. If not, there is some p such that h(C 0p ) = h(C 0p ) and one of h(C 0p ) and h(C 0p ) is real. Suppose that p is the first index satisfying the condition. This implies that either h(C 0j ) = h(C 0j ) or h(C 0j ) = h(C 0j ) ∈ {±i} for any j (1 j p − 1). It follows from Lemma 22 that c j = c j for 0 j < l 0 + l p and c l 0 +lp = c l 0 +lp , we are done.
Since s(D ) = s(D ) and s(D ) = s(D ), we may suppose that p is the first index such that h(C 0p ) = h(C 0p ) and q is the first index such that h(C 0q ) = h(C 0q ). By the assumption mentioned above, h(C 0p ) = h(C 0p ) ∈ {±i} and h(C 0q ) = h(C 0q ) ∈ {i, −i}. One can conclude that the corresponding basic cycles with length less than l p +l q in D and D have the same value. By Lemma 22, c i = c i for 1 i < l p + l q and c lp+lq = c lp+lq .
Corollary 27. There are infinitely many k-cyclic ODHS graphs for any k 2.