Skip to content
GATEiit

GATE CSE 2018 Q57: Choosing x to maximize number of minimum spanning trees

Syllabus topic: Graph traversals, minimum spanning trees and shortest paths

Question

Consider the following undirected graph G:

Undirected weighted graph with five vertices arranged like a pentagon: top, left, right, bottom-left and bottom-right. Edges: top to left weight 4; left to bottom-left weight 4; top to bottom-left weight 1; top to bottom-right weight 3; bottom-left to bottom-right weight 4; top to right weight x; right to bottom-right weight 5.
Tap the figure to enlarge

Choose a value for x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of x is ______.

Try it: numerical answer: type the value

Numerical answer. No negative marking.
Show answer and explanation

Answer: 4 (official GATE 2018 final answer key)

Concept used: Ties in edge weights create multiple MSTs; the number of MSTs is the product of the independent tie choices Kruskal's algorithm can make.

Concept notes

Loading notes…

First step: Run Kruskal: take the edges of weight 1 and 3 first, then see how many ways the weight-4 edges can attach the left vertex, and choose x so the right vertex also has a tie.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on Graph traversals, minimum spanning trees and shortest paths

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2018 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key