Consider the control flow graph given below. Which one of the following options is the set of live variables at the exit point of each basic block?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2026 Set 2 · Q45
Time

Select one answerSingle correct
Solution
Official answer: A) B1:{a, b, c, e, f}, B2:{d, e}, B3:{b, c, e, f}, B4:Ø
Data Flow AnalysesTo perform liveness analysis, we use the backward data-flow equations:
### Step 1: Identify and sets for each block
Block B1 ():
Block B2 ():
Block B3 ():
Block B4 ():
### Step 2: Compute and sets iteratively
Block B4:
Block B2:
Iteration 1 for B3 and B1:
Initializing :
For B1:
Iteration 2:
For B3:
For B1:
Iteration 3 (Convergence):
Values do not change, so the analysis has converged.
### Final sets (live variables at exit point):
B1:
B2:
B3:
B4:
Thus, (A) is the correct option [CS-2 Key].
Try the question first, then check your work.
Examiner trap
Liveness analysis is a backward data-flow analysis where and . Note that B3 has a back-edge to B1.
This Data Flow Analyses previous year question is Q45 of the GATE CSE 2026 Set 2 paper. Find more GATE CSE PYQs on Data Flow Analyses in Compiler Design, 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 Data Flow Analyses 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.
Data Flow Analyses has 8 GATE CSE PYQs across 8 papers from 2014 to 2026. 5 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2026 Set 2.
How GATE tests Data Flow AnalysesIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.