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 13 of 31
Question 13 of 29
Step 13 of 31
Step 14 of 31
Step 15 of 31
Step 16 of 31
Step 17 of 31
Step 18 of 31
Step 19 of 31
Question 13 of 29
Question 13 of 29
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 -9 long, so through F it is -27 to G, no shorter than the -36 written there. Keep -36.
Question 13 of 29
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 -9 long, so through F it is -27 to G, no shorter than the -36 written there. Keep -36.
Question 14 of 29
Question 14 of 29
Right.
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 -9 long, so through G it is -45 to H, shorter than any way found before. Write -45 at H.
Question 14 of 29
Not this time.
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 -9 long, so through G it is -45 to H, shorter than any way found before. Write -45 at H.
Question 15 of 29
Question 15 of 29
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 15 of 29
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 15 of 29
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.
Question 16 of 29
Question 16 of 29
Not this time.
You guessed: Through A, the way to B is shorter than any found before, so write it.
What the run did:
The road from A to B is -9 long, so through A it is -9 to B, no shorter than the -9 written there. Keep -9.
Question 16 of 29
Right.
You guessed: Through A, the way to B is no shorter, so keep what is written.
What the run did:
The road from A to B is -9 long, so through A it is -9 to B, no shorter than the -9 written there. Keep -9.
Question 17 of 29
Question 17 of 29
Not this time.
You guessed: Through A, the way to E is shorter than any found before, so write it.
What the run did:
The road from A to E is -9 long, so through A it is -9 to E, no shorter than the -9 written there. Keep -9.
Question 17 of 29
Right.
You guessed: Through A, the way to E is no shorter, so keep what is written.
What the run did:
The road from A to E is -9 long, so through A it is -9 to E, no shorter than the -9 written there. Keep -9.
Question 18 of 29
Question 18 of 29
Not this time.
You guessed: Through A, the way to F is shorter than any found before, so write it.
What the run did:
The road from A to F is -9 long, so through A it is -9 to F, no shorter than the -18 written there. Keep -18.
Question 18 of 29
Right.
You guessed: Through A, the way to F is no shorter, so keep what is written.
What the run did:
The road from A to F is -9 long, so through A it is -9 to F, no shorter than the -18 written there. Keep -18.