CS GATE 2009 - Online Test

Q1. Which one of the following array represents a binary max-heap?
Answer : Option C
Explaination / Solution:
No Explaination.


Q2. In the following process state transition diagram for a uniprocessor system, assume that there are always some processes in the ready state:

Now consider the following statements: 
I. If a process makes a transition D, it would result in another process making transition A immediately 
II. A process P2 in blocked state can take transition E while another process P1 is in running state 
III. The OS uses preemptive scheduling 
IV. The OS uses non-preemptive scheduling 
Which of the above statements are TRUE?
Answer : Option C
Explaination / Solution:
No Explaination.


Q3. A subsequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences X[m] and Y[n] of lengths m and n, respectively, with indexes of X and Y starting from 0.
We wish to find the length of the longest common subsequence (LCS) of X[m] and Y[n] as l(m, n), where an incomplete recursive definition for the function l(i, j) to compute the length of the LCS of X[m] and Y[n] is given below:
l(i, j) = 0, if either i = 0 or j = 0
= expr1, if i, j>0 and x[i - 1] = Y[j - 1]
= expr2, if i, j>0 and x[i - 1] ≠ Y[j - 1]
Which one of the following option is correct?
Answer : Option C
Explaination / Solution:
No Explaination.


Q4. The enter_CS( ) and leave_CS( ) functions to implement critical section of a process are realized using test-and-set instruction as follows:
void enter_CS ( X)
{
while (test-and-set (X))
}
void leave_CS (X)
{
X = 0;
}
In the above solution, X is a memory location associated with the CS and is initialized to 0. Now consider the following statements 
I. The above solution to CS problem is deadlock-free 
II. The solution is starvation free 
III. The processes enter CS in FIFO order 
IV. More than one process can enter CS at the same time 
Which of the above statements are TRUE?
Answer : Option A
Explaination / Solution:
No Explaination.


Q5. A subsequence of a given sequence is just the given sequence with some elements (possibly none or all) left out. We are given two sequences X[m] and Y[n] of lengths m and n, respectively, with indexes of X and Y starting from 0. The values of l(i, j) could be obtained by dynamic programming based on the correct recursive definition of l(i, j) of the form given above, using an array L[M, N], where M = m + 1 and N = n + 1, such that L[i, j] = l(i, j). Which of the following statements would be TRUE regarding the dynamic programming solution for the recursive definition of l(i, j)?
Answer : Option B
Explaination / Solution:
No Explaination.


Q6. Which one of the following is NOT necessarily a property of a Group?
Answer : Option A
Explaination / Solution:
No Explaination.


Q7. Consider the binary relation R = {(x, y), (x, z), (z, x), (z, y)} on the set {x, y, z}. Which one the following is TRUE?
Answer : Option D
Explaination / Solution:
No Explaination.


Q8. (1217)8 is equivalent to
Answer : Option B
Explaination / Solution:
No Explaination.


Q9. An unbalanced dice (with 6 faces, numbered from 1 to 6) is thrown. The probability that the face value is odd is 90% of the probability that the face value is even. The probability of getting any even numbered face is the same. If the probability that the face is even given that it is greater than 3 is 0.75, which one of the following options is closest to the probability that the face value exceeds 3?
Answer : Option B
Explaination / Solution:
No Explaination.


Q10. .For the composition table of a cyclic group shown below

Which one of the following choices is correct?
Answer : Option C
Explaination / Solution:
No Explaination.