Abstract

A Hamiltonian path in a graph is a path involving all the vertices of the graph. In this paper, we revisit the famous Hamiltonian path problem and present new sufficient conditions for the existence of a Hamiltonian path in a graph.

1. Introduction

Hamiltonian paths and cycles are named after William Rowan Hamilton who invented the puzzle that involves finding a Hamiltonian cycle in the edge graph of the dodecahedron. Although Hamilton solved this particular puzzle, finding Hamiltonian cycles or paths in arbitrary graphs is proved to be among the hardest problems of computer science [1]. As a result, instead of complete characterization, most researchers aimed to find sufficient conditions for a graph to possess a Hamiltonian cycle or path. In this paper, we focus on degree based sufficient conditions for the existence of Hamiltonian paths in a graph.

To the best of our knowledge, the quest for good sufficient degree based conditions for Hamiltonian cycles or paths dates back to 1952 when Dirac presented the following theorem, where denotes the degree of the minimum degree vertex of the graph .

Theorem 1 (see [2]). If is a simple graph with vertices, where and , then contains a Hamiltonian cycle.

Later Ore in 1960 presented a highly celebrated result where a lower bound for the degree sum of nonadjacent pairs of vertices was used to force the existence of a Hamiltonian cycle. In particular, Ore proved the following theorem, where denotes the degree of the vertex .

Theorem 2 (see [3]). Let be a simple graph with vertices and , distinct nonadjacent vertices of with . Then, has a Hamiltonian cycle.

A graph satisfying Ore’s condition has a diameter of only two [4], where the diameter of a graph is the longest distance between two vertices. But if a sufficient condition can be derived for a graph with diameter more than two, Hamiltonian path or cycle may be found with fewer edges. With this motivation, Rahman and Kaykobad [5] proposed a sufficient condition to find a Hamiltonian Path in a graph involving the parameter , which denotes the length of the shortest path between and .

Theorem 3 (see [5]). Let be a connected graph with vertices such that for all pairs of distinct nonadjacent vertices one has . Then, has a Hamiltonian path.

In some subsequent literature, the condition “, where , are distinct nonadjacent vertices of a graph having vertices,” is referred to as the “Rahman-Kaykobad” condition. A number of interesting results were achieved extending and using the “Rahman-Kaykobad” condition as listed below.

Theorem 4 (see [6]). Let be a 2-connected graph which satisfies the “Rahman-Kaykobad” condition. If contains a Hamiltonian path with endpoints at distance 3, then contains a Hamiltonian cycle.

Theorem 5 (see [7]). Let be a connected graph which satisfies the “Rahman-Kaykobad” condition. Then, either contains a Hamiltonian cycle or belongs to some specific classes of graphs.

Theorem 6 (see [8]). Let be a 2-connected graph with vertices. If for every pair of vertices and with , then contains a Hamiltonian cycle, unless is odd and belongs to some specific classes of graphs.

The sufficient conditions of Theorems 4, 5, and 6 can be seen as incremental improvements over the result of Rahman and Kaykobad [5]. To the best of our knowledge, the latest and the best (so far) result of “Rahman-Kaykobad” condition was reported in [9]. In particular, in [9], the authors show that “Rahman-Kaykobad” condition is “almost” sufficient to make a graph pancyclic, where a graph is pancyclic if it contains a cycle of length for .

Theorem 7 (see [9]). Let be a 2-connected graph of order , which satisfies the “Rahman-Kaykobad” condition. Then, either is pancyclic or belongs to some specific classes of graphs.

In [10], the authors proved the following traceability analogue of the famous Fan’s condition for hamiltonicity [11].

Theorem 8. Let be a connected graph of order . If for each pair of vertices at distance 2, then is traceable.

By this theorem, the existence of a Hamiltonian path for each pair of vertices of only distance two is ensured. In this paper, we mention a more generalized version of Theorem 8. In particular, we present new sufficient conditions for a graph to possess a Hamiltonian path and Theorem 8 can be seen as a special case of our sufficient conditions. This time, we achieve a lower bound for the degree sum of nonadjacent pairs of vertices that is 2 lesser than Ore’s condition. However, this condition cannot guarantee a Hamiltonian path for all graphs and we present such examples as well. The rest of the paper is organized as follows. In Section 2, we present some preliminary notations and results needed throughout the paper. Section 3 presents our main results. Finally, we very briefly conclude in Section 4.

2. Preliminaries

We consider only simple graphs and hence neither self-loop nor multiedges are present. Suppose we have a graph with vertices. We sometimes use the notations and . Two vertices, are said to be adjacent/neighbours to each other if ; otherwise, they are nonadjacent. The set of neighbours of a vertex in is denoted by . If is a subgraph of and , then denotes the set of neighbours of (confined) in . Now, and . We use to denote the complimentary graph of with respect to ; that is, and . A path of is defined by a sequence of vertices such that , . Sometimes, is referred to as a , -path and and are referred to as the end vertices or endpoints of . Also, sometimes we use the notation to denote the length of . So, by our definition, . If we have , then the graph such that is called a cycle. In what follows, we only consider simple paths and simple cycles. A path (cycle ) is called a Hamiltonian path (cycle) if (). Given a path of as defined above, assume that and . Two edges , , are said to be crossover edges if and only if . For example, in Figure 1, the pair of edges and are crossover edges. The following is a well-known fact.

Fact 1. Suppose is a path of . If there exist crossover edges , , then there is a cycle in .

Proof. We easily get a cycle as follows:

In what follows, we extensively use the following result.

Lemma 9 (see [5]). Let be a connected graph with vertices and a longest path in . If is contained in a cycle then is a Hamiltonian path.

An independent set of a graph is a set of vertices such that all pairs of vertices are nonadjacent in . A graph can be decomposed into independent sets in the sense that the entire vertex set of the graph can be partitioned into pairwise disjoint independent subsets. Such independent subsets are called partite sets or simply parts. A graph is said to be a -partite graph, if its vertex set can be decomposed into partite sets but not fewer. So, a bipartite graph is a graph that can be decomposed into two partite sets but not fewer. Similarly, a tripartite graph is a graph that can be decomposed into three partite sets but not fewer. A 1-partite graph is the same as an independent set or an empty graph.

One often writes to denote a bipartite graph whose partite sets are and . If , that is, if the two partite sets have equal cardinality, then is called a balanced bipartite graph. On the other hand, if , then we say that is a semibalanced bipartite graph. Note that, by definition, a balanced bipartite graph is also a semibalanced bipartite graph. It is easy to see that, for a bipartite graph to possess a Hamiltonian path, must be semibalanced. Similar to the notation used for bipartite graphs, a tripartite graph with partite sets , , and may be denoted by .

3. Sufficient Conditions

In this section we present our main results. First, we present the following useful lemma.

Lemma 10. Let be a longest path of such that . If , , then there exists at least crossover edges.

Proof. Since is a longest path, (Lemma 9) and all the neighbors of and must lie within . Assume that and . Now, it is clear that and . Therefore, we must have . Now we have the following: Therefore, we have and we are done.

Remark 11. Note carefully that, in Lemma 10, when we talk about multiple crossover edges, they may not necessarily be disjoint.

Now, we present the following sufficient condition.

Theorem 12. Let be a connected graph with vertices, such that is odd. If for all pairs of nonadjacent vertices , one has , then has a Hamiltonian path.

Proof. Let be a longest path of of length . If is a Hamiltonian path, we are done. So, assume otherwise. Clearly, because, otherwise, by Lemma 9, we are done. Now, we must have , since, otherwise, is part of a longer path, a contradiction. Therefore, we must have and .
Now, since , are nonadjacent, we must have . Now, if we assume that , then we must have ; that is, , implying that is a Hamiltonian path. Therefore, assume that . Since we cannot allow a crossover edge, if we want to maximize the total degree sum of , we can have configurations similar to one of three configurations, namely, Config-1, Config-2, and Config-3 shown in Figures 2 to 5. It can be verified easily that any other configuration will result in and according to the argument presented above then would have to be a Hamiltonian path. Note carefully that in both Config-1 and Config-2 we have . The main properties of Config-1 and Config-2 are listed as the following facts. And Config-3 is a combination of Config-1 and Config-2.
Fact 2. In Config-1, we have , , such that .
Fact 3. In Config-2, if is odd, then we have . On the other hand, if is even, then we have and .
Now, we consider two cases as follows.
Case 1  . From Figures 2 to 4 it is easy to see that if , then we definitely will have a crossover edge resulting in a cycle containing another path such that . Therefore, by Lemma 9, it follows that the length of a longest path cannot be , a contradiction.
Case 2  . Since , we have . Therefore, . Now, if , we are done. So, assume that . Then we have a vertex such that . Now, for , we cannot have because, then, we have a longer path than , a contradiction. Now we must have and . Then, we have the following: Now, since and cannot be a fractional value, we must have . Now we have two cases.
Case 2.a (Config-1). In this case we have a configuration similar to Figure 2. Now, let . Assume without loss of generality that . If , then we easily get a Hamiltonian path and we are done. So, assume that , .
Now, recall that, in this case, there exists a vertex such that (Fact 2). Now, we have three subcases.
Case 2.a.1 . From Fact 2, it is clear that . Therefore, we get a Hamiltonian path and we are done.
Case 2.a.2 . This is symmetrical to Case 2.a.1.
Case 2.a.3 . Again, from Fact 2, it is clear that . Therefore, we get a Hamiltonian path and we are done.
Case 2.b (Config-2). Since is odd, in this case, we have is even. Hence, we have a configuration similar to Figure 3. Recall that we have . Since is odd and cannot be a fractional number, we must have . In other words, we have .
First of all, if we have either of the edges , we are done. So assume otherwise. Furthermore, if we have , then we get a Hamiltonian path and we are done. So, assume otherwise. So, . Therefore, we have vertices as candidates for membership in .
Now, since , we have . Therefore, we must have . Now, let . Without the loss of generality assume that . Clearly, if , we are done, since we get a Hamiltonian path . So, assume that , . Since is an odd number, it follows that . This contradicts our deduction above that .
Case 2.c (Config-3). As mentioned above Config-3 is a combination of Config-1 and Config-2. Recall that in this case our assumption is . Hence we have . Clearly, because then we get a longer path, a contradiction. It is easy to verify that this would force two consecutive vertices for . Then, again we get a longer path simply including the subpath , which leads us to a contradiction.
And this completes our proof.

Note that in the proof of Theorem 12, the condition that is odd is assumed only in Case 2.b where Config-2 is considered. So, based on the proof of Theorem 12, we have the following two corollaries.

Corollary 13. Suppose one has a graph with vertices such that for all pairs of nonadjacent vertices , one has . If one has configurations similar to Config-1, then must possess a Hamiltonian path.

Corollary 14. Suppose one has a graph with vertices such that for all pairs of nonadjacent vertices , one has . If one has configurations similar to Config-2 and is odd, then must possess a Hamiltonian path.

We now present another sufficient condition.

Theorem 15. Let be a semibalanced bipartite connected graph with vertices. If, for all pairs of nonadjacent vertices , one has , then has a Hamiltonian path.

Proof. Now, the proof assumes the same hypotheses of the proof of Theorem 12. Clearly, based on Corollaries 13 and 14, it suffices to consider only Config-2 when is even. Therefore, what follows should be treated as a continuation of the proof of Theorem 12 excluding Case 2.b. Additionally, we assume that is a semibalanced bipartite connected graph.

Since is even, in this case, is odd. Hence, we have a configuration similar to Figure 4. Recall that we have . In other words, we have .

First of all, if we have either of the edges , we are done. So assume otherwise. So, . Therefore, we have vertices as candidates for membership in .

Now, since is even, implies . Hence, we have . Therefore, we must have . Now, let . Without the loss of generality assume that . Clearly, if , we are done, since we get a Hamiltonian path . So, assume that , . Now, we claim the following.

Claim 1. If such that either or or both are odd, then we have a Hamiltonian path.

Proof of Claim 1. Assume that is even and , is odd. Clearly, is even and we know that is adjacent to both and (Fact 3). Then, we easily get a Hamiltonian path
Similarly we can show the existence of another Hamiltonian path if is odd and is even. The case when both and are odd also follows easily.

Now, by Claim 1, if , such that either or or both are odd, then we have a Hamiltonian path and we are done. Therefore, assume otherwise. Then, since we have vertices as candidates for membership in , , and is odd, we must have . Therefore, .

Now, if are odd, then we must have , because otherwise we get an odd cycle contradicting our assumption that is a bipartite graph. Similarly, if are even, then we must have for the same reason. Then, the two partite sets and of our graph are defined as follows:

Then, we have , which contradicts our assumption that is semibalanced and this completes the proof of Theorem 15.

Interestingly, we have the following theorem as well.

Theorem 16. Let be a tripartite connected graph with vertices. If, for all pairs of nonadjacent vertices , one has , then has a Hamiltonian path.

Proof. The proof of this theorem almost exactly follows the proof of Theorem 15. The only difference now is that we assume to be tripartite instead of semibalanced bipartite. Then, we can continue with the same arguments as we did in the proof of Theorem 15 and reach a position where turns out to be a bipartite graph. This is a contradiction since is tripartite and this completes the proof.

3.1. Discussion

In Theorem 12, we have presented a sufficient condition for the existence of Hamiltonian path assuming that, , the number of vertices of the graph, is odd. When is even, we have shown our condition to be effective for some classes of graphs. Interestingly, we can construct a graph with even number of vertices which satisfies our condition but still does not possess a Hamiltonian path. For example, consider the graph in Figure 6. The adjacency matrix of the graph of Figure 6 is presented in Table 1. Now, it is clear from Table 1 that for every pair of nonadjacent vertices , in this graph we have . However, the graph in Figure 6 is in fact a bipartite graph with partite sets and such that . Therefore, it cannot possess a Hamiltonian path. Also, note that even if we make the graph nonbipartite by adding some edges in the partite set , still the graph will not have a Hamiltonian path. In fact, even if we add all the edges to make the partite set a clique, the graph will not possess a Hamiltonian path. On the other hand, a single edge within the partite set can provide us a Hamiltonian path.

4. Conclusion

In this paper, we have presented new degree based sufficient conditions for a graph to contain a Hamiltonian path. It would be interesting to investigate whether our condition could force a graph to contain a Hamiltonian cycle or even to be pancyclic.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgment

This research was conducted at CSE, BUET, as part of a research project titled “Degree Based Sufficient Conditions for Hamiltonian Paths and Cycles,” approved by CASR, BUET.