Graph Theory

Answer & solution
Official answer: A
G2 connects vertices whose original distance is at most 2. A shortest G path of lengthd can be compressed into ceil(d/2) G2 edges. Conversely each G2 edge expands into at most 2 G edges, so no shorter G2 path than ceil(d/2) is possible. Thus d_G2(u, v)=ceil(d_G(u, v)/2), and diam(G2)=ceil(diam(G)/2), which in particular satisfies A’s ≤ bound. Self-loops from M² do not shorten distances.
Each positive entry of M² represents a two-edge walk, so a G2 edge can cover at most two original edges. A d-edge shortest path can be grouped into pairs, with one singleton if d is odd, giving an upper bound ⌈d/2⌉. Expanding any k-edge G2 path yields a G walk of at most 2k edges, proving k≥⌈d/2⌉. Taking the maximum over all vertex pairs establishes equality, which is stronger than the selected non-strict bound.