Also called Bellman-Ford algorithm and Single-source shortest paths with negative lengths.
fresh numbers
The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from bellman-ford shortest paths's own run on the numbers shown.
choose one
1question 1
On this line from A, how many roads does the run look along?
the answer, and why
the answer is A
Round 1 looks along all 3 roads and round 2 along all 3 again, finding nothing shorter.
if you chose another
BThat is round 1 alone. A round must make nothing shorter before the run stops.
CThat is the same line backwards.
DThat is , the ceiling on any map of 4 places and 3 roads.
On which map does the run look along the most roads? A>B 1 means a road from A to B, 1 long, and the letter after the semicolon is the start.
the answer, and why
the answer is A
Its loop B, C, G adds up to 3 below 0, so every round changes something. That is 3 rounds and the last pass, 4 roads each, so 16 looks. The others cost 6, 9 and 2.
if you chose another
BTwo rounds of 3 roads, so 6.
COne road, then 2, then 3, then the last pass's 3, so 9.