Skip to content
GATEiit

GATE DA 2024 Q51: Valid topological orderings of a DAG

Question

Consider the directed acyclic graph (DAG) below:

DAG with edges P to Q, R to Q, Q to S, Q to V, S to U and V to T
Tap the figure to enlarge

Which of the following is/are valid vertex orderings that can be obtained from a topological sort of the DAG?

Try it: multiple select: one or more correct options

Select one or more options
Select all correct options. No negative marking, no partial marks.
Show answer and explanation

Answer: B, D (official GATE 2024 final answer key)

Concept used: In a topological order every edge goes from an earlier vertex to a later one.

First step: Edges: P→Q, R→Q, Q→S, Q→V, S→U, V→T. Any ordering with Q before R, or T before V, is invalid.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2024 DA question paper and final answer key, organised by IISc Bangalore. Question paper · Answer key