W=
The largest possible integer value of , for which at least one shortest path between some pair of vertices will contain the edge with weight is ___________.
View worked solution
Answer: 12
Let the vertices of the graph be and . The edge with weight is between vertices and , represented as .
For the edge to be part of at least one shortest path between some pair of vertices, the direct edge must be a shortest path between and . This requires that the weight must be less than or equal to the length of the shortest alternative path between and that does not use the edge :
Let's find all alternative paths between and and their respective weights:
- Path : weight
- Path : weight
- Path : weight
The shortest alternative path has a weight of . Therefore, we must have .
Thus, the largest possible integer value of is 12.
Free practice · Your answers on this page are not saved.
