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} 5 10* add 9 4 x 7 x {0, 4, 1, 5} 5 10 9 add 8* 7 x {0, 4, 1, 5, 7} add 7 9 8 7 x {0, 4, 1, 5, 7, 2} add 9 8 7 10 {0, 4, 1, 5, 7, 2, 3} 8* 8 add 10 {0, 4, 1, 5, 7, 2, 3, 9} add 8 10 {0, 4, 1, 5, 7, 2, 3, 9, 6} add 10 {0, 4, 1, 5, 7, 2, 3, 9, 6, 8} add {0, 4, 1, 5, 7, 2, 3, 9, 6, 8, 10} -------------------------------------------------------------------------------------------- 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 1 6* add 5* 4 x 3* x 5 add 2* 5 4 x 3 x 6 add 5 4 x 3 3 8 1* 4 x add 3 11 add 4 x 3 12 4 x add 15 add 4 19 add 23 ----------------------------------------------------------------------------- However, Jarnik-Prim is not guaranteed to produce a MST for a directed graph.