The Parity Hamiltonian Cycle Problem

Report 0 Downloads 123 Views
The Parity Hamiltonian Cycle Problem Hiroshi Nishiyama∗1 , Yusuke Kobayashi†2 , Yukiko Yamauchi‡1 , Shuji Kijima§1 , and Masafumi Yamashita¶1

arXiv:1501.06323v1 [cs.CC] 26 Jan 2015

1

Graduate School of Information Science and Electrical Engineering, Kyushu University, Fukuoka, 819-0395, Japan 2 Graduate School of Information Science and Technology, University of Tokyo, Tokyo, 113-8656, Japan January 27, 2015

Abstract This paper investigates a variant of the Hamiltonian Cycle (HC) problem, named the Parity Hamiltonian Cycle (PHC ) problem: The problem is to find a closed walk visiting each vertex odd number of times, instead of exactly once. We show that the PHC problem is in P even when a closed walk is allowed to use an edge at most z = 4 times, by considering a T -join, which is a generalization of matching. On the other hand, the PHC problem is N P-complete when z = 3. In the case of z = 3 however, the problem is in P when an input graph is four-edge connected, but it still remains N P-complete even when it is two-edge connected. Thus, we are concerned with the hard case in detail, and give a simple necessary and sufficient condition that a two-edge connected C≥5 -free (or P6 -free) graph has a PHC. Note that the HC problem is known to be N P-complete for those graph classes. This subject is motivated by a new approach to connecting a hard problem HC and an easy problem T -join, by relaxing a constraint of HC. Keywords: Hamiltonian cycle problem, T -joins, graph factors

1

Introduction

The Hamiltonian Cycle (HC) problem is a celebrated N P-complete problem. This paper investigates a variant of the problem, which we call the Parity Hamiltonian Cycle (PHC ) problem: The problem is to find a closed walk visiting each vertex odd number of times, instead of exactly once. Note that a closed walk is allowed to use an edge more than once in the problem. Thus, another version of the problem which is to find a closed walk visiting each vertex EVEN number of times is trivial; find a spanning tree and trace it twice. Brigham et al. [3] discussed a problem very similar to the PHC problem1 , and gave a linear time algorithm based on the depth first search. As far as we know, it is the only known result on the problem. This paper is motivated by a new approach to ∗

[email protected] [email protected][email protected] § [email protected][email protected] 1 In precise, they are concerned with a problem to find a path version of the problem, and hence the definition of “the number of visits of the starting and ending vertices” is different from ours. †

1

Table 1: Time complexity of the PHC problem. Each edge is used at most z times Complexity z z z z

≥4 =3 =2 =1

P N P-complete N P-complete N P-complete

(Thm. (Thm. (Thm. (Thm.

3.1) 3.6) ⇒ see Table 2 3.5) 3.4)

connecting a hard problem HC and an easy problem T -join, which is a generalization of matching, by relaxing a constraint of a HC. The connection between the traveling salesman problem and matchings or even factors is well investigated, see e.g., [12, 1]. This paper firstly shows that the PHC problem is in P when a walk is allowed to use each edge at most z = 4 times. To be precise, we give a necessary and sufficient condition; a connected graph G has a PHC if and only if G is non-bipartite or the number of vertice of G is even, when z = 4. In the proof of sufficiency, we give a linear time algorithm to find a PHC using T -join. On the other hand, we show that the PHC problem is N P-complete in each case2 of z = 1, 2, 3 (see Table 1). In the particular case of z = 3 precisely, the PHC problem is N P-complete even if an input graph is two-edge connected, while we show that the problem is in P for four-edge connected graphs. The complexity for three-edge connected graphs remains unsettled (see Table 2). Thus, we further investigate the PHC problem for three-edge connected (actually, two-edge connected) graphs when z = 3. For this purpose, we introduce a stronger notion of all-roundness of a graph, which is a sufficient condition that a graph has a PHC. In fact, Catlin [4] suggested a similar notion of collapsible in the context of spanning Eulerian subgraphs, and the all-round is an extended notion of the collapsible. We give necessary and sufficient conditions that graphs are all-round for some graph classes (see Figure 1). We firstly show that every 2-edge connected chordal (a.k.a. C≥4 -free3 , meaning that no induce cycles with length 4 or longer; see Section 2 for terminology) is all-round. Since we observe that any bipartite graph is not all-round, we also define a similar notion of bipartite all-round for bipartite graphs, and show that every 2-edge connected chordal bipartite ({C≥6 , odd-cycle}-free) is bipartite all-round. Then, we show that every 2-edge connected cograph (P4 -free) is all-round, as well as every C≥5 -free graph is. What is interesting is that C5 is not all-round, nevertheless the results are extended to 2-edge connected P6 -free graphs, except for C5 (see Figure 1). As a consequence, we obtain that a 2-edge connected graph G of 2

Note that those hardness results are independent, e.g., “z = 3 is hard” does not imply “z = 2 is hard,” and vice versa. 3 “Cn+ℓ ” is often used instead of C≥ℓ , in the literature.

Table 2: Time complexity of the PHC problem for z = 3. Edge connectivity Complexity Detail analysis 4-edge connected P (Thm. 4.1) 3-edge connected unknown See Fig. 1 2-edge connected N P-complete (Thm. 3.6) (Section 4) 1-edge connected N P-complete Reduced to 2-edge connected (from 2-edge connected case) (Prop. 4.27, 4.28)

2

Figure 1: C≥5 -free graphs and P6 -free graphs are all-round in their triple. We conjecture that it holds for C≥6 -free and C≥7 -free, but seems not for C≥8 -free nor P7 -free. C≥5 -free or P6 -free has a PHC using each edge at most three times if and only if G is non-bipartite or the number of vertices of G is even, in a similar way to z = 4. Note that the HC problem is known to be NP-complete for C≥4 -free graphs, as well as for P5 -free graphs (see e.g., [2]). This paper is organized as follows. In Section 2, we introduce notations and define the PHC problem. In Section 3, we investigate the time complexity of the PHC problem with respect to z. In Section 4, we are concerned with the PHC problem when a closed walk is allowed to use each edge at most three times.

2 2.1

Preliminaries Terminology

We denote a graph with a vertex set V and an edge set E by G = (V, E). Sometimes we write V and E by V (G) and E(G). We in this paper, mainly concerned with connected undirected graphs. We call a spanning subgraph H of a graph G a factor, i.e., V (H) = V (G). Let NG (v) denote the set of neighboring vertices of v ∈ V in a graph G, and let δG (v) denote the set of incident edges to v. Let dG (v) denote the degree of a vertex v in G. We may simply use N (v), δ(v), and d(v) without confusing. For a vertex subset S ⊆ V , let G − S denote a graph obtained by deleting all vertices in S and all edges incident to them from G. Similarly, for an edge subset F ⊆ E, let G − F be a graph obtained by deleting all edges in F from G. Let Cl (resp. Pl ) denote a cycle (resp. path) with l vertices. A graph is Pl -free if it does not contain Pl as an induced subgraph. It is known that the class of P4 -free is equivalent to the class of cographs4 (cf. [2]). A graph is Cl -free if it does not contain Cl as an induced subgraph. A graph is C≥l -free if G is Cm -free for all m ≥ l. It is known that the class of C≥4 -free is equivalent to the class of chordal. 4 Here, we omit the definitions of cograph and chordal because of the page limitation. This paper requires the properties of P4 -free and C≥4 -free, only.

3

T -join. Let G = (V, E) be a graph and let T be a subset of V such that |T | is even. Then, J ⊆ E is a T -join if the graph K = (V, J) satisfies  1 if v ∈ T, dK (v) ≡ (mod 2) (1) 0 if v ∈ / T, for any v ∈ V [11]. T -join is a generalization of matching, meaning that J is a matching when all edges in J are disjoint. It is known that a T -join is found in O(|V | + |E|) time for any G = (V, E) and any T ⊆ V (cf. [7], see also Section A).

2.2

Parity Hamiltonian Cycle

A walk of a graph G is an alternative sequence of vertices and edges v0 e1 v1 · · · eℓ vℓ , where ei (1 ≤ i ≤ ℓ) is an edge connecting vi−1 and vi . Note that each vertex or edge may appear more than once in a walk. A walk is closed if v0 = vℓ . A closed walk is spanning if it visits every vertices in G. A parity Hamiltonian cycle (PHC) of G is a spanning closed walk of G in which each vertex appears odd number of times, when we ignore the starting vertex v0 . To make it clearer, we define the visit number of a vertex v in a walk by visit(v) =

1 X xe 2

(2)

e∈δ(v)

where xe denotes the number of appearance of e in the walk. Then, visit(v) ≡ 1 (mod 2) for any v in a PHC. Remark again, an edge may appear more than once in a PHC. For convenience, let PHCz denote a PHC using each edge at most z times. We call PHC problem with the upper bound z of edge uses for PHCz problem.

3 3.1

Complexity of The PHC Problem with Respect to z Polynomial time solvable case (z ≥ 4)

This section establishes the following theorem. Theorem 3.1. The PHC problem is in Pwhen a walk is allowed to use each edge at most four times. To begin with, we show the following Lemma 3.2. In fact, it is suggested by Brigham [3] based on depth first search, while we give another proof using T -join, as a preliminary of the arguments in this paper. Lemma 3.2 (cf. [3]). Every graph has a spanning closed walk which uses each edge at most four times and visits at least |V | − 1 vertices odd number of times. Proof. Let T be a subset of V . If |V | is even then let T = V , otherwise select one vertex v and let T = V \ {v}. Make a T -join J of G and let  2 if e ∈ J, xe ← 4 if e ∈ / J. Then, J suggests a connected Eulerian walk, and it is easy to see that the walk visits every vertex of T odd number of times by the definition (2) of visit(v). 4

Theorem 3.3. For any z ≥ 4, a graph G = (V, E) has a PHCz if and only if |V | is even or G contains an odd cycle. Proof. Sufficiency. In the case that |V | is even, the proof of Lemma 3.2 suggests that G has a PHC. Suppose that |V | is odd and that G contains an odd cycle C. We give a constructive proof. Let T = V \ V (C) and construct a T -join J. Then assign the value of xe as  1 if e ∈ / J and e ∈ E(C),    2 if e ∈ J and e ∈ / E(C), xe ← 3 if e ∈ J and e ∈ E(C),    4 if e ∈ / J and e ∈ / E(C).

The obtained walk visits every vertex of V odd number of times.

Necessity. Let G = (U, V ; E) be a bipartite graph with odd number of vertices. Assume for a contradiction that G has a PHC. Since visit(v) ≡ 1 (mod 2) for all v ∈ U ∪ V in the PHC, then X X visit(v) ≡ 1 ≡ |U ∪ V | ≡ 1 (mod 2). (3) v∈U ∪V

v∈U ∪V

On the other hand, since G is bipartite, any closed walk of G satisfies that X X visit(v). visit(u) =

(4)

v∈V

u∈U

By (4), X

v∈U ∪V

visit(v) =

X

v∈U

visit(v) +

X

visit(v) = 2

v∈V

X

visit(v) ≡ 0 (mod 2),

(5)

v∈U

which contradicts to (3). Thus G does not have a PHC. Theorem 3.1 is immediate from Theorem 3.3. Note that the proof also suggests a linear time algorithm to find a PHC4 , if it exists, using a linear time algorithm for T -join (see Appendix A).

3.2

Hard cases (z = 1, 2, 3)

In the previous section, we showed that the PHCz problems is in P for any z ≥ 4. This section shows that the PHCz problem is N P-complete for z = 1, 2, 3. Remark that the following Theorems 3.4, 3.5, and 3.6 are independent, e.g., PHC3 is N P-complete does not imply that PHC2 is N Pcomplete. Theorem 3.4. The PHC1 problem is N P-complete. Proof. It is known that the HC problem is N P-complete even when a given graph is 3-edge connected planar cubic [5]. It is not difficult to see that the PHC problem with z = 1 on a cubic graph is exactly the same as the HC problem. Theorem 3.5. The PHC2 problem is N P-complete, even when an input graph is restricted to be two-edge connected. Proof. We reduce the HC problem of cubic graphs to the PHC2 problem. Let G be a cubic graph as an input of the HC problem, then we construct a graph H for an input of the PHC2 problem, as follows (see also Figure 2): 5

• Subdivide every edge e = {v, u} ∈ E(G) into a path of length three, i.e., replace e by vertices ve , ue and edges {v, ve }, {ve , ue }, {ue , u}. • For each vertex v ∈ V (G), attach a cycle of length four, i.e., add vertices wv1 , wv2 , wv3 and edges {v, wv1 }, {wv1 , wv2 }, {wv2 , wv3 }, {wv3 , v}. For convenience, let V denote the set of original vertices, i.e., V = V (G), let Vs denote the set of vertices of ue , ve added by subdivision, i.e., |Vs | = 2|E(G)|, and let Vc denote the set of vertices of wv1 , wv2 , wv3 added as attaching cycles, i.e., |Vs | = 3|V (G)|, and hence V (H) = V ∪ Vs ∪ Vc . Then, we show that G has a HC if and only if H has a PHC2 . If G has a HC, we claim that a PHC2 is in H. Suppose that C ⊂ E(G) is a HC of G. For paths subdividing edges in E(G), set x{v,ve } = x{ve ,ue } = x{ue ,u} = 1 if e ∈ C, otherwise set x{v,ve } = x{ue ,u} = 2 and x{ve ,ue} = 0. For cycles attached to each v ∈ V (G), set x{v,wv1 } = x{wv1 ,wv2 } = x{wv2 ,wv3 } = x{wv3 ,v} = 1 (See P Figure 2). By the construction, it is not difficult to see that x suggests a walk on H, since e′ ∈δH (v′ ) xe′ is even for each v ′ ∈ V (H), and a HC C is connected on G. It is also not difficult to see that the visit number is three for each vertex in V , while it is one for each vertex in Vs ∪ Vc , meaning that the walk is an PHC2 of H. On the other hand, suppose that H has a PHC2 , then we claim that G has a HC. Firstly, note that any PHC2 of H visits every vertex of Vs ∪ Vc exactly once, since PHC2 is allowed to use every edge at most twice and dH (v ′ ) = 2 for v ′ ∈ Vs ∪ Vc . Applying the fact to a subdivided path, there are only three possible assignments of (x{v,ve } , x{ve ,ue } , x{ue ,u} ), that is (1, 1, 1), (2, 0, 2) or (0, 2, 0). In fact, (0, 2, 0) is inadequate since PHC2 is connected. Next, we remark that dH (v) = 5 for v ∈ V since G is cubic. Let a, b, c ∈ E(H) respectively denote edges incident to v other than {v, wv1 } and {v, wv3 }. Then, any assignments xa , xb , xc , x{v,wv1 } , x{v,wv3 } of a PHC2 must satisfy xa + xb + xc + x{v,wv1 } + x{v,wv3 } ≡ 2 (mod 4) by the parity condition on v. As we saw, x{v,wv1 } = x{v,wv3 } = 1 holds, which implies that xa + xb + xc ≡ 0

(mod 4)

holds. Since each of xa , xb , xc is at most 2, and none of them are equal to zero, exactly two of xa , xb , xc must be valued ones, and the other is valued two; meaning that exactly two of (1, 1, 1) subdivided paths connected to v. Now, let C ′ ⊂ E(G) be the set of edges corresponding to (1, 1, 1) paths in a PHC2 in H. Since PHC2 is connected, now it is clear that C ′ is a HC in G. In a similar way as the proof of Theorem 3.5, but more complicated, we can show the following. Theorem 3.6. The PHC3 problem is N P-complete, even if two-edge connected. Proof. In a similar way as the proof of Theorem 3.5, we reduce the HC problem for cubic graphs to the PHC problem of z = 3. We use the same gadget as Theorem 3.5: See Fig. 2. Suppose G has a HC. Since PHC2 is also PHC3 , we can obtain a PHC3 of H from a HC of G in the same way as Theorem 3.5. The proof of the converse is more complicated than Theorem 3.5. We use the same notations as the proof of Theorem 3.5. Since PHC3 visits v ′ ∈ Vc odd number of times, the values of x{v,wv1 } , x{wv1 ,wv2 } , x{wv2 ,wv3 } , x{wv3 ,v} are either all ones or all threes. On the other hand, the possible assignments of (x{v,ve } , x{ve ,ue } , x{ue ,u} ) are (1, 1, 1), (2, 0, 2), (3, 3, 3), (0, 2, 0), 6

(6)

Figure 2: A PHC2 around vertex v. being the last case (0, 2, 0) inadequate (since PHC3 is connected). Let a, b, c ∈ E(H) respectively denote edges incident to v other than {v, wv1 } and {v, wv3 }. Then, any assignments xa , xb , xc , x{v,wv1 } , x{v,wv3 } must satisfy xa + xb + xc + x{v,wv1 } + x{v,wv3 } ≡ 2 (mod 4) by the parity condition of v. As we saw, x{v,wv1 } = x{v,wv3 } = 1 or 3, both of which implies xa + xb + xc ≡ 0 (mod 4). Since each of xa , xb , xc is at most three, and none of them are equal to zero by (6), the possible assignments of them are either (xa , xb , xc ) = (1, 1, 2) or (3, 3, 2). The two possibilities above respectively implies that, the assignment for the three subdivided paths incident to v consists of two (1, 1, 1)s and one (2, 0, 2) in the former case, while two (3, 3, 3)s and one (2, 0, 2) in the latter case. Let C ′ ∈ E(G) be the set of edges which are corresponding to paths in H assigned as (1, 1, 1) and (3, 3, 3). Since PHC3 is connected, C ′ is clearly a HC of G.

4

The PHC3 Problem

This section further investigates the PHC3 problem. To begin with, Section 4.1 shows that the PHC3 problem is in P for four-edge connected graphs.

4.1

Four-edge connected graphs

Theorem 4.1. Every four-edge connected graph has a PHC3 . To prove Theorem 4.1, we use the following theorem. Theorem 4.2 ([9, 6]). Every 4-edge connected graph has two edge disjoint spanning trees. of Theorem 4.1. In the case that an input graph G = (V, E) satisfies that |V | is odd and G is bipartite, (the necessity part of) Theorem 3.3 implies that G does not have any PHC3 . Suppose 7

that G = (V, E) is not in the case, and that G is 4-edge connected. Then, we construct a PHC3 using Theorem 4.2, as follows. Let T and T ′ be an arbitrary pair of edge disjoint spanning trees5 of G. First, let xe ← 2 for all e ∈ E(T ), and we obtain a connected spanning walk on G. Let S denote the set of vertices which the walk visits even number of times. Note that S is the set of vertices with even degree of T , and hence |V \ S| is even. In the case that |V | is even, meaning that |S| is even, then find a S-join J on T ′ and let xe ← 2 for all e ∈ J. The obtained walk is a PHC3 of G. In the case that |V | is odd, meaning that |S| is odd, then G has an odd cycle by the assumption. Choose an arbitrary vertex v ∈ S and find an odd cycle C ∈ E containing v. Set xe ← xe + 1 for all e ∈ C, then |S| becomes even6 . Construct a S-join J on T ′ , and let xe ← 2 for all e ∈ J. Since every e is used at most once in C and at most twice in either T or T ′ , the obtained walk is a PHC3 of G. The proof also suggests a polynomial-time algorithm to find a PHC3 . As we showed in Theorem 3.6, the PHC3 problem for 2-edge connected graphs is N P-complete. The complexity for 3-edge connected graphs remains unsettled. As an approach to the PHC3 problem for 3-edge connected graphs, the rest of this section further investigates the PHC3 problem for 3-edge connected (actually, 2-edge connected) graphs.

4.2

Preliminary: mod-4 all-roundness

As a preliminary of our detailed analysis of PHC3 in two-edge connected graphs, this section introduces notions of modulo factors and all-roundness. To begin with, let us explain the idea. A multidigraph representing a PHC (see Figure 3, left) satisfies that the out-degree (as well as in-degree) is 2mv − 1 (mv ∈ Z>0 ) for each v ∈ V . Let H denote the undirected graph ignoring the direction, then dH (v) = 4mv −2 (i.e., dH (v) ≡ 2 (mod 4)) holds for any v ∈ V P (see Figure 3, right). Thus, a PHC3 is explained using variables xe ∈ {0, 1, 2, 3} (e ∈ E) satisfying e∈δ(v) xe ≡ 2 (mod 4) for all v ∈ V , i.e., a vector (xe )e∈E suggests a closed Eulerian walk by the connectivity and degree conditions.

Figure 3: A PHC as a directed graph and an undirected graph. The left figure shows a PHC regarded as a digraph, and the right one shows an undirected graph obtained by ignoring the direction of edges. The numbers respectively denote the visit numbers of vertices in the left, and the degrees in mod 4 in the right.

Given a positive integer d and a function f : V → {0, 1, . . . , d − 1}, a vector (xe )e∈E is mod-d f -factor if it satisfies X xe ≡ f (v) (mod d) (7) e∈δ(v)

5 6

Such T and T ′ are found in polynomial time [11] (e.g. O(|E|2 ) time, due to Roskind, Tarjan [10]). where it does not matter that |S| increases.

8

for any v ∈ V . A mod-d f -factor is connected if there are no edge cuts C ⊆ E with xe = 0 (∀e ∈ C). For instance, let f (v) = 2 for each v ∈ V , then a connected mod-4 f -factor of G satisfying xe ≤ 3 for all e ∈ E suggests a PHC3 in G. In the following, we are concerned with the case of d = 4. Proposition P 4.3. If G is non-bipartite, G has a mod-4 f -factor for each f : V → {0, 1, 2, 3} which satisfies v∈V f (v) ≡ 0 (mod 2). Proof. We give a constructive proof. First initialize the value of xe , namely, xe ← 0 for all e ∈ E. let T := {v | f (v) ≡ 1 (mod 2)} and compute a T -join J. For all e ∈ J let xe ← 1. Then define   X xe  mod 4 f ′ (v) = f (v) − (8) e∈δ(v)

for all v ∈ V , and let S := {v | f ′ (v) = 2}. Then v ∈ S is a vertex to be visited odd number of times and other vertices are to be visited even number of times: We use 4.1 to construct the walk. Algorithm 4.1 Construction of a spanning closed walk which visits vertices in S odd number of times and other vertices even number of times /* Initialization */ for all e ∈ E do xe ← 0 end for /* |S| is odd and G has an odd cycle, traverse the cycle once */ if |S| is odd and G has an odd cycle C then for all e ∈ E(C) do xe ← 1 end for end if T ← {v | (v ∈ S and visit(v) is even) ∨ (v ∈ / S and visit(v) is odd)} if |T | is odd then return // It is impossible to construct the desired walk end if /* make round trips between vertices with even visit numbers */ Make T -join J for all e ∈ J do xe ← xe + 2 end for /* ensure the connectedness of the walk */ for all e ∈ E do if xe = 0 then xe ← 4 end if end for Thus we can obtain a mod-4 f -factor, in which some edges might be used more than 4 times. Let xe ← xe mod 4 for all edge e ∈ E, and finally we can obtain a mod-4 f -factor with xe ≤ 3 for all e ∈ E.

9

|V | |V | For a graph P G, there are d = 4 Ppossibilities of f . A mod-4 f -factor exists only when f satisfies that v∈V f (v) is even: When v∈V f (v) is odd, (7) is always violated since

X

f (v) ≡

v∈V

and

P

v∈V

P

e∈δ(v)

X X

xe

(mod 4)

v∈V e∈δ(v)

xe is even for any (xe )e∈E (the handshaking lemma).

Definition 4.4 (mod-4 all-round in its triple). Let G = (V, E) be a graph, P and let F denote the collection of all maps f : V → {0, . . . , 3} satisfying the condition that v∈V f (v) is even. We say that G is mod-4 all-round in its triple if there exists a connected mod-4 f -factor with xe ≤ 3 (∀e ∈ E) for each f ∈ F. Clearly, if a graph G is mod-4 all-round in its triple then a PHC3 exists in G. Unfortunately, we observe that any bipartite graph with at least two vertices is not mod-4 all-round in its triple (Proposition 4.5). Proposition 4.5. Let G = (U, V ; E) be a bipartite graph. Then, G has a mod-4 f -factor with xe ≤ 3, ∀e ∈ E if and only if f : V → {0, 1, 2, 3} satisfies X X f (v) ≡ f (v) (mod 4). (9) v∈U

v∈V

Proof. Necessity is clear, so we prove the sufficiency. The proof is constructive. Suppose f satisfies (9). Let T := {v | f (v) ≡ 1 (mod 2)} and J be a T -join, and let xe ← 1 for all e ∈ J and xe ← 0 for all e ∈ / J. Define f ′ as (8). Then f ′ satisfies X X f ′ (v) ≡ f ′ (v) (mod 4) (10) v∈U

v∈V

and f ′ (v) is either 0 or 2 for all v ∈ U ∪ V . Let S := {v | f ′ (v) = 2}. From (10), X X X f ′ (v) = f ′ (v) + f ′ (v) v∈U ∪V v∈U v∈V X X ≡ f ′ (v) − f ′ (v) v∈U

=0

(11)

v∈V

(mod 4),

hence |S| is even. Then make a S-join J ′ and let xe ← xe + 2 for all e ∈ J ′ . Thus we can obtain a mod-4 f -factor with xe ≤ 3 for all e ∈ E. Thus, we define the notion of bipartite all-roundness for bipartite graphs. Definition 4.6 (mod-4 bipartite all-round in its triple). Let G =P (U, V ; E) be aPbipartite graph, and let F be a collection of maps f : V → {0, 1, 2, 3} satisfying that v∈U f (v) ≡ v∈V f (v) (mod 4). We say that G is mod-4 bipartite all-round in its triple if there exists a connected mod-4 f -factor with xe ≤ 3 (∀e ∈ E) for each f ∈ F. In a similar way as the non-bipartite case, if a graph G is mod-4 bipartite all-round in its triple then a PHC3 exists in G. To be precise, the next proposition explains a relation between facts that a graph is all-round in its triple and that the graph has a PHC3 .

10

Figure 4: Mod-4 all-roundness of K3 in its triple graph. A number beside a vertex represents the value of f . For each f , a connected mod-4 f -factor is showed, where a dotted line means the edge e with xe = 0. There are 32 possibilities of f , the number is reduced to ten by the parity condition and the symmetry of the graph. Proposition 4.7. Suppose that a (simple) graph G is mod-4 all-round (or bipartite all-round) in its triple graph. Then, G has a PHC3 if and only if G is non-bipartite or G has even number of vertices. Proof. Sufficiency. If G is not bipartite, then G is mod-4 all-round in its triple graph by the assumption, and hence G has a PHC3 . Suppose G is a bipartite graph with even number of vertices. Since G is mod-4 bipartite all-round in its triple graph, G has a connected mod-4 f -factor with f (v) = 2, ∀v ∈ V (G) and xe ≤ 3, ∀e ∈ E (note that this f satisfies (9), which suggests a PHC3 of G. Necessity. It is immediate from the necessary part of Theorem 3.3. In the following subsections, we discuss the mod-4 all-roundness (resp. mod-4 bipartite allroundness) of a graph in its triple, to investigate graphs of PHC3 . As a preliminary step, we give a remark on the all-roundness for some small graphs. Lemma 4.8. K3 is mod-4 all-round in its triple graph. Proof. The lemma is established by checking that G has a connected mod-4 f -factor with xe ≤ 3, ∀e ∈ E for each f (see also Figure 4). By exhaustive check, we can see the following. Lemma 4.9. C4 and C6 are mod-4 bipartite all-round in their triple graphs. We also remark the following exceptional example. Proposition 4.10. C5 is not mod-4 all-round in its triple. However, C5 has a PHC3 clearly.

11

Figure 5: A counterexample for the all-roundness of the triple graph of C5 . A number beside a vertex represents the value of f . If f is given as above, any mod-4 f -factors of C5 which satisfies xe ≤ 3 are disconnected.

4.3

Mod-4 all-roundness of 2-edge connected graphs

Now, we explain our results on the mod-4 all-roundness of 2-edge connected graphs. For this purpose, we introduce the following two useful lemmas 4.11 and 4.15. Lemma 4.11. Suppose that a 2-edge connected graph G is mod-4 all-round in its triple. Let G′ be a graph obtained by adding an ear with length at most seven, then G′ is also mod-4 all-round in its triple. Proof. Let P be the ear added to G and ℓ denote its length (ℓ ≤ 7). Let v0 , v1 , . . . , vℓ denote the vertices of P and e1 , . . . , eℓ denote the edges of P , where eiP is the edge between vi−1 and vi . We claim that, for each f : V (G′ ) → {0, 1, 2, 3} which satisfies v∈V f (v) is even, there exists a connected mod-4 f -factor of G′ which satisfies xe ≤ 3 for all e ∈ E(G′ ). Since G is mod-4 all-round in its triple graph, the only critical thing is that there exists a mod-4 f -factor which makes all of the vertices in P connected: In precise, there exists an assignment for xe0 , . . . xeℓ (xei ∈ {0, 1, 2, 3}) which satisfies xei−1 + xei ≡ f (vi ) (mod 4), 1 ≤ i ≤ ℓ and xei = 0 for at most one edge ei . If we have such an assignment, we can obtain a connected mod-4 f ′ -factor of G which satisfies xe ≤ 3 for all e ∈ E(G), where   X f ′ (v) = f (v) − xe  mod 4, (12) e∈δ(v)

and thus obtain a connected mod-4 f -factor of G′ which satisfies xe ≤ 3 for all e ∈ E(G′ ) by combining (xei )ei ∈E(P ) and the mod-4 f ′ -factor. Consider a walk from v0 to vℓ in G, say P ′ , whose length ℓ′ satisfies ℓ + ℓ′ ≡ 0 (mod 2). Since G is mod-4 all-round, hence G is non-bipartite, we can find a walk from v0 to vℓ in G whichever ℓ′ is even or odd. Then the concatenation of P and P ′ forms an even cycle, say C. (Note that the cycle is not necessarily simple; a cycle can use each edge many times.) Let 2m = ℓ + ℓ′ and e1 , . . . , e2m denote the edges of C, where ei (1 ≤ i ≤ ℓ) are the edges of P . We write xi = xei (1 ≤ i ≤ 2m) for convenience. For a mod-4 f -factor of G′ and C, only the following four operations do not break the degree constraint f : 1. None. 2. xi ← xi + 1 mod 4 for odd i and xi ← xi − 1 mod 4 for even i. 12

3. xi ← xi + 2 mod 4 for all i. 4. xi ← xi − 1 mod 4 for odd i and xi ← xi + 1 mod 4 for even i. We claim that for every f , there exists a connected mod-4 f -factor of G′ which satisfies xe ≤ 3 for all e ∈ E(G′ ) which is obtained by one of the four operations above. For a contradiction, assume that for every mod-4 f -factor of G′ which satisfies xe ≤ 3 for all e ∈ E(G′ ), obtained by the four operations above, xi = 0 for at least two edges ei ∈ E(P ). For each ei , the number of operations which makes the value of xi zero is exactly one, which implies there are at least eight edges in P , contradiction to the fact that ℓ ≤ 7. Similar lemmas are obtained if G is bipartite. Lemma 4.12. Suppose that a 2-edge connected graph G is mod-4 bipartite all-round in its triple. Let G′ be a non-bipartite graph obtained by adding an ear with length at most three, then G′ is mod-4 all-round in its triple. Proof. The proof is similar to Lemma 4.11, the crucial difference is that G is bipartite. Let P the the ear added to G, and ℓ be its length. Let v0 , . . . , vℓ be the vertices of P and e1 , . . . , eℓ be the edges of P , where ei is the edge connecting vi−1 and vi . since G′ is non-bipartite, we can find a closed walk C = v0 e0 . . . vℓ eℓ+1 vℓ+1 . . . v2m−1 e2m−1 v0 of odd length, where vℓ+1 , . . . v2m−1 are the vertices of G and eℓ+1 , . . . , e2m−1 are the edges of G. Then there are two operations for a mod-4 f -factor of G′ and C, which do not break the degree constraint f : 1. None, 2. xi ← xi + 2 mod 4 for all i, where xi = xei for each ei ∈ E(P ). Because ℓ ≤ 3, At most one of x1 , . . . , xℓ is equal to zero in a mod-4 f -factor of G′ generated by at least one of the two operations. Let (xi ) be such an assignment for edges in E(P ). Then we can find a connected mod-4 f ′ -factor of G since G is mod-4 all-round in its triple graph, where f ′ is defined as (12). Thus we can obtain a connected mod-4 f -factor of G′ by combining the mod-4 f ′ -factor and (xi ). Lemma 4.13. Suppose that a 2-edge connected graph G is mod-4 bipartite all-round in its triple. Let G′ be a bipartite graph obtained by adding an ear with length at most seven, then G′ is mod-4 bipartite all-round in its triple. ′ Proof. P The proof is same P as Lemma 4.11. Note that, for mod-4 f -factors of G , Only f ’s which satisfy v∈U f (v) ≡ v∈V f (v) (mod 4) are to be considered.

Combining lemmas 4.8 and 4.11, we obtain the following.

Theorem 4.14. If a 2-edge connected graph G be has an ear decomposition satisfying both of the following properties: • Every ear has length at most seven, and • The last ear is K3 , then G is mod-4 all-round in its triple graph.

13

We apply the idea of Lemma 4.11 to C≥4 -free (as well as, P5 -free, C≥5 -free, P7 -free, respectively), in the following. The following lemma is the key idea. Lemma 4.15. Let G be a graph. If for all edge cuts C ⊆ E(G) there exists a subgraph H of G such that C ∩ E(H) 6= ∅ and H is mod-4 all-round (or mod-4 bipartite all-round) in its triple, then G is mod-4 all-round (or bipartite all-round when G is bipartite) in its triple. Proof. The proof is constructive. Suppose G is non-bipartite. By Proposition 4.3, we can obtain a mod-4 f -factor for any f , which satisfies xe ≤ 3 for all e ∈ E(G), which may be NOT connected. In what follows we explain the strategy to transform the obtained factor to a connected factor of G. First find an edge cut C ⊆ E(G) such that xe = 0 for all e ∈ C, then e is contained in a subgraph H of G such that H is mod-4 all-round (or mod-4 bipartite all-round) in its triple. Let (xe )e∈E(H) be the current factor of H. Define fH as X fH (v) = f (v) − xe mod 4 (v ∈ V (H)). (13) e∈δ(v),e∈E(H) /

Since H is mod-4 all-round (or mod-4 bipartite all-round) in its triple, H has a connected mod-4 fH -factor (ye )e∈E(H) which satisfies ye ≤ 3 for all e ∈ E(H) 7 . Then replace (xe ) by (ye ), the factor of H is connected, and C is no longer a disconnecting cut in G (Figure 6). By the repeated uses of the strategy above, the connect components of the mod-4 f -factor we first obtained are all combined into one connected mod-4 f -factor, without breaking the degree constraint f for each v ∈ V (G), and the upper bound of edge uses 3 for each e ∈ E(G). Thus we can obtain a connected mod-4 f -factor of G which satisfies ye ≤ 3 for all e ∈ E(G). If G is bipartite, one can apply the same strategy; the only difference is that f is restricted to those which satisfies (9).

Figure 6: Combining strategy. The thick lines represent a mod-4 f -factor of H, which is disconnected in the left figure. Dotted lines represent edges with xe = 0. Using the mod-4 all-roundness of H, we can transform the factor to a connected one, as in the right figure.

The following lemma is a special case of Lemma 4.15. Lemma 4.16. Let G = (V, E) be a graph. Suppose that for all edge e ∈ E there exists a subgraph H of G such that e ∈ E(H) and H is mod-4 all-round (or mod-4 bipartite all-round) in its triple. Then, G is mod-4 all-round (or bipartite all-round when G is bipartite) in its triple. Using Lemma 4.16, Lemmas 4.8 and 4.9 we can see the following. Corollary 4.17. If every edge of G belongs to a triangle, a square, or a cycle of length six, then G is either mod-4 all-round or mod-4 bipartite all-round in its triple. 7

Note that, if H is bipartite, fH satisfies (9) for V (H).

14

Now we show the mod-4 all-roundness of graphs in particular classes. Theorem 4.18. Every 2-edge connected chordal graph is mod-4 all-round in its triple graph. Proof. Every edge in a 2-edge connected chordal graph belongs to a triangle. By Corollary 4.17, G is mod-4 all-round in its triple graph (Note that G is not bipartite). Theorem 4.19. Let G be any 2-edge connected chordal bipartite graph. Then G is mod-4 bipartite all-round in its triple graph. Proof. Similar to Theorem 4.18, every edge in a 2-edge connected chordal graph belongs to a square. Using the fact that G is bipartite and Corollary 4.17, G is mod-4 bipartite all-round in its triple graph. Theorem 4.20. Every 2-edge connected P4 -free graph is mod-4 all-round (or mod-4 bipartite allround) in its triple graph. Proof. Let G be a 2-edge connected P4 -free graph. Since G is 2-edge connected, for each edge e ∈ E(G), there exist at least one cycle that contains e. By Corollary 4.17, it is sufficient to show that all edges of G belongs to a triangle or square. We will show the following proposition for every ℓ ≥ 3: Proposition 4.21. If an edge e is contained in a cycle of length ℓ, then e is contained in a triangle or square. The proof is proceeded by the induction on ℓ. Base case. If ℓ = 3, 4, e is obviously contained in a triangle or square. Inductive step. Assume Proposition 4.21 holds for all k (3 ≤ k ≤ ℓ − 1). Suppose e belongs to a cycle of length ℓ. Note that P4 -free graphs are (5, 1)-chordal: That is, each cycle of P4 -free graphs whose length is at least five, has at least one chord. Hence, e also belongs to a cycle of length k (3 ≤ k ≤ ℓ − 1) which uses the chord. By the induction hypothesis, e is contained in a cycle three or four. Corollary 4.22. Every 2-edge connected C≥5 -free graph is either mod-4 all-round or mod-4 bipartite all-round in its triple graph. Proof. We can prove this just in the same way as Theorem 4.20: Replace “P4 ” by “C≥5 ” in the proof. Theorem 4.23. Suppose that G is a 2-edge connected P6 -free graph, where G 6= C5 . Then, G is mod-4 all-round (or mod-4 bipartite all-round) in its triple graph. Proof. The proof is similar to Theorem 4.20, but more complicated. Instead of Proposition 4.21, we show the following: Proposition 4.24. If an edge e is contained in a cycle of length ℓ, then e is contained in a subgraph H of G which is either mod-4 all-round or mod-4 bipartite all-round in its triple graph. If Proposition 4.24 holds for all e ∈ E and ℓ ≥ 3, By Lemma 4.16, G is mod-4 all-round in its triple graph. We show Proposition 4.24 by the induction on ℓ ≥ 3, except for ℓ = 5, due to the fact that C5 is not mod-4 all-round in its triple graph (See Proposition 4.10). Then we show Proposition 4.24 for ℓ = 5. 15

Base Case. If ℓ = 3, 4, 6, using Lemmas 4.8 and 4.9, Proposition 4.24 holds. Inductive Step. First we consider ℓ = 7, 8, 9. For any P6 -free graphs G, every cycle of length at most seven in G has two chords which do not have common endvertices. Let e, f be such two chords. We call a chord e of a cycle C of length ℓ separates C into (a, ℓ − a) (a ≤ ℓ − a) if the distance of two endvertices of e along C is a. Suppose ℓ = 7. If either e or f separates C into (2, 5), then we can use the induction hypothesis because each edge of C is contained in C3 or C6 . If both e and f separates C into (3, 4), there are two possibilities of C + e + f up to the isomorphism, both are mod-4 all-round in their triple graphs using Lemmas 4.9, 4.11 and 4.12. If ℓ = 8, a chord of C might separates C into (2, 6), (3, 5) or (4, 4). If either e or f separates C into (2, 6) or (3, 5), we can use the induction hypothesis. If both e and f separates C into (4, 4), there are two possibilities of C + e + f up to the isomorphism, both are mod-4 all-round in their triple graphs using Lemmas 4.9, 4.11 and 4.12. If ℓ = 9, a chord of C might separates C into (2, 7), (3, 6) or (4, 5). If either e or f separates C into (2, 7) or (3, 6), we can use the induction hypothesis. If both e and f separates C into (4, 5), there are three possibilities of C + e + f up to the isomorphism, all of them are mod-4 all-round in their triple graphs using Lemmas 4.9, 4.11 and 4.12. Now we consider ℓ ≥ 10. If either e or f separates C into (a, ℓ − a) where a + 1, ℓ − a + 1 6= 5, we can use the induction hypothesis. If both e and f separates C into (4, ℓ − 4), there exists a chord g of C which does not “cross” e; that is, if u1 , u2 are endvertices of e and v1 , v2 are endvertices of g, either clockwise or anticlockwise closed walk of C contains four vertices u1 , v1 , v2 , u2 in this order (or its cyclic shifts). Thus, each edge of C is contained in a cycle of length at most ℓ − 1 and not equal to five, we can use the induction hypothesis. Then we have showed that Proposition 4.24 holds for every ℓ ≥ 3, except for ℓ = 5. Now we show Proposition 4.24 for ℓ = 5, that is, assume that e is contained in a cycle of length five. Let C be the cycle. There are two possibilities: Only C contains e or there exists other cycles which contains e. First we consider the former case. Since only C contains e, C does not have chords. Furthermore, since we assume G 6= C5 , there exists a vertex v ∈ V (C) that is contained in a cycle other than C, which implies there exists an edge f ∈ δ(v) such that v ∈ V (C) and f ∈ / E(C). Since G is P6 -free and 2-edge-connected, f is contained in a triangle: Otherwise, G has a P6 as an induced subgraph. Thus, a graph obtained by combining C and the triangle is mod-4 all-round in its triple graph by Lemma 4.14, e is contained in a subgraph of G which is mod-4 all-round in its triple graph. Consider the latter case, If one of the cycles that contain e has the length other than five, the arguments for ℓ 6= 5 establishes Proposition 4.24 for e. Suppose all cycles that contain e has the length five. Let C ′ be one of the cycles. Then C and C ′ has common edges, let k be the number of the edges. If k = 2 or 3, Lemmas 4.9 and 4.12 imply that C ∪ C ′ is mod-4 all-round in its triple graph. If k = 1, C ∪ C ′ − e is a cycle of length eight. Thus C ∪ C ′ − e has a chord f 6= e, Same as the case ℓ = 8, C ∪ C ′ + f is mod-4 all-round in its triple. Then e is contained in a subgraph of G which is mod-4 all-round in its triple graph, Proposition 4.24 holds for e. Finally, Lemma 4.7 suggests the following. Corollary 4.25. Suppose that a 2-edge connected graph G is P6 -free or C≥5 -free 8 . Then, G has a PHC3 if and only if G is non-bipartite or has even number of vertices. 8

Note that these classes include C≥4 -free (=chordal) graphs and P4 -free graphs (=cographs).

16

In addition, if G is a 2-edge connected graph and G is chordal, P4 -free or C≥5 -free, a PHC3 of G is found in a polynomial-time. It may hold also for P5 -free and P6 -free graphs, while we have not proved yet.

4.4

Mod-4 all-roundness of graphs with bridges

This subsection is concerned with graphs with bridges. Theorem 4.26. For a graph G = (V, E), let B ⊆ E(G) denote the set of bridges, and let S ⊆ V denote the set of isolated vertices in G − B. If S = ∅ and every 2-edge connected component in G − B is mod-4 all-round in its triple, then G is mod-4 all-round in its triple. Proof. Let C1 , . . . , Cl be the components of G − B and let H be a graph obtained by contracting every Ci in G. Let u1 , . . . ,P ul be the vertices of H (i.e., each ui corresponds to Ci ). For each Ci , compute the value of si = v∈Ci f (v), and let T ⊆ V (H) be T = {ui | si ≡ 1 (mod 2)}. Let J be a T -join of H. Then, set the values of xe by  1 if e ∈ J, xe = 2 if e ∈ / J. for each e ∈ B, and set 

f ′ (v) = f (v) −

X

e∈δ(v)



xe  mod 4

for each v ∈ V (G). Since each Ci is mod-4 all-round in it triple, each Ci has a mod 4 f ′ -factors. Joining them by xe (e ∈ B) on G, then we obtain a mod-4 f -factor with xe ≤ 3 (e ∈ E). The following two propositions respectively provide necessary and sufficient conditions that G contains a PHC3 when S 6= ∅. Proposition 4.27. For a graph G = (V, E), let B ⊆ E(G) denote the set of bridges, and let S ⊆ V denote the set of isolated vertices in G − B. If G contains a PHC3 , then dG (v) is odd for any v ∈ S. Proposition 4.28. For a graph G = (V, E), let B ⊆ E(G) be the set of bridges, and Suppose that dG (v) is odd for any v ∈ S and that every connected component of G − S is mod-4 all-round in its triple, then G has a PHC3 . Theorem 4.26 and Propositions 4.27 and 4.28 implies that the decision whether a graph with bridges has a PHC3 is reduced to 2-edge connected graphs. Theorem 4.29. Suppose that G = (V, E) is a connected P6 -free, or C≥5 -free graph. Let S ⊆ V denote the set of isolated vertex in G − B. Note that S = ∅ if G is 2-edge connected, while the reverse is not true. Then, G has a PHC3 if and only if dG (v) is odd for any v ∈ S.

4.5

Mod-4 all-roundness of Dense Graphs

This subsection considers dense graphs. Theorem 4.30. Suppose that G = (V, E) has at least three vertices and that the minimum degree δ(G) satisfies δ(G) ≥ |V |/2. Then G is mod-4 all-round (or bipartite all-round if G is bipartite) in its triple. 17

Proof. Let n = |V | and x, y be any pair of vertices of G. If n is odd, there exists a vertex z ∈ N (x) ∩ N (y) since d(x), d(y) ≥ n/2. Thus, the edge xy is contained in a triangle, by Lemma 4.8 and Lemma 4.16, G is mod-4 all-round in its triple. If n is even, there are two possibilities: Either x and y have a common neighbor or not. If the common neighbor of x and y exists, then the edge xy is contained in triangle(K3 ). Otherwise, since d(x) ≥ n/2 and d(y) ≥ n/2, there exists vertices z and w such that z ∈ N (x) and z 6= y, w ∈ N (y) and w 6= x, and z and w are adjacent. In this case the edge xy belongs to a cycle of length four. By Lemmas 4.8, 4.9 and Lemma 4.16, G is either mod-4 all-round or mod-4 bipartite all-round in its triple. We also see the mod-4 all-roundness of graphs with minimum degree δ(G) ≥ |V |/3, see Appendix B for the proof. Theorem 4.31. Suppose that G = (V, E) has at least four vertices and that the minimum degree δ(G) satisfies δ(G) ≥ |V |/3. Then G is mod-4 all-round (or bipartite all-round if G is bipartite) in its triple.

5

Concluding Remarks

In this paper, we have introduced the parity Hamiltonian cycle problem. We have shown that the problem is in P when z ≥ 4, while N P-complete when z ≤ 3. Then, we are involved in the case z = 3, and showed some graph classes for which the problem is in P. It is open if the PHC3 problem is in P for three-edge connected graphs. More sophisticated arguments on the connection between the PHC problem and related topics, such as HC, T -join, even-factors, extended complexities, jump systems, etc., are significant future works.

References [1] S. Boyd, S. Iwata, K. Takazawa: Finding 2-factors closer to TSP walks in cubic graphs, SIAM Journal on Discrete Mathematics, 27 (2013), 918–939. [2] A. Brandstaedt, V.B. Le, J.P. Spinrad: Graph Classes: A Survey, Society for Industrial and Applied Mathematics, 1987. [3] R.C. Brigham, R.D. Dutton, P.Z. Chinn, F. Harary: Realization of parity visits in walking a graph, The College Mathematics Journal, 16 (1985), 280–282. [4] P.A. Catlin: A reduction method to find spanning Eulerian subgraphs, Journal of Graph Theory, 12 (1988), 29–44. [5] M.R. Garey, D.S. Johnson, R.E. Tarjan: The planar Hamiltonian circuit problem is NPcomplete, SIAM Journal on Computing, 5 (1976), 704–714. [6] D. Gusfield: Connectivity and edge-disjoint spanning trees, Information Processing Letters, 16 (1983), 87–89. [7] B. Korte, J. Vygen: Combinatorial Optimization: Theory and Algorithms, Fifth Edition, Springer-Verlag, 2012.

18

[8] L. Lesniak, O.R. Oellermann: An Eulerian exposition, Journal of Graph Theory, 100 (1986), 277–297. [9] C. St. J. A. Nash-Williams: Edge-disjoint spanning trees of finite graphs, Journal of the London Mathematical Society, 36 (1964), 445–450. [10] J. Roskind, R. E. Tarjan: A note on finding minimum-cost edge-disjoint spanning trees, Mathematics of Operations Research, 10 (1985), 701–708. [11] A. Schrijver: Combinatorial Optimization, Springer, 2003. [12] M. Yannakakis: Expressing combinatorial optimization problems by linear programs, Journal of Computer and System Sciences, 43 (1991), 441–466.

19

A

Finding A T -Join in Linear Time

In this section we describe an algorithm to find a T -join of graphs. Algorithm A.1 Construction of T -join MAKE-T -JOIN (G, T ) for all v ∈ V (G) do v.color ← WHITE end for exchange f lg ← FALSE J ←∅ for all v ∈ V (G) do if v.color = WHITE then MAKE-T -JOIN-REC (G, T, v) if exchange f lg = TRUE then return FALSE end if end if end for return J

Algorithm A.2 Body of Constructing T -join MAKE-T -JOIN-REC (G, T, v) v.color ← BLACK if v ∈ T then exchange f lg ← exchange f lg end if for all u ∈ N (v) do if u.color = WHITE then if exchange f lg = TRUE then J ← J △ {u, v} end if MAKE-T -JOIN-REC (G, T, u) if exchange f lg = TRUE then J ← J △ {u, v} end if end if end for The input of Algorithm A.1 is the pair of undirected graph G and vertex set T ⊆ V , and the output is T -join J of G. Note that we does not assume the input graph G is connected; Algorithm A.1 also works in disconnected graphs. The key idea of Algorithm A.1 is using the depth first search; Algorithm A.1 traces each edge of G deciding whether the looking edge is a member of J. The variables of Algorithm A.1 are color, exchange f lg and J. color is an attribute of a vertex v which indicates whether v is already traced or not; v.color is BLACK if v is already traced, WHITE otherwise. exchange f lg determines the looking edge should be picked for J or not; if 20

exchange f lg is TRUE the looking edge is picked for J (if e is not a member for J) or removed from J (if e is a member of J), otherwise do nothing. J is the output of Algorithm A.1, that is, a T -join of G. Proposition A.1. Algorithm A.1 correctly computes a T -join of G, and runs in linear time. Proof. We first show that Algorithm A.1 correctly computes a T -join. For any connected component C of G, the number of inversion of exchange f lg is equal to |C ∩ T |. Therefore, if |C ∩ T | is odd for some connected component, the value of exchange f lg is inverted odd number of times, then MAKE-T -JOIN returns FALSE. Note that G does not have T -joins in this case. Suppose |C ∩ T | is even for every connected component C of G. Let H be a graph obtained by doubling each edge in G. Then Algorithm A.1 uses the depth first search on G, each edge of H is traced exactly once. Let e1 , e2 ∈ E(H) be the duplicated edges which corresponds to e ∈ E(G), and let J ′ ⊆ E(H) be a set of edges which are passed when exchange f lg = 1. Then, the output of Algorithm A.1 J is equal to {e ∈ E(G) | (e1 ∈ J ′ ) ⊻ (e2 ∈ J ′ )}9

(14)

since e is a member of J if and only if either one of e1 or e2 is passed when exchange f lg = 1. For each v ∈ T , the value of exchange f lg is inverted if and only if we first visit v, which causes |δH (v) ∩ J ′ | to be odd. On the other hand, |δH (v) ∩ J ′ | is even for v ∈ / T , since exchange f lg is not ′ inverted when we visit v. By (14), |δH (v) ∩ J | ≡ |δG (v) ∩ J| (mod 2) for each v ∈ V (G), which implies J is a T -join of G. Since Algorithm A.1 only uses depth first search with constant time overheads, it runs in linear time.

B

Omitted Proofs

In this section we complement the omitted proofs. Theorem B.1 (Theorem 4.31). Suppose that G = (V, E) has at least four vertices and that the minimum degree δ(G) satisfies δ(G) ≥ |V |/3. Then G is mod-4 all-round (or bipartite all-round if G is bipartite) in its triple. To prove Theorem B.1, we show the following lemmas. Lemma B.2. Let G, H be graphs which are mod-4 all-round in their triple graphs. If I is a graph which is obtained by connecting G and H by an edge, then I is mod-4 all-round in its triple graph. Proof. Let G and H. We can see there exists an appropriate value of xe : Pe be the edges connecting P xe = 1 if v∈V (G) f (v)(≡ v∈V (H) f (v)) ≡ 1 (mod 2) and xe = 2 otherwise. Lemma B.3. Let G be a graph which is mod-4 all-round in its triple graph and let H be a graph which is mod-4 bipartite all-round in its triple graph. If I is a graph which is obtained by connecting G and H by at least two edges, then I is mod-4 all-round in its triple graph.

Proof. Let e1 , e2 be the edges connecting G and H. We can see there exist appropriate values of xe 1 , xe 2 . 9

The operator ⊻ means exclusive-or, that is, p ⊻ q is true when exactly one of p or q is true and the other is false.

21

Lemma B.4. Let G, H be graphs which are mod-4 bipartite all-round in their triple graphs. If I is a graph which is obtained by connecting G and H by at least two edges, then I is mod-4 all-round (or mod-4 bipartite all-round) in its triple graph. Proof. Let G = (A1 , B1 , E(G)) and H = (A2 , B2 , E(H)). We show the lemma by considering three cases; See Fig. 7, 8 and 9 for details of each cases. Case 1. Set the value of xe1 , xe2 as X X f (v) ≡ xe1 + xe2 f (v) −

(mod 4)

(15)

(mod 4)

(16)

(mod 4)

(17)

(mod 4),

(18)

v∈B1

v∈A1

and at least one of xe1 or xe2 is not equal to zero. Case 2. Set the value of xe1 , xe2 as X X f (v) ≡ xe1 − xe2 f (v) − v∈B1

v∈A1

and at least one of xe1 or xe2 is not equal to zero. Case 3. Set the value of xe1 , xe2 as X X f (v) ≡ xe1 + xe2 f (v) − v∈B1

v∈A1

and

X

v∈A2

f (v) −

X

f (v) ≡ xe1 − xe2

v∈B2

and at least one of xe1 or xe2 is not equal to zero.

Figure 7: Case 1.

Figure 8: Case 2.

Figure 9: Case 3.

We also use the following two lemma (we omit the proofs). Lemma B.5. Suppose G has at least eight vertices and that the minimum degree δ(G) satisfies δ(G) ≥ |V |/3. Then every vertex in G belongs to a triangle or square. Lemma B.6. Suppose G has at least four vertices and that the minimum S degree δ(G) satisfies δ(G) ≥ |V |/3. Let C1 , . . . , Ck (k ≥ 3) be induced subgraphs of G such that ki=1 V (Ci ) = V and V (Ci ) ∩ V (Cj ) = ∅ for any i 6= j. There exists a pair Ci , Cj such that |δ(V (Ci )) ∩ δ(V (Cj ))| ≥ 2. 22

Now we prove Theorem B.1. Proof of Theorem B.1. Let n = |V |. For n ≤ 7, Theorem B.1 is established by enumerating all graphs such that δ(G) ≥ n/3, and verifying mod-4 all-roundness (or mod-4 bipartite all-roundness) of graphs individually. Suppose n ≥ 8. We consider two cases whether G has a bridge or none. Case 1. G has a bridge. Let e be the bridge and C1 , C2 be the two components of G − e (Neither C1 nor C2 is bipartite). Then |V (Ci )| ≥ n/3 + 1(i = 1, 2), which implies n/3 + 1 ≤ |V (Ci )| ≤ (2/3)n − 1. If |V (C1 )| ≤ (2/3)n − 2, for each Ci   1 2 1 n n − 2 ≥ |V (Ci )| (19) δ(Ci ) ≥ − 1 = 3 2 3 2 holds. Then Theorem 4.30 establishes C1 , C2 are mod-4 all-round in their triple graphs. Thus, by Lemma B.2, G is mod-4 all-round in its triple graph. If |V (C1 )| = (2/3)n − 1, C2 is mod-4 all-round in its triple graph as same as above. Let v ∈ V (C1 ) be a vertex which has e as its incident edges. Then   1 2 1 n n − 2 ≥ |V (Ci − v)| (20) δ(C1 − v) ≥ − 1 = 3 2 3 2 holds, which implies C1 − v is mod-4 all-round in its triple graph. Because C1 can be decomposed to the graph C1 − v which is mod-4 all-round in its triple graph and ears of length at most two, by Lemma 4.11, C1 is mod-4 all-round in its triple graph. Then Lemma B.2 implies that G is mod-4 all-round in its triple graph. Case 2. G has no bridges. If G does not have bridges, G is 2-edge-connected. By Lemma B.5 we can decompose G into k induced subgraphs C1 , . . . , Ck all of which are either mod-4 all-round or mod-4 bipartite all-round in their triple graphs. If k ≥ 3, by Lemma B.6, we can find a pair Ci , Cj which has at least two common incident edges and obtain a larger graph which is mod-4 all-round (or mod-4 bipartite allround) in its triple graph by combining Ci and Cj . By repeatedly combining components as above, if k is reduced to two, C1 , C2 have at least two common incident edges since G is 2-edge-connected. Then using Lemmas B.2, B.3 and B.4, G is mod-4 all-round in its triple graph.

23