GATE Computer ScienceVery hardGATE CS

For the flow graph with entry 1 and edges 1→2, 2→3, 3→4, 4→5, 5→3, 4→6, 6→7, 7→2, 7→8, 8→9, 9→8, 9→10, 6→10, 3→9, which is the dominance frontier of node 4?

  1. A. {3, 8, 10}
  2. B. {2, 3, 8, 10}
  3. C. {2, 3, 10}
  4. D. {2, 3, 8, 9, 10}

Correct answer: B. {2, 3, 8, 10}

Node 4 dominates 4, 5, 6 and 7. The frontier is the set of nodes with a predecessor dominated by 4 that 4 does not strictly dominate: 3 (from 5), 2 (from 7), 8 (from 7) and 10 (from 6). Node 9 is not included: its predecessors 8 and 3 are not dominated by 4.

More Compiler Design questions

Exams that ask this topic