7

I'm looking for an approximation algorithm for the following problem - I have an unweighted, undirected graph, with cycles, and want to find the longest path starting from a given node. I do value speed over performance (so a O(n^5) algorithm would probably be an overkill).

This is not homework (I swear!) or work related, but I will appreciate any tip you might have.

r0u1i
  • 3,526
  • 6
  • 28
  • 36

1 Answers1

7

I'm looking for an approximation algorithm for the following problem ...

Scientists are looking for it as well. They have also proved that polynomial constant-factor approximation doesn't exist if P ≠ NP. And the abstract of this article claims that it contains an approximation algorithm for your problem.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
P Shved
  • 96,026
  • 17
  • 121
  • 165
  • Wow, I didn't know that. I thought the generalized problem has a constant factor approximation algorithm. What about restricting the problem even further, by having a maximum number of neighbors which is constant? – r0u1i Feb 08 '10 at 11:09
  • 1
    @r0u1i, Whoops, the first article I linked also contains a proof that such restriction doesn't help :-). – P Shved Feb 08 '10 at 12:09
  • 2
    Note though that NP-completeness result does not necessarily tell anything about the graph instances you work with. For example, SAT is NP-complete but huge SAT instances are solved routinely in industrial applications. Also, are your graphs planar? Can you restrict your (apparent) condition that you can visit a node only once? Does the process by which your graph is constructed give a hint to the nature of the longest paths? – Antti Huima Feb 09 '10 at 01:01
  • It is planar, what can I do with that? – r0u1i Feb 17 '10 at 09:46