# n1 edge n2 weight a - b 5 a - c 8 b - c 2 b - d 1 b - e 6 c - e 3 d - e 3 c - f 3 e - f 2 d - g 4 e - g 5 f - g 4