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

  • SEARCH
  • Home
  • 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 8835271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:13:19+00:00 2026-06-14T09:13:19+00:00

I have read from multiple sources and from my understanding of the algorithm that

  • 0

I have read from multiple sources and from my understanding of the algorithm that it runs in 2^N time. My question is what causes TSP to achieve this run time? I can’t seem to find a pseudo-code so i can examine it.

  • 1 1 Answer
  • 0 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. Editorial Team
    Editorial Team
    2026-06-14T09:13:21+00:00Added an answer on June 14, 2026 at 9:13 am

    The algorithm you mean is likely the inclusion-exclusion:

    Find the shortest path though the following state space using A*:

    • the state is defined by the partition of the set of cities to the ‘visited’ set, ‘unvisited’ set and the ‘current’ node.
    • a valid transition is one that moves one node from ‘current’ to ‘visited’ and one from the ‘unvisited’ to the ‘current’ set. Its cost is equal the distance from the old ‘current’ to the new ‘current’.
    • the starting state is: no city is ‘visited’, an arbitrary city is ‘current’.
    • a finishing state is: no city is ‘unvisited’, any city is ‘current’.

    The time complexity of inclusion-exclusion is given by the number of states: there is exactly one ‘current’ city (factor of n) and all other cities are either visited or unvisited (factor of 2^n).

    The ‘A*’ algorithm will enter each state at most once. For each state, it will explore at most ‘n’ other nodes and push them into the priority queue. The priority queue will take at most ‘O(n)’ time to perform its operation.

    Thus, the running time is O(2^n * n * n * O(n)) = O(2^n * poly(n)). Further insight shows that O(2^n * poly(n)) is equal to O(2^n).

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

Sidebar

Related Questions

I have read from some article that say's Apple doesn't approve the application which
I have read from this article http://codahale.com/how-to-safely-store-a-password/ and it says using a salt isn't
I have read from the question How to gain access to a ServletContext instance
I have read this article from High Scalability about Stack Overflow and other large
I have a string read from another source such as \b\bfoo\bx. In this case,
I have multiple dynamic objects that (most of the time) differ in only a
I have been making a program that creates multiple CSV's from another source CSV
I would like to have an iterator that can be read by multiple threads
NOTE: I have read Routing From the Inside Out AND the Engine Yard blog
Problem: We have to read from a proprietary binary file at work. It changes

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.