Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MST Heuristic for TSP: Problem Generator and Efficient Algorithm #910

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

UditNayak
Copy link

Issue: #490

This pull request introduces a solution to the Traveling Salesperson Problem (TSP) using the Minimum Spanning Tree (MST) heuristic. The MST heuristic provides a lower bound estimate for the TSP tour cost, leveraging the MST of a set of cities to approximate the cost of completing a tour.

Key Changes:

  1. Heuristic Derivation:

    • Implemented the MST heuristic to estimate TSP tour costs by deriving it from a relaxed version of the TSP where only an MST is required instead of a complete tour.
    • Demonstrated that the MST heuristic is a better approximation compared to the straight-line distance heuristic by considering the network of paths.
  2. Problem Generator:

    • Developed a problem generator that creates TSP instances with cities represented by random points within a unit square.
    • This generator allows for testing and benchmarking TSP solutions against randomly generated data.
  3. Efficient MST Algorithm:

    • Incorporated Kruskal's algorithm to construct the MST efficiently.
    • Provided a method for using the MST in conjunction with graph search algorithms to solve TSP instances.

Highlights:

  • MST Heuristic: Provides a lower bound on the TSP tour cost and dominates simpler heuristics like straight-line distance.
  • Problem Generator: Facilitates the creation of diverse TSP instances for testing and validation.
  • Algorithm Efficiency: Utilizes an efficient MST construction algorithm to enhance TSP solutions.

Benefits:

  • Improved approximation of TSP solutions using the MST heuristic.
  • Enhanced ability to test TSP solutions with generated instances.
  • Efficient computation of MSTs, aiding in the practical application of the heuristic.

Checklist:

  • Implemented MST heuristic for TSP.
  • Developed problem generator for TSP instances.
  • Incorporated Kruskal's algorithm for MST construction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant