citations.bib \newlang\HAMHAM \newlang\hHAM-HAM
Complexity of Multiple-Hamiltonicity in Graphs of Bounded Degree
Abstract
We study the following generalization of the Hamiltonian cycle problem: Given integers and graph , does there exist a closed walk in that visits every vertex at least times and at most times? Equivalently, does there exist a connected factor of with all degrees even? This problem is -hard for any constants . However, the graphs produced by known reductions have maximum degree growing linearly in . The case — i.e. Hamiltonicity — remains \NP-hard even in -regular graphs; a natural question is whether this is true for other , .
In this work, we study which permit polynomial time algorithms and which lead to -hardness in graphs with constrained degrees. We give tight characterizations for regular graphs and graphs of bounded max-degree, both directed and undirected.
1 Introduction
1.1 Background and Previous Work
The Hamiltonian cycle problem asks, given a graph , whether admits a closed walk visiting every vertex exactly once. A classic result of Garey, Johnson and Tarjan is that Hamiltonicity is \NP-hard even in graphs of max degree 3, and in fact even in 3-regular graphs [GJ3].
In 1990, Broersma and Göbel proposed two variants of the Hamiltonian cycle problem: for fixed , is there a closed walk that visits each vertex exactly times, or at least once and at most times, respectively? They showed that for constant , both of these problems are \NP-hard [broersmakwalks]. Jackson and Wormald subsequently proved that both problems remain \NP-hard in -connected graphs for any constant [wormaldkwalks]. These proofs extend to give hardness of the following generalization:
Definition 1.
For fixed integers , a graph is called if there exists a closed walk on that visits each vertex at least times and at most times.
Being can be considered as a graph factor problem. Letting be the multigraph obtained by making copies of each edge in , is if and only if contains a spanning even factor; that is, a connected subgraph containing all vertices of , with every degree even and in . The equivalence of this formulation follows from taking an Euler tour.
There is a substantial body of combinatorics work seeking sufficient conditions for the existence of graph factors and walks; see Plummer’s survey [plummersurvey], the book by Akiyama and Kano [akiyamakanobook], or the survey by Kouider and Vestergaard which focuses specifically on connected factors [kouidersurvey]. For example, Gao and Richter showed that any -connected planar graph is [2walk3connectedplanar], and Schmid and Schmidt gave a polynomial-time algorithm to find such a walk in which only the 3-separators are visited twice [2walk3connectedplanarpolytime]. Several variants of the problem have also been consider from an algorithmic complexity standpoint. Ganian et al consider the case where is nonconstant in , showing that is -hard for , but in for [bigaa]. Nishiyama et al show that there is a polynomial-time algorithm to determine whether a graph has a walk visiting every vertex an odd number of times, but that the problem becomes -hard when each edge can be traversed at most times [pairityham].
In this work, we will study the complexity of in regular graphs and graphs of constant maximum degree. Prior papers have investigated degree conditions sufficient to guarantee — for instance Kouider and Vestergaard showed that, for , any 2-connected graph with minimum degree is [evenabmindeb], and independent papers by Gao and Richter, ** and Li respectively showed that any -connected graph with maximum degree is [2connectedmaxdeg, 2connectedmaxdeg2]. However, to our knowledge we are the first to consider the algorithmic complexity of in general bounded degree graphs.
1.2 Results
Our main results are tight characterizations for the hardness of in regular graphs, graphs of bounded max-degree, and bounded max-degree digraphs. Interestingly, the thresholds for which lead to -hardness are very different in each of these settings. In regular graphs, we find that hardness is determined by the maximum visit count in comparison to the degree , where the parity of is very important:
1.
When restricted to -regular graphs, is \NP-hard if either is even and , or is odd and . Otherwise, .
In graphs of bounded max degree, we find instead that hardness is determined by the ratio of to in comparison to the max degree , and that is a special case:
2.
When restricted to graphs of maximum degree , is \NP-hard if either and , or and . Otherwise, .
For directed graphs, turns out to always be hard in graphs of maximum degree , and hard in graphs of maximum degree unless or :
3.
In directed graphs of maximum degree , for , if , and -hard otherwise.
4.
For all , is -hard in directed graphs of maximum degree 4.
The hardness proofs for maximum degree digraphs easily extend to show hardness in regular digraphs.
1.3 Preliminaries
Introducing Depletors
Now we introduce the notion of a depletor gadget which will be used in all of our hardness reductions. We introduce this notion by showing that is hard in unrestricted graphs.
Lemma 1 (Broersma, Göbel [broersmakwalks]).
In unrestricted graphs, for any constants , is \NP-hard.
Proof.
We reduce from (i.e. the standard Hamiltonian cycle problem). Given a graph , we build a new graph by gluing to each vertex triangles, as shown in Figure 1. In any cycle each of these triangles must be visited — this accounts for of the visits for each of the vertices in , so the rest of the walk when restricted to must be a Hamiltonian cycle. For the other direction, note that it is possible to satisfy the visit requirements of the each triangle by step** up to it, walking back and forth times, and then step** back down, contributing only additional visit to the vertex we attached the triangles to. So, if is Hamiltonian then is . ∎
In general a depletor gadget is some small graph that we glue to the starting graph that forces vertices to be visited many times. In 1, triangles are serving as depletors, since they each contribute a visit to the vertex they’re glued to. In future sections, we will need depletors with stronger properties, such as forcing an attachment edge to be traversed many times.
Introducing Labellings
Given an cycle, we can label each edge of the graph with the number of times it’s traversed in the cycle. These labels satisfy the following properties:
-
•
the sum of the labels on the edges adjacent to each vertex is an even number at least and at most , and
-
•
the subgraph on edges with non-zero labels is connected.
Now, given such a labeling, we could create a multigraph by including each edge with multiplicity given by its label. Since all vertices in this multigraph have even degree, we can (efficiently) find an Eulerian cycle in the multigraph, which is then an cycle in the original graph. So, finding a labeling with these properties is equivalent to finding an cycle; this perspective will make the problem easier to reason about.
A Technical Note
Finally, we remark that, throughout this paper, degree bounds will be assumed to be greater than or equal to . All problems we consider are trivial in graphs of maximum degree , and so we will refrain from mentioning this special case. We will use “maximum degree” to refer to any upper bound on the degrees of a graph. In particular, a graph with no degree larger than is a max-degree graph even if it does not have a vertex achieving that degree. In directed graphs, degree refers to the sum of in-degree and out-degree.
Another piece of notation that is important to note is that we will write to denote the remainder when is divided by (as opposed to the equivalence class ).
2 Complexity characterization in -regular graphs
2.1 Easiness
We claim that can be solved in polynomial time for -regular graphs, as long as either is even and , or is odd and . The reason for this is simple: the following two lemmas demonstrate that any connected -regular graph is for such .
Lemma 2.
For even , any -regular graph is . For odd , any -regular graph is .
Proof.
If is even, then the graph is Eulerian — taking an Euler tour will visit every vertex exactly times. If is odd, we can duplicate all its edges to get a -regular multigraph — an Euler tour in that multigraph visits every vertex exactly times. ∎
Now we use Tutte’s two-factor theorem to extend 2 to more . Specifically, the form of Tutte’s two-factor theorem that we use is:
Fact 1.
If is a -regular multigraph, its edges can be partitioned into distinct -factors (i.e. -regular sub-multigraphs).
Using 1 we obtain:
Lemma 3 (Broersma, Göbel [broersmakwalks]).
If a graph is for some , then it’s also for all .
Proof.
Let be the multigraph corresponding to a walk on . This is a -regular multigraph, so we can find a multigraph two-factor by Tutte’s two-factor theorem. Duplicating all edges in that two-factor, we have a multigraph corresponding to a walk on . Repeating this process gives the desired claim. ∎
Since a cycle is also an cycle for , we’ve shown the easiness part of the claim.
2.2 Hardness
2.2.1 Depletors
The first step in the hardness argument is to construct depletors. We would like a small structure that can always be part of an cycle as long as it’s visited at least once.
We will describe such a -regular depletor for even with two attachment edges and vertices. Add an edge between and whenever . Now, cut the edges and , and add the edge — note that this is in fact a new edge since
So, if we add an edge leaving the gadget from each of and , the construction will be -regular.
Lemma 4.
For any , there is a valid traversal of this even-regularity depletor in which each attachment edge is traversed exactly once.
Proof.
Assign each edge of the gadget to be traversed times, and assign the edge to be traversed times; see Figure 2. ∎
Note that this gadget required two attachment edges. This is a necessary consequence of the regularity constraint: since is even, there must be an even number of half-edges within the gadget, meaning that the number of edges leaving the gadget must be even.
When is odd, we can construct a -regular depletor needing only one leaving edge. Start with the complete graph , and then delete all edges except for the edge . At this point, every vertex has degree , except for and , which have degree . So, we add a -th vertex , with edges to every other vertex except and , and a single edge leaving the construction — note that the result is now -regular.
Lemma 5.
For any , there is a valid traversal of this odd-regularity depletor in which the attachment edge is traversed exactly twice.
Proof.
Assign all the edges in the loop passing through all vertices to be traversed times, and then add one more traversal to the edges ; see Figure 2. ∎
2.2.2 Reductions
These depletor gadgets let us use the construction from 1 to resolve the case of even .
Lemma 6.
For even , if , then is -hard in -regular graphs.
Proof.
We reduce from in -regular graphs, which is known to be -hard as long as — i.e. as long as . Given a -regular graph , we construct by attaching copies of the -regular depletor of 4 to each vertex. Recall that this depletor required two attachment edges, so is -regular. But now, note that in the process of visiting each depletor gadget once, each vertex from must be visited at least times, leaving room for only additional visit. So, if was not Hamiltonian, is not -Hamiltonian for any . Conversely, if was Hamiltonian, then by 4 we can extend the Hamiltonian cycle to a cycle by visiting each depletor exactly once. ∎
This argument is not immediately sufficient for the case of odd regularity, however. Applying the same construction would yield the following:
Lemma 7.
For odd , if , then is \NP-hard in -regular graphs.
To be tight with our easiness results, however, we would like to show hardness of when . The gap here is coming from our base case: the hard problem we have to reduce from in -regular graphs is , whereas we need to show that even and are hard. Fortunately, a slightly more involved reduction closes this gap.
Lemma 8.
For odd , if , then is \NP-hard in -regular graphs.
Proof.
We reduce from in -regular graphs. Let be a -regular graph; we construct as follows:
-
•
Glue depletors to each vertex in .
-
•
Trisect each of ’s original edges — that is, replace them with paths containing intermediate nodes.
-
•
Glue depletors to each of the intermediate nodes just added.
Using the -regular depletors of 5, this construction is -regular. We would like to show that is Hamiltonian if is Hamiltonian, and otherwise not even Hamiltonian — this suffices to prove the lemma.
First, note that if you ignore the depletors, each intermediate node must be visited exactly once, since the depletors contribute of the allowed visits. Thus, each edge gadget must be labeled either or ; see Figure 4.
The depletors contribute visits to each of the original vertices, so each has an additional label budget of only ; this means that for every original vertex, exactly two of the three incident edge gadgets must be labeled . So, the edges of corresponding to edge gadgets in form a 2-factor; see Figure 5. But now, suppose this -factor had multiple connected components. Since edges do not create connectivity, this would mean that the labeling of was not connected, and so couldn’t correspond to a walk. Thus, can be only if had a connected 2-factor, i.e. a Hamiltonian cycle.
The reverse direction follows by the same logic: given a Hamiltonian cycle in , we label all edge gadgets corresponding to the cycle and all edge gadgets not in the cycle ; visiting each depletor once gives a labeling.
∎
Combining the above lemmas gives a complete characterization of the hardness of in regular graphs.
Theorem 1.
When restricted to -regular graphs, is \NP-hard if either is even and , or is odd and . Otherwise, .
3 Complexity characterization in graphs of max-degree
We now have a tight understanding of when is hard in regular graphs. If, instead, we just cared about graphs with constant maximum degree, the hardness results would translate, but easiness would not. We show in this section that in fact the true threshold for hardness in this setting looks very different: complexity is determined not by but by the ratio .
For our easiness result, we will note that testing -Hamiltonicity is easy in trees, and then show that when , for , any failure of -Hamiltonicity is witnessed by a tree-like subgraph. To show hardness, we will exploit a few low-degree vertices to construct and fine-tune highly efficient depletor gadgets.
3.1 Easiness
First, we observe that without loss of generality an walk never traverses a given edge more than times:
Lemma 9.
Let be a graph. If has an labeling, it has such a labeling with maximum label at most .
Proof.
Take such an walk, and consider an edge with label more than . Each of the vertices incident to that edge is therefore visited at least times by the walk — so, if we subtract from the label of that edge, each of them will still be visited at least times, and the labeling will still be valid. ∎
Now, we give an algorithm for in trees, which will be an important component of our algorithm for in general graphs.
Lemma 10.
Let , and let be a tree. There is a linear-time algorithm to determine whether is .
Proof.
Arbitrarily root the tree. We will work from the bottom-up, recording for each edge the set of label values that can extend to a valid labeling in the subtree below it. In fact, we will show that for each edge the set of labels for that can extend to a valid labelling in the subtree below is of the form for even integers . Thus, it will suffice to record for each edge the minimum and maximum labels which can extend to valid labellings in the subtree below .
Start by setting for each edge incident to a leaf of the tree: these edges must be traversed at least times in order to visit the leaves times. Now we repeatedly apply the following process to find for all edges in the tree:
Find a vertex such that all edges in the subtree rooted at have been labelled. Let be the sum of respectively over edges going down from . Let be the edge going up the tree from . We claim that the valid labels for are precisely the even numbers in the interval defined by
First we argue that labelling for must lie in this set; then we will argue that any labels in this set can be extending to labellings on the subtree. The label on must be even because all of the edges going down from have even labels (by induction). The label on cannot be zero, or else the labelling is not connected. The label on must be at least or else vertex is not visited enough times. The label on cannot be larger than or else vertex is visited too many times. It is clear that for any even , if we give label , then there is a compatible labelling of the subtree rooted at .
If at any step in the process an edge is given , then we deduce that there is no valid labelling of the tree. Otherwise, the process will terminate with every edge having with . To finish our check of whether the tree is we simply iterate over all possible ways of assigning labels to the edges incident to the root, taken from their corresponding allowed sets . If there is any combination of labels of the edges incident to the root that satisfies the root, then by construction of the allowed label sets, we can extend the labellings given to each incident to the root to the entire subtree below . Thus, we can label the entire tree. ∎
We now use this procedure for trees as part of an algorithm for in general graphs in the case . Afterwards we will analyze the case , which is simple but (somewhat surprisingly) meaningfully different from the case .
Lemma 11.
For any and any such that , there exists a polynomial-time algorithm to test whether a graph of max degree is .
Proof.
The first step of the algorithm is to search for tree derivations. Call an edge dangerous if it does not belong to any cycle in (the set of dangerous edges can be compute easily using connectivity tests on modified versions of the graph). The tree derivation stage will assign labels to all dangerous edges.
The means of performing a derivation is exactly as described in 10. The set of dangerous edges forms a forest, so for each tree in the forest we run the algorithm from 10 to find an labeling that satisfies all vertices except possibly the root. If any of these tree derivations fail, cannot be — the failure of a tree derivation gives a set of vertices that cannot be mutually satisfied under any labeling, since there can’t be any more edges into this set.
If none of these tree derivations fail, we have a labeling of all dangerous edges that satisfies all vertices not involved in any cycle. Call a vertex good if it’s involved in at least one cycle. The next step of our argument is to show that, no matter what labeling we choose for the dangerous edges, there is always an assignment to the remaining edges that visits each good vertex between and times, showing that is necessarily unless a tree derivation fails.
Existence of a labelling, given that tree derivations succeed
We now give a procedure which finds a labelling of the remainder of the graph once all tree derivations have succeeded; we stress that we don’t actually run this procedure in our algorithm, it is an analysis tool to demonstrate the existence of a labelling. The procedure is as follows:
-
•
Find an arbitrary cycle in the graph, and label all of its edges with . Mark the vertices involved in that cycle happy.
-
•
While there remains a cycle involving only unhappy vertices, repeat the above step with that cycle.
-
•
Now, suppose there still exists an unhappy good vertex. Since good vertices are involved in cycles, there must exist a path that starts and ends in happy vertices but otherwise contains only unhappy good vertices. (Here, we’re allowing that “path” to potentially start and end at the same happy vertex — this is a slight abuse of terminology.) Find such a path. If is even, label all edges in the path with . Otherwise, give the edges in the path alternating labels of and . Mark all vertices along the path happy.
-
•
Repeat the above step until all good vertices are happy. Then, label all unlabeled edges of the graph with .
Now we analyze the procedure. First, note that all edges are assigned nonzero weight, so this construction is connected111This is the place where the argument fails for . In that case, the edges assigned would be given zero weight, and so we wouldn’t ensure connectivity.. Labeling a full cycle with ’s increases every vertex label sum by either or , and all other labels used in this construction are even values, so this labeling gives even sums into every vertex. So, the only point to argue is that every vertex is given sum between and . This holds for the non-good vertices by virtue of the tree derivations succeeding. Now, note that for each good vertex, at some point we label two of its incident edges either and or and . In either case, this ensures that they have total weight at least . By 9, we can decrease all labels assigned while performing tree derivations to be at most . Thus, the sum of the labels incident to any good vertex is at most
∎
The final point to note in this section is the following, covering the case:
Lemma 12.
Every connected graph of maximum degree is
Proof.
Label all edges . This visits each vertex at least once, and at most times. ∎
3.2 Hardness
Lemma 13.
is -hard in graphs of maximum degree .
Proof.
When is odd, this follows by our hardness results in 8 — a -regular graph is in particular a graph of maximum degree . When is even, we can use the exact same construction as in the proof of that lemma, but just use 3-regular depletors instead of -regular depletors, since we’re no longer concerned with regularity. ∎
When , though, we will show hardness for much larger values of than are hard in -regular graphs. Proving this claim will require a new depletor construction, which we call a chain depletor, since it’s composed of a long chain of subunits:
Lemma 14.
Let be integers with . For any integer , there exists a gadget of maximum degree and with a single attachment edge, which can be part of an cycle if the attachment edge is labeled , but cannot be satisfied if the attachment edge is labeled .
Proof.
Consider the gadget shown in Figure 7 — a -edge path on two intermediate vertices, with depletors of total depletion attached to the second intermediate vertex.
Gadgets of this form will serve as the links in the chain. Let be the label leaving the first intermediate vertex, be the label leaving the second intermediate vertex, and be the label on the edge between the two vertices. In order to satisfy the visit counts of the first vertex, we must have , and in order to satisfy the visit counts of the second vertex we must have . Adding these constraints together, we find that if , there is no setting of that satisfies both of them. On the other hand, if , then setting and not only satisfies all visit count constraints, but also preserves connectivity so long as . So, this gadget forces its “outgoing” edge to have label at least more than its “incoming” edge, and is satisfied by an outgoing label exactly that large as long as its incoming edge had label between and .
Of course, in constructing this link gadget, we assumed we were able to deplete a vertex by . So if we want to use these gadgets for anything, we first need some sort of depletors to start with. Fortunately we do have some depletors: using for instance the -regular depletor of 5 (or an edge with a triangle on the end) gives depletion, and gluing a single vertex along an edge gives depletion. The overall goal of the chain depletor construction is to get a single gadget with depletion in between and , since for our reductions we will need to fine-tune the depletion exactly.
For our construction, we chain together multiple copies of the link gadget, identifying the outgoing edge of one with the incoming edge of the next, and finally ending in a single vertex, as shown in Figure 8:
Suppose the link gadgets are constructed with depletions , and let and be the labels assigned to the attachment edge and final edge of the chain, respectively. By our analysis of the link gadget, this construction is unsatisfiable if the final edge has label . We would therefore like to choose the depletions such that , since then if the incoming edge has too small a label , this will make setting impossible, and so ensure that the vertex at the end of the chain can’t be satisfied. We also want to make sure that the chain is satisfiable if the incoming edge is labeled ; to guarantee that, it suffices by our analysis of the link gadgets to ensure that for all , since then the construction is satisfied by greedily labeling each edge, from attachment edge to the final edge, with the smallest allowable value.
We will now show that, except in the case where is a multiple of , which we will handle slightly differently, it is always possible to construct such a sequence of . Let and , so that . We will use three kinds of links, with the following depletions:
-
•
, created by gluing single edges. We have
-
•
, created by gluing single edges and one 3-regular depletor. We have
-
•
, created by gluing single edges. We have
To verify that these links are well defined, we must check that the maximum degree in the link is at most . Note that by assumption. Thus, , so the degree constraint allows us to glue depletors to a vertex in our link gadget.
As long as is not a multiple of , we have that is positive, is negative, and . By Bezout’s lemma, there must therefore exist non-negative integers such that
So, we have constructed a multiset of links with the desired sum. Now we give an ordering of the links in the multiset such that such that
for all . We construct the ordering greedily. Let be the multiset of links we found above. While
we choose an element of such that
set , and remove from . We now show that such a necessarily exists.
Suppose is nonempty, and adding a large link brings the sum outside the desired interval. That is,
Then, since adding all remaining elements of would bring the sum to , we know that cannot consist only of large links. and are both non-negative, and we know
so adding either a medium or a small link would be valid. If, on the other hand, adding a large link would be valid, then either contains a large link and we can add that, or contains only small and medium links, in which case since and are both non-negative we can add them in any order. Repeating this argument on until we reach a sum of will give a greedy construction for the link sequence .
We have established the lemma in the case that ; we now deal with the case where is a multiple of . Here, , so now none of , , and are positive. In this case, we will build our chain using copies of the link, and feed the final edge into a -regular depletor as opposed to a single vertex, as in Figure 9.
If the attachment edge is labeled , then the final edge can be labeled at least and so this is satisfiable. However if the attachment edge is labeled , then the final edge can’t have positive label, and so the final depletor is not visited. ∎
Now that we have these fine-tunable depletors, we can glue them to the vertices of a graph to contribute a specific number of artificial visits. However, in order to contribute enough visits in our reduction, it is sometimes necessary to also deplete along the edges.
Lemma 15.
Let be constants with . For any integer , there exists a gadget of maximum degree and with two attachment edges with the following properties:
-
•
The gadget can be satisfied if both attachment edges are labeled .
-
•
The gadget cannot be satisfied if an attachment edge is labeled less than .
-
•
The gadget can be both satisfied and connected if both attachment edges are labeled .
-
•
The gadget cannot be connected if an attachment edge is labeled less than .
Proof.
Consider the gadget shown in Figure 10: a path on intermediate vertices, where the middle vertices each have worth of depletion glued to them — this can be constructed using the chain depletors of 14.
The middle edge can be assigned non-negative label only if both attachment edges are labeled at least , and can be assigned positive label only if both attachment edges are labeled at least . ∎
We can think of this edge gadget as effectively providing depletion to both sides. So, we can now give a reduction to show our complete complexity characterization:
Theorem 2.
When restricted to graphs of maximum degree , is \NP-hard if either and , or and . Otherwise, .
Proof.
The easiness results were established in Section 3.1, and the case of in 13. So, it suffices to show a reduction from in a -regular graph to in a max-degree graph when . By replacing the edges of with the edge gadgets of 15, we can introduce up to depletion at each vertex, and by gluing up to additional chain depletors to each original vertex, we can introduce up to more. Since
and all of these depletors are fully fine-tunable, we can ensure exactly depletion on each original vertex of . This means that up to but no more than of the edge gadgets incident to each original vertex can be connected; thus, is if and only if has a connected -factor. ∎
4 Complexity characterization in directed graphs
In contrast to the case of undirected graphs, where we found that sufficiently large size of the range compared to degree made easy, we will show that in directed graphs every case is hard, except when the range is very small (contains only a single element) and .
Just as in the directed case, we can think of the problem of as finding labels. More precisely, a directed graph is if and only if there is a connected labeling of the edges such that every vertex has in-label sum and out-label sum . As in the directed case the equivalence of these notions follows from taking an Euler tour on the multigraph generated by viewing the labels as multiplicities for edges.
4.1 Easiness
First we give a simple algorithm for the easy cases of in directed graphs.
Lemma 16.
For , there exists a polynomial-time algorithm to decide in directed graphs of maximum degree .
Proof.
Fix a directed graph of maximum degree . If any vertex has in-degree or out-degree we immediately deduce that the graph is not ; in the remainder of the proof we assume there are no vertices with in-degree or out-degree .
Our algorithm for begins as follows: while there exists a vertex in the graph with only a single unlabeled out-edge, or only a single unlabeled in-edge, assign that edge the unique label that satisfies . When that process terminates, each vertex must have either zero or two unlabeled in-edges, and either zero or two unlabeled out-edges. So, if we look at the subgraph on unlabeled edges, and think of them as undirected, we must have a union of even-length cycles. For each of those cycles, assign labels by alternating between and . Now, check whether the assigned labels represent an labeling; if so accept, if not reject.
Since , if our labeling violates a vertex visit constraint, that constraint must have been violated during the forced initial phase. Similarly, since this process only labels edges with during the initial phase, if connectivity fails then no labeling can achieve connectivity. ∎
4.2 Hardness
4.2.1 Max degree
We now show hardness of . We will argue by induction. The following lemma constitutes the inductive step of the argument.
Lemma 17.
Fix . Suppose that is \NP-hard in -regular digraphs. Then, for any , is \NP-hard in -regular digraphs.
Proof.
Let be a -regular digraph. We construct by replacing each vertex of with a vertex gadget consisting of three hub vertices connected by bridge gadgets, as shown in Figure 11.
We claim that is if and only if is . First we show that if is then must be . Each of the bridge gadgets must be visited at least times, contributing at least of the in-label and out-label of each of the hub vertices. Thus, the edges entering and leaving the vertex gadget can be traversed at most times. That is, each vertex gadget is visited at most times and at least once in an tour of . If this is possible, then must be .
For the other direction, if is we can create labelling of proving that is as follows. First, copy the labels on the edges in to the edges that enter and exit the vertex gadgets. Now, label the edges internal to the vertex gadgets as follows: start by assigning all edges in the gadget label . Then, increase the edges in the first bridge gadget by one for every traversal of the first edge out of the vertex in . Then, increase the labels of edges in both the first and second bridge gadgets by one for each traversal of the second edge leaving the vertex in . This labeling visits each interval vertex at least times and at most times, as desired. Thus, is . ∎
Now, by applying this construction recursively, we can show our full hardness result:
Lemma 18.
For any , is -hard in -regular digraphs.
Proof.
We will argue by induction on that for all constants , is \NP-hard. Using the classic theorem that is \NP-hard in -regular digraphs, by 17 we deduce is \NP-hard for all ; this will serve as the base case of our induction. Now, assume that is \NP-hard for any constant . In particular this means that is \NP-hard. Then, applying 17 we conclude that is \NP-hard for all . ∎
Theorem 3.
In directed graphs of maximum degree , for , if , and -hard otherwise.
4.2.2 Max degree 4
The hardness for max degree digraphs immediately gives that is hard in max degree digraphs as long as . In this section, we will take a different reduction approach to show that is also hard. We will use the following depletor-like construction, which we call an at-least- gadget:
Lemma 19.
For any , there exists a gadget of max degree with one incoming edge and one outgoing edge that can be part of an cycle as long as it’s traversed at least times and at most times.
Proof.
First, as a base case, consider the construction in Figure 12. It is clear that this is an at-least- gadget.
Now, suppose we know how to build an at-least- gadget. Then, the construction in Figure 13 is an at-least- gadget.
∎
By using at-least- gadgets, we can give our desired reduction.
Lemma 20.
For any , is -hard in directed graphs of maximum degree .
Proof.
We reduce from in max degree digraphs. Let be a max degree digraph. We will make two copies, and , of the vertex set, and add the edge for every edge . We will also add the edges for all . Finally, for every , we will add an at-least- gadget from to . This construction is shown in Figure 14.
The at-least- gadget consumes all but of ’s available out-label, and all but of ’s available in-label, so at most one other edge out of can be given nonzero label, and at most one other edge into can be given nonzero label. Thus, in order to maintain connectivity between all , the labeling in must correspond to a Hamiltonian cycle in . ∎
This establishes 4:
Theorem 4.
For all , is -hard in directed graphs of maximum degree 4.
5 Conclusion and open questions
We now have full characterizations of which and make \NP-hard in -regular graphs and graphs of max degree . One question of further potential interest would be to extend this analysis to low-dimensional grid graphs (i.e. induced subgraphs of a square lattice). It’s known that is \NP-hard in 2-dimensional grid graphs [gridgraphs], but not clear whether one should expect to be hard as well, for example. Another problem worth considering would be hardness of approximation — for instance, when is it possible to distinguish between graphs and graphs that aren’t even , for some ?
Acknowledgments
This paper was initiated during open problem solving in the MIT class “Algorithmic Lower Bounds: Fun with Hardness Proofs” (6.5440) taught by Erik Demaine in Fall 2023. We thank the other participants of that class for helpful discussions and providing an inspiring atmosphere.