Consider the weighted undirected graph with $4$ vertices, where the weight of edge $\{i, j\}$ is given by the entry $W_{i, j}$ in the matrix $W$.
$$W = \begin{bmatrix} 0&2&8&5\\ 2&0&5&8\\ 8&5&0&x\\ 5&8&x&0\\ \end{bmatrix} $$ The largest possible integer value of $x$, for which at least one shortest path between some pair of vertices will contain the edge with weight $x$ is ______?
My attempt:
Somewhere, answer is give $12$, and somewhere is $10$. According to me answer is $11$. Since, if we try to reach node_4 to node_3. There are three possible ways:
- Node_4 → Node_2 → Node_3 $=$ cost $= 8+5=13$
- Node_4 → Node_1 → Node_2 → Node_3 $=$ cost $= 5+2+5=12$
- Node_4 → Node_3 $=$ cost $= x =$ maximum value should be less than $12 = 11$
Can you explain in formal way, please?


We observe the graph corresponding to the transition matrix $W$ is undirected, i.e. $w_{i,j} = w_{j,i}$ with $1\leq i,j\leq 4$ and the graph is also complete, i.e. each node is reachable in one step from each other node.
We denote the nodes of the graph with $\mathcal{N}=\{1,2,3,4\}$ according to the indices of the matrix \begin{align*} W=\begin{bmatrix} 0&2&8&5\\ 2&0&5&8\\ 8&5&0&x\\ 5&8&x&0\\ \end{bmatrix}=(w_{i,j})_{1\leq i,j\leq 4} \end{align*}