CS GATE 2010 - Online Test

Q1. A relational schema for a train reservation database is given below 
Passenger (pid, pname, age) 
Reservation (pid, cass, tid)

What pids are returned by the following SQL query for the above instance of the tables? 
SELECT pid 
FROM Reservation 
WHERE class ' AC ' AND 
              EXISTS (SELECT * FROM Passenger WHERE age>  65 AND Passenger.pid = Reservation.pid)
Answer : Option D
Explaination / Solution:
No Explaination.


Q2. Suppose the predicate F(x, y, t) is used to represent the statement that person x can fool person y at time t. which one of the statements below expresses best the meaning of the formula ∀x ∃y ∃t (¬F (x, y, t))?
Answer : Option D
Explaination / Solution:
No Explaination.


Q3. The following functional dependencies hold for relations R(A, B, C) and S(B, D, E) B → A, A → C The relation R contains 200tuples and the relation S contains 100tuples. What is the maximum number of tuples possible in the natural join R  S?
Answer : Option A
Explaination / Solution:
No Explaination.


Q4. Choose the most appropriate word from the options given below to the complete the following sentence: His rather casual remarks on politics ___________ his lack of seriousness about the subject.
Answer : Option A
Explaination / Solution:
No Explaination.


Q5. A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below 
Which one of the following choices gives a possible order in which the key values could have been inserted in the table?
Answer : Option C
Explaination / Solution:
No Explaination.


Q6. Choose the most appropriate word from the options given below to complete the following sentence: If we manage to ____________ our natural resources, we would leave a better planet for our children.
Answer : Option D
Explaination / Solution:
No Explaination.


Q7. A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below 

How many different insertion sequences of the key values using the same hash function and linear probing will result in the hash table shown above?
Answer : Option B
Explaination / Solution:
No Explaination.


Q8. Let L1 be a recursive language. Let L2 and L3 be languages that are recursively enumerable but not recursive. Which of the following statements is not necessarily true?
Answer : Option B
Explaination / Solution:
No Explaination.


Q9. The grammar S → aSa|bS|c is
Answer : Option B
Explaination / Solution:
No Explaination.


Q10. Let L = {w ∈ (0 + 1)* | w has even number of 1s}, i.e. L is the set of all bit strings with even number of 1s. Which one of the regular expressions below represents L?
Answer : Option A
Explaination / Solution:
No Explaination.