Question

I have to do a project about shortest path algorithm. I am not really a professional I am just a normal student. I have to pick up first a problem ( train route, bus route, any travel route) then choose a suitable algorithm to solve it. Then I have to program it (using coding language java, python..) Then after that I should evaluate it(how speed is the algorithm, time complexity, etc) and if there is a better algorithm that I can be implement instead of what I chose first.

Choosing the problem is the hardest part as I Don't know what kind of problem I should explore to use of the algorithm! Regards

Was it helpful?

Solution

Let's take the city where you live in. Take any two bus stations, namely A and B, and the entire commuter network. This network is a graph. Stations are nodes, commuter connections between stations are edges (edge weight = time it takes the bus to travel between two stations).

Say, you want to travel from A to B in the shortest amount of time possible (you wont want to waste time, would you?).

Dijkstras Algorithm has as input the graph representing the commuter network and the node A and is able to deduce the shortest path from A to any other station (which includes the shortest path from A to B).

Does that help you? Wikipedia on Dijkstra has more detailed examples.

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top