Dijkstra's algorithm - Shortest Path Query

  • Context: Undergrad 
  • Thread starter Thread starter binbagsss
  • Start date Start date
  • Tags Tags
    Algorithm Path
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 1K views
binbagsss
Messages
1,291
Reaction score
12
Hi,

I am just wondering what you should do in the case that you have a choice between two nodes to include for the next step, i..e both are equal to the minimal value of the set under consideration

Do you need to follow through both cases and then see which way is the shortest, or is there a way of knowing beforehand?

Many thanks.
 
Physics news on Phys.org
Orodruin said:
You pick one of them as the current node. The other will be the current node in the next cycle.
ahh makes sense ! thank you :)