# Computer Science and Information Technology - GATE 2012 Paper Solution

Question No. 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?

Question No. 2

Which of the following is TRUE?

Question No. 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” ) ; }

Question No. 4

Assuming P ≠ NP, which of the following is TRUE?

Question No. 5

The worst case running time to search for an element in a balanced binary search tree with n2n elements is

Question No. 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

Question No. 7

The decimal value 0.5 in IEEE single precision floating point representation has

Question No. 8

A process executes the code

fork();
fork();
fork();

The total number of child processes created is

Question No. 9

Consider the function f(x) = sin(x) in the interval x $\in$$\left[\mathrm{\pi }/4,7\mathrm{\pi }/4\right]$. The number and location(s) of the local minima of this function are

Question No. 10

The protocol data unit (PDU) for the application layer in the Internet stack is

Question No. 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

Question No. 12

What is the complement of the language accepted by the NFA shown below? Assume $\Sigma$ = {a} and $\epsilon$ is the empty string.

Question No. 13

What is the correct translation of the following statement into mathematical logic?

“Some real numbers are rational”

Question No. 14

Given the basic ER and relational models, which of the following is INCORRECT?

Question No. 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

Question No. 16

The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is

Question No. 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

Question No. 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?