GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 9(a)

Minimum lattice spanning-tree weight

Algorithms · Graph Algorithms · Full GATE CSE 1997 paper

GATE 1997, Q9(a) 2 marks · Descriptive
Report issue

Graph Algorithms

Question 9(a), GATE 1997: The vertices are the n² integer lattice points (x,y), 1≤x,y≤n, n≥2. Distinct vertices are adjacent when BOTH |x1−x2|≤1 and |y1−y2|≤1; an edge has Euclidean length sqrt((x1−x2)²+(y1−y2)²). This is the GateForum p11 adjacency, including the second-coordinate bound omitted in GFG. Find the minimum spanning-tree weight.
Question 9(a), GATE 1997: The vertices are the n² integer lattice points (x,y), 1≤x,y≤n, n≥2. Distinct vertices are adjacent when BOTH |x1−x2|≤1 and |y1−y2|≤1; an edge has Euclidean length sqrt((x1−x2)²+(y1−y2)²). This is the GateForum p11 adjacency, including the second-coordinate bound omitted in GFG. Find the minimum spanning-tree weight.
Question 9(a), GATE 1997: The vertices are the n² integer lattice points (x,y), 1≤x,y≤n, n≥2. Distinct vertices are adjacent when BOTH |x1−x2|≤1 and |y1−y2|≤1; an edge has Euclidean length sqrt((x1−x2)²+(y1−y2)²). This is the GateForum p11 adjacency, including the second-coordinate bound omitted in GFG. Find the minimum spanning-tree weight.
Tap to enlarge
Answer & solution

Answer: n²−1. (no official key was published)

There are n² vertices, so every spanning tree has exactly n²−1 edges. Distinct integer lattice points are at distance at least 1; hence every spanning tree has weight at least n²−1.

This bound is achievable without using any diagonals. In each row, connect its n vertices consecutively with n−1 horizontal unit edges. This uses n(n−1) edges and leaves n connected row paths. Connect consecutive rows by vertical unit edges along the first column, using n−1 more edges. The result is connected and has n(n−1)+(n−1)=n²−1 edges; equivalently, joining the disjoint row trees by a path cannot create a cycle. Its weight is exactly n²−1, matching the lower bound.

For n=2 this construction has three unit edges and weight 3. Using a diagonal would replace a unit edge by one of length √2 and cannot improve the minimum.

For this minimum, however, the same answer remains valid under that literal variant. All distinct vertices are still at least unit distance apart, and the unit-edge construction is still allowed. Thus this particular answer is robust even though the printed graph definitions differ.

Original paper, page 6