In this paper we present the first deterministic polynomial time algorithm for determining the existence of a Hamiltonian cycle and finding a Hamiltonian cycle in general graphs. Our algorithm can also solve the Hamiltonian path problem in the traceable graphs. The space complexity of our algorithm is O(n^4). The time complexity are theoretically O(n^5*d^2) on average and O(n^6*d^2) in the worst case respectively, where d is the maximum degree of vertex. With parallel computing, the space complexity can be improved to O(n^3) and the time complexity to O(n^3*d^2) on average and O(n^4*d^2) in the worst case. We construct the corresponding path hologram transformed from the original graph and compute the path set, which is a collection of segment sets consisting of all the vertices located on the same segment level among all the longest basic paths, of every vertex with greedy strategy. The path hologram is a multi-segment graph with the vertex <u, k> where u is a vertex and k is the segment level of u in the path hologram. To ensure that each valid path fragments can be visited and invalid path fragments cannot be visited, the key strategy of our method is the "consecutive" deleting-replenishing operations recursively on the left/right action field of a vertex, respectively. In fact, our algorithm can be directly applied to the original graph. Besides, our algorithm can deal with the finite general graphs including undirected, directed, and mixed. As a result, the well-known problem HCP in NPC can be now solved practically in deterministic polynomial time for general graphs in the worst case.
翻译:在本文中, 我们分别展示了第一个确定性多元时间算法, 用以确定汉密尔顿周期的存在, 并在一般图形中找到汉密尔顿周期。 我们的算法也可以在可追踪的图形中解决汉密尔顿路径问题。 我们算法的空间复杂性是 O( n) 4 。 我们算法的空间复杂性是平均的 O( n) 5* d ⁇ 2) 和 最坏的 O( n) 6* d ⁇ 2 ), 最差的则分别是理论上的 O (n) 5* 6 * 2 和 O( n) 6* d ⁇ 2 。 平行计算后, 空间复杂性可以改进为 O( n) (n) 3), 平均的 O( n( n) 3 * d) 和最差的 汉密周期周期 。 我们的轨算法的对应路径和路径的缩略图的缩略图的缩略图, 直径直径直径直径直径直径直径直径直径直径, 直径直径直达地显示。 直径直径直径直径直径直径直到直直径直直直直直到整个的轨道直直到直直直直直直直到直直直直到直直的轨道的轨道的轨道的轨道, 。 。