INTRODUCTION TO COMPILER DESIGN
OVERVIEW OF COMPILERS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
What is the value of the sum of the minimum in-degree and maximum out-degree of an Directed Acyclic Graph?
|
Depends on a Graph
|
|
Will always be zero
|
|
Will always be greater than zero
|
|
May be zero or greater than zero
|
Explanation:
Detailed explanation-1: -So sum of minimum in-degree and maximum out-degree of an Directed Acyclic Graph is 0.
Detailed explanation-2: -Topological sorting is not possible for a graph if it is not a DAG.
Detailed explanation-3: -Explanation: Directed Acyclic Graph (DAG) is a tool that depicts the structure of basic blocks, helps to see the flow of values flowing among the basic blocks, and offers optimization too.
Detailed explanation-4: -Every DAG has at least one node with no outgoing edges. For every DAG G, for any nodes u and t of G, there exists at most one path from u to v in G. Every directed graph that has a node with no incoming edges is a DAG. In any DAG G, if (u, v) is an edge of G, then DFS/v) will never discover v.
There is 1 question to complete.