Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
A Polynomial Time Algorithm for Hamilton Cycle and Its Proof

A Polynomial Time Algorithm for Hamilton Cycle and Its Proof

Ratings: (0)|Views: 743|Likes:
Published by Dhillonv
A proposed proof for solving Hamiltonian cycle, available from arXiv
A proposed proof for solving Hamiltonian cycle, available from arXiv

More info:

Published by: Dhillonv on Aug 10, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/16/2013

pdf

text

original

 
 A Polynomial Time Algorithm for Hamilton Cycle and Its Proof 
Lizhi DuCollege of Computer Science and Technology,Wuhan University of Science and TechnologyWuhan, 430081, P.R. of ChinaTel: 86 13554171855 Email: edw95@yahoo.com
 Abstract
 
We present a polynomial time algorithm forfinding a Hamilton Cycle(Path) in an undirected graph andproves its correctness. A program is developed according tothis algorithm and it works very well. This paper declares thealgorithm, its proof, and the experiment data. Even only ourexperiment data is a breakthrough.
 
We develop a polynomial time algorithm for findinga Hamilton cycle(path) in an undirected graph. Thisalgorithm works very smooth for all kinds of undirectedgraphs, i.e., for graphs with the same number of vertices,except for a little trivial instances which are very easy tocalculate, their running time are very close to one another.So using our algorithm, there is no graph to cost muchmore time than others, i.e., there is no “dead angle” for ouralgorithm. Our algorithm looks like a random algorithm.Yes, it is a random algorithm. But if we can exhaustivelycompute all undirected graphs using my algorithm in allpossible step orders, of course, the random algorithmbecomes a general algorithm. we find a way to compute“all” graphs by only computing a limited number of graphs. This is our big breakthrough
(it cost me many yearstime for getting the algorithm and the proof method 
). Aprogram on this algorithm has been tested over a hundredmillion times for graphs whose number of vertices isbetween 100 to 10000, no fails.
 Keywords:
 
Computer Algorithm, Hamilton Path, HamiltonCycle, Polynomial Time, Computational Complexity
 
INTRODUCTIONFinding Hamilton cycles(paths) in simple graphs is aclassical NP Complete problem, known to be difficult boththeoretically and computationally (see [5],[6],[7]). In spiteof recent advances, the problem presents an imminentscientific challenge.Over the past decades, Hamilton cycles have beenwidely studied. One direction is to find a sufficientcondition for a graph to be Hamiltonian(when there is atleast one Hamilton Cycle in a graph, we say this graph isHamiltonian). Most of these conditions for a general graphdepend on the number of edges of the graph. Using thesetechniques, a graph is usually provably Hamiltonian onlythere are sufficiently many edges in the graph. Yet suchresults are often possible make sense that counterexamplesexist when the conditions are weakened. Another directionis to design a random algorithm which usually succeeds infinding Hamilton cycles or paths with high probability, orworks well only for some classes of graphs.Yet no general polynomial time algorithms have beendeveloped for Hamilton cycles or paths. People even darenot try to do so, only because the problem is NP Completeand its polynomial time algorithm implies NP=P.So, the challenging job still is: to develop apolynomial time algorithm for all general graphs(in thispaper, we only concern undirected graphs), i.e., no graphshave specialties on this algorithm so that the algorithmcannot work on them correctly, and to prove the algorithmis correct theoretically.The main problem is: why many random algorithmswork well on most graphs, only cannot work on some(maybe rare) instances. Why we cannot overcome the rareinstances?Our point of view is: there is no any strong logicalreason for the rare instances to be special.
STUDY PROCESS AND METHODS
 A. Why the NP problem is so difficult?
Since the NP problem came to the world, numerousscholars have been studying it. However, up to now,people cannot still confirm: is the NP equal to the P or not?Where is the reason?In computer science, divide and conquer is animportant algorithm design paradigm based onmulti-branched recursion. A divide and conquer algorithmworks by recursively breaking down a problem into two ormore sub-problems of the same (or related) type, untilthese become simple enough to be solved directly. Thesolutions to the sub-problems are then combined to give asolution to the original problem. After dividing a big partinto small parts and studing each small part, we shouldmerge all the small parts together to study, because thesesmall parts have connections to each other, in order to geta final result, all these connections must be consideredthoroughly. The NP-complete’s difficulty lies that: itsparts’ connections are very intensive and complicated. If an algorithm(polynomial time) fully considers theseconnections, still can not get the final result, it of courseimplies that NPC can not be solved in polynomial time.The question is: by now, no any algorithm(polynomialtime) can fully handles the intensive and complicatedconnections among all parts of an NPC. For example:using a tree to denote an algorithm for an NPC. In layer 0,
 
it resolves to N parts, in layer 1, it resolves to N-1 parts,and so on. Thus, its time complicacy is N!. However,because all nodes in this tree have many relations to eachother, a node can be got from its father, it may also be gotfrom its brothers or grandfather. So, many nodes repeat theothers’ information. If we can do our best to delete theredundant nodes, the time complexity would be muchless than N!.
 B. Study process
To try to settle the NP problem, one has two ways: orthinks that the NP is unequal to the P, then gives the unitedproof theoretically or proves the time complexity’s lowbounds of some NP problem is higher than polynomialtime; or thinks the NP is equal to the P, then proves anyNPC has a polynomial time algorithm. The currentacademic circles incline to think that the NP is unequal tothe P(see[2]). One of their reasons is: the computationprocess should be different from the test process in timecost. However, the polynomial includes very wide scope,one power of N is a polynomial, 10,000 powers of N isalso a polynomial. Therefore there is reason to think suchpossibility: low polynomial time for “test”, highpolynomial time for “compute”. We strongly belive thatNP is equal to P. Why? What is our logic? First, by now,a lot of NPC have been discovered, and the number mayincrease continuely. If any one of them has polynomialtime algorithm, it means all the NP problems havepolynomial time algorithm. This fact itself stronglyimplies that: the complexity of NP problems is not veryuneven, but is uniform. They may have some uniformrules(of course each one has its specialty). These uniformrules are meaningful only in polynomial, especially whenconsidering that many NP problems in most cases can besolved quickly. Secondly, let’s take an example: Hamiltonpath. If an undirected graph has only N nodes and N-1lines, sure, we can quickly get the path. Along with theincrement of its lines, the complicacy increases. But theline number is limited, less than N times N in total. Andwith the number of lines increasing, the possibility to getmore paths also increases. If we can discover the intricaterelations between these two factors, we may get a pathwithin polynomial time.After determining the research direction, next step is tochoose an available NPC as the research object. A goodchoice can make our job much easier than other choices.By a lot of comparing, contrasting and analysing, wechoose the Hamilton path(cycle) as our study object.Reasons:(1) Hamilton path is a strong NPC(see [3]).Usually a strong NPC is harder than un-strong one, but asit is strong, we can try to get a polynomial time algorithmfor it in any way,the result is always valid;(2) we use“divide” and “conquer” method to do it. After dividing,themutual correlative imformations among all parts is easierto discover for Hamilton path than for other NPC, becauseHamilton path can “naturally” show the correlativeinformation by showing that whether two vertices areconnected. Thus we donot need to cost much time to getthis information. Especially, by comparing differentcombinations and their different results, a lot of correlativeinformation can be got easily.Our algorithm’s key technologies are: 1)It is based ona lot of generalizations, but its correctness and polynomialcomplexity have been proved.2)In its calculating process,it dynamically decides its calculating direction accordingto new produced messages. Dynamic adjustment is ouralgorithm’s big specialty. 3)Our algorithm has found amethod to transform “infinite” to “finite”. This is a verynew method which does not appear before. We deduce thismethod may be a common way to solve all NPC.
C. Algorithm
(1) Assume the graph has at least one Hamilton cycle.We first get a cycle which includes all n vertices in anyway. In this cycle, some two neighbor vertices may not beadjacent, we call this point “break point”. For each break point, we add an edge between the two neighbor verticesexcept for one, i.e. only one break point to beleft(remember the added edges, later, each time delete one,then do the algorithm from a NEW start). we call the onebreak point being left “main break point”. Now ouralgorithm only needs to handle this one break point. Eachtime handles one break point, at most n times(because thenumber of the added edges at most n). So it does not affectthe polynomial.(2) At each step, cut a segment from the main break point, insert the segment in some place of the cycle. Howto cut and insert? The rule is: make the number of newbreak points the least, and one new break point must bedifferent from all former main break points(this new oneas the new main break point ,we use a symmetric matrix torecord all main break points, this guarantees ouralgorithm’s polynomial). Notes: when calculating thenumber of new break points for getting the least, if morethan one case have the same least number, compare theirnext step(only one time “next step”, do not need tocontinue to do so);also, avoid inserting the same segmentin different places consecutively. Then with the new mainbreak point, do the same job until getting a HamiltonCycle. If one step does not get a new break point and thereare some break points at other place, get one of them asthe new main break point and continue.Example 1:dhijklabcmpefqr*u vertex r and u are not adjacent, asthe main break point.Other edges: d-q, h-c, i-l, j-u, a-p,m-f,e-r.Step 1: dhijklabcmperqf*u the pair f*u is different from
 
r*u,cut the segment rq, insert it between e f. Case1—one new break point.Step 2:dhijklabcmfqrep*uStep 3:dhijklaperqfmcb*uStep 4:dhi*bcmfqrepalkjuStep 5:dhilaperqfmcb*kjuStep 6:dhilabcmfqrep*kjuStep 7:dhi*perqfmcbalkjuStep 8:dhi*fqrepmcbalkjuStep 9:dhi*rqfepmcbalkjuStep 10:dhilabcmpefqr*kjuStep 11:dhilabcmperqf*kjuStep 12:dhilabc*fmperq*kju Case 2—two new break points, you cannot get less. Choice q*k as the new mainbreak point, another break point can be the same asformers.Step 13:dhilabc*fqrepm*kju m*k as the new mainbreak point, cannot choice c*f at current stepStep 14:dhi*mperqf*cbalkjuStep 15:dhi*qrepmf*cbalkjuStep 16:dqrepmf*cba*hilkju the main cycle has 3 partsStep 17:dqrepmf*abchilkju the main cycle has 2 partsStep 18:dqrefmpabchilkju Case 3—no new break point, only one part
 D. Proof::
Our main proof idea is: using limited number of graphs,each graph only has 12 vertices(also 11,10), to constituteunlimited number of all kinds of graphs. Then we onlyneed to prove all cases of graphs with 12 vertices(also11,10) to fit our algorithm(need to combine and to split) bycalculating all.
From the algorithm, we can see, at each step, nomatter how many vertices the graph has, only at most 6parts or 12 vertices are important. Assume the graph has atleast one Hamilton cycle. At each step of our algorithm,there always is a Hamilton cycle(we call it “mainHamilton cycle”) which has the following characters: themain Hamilton cycle has k parts at current step, for eachpart, the two end vertices are very important, the innervertices are not. We can delete all or some of the innervertices, then the rest still fit our algorithm. Also we candelete any whole part of the main Hamilton cycle. Afterdeleting a whole part, one edge should be added, in orderto keep the main Hamilton cycle. In this way, any biggraph can be constituted by many 12 vertex graphs at anystep of our algorithm.For example, in example 1,at step 11, we can deletevertices r and/or i,, the inner vertex. Also we can delete thewhole part “qre”, then add an edge between f and d. Andwhen “qre” be deleted, the vertices f and p be connectednaturally. Notes: A big graph can become many smallgraphs(with 12,11,or 10 vertices) by all available deleting,
 the other direction is also true
(the word “all” isimportant)!
In example 1, no matter for case 1,case 2, or case 3,when the graph’s number of vertices is bigger than somefigure, say 24, we always can delete some part or vertex,the case does not change. So each time, we at most need toconsider 24 vertices(by combining some 12 vertexgraphs).
At first, any Hamilton cycle can be as the mainHamilton cycle. The main Hamilton cycle keeps all theway down, no matter deleting, combining and separatingas described before, until the final(The final result may beanother cycle). At any step until the final, if we do the “cutand insert” in this way: to keep every part of the mainHamilton cycle as a whole, other rules are the same asdescribed before, we can do it, and the least number of new break points is at most 2. This character is veryimportant for our proof.From
,
, and
, we can see our proof only need tocalculate all cases of 12(include 11, 10) vertexgraphs(need to combine and separate). Thus all. Thecalculation is a very big job, but there are some ways todecrease it a lot.
EXPERIMENT DATAThough we have theoretically proved this algorithm.Here we give the experiment data.A program on this algorithm has been designed inVC++. Not losing generality, for an undirected graph withN nodes, node number is 0,1,2…N-1, the algorithmcalculates Hamilton path from node 0 to node N-1. Theinput data is randomly produced un-directed graphs. Inorder to test the program, each graph includes a randomlyproduced Hamilton path which the program does not know.We have tested the program over one hundred millioninputs, no one fails. The data is as Table 1 (computer:HPPC, CPU:Intel 1G, Memery:1G):
TABLE 1 EXPERIMENT DATAnumberof Nodescalculationtimes ondifferentinputssuccesstimesfailtimesaveragerunningtime100 100000000 100000000 0 0.0014second1000 10000000 10000000 0 0.07second10000 10000 10000 0 48seconds

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Srilatha Pradeep liked this
wolejnr liked this
textapexta liked this
dionvenus liked this
dionvenus liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->