Questions: Directed Acyclic Graphs (DAGs)

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A software build system needs to compile modules where some depend on others. A developer tries to add a dependency so that module A requires B, B requires C, and C requires A. Why does this break the build system?

AThe system can't handle more than two levels of dependencies
BThe cycle creates an impossible ordering — A must be compiled before B, B before C, and C before A, which cannot all be satisfied simultaneously
CThe graph would have too many edges to traverse efficiently
DThe system only supports undirected dependency graphs
Question 2 Multiple Choice

Which property is guaranteed in every directed acyclic graph?

AEvery vertex has exactly one outgoing edge
BEvery vertex is reachable from every other vertex
CThere exists at least one vertex with no incoming edges (a source)
DThe graph has exactly one connected component
Question 3 True / False

A directed graph has a topological ordering if and only if it is a DAG.

TTrue
FFalse
Question 4 True / False

A DAG can contain directed cycles, as long as those cycles don't include most vertex in the graph.

TTrue
FFalse
Question 5 Short Answer

Why does every DAG have at least one source (a vertex with no incoming edges)? Explain using a proof by contradiction.

Think about your answer, then reveal below.