2023 2024 Student Forum > Management Forum > Main Forum

 
  #2  
24th July 2014, 01:13 PM
Super Moderator
 
Join Date: Apr 2013
Re: GATE (CS) fully solved papers

This is the GATE CS Computer Science Question Paper:

Q. 1 – Q. 25 carry one mark each.
Q.1 Consider the following logical inferences.
I1: If it rains then the cricket match will not be played.
The cricket match was played.
Inference: There was no rain.
I2: If it rains then the cricket match will not be played.
It did not rain.
Inference: The cricket match was played.
Which of the following is TRUE?
(A) Both I1 and I2 are correct inferences
(B) I1 is correct but I2 is not a correct inference
(C) I1 is not correct but I2 is a correct inference
(D) Both I1 and I2 are not correct inferences
Q.2 Which of the following is TRUE?
(A) Every relation in 3NF is also in BCNF
(B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every
key of R
(C) Every relation in BCNF is also in 3NF
(D) No relation can be in both BCNF and 3NF
Q.3 What will be the output of the following C program segment?
char inChar = ‘A’ ;
switch ( inChar ) {
case ‘A’ : printf (“Choice A\ n”) ;
case ‘B’ :
case ‘C’ : printf (“Choice B”) ;
case ‘D’ :
case ‘E’ :
default : printf ( “ No Choice” ) ; }
(A) No Choice
(B) Choice A
(C) Choice A
Choice B No Choice
(D) Program gives no output as it is erroneous
Q.4 Assuming P ≠ NP, which of the following is TRUE?
(A) NP-complete = NP (B) NP-complete ∩ P = 
(C) NP-hard = NP (D) P = NP-complete
Q.5 The worst case running time to search for an element in a balanced binary search tree with n2n
elements is
(A) Θ (n log n) (B) Θ (n2n) (C) Θ (n) (D) Θ (log n)

Q.6 The truth table
X Y f (X, Y)
0 0 0
0 1 0
1 0 1
1 1 1
represents the Boolean function
(A) X (B) X + Y (C) X Y (D) Y
Q.7 The decimal value 0.5 in IEEE single precision floating point representation has
(A) fraction bits of 000…000 and exponent value of 0
(B) fraction bits of 000…000 and exponent value of −1
(C) fraction bits of 100…000 and exponent value of 0
(D) no exact representation
Q.8 A process executes the code
fork();
fork();
fork();
The total number of child processes created is
(A) 3 (B) 4 (C) 7 (D) 8
Q.9 Consider the function f(x) = sin(x) in the interval x [π/4, 7π/4]. The number and location(s) of the
local minima of this function are
(A) One, at π/2
(B) One, at 3π/2
(C) Two, at π/2 and 3π/2
(D) Two, at π/4 and 3π/2
Q.10 The protocol data unit (PDU) for the application layer in the Internet stack is
(A) Segment (B) Datagram (C) Message (D) Frame
Q.11 Let A be the 2 × 2 matrix with elements a11 = a12 = a21 = +1 and a22 = −1. Then the eigenvalues of
the matrix A19 are
(A) 1024 and −1024 (B) 1024√2 and −1024√2
(C) 4√2 and −4√2 (D) 512√2 and −512√2
Q.12 What is the complement of the language accepted by the NFA shown below?
Assume = {a} and is the empty string.
(A) (B) {} (C) a*
(D) {a , }
a


Q.13 What is the correct translation of the following statement into mathematical logic?
“Some real numbers are rational”
(A) x (real(x) rational(x))
(B) x (real(x) rational(x))
(C) x (real(x) rational(x))
(D) x (rational(x) real(x))
Q.14 Given the basic ER and relational models, which of the following is INCORRECT?
(A) An attribute of an entity can have more than one value
(B) An attribute of an entity can be composite
(C) In a row of a relational table, an attribute can have more than one value
(D) In a row of a relational table, an attribute can have exactly one value or a NULL value
Q.15 Which of the following statements are TRUE about an SQL query?
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause
R : All attributes used in the GROUP BY clause must appear in the SELECT clause
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
(A) P and R (B) P and S (C) Q and R (D) Q and S
Q.16 The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with
n discs is
(A) T(n) = 2T(n − 2) + 2 (B) T(n) = 2T(n − 1) + n
(C) T(n) = 2T(n/2) + 1 (D) T(n) = 2T(n − 1) + 1
Q.17 Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph,
then the number of bounded faces in any embedding of G on the plane is equal to
(A) 3 (B) 4 (C) 5 (D) 6
Q.18 Let W(n) and A(n) denote respectively, the worst case and average case running time of an
algorithm executed on an input of size n. Which of the following is ALWAYS TRUE?
(A) A(n) = Ω (W(n)) (B) A(n) = Θ (W(n))
(C) A(n) = O (W(n)) (D) A(n) = o (W(n))
Q.19 The amount of ROM needed to implement a 4 bit multiplier is
(A) 64 bits (B) 128 bits (C) 1 Kbits (D) 2 Kbits
Q.20 Register renaming is done in pipelined processors
(A) as an alternative to register allocation at compile time
(B) for efficient access to function parameters and local variables
(C) to handle certain kinds of hazards
(D) as part of address translation
Q.21 Consider a random variable X that takes values +1 and −1 with probability 0.5 each. The values of
the cumulative distribution function F(x) at x = −1 and +1 are
(A) 0 and 0.5 (B) 0 and 1 (C) 0.5 and 1 (D) 0.25 and 0.75

Q.22 Which of the following transport layer protocols is used to support electronic mail?
(A) SMTP (B) IP (C) TCP (D) UDP
Q.23 In the IPv4 addressing format, the number of networks allowed under Class C addresses is
(A) 214 (B) 27 (C) 221 (D) 224
Q.24 Which of the following problems are decidable?
1) Does a given program ever produce an output?
2) If L is a context-free language, then, is L also context-free?
3) If L is a regular language, then, is L also regular?
4) If L is a recursive language, then, is L also recursive?
(A) 1, 2, 3, 4 (B) 1, 2 (C) 2, 3, 4 (D) 3, 4
Q.25 Given the language L = {ab, aa, baa}, which of the following strings are in L*?
1) abaabaaabaa
2) aaaabaaaa
3) baaaaabaaaab
4) baaaaabaa
(A) 1, 2 and 3 (B) 2, 3 and 4
(C) 1, 2 and 4 (D) 1, 3 and 4

Q. 26 to Q. 55 carry two marks each.
Q.26 Which of the following graphs is isomorphic to
(A)
(B)
(C)
(D)
Q.27 Consider the following transactions with data items P and Q initialized to zero:
T1 :read (P);
read (Q);
if P = 0 then Q := Q + 1 ;
write (Q).
T2 : read (Q);
read (P);
if Q = 0 then P := P + 1 ;
write (P).
Any non-serial interleaving of T1 and T2 for concurrent execution leads to
(A) a serializable schedule
(B) a schedule that is not conflict serializable
(C) a conflict serializable schedule
(D) a schedule for which a precedence graph cannot be drawn
Q.28 The bisection method is applied to compute a zero of the function f(x) = x4 – x3 – x2 – 4 in the
interval [1,9]. The method converges to a solution after ––––– iterations.
(A) 1 (B) 3 (C) 5 (D) 7
Q.29 Let G be a weighted graph with edge weights greater than one and Gbe the graph constructed by
squaring the weights of edges in G. Let T and Tbe the minimum spanning trees of G and G,
respectively, with total weights t and t. Which of the following statements is TRUE?
(A) T= T with total weight t= t2
(B) T= T with total weight t< t2
(C) T≠ T but total weight t= t2
(D) None of the above

Q.30 What is the minimal form of the Karnaugh map shown below? Assume that X denotes a don’t care
term.
ab
cd 00 01 11 10
00 1 X X 1
01 X 1
11
10 1 X
(A) bd (B) bd bc (C) bd abcd (D) bd bc cd 
Q.31 Consider the 3 processes, P1, P2 and P3 shown in the table.
Process Arrival
time
Time Units
Required
P1 0 5
P2 1 7
P3 3 4
The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling
with CPU quantum of 2 time units) are
(A) FCFS: P1, P2, P3 RR2: P1, P2, P3 (B) FCFS: P1, P3, P2 RR2: P1, P3, P2
(C) FCFS: P1, P2, P3 RR2: P1, P3, P2 (D) FCFS: P1, P3, P2 RR2: P1, P2, P3
Q.32 Fetch_And_Add(X,i) is an atomic Read-Modify-Write instruction that reads the value of
memory location X, increments it by the value i, and returns the old value of X. It is used in the
pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable
initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value
corresponds to the lock being not available.
AcquireLock(L){
while (Fetch_And_Add(L,1))
L = 1;
}
ReleaseLock(L){
L = 0;
}
This implementation
(A) fails as L can overflow
(B) fails as L can take on a non-zero value when the lock is actually available
(C) works correctly but may starve some processes
(D) works correctly without starvation
Q.33 Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a
second time. What is the probability that the sum total of values that turn up is at least 6?
(A) 10/21 (B) 5/12 (C) 2/3 (D) 1/6

Q.34 An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available
with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A,
and a quarter to Organization B, while retaining the remaining with itself. Which of the following is
a valid allocation of addresses to A and B?
(A) 245.248.136.0/21 and 245.248.128.0/22
(B) 245.248.128.0/21 and 245.248.128.0/22
(C) 245.248.132.0/22 and 245.248.132.0/21
(D) 245.248.136.0/24 and 245.248.132.0/21
Q.35 Suppose a circular queue of capacity (n −1) elements is implemented with an array of n elements.
Assume that the insertion and deletion operations are carried out using REAR and FRONT as array
index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full
and queue empty are
(A) full: (REAR+1) mod n == FRONT
empty: REAR == FRONT
(B) full: (REAR+1) mod n == FRONT
empty: (FRONT+1) mod n == REAR
(C) full: REAR == FRONT
empty: (REAR+1) mod n == FRONT
(D) full: (FRONT+1) mod n == REAR
empty: REAR == FRONT

Q.14 Given the basic ER and relational models, which of the following is INCORRECT?
(A) An attribute of an entity can have more than one value
(B) An attribute of an entity can be composite
(C) In a row of a relational table, an attribute can have more than one value
(D) In a row of a relational table, an attribute can have exactly one value or a NULL value

Q.15 Which of the following statements are TRUE about an SQL query?
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause
R : All attributes used in the GROUP BY clause must appear in the SELECT clause
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
(A) P and R (B) P and S (C) Q and R (D) Q and S

Rests of the questions are in the attachment, download it freely from here:
Attached Files
File Type: pdf GATE CS Computer Science Question Paper.pdf (551.0 KB, 44 views)


Quick Reply
Your Username: Click here to log in

Message:
Options




All times are GMT +5. The time now is 07:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
SEO by vBSEO 3.6.0 PL2

1 2 3 4