guess the next step: Bellman-Ford shortest paths
Before each step plays, guess what it does. The page then shows the step as the run takes it and says why, the same sentence the watch page says there.
Step 7 of 36
Question 7 of 34
Step 7 of 36
Step 8 of 36
Step 9 of 36
Step 10 of 36
Step 11 of 36
Step 12 of 36
Step 13 of 36
Question 7 of 34
Question 7 of 34
Right.
You guessed: Through D, the way to H is shorter than any found before, so write it.
What the run did:
The road from D to H is -3 long, so through D it is 10 to H, shorter than any way found before. Write 10 at H.
Question 7 of 34
Not this time.
You guessed: Through D, the way to H is no shorter, so keep what is written.
What the run did:
The road from D to H is -3 long, so through D it is 10 to H, shorter than any way found before. Write 10 at H.
Question 8 of 34
Question 8 of 34
Right.
You guessed: Through E, the way to F is shorter than any found before, so write it.
What the run did:
The road from E to F is 3 long, so through E it is 5 to F, shorter than any way found before. Write 5 at F.
Question 8 of 34
Not this time.
You guessed: Through E, the way to F is no shorter, so keep what is written.
What the run did:
The road from E to F is 3 long, so through E it is 5 to F, shorter than any way found before. Write 5 at F.
Question 9 of 34
Question 9 of 34
Right.
You guessed: Through F, the way to B is shorter than any found before, so write it.
What the run did:
The road from F to B is -4 long, so through F it is 1 to B, shorter than any way found before. Write 1 at B.
Question 9 of 34
Not this time.
You guessed: Through F, the way to B is no shorter, so keep what is written.
What the run did:
The road from F to B is -4 long, so through F it is 1 to B, shorter than any way found before. Write 1 at B.
Question 10 of 34
Question 10 of 34
Not this time.
You guessed: Through F, the way to G is shorter than any found before, so write it.
What the run did:
The road from F to G is 7 long, so through F it is 12 to G, no shorter than the 9 written there. Keep 9.
Question 10 of 34
Right.
You guessed: Through F, the way to G is no shorter, so keep what is written.
What the run did:
The road from F to G is 7 long, so through F it is 12 to G, no shorter than the 9 written there. Keep 9.
Question 11 of 34
Question 11 of 34
Not this time.
You guessed: Through G, the way to H is shorter than any found before, so write it.
What the run did:
The road from G to H is 1 long, so through G it is 10 to H, no shorter than the 10 written there. Keep 10.
Question 11 of 34
Right.
You guessed: Through G, the way to H is no shorter, so keep what is written.
What the run did:
The road from G to H is 1 long, so through G it is 10 to H, no shorter than the 10 written there. Keep 10.
Question 12 of 34
Question 12 of 34
Right.
You guessed: Look along every road in a round.
What the run did:
Round 2: look along every road from a place with a distance, in letter order.
Question 12 of 34
Not this time.
You guessed: This round made nothing shorter, so every distance is final.
What the run did:
Round 2: look along every road from a place with a distance, in letter order.
Question 12 of 34
Not this time.
You guessed: That was the last round needed, so look along every road once more.
What the run did:
Round 2: look along every road from a place with a distance, in letter order.