Let P be the partial order defined on the set {1,2,3,4} as follows P = {(x,x) x ∈ {1,2,3,4}} ∪ {(1,2), (3,2), (3,4)} The number of total orders on {1,2,3,4} that contain P is …
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2024 Set 2 · Q34
Time
Your answerNumerical answer
Solution
Official answer: 5
Discrete MathematicsA total order containing a partial order is also known as a linear extension of .
The given partial order imposes the following strict precedence relations between distinct elements:
We need to find the number of permutations of the set that satisfy these three constraints.
The minimal elements of the poset (elements with no predecessors) are and .
Case 1: appears first.
The permutation begins with : .
The remaining elements to arrange are .
Since and , must precede both and .
Thus, must be in the second position: .
The remaining elements have no relative precedence between them, giving valid permutations:
Case 2: appears first.
The permutation begins with : .
The remaining elements to arrange are .
The only remaining constraint is , while can be placed in any position relative to and .
The number of ways to arrange such that is:
The valid permutations are:
Adding both cases together:
Thus, the number of total orders on that contain is 5.
Try the question first, then check your work.
Examiner trap
Count the number of topological sorts (linear extensions) of the poset by considering the possible minimal elements ( and ) as the first element in the sequence.
This Discrete Mathematics previous year question is Q34 of the GATE CSE 2024 Set 2 paper. Find more GATE CSE PYQs on Discrete Mathematics in Engineering Mathematics, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Discrete Mathematics PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Discrete Mathematics has 50 GATE CSE PYQs across 23 papers from 2011 to 2026. 10 of them are 1-mark NAT questions like this one, and GATE CSE 2024 Set 2 has 3.
How GATE tests Discrete MathematicsIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.