Is there a algorithm that will find as long as possible hamiltonian cycles in v^2 time. I am running a program that needs to find cycles on a sparse graph (4v edges at maximum), and according to my calculations, I need v^2 or better. I understand that to operate in v^2 it would have to be heuristical, and possibly not very accurate. Please tell me if this is impossible, as I have no clue whether this is possible.
Asked
Active
Viewed 145 times
1
-
1what is v? is it the number of the vertices? If so that algorithm hasn't been found yet. Have you checked this out? http://en.wikipedia.org/wiki/Hamiltonian_path_problem – Leonardo Aug 10 '12 at 11:35
-
Yes, I had a look at that. However, I have seen quite a few algorithms that do it in n^3 (heuristical). In other words, solving it with exactly the best thing is NP-complete, however, solving it with something which is slightly more inaccurate can be quite fast. – matts1 Aug 10 '12 at 12:56