I Is A→E→D→F a valid solution for Dijkstra's algorithm?

  • I
  • Thread starter Thread starter Erenjaeger
  • Start date Start date
  • Tags Tags
    Algorithm
Erenjaeger
Messages
141
Reaction score
6


In this video the solution is: A→B→D→F
but the paths A→B→D and A→E→D both have a distance of 9, so when you get to D you can either have [B,9] or [E,9] where the first entry is the predecessor and the second entry is the 'cost' on that path so far, or here the distance.
is the solution A→E→D→F also correct or is there some reason that he chose the path A→B→D→F?
 
Physics news on Phys.org
Erenjaeger said:


In this video the solution is: A→B→D→F
but the paths A→B→D and A→E→D both have a distance of 9, so when you get to D you can either have [B,9] or [E,9] where the first entry is the predecessor and the second entry is the 'cost' on that path so far, or here the distance.
is the solution A→E→D→F also correct or is there some reason that he chose the path A→B→D→F?


Hi Erenjaeger! :)

Yes, A→E→D→F is also correct.
The only reason to pick A→B→D is just because it was evaluated earlier, and A→E→D does not improve on it.
It seems that this decision was skipped in the explanation in the video.
 
  • Like
Likes Erenjaeger
Namaste & G'day Postulate: A strongly-knit team wins on average over a less knit one Fundamentals: - Two teams face off with 4 players each - A polo team consists of players that each have assigned to them a measure of their ability (called a "Handicap" - 10 is highest, -2 lowest) I attempted to measure close-knitness of a team in terms of standard deviation (SD) of handicaps of the players. Failure: It turns out that, more often than, a team with a higher SD wins. In my language, that...
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Back
Top