Current location - Training Enrollment Network - Mathematics courses - Weighting problem of shortest path in discrete mathematics
Weighting problem of shortest path in discrete mathematics
Starting with v0

It can be found that V 1 and V2 have two vertices connected.

Calculate the weight and choose the lighter side, v0v 1.

Then, starting from v 1, observe the points v3, v2 and v4 connected with v 1.

For the path connecting v 1 and v3, the path with the least weight is v 1 v2 4v 3 = 6, and the edge of v 1v3 is omitted.

For the path connecting v 1 and v4, the path with the least weight is v 1v2v4=2+ 1=3, and the edge of v 1v4 is omitted.

For the path connecting v 1 and v2, the weight of v 1v2=2 is the smallest.

V4V3v5 = 3+2 = 5 is the path connecting V4 and v5, omitting v4v5.