CS GATE 2011 (Test 3)



Tag: cs gate 2011
Q.1
Choose the most appropriate word(s) from the options given below to complete the following sentence. I contemplated________Singapore for my vacation but decided against it.
A. To visit
B. having to visit
C. visiting
D. for a visit
Answer : Option C
Explaination / Solution:

Contemplate is a transitive verb and hence is followed by a gerund Hence the correct usage of contemplate is verb+ ing form.

Workspace
Report
Q.2
A layer-4 firewall (a device that can look at all protocol headers up to the transport layer) CANNOT
A. block entire HTTP traffic during 9:00PM and 5:00AM
B. block all ICMP traffic
C. stop incoming traffic from a specific IP address but allow outgoing traffic to the same IP address
D. block TCP traffic from a specific user on a multi-user system during 9:00PM and 5:00AM
Answer : Option A
Explaination / Solution:

Since it is a layer 4 firewall it cannot block application layer protocol like HTTP.

Workspace
Report
Topic: Databases Tag: CS GATE 2011
Q.3
Database table by name Loan_Records is given below.
Borrower          Bank_Manager                    Loan_ Amount
Ramesh              Sunderajan                           10000.00
Suresh                Ramgopal                             5000.00
Mahesh              Sunderajan                            7000.00
What is the output of the following SQL query?
SELECT count(*)
FROM(
(SELECT Borrower. Bank_Manager FROM Loan_Records) AS S
NATURAL JOIN
(SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T
); 
A. 3
B. 9
C. 5
D. 6
Answer : Option C
Explaination / Solution:


After executing the given query, the output would be


Workspace
Report
Q.4
A computer handles several interrupt sources of which the following are relevant for this question. Interrupt from CPU temperature sensor Interrupt from Mouse Interrupt from Keyboard Interrupt from Hard Disk
A. Interrupt from Hard Disk
B. Interrupt from Mouse
C. Interrupt from Keyboard
D. Interrupt from CPU temp sensor
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report
Q.5
An algorithm to find the length of the longest monotonically increasing sequence of numbers in an array A[0 : n - 1] is given below.
Let Li denote the length of the longest monotonically increasing sequence starting at index i in the array
Initialize Ln-1 =1
For all i such that 0 ≤ i ≤ n − 2
 
Finally the length of the longest monotonically increasing sequence is max (L0L1,....,Ln-1). Which of the following statements is TRUE?
A. The algorithm uses dynamic programming paradigm
B. The algorithm has a linear complexity and uses branch and bound paradigm
C. The algorithm has a non-linear polynomial complexity and uses branch and bound paradigm
D. The algorithm uses divide and conquer paradigm.
Answer : Option A
Explaination / Solution:
No Explaination.


Workspace
Report
Q.6
Consider the languages L1, L2 and L3 as given below

Which of the following statements is NOT TRUE? 
A. Push Down Automata (PDA) can be used to recognize L1 and L2
B. L1 is a regular language
C. All the three languages are context free
D. Turing machines can be used to recognize all the languages
Answer : Option C
Explaination / Solution:

L1: regular language L2: context free language L3: context sensitive language

Workspace
Report
Q.7
K4 and Q3 are graphs with the following structures

Which one of the following statements is TRUE in relation to these graphs?
A. K4 is planar while Q3 is not
B. Both K4 and Q3 are planar
C. Q3 is planar while K4 is not
D. Neither K4 not Q3 is planar
Answer : Option B
Explaination / Solution:


Both K4 and Q3 are planar

Workspace
Report
Q.8
We are given a set of n distinct elements and an unlabeled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?
A. 0
B. 1
C. n!
D.
Answer : Option D
Explaination / Solution:
No Explaination.


Workspace
Report
Q.9
Consider a network with five nodes, N1 to N5, as shown below

The net work uses a Distance Vector Routing protocol. Once the routes have stabilized, the distance vectors at different nodes are as following
N1 : (0, 1, 7, 8, 4) 
N2 : (1, 0, 6, 7, 3) 
N3 : (7, 6, 0, 2, 6) 
N4 : (8, 7, 2, 0, 4) 
N5 : (4, 3, 6, 4, 0)
Each distance vector is the distance of the best known path at that instance to nodes, N1 to N5, where the distance to itself is 0. Also, all links are symmetric and the cost is identical in both directions. In each round, all nodes exchange their distance vectors with their respective neighbors. Then all nodes update their distance vectors. In between two rounds, any change in cost of a link will cause the two incident nodes to change only that entry in their distance vectors
After the update in the previous question, the link N1-N2 goes down. N2 will reflect this change immediately in its distance vector as cost, ∞ . After the NEXT ROUND of update, what will be the cost to N1 in the distance vector of N3?
A. 3
B. 9
C. 10
D.
Answer : Option C
Explaination / Solution:

N3 has neighbors N2 and N4 N2 has made entry ∞ N4 has the distance of 8 to N1 N3 has the distance of 2 to N4 So 2 + 8 = 10

Workspace
Report
Q.10
An 8KB direct mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following. 1 Valid bit 1 Modified bit As many bits as the minimum needed to identify the memory block mapped in the cache. What is the total size of memory needed at the cache controller to store metadata (tags) for the cache?
A. 4864 bits
B. 6144bits
C. 6656bits
D. 5376bits
Answer : Option D
Explaination / Solution:


Required answer =256 × (19 + 2) = 5376 bits

Workspace
Report