Skip to content

Using Christofides Algorithm to find the shortest path to see all N point in us

Notifications You must be signed in to change notification settings

domenikali/USgrandTour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

US Grand Tour

Using the Christofides algorithm, this project finds the shortest path between selected points in the US. All distances will be in kilometers (KM), calculated based on the shortest driving distance by car.


Method

For the API, I chose the OSMR API based on OpenStreetMap. Using the requests library in Python, we can send queries and retrieve the shortest driving distance between two points.

Using this API, we can populate a matrix with the distances between cities, creating a complete graph.

With the SciPy library, we can find the minimum spanning tree for the graph.

Additionally, using Folium and the API, we can create an HTML website that includes an interactive map.

TODOs

  • Research APIs to retrieve distances for all points
  • Use the API to create a weighted connected graph
  • Find the minimum spanning tree
  • Complete the graph
  • Solve using the Christofides algorithm

About

Using Christofides Algorithm to find the shortest path to see all N point in us

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages