Question 1: 0 1 2 3 4 5 6 7 8 9 10 Current solution set -------------------------------------------------------------------------------------------- add 5* x x 1* x x 4* x x x {0} 4* x x add 4* x 4 x x x {0, 4} add 6* x 4 x 4 x x x {0, 4, 1} 6 10* add 9 4 x 7 x {0, 4, 1, 5} 6 10 9 add 8* 7 x {0, 4, 1, 5, 7} add 8* 9 8 7 x {0, 4, 1, 5, 7, 2} 8 8* 8 add 11 {0, 4, 1, 5, 7, 2, 9} add 8 8 11 {0, 4, 1, 5, 7, 2, 9, 3} add 8 11 {0, 4, 1, 5, 7, 2, 9, 3, 6} add 11 {0, 4, 1, 5, 7, 2, 9, 3, 6, 8} add {0, 4, 1, 5, 7, 2, 9, 3, 6, 8, 11} -------------------------------------------------------------------------------------------- Note: * indicates a distance value that was updated in the current step Question 2: 0 1 2 3 4 5 6 7 8 9 10 Current total weight ----------------------------------------------------------------------------- add 5 x x 1 x x 4 x x x 0 3* x x add 3 x 4 x x x 1 add 2* x 1* x 4 x x x 4 2 6* add 5* 4 x 3* x 5 add 2* 5 4 x 3 x 7 add 5 4 x 3 3 9 1* 4 x add 3 12 add 4 x 3 13 4 x add 16 add 4 20 add 24 ----------------------------------------------------------------------------- However, Jarnik-Prim is not guaranteed to produce a MST for a directed graph.