Martin Hristev
Martin Hristev

Reputation: 67

Finding all the unique paths in a graph and return the cheapest

I have a school project where i need to find all the different paths in a graph. It's like driving a car between different cities (nodes) and I need to go though all of them and find the cheapest path. I don't have a destination point, the goal is just to find the fastest way to go though all the cities. Starting point is 0. I am not sure how to start and which algorithm to use. I just started learning about graphs and trees, so any help would be appreciated :)

For example from city 0 to city 1 it's 20 minutes.

enter image description here

Upvotes: 1

Views: 171

Answers (1)

Jason Smith
Jason Smith

Reputation: 469

Good that you are trying to learn! I recommend you read up on the Travelling Salesman problem.

Upvotes: 2

Related Questions