We are given an undirected graph G = (V, E) and two vertices s, t ∈ V . We consider simple paths between s and t. A path is simple if every vertex is visited at most once.
Are the following in P or NP-complete?
Does an efficient algorithm polynomial time exist for the following?
"n" represents the number of vertices in the graph "V"
- Is there a simple path from s to t of length at most n/100?
- Is there a simple path from s to t of length at least n/100?
- Is there a simple path from s to t of length exactly n/100?
- Are there two edge-disjoint paths from s to t? (Two paths are said to be edge- disjoint if they do not share an edge.)
My thoughts (please correct me if I'm wrong) Your input is appreciated.
- I think I can run Dijkstra's Algorithm to find the shortest path between S and T in polynomial time. So question 1 is in P.
- I think it is necessary to enumerate all the simple paths from s to t. I don't know what the running time of this would be, but I think it would be worse than polynomial.
- Similar to 2 above. No polynomial algorithm.
- I'm not sure. I don't know of any efficient (poly-time algorithm) to find multiple paths between two nodes but that doesn't mean that they don't exist.