1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Showing NP-completeness of longest path problem

  1. Nov 20, 2013 #1
    1. The problem statement, all variables and given/known data
    Show that the following problem is NP-complete:
    Given: A directed graph ##G=(V,E)##, source and target nodes ##s,t\in V## and a parameter K.
    Goal: Determine whether there exists a simple ##s,t##-path in ##G## of length at least ##K##.

    3. The attempt at a solution
    I've already shown that the problem is in NP, but I can't come up with a poly time reduction from a known NP-complete problem. Any ideas welcome.
     
  2. jcsd
  3. Nov 20, 2013 #2

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Google "longest path problem"; several on-line articles have all you need.
     
  4. Nov 20, 2013 #3

    Office_Shredder

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    TaPaKaH, what are some NP-complete problems you are allowed to reduce to? Ones that are graph related already (ones that are related to doing walks around a graph in particular) would be particularly nice as starting points.
     
  5. Nov 21, 2013 #4
    2-partition, 3-partition, TSP (undirected), ILP, SAT, 3-SAT, clique, vertex cover, independent set, Hamiltonian path (undirected) and cycle (directed and undirected) is what I am allowed to use.
     
  6. Nov 21, 2013 #5
    I just managed to come up with a reduction from directed Hamiltonial cycle.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Showing NP-completeness of longest path problem
  1. NP-Complete question (Replies: 1)

  2. Showing path connected (Replies: 1)

Loading...