Enumeration of Perfect Matchings of the Cartesian Products of Graphs

. Abstract A subgraph H of a graph G is nice if G − V ( H ) has a perfect matching. An even cycle C in an oriented graph is oddly oriented if for either choice of direction of traversal around C , the number of edges of C directed along the traversal is odd. An orientation D of a graph G with an even number of vertices is Pfaﬃan if every nice cycle of G is oddly oriented in D . Let P n denote a path on n vertices. The Pfaﬃan graph G × P 2 n was determined by Lu and Zhang [The Pfaﬃan property of Cartesian products of graphs, J. Comb. Optim. 27 (2014) 530–540]. In this paper, we characterize the Pfaﬃan graph G × P 2 n +1 with respect to the forbidden subgraphs of G . We ﬁrst give suﬃcient and necessary conditions under which G × P 2 n +1 ( n (cid:62) 2) is Pfaﬃan. Then we characterize the Pfaﬃan graph G × P 3 when G is a bipartite graph, and we generalize this result to the the case G contains exactly one odd

cycle. Following these results, we enumerate the number of perfect matchings of the Pfaffian graph G × P n in terms of the eigenvalues of the orientation graph of G, and we also count perfect matchings of some Pfaffian graph G × P n by the eigenvalues of G.

Introduction
The graphs considered in this paper are finite and simple unless otherwise indicated. For terminology and notation not defined here, we refer the reader to [24]. Let V (G) and E(G) denote the set of vertices and edges of a graph G. The degree of a vertex v, denoted by d(v), is the number of edges incident with v. An n-multiple edge consists of n edges with the same pair of ends. A perfect matching of G is a set of independent edges covering all the vertices of G. The number of perfect matchings of G is denoted by Φ(G). Let H be a subgraph of G and let G − V (H) denote the subgraph obtained from G by deleting the vertices of H and the edges that are incident with the vertices in V (H). A subgraph H of G is nice (or central ) if G−V (H) has a perfect matching. A cycle in a graph contains at least three vertices. An even cycle (resp. odd cycle) is a cycle on an even (resp. odd) number of vertices. An even cycle C in an oriented graph is oddly oriented if for either choice of the direction of traversal around C, the number of edges of C directed in the direction of traversal is odd. An orientation of a graph G is an assignment of directions to each edge of G. Suppose that G is a graph with an even number of vertices. Then an orientation D of G is a Pfaffian orientation if every nice cycle C of G is oddly oriented in D. A graph G is said to be Pfaffian if it admits a Pfaffian orientation. Let G and H be two graphs with V (G) = {u 1 [5,6,21]. The perfect matchings of a chemical graph correspond to "Kekulé structures" in quantum Chemistry and corresponds to "close-packed dimers" in statistical physics, and the more perfect matchings a polyhex graph possesses the more stable is the corresponding benzenoid molecule. The number of perfect matchings is an important topological index for estimation of total π-electron energy and resonant energy. Valiant [23] proved that counting the number of the perfect matchings in a general graph is #P-complete. The significance of Pfaffian orientations is that if a graph G has a Pfaffian orientation, the number of perfect matchings of G can be evaluated by the determinant, and it can be counted in polynomial time.
Theorem 1 ( [8,12]). Let G σ be a Pfaffian orientation of a graph G. Then where A(G σ ) is the skew-adjacency matrix of G σ .
The following is a classical theorem given by Kasteleyn [8].
Little [11] characterized the bipartite graph that is Pfaffian in terms of forbidden subgraphs.
Theorem 3 (Little [11]). A bipartite graph is Pfaffian if and only if it contains no even subdivision of K 3,3 as its nice subgraph.
Robertson et al. [20] and McCuaig [19] independently gave polynomial-time algorithms to determine whether a given bipartite graph has a Pfaffian orientation. However, for non-bipartite graphs, there is no efficient way to identify if it is Pfaffian. For other investigations on Pfaffian graphs, see [3,18,22]. With the help of Pfaffian graphs, many dimer statistics of lattices have been solved [2,14,15,16,17,25,26,27]. For example, the quadratic lattice [5,7], 8.8.4 lattice [27] and hexagonal lattice [9,27]. Kasteleyn [7] and independently Fisher [5] had discussed the number of perfect matchings of the quadrilateral lattice on the plane and deduced an explicit expression. In the following, we use P n to denote a path on n vertices. Theorem 4 ( [7]). The number of perfect matchings of a plane quadrilateral lattice P m ×P n is Φ(P m × P n ) = As a generalization of this result, Yan and Zhang in 2004 [25] considered the enumeration of perfect matchings of G × P 2 , and they express the number of perfect matchings in terms of the eigenvalues of G. Here, the eigenvalues of the adjacency matrix of G is termed as the eigenvalues of G.
In 2006 Yan and Zhang [26] derived the expression of counting perfect matchings of the graphs T × P 3 and T × P 4 (T is a tree) with respect to all the non-negative eigenvalues of T . There is a natural question "for some families of graphs G, can we enumerate the number of perfect matchings of G × P n by the eigenvalues of G?" The answer is "yes". We will prove the following result. where the first product ranges over all the positive eigenvalues α of G, and m α is the multiplicity of the eigenvalue α.
Except representing the number of perfect matchings in terms of the eigenvalues of an undirected graph, Yan et.al [26] considered enumerating the number of perfect matchings of G × P 2 by the eigenvalues of an orientation graph (The eigenvalues of an orientation graph G σ is the eigenvalues of the skew-adjacency matrix of G σ ). Theorem 7 ([26]). Let G be a graph contains no subgraph which is, after contracting at most one cycle of odd length, an even subdivision of K 2,3 . Let G σ be an orientation of G such that all the cycles are oddly oriented. Then where the product ranges over all the non-negative imaginary part eigenvalues λ of the skew-adjacency matrix of G σ .
Following this research, Lin and Zhang [10] paid attention to the Cartesian product of a non-bipartite graph and a path.
Theorem 8 ( [10]). Let G be a non-bipartite graph with a unique cycle, and G σ an arbitrary orientation of G. Then Moreover, if G has a perfect matching, then where the products range over all the non-negative imaginary part eigenvalues λ of the skew-adjacency matrix of G σ .
Lu and Zhang [13] have established the Pfaffian property of G × P 2n with respect to the excluded subgraphs of G (see Theorem 9). In this paper, we aim first to characterize the Pfaffian graph G × P 2n+1 in terms of the forbidden subgraph of G. Based on these characterizations, we generalize the results in Theorems 1.7 and 1.8. We expresses the number of perfect matchings of the Pfaffian graph G × P n in terms of the eigenvalues of an orientation of G. The result is exhibited in Theorem 38.
The rest of the paper is organized as follows. In Section 2, we characterize the Pfaffian graph G × P 2n+1 (n 2) by the excluded subgraphs of G. In Section 3, we provide a necessary condition for the Pfaffian graph G × P 3 . In Section 4,we establish the characterization of the Pfaffian graph G × P 3 for the case G is bipartite, and generalize this result to the case that G is a non-bipartite graph with exactly one odd cycle. According to these characterizations of Pfaffian graph G × P n , Section 5 shows that the number of perfect matchings of the Pfaffian graph G × P n can be evaluated by the eigenvalues of some orientation graph of G. Moreover, for some bipartite graph G, the enumeration of perfect matchings of G × P n can be estimated by the eigenvalues of G.
the electronic journal of combinatorics 30(2) (2023), #P2.2 2 A characterization of Pfaffian graph G × P 2n+1 with n 2 Lu and Zhang [13] characterized the Pfaffian property of Cartesian products G × P 2n in terms of forbidden subgraphs (see Theorem 9). In this section we will determine the Pfaffian graphs G×P 5 and G×P 2n+1 (n 3) by the forbidden subgraphs of G, respectively. We begin with some definitions and terminology.
The Y-tree is a graph obtained from K 1,3 by connecting a vertex not in K 1,3 to a vertex of degree one in K 1,3 . The Q-graph is obtained from the cycle C 4 by connecting a vertex not in C 4 to a vertex of degree two in C 4 .
Theorem 9 (Lu et al. [13]). Let G be a connected graph. Then (1) G × P 2 is Pfaffian if and only if G contains no subgraph which is, after contracting at most one cycle of odd length, an even subdivision of K 2,3 ; (2) G × P 4 is Pfaffian if and only if G contains neither an even subdivision of Q-graph nor two edge-disjoint odd cycles as its subgraph; (3) G × P 2n (n 3) is Pfaffian if and only if G contains no Y-tree as its subgraph.
Let H Y denote the graph obtained from K 1,3 by attaching two appending edges to two vertices of degree one in K 1,3 , respectively. See Figure 1(a).
Before presenting the main theorem of this section, we prove first the following lemma.
Lemma 10. The graph H Y × P 5 is not Pfaffian.
Proof. As shown in Figure 1 Since H Y ×P 5 −H has a perfect matching, H Y ×P 5 contains an even subdivision of K 3,3 as a nice subgraph and hence it is not Pfaffian by Theorem 3.
For any graph G, the graph G × P 2n has perfect matchings whenever G has perfect matchings or not. Moreover, for any subgraph H of G, the graph H × P 2n is a nice subgraph of G × P 2n . These two properties do not hold for the graph G × P 2n+1 . Thus when we try to characterize the Pfaffian graph G × P 2n+1 , we suppose that G has at least one perfect matching.
In the following paragraphs, an odd path (resp. even path) is a path on an odd (resp. even) number of vertices.
Theorem 11. Let G be a connected graph with a perfect matching. Then G × P 5 is Pfaffian if and only if G contains neither an H Y as its nice subgraph nor edge-disjoint odd cycles as its subgraph.
Proof. Suppose that G × P 5 is Pfaffian. Assume, to the contrary, that G contains H Y as its nice subgraph. Then G × P 5 contains a nice subgraph H Y × P 5 which is not Pfaffian by Lemma 10 and so G × P 5 is not Pfaffian, a contradiction. If G contains edge-disjoint odd cycles as its subgraph, then G × P 4 is not Pfaffian by Theorem 9. Since G is a graph with a perfect matching, G × P 4 is a nice subgraph of G × P 5 . It follows that G × P 5 is not Pfaffian. This is a contradiction. Therefore, if G × P 5 is Pfaffian, then G contains neither H Y as its nice subgraph nor edge-disjoint odd cycles as its subgraph. Now we prove the sufficiency. We first consider the case that |V (G)| 4. In this case, G contains no Y -tree as its subgraph. Then G × P 6 is Pfaffian by Theorem 9. It follows that there is a Pfaffian orientation of G×P 6 under which each nice cycle is oddly oriented. Since G has a perfect matching, each nice cycle in G × P 5 is a nice cycle of G × P 6 . Hence we can obtain a Pfaffian orientation of G × P 5 from a Pfaffian orientation of G × P 6 .
Consider the case that |V (G)| 6. If the degree of each vertex in G is at most two, G contains no Y -tree as its subgraph. Then the same analysis as above leads to that G × P 5 is Pfaffian.
It remains to consider the case that |V (G)| 6 and G contains at least one vertex whose degree is lager than two. Let v be such a vertex. Since G has a perfect matching, let M be a prefect matching of G and denote one edge incident with v belonging to M by vx. There exist at least two edges incident with v that are not in M , denoted by vu and vw. If the edge uw does not exist or it exists but is not in M , there exists another two vertices u 1 and w 1 such that the edges u 1 u and w 1 w lie in M . However, the subgraph induced by {vx, vu, vw, u 1 u, w 1 w} is H Y and it is a nice subgraph of G, a contradiction. Hence the edge uw exists and lies in M .
We assert that all the neighbours of u, v and w belong to {u, v, w, x}. If u has another neighbours except v, w and x, let u 2 be such a neighbour of u. The edge uu 2 does not lie in M and then there exists a vertex u 3 such that u 2 u 3 lies in M . The subgraph induced by {uw, uv, vx, uu 2 , u 2 u 3 } is H Y and is a nice subgraph of G, a contradiction. Hence u does not have another neighbours except v, w and x. Likely we can also deduce that w does not have another neighbours except u, v and x. If v has another neighbours except u, w and x, suppose that one of the neighbours except u, w and x is v 1 and then vv 1 does not lies in M . It follows that there exists another vertex v 2 such that v 1 v 2 lie in M . The subgraph induced by {vx, vv 1 , v 1 v 2 , vu, uw} is H Y and is a nice subgraph of G, a contradiction. Hence all the neighbours of v lie in {u, v, w, x} and the assertion holds.
If the edge ux exists in G, x can not be adjacent to other vertices except v, u, w. If not, assume that there exists another vertex x 1 that is adjacent to x. The edge xx 1 does not lie in M and then there is a vertex x 2 such that x 1 x 2 lies in M . The subgraph induced by {vx, xx 1 , x 1 x 2 , xu, uw} is H Y and it is a nice subgraph of G, a contradiction. Then it follows that in this case V (G) = {v, x, u, w}. This is impossible since |V (G)| 6. Hence the edge ux does not exist in G. Likewise, we can deduce that w is not adjacent to x. By the above, we can deduce that v is the only vertex whose degree is larger than two in {u, v, w, x}. From the analysis above, we can conclude the following result. For any vertex in G, if the degree of this vertex is at least three, then we can show that its degree is exactly three and we can find a triangle that contains this vertex. Note that G contains no edge-disjoint odd cycle as its subgraph. Hence the degree of each vertex of G except v is at most two. Besides, the subgraph G − {v, u, w} is a path of even length with one end-vertex x, since G has a perfect matching. In other word, G consists of one triangle and a path of odd length. In the following, we will prove that G × P 5 is Pfaffian.
We first give an orientation of G×P 5 . Suppose that V (G) = {u, w, v, x 1 , . . . , x 2m+1 } and E(G) = {uw, vu, vw, vx 1 , x 1 x 2 , . . . , x 2m x 2m+1 }. The graph G × P 5 contains five copies of G, denoted by G 1 , G 2 , G 3 , G 4 and G 5 , respectively. Denote the edge set It is a perfect matching of G × P 5 . Let D 1 be any orientation of G 1 and orient G × P 5 in such way: G 1 is oriented as D 1 ; the directions of edges in G 3 and G 5 are the same as the corresponding edges in G 1 and the directions of edges in G 2 and G 4 are opposite to the corresponding edges in G 1 ; for j = 1, 2, 3, 4, the edges belonging to E P are all directed from G j to G j+1 . Denote this orientation by D. We will prove that each M -alternating cycles of G × P 5 is oddly oriented in D. Figure 2 shows the orientation D and the perfect matching M of G × P 5 when m = 1.
Choose an M -alternating cycle C of G×P 5 . If C contains an edge from E(G 2 ) denoted by e 2 = s 2 t 2 , it must contain two edges s 2 s 3 and t 2 t 3 . If C contains the edge s 3 t 3 , C is s 2 t 2 t 3 s 3 s 2 and it is oddly oriented clearly. If C does not contain the edge s 3 t 3 , replace the path s 3 s 2 t 2 t 3 in C by the edge s 3 t 3 and then we obtain a new cycle. (This is the replacement operation.) According to the orientation of G × P 5 , this new cycle is oddly oriented if and only if C is oddly oriented. Likely if C contains an edge in G 4 , take the same operation as above. After replacing all such paths in C, we obtain a new cycle, denoted by C 1 . We can see that C 1 contains no edge in E(G 2 ) or E(G 4 ). Further, C 1 is oddly oriented if and only if C is oddly oriented. Hence, we need to show that C 1 is oddly oriented.
Firstly, we travel along the cycle C 1 and color the edge of C 1 along this travelling by red and color the edges opposite this transversal by blue. Secondly, we contract the edges of G × P 5 , which belongs to E P and the resulting multigraph is denoted by G * . (This is the contraction operation.) After this contraction operation, the cycle C 1 is turned into a closed trial T r . Each edge in T r receive the same color and the same direction as the corresponding edge in C 1 . Note that G * can also be obtained from G by replacing each edge in G by a 5-multiple edge. Hence, we suppose that V (G * ) = V (G) and then V (T r ) ⊂ V (G). It is easy to deduce that the cycle C is oddly oriented if and only if the number of red edges and the number of blue edges in T r are both odd.
To prove this, we show first that T r only consists of 2-multiple edges. Since T r is a closed trail, the degree of each vertex in T r is even. Since C is an even cycle, T r contains of an even number of edges (a k-multiple edge contains k edges). Since C 1 contains no edges in G 2 and G 4 , T r only contains single edges, 2-multiple edges or 3-multiple edges. Let i be the maximum number such that x i ∈ V (T r ). Since the degree of x i is even in T r , x i−1 x i is a 2-multiple edge in T r . Note that x 0 = v. Since the degree of x i−1 is even, x i−2 x i−1 is a 2-multiple edge or does not exist in T r . Likely, we can deduce that for any k ∈ [1, i − 1], x k x k+1 can not be a 3-multiple edge. Therefore only uw, vw, uv could be 3-multiple edges. No matter which edge is a 3-multiple edge, we can deduce that each of the other two edges is a single or 3-multiple edge since the degrees of u, v and w are even. Then it follows that the number of edges in T r is odd, a contradiction. Hence uw, vw and uv can not be 3-multiple edges. Likely, we can also deduce that these three edges can not be single edge. Each of them is a 2-multiple edge or does not exist in T r . Hence T r only consists of 2-multiple edges. Now we consider the following two cases that uv and wv lie in T r or not. Firstly we consider the case that at least one of uv and wv does not lie in E(T r ). Without loss of generality, we assume that uv / ∈ E(T r ). Then the cycle C is an M −alternating cycle in (G − uv) × P 5 whether wv lies in E(T r ) or not. Note that G − uv is a path. By the choice of M , we know that the edges in T r (omitting the multiple edges) is corresponding to a path of odd length in G. When travel along the closed trail T r , the two edges in each 2-multiple edge of T r have different directions and so have different colors. Hence the number of red edges and blue edges in T r are both odd and then C is oddly oriented.
Next we consider the case that both uv and wv lie in T r . Let d Tr (v) be the number of multiple edges incident to v in the closed trail T r . We show that d Tr (v) = 6. If d Tr (v) = 4, the cycle C does not contain the edge v 1 x 1 1 since uv and wv are 2-multiple edges. As C is an M -alternating cycle, it contains neither u 1 v 1 nor w 1 v 1 . However, the subgraph of G × P 5 induced by {u i , w i , v i : i = 2, 3, 4, 5} can not contribute to M -alternating cycles such that the contraction of E P leads to T r . Hence the degree of v is six and C must contain the edge v 1 x 1 1 . In the following, we show that C must contain the edge v 1 u 1 or v 1 w 1 . Suppose to the contrary that C contains none of v 1 u 1 and v 1 w 1 . Then C contains the edge v 1 v 2 , and so C contains the path In this case, the edges v 1 w 1 , v 2 w 2 , v 3 w 3 , v 4 w 4 can not be in E(C) and then vw is a single edge in T r , a contradiction. So we suppose that C contains the edge v 3 u 3 . Then the edges v 1 w 1 , v 2 w 2 , v 3 w 3 can not be in E(C). If not, the cycle C can not exit. Since vw is a 2-multiple edge in T r , C must contain the edges v 4 w 4 and v 5 w 5 . In this case C must contain the edges v 4 v 5 and w 4 w 5 . Then C contains a cycle v 4 w 4 w 5 v 5 v 4 and the path x 1 1 v 1 v 2 v 3 u 3 as two components. Clearly, this is impossible since C is a cycle. Thus, C can not contain v 3 u 3 . Likely we can deduce that C can not contain the edge v 3 w 3 . Now we remains to consider the case that C contains the edge v 3 x 3 1 . In this case, C can not contain the edges v 1 w 1 , v 2 w 2 and v 3 w 3 , since we can deduce a contradiction in a similar approach as above. Hence C must contain one of the edges v 1 u 1 and v 1 w 1 .
Without loss of generality, suppose that C contains the edge v 1 u 1 . By the choice of M , C contains the path v 1 u 1 w 1 w 2 w 3 . We shall determine which vertex is the other neighbour of w 3 in C. If C contains the edge w 3 w 4 , then C contains the path v 1 u 1 w 1 w 2 w 3 w 4 w 5 . It follows that the edges v 1 w 1 , v 2 w 2 , v 3 w 3 and v 4 w 4 can not be in C. Then vw can not be a 2-multiple edge in T r . This is a contradiction. If C contains the edge w 3 u 3 , it must contain the path w 3 u 3 u 2 v 2 v 3 . Then the edges v 1 w 1 , v 2 w 2 and v 3 w 3 can not be in C. Since vw is a 2-multiple edge in T r , we can deduce that C contains the cycle v 4 w 4 w 5 v 5 v 4 and a path as two componnets and likely we get a contradiction. Hence C can not contain the edge w 3 u 3 . It follows that the other neighbour of w 3 is v 3 and then C contains the path In this case, the other path in C from v 1 to v 2 can not contain any copies of u, v and w except v 1 and v 2 . Then uv and vw are both single edges in T r , a contradiction. Hence C must contain the edge v 2 u 2 and then it contains the path v 1 u 1 w 1 w 2 w 3 v 3 v 2 u 2 u 3 u 4 u 5 . Since uw is a 2-multiple edge in T r , C must contain the edge u 5 w 5 and then C contains the path We can find that no matter which orientation of G is, the numbers of edges of P 1 in two different directions when traveling along C are both even.
We now consider the other path P 2 from v 1 to v 5 in C. Obviously P 2 is an Malternating path. After the replacement and the contraction operation, P 2 is transformed into a subgraph T * r of T r . In the following, we will show that the subgraph T * r consists of an odd number of 2-multiple edges. Firstly, we shall find a subpath P 2 of P 2 such that after the replacement and contraction operations, P 2 is transformed into an odd path without multiple edges and one of its end is v 1 .
Suppose that k is the maximum subscript of all the vertices in V (P 2 ). Search the vertices along P 2 from v 1 to v 5 and denote the first vertex whose subscript is k by x j k . We shall prove that j = 1 or j = 2. If not, we assume that j = 3, 4 or 5. If j = 3, since x j k is the first vertex whose subscript is k, C must contain the edge Then the other neighbour of x 3 k must be x 2 k and so C contains the path From the structure of G × P 5 , we can see that P 2 can not contain a path from x 1 k−1 to v 5 , which is disjoint from Q 1 . This is a contradiction. Hence j = 3. If j = 4, C must contain the edge x 4 k−1 x 4 k . By the choice of M , C contains the path can not be in C and then there exists no path from x 5 k to v 5 . Hence j = 4. If j = 5, C contains the edge x 5 k−1 x 5 k and x 5 k x 4 k . Note that P 2 contains a subpath from v 1 to x 4 k via x 5 k . In this case, P 2 contains no subpath from x 4 k to v 5 , which is disjoint from Q 2 . Hence j = 5. Therefore, we can deduce that j = 1 or j = 2. By the choice of M , if j = 2, P 2 contains the path k after the replacement operation. Denote the subpath of P 2 from v 1 to x j k by P 2 . By the choice of x j k , P 2 has the same vertex set with T * r after the replacement and contraction operations. To prove our assertion, we only need to prove that P 2 is transformed into an odd path without multiple edges, after the replacement and contraction operations. We first prove that the sequence of subscripts of vertices from x 1 1 to x j k in P 2 is monotone increasing. If not, search the vertices along P 2 from v 1 to x j k and denote the first vertex which has a bigger subscript than the vertex after it by x c a . Denote the vertex in P 2 after x c a by x d b . Note that two adjacent vertices in P 2 − v 1 − v 5 have the same subscripts or superscripts. Since a > b, it holds that c = d and b = a − 1. Then P 2 contains the edge x c a x c a−1 . If c = 1, P 2 contains a subpath from v 1 to x 1 a via x 2 a . In this case P 2 contains no subpath from x 1 a is the first vertex which has a bigger subscript than the vertex after it, P 2 contains the edge x 3 a−1 x 3 a . In this case It is a contradiction. If c = 3, we will consider two cases depending on which vertex lies before By the structure of the perfect matching M , we can find that P 2 contains a path Q 3 from x 3 a−1 to x j k via vertices in G 5 . In this case, P 2 contains no subpath from x j k to v 5 , which is disjoint from Q. It is a contradiction. If P 2 contains the edge x 4 a x 3 a , P 2 contains the path x 5 a x 4 a x 3 a x 3 a−1 , which is not an M -alternating path. This is a contradiction. If c = 4, P 2 contains a subpath x 5 a x 4 a x 4 a−1 x 5 a−1 . Since x 4 a is the first vertex which has a bigger subscript than the one after it, P 2 contains the edge x 5 a−1 x 5 a . In this case P 2 contains a cycle x 5 a x 4 a x 4 a−1 x 5 a−1 x 5 a , a contradiction. If c = 5, by a similar approach, we can show that P 2 contains a subpath from v 1 to x 5 a−1 via x 4 a . In this case P 2 contains no subpath from x 5 a−1 to x j k , a contradiction. In each case, we can deduce a contradiction. Hence such vertex x c a does not exist and the sequence of subscripts of vertices from x 1 1 to x j k is monotone increasing. In this case, following the replacement and contraction operations, P 2 is transformed into a path without multiple edge.
To prove that P 2 is transformed into an odd path, we prove first that there is no internal vertex of P 2 belonging to E(G 5 ). Assume, to the contrary, that x 5 s ∈ V (P 2 )∩V (G 5 ). Then P 2 contains two subpaths, one is from v 1 to x 5 s and the other is from x 5 s to x j k . In this case P 2 contains no subpath from x j k to v 5 , a contradiction. By the choice of M , we can find that there is no internal vertex of P 2 belonging to E(G 4 ) in the same approach.
For convenience, let P 0 2 denote the path obtained from P 2 after the replacement operation. Remove all the isolated vertices in P 0 2 − E P and the subgraph we obtained is denoted by H. Since the sequence of subscripts of vertices from x 1 1 to x j k is monotone increasing, all the edges in P 0 2 are single edges. After the contraction operation, all the vertices of P 0 2 are corresponding to the vertices of T * r . To show that T * r consists of an odd number of 2-multiple edges, we only need to prove that |E(H)| is odd. Since there is no internal vertex of P 2 belonging to E(G 4 ) ∪ E(G 5 ) and x j k belongs to E(G 1 ) or E(G 2 ), H consists of several paths of G 1 and G 3 . We call these paths the paths from G 1 and the paths from G 3 . By the choice of M , all paths from G 1 are of odd length. Besides, if there exists one path from G 1 except the one whose end is v 1 , there exists one odd path from G 3 . Hence the number of paths in H from G 1 except the one whose end is v 1 is equal to the number of odd paths in H from G 3 . Hence, we can deduce that |E(H)| is odd and then P 0 2 is an odd path. It follows that T * r consists of an odd number of 2-multiple edges. In T * r , the two edges in each 2-multiple edge have the same directions and then they have different colors. It follows that the number of red edges and blue edges in T * r are both odd. Therefore, the number of edges in P 2 along the travelling of C and the number of edges of P 2 opposite this travelling are both odd. Hence C is oddly oriented.
By now, we have deduced that C is oddly oriented and by the arbitrary of C we conclude that D is a Pfaffian orientation of G × P 5 .
Theorem 12. Let G be a connected graph with a perfect matching. Then G × P 2n+1 (n 3) is Pfaffian if and only if G contains no Y-tree as its subgraph.
Proof. Suppose that G × P 2n+1 is Pfaffian. If G contains a Y -tree T Y as its subgraph, then G × P 2n+1 contains T Y × P 6 as a nice subgraph. However, T Y × P 6 is not Pfaffian by Theorem 9 (3). This is a contradiction.
Conversely, if G contains no Y -tree as its subgraph and has a perfect matching, then G is a path, a cycle or |V (G) 4|. If G is a path or a cycle, G × P 2n+1 is a planar graph which is Pfaffian by Theorem 2. If |V (G) 4|, G × P 2n+2 is Pfaffian by Theorem 9 (3). Since G has a perfect matching, a nice cycle in G × P 2n+1 is also a nice cycle in G × P 2n+2 . Hence G × P 2n+1 is Pfaffian.

A necessary condition for Pfaffian graph G × P 3
For a graph G with a perfect matching, we will present a necessary condition such that G × P 3 is Pfaffian.
We exhibit four types of forbidden subgraphs of the Pfaffian graph G × P 3 . Each of these four subgraphs has one perfect matching and its maximum degree is three.
The graph F 1,1 consists of two vertex-disjoint triangles which are connected by a single edge, and each of these two triangles is incident with one appending edge as shown in Figure 3(a). For i, j ∈ {0, 2}, the graph F i,j consists of two vertex-disjoint triangles which are connected by a single edge, and one triangle is incident with i appending edges and the other triangle is incident with j appending edges (see Figure 3(b) for F 2,2 ). For l ∈ {0, 2}, the graph F 1 l,1 consists of two vertex-disjoint triangles which are connected by a path of length two, and one of these two triangles is incident with l appending edges and the other triangle is incident with one appending edge (see Figure 3(c) for F 1 2,1 ). For l ∈ {0, 2}, the graph F 2 l,1 consists of two triangles with only one common vertex, and one of these two triangles is incident with l appending edges and the other triangle is incident with one appending edge (see Figure 3 We define an even subdivision of F as the graph obtained from F by replacing each edge in the odd cycles and the path connecting the cycles by a path of odd length. Let G be a graph with a perfect matching. We say that G is an appending edge expansion of F if G is obtained from an even subdivision of F by attaching an even number of (probably zero) appending edges to each odd cycles, and make sure that each vertex of the odd cycles is incident with at most one attachment edge. Apparently, F is an appending edge expansion of itself.
Before showing the main theorem of this section, we introduce the following result given by Norine and Thomas in [18].
Theorem 13 (Norine et al. [18]). Let G be a connected Pfaffian graph and T a spanning tree of G. Let e ∈ G be an edge joining two vertices at an even distance in T. Then an arbitrary orientation of T+e can be extended to a Pfaffian orientation of G.
It is clear that if a nice subgraph H of G is not Pfaffian, then G × P 3 is not Pfaffian. Hence we intent to prove that if a graph G is an appending edge expansion of F 1,1 , F i,j , F 1 l,1 and F 2 l,1 , then G × P 3 is not Pfaffian. Lemma 14. If G is an appending edge expansion of F 1,1 , then G × P 3 is not Pfaffian.
Proof. Assume, to the contrary, that G × P 3 is Pfaffian. We first consider the case that the graph G is The labeling of vertices of G × P 3 is shown in Figure 4(a). Let T 1 be the subgraph of G induced by 1 , T 2 1 and T 3 1 denote the spanning tree of G 1 , G 2 and G 3 corresponding to T 1 , respectively. Let T be a spanning tree of G × P 3 such that T = T 1 an evenly oriented nice cycle Figure 4: Since G × P 3 is Pfaffian, a Pfaffian orientation of G × P 3 can be obtained by extending an orientation of T + v 1 1 v 1 2 by Theorem 13. The orientation of T + v 1 1 v 1 2 is shown in Figure 4(a). The direction of the remaining edges except u i 1 u i 2 (i = 1, 2, 3) can be determined by the orientation of T + v 1 1 v 1 2 according to the fact that each nice cycle is oddly oriented. Note that the cycle and u 3 1 u 3 2 can be also determined (see Figure 4(b)). However in this orientation, the nice is not oddly oriented, a contradiction. Consider the case that G is an even subdivision of F 1,1 . Each edge of G is replaced by a path of odd length. Especially, suppose that the edge v 1 v 2 is replaced by the path v 1 s 1 · · · s 2m v 2 and the edge u 1 u 2 is replaced by the path u 1 t 1 · · · t 2n u 2 . Considering T 1 in the former case, the even subdivision of T 1 together with two paths s 1 · · · s 2m v 2 and t 1 · · · t 2n u 2 is a spanning tree of G in the current case. For convenience, we still denote this spanning tree by T 1 . Denote the spanning tree corresponding to T 1 in G 1 , G 2 and G 3 by T 1 1 , T 2 1 and T 3 1 , respectively. Denote a spanning tree of G × P 3 by T such that in such a way: for each path replacing an edge of T + v 1 1 v 1 2 in the former case, all the edges on this path have the same direction as the edge which have been replaced; and the direction of edges which have not been replaced stay the same. Since each cycle of length four which does not belong to G 1 , G 2 and G 3 is a nice cycle of G × P 3 and oddly oriented, the direction of all edges except u i 1 t i 1 (i = 1, 2, 3) can be determined. Note that the even subdivisions of the cycles C and C in the former case are still nice cycles of G × P 3 in the current case. Hence we can determine the directions of the edges u i 1 t i 1 (i = 1, 2, 3) and then we can find an evenly oriented cycle similarly as before. This is a contradiction.
If G is an appending edge expansion of F 1,1 and contains at least two new appending edges, then the even subdivisions of C and C in the first case are still nice cycles in the current case. Likely we can deduce a contradiction.
In each case we can deduce a contradiction and hence G × P 3 is not Pfaffian.
an evenly oriented nice cycle Figure 5: In the proofs of the following lemmas, we consider the case that G is a graph in the For the case of appending edge expansion graph, the proofs are similar as the proof in Lemma 14, and so we omit the proofs of appending edge expansion of these graphs in the following lemmas.
Proof. Assume, to the contrary, that G × P 3 is Pfaffian. We first consider the case that Figure  5 and v 3 1 v 3 2 can be determined. Now we consider the orientations of u i Figure 5(a)). Hence, the direction of u 1 1 u 1 2 is from u 1 1 to u 1 2 . However, the nice cycle v 1 is not oddly oriented in this case (see Figure 5 Figure 6. A Pfaffian orientation of F 2,0 × P 3 can be constructed. The edges except u i 1 u i 2 (i = 1, 2, 3) can be determined by an orientation of T + v 1 1 v 1 2 . The direction of u 1 1 u 1 2 can be determined by the nice Similarly, the direction of all the other edges can be determined (see Figure 6(a)). However, the nice cycle is not oddly oriented (see Figure 6(b)), a contradiction. Hence F 2,0 × P 3 is not Pfaffian.
If G is F 2,2 , similarly we can find a spanning tree of F 2,2 × P 3 . By the orientation of this spanning tree with an edge joining two vertices at an even distance, we can determine the direction of all the edges except u i 1 u i 2 (i = 1, 2, 3). The direction of u 1 1 u 1 2 can be determined by the nice cycle v 1 an evenly oriented nice cycle Figure 6:  The orientation of F 2,2 × P 3 is shown in Figure 7(a). By Theorem 13, such an orientation is a Pfaffian orientation. However, the nice cycle v 1 Figure 7(b)) in this case, a contradiction. Hence F 2,2 × P 3 is not Pfaffian.
Lemma 16. If G is an appending edge expansion of F 1 0,1 or F 1 2,1 , then G × P 3 is not Pfaffian.
Proof. Assume, to the contrary, that G×P 3 is Pfaffian. We first consider the case that G is Figure 8. Theorem 13 implies that the direction of all the edges except u i 1 u i 2 (i = 1, 2, 3) can be determined according to an orientation of T + v 1 1 v 1 2 by Theorem 13. The direction of u 1 1 u 1 2 can be determined since the an evenly oriented nice cycle Figure 8: is shown in Figure 8(a). However, the nice cycle v 1 is not oddly oriented (see Figure 8(b)), a contradiction.
If G is F 1 2,1 , denote the two appending edges of F 1 2,1 by u 1 u a and u 2 u b . Similarly, we can find a spanning tree of F 1 2,1 × P 3 . Let T be a spanning tree with Figure 9(a)). However, the nice cycle v 1 is not oddly oriented (see Figure 9(b)). A contradiction occurs.
Lemma 17. If G is an appending edge expansion of F 2 0,1 or F 2 2,1 , then G × P 3 is not Pfaffian.
Proof. Assume, to the contrary, that G×P 3 is Pfaffian.
: i = 1, 2, j = 0, 1, 2, k = 1, 2}. From a spanning tree T of F 2 0,1 × P 3 , an edge joining two vertices at an even distance of T and the nice cycle v 1 Figure 10(a)), we can orient the edges of F 2 0,1 × P 3 such that it is a Pfaffian orientation by Theorem 13. However, the nice cycle v 1 is not oddly oriented in this orientation (see Figure 10(b)), a contradiction. Hence F 2 0,1 × P 3 is not Pfaffian. If G is F 2 2,1 , denote the two appending edges of F 2 2,1 by u 1 u a and u 2 u b . Then we can find a Pfaffian orientation of F 2 2,1 × P 3 by Theorem 13. The direction of all the edges except u i 1 u i 2 (i = 1, 2, 3) can be determined by an orientation of a spanning tree of F 2 2,1 × P 3 and an extra edge v 1 Figure 11(a)). In this orientation, the nice cycle v 1 is not oddly oriented (see Figure 11(b)). It is a contradiction. Hence F 1 1,2 × P 3 is not Pfaffian.  : an evenly oriented nice cycle Figure 10: F 2 0,1 × P 3 .
By the above lemmas, it is easy to deduce our main result of this section.

A characterization of some Pfaffian graph G × P 3
In this section, we first characterize the Pfaffian graph G × P 3 when G is a bipartite graph in terms of the forbidden subgraphs of G. Based on this, we will determine the Pfaffian graph G×P 3 when G is a non-bipartite graph with exactly one odd cycle. Firstly, we exhibit the structure of the forbidden subgraphs of the bipartite graph G such that G × P 3 is Pfaffian.
The graph H m,n consists of an even cycle C m and n appending edges (n is even and 0 n m − 2) such that each vertex of C m is incident with at most one appending edge   and the ends of all the appending edges separate C m into odd paths. Obviously, the graph H m,n admits a perfect matching (see Figure 12(a)). The graph K + 2,3 is obtained from an even subdivision of K 2,3 by attaching an appending edge to each vertex (see Figure 12(b)).
For a bipartite graph G, we characterize the Pfaffian graph G × P 3 as follows.
Theorem 19. Let G be a connected bipartite graph with a perfect matching. The graph G × P 3 is Pfaffian if and only if G contains no H m,n or K + 2,3 as its nice subgraph. To prove Theorem 19, we need the following four lemmas. Lemma 20. Neither H m,n × P 3 nor K + 2,3 × P 3 is Pfaffian. Proof. The graph H m,n × P 3 is a bipartite graph. We first prove that H 4,2 × P 3 is not Figure 13). The subgraph F of H 4,2 × P 3 induced by {v 1 2 a is an even subdivison of K 3,3 . Since H 4,2 × P 3 − F has a perfect matching, F is a nice subgraph of H 4,2 × P 3 . Therefore, H 4,2 × P 3 contains an even subdivision of K 3,3 as a nice subgraph and it is not Pfaffian by Theorem 3. Figure 13: H 4,2 × P 3 . Now we show that H m,n × P 3 is not Pfaffian when m > 4 and n 2. In this case, H m,n can be obtained from an even subdivision of H 4,2 by attaching n − 2 appending edges. Since n m − 2 and H m,n has a perfect matching, there exist two adjacent vertices in V (C m ), denoted by v a and v b , such that these two vertices are not incident with any appending edges. Among all the ends of appending edges belonging to V (C m ), denote the one closest to v a by v 1 and the one closest to v b by v 2 , respectively. Following this labeling of vertices, we can find an even subdivision of F in H m,n × P 3 , which is also an even subdivision of K 3,3 and it is a nice subgraph of H m,n × P 3 . Hence H m,n × P 3 contains an even subdivision of K 3,3 as its nice subgraph and it is not Pfaffian.
For a cycle C of a graph G, a chord of C is an edge e in G such that the end-vertices of e are on C but the edge e is not on C.
Lemma 21. Let G be a bipartite graph with a perfect matching and without H m,n and K + 2,3 as its nice subgraphs. Then for any perfect matching M of G, each cycle of G is an M -alternating cycle or contains no edge in M .
Proof. Assume, to the contrary, that there is a cycle C in G, which is not M -alternating and contains some edges in M . Let E denote a set of edges of E(G) − E(C ) such that every edge in E is in M and has at least one end in V (C ). Let H be the subgraph of G induced by E(C ) ∪ E . Clearly, the graph H is a nice subgraph of G. We say that two chords of C cross each other if their ends alternate on C. We first show that if some chords of C are in H, then each of these chords does not cross others. If not, suppose that there are two chords crossing each other, denoted by e 1 = v 1 v 1 and e 2 = v 2 v 2 . Let P 1 and P 1 be the two paths of C − v 1 − v 1 and let P 2 and P 2 be the two paths of C − v 2 − v 2 . Since e 1 crosses e 2 , one of v 2 and v 2 lies in P 1 and the other lies in P 1 . Suppose that v 2 lies in P 1 and v 2 lies in P 1 . See Figure 14. If C contains some chords crossing e 2 whose ends lie in P 1 , among these chords choose one such that the distance between one of its ends and v 2 is smallest and denote this chord by e 3 = v 3 v 3 . The edge e 3 could be e 1 exactly. Then there are two paths in Figure 14: The cycle C and its chords. one containing v 2 by P 3 . The subgraph induced by the cycle P 3 + e 3 together with the edges in E that have exactly one end lies in P 3 is a graph H m,n , a contradiction. Hence, C contains no chords crossing e 2 whose ends lie in P 1 . Now we show that the number of chords of C is at most one. Suppose to the contrary that there exist n chords of C with n 2. By the previous result, we know that all these chords do not cross each other. Hence C together with n chords forms n + 1 induced cycles denoted by C 1 , C 2 , . . . , C n+1 . For any two cycles C i and C j , if C i ∩ C j = ∅, then C i ∩ C j is a chord of C . If all these n + 1 cycles are not incident with any edges in E , then for i ∈ [1, n], C i+1 contains two edges, and these two edges are incident with C i . Then C i together with these two edges of C i+1 can be regarded as a graph H m,n , which is a nice subgraph of H and so a nice subgraph of G. This is a contradiction. If some of these n + 1 cycles are incident with edges in E , let C j be such a cycle. Then C j together with its appending edges in E forms a graph H m,n , which is a nice subgraph of G, a contradiction. Hence we conclude that there exists at most one chord of C in H.
Let e 1 = v 1 v 2 and e 2 = v 3 v 4 be two edges in E such that C − v 1 − v 3 are two paths of odd lengths and at least one of these two paths is not incident with any other edge in E . Denote this path by P 1 and the other by P 2 . We consider first the case that v 1 , v 3 are not adjacent on C and e 1 = e 2 . In this case, e 1 is a chord of C . Since P 1 is not incident with any other edges in E except e 1 , P 1 + e 1 is an M -alternating cycle in H. Denote the neighbours of v 1 and v 3 in V (P 1 ) by v 5 and v 6 , respectively. If there is no edge in E incident with P 2 , then P 2 + e 1 + v 1 v 5 + v 3 v 6 is a graph in H m,n and it is a nice subgraph of G. This is a contradiction. If there are some edges in E incident with P 2 , then the subgraph induced by E(P 2 + e 1 ) and these edges in E is a graph H m,n , which is a nice subgraph of G. For the case that e 1 = e 2 , our proof depends on whether the cycle C has a chord in H or not. If there is no chord, the graph H is a graph H m,n and it is a nice subgraph of G. If there is a chord e , the graph C ∪ e contains two cycles containing e . Denote the one which is incident with e 1 and e 2 by C 1 . Then C 1 together with its appending edges in E form a nice subgraph H m,n of G. This is a contradiction.
The following lemma illustrates the relations of the forbidden subgraphs.
the electronic journal of combinatorics 30(2) (2023), #P2.2 Lemma 22. Let G be a bipartite graph with a perfect matching and without H m,n as its nice subgraph. Then G contains no K + 2,3 as its nice subgraph if and only if G contains no even subdivision of K 2,3 as its subgraph.
Proof. Since any graph K + 2,3 contains an even subdivision of K 2,3 as its subgraph, the sufficiency is obvious. Conversely, assume, to the contrary, that G contains an even subdivision of K 2,3 as its subgraph, denoted by H. Let M be any perfect matching of G.
Since |V (H)| is odd and G has a perfect matching, there exists an odd number of vertices in V (H) that are incident with some edges attaching to H (these edges are not in H, we call them attaching edges) and lying in M . Denote the two even cycles in H by C 1 and C 2 , respectively. Suppose that C 1 has an edge belonging to M . Then Lemma 21 implies that both C 1 and C 2 (or C 1 and C 1 C 2 )are M -alternating cycles. It contradicts to the truth that H has at least one attaching edge belonging to M . Hence C 1 has no edge belonging to M . Likely, we can deduce that C 2 and C 1 C 2 also have no edge belonging to M . Without loss of generality, we suppose that Proof. Let C and C be two cycles in G such that C ∩ C = P , where P is a path. By Lemma 22, G contains no even subdivision of K 2,3 as its subgraph. Then P contains an odd number of common edges. It follows from Lemma 21 that every cycle is M -alternating or contains no edges in M .
Assume, to the contrary, that C is M -alternating. In this case, we can deduce that C can not be M -alternating. If not, assume that C is M -alternating. Consider first the case that P contains at least three edges. Then P is an M -alternating path with two ends v 1 and u 1 . Let v 2 and u 2 be the neighbours of v 1 and u 1 in P , respectively. The edges v 1 v 2 and u 1 u 2 must be in M , otherwise v 1 will be incident with two edges in M . Then the cycle C C is not M -alternating and contains the edges in M . This contradicts to Lemma 21. If P contains exactly one edge, then this edge must be in M . Similarly, the cycle C C is still not M -alternating, but contains the edges in M , a contradiction. Hence C can not be M -alternating. It follows that C contains no edges in M and then each vertex of C is incident with an edge in M .
If P contains at least three edges, P is an M -alternating path since C is M -alternating. This is a contradiction to the truth that C can not be M -alternating. If P contains exactly one edge, this edge can not be in M . Hence C C together with edges in M , which are attached to C , contains a nice subgraph H m,n of G. This is a contradiction. Hence C does not contain any edge in M , so does C . Therefore, both C and C lie in C M .
It can be found that the following two propositions hold for the graph G × P 3 .

Proposition 24.
A graph G is a bipartite graph if and only if G × P 3 is a bipartite graph.

Proposition 25.
If H is a nice subgraph of G, then H × P 3 is a nice subgraph of G × P 3 .
To construct a Pfaffian orientation of G × P 3 , we introduce the following results on orientation graphs. In 2002, Fischer and Little [4] gave a characterization of the existence of an orientation of a graph such that all the even cycles are oddly oriented.
Theorem 26 (Fischer et al. [4]). A graph has an orientation under which each even cycle is oddly oriented if and only if the graph contains no subgraph which is, after the contraction of at most one odd cycle, an even subdivision of K 2,3 .
For bipartite graphs, we have the following immediate corollary. There are several equivalent conditions under which a graph is Pfaffian [12].
Theorem 28 (Lovász et al. [12]). Let G be a graph with an even number of vertices and D an orientation of G. Then the following statements are equivalent.
(1) D is a Pfaffian orientation of G.
(2) Every nice cycle of G is oddly oriented in D. Proof of Theorem 19. Since |V (P 3 )| = 3, G × P 3 contains three copies of G, denoted by G 1 , . If G contains a nice subgraph H m,n (resp. K + 2,3 ), then H m,n × P 3 (resp. K + 2,3 × P 3 ) is a nice subgraph of G × P 3 . By Lemma 20, H m,n × P 3 (resp. K + 2,3 × P 3 ) is not Pfaffian and hence G × P 3 is not Pfaffian. Therefore, if G × P 3 is Pfaffian, then G contains no H m,n and K + 2,3 as its nice subgraphs. Conversely, suppose that G contains no H m,n and K + 2,3 as its nice subgraphs. It follows from Lemma 22 that G contains no even subdivision of K 2,3 as its subgraph. Then Theorem 26 implies that G has a Pfaffian orientation D under which each even cycle is oddly oriented. Orient G × P 3 in such a way that G 1 and G 3 have the same orientation as D and the direction of each edge in G 2 is opposite to the corresponding edge in G 1 . The direction of the edges in E P is from v j i to v j+1 i for j = 1, 2. Such an the electronic journal of combinatorics 30(2) (2023), #P2.2 orientation of G × P 3 is denoted by D. In the following, we prove that D is a Pfaffian orientation of G × P 3 . Since every even cycle of G 1 is oddly oriented, D is a Pfaffian orientation of G 1 . By Theorem 28, there exists a perfect matching M of G 1 such that every M -alternating cycle of G 1 is oddly oriented in D . It is obvious that it is oddly oriented in D.
To prove that D is a Pfaffian orientation of G × P 3 , it is sufficient to show that every M -alternating cycle of G × P 3 is oddly oriented under the orientation D. Let C be an M -alternating cycle of G × P 3 . If C contains no edges in E(G 3 ), then C is an even cycle in G 1 and then C is oddly oriented.
It remains to consider the case that the M -alternating cycle C contains edges in E(G 3 ). If C contains the edges in E(G 2 ), denote one of these edges by u 2 1 v 2 1 . Since C is M -alternating and u 2 1 v 2 1 and u 3 1 v 3 1 are in converse direction. It follows that the cycle obtained from C by replacing the path v 3 1 v 2 1 u 2 1 u 3 1 by v 3 1 u 3 1 has the same parity of the number of edges of C in direction when traveling along the cycle. Hence, replacing all this kind of paths in C in this way, we obtain a new cycle C 1 . We can find that the cycle C 1 contains no edge in E(G 2 ). Particularly, if G contains no edges in E(G 2 ), then C 1 = C. In conclusion, the cycle C is oddly oriented if and only if C 1 is oddly oriented.
If C 1 contains no edges in E(G 1 ), then C 1 is an even cycle in G 3 and obviously is oddly oriented in D. Consider that case that C 1 contains edges in G 1 and G 3 . Traveling C along on direction, we color the edges of C 1 along this direction by red and color the edges of C 1 opposite to this direction by blue. We will show that the number of blue edges and the number of red edges in C 1 are both odd.
Recall that C 1 is an even cycle and the direction of edges in E P is from v j i to v j+1 i . It follows that the number of red edges and the number of blue edges in E P are equal and both even. We contract all the edges of E P in G × P 3 . The resulting graph with multiple edges (without loops)is denoted by G . Note that G is obtained from G by replacing each edge of G by three multiple edges. After this contraction operation, C 1 is transformed into a closed trail in G denoted by T r . Moreover, the edges in T r receive the same color as the corresponding edges in C 1 . It is easy to deduce that the maximum degree of vertices in T r is at most four and the degree of each vertex in T r is even. Furthermore, the number of red (resp. blue) edges in C 1 has the same parity with the number of red (resp. blue) edges in T r . Therefore, we only need to show that the number of blue edges and the number of red edges in T r are both odd. In the remaining proof, when we say the cycles in T r , we only consider the cycles containing at least three vertices. We say an edge uv of T r (single or multiple) is in M if the corresponding edge uv of G is in M . We will prove the following claims, which are related to cycles and multiple edges in the closed trail T r . These claims will help us to figure out the structure of T r .
Claim 29. Let uv be an multiple edge in T r . If uv lies in M , then the M -alternating cycle C contains the edge u 1 v 1 and the path u 2 u 3 v 3 v 2 in G × P 3 .
Proof. Since uv is an multiple edge in T r and it belongs to M , the edge u 1 v 1 in G 1 lies in C clearly. Assume, to the contrary, that C dose not contain the path u 3 u 2 v 2 v 3 . Since uv is a multiple edge in T r , the cycle C contains at least one of the edges u 2 v 2 and u 3 v 3 . If C contains u 3 v 3 , then C must contain u 2 u 3 and v 2 v 3 since C is M -alternating. Thus C contains the path u 2 u 3 v 3 v 2 . If C does not include u 3 v 3 , then u 2 v 2 lies in C and so the path u 3 u 2 v 2 v 3 lies in C. Then C either contains a a path from u 1 to u 3 which does not include v 1 and v 3 (we denote this path by P u 1 u 3 ), or contains a path from u 1 to v 3 and this path does not include v 1 and u 3 (denote this path by P u 1 v 3 ). Consider first the case that the path P u 1 u 3 lies in C. After the contraction operation defined above, the path P u 1 u 3 corresponds to a closed subtrail of T r , denoted by T r . Since u 1 v 1 and u 3 u 2 are in M , the length of P u 1 u 3 is odd and so is T r . However, G is a bipartite multigraph in which the length of each closed trail is even. Hence we deduce a contradiction. Now consider the case that the path P u 1 v 3 lies in C. In this case the edge uv in M is a common edge of two even cycles in G which is impossible by Lemma 23.
Claim 30. Any two cycles of T r are edge-disjoint.
Proof. Assume, to the contrary, that there are two cycles in T r having edges in common. Then there exist two cycles C and C in T r such that C ∩ C is a path P . Let v 1 and v 2 be the two ends of P . Both C and C are corresponding to cycles in G and both of them contain no edges in M by Lemma 23. Let H v 1 be the subgraph of T r , which is induced by v 1 and the neighbours of v 1 are in T r . Since d(v 1 ) 3 in T r , the subgraph H v 1 contains at least one edge in E(G 1 ). Among the edges of H v 1 belonging to E(G 1 ), there must exist one edge belonging to M , denoted by v 1 1 u 1 1 . The edge v 1 u 1 in T r does not belong to E(C ) ∩ E(C ). Since C is M -alternating, the cycle C can not contain the path v 1 1 v 2 1 v 3 1 . Otherwise, d(v 1 ) = 2 in T r . Then H v 1 contains another edge of E(G 1 ) not in M , denoted by v 1 1 u 1 2 . Since d(v 1 ) 3 and d(v 1 ) is even, there are another two edges in C incident with v 2 1 and v 3 1 . One of them is incident with v 2 1 , denoted by v 2 1 u 2 3 . The other edge incident with v 3 1 is denoted by v 3 1 u 3 4 . Moreover, the edge v 2 1 v 3 1 is also in C. The edges v 1 u 2 , v 1 u 3 and v 1 u 4 in T r are corresponding to v 1 1 u 1 2 , v 2 1 u 2 3 and v 3 1 u 3 4 in G 1 ,G 2 and G 3 , respectively. These edges lie in E(C ) ∪ E(C ). Up to now, we have found all the edges incident with v 1 1 , v 2 1 and v 3 1 in C and all the edges incident with v 1 in T r . Consider the walk of T r starting with v 1 . Since T r is a close trail, following the edge v 1 u 1 , there must be a vertex in V (C ) ∪ V (C ), which is adjacent to u 1 . We deduce that this vertex must be v 1 . If not, there exists an even cycle containing v 1 u 1 in T r . It corresponds to a cycle in G. Lemma 21 implies that this cycle in G is an M -alternating cycle. This M -alternating cycle has at least two successive common edges with C C , which contains no edges in M . This contradicts to Lemma 23. Hence, v 1 lies in another closed subtrail of T r except C and C . This menas that d(v 1 ) > 4 in T r . This is not possible since the maximum degree of vertices in T r is at most four.
Claim 31. For a multiple edge st in T r with two ends s and t, if the edge st in G is not in M , then the M -alternating cycle C contains the edge s 1 t 1 and the path s 3 s 2 t 2 t 3 in G × P 3 .
Proof. It is easy to deduce that s 1 t 1 lies in E(C). Since st is a multiple edge, we show that C contains the path s 3 s 2 t 2 t 3 . Assume, to the contrary, that G contains the path s 2 s 3 t 3 t 2 . If C contains a path from s 1 to s 2 , which does not contain the vertices t 1 and t 2 , we denote such a path by P s 1 s 2 . The length of P s 1 s 2 is odd. After contracting the edges in E P , P s 1 s 2 is converted into a closed trail of odd length in T r . This is impossible since T r is a bipartite multigraph. If C contains a path from s 1 to t 2 which does not contain t 1 and s 2 , then it will contain a path from t 1 to s 2 which does not contain s 1 and t 2 . Then the edge st is a common edge of two cycles in T r . It contradicts to Claim 30.
Claim 32. Any cycle in T r contains no multiple edge.
Proof. Suppose to the contrary that there exists a cycle C in T r containing a multiple edge denoted by uv. Denote the other edge of C incident with u by uw. Since the degree of u in T r is even and at most four, uw is a multiple edge or uw is a single edge that is a common edge of two cycles in T r . The second case is impossible by Claim 30. If uw is a multiple edge, we consider the other edge of C incident with w. By this way, we can deduce that each edge of C is a multiple edge. In this case the closed trail T r is exactly C , since each vertex in C is of degree four. This is impossible by the choice of M .
The perfect matching chosen in G is M . For any cycle C in T r , we say C is associated with C M if the corresponding cycle in G is M -alternating and likely we say C is associated with C M if the corresponding cycle in G contains no edges in M .
Claim 33. For any two cycles with common vertices in T r , the number of common vertices is one. Moreover, one of these two cycles is associated with C M and the other is associated with C M .
Proof. In this proof, we neglect the multiples in T r . If there exist two cycles with more than one common vertex, then there must exist two cycles with common edges which is not possible by Claim 2. Hence for any two cycles in T r , they share at most one vertex in common. Clearly two cycles with one common vertex in G can not be two M -alternating cycles. To finish our proof, we assume, to the contrary, that C and C are two cycles with one common vertex such that both are associated with C M . Denote the common vertex by s and obviously d(s) 4. However, the four edges incident with s in C and C are neither in M . Hence there exist another edge incident with s in T r corresponding to an edge of G in M . This is impossible since the maximum degree is four.
Claim 34. Let C be a cycle in T r associated with C M and C the cycle corresponding to T r in G × P 3 . Let S be a set of edges in T r such that each edge in S has only one end in C and the corresponding edge in G lies in M . Then (1) if the ends of two edges in S separate C into two paths, and at least one of these two paths, denoted by P , satisfies that its internal vertices of P are not incident with any edges in S, then P is of odd length; (2) the number of edges in S is even.
Proof. Let H C be a subgraph of C such that after the contraction of E P it is converted into C . By the discussion in previous pages, we consider the case that H C only contains edges in E(G 1 ) and E(G 3 ). Since C is associated with C M , H C is incident with several edges in M and so does C . Since C is M -alternating, we can find that S = ∅ and S contains at least two edges. Let v 1 v 2 and v 3 v 4 be the two edges of T r in M such that v 1 and v 3 belong to C and C − v 1 − v 3 are two paths P 1 and P 2 . Moreover, v 1 and v 3 are chosen such that the path P 1 is not incident with any other edges except v 1 v 2 and v 3 v 4 . Consider the walk of T r starting with v 1 . Since T r is a close trail, following the edge v 1 v 2 , there must be a vertex in V (C ), which is adjacent to v 2 . Hence, v 1 lies in another closed subtrail of T r except C , denoted by C . The trail C has exactly one common vertex (that is v 1 ) with C . This closed trail C is corresponding to an even path P in C. Now we determine the other end of P . We can find that the edge v 1 It is obvious that the length of P and C are both even, and C is obtained from P by contracting edges in E P . Hence the number of edges in P belonging to E P is even. This means that the other end of P must be v 3 1 . Likewise, when we consider the vertex v 3 in C , we obtain a path P with two ends v 1 3 and v 3 3 . We now consider the structure of the subgraph F of C which corresponds to P 1 . The two ends of P 1 in T r are v 1 and v 3 . By the structure of the perfect matching M , F is a path on C. Since the vertices of the path The other edge of C incident with u 1 1 should be in M . However, such an edge does not exist since C contains no edges in M and the vertices on P 1 are not incident with any other edges in M except v 1 v 2 and v 3 v 4 . Similarly, the path F from v 2 1 to v 1 3 does not exist. Hence, P 1 corresponds to a path from v 1 1 to v 1 3 or from v 2 1 to v 2 3 in C. Following this, it must be a path of odd length. As C is an even cycle and any path like P 1 is of odd length, it is easy to deduce that the number of edges in S is even.
The above claims show cycles and multiple edges in T r . To illustrate the structure of T r , we need some notations. Let H 1 and H 2 be the two subgraphs of G. Then H 1 ∪ H 2 denotes the subgraph of G induced by E(H 1 ) ∪ E(H 2 ). Two graphs H 1 and H 2 are said to be incident if the intersection of H 1 and H 2 is a vertex.
The closed trail T r can be partitioned into four edge-disjoint subgraphs H C M , H C M , H M ul and H M ul . The subgraph H C M consists of all cycles associated with C M in T r . All these cycles do not share common edges or vertices with each other by Claims 30 and 33. The subgraph H C M consists of all cycles associated with C M in T r . It contains two types of cycles: the first type contains the cycles that are incident with several cycles in H C M and two incident cycles share only one vertex in common; the second type contains the cycles that share no common vertex with any other cycles. All cycles in T r are in the subgraph The subgraph H M ul consists of all the multiple edges in T r which are corresponding to edges in M of G. We call these multiple edges type I multiple edges. These type I multiple edges are vertex-disjoint by Claim 31. Each type I multiple edge connects two components of H C M ∪ H C M ∪ H M ul . The subgraph H M ul consists of all the multiple edges in T r which are corresponding to edges in M of G. It contains two types of multiple edges: one type is the multiple edges that are incident with cycles in H C M ; the other type is the multiple edges that are not incident with cycles in H C M (such multiple edges are incident with multiple edges in H M ul , since C is an M -alternating cycle). We call the first type multiple edges type II multiple edges and call the second type multiple edges type III multiple edges. Claim 34 implies that each cycle in H C M is incident with an even number of type II multiple edges in H M ul ∪ H C M . The subgraph H C M ∪ H C M ∪ H M ul consists of several components. Type III multiple edges are vertex-disjoint by Claim 29.
To prove that the number of red edges in T r and the number of blue edges in T r are both odd. We first consider the subgraph H M ul . For each 2-multiple edge of H M ul , one edge in this 2-multiple edges is from E(G 1 ) and the other is from E(G 3 ). They receive the same orientation. Hence one is red and the other is blue. The same result holds for the multiple edges in H M ul .
Next, we prove that in each component of H C M ∪ H C M ∪ H M ul , the number of red edges and the number of blue edges are both odd. Note that each component consists of cycles associated with C M , cycles associated with C M and multiple edges. We know that all the edges in T r are from E(G 1 ) and E(G 3 ). In the graph G × P 3 , G 1 and G 3 have the same orientation and each even cycle in G 1 or G 3 is oddly oriented under the orientation D. Hence, we can deduce that in each cycle or multiple edge of T r , the number of red edges and blue edges are both odd. It is sufficient to prove that the number of cycles and multiple edges are odd.
For any component L of H C M ∪ H C M ∪ H M ul , let G L be a graph such that each vertex of V (G L ) corresponds to a cycle or a multiple edge of L. Two vertices of G L are adjacent if and only if the corresponding cycles or multiple edges in L are incident. Claim 5 implies that G L is a tree. We will prove that |V (G L )| is odd. Color the vertices in G L with white and black. If a vertex of G L corresponds to a cycle associated with C M , then color it with white; otherwise, color it with black. By the claims above, we can deduce that two vertices in the same color are not adjacent. For each white vertex, it has an even number of neighbours and all its neighbours are black. Choose a black vertex v as a root. we build a rooted tree. In this rooted tree, each vertex except v has one parent vertex and several child vertices. All the parent and child vertices of black vertices are white. All parent and child vertices of white vertices are black. Then for each white vertex, it has an odd number of child vertices and one parent vertex. The leaves of G L must be black vertices. Otherwise, G L will be infinity. Hence, the number of vertices in V (G L ) − v is even and then |V (G L )| is odd. This means that in each component of H C M ∪ H C M ∪ H M ul , the number of red edges and blue edges are both odd.
If there is an odd number of components, the number of type I multiple edges that connects these components is even. We can deduce that the number of blue edges and the number of red edges are both odd. If there is an even number of components, the number of type III multiple edges connecting these component is odd. We can also deduce that the number of blue edges and the number of red edges are both odd. Hence each M -alternating cycle in G × P 3 is oddly oriented in D, and so D is a Pfaffian orientation of G × P 3 .
Combining Theorem 19 and Lemma 22, we can deduce the following result.
Corollary 35. Let G be a bipartite graph with a perfect matching. Then G×P 3 is Pfaffian if and only if G contains no H m,n as its nice subgraph and contains no even subdivision of K 2,3 as its subgraph.
We can generalize Theorem 19 to the case that G is a non-bipartite graph with exactly one odd cycle.
Theorem 36. Let G be a graph with exactly one odd cycle C 0 . If G − e has a perfect matching for any edge e ∈ E(C 0 ), then G × P 3 is Pfaffian if and only if G − e contains neither H m,n as its nice subgraph nor an even subdivision of K 2,3 as its subgraph for any edge e ∈ E(C 0 ).
Proof. The necessity is obviously since any nice subgraph of G − e is also a nice subgraph of G. We shall consider the sufficiency. Due to the truth that the number of odd cycles in G is one, C 0 shares no common edge with any other cycles. Since G − e has a perfect matching, the graph G admits a perfect matching, denoted by M G . Let M G be a perfect matching of G. It is obvious that M G is a perfect matching of G 1 , and so M = M G ∪ E 2 is a perfect matching of G × P 3 .
We will establish an orientation of G × P 3 , which will be proved to be a Pfaffian orientation of G × P 3 . The graph G − e contains no even subdivision of K 2,3 . That is the graph G contains no subgraph which is, after the contraction of at most one odd cycle, an even subdivision of K 2,3 . It follows from Theorem 26 that there is a Pfaffian orientation D * of G, under which every even cycle of G is oddly oriented. In the graph G × P 3 , let G 1 and G 3 have the same orientation D * , and each edge of G 2 admits the opposite direction as the corresponding edge in G 1 . For i = 1, 2, the direction of edges in E i is from v i to v i+1 . Denote this orientation of G × P 3 by D.
To prove that D is a Pfaffian orientation of G × P 3 , we need to prove that each Malternating cycle is oddly oriented under the orientation D. Let C be any M -alternating cycle of G × P 3 . If there exists an edge e 0 of C 0 such that C is an M -alternating cycle of (G − e 0 ) × P 3 , then Theorem 19 shows that (G − e 0 ) × P 3 is Pfaffian. Since G − e 0 is a subgraph of G, the orientation D of G × P 3 restricted to (G − e 0 ) × P 3 is an orientation of (G − e 0 ) × P 3 . By the proof of Theorem 19, this orientation is a Pfaffian orientation of (G − e 0 ) × P 3 . To find such an edge e 0 , we need to find an edge e 0 of C 0 such that e 0 does not lie in M G , and e i 0 does not lie in E(C) for i = 1, 2, 3. In this case, M is also a perfect matching of (G − e 0 ) × P 3 . The cycle C is also an M -alternating cycle of (G − e 0 ) × P 3 and so it is oddly oriented.
Let S be the set collecting edges in E(C 0 ) such that for each edge in S its three copies do not belong to E(C). We assert that S is not empty. We contract the edges in E 1 and E 2 . After the contraction, G × P 3 is transformed into a multiple graph G * and the cycle C is transformed into a closed trail denoted by T r . If the assertion is not true, assume that each edge of C 0 has at least one copy in E(C). The cycle C 0 is corresponding to an odd cycle in T r denoted by C * 0 . Since the cycle C is an even cycle, |E(T r )| is also even. Since T r is closed, all the non-multiple edges of T r belong to some cycles of T r . We can deduce that all the edges of C * 0 are non-multiple edges. If not, suppose that there exists a multiple edge of C * 0 denoted by uv. Denote the other edge of C * 0 incident with u by uw. Note that each vertex of T r is of even degree and the maximum degree of a vertex in T r is at most four. If uw is a non-multiple edge, it belongs to another cycle. In this case C 0 shares a common edge with another cycle. It contradicts to the truth that there is no cycle sharing common edge with C 0 . Hence uw is a multiple edge. In the same way, we can prove that all edges of C * 0 are multiple edges. In this case the degree of each vertex of C * 0 is four. It follows that E(T r ) − E(C * 0 ) is empty and the closed trail T r is exactly C * 0 . Since each edge of T r is a multiple edge, C must contain the edges from G 1 and G 3 . By the choice of M , there exists at least one path of length two in C passing through the three copies of some vertex of G. Suppose that one of these paths is v 1 It is a contradiction. Now we have proved that all edges of C * 0 are non-multiple edges. It follows that |E(T r ) − E(C * 0 )| is odd. This is impossible since the remaining edges in T r − E(C * 0 ) belong to even cycles or 2-multiple edges. Hence S is not empty.
Since S is not empty, T r does not contain the odd cycle. Then the edges in E(C 0 ) − S do not belong to any cycle in T r . Since all the non-multiple edges of T r belong to some cycles in T r , each edge in E(C 0 ) − S corresponds to a 2-multiple edge in T r . We assert that there must exist at least one edge in S that does not belong to M G . If all the edges in S do not belong to M G , the assertion holds clearly. Consider the case that there exists an edge e 1 = v 1 u 1 in S belonging to M G . We show that there is another edge in S and it does not lie in M G . Let e 2 = v 1 u 2 be one of the edges of C 0 , which is adjacent to e 1 . Clearly, e 2 does not lie in M G . We shall prove that e 2 ∈ S. If not, suppose that e 2 / ∈ S. Then at least one of its copies, which belongs to G i (i = 1, 2, 3), lies in E(C). It follows that e 2 is corresponding to a 2-multiple edges in T r and u 1 2 v 1 1 ∈ E(C). Since C is an M -alternating cycle, for any vertex u 1 2 adjacent to v 1 1 in C, u 1 2 v 1 1 / ∈ M . Then the path u 1 2 v 1 1 v 2 1 v 3 1 does not exist in C. It contradicts to u 1 2 v 1 1 ∈ E(C). Hence, e 2 lies in S and so there is at least one edge in S that does not belong to M G . Denote one of these edges by e 0 . The M -alternating cycle C of G × P 3 is also an M -alternating cycle of (G − e 0 ) × P 3 . Since (G − e 0 ) × P 3 is bipartite, Theorem 19 implies that C is oddly oriented with respect to the orientation D.
By the arbitrariness of C, each M -alternating cycle of G × P 3 is oddly oriented and hence G × P 3 is Pfaffian.

Enumeration perfect matchings of G × P n in terms of eigenvalues
In this section, we will evaluate the number of perfect matchings of G × P n in terms of the eigenvalues of G and the eigenvalues of a Pfaffian orientation of G, respectively. We begin with the construction of a Pfaffian orientation of G × P n . In the Cartesian product G × P n , let G 1 , G 2 , . . . , G n denote the n copies of G. For a vertex v in V (G) and an edge e = uv in E(G), v i denotes the copy of v in V (G i ) and e i = u i v i denotes the copy of e in E(G i ). Let E i denote the edge set {v i v i+1 : ∀v i ∈ V (G i )} for i = 1, 2, . . . , n − 1.
Theorem 37. Let G be a graph such that G × P n is Pfafian and G admits an orientation G σ such that all the even cycles are oddly oriented. Construct an orientation (G × P n ) σ of G × P n as follows: (a) G 2k+1 (k = 1, 2, . . .) receives the same orientation as G σ ; (b) G 2k (k = 1, 2, . . .) receives the reverse orientation as G σ ; (c) any edge v i v i+1 in each E i is directed from v i to v i+1 . Then this orientation (G × P n ) σ is a Pfaffian orientation of G × P n when n is even; if G admits a perfect matching, then (G × P n ) σ is a Pfaffian orientation of G × P n when n is odd and n = 3; if G is bipartite, or G has exactly one odd cycle C 0 such that G − e has a perfect matchings for any edge e ∈ E(C 0 ), then (G × P 3 ) σ is a Pfaffian orientation of G × P 3 .
Proof. For n = 2, by the proof of Theorem 11 in [25] and Theorem 8 of [13], we can find that (G × P 2 ) σ is a Pfaffian orientation.
For n = 3, the proofs of Theorems 19 and 36 show that (G × P 3 ) σ is a Pfaffian orientation.
For n = 4 and n = 2k (k 3), by the the proof of Theorem 8 in [13], (G × P n ) σ is a Pfaffian orientation.
For n = 5, the Pfaffian orientation (G × P 6 ) σ of G × P 6 restricted to G × P 5 is a Pfaffian orientation by the proof of Theorem 11. Thus (G × P 5 ) σ is a Pfaffian orientation of G × P 5 .
As a continue of the research in [26], we show that the number of perfect matchings of G × P n can be expressed by the eigenvalues of an orientation of G. In the following theorems, we use G σ to denote the orientation of G such that all the even cycles are oddly oriented.
Theorem 38. (a) Let G be a graph with a perfect matching. If G is a bipartite graph and contains no H m,n and K + 2,3 as its nice subgraphs, or G has exactly one odd cycle C 0 such that G − e has a perfect matching and G − e contains neither H m,n as its nice subgraph nor an even subdivision of K 2,3 as its subgraph for any edge e ∈ E(C 0 ). Then where the product ranges over all the positive imaginary part eigenvalues λ of G σ . If the graph G in (a) has a unique perfect matching, then where the product ranges over all the positive imaginary part eigenvalues λ of G σ .
(b) Let G be the graph containing neither an even subdivision of Q-graph nor two edge-disjoint odd cycles as its subgraph. Then where the product ranges over all the positive imaginary part eigenvalues λ of G σ .
(c) Let G be a graph with a perfect matching. If G contains neither an H Y as its nice subgraph nor edge-disjoint odd cycles as its subgraph, then where the product ranges over all the positive imaginary part eigenvalues λ of G σ .
(d) Let G be a graph with a perfect matching. If G contains no Y-tree as its subgraph, then for n 6, Φ(G × P n ) = where the first product ranges over all the positive imaginary part eigenvalues λ of G σ . For the case that n is even, if G does not have a perfect matching, Eq. (4) also holds. For the case that G has a unique perfect matching, it holds that where the first product ranges over all the positive imaginary part eigenvalues λ of G σ .
Proof. We show first the proof of (d). If the graph G containing no Y-tree as its subgraph is Pfaffian, it follows from the proofs of Theorems 12 and 9 that G is a path, a cycle or |V (G)| 4 (when n is even, G may also be a star). Hence, G contains no even subdivision of K 2,3 , after the contraction of at most one odd cycle. Theorem 26 implies that G admits an orientation G σ such that all the even cycles are oddly oriented. Now we construct the Pfaffian orientation (G × P n ) σ of G × P n according to Theorem 37. It follows from Theorem 1 that Φ 2 (G × P n ) = | det A((G × P n ) σ )|.
Suppose that |G| = p. Let A be the skew-adjacency matrix of G σ and I the identity matrix of order p.
Note: Let G be a graph with a perfect matching. If G is a non-bipartite graph with a unique cycle, then Eq. (5) holds by the result in (d).
The number of perfect matchings of G × P n can also be expressed by the eigenvalues of G as shown in Theorem 6. Before providing the proof, we introduce some terminology.
Lemma 39. If a bipartite graph G contains no cycle of length divisible by four, then it contains no even subdivision of K 2,3 .
Proof. Suppose that G contains a subgraph H which is an even subdivision of K 2,3 . Then H contains two even cycles C 1 and C 2 intersecting along a path P of even length. If one of C 1 and C 2 is of length 4s for some positive integer s, then we are done. Thus we may suppose that |C 1 | = 4s 1 + 2 and |C 2 | = 4s 2 + 2. We will find that the symmetric difference of C 1 and C 2 is a cycle of length divisible by four. This is a contradiction. Thus G contains no even subdivision of K 2,3 .
An even cycle C of length 2l is said to be oriented uniformly if C is oddly oriented relative to G σ when l is odd, and C is evenly oriented relative to G σ when l is even.
Theorem 40. [1] Let G be a bipartite graph and G σ an orientation graph of G. Then Sp s (G σ ) = iSp(G) if and only if each even cycle is oriented uniformly in G σ .

Proof of Theorem 6:
It follows from Lemma 39 that G contains no even subdivision of K 2,3 . Corollary 27 implies that G admits an orientation G σ such that all the even cycles are oddly oriented. Such an orientation is a Pfaffian orientation. Since G contains no cycle of length 4s, all the even cycles of G are oriented uniformly. Now we construct the Pfaffian orientation (G × P n ) σ of G × P n according to Theorem 37. It follows from Theorem 1 that Φ 2 (G × P n ) = | det A((G × P n ) σ )|.
Let A be the skew-adjacency matrix of G σ and B the adjacency matrix of P n , where Suppose that G is of order p. Denote the eigenvalues of A by λ 1 , λ 2 , . . . , λ p , and denote the eigenvalues of G by α 1 , α 2 , . . . , α p . Theorem 40 implies that λ j = iα j for 1 j p. Since G is a bipartite graph, the spectrum of G is symmetric with respect to zero. As G admits a perfect matching, G has no zero eigenvalues. Then by the same analysis as the proof of Theorem 38, we can obtain that Eq. (4) holds. Substituting λ j by iα j , we get that Φ(G × P n ) = α n k=1 |(4cos 2 πk n + 1 + α 2 )| mα 2 , where the first product ranges over all the positive eigenvalues α of G, and m α is the multiplicity of the eigenvalue α. The proof is finished.