Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit point of each basic block? 
B1: {}, B2: {a}, B3: {a}, B4: {a}
B1: {i, j}, B2: {a}, B3: {a}, B4: {i}
B1: {a, i, j}, B2: {a, i, j}, B3: {a, i}, B4: {a}
B1: {a, i, j}, B2: {a, j}, B3: {a, j}, B4: {a, i, j}
To solve the given problem, we need to determine the set of live variables at the exit point of each basic block. A live variable is a variable that holds a value that may be needed in the future. We analyze each block as follows:
i using a. Thus, a and any variables needed in future blocks must be live.i and j live as they are used again in block B2.a. However, j remains live to be used in block B2.i in B3, hence not included.i and j. However, a must be live because it's used in B4 for calculating the new value of i.j is preserved as it's involved in the loop.i, j, and a are directly used or involved in subsequent operations.Thus, the correct set of live variables at the exit of each block matches the choice:
B1: {a, i, j}, B2: {a, j}, B3: {a, j}, B4: {a, i, j}