Question 1
Consider the 5-state DFA M accepting the language πΏ(π) β (0 + 1)* shown below. For any string π€ β (0 + 1)* let π0(π€) be the number of 0 β² π in π€ and π1(π€) be the number of 1β²π in π€.

Which of the following statements is/are FALSE?
States 2 and 4 are distinguishable in M
States 3 and 4 are distinguishable in M
States 2 and 5 are distinguishable in M
Any string w with n0 (π€) = n1(w) is in πΏ(π)
Question 2
Consider the following read-write schedule S over three transactions T1,T2,T3 where the subscripts in the schedule indicate transaction IDs
S: r1(z), w1(z), r2(x), r3(y), w3(y), r2(y), w2(x), w2(y)
Which of the following transaction schedules is/are conflict equivalent to S?
T1T2T3
T1T3T2
T3T2T1
T3T1T2
Question 3
Let G be the directed graph and T a DFS spanning tree in G such that it is rooted at vertex v. Suppose T is also Breadth First Search (BFS) Tree in such as rooted at v .Which of the following options is/are TRUE for every such graph G and tree T?
There are no back-edges in G with respect to the tree T
There are no cross-edges in G with respect to T
There are no forward-edges in G with respect to the tree T
The only edges in G are the edges in T.
Question 4
The symbol β indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
(XβY and YβZ) implies XβZ
(X,Y)β(Z,W) implies Xβ(Z,W)
((X,Y)βZ and WβY) implies (X,W)βZ
(X,Y)β(Z,W) implies (X,Y)βZ
Question 5
Consider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of k is
52
1
53
27
Question 6
Consider the following recurrence relation:
T(n)={βn T(βn)+n} for n>=1
T(n)=1 for n=1
Which one of the following options is CORRECT ?
T(n) =ΞΈ(n log log n)
T(n) =ΞΈ(n2 log n)
T(n) =ΞΈ(n log n)
T(n) =ΞΈ(n2 log log n)
Question 7
An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?
82, 90, 101
82, 11, 93
131, 11, 93
131, 111, 90
Question 8
Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a = b = 1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption.
T1 T2
a = a + 1; b = 2 * b;
b = b + 1; a = 2 + a;
Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?
(a = 4, b = 4); (a = 3, b = 3); (a = 4, b = 3)
(a = 3, b = 4); (a = 4, b = 3); (a = 3, b = 3)
(a = 4, b = 4); (a = 4, b = 3); (a = 3, b = 4)
(a = 2, b = 2); (a = 2, b = 3); (a = 3, b = 4)
Question 9
Consider the following pseudo-code
L1: t1 = -1
L2: t2 = 0
L3: t3 = 0
L4: t4 = 4 * t3
L5: t5 = 4 * t2
L6: t6 = t5 * M
L7: t7 = t4 + t6
L8: t8 = a[t7]
L9: if t8 <= max goto L11
L10: t1 = t8
L11: t3 = t3 + 1
L12: if t3 < M goto L4
L13: t2 = t2 + 1
L14: if t2 < N goto L3
L15: max = t1
Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively?
6 and 6
6 and 7
7 and 6
7 and 7
Question 10
Consider the following grammar G, with π as the start symbol. The grammar G has three incomplete productions denoted by (1), (2), and (3).
π β πππ | (1)
π β ππ | ππ | (2)
π β (3) | π
The set of terminals is {π, π, π, π, π}. The FIRST and FOLLOW sets of the different non-terminals are as follows.
FIRST(π) = {π, π, π}, FIRST(π) = {π, π, π}, FIRST(π ) = {π, π}
FOLLOW(π) = FOLLOW(π) = {π, π, $}, FOLLOW(π ) = {π}
Which one of the following options CORRECTLY fills in the incomplete productions?
A.(1) π β π
π (2) π β π (3) π
β ππRB.(1) π β ππ
(2) π β π (3) π
β ππRC.(1) π β ππ
(2) π β ππ (3) π
β πRD.(1) π β π
π (2) π β ππ (3) π
β πRThere are 65 questions to complete.