![]() |
VOOZH | about |
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.