New answers tagged

0 votes
Accepted

Algorithm for constructing a numbering reflecting the order of activities

This is called topological sorting. There are many algorithms for topological sorting. The one you list isn't the first I would recommend studying, to learn about this topic. There's no fundamental ...
D.W.'s user avatar
  • 156k
0 votes

Graph Algorithms (SSSP vs MST)

A graph with a unique MST $T$ can definitely have a SPT that differs from $T$. In fact, there are graphs where both the MST and the SPT (from a given source) are unique (so it doesn't matter which ...
Steven's user avatar
  • 28.2k
0 votes

Can Dijkstra's algorithm be used this way?

I could be misunderstanding you, but the answer is no. Dijkstra's requires you to specify the start node and the end node, and returns the shortest path between them.(It can actually tell you the ...
NaturalLogZ's user avatar
2 votes

How to modify Dijkstra's algorithm to model the path of an electric car?

Wanting to travel to every town transforms this problem into a Traveling salesman problem, and Dijkstra cannot be of any (known) help for that. There is an easy reduction from TSP to your problem: ...
Nathaniel's user avatar
  • 12.5k

Top 50 recent answers are included