Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 92389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:10:45+00:00 2026-05-10T23:10:45+00:00

We are given an undirected graph G = (V, E) and two vertices s,

  • 0

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’

  1. Is there a simple path from s to t of length at most n/100?
  2. Is there a simple path from s to t of length at least n/100?
  3. Is there a simple path from s to t of length exactly n/100?
  4. 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.

  1. 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.
  2. 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.
  3. Similar to 2 above. No polynomial algorithm.
  4. 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.
  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:10:46+00:00Added an answer on May 10, 2026 at 11:10 pm

    You’re on the right track. I wrote another piece on NP-complete to which I’m going to refer you for some of the details, but recall that basically you need to do two things to prove something NP-complete:

    1. Show the problem is in NP
    2. Show a polynomial time reduction to a problem already known to be NP-complete.

    Doing 1 is pretty easy (if something walking the graph ‘knew’ all the right decision of the next edge to take, would it find an answer in polynomial time?); I’d think seriously about the ‘decision TSP’ problem I describe in the other note.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 97k
  • Answers 97k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes - SSL is enough - but SSL is only… May 11, 2026 at 7:20 pm
  • Editorial Team
    Editorial Team added an answer It's only preferable to store references as data members if… May 11, 2026 at 7:20 pm
  • Editorial Team
    Editorial Team added an answer Something like: zip(t[::2], t[1::2]) Full example: >>> s = ','.join(str(i)… May 11, 2026 at 7:20 pm

Related Questions

Whenever a question pops up on SO about Java synchronization, some people are very
We have a common problem of moving our development SQL 2005 database onto shared
We're looking at moving from a check-out/edit/check-in style of version control system to Subversion,
I have one field that I need to sum lets say named items However

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.