1 Introduction
In this paper, we introduce the TreeResidue VertexBreaking (TRVB) problem. Given a multigraph some of whose vertices are marked “breakable,” TRVB asks whether it is possible to convert into a tree via a sequence of applications of the vertexbreaking operation: replacing a degree breakable vertex with degree vertices, disconnecting the incident edges, as shown in Figure 1.
In this paper, we analyze the computational complexity of this problem as well as several variants (special cases) where is restricted with any subset of the following additional constraints:

every breakable vertex of must have degree from a list of allowed degrees;

every unbreakable vertex of must have degree from a list of allowed degrees;

is planar;

is a simple graph (rather than a multigraph).
Modifying TRVB to include these constraints makes it easier to reduce from the TRVB problem to some other. For example, having a restricted list of possible breakable vertex degrees allows a reduction to include gadgets only for simulating breakable vertices of those degrees, whereas without that constraint, the reduction would have to support simulation of breakable vertices of any degree.
We prove the following results (summarized in Table 1
), which together fully classify the variants of TRVB into polynomialtime solvable and NPcomplete problems:

Every TRVB variant whose breakable vertices are only allowed to have degrees of at most is solvable in polynomial time.

Every planar simple graph TRVB variant whose breakable vertices are only allowed to have degrees of at least and whose unbreakable vertices are only allowed to have degrees of at least is solvable in polynomial time (and in fact the correct output is always “no”).

In all other cases, the TRVB variant is NPcomplete. In particular, the TRVB variant is NPcomplete if the variant allows breakable vertices of some degree , and in the planar graph case, also allows either breakable vertices of some degree or unbreakable vertices of some degree . For example, for any , TRVB is NPcomplete in planar multigraphs whose vertices are all breakable and have degree .
All breakable vertices have small degree ()  Graph restrictions  All vertices have large degree ( and )  TRVB variant complexity  Section 
Yes  Polynomial Time  Section 9  
No  Planar or simple or unrestricted  NPcomplete  Sections 4, 5, 6  
No  Planar and simple  No  NPcomplete  Section 7 
No  Planar and simple  Yes  Polynomial Time (every instance is a “no” instance)  Section 8 
Among these results, we expect the most generally applicable to be the results that (1) TRVB is polynomially solvable when breakable vertices are restricted to have degree at most ; and (2) for any , TRVB is NPcomplete when the given multigraph is restricted to be planar and to consist entirely of degree breakable vertices.
Application to proving hardness.
In general, the TRVB problem is useful when proving NPhardness of what could be called singletraversal problems: problems in which some space (e.g., a configuration graph or a grid) must be traversed in a single path or cycle subject to local constraints. Hamiltonian Cycle and its variants fall under this category, but so do other problems (e.g., allowing the solution path/cycle to skip certain vertices entirely while still mandating other local constraints). In other words, TRVB can be a useful alternative to Hamiltonian Cycle when proving NPhardness of problems related to traversal.
To prove a singletraversal problem hard by reducing from TRVB, it is sufficient to demonstrate two gadgets: an edge gadget and a breakable degree vertex gadget for some . This is because TRVB remains NPhard even when the only vertices present are degree breakable vertices for some . Furthermore, since this version of TRVB remains NPhard even for planar multigraphs, this approach can be used even when the singletraversal problem under consideration involves traversal of a planar space.
One possible approach for building the gadgets is as follows. The edge gadget should contain two parallel paths, both of which must be traversed because of the local constraints of the singletraversal problem (see Figure 2). The vertex gadget should have exactly two possible solutions satisfying the local constraints of the problem: one solution should disconnect the regions inside all the adjoining edge gadgets, while the other should connect these regions inside the vertex gadget (see Figure 3). We then simulate the multigraph from the input TRVB instance by placing these edge and vertex gadgets in the shape of the input multigraph as shown in Figure 4.
When trying to solve the resulting singletraversal instance, the only option (while satisfying local constraints) is to choose one of the two possible local solutions at each vertex gadget, corresponding to the choice of whether to break the vertex. The candidate solution produced will satisfy all local constraints, but might still not satisfy the global (single cycle) constraint. Notice that the candidate solution is the boundary of the region “inside” the local solutions to the edge and vertex gadgets, and that this region ends up being the same shape as the multigraph obtained after breaking vertices. See Figure 5 for an example. The boundary of this region is a single cycle if and only if the region is connected and holefree. Since the shape of this region is the same as the shape of the multigraph obtained after breaking vertices, this condition on the region’s shape is equivalent to the condition that the residual multigraph must be connected and acyclic, or in other words, a tree. Thus, this construction yields a correct reduction, and in general this proof idea can be used to show NPhardness of singletraversal problems.
Outline.
In Section 2, we give an example of an NPhardness proof following the above strategy. By reducing from TRVB, we give a simple proof that Hamiltonian Cycle in maxdegree square grid graphs is NPhard (a result previously shown in [3]). We also use the same proof idea in manuscript [1] to show the novel result that Hamiltonian Cycle in hexagonal thin grid graphs is NPhard.
In Section 3, we formally define the variants of TRVB under consideration. We also prove membership in NP for all the variants and provide the obvious reductions between them.
Sections 4–7 address our NPhardness results. In Section 4, we reduce from an NPhard problem to show that Planar TRVB with only degree breakable vertices and unbreakable degree vertices is NPhard for any . All the other hardness results in this paper are derived directly or indirectly from this one. In Section 5, we prove the NPcompleteness of the variants of TRVB and of Planar TRVB in which breakable vertices of some degree are allowed. Similarly, we show in Section 6 that Graph TRVB is also NPcomplete in the presence of breakable vertices of degree . Finally, in Section 7, we show that Planar Graph TRVB is NPcomplete provided (1) breakable vertices of some degree are allowed and (2) either breakable vertices of degree or unbreakable vertices of degree are allowed.
Next, in Section 8, we proceed to one of our polynomialtime results: that a variant of TRVB is solvable in polynomial time whenever the multigraph is restricted to be a planar graph, the breakable vertices are restricted to have degree at least , and the unbreakable vertices are restricted to have degree at least . In such a graph, it is impossible to break a set of breakable vertices and get a tree. As a result, variants of TRVB satisfying these restrictions are always solvable with a trivial polynomial time algorithm.
In Section 9, we establish a connection between TRVB and the Hypergraph Spanning Tree problem (given a hypergraph, decide whether it has a spanning tree). Namely, Hypergraph Spanning Tree on a hypergraph is equivalent to TRVB on the corresponding incidence graph with edge nodes marked breakable and vertex nodes marked unbreakable. This equivalence allows us to construct a reduction from TRVB to Hypergraph Spanning Tree: given a TRVB instance, we can first convert that instance into a bipartite TRVB instance (by inserting unbreakable vertices between adjacent breakable vertices and merging adjacent unbreakable vertices) and then construct the hypergraph whose incidence graph is the bipartite TRVB instance.
This connection allows us to obtain results about both TRVB and Hypergraph Spanning Tree. By leveraging known results about Hypergraph Spanning Tree (see [2]), we prove that TRVB is polynomialtime solvable when all breakable vertices have small degrees (). This final result completes our classification of the variants of TRVB. We also apply the hardness results from this paper to obtain new results about Hypergraph Spanning Tree; namely, Hypergraph Spanning Tree is NPcomplete in uniform regular hypergraphs for any , even when the incidence graph of the hypergraph is planar. This improves the previously known result that Hypergraph Spanning Tree is NPcomplete in uniform hypergraphs for any (see [5]).
2 Example of how to use TRVB: Hamiltonicity in maxdegree square grid graphs
In this section, we show one example of using TRVB to prove hardness of a singletraversal problem. Namely, the result that Hamiltonian Cycle in maxdegree square grid graphs is NPhard [3] can be reproduced with the following much simpler reduction.
The reduction is from the variant of TRVB in which the input multigraph is restricted to be planar and to have only degree breakable vertices, which is shown NPcomplete in Section 5. Given a planar multigraph with only degree breakable vertices, we output a maxdegree square grid graph by appropriately placing breakable degree vertex gadgets (shown in Figure 7) and routing edge gadgets (shown in Figure 7) to connect them. The appropriate placement of gadgets can be accomplished in polynomial time by the results from [6]. Each edge gadget consists of two parallel paths of edges a distance of two apart, and as shown in the figure, these paths can turn, allowing the edge to be routed as necessary (without parity constraints). Each breakable degree vertex gadget joins four edge gadgets in the configuration shown. Note that, as desired, the maximum degree of any vertex in the resulting grid graph is .
Consider any candidate set of edges that could be a Hamiltonian cycle in the resulting grid graph. In order for to be a Hamiltonian cycle, must satisfy both the local constraint that every vertex is incident to exactly two edges in and the global constraint that is a cycle (rather than a set of disjoint cycles). It is easy to see that, in order to satisfy the local constraint, every edge in every edge gadget must be in . Similarly, there are only two possibilities within each breakable degree vertex gadget which satisfy the local constraint. These possibilities are shown in Figure 8.
We can identify the choice of local solution at each breakable degree vertex gadget with the choice of whether to break the corresponding vertex. Under this bijection, every candidate solution satisfying local constraints corresponds with a possible multigraph formed from by breaking vertices. The key insight is that the shape of the region inside is exactly the shape of . This is shown for an example graphpiece in Figure 9. The boundary of , also known as , is exactly one cycle if and only if is connected and holefree. Since the shape of region is the same as the shape of multigraph , this corresponds to the condition that is connected and acyclic, or in other words that is a tree. Thus, there exists a candidate solution to the Hamiltonian Cycle instance (satisfying the local constraints) that is an actual solution (also satisfying the global constraints) if and only if is a “yes” instance of TRVB. Therefore, Hamiltonian Cycle in maxdegree square grid graphs is NPhard.
3 Problem variants
In this section, we will formally define the variants of TRVB under consideration, and prove some basic results about them.
To begin, we formally define the TRVB problem. The multigraph operation of breaking vertex in undirected multigraph results in a new multigraph by removing , adding a number of new vertices equal to the degree of in , and connecting these new vertices to the neighbors of in in a onetoone manner (as shown in Figure 1 in Section 1). Using this definition, we pose the TRVB problem:
Problem 3.1.
The TreeResidue VertexBreaking Problem (TRVB) takes as input a multigraph whose vertices are partitioned into two sets and (called the breakable and unbreakable vertices respectively), and asks to decide whether there exists a set such that after breaking every vertex of in , the resulting multigraph is a tree.
In order to avoid trivial cases, we consider only input graphs that have no degree vertices.
Next, suppose and are both sets of positive integers. Then we can constrain the breakable vertices of the input to have degrees in and constrain the unbreakable vertices of the input to have degrees in . The resulting constrained version of the problem is defined below:
Definition 3.2.
The variant of the TRVB problem, denoted TRVB, is the special case of TRVB where the input multigraph is restricted so that every breakable vertex in has degree in and every unbreakable vertex in has degree in .
Throughout this paper we consider only sets and for which membership can be computed in pseudopolynomial time (i.e., membership of in or can be computed in time polynomial in ). As a result, verifying that the vertex degrees of a given multigraph are allowed can be done in polynomial time. This means that the classification of a particular variant of the TRVB problem into P or NPcomplete is a statement about the hardness of checking TRVB (while constrained by the other conditions) rather than a statement about the hardness of checking membership in or for the degrees in the multigraph. In fact, all the results in this paper will also apply even in the cases that membership in or cannot be computed in pseudopolynomial time if we consider the promise problems in which the given multigraph’s vertex degrees are guaranteed to comply with the sets and .
We can also define three further variants of the problem depending on whether is constrained to be planar, a (simple) graph, or both: the Planar variant of the TRVB problem (denoted Planar TRVB), the Graph variant of the TRVB (denoted Graph TRVB), and the Planar Graph variant of the TRVB problem (denoted Planar Graph TRVB).
Note that since both being planar and being a graph are properties of a multigraph that can be verified in polynomial time, again the classification of these variants into P or NPcomplete is a statement about the hardness of TRVB.
3.1 Diagram conventions
Throughout this paper, when drawing diagrams, we will use filled circles to represent unbreakable vertices and unfilled circles to represent breakable vertices. See Figure 10.
3.2 Trivial reductions
As mentioned above, except for the constraint that the TRVB problem outputs “yes” on the given input, every other constraint in the definition of each of the above variants can be tested in polynomial time. Therefore, if for some two variants and the nonTRVB conditions of are strictly stronger (more constraining) than the nonTRVB conditions of , then we can reduce from to in polynomial time. In particular, we can convert an input for variant into an input for as follows:
First test all the nonTRVB conditions of variant on the input . If any condition is not satisfied, then rejects , so output any rejected by . If all the nonTRVB conditions of variant are satisfied, then by assumption all the nonTRVB conditions of variant on input are also satisfied. Therefore is a “yes” instance of both and if and only if is a “yes” instance of TRVB. Therefore and have the same answer on , so outputting completes the reduction.
Using the above reduction scheme, we conclude that:
Lemma 3.3.
For any , there are reductions

from Planar TRVB to TRVB,

from Graph TRVB to TRVB,

from Planar Graph TRVB to Planar TRVB, and

from Planar Graph TRVB to Graph TRVB.
For any and with and , there are reductions

from TRVB to TRVB,

from Planar TRVB to Planar TRVB,

from Graph TRVB to Graph TRVB, and

from Planar Graph TRVB to Planar Graph TRVB.
3.3 Membership in NP
Theorem 3.4.
The TRVB problem is in NP.
Proof.
We describe a nondeterministic algorithm to solve TRVB: First nondeterministically guess a set of breakable vertices in . Break that set of vertices and accept if and only if the resulting multigraph is a tree.
This algorithm accepts an input on at least one nondeterministic branch if and only if it is possible to break some of the breakable vertices so that the residual multigraph is a tree. In other words, this algorithm solves TRVB. Furthermore, the algorithm runs in polynomial time since both breaking vertices and checking whether a multigraph is a tree are polynomialtime operations. As desired, TRVB is in NP. ∎
Another name for TRVB is TRVB, so we can apply the reductions from Lemma 3.3 to conclude that:
Corollary 3.5.
For any , the TRVB, Planar TRVB, Graph TRVB, and Planar Graph TRVB problems are in NP.
4 Planar TRVB is NPhard for any
The overall goal of this section is to prove NPhardness for several variants of TRVB. In particular, we will introduce an NPhard variant of the Hamiltonicity problem in Section 4.1 and then reduce from this problem to Planar TRVB for any in Section 4.2. This is the only reduction from an external problem in this paper. All further hardness results will be derived from this one via reductions between different TRVB variants.
4.1 Planar Hamiltonicity in Directed Graphs with all in and outdegrees is NPhard
The following problem was shown NPcomplete in [4]:
Problem 4.1.
The Planar MaxDegree Hamiltonicity Problem asks for a given planar directed graph whose vertices each have total degree at most whether the graph is Hamiltonian (has a Hamiltonian cycle).
For the sake of simplicity we will assume that every vertex in an input instance of the Planar MaxDegree Hamiltonicity problem has both in and outdegree at least (and therefore at most ). This is because the existence of a vertex with in or outdegree in a graph immediately implies that there is no Hamiltonian cycle in that graph.
As it turns out, this problem is not quite what we need for our reduction, so below we introduce several new definitions and define a new variant of the Hamiltonicity problem:
Definition 4.2.
Call a vertex alternating for a given planar embedding of a planar directed graph if, when going around the vertex, the edges switch from inward to outward oriented more than once. Otherwise, call the vertex nonalternating. A nonalternating vertex has all its inward oriented edges in one contiguous section and all its outward oriented edges in another; an alternating vertex on the other hand alternates between inward and outward sections more times.
We call a planar embedding of planar directed graph a planar nonalternating embedding if every vertex is nonalternating under that embedding. If has a planar nonalternating embedding we say that is a planar nonalternating graph.
Problem 4.3.
The Planar NonAlternating Indegree Outdegree Hamiltonicity Problem asks, for a given planar nonalternating directed graph whose vertices each have in and outdegree exactly , whether the graph is Hamiltonian
The goal of this section is to prove that this problem is NPhard. To this purpose, consider the following definition and lemmas:
Definition 4.4.
Define simplifying over edge to be the following operation: remove all edges and from and then contract edge . The resulting graph has one new vertex instead of and ; this vertex inherits the inward oriented edges of and inherits the outward oriented edges of . The inward oriented edges of and outward oriented edges of are removed from the graph.
Lemma 4.5.
If is an edge of directed graph and either has outdegree or has indegree , then simplifying over maintains the Hamiltonicity of .
Proof.
Let be the graph that results from simplifying over edge and let be the vertex in that replaces and . Any Hamiltonian cycle in using edge corresponds with Hamiltonian cycle in . And any Hamiltonian cycle in corresponds with Hamiltonian cycle in using edge . Thus there is a bijection between Hamiltonian cycles of and Hamiltonian cycles of using edge .
But if either has outdegree or has indegree , then every Hamiltonian cycle in must use edge , and so the Hamiltonian cycles of using edge are all the Hamiltonian cycles of . Thus there is a bijection between Hamiltonian cycles of and Hamiltonian cycles of , and so the numbers of Hamiltonian cycles in and are the same. As desired, is Hamiltonian if and only if is. ∎
Lemma 4.6.
If is an edge of planar nonalternating directed graph , then simplifying over maintains the planar nonalternating property of .
Proof.
Let be the graph that results from simplifying over edge . Starting with a planar nonalternating embedding of , the corresponding planar embedding of will also be nonalternating. We prove this below.
If is a vertex of that is not or , then in the planar nonalternating embedding will have all the inward oriented edges in one contiguous section. The simplification of over will at most affect by removing some edges incident on . In no case does this introduce alternation of inward and outward oriented sections to . Thus is nonalternating in the planar embedding of .
If is the new vertex introduced due to the simplification of over , then is nonalternating in the planar embedding of because (1) the inward oriented edges are all inherited from , (2) the outward oriented edges are all inherited from , and (3) the edges inherited from the two vertices by can be separated into two contiguous sections.
As desired, this shows that is planar nonalternating. ∎
We apply these lemmas to prove that the Planar NonAlternating Indegree Outdegree Hamiltonicity Problem is NPhard:
Theorem 4.7.
The Planar NonAlternating Indegree Outdegree Hamiltonicity Problem is NPhard.
Proof.
We prove this via the following reduction from the Planar MaxDegree Hamiltonicity Problem. On input a planar graph with all in and outdegrees or , repeatedly identify edges such that either has outdegree or has indegree and simplify over . Only stop once no such edges can be found, at which point output the resulting graph .
First note that this algorithm runs in polynomial time since (1) simplification is a polynomialtime operation and (2) the number of simplifications of is bounded above by the number of vertices in since each simplification decreases the number of vertices by .
Suppose the input instance is a “no” instance of the Planar MaxDegree Hamiltonicity Problem. This means that is not Hamiltonian. By repeated application of Lemma 4.5, is Hamiltonian if and only if is Hamiltonian. Thus is not Hamiltonian and so is a “no” instance of the Planar NonAlternating Indegree Outdegree Hamiltonicity Problem.
On the other hand, suppose the input instance is a “yes” instance of the Planar MaxDegree Hamiltonicity Problem. By repeated application of Lemma 4.5, is Hamiltonian if and only if is Hamiltonian, so must have a Hamiltonian cycle. Below we show that all in and outdegrees in are and that is a planar nonalternating graph. Together, this is enough to imply that is a “yes” instance of the Planar NonAlternating Indegree Outdegree Hamiltonicity Problem.
Since has a Hamiltonian cycle, no vertex in can have in or outdegree . Furthermore, no vertex in can have in or outdegree because the reduction does not stop simplifying the graph until there are no in or outdegree vertices left. Thus every in or outdegree in is at least . When simplifying a graph over an edge, every in or outdegree in the resulting graph is less than or equal to some in or outdegree in the initial graph. By repeatedly applying this rule, we see that every in and outdegree in is at most the largest in or outdegree in . But as is a Planar MaxDegree Hamiltonicity instance, the largest in or outdegree in is at most . Thus, we can conclude that every in and outdegree in must be exactly .
By repeated application of Lemma 4.6, we know that provided the original graph is a planar nonalternating graph, the final graph will be as well. But if is a planar maxdegree graph, then every vertex in is nonalternating in any planar embedding (since alternating vertices always have total degree at least ). Thus, any planar embedding of is a planar nonalternating embedding. We can therefore conclude that both and are planar nonalternating graphs.
As desired, is a “yes” instance of the Planar MaxDegree Hamiltonicity Problem if and only if is a “yes” instance of the Planar NonAlternating Indegree Outdegree Hamiltonicity Problem. Together with the fact that the reduction runs in polynomial time, we have our desired result: the Planar NonAlternating Indegree Outdegree Hamiltonicity Problem is NPhard. ∎
4.2 Reduction to Planar TRVB for any
Consider the following algorithm :
Definition 4.8.
For , algorithm takes as input a planar nonalternating graph whose vertex in and outdegrees all equal , and outputs an instance of Planar TRVB.
To begin, we construct a labeled undirected multigraph as follows; refer to Figure 11.
First we build all the vertices (and vertex labels) of . For each vertex in , we include an unbreakable vertex in and for each edge in we include a breakable vertex in . If is a vertex or is an edge of , we define and to be the corresponding vertices in .
Next we add all the edges of . Fix vertex in . Let and be the edges into and let and be the edges out of . Then add the following edges to :

Add an edge from to each of , , , and .

Add an edge from to .

Add edges from to .
Finally, pick any specific vertex in ; refer to Figure 12. Let and be the edges into and let and be the edges out of . We modify by removing vertex (and all incident edges), and adding the two edges , and . Call the resulting multigraph and return it as output of algorithm .
In order to analyze the behavior of algorithm , it will be helpful to have the following definition:
Definition 4.9.
We say that two edges in a planar nonalternating indegree outdegree graph are conflicting if they start or end at the same vertex. A Hamiltonian cycle in such a graph must contain exactly one out of every pair of conflicting edges.
Lemma 4.10.
The output of is a planar labeled multigraph whose vertices are all breakable with degree or unbreakable with degree .
Proof.
Define all variables used in the description of as defined there. Because is planar nonalternating, we can immediately conclude that multigraph is planar as well (see Figure 11 for an example).
Consider any vertex in (where is a vertex of ). This vertex has exactly four neighbors: the vertices for every edge in that is incident on . Furthermore, this vertex is unbreakable.
Consider any vertex in (where is an edge of ). This vertex has one edge to , one edge to , one edge to , and edges to (where and are the two edges in conflicting with ). Thus the degree of this vertex is .
This shows that consists of only degree unbreakable vertices and degree breakable vertices. Thus, we have shown that has exactly those properties that we are trying to show for : is a planar labeled multigraph whose vertices are all breakable with degree or unbreakable with degree . All that’s left is to show that the operation converting to leaves these properties unchanged.
To convert to , vertex is removed, and two edges , and are added.
Note first that the four endpoints of these two edges are exactly the four neighbors of in . Thus, each vertex in other than has the same degree in : either the vertex was unaffected by the change from to or a single edge was removed from the vertex and a single edge was added. Therefore the vertices of are all breakable with degree or unbreakable with degree .
Next note that the two edges added to the multigraph are both already present. Increasing the multiplicity of an edge in a multigraph does not affect the planarity of the multigraph, and neither does removal of vertices and edges. Thus, the operation transforming into maintains the planarity of the multigraph.
We can conclude that we have our desired properties: is a planar labeled multigraph whose vertices are all breakable with degree or unbreakable with degree . This can be seen for the Figure 11 example in Figure 12.
∎
The following is an additional, trivial, property of :
Lemma 4.11.
runs in polynomial time.
Consider the following lemma:
Lemma 4.12.
Suppose outputs on input and there exists a solution to the TRVB problem on . Then the set of edges in such that is not broken is a disjoint cycle cover of .
Proof.
Consider any pair of conflicting edges and in that share endpoint . There exists at least one edge in between and , and this edge is still present in . Thus, in order to avoid disconnecting that edge from the rest of the graph, either or must not be broken. also contains a cycle on three vertices , , and . If , then the third vertex is missing in , but in that case there is instead a cycle in with just and . In any case, contains at least one cycle whose only breakable vertices are and . In order for the resulting graph to be acyclic, at least one of these two vertices must be broken. This shows that in any solution to the TRVB problem on , exactly one out of every pair of conflicting edges has broken.
Consider the set of edges in such that is not broken. For every vertex of , the two edges out of conflict and the two edges into conflict. Since every pair of conflicting edges has exactly one broken, we conclude that contains one edge that enters and one that exists it. Thus is a disjoint cycle cover of , as desired. ∎
Based on this lemma, we can define the following correspondence:
Definition 4.13.
For any solution of TRVB instance , define to be the disjoint cycle cover of consisting of edges such that is not broken in the given solution of .
As per this definition, we can derive a disjoint cycle cover of from any solution to TRVB instance . Similarly, for any disjoint cycle cover of , we can derive a candidate solution (though not necessarily an actual solution) for : simply break every vertex where is an edge of that is not in the given disjoint cycle cover. Then for some suitable definition of “candidate solution,” there is a bijection between disjoint cycle covers of and candidate solutions of TRVB instance . We will show below that in fact, a disjoint cycle cover of is actually a Hamiltonian cycle if and only if the corresponding candidate solution for is actually a solution. For example, see Figure 13.
Lemma 4.14.
Suppose outputs on input . If there exists a solution to the TRVB problem on , then the corresponding cycle cover of is actually a Hamiltonian cycle.
Proof.
Let be the disjoint cycle cover of consisting of edges such that is not broken in the given solution of . We know that is a union of disjoint cycles and we wish to show that there is exactly one cycle in . Let be a vertex in and let be the cycle in containing . We will prove that contains exactly one cycle by proving that contains every vertex of .
Let be the solved version of (after breaking vertices) and let be a version of in which the same vertices are broken. Consider the difference between and from a connectivity standpoint. In , vertex connects its four neighbors, while in , these neighbors are instead connected in pairs with two edges. Thus, is at least as connected as . This connectivity pattern carries through to the solved versions of these multigraphs: is at least as connected as . Since is a tree, it is fully connected, and so is also fully connected.
From this, we see that there exists a path in from to for any vertex in . This path starts in , ends in , and passes through vertices that all have degree at least . Therefore every vertex in this path is a vertex from the original multigraph that was not broken. We prove below that every path in using only vertices originally in which starts in must end at a vertex of the form where is a vertex or edge in cycle . Since there exists a path in using only vertices originally in from to , we conclude that is a vertex in . Applying this to every vertex in , we see that is a cycle containing every vertex in , and therefore is a Hamiltonian cycle.
Consider any path in using only vertices originally in which starts in . We prove by induction on the path length that this path ends at a vertex of the form where is a vertex or edge in cycle .
If the path length is zero, then the end vertex is , which is certainly of the correct form.
Next, suppose that the statement holds for all paths of length or less. Then given a path of length , we can apply the inductive hypothesis to this path without the last step. Thus we have that the prelast node in the given path is of the form where is a vertex or edge in cycle . The final node in the path is a neighbor of that is in and not a broken vertex.
If is a vertex, then the only possible nonbroken neighbors of are the two nodes and where and are the two edges into and out of in .
If is an edge, then the neighbors of are nodes of the form where is either a conflicting edge in or an endpoint of . But since is in , it was not broken, which means that the vertices in corresponding to the conflicting edges were broken. Thus the only possible nonbroken neighbors of are the two nodes and where and are the two endpoints of . Since is in , so are its endpoints.
We conclude that in either case, the final node in the path is of the form where is a vertex or edge in cycle , proving the inductive step. By induction, any path in using only vertices originally in which starts in ends at a vertex of the form where is a vertex or edge in cycle .
As argued above, this implies that is a Hamiltonian cycle. Thus, we have shown that if the TRVBproblem has a solution, then the corresponding cycle cover of is actually a Hamiltonian cycle. ∎
Lemma 4.15.
Suppose outputs on input and there exists a Hamiltonian cycle in . Then the corresponding candidate solution of the TRVB instance is a solution.
Proof.
Suppose that the Hamiltonian cycle of is . Then let be the set of vertices such that is an edge of not in . Let be the result of breaking the vertices of in . Note that is the candidate solution corresponding to cycle . We will show below that is a connected graph and that has one fewer edges than it has vertices. In other words, is a tree and so the candidate solution of the TRVB instance corresponding to is an actual solution.
To begin, we show that is connected. Let be the set of vertices in , let be the set of vertices in that were in before breaking the vertices of , and let be the set of vertices in of the form for some vertex in with . We will show that (1) every vertex in is adjacent to a vertex in in graph , (2) every vertex in is adjacent to a vertex in in graph , and (3) there exists a path in between any two vertices of . Together, these three facts are sufficient to conclude that is a connected graph.
The first fact we wish to show is that every vertex in is adjacent to a vertex in in graph . The vertices in are exactly the degree vertices created when breaking the vertices of in . The vertices in are exactly the vertices in that are originally in . Thus, we wish to show that every degree vertex created by breaking vertices of in ends up adjacent to a vertex originally in . This can fail to be the case only if two degree vertices created by breaking vertices of in end up adjacent to each other. This, in turn, is possible only if two vertices of are adjacent in . But if and are two vertices in , then and cannot be conflicting edges (since out of every pair of conflicting edges exactly one is in ), and so there is no edge between and . Thus cannot contain a pair of adjacent vertices, and so, as desired, every vertex in is adjacent to a vertex in in graph .
Next, we wish to show that every vertex in is adjacent to a vertex in in graph . The vertices in are exactly the vertices of the form where is an edge in . The vertices in are exactly the vertices of the form where is a vertex of with . Then consider any vertex in (where is an edge in ). Edge has two endpoints, so at least one of the two endpoints, call it , is not equal to . Since is a vertex of with , we know that is a vertex in and furthermore, since is an endpoint of , we know that is adjacent to in . Neither nor is in , so the two remain adjacent in . Notice that is a vertex in , so as desired, , an arbitrary vertex in , is adjacent to a vertex in in graph .
Finally, we wish to show that there exists a path in between any two vertices of . Vertices in are of the form where is a vertex in . Thus, let and be two vertices in other than . We will demonstrate a path in between and . Consider the path from to in which is part of Hamiltonian cycle but does not pass through vertex . Then consider the following list of vertices:
This list of vertices is a path in , so since is not in the list, this list is also a path in . Thus we have a path in from to .
As described above, this allows us to conclude that is connected. Next we will show that has one fewer edge than it has vertices.
Suppose has vertices. Then the number of edges in is . The number of edges of not in is , so . Then the number of vertices in is , the total number of vertices and edges in . The number of edges in is . Transitioning from to requires converting one vertex and four edges into zero vertices and two edges. Thus has vertices and edges. Each vertex in has degree , so breaking the vertices of in increases the number of vertices in the resulting multigraph by . Thus has vertices and edges. As desired, has one fewer edge than it has vertices.
We showed above that is connected and has one fewer edge than it has vertices so we can conclude that it is a tree. We have shown that if has a Hamiltonian cycle, breaking the vertices in of set as defined above yields a tree. Thus we have that in the case that has a Hamiltonian cycle, the corresponding candidate solution of the TRVB instance is a solution. ∎
Theorem 4.16.
Planar TRVB is NPhard for any .
Proof.
Consider the following reduction from Planar NonAlternating Indegree Outdegree Hamiltonicity Problem to Planar TRVB. On input a graph , we first check whether is a planar nonalternating graph all of whose in and outdegrees are . If yes, we run on input and output the result. Otherwise, we simply output any “no” instance of Planar TRVB.
Since runs in polynomial time, the above is clearly a polynomialtime reduction. Furthermore, always outputs a planar labeled multigraph whose vertices are all breakable with degree or unbreakable with degree . As a result, in order to show that the above reduction is answerpreserving, it is sufficient to show that for all planar nonalternating graphs whose in and outdegrees are , has a Hamiltonian cycle if and only if the corresponding output of on input , when interpreted as a TRVB instance, has a solution. This is exactly what we showed in the previous two lemmas.
Since the Planar NonAlternating Indegree Outdegree Hamiltonicity Problem is NPhard, we conclude that for any , Planar TRVB is NPhard. ∎
5 Planar TRVB and TRVB are NPcomplete with highdegree breakable vertices
The goal of this section is to show that Planar TRVB and TRVB are NPcomplete if contains any . To do this, we will show that Planar TRVB is NPhard for any .
Lemma 5.1.
For any , there exists a reduction from either Planar TRVB or Planar TRVB to Planar TRVB.
Proof.
Below we will show that if , it is possible to simulate either a degree unbreakable vertex or a degree unbreakable vertex with a small gadget consisting of degree breakable vertices. As a result, for every , we can construct a reduction from either Planar TRVB or Planar TRVB to Planar TRVB.
In particular, our reduction simply replaces every occurrence of an unbreakable degree or degree vertex with the corresponding gadget made of breakable degree vertices. Provided we can design gadgets of constant size (with respect to the size of , not with respect to ) whose behavior is the same as the vertex they are simulating, this reduction will be correct and will run in polynomial time.
To design the gadgets, we have two cases.
For , we use the gadget shown in Figure 14. Suppose that the gadget shown was included in a TreeResidue VertexBreaking instance. In order to break the cycle between and without disconnecting the edges between them from the rest of the graph, exactly one of those two vertices must be broken. But then the neighbor of cannot be broken without disconnecting the edge from the rest of the graph. On the other hand, the node cannot be broken either since breaking it would disconnect from the rest of the graph. Thus any valid solution of the TreeResidue VertexBreaking instance must break neither and exactly one . The resulting graph connects the other four neighbors of the s without forming any cycles. In other words the behavior of this gadget in a graph is the same as the behavior of an unbreakable degree vertex.
For , we use the gadget shown in Figure 15. In this gadget, breakable vertex has edges to other vertices in the gadget and edges out of the gadget. In addition, there are edges between and for every in . Note that the degree of each vertex is , as desired. When solving a graph containing this gadget, the cycle between and guarantees that exactly one of the two vertices must be broken. In order to not disconnect the other vertex from the rest of the graph, cannot be broken in any valid solution. Thus, provided , every valid solution will break exactly one with for each and will not break . If this is done, the part of the resulting graph corresponding to this gadget will connect the external neighbors of to each other without forming any cycles. In other words the behavior of this gadget in a graph is the same as the behavior of an unbreakable degree vertex.
Since , it is possible to choose such that . Then for every , we are able to make a gadget to simulate either an unbreakable degree vertex or an unbreakable degree vertex. In all cases we can make the required gadgets, and so the reductions go through. ∎
We already know that Planar TRVB is NPhard from Section 4, so to obtain NPhardness from the previous lemma, all that is left is to show that Planar TRVB is NPhard.
Lemma 5.2.
Planar TRVB is NPhard for any .
Proof.
We reduce from Planar TRVB to Planar TRVB.
Consider any unbreakable degree vertex . We can replace with two new degree unbreakable vertices and with edges between the two new vertices and the neighbors of and an edge between and . Note that if we allocate two neighbors of to each of and , we succeed in making and have degree . Also note that it is possible to do this while maintaining the planarity of a multigraph. See Figure 16.
Note that this pair of vertices “behaves” exactly the same as the original vertex did; in other words this change does not affect the answer to the TreeResidue VertexBreaking question. As a result, applying this change to every unbreakable degree vertex converts a Planar TRVB instance into a Planar TRVB instance.
By Theorem 4.16, Planar TRVB is NPhard for any , and so the existence of this reduction proves that Planar TRVB is NPhard for any . ∎
Corollary 5.3.
Planar TRVB is NPhard for any .
Theorem 5.4.
Planar TRVB is NPcomplete if contains any . Also TRVB is NPcomplete if contains any .
Proof.
By Lemma 3.3, there is a reduction from Planar TRVB to Planar TRVB if contains . Thus, if and contains , then Planar TRVB is NPhard. Lemma 3.3 also gives a reduction from Planar TRVB to TRVB, so we see that if and contains , then TRVB is also NPhard.
Using Corollary 3.5, we see that as desired, if and contains , then Planar TRVB and TRVB are both NPcomplete. ∎
6 Graph TRVB is NPcomplete with highdegree breakable vertices
The goal of this section is to show that Graph TRVB is NPcomplete if contains any . To do this, we will show that Graph TRVB is NPhard for any .
Lemma 6.1.
Graph TRVB is NPhard if .
Proof.
In Corollary 5.3 we saw that Planar TRVB is NPhard if . We will reduce from this problem to Graph TRVB.
In order to do so, we must convert a given multigraph into a graph. One way to do this is to insert two degree unbreakable vertices into every edge. After doing this, there will no longer be any duplicated edges or self loops, and so the result will be graph. Furthermore, adding an unbreakable degree vertex into the middle of an edge does not influence the answer to a TreeResidue VertexBreaking question. Thus applying this transformation is a valid reduction.
We conclude that as desired, Graph TRVB is NPhard if . ∎
Theorem 6.2.
Graph TRVB is NPhard if .
Proof.
In Lemma 6.1 we saw that Graph TRVB is NPhard if . We wish to reduce from that problem to Graph TRVB.
In order to do this, we construct a constant sized (in the size of ) gadget using degree breakable vertices that behaves the same as a degree unbreakable vertex. Simply replacing every degree unbreakable vertex with a copy of this gadget is a valid reduction, allowing us to conclude that Graph TRVB is NPhard if .
The gadget is shown in Figure 17. The gadget consists of breakable vertices, each of degree . Call them and . The gadget contains an edge between each pair and an edge between each pair . Finally, both and will have one edge leaving the gadget.
In a solution to this gadget, either is broken or not. If is broken, then to avoid disconnecting the edge from the rest of the graph, must not be broken. But is a cycle for every , so in order to avoid having that cycle in the final graph, must also be broken.
If is not broken, then either or must be broken (due to cycle ). Then if is broken, must not be broken in order to avoid disconnecting edge from the rest of the graph. This means that every will not be broken. In that case, however, the existence of cycle guarantees that either or will be broken for every pair . In other words, at most one can be unbroken. This means, however, that either both and or both and will be broken, in either case isolating an edge from the rest of the graph. Thus we see that this case is not possible.
We can conclude that the only solution to this gadget is to break all of the s but none of the s, thereby connecting the external neighbors of and (through the path of s) without leaving any cycles or disconnecting the graph. In other words, this gadget behaves like an unbreakable degree vertex, as desired.
Thus we see that the reduction goes through and Graph TRVB is NPhard if . ∎
Corollary 6.3.
Graph TRVB is NPcomplete if contains any .
Proof.
7 Planar Graph TRVB is NPhard with both lowdegree vertices and highdegree breakable vertices
The goal of this section is to show that Planar Graph TRVB is NPcomplete if (1) either or and (2) there exists a with . To do this, we will demonstrate that these conditions are sufficient to guarantee that it is possible to build small planar gadgets which behave like unbreakable degree vertices. Inserting two copies of such a gadget into every edge converts a planar multigraph into a planar graph while keeping the answer to the TRVB question the same. This is a reduction from Graph TRVB to Planar Graph TRVB (provided both conditions (1) and (2) above hold).
Below, we prove the existence of the desired gadgets.
Lemma 7.1.
There exists a planar gadget that simulates an unbreakable vertex of degree built out of breakable degree vertices (for any ) and unbreakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
The gadget for this theorem is shown in Figure 18. For each breakable vertex in this figure, there exists a cycle in the gadget containing the vertex and no other breakable vertex. To avoid leaving this cycle in the final graph, the two breakable vertices in the gadget must both be broken in a valid solution. This fully determines the solution of the gadget.
Thus, if this gadget is included in a graph, the two breakable vertices must be broken, resulting in the gadget connecting the two edges that extend out to the rest of the graph. In other words, the gadget behaves like a degree unbreakable vertex.
Note also that this gadget uses nodes, which is constant with respect to the size of a given multigraph . ∎
Lemma 7.2.
There exists a planar gadget that simulates an unbreakable degree vertex built out of breakable degree vertices (for any ) and unbreakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
The gadget for this theorem is shown in Figure 19. The one breakable vertex in this figure is in a cycle in the gadget (with no other breakable vertex). To avoid leaving this cycle in the final graph, the breakable vertex must be broken in a valid solution. This fully determines the solution of the gadget.
Thus, if this gadget is included in a graph, the breakable vertex must be broken, resulting in the gadget connecting the two edges that extend out to the rest of the graph. In other words, the gadget behaves like a degree unbreakable vertex.
Note also that this gadget uses nodes, which is constant with respect to the size of a given multigraph . ∎
Lemma 7.3.
There exists a planar gadget that simulates an unbreakable degree vertex built out of breakable degree vertices (for any ) and unbreakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
The gadget for this theorem is shown in Figure 20. The one breakable vertex in this figure cannot be broken (as that would separate the unbreakable vertices from the rest of the graph).
Thus, if this gadget is included in a graph, the breakable vertex must not be broken, resulting in the gadget connecting the two edges that extend out to the rest of the graph. In other words, the gadget behaves like a degree unbreakable vertex.
Note also that this gadget uses nodes, which is constant with respect to the size of a given multigraph . ∎
Lemma 7.4.
There exists a planar gadget that simulates an unbreakable degree vertex built out of breakable degree vertices (for any ) and breakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
Breaking a degree vertex does nothing, so breakable degree vertices are essentially the same as unbreakable degree vertices. Thus we can simply use the same construction as for the previous lemma. ∎
Lemma 7.5.
There exists a planar gadget that simulates an unbreakable degree vertex built out of breakable degree vertices (for any ) and breakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
We begin by constructing the gadget shown in Figure 21. In this gadget, breakable vertex has edges to other vertices in the gadget and edges out of the gadget. In addition, there is an edge between and for every in . Note that the degree of is and the degree of each is . When solving a graph containing this gadget, the cycle guarantees that exactly one of the three vertices in the cycle must be broken. , however, cannot be broken without disconnecting and from the rest of the graph. Thus, provided , every valid solution will break exactly one out of every pair and will not break . If this is done, the part of the resulting graph corresponding to this gadget will connect the external neighbors of to each other without forming any cycles. In other words the behavior of this gadget in a graph is the same as the behavior of an unbreakable degree vertex.
Note that the number of nodes in the above gadget is constant with respect to the size of a given multigraph (in particular, there are nodes).
Since , we can select such that . In other words, the above gadget behaves either as an unbreakable degree vertex gadget or as an unbreakable degree vertex gadget.
If the gadget behaves as an unbreakable degree vertex gadget, then an unbreakable degree vertex gadget can be built (as in a previous lemma) using breakable degree vertices and unbreakable degree vertex gadgets. In this case, the size of the new combined gadget is at most a constant times the size of the above gadget.
Thus in all cases we can construct a gadget simulating an unbreakable degree vertex using only degree and degree breakable vertices. ∎
Lemma 7.6.
There exists a planar gadget that simulates an unbreakable degree vertex built out of breakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
The gadget for this theorem is shown in Figure 22. If either vertex or vertex is broken, then none of the others can be (since all the non vertices are adjacent to and all the non vertices are adjacent to ). If neither nor vertex is broken, then in order to avoid having cycles, both and must be broken; this however, disconnects and from the rest of the graph. Thus the only valid solutions of this gadget break exactly one of and and nothing else. In either case, the resulting graph piece connects the two edges that extend out to the rest of the graph. In other words, the gadget behaves like a degree unbreakable vertex.
Note also that this gadget uses nodes, which is constant with respect to the size of a given multigraph . ∎
Lemma 7.7.
There exists a planar gadget that simulates an unbreakable degree vertex built out of breakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
The gadget for this theorem is shown in Figure 23. Note that this is actually the same gadget as described in Theorem 6.2 for . Thus we have already argued the correctness of this gadget.
Note also that this gadget uses nodes, which is constant with respect to the size of a given multigraph . ∎
Lemma 7.8.
There exists a planar gadget that simulates an unbreakable degree vertex built out of breakable degree vertices such that the number of nodes is constant with respect to the size of a given multigraph .
Proof.
The gadget for this theorem is shown in Figure 24.
This gadget contains exactly thirtytwo degree vertices with two edges leaving the gadget. A choice of vertices to break within the gadget could be a valid solution if either (1) the resulting graph restricted to the vertices within the gadget is a tree (with the two edges extending out of the gadget connected to this tree) or (2) the resulting graph restricted to the vertices within the gadget consists of two trees (with the two edges extending out of the gadget connected to one of these trees each). Since there are degree vertices with two edges out of the gadget, the number of edges in the gadget is
Comments
There are no comments yet.