Question

Consider the following undirected graph with edge weights as shown:

A 3 by 3 grid graph with 9 vertices and labeled edge weights of 0.1 and 0.9.

The number of minimum-weight spanning trees of the graph is __________

Official answer and solution
Official answer
3
From
Official GATE 2021 answer key

Solution

Use Kruskal's algorithm on the grid graph to count how many valid combinations of edges form a minimum spanning tree.

The graph contains 9 vertices arranged in a 3×33 \times 3 grid with 12 edges in total. The edge weights are either 0.1 or 0.9.

According to Kruskal's algorithm, we must first include all cycle-free edges of minimum weight 0.1. There are 6 edges of weight 0.1, and together they do not form any cycles. These 6 edges reduce the 9 vertices into 3 connected components.

To connect the 3 components into a single spanning tree of 8 edges, exactly 2 additional edges must be selected from the remaining edges of weight 0.9 without creating a cycle. Examining the cut between the components reveals exactly 3 distinct pairs of weight 0.9 edges that successfully connect the 3 components into a tree.

Hence, the total number of minimum-weight spanning trees is 3.

Final answer

3

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2021 Computer Science and Information Technology (CS, Set-1)
Question
27 of 65, printed as CS Q.17
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.