LinkedIn Insight GATE 2016 Question Paper with Answer Keys for Computer Science & Information Technology (CS) - Grad Plus

GATE 2016 Question Paper with Answer Keys for Computer Science & Information Technology (CS)

Q. 1 – Q. 5 carry one mark each.

Q.1 Out of the following four sentences, select the most suitable sentence with respect to grammar and usage.

(A) I will not leave the place until the minister does not meet me.

(B) I will not leave the place until the minister doesn’t meet me.

(C) I will not leave the place until the minister meet me.

(D) I will not leave the place until the minister meets me.

ANS:-(D) I will not leave the place until the minister meets me.

Q.2 A rewording of something written or spoken is a ______________.

(A) paraphrase

(B) paradox

(C) paradigm

(D) paraffin

ANS:-(A) paraphrase

Q.3 Archimedes said, “Give me a lever long enough and a fulcrum on which to place it, and I will move the world.” The sentence above is an example of a ___________ statement.

(A) paraphrase

(B) collateral

(C) literal

(D) figurine

ANS:-(A) paraphrase

Q.4 If ‘relftaga’ means carefree, ‘otaga’ means careful and ‘fertaga’ means careless, which of the following could mean ‘aftercare’?

(A) zentaga

(B) tagafer

(C) tagazen

(D) relffer

ANS:-(C) tagazen

Q.5 A cube is built using 64 cubic blocks of side one unit. After it is built, one cubic block is removed from every corner of the cube. The resulting surface area of the body (in square units) after the removal is __________.

(A) 56

(B) 64

(C) 72

(D) 96

ANS:-(D) 96

Q.6 A shaving set company sells 4 different types of razors, Elegance, Smooth, Soft and Executive. Elegance sells at Rs. 48, Smooth at Rs. 63, Soft at Rs. 78 and Executive at Rs. 173 per piece. The table below shows the numbers of each razor sold in each quarter of a year.

Quarter \ ProductEleganceSmoothSoftExecutive
Q12730020009176029999
Q22522219392184458942
Q328976224291954410234
Q421012182291659510109

Which product contributes the greatest fraction to the revenue of the company in that year?

(A) Elegance

(B) Executive

(C) Smooth

(D) Soft

ANS:-(B) Executive

Q.7  Indian currency notes show the denomination indicated in at least seventeen languages. If this is not an indication of the nation’s diversity, nothing else is. Which of the following can be logically inferred from the above sentences?

(A) India is a country of exactly seventeen languages.

(B) Linguistic pluralism is the only indicator of a nation’s diversity.

(C) Indian currency notes have sufficient space for all the Indian languages.

(D) Linguistic pluralism is strong evidence of India’s diversity.

ANS:-(D) Linguistic pluralism is strong evidence of India’s diversity.

Q.8 Consider the following statements relating to the level of poker play of four players P, Q, R and S.

I. P always beats Q

II. R always beats S

III. S loses to P only sometimes

IV. R always loses to Q

Which of the following can be logically inferred from the above statements?

(i) P is likely to beat all the three other players

(ii) S is the absolute worst player in the set

(A) (i) only

(B) (ii) only

(C) (i) and (ii)

(D) neither (i) nor (ii)

ANS:-(D) neither (i) nor (ii)

Q.9 If f(x) = 2x7+3x−5, which of the following is a factor of f(x)?

(A) (x3+8)

(B) (x-1)

(C) (2x-5)

(D) (x+1)

ANS:-(B) (x-1)

Q.10 In a process, the number of cycles to failure decreases exponentially with an increase in load. At a load of 80 units, it takes 100 cycles for failure. When the load is halved, it takes 10000 cycles for failure. The load for which the failure will happen in 5000 cycles is ________.

(A) 40.00

(B) 46.02

(C) 60.01

(D) 92.02

ANS:-(B) 46.02

Q.1-Q.25 carry one mark each.

Q.1 Let p ; q ; r ; s represent the following propositions.
p: x  ∈ {8 ; 9 ; 10 ; 11 ; 12 }
q: x is a composite number
r: x is a perfect square
s: x is a prime number
The integer x ≥ 2  which satisfies  ¬ ((p ⇒q)^(¬r ∨ ¬s)) is

ANS:-11.0 : 11.0

Q.2 Let an be the number of n-bit stringsthatdoNOTcontaintwoconsecutive1s.Which one of the following is the recurrence relation for an?
(A) an = an-1+2an-2
(B) an = an-1+an-2
(C) an = 2an-1+an-2
(D) an = 2an-1+2an-2

ANS:-(B) an = an-1+an-2

Q.3 $latex lim_{x\rightarrow4}\;\frac{\sin(x-4)}{x-4}$ =

ANS:-1.0 : 1.0

Q.4 A probability density function on the interval [a ,1 ] is given by 1/x2 and outside this interval the value of the function is zero. The value of a is  —————.

ANS:-0.5 : 0.5

Q.5 Two eigen values of a3×3 real matrix P are (2+$latex \sqrt{-1}$) and 3.The determinant of P is —————–.
ANS:-15.0 : 15.0

Q.6 Consider the Boolean operator # with the following properties :
x#0 = x, x#1 = $latex \overline x$ , x#x = 0 and x#$latex \overline x$ = 1. Then x#y is equivalent to
(A) x $latex \overline y$ + $latex \overline x$ y
(B) x $latex \overline y$ +$latex \overline x$ $latex \overline y$
(C) $latex \overline x$ y+xy
(D) xy+$latex \overline x$ $latex \overline y$

ANS:- (A) x $latex \overline y$ + $latex \overline x$ y

Q.7   The 16-bit 2’s complement representation of an integer is 1111 1111 1111 0101 ; its decimal representation is ——————.

ANS:- -11.0 : -11.0

Q.8  We want to design a synchronous counter that counts the sequence 0-1-0-2-0-3 and then repeats. The minimum number of J-K flip-flops required to implement this counter is

ANS:-3.0 : 4.0

Q.9 A processor can support a maximum memory of 4GB ,where the memory is word-address able (word consists of two bytes) . The size of the address bus of the processor is at least bits.

ANS:-31.0 : 31.0

Q.10 A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT (n refers to the number of items in the queue)?

(A) Both operations can be performed in O(1) time
(B) At most one operation can be performed in O(1) time but the worst case time for the other operation will be Ω(n)
(C) The worst case time complexity for both operations will be Ω(n)
(D) Worst case time complexity for both operations will be Ω(log n)

ANS:-(A) Both operations can be performed in O(1) time

Q.11 Consider the following directed graph:

The number of different topological orderings of the vertices of the graph is————– .

ANS:-6.0 : 6.0

Q.12 Consider the following C program.

void f (int, short);
void main()
{
int  i = 100;
short  s = 12;
short * p = &s;
__________ ;//call to f()
}
Which one of the following expressions, when placed in the blank above ,will NOT result in a type checking error?

(A) f(s ,*s)

(B) i = f (i ,s)

(C) f(i , *s)

(D) f(i ,*p)

ANS:-(D) f(i ,*p)

Q.13 The worst case running times of Insertion sort, Merge sort and Quick sort, respectively ,are:

(A) Θ(n log n), Θ(n log n), and Θ(n2)

(B) Θ(n2), Θ(n2), and Θ(n log n)

(C) Θ(n2), Θ(n log n), and Θ(n log n)

(D) Θ(n2), Θ(n log n), and Θ(n2)

ANS:-(D) Θ(n2), Θ(n log n), and Θ(n2)

Q.14 Let G be aweightedconnectedundirectedgraphwithdistinctpositiveedgeweights.Ifevery edge weight is increased by the same value, then which of the following statements is/are TRUE?

P: Minimum spanning tree of G does not change
Q: Shortest path between any pair of vertices does not change

(A) P only

(B) Q only

(C) Neither P nor Q

(D) Both P and Q

ANS:-(A) P only

Q.15 Consider the following C program.
#include< stdio .h >
void mystery (int*ptra,int*ptrb)

{
int *temp;
temp =ptrb;
ptrb =ptra;
ptra =temp;
}
int main()

{
int a=2016,b=0,c=4,d=42;
mystery(&a, &b);
if (a<c)
mystery(&c, &a);
mystery(&a, &d);
print f(“%d\n”, a);
}
The output of the program is————- .

ANS:-2016.0 : 2016.0

Q.16 Which of the following languages is generated by the given grammar?

S → aS  | bS ε

(A) {anbm |n, m ≥ 0}

(B) {w ∈ {a,b}* | w has equal number of a’s and b’s }

(C) {an |n  ≥0} U {b n |n ≥ 0}U{a n b n  | n ≥ 0}

(D) {a,b}*

ANS:-(D) {a,b}*

Q.17 Which of the following decision problems are undecidable?
I. Given NFAs N1 and N2, is L(N1)∩ L(N2) = F ?
II. Given a CFG G = (N , ∑ , P , S ) and a string x ∈ ∑*, does x ∈ L(G)?
III. Given CFGs  G1 and G2, is L(G1) = L(G2)?
IV. Given a TM M, is L(M) = F?

(A) I and IV only

(B) II and III only

(C) III and IV only

(D) II and IV only

ANS:-(C) III and IV only

Q.18 Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?
(A) (0+1)*0011(0+1)*+(0+1)*1100(0+1)*

(B) (0+1)*(00(0+1)*11+11(0+1)*00)(0+1)*

(C) (0+1)*00(0+1)*+(0+1)*11(0+1)*

(D) 00(0+1)*11+11(0+1)*00

ANS:-(B) (0+1)*(00(0+1)*11+11(0+1)*00)(0+1)*

Q.19 Consider the following code segment.
x = u – t;
y = x * v;
x = y + w;
y =t – z;
y =x * y;
The minimum number of total variables required to convert the above code segment to static single assignment form is .
ANS:-10.0 : 10.0

Q.20 Consider an arbitrary set of CPU-bound processes with unequal CPU burst lengths submitted at the same time to a computer system. Which one of the following process scheduling algorithms would minimize the average waiting time in the ready queue?

(A) Shortest remaining time first

(B) Round-robin with time quantum less than the shortest CPU burst

(C) Uniform random

(D) Highest priority first with priority proportional to CPU burst length

ANS:-(A) Shortest remaining time first

Q.21 Which of the following is NOT a super key in a relational schema with attributes V,W, X, Y, Z and primary key V Y?

(A) VXYZ

(B) VWXZ

(C) VWXY

(D) VWXYZ

ANS:-(B) VWXZ

Q.22 Which one of the following is NOT a part of the ACID properties of data base transactions?

(A) Atomicity

(B) Consistency

(C) Isolation

(D) Deadlock-freedom

ANS:-(D) Deadlock-freedom

Q.23 A data base of research articles in a journal uses the following schema.

(VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, YEAR, PRICE)

The primary key is(VOLUME, NUMBER, STARTPAGE, ENDPAGE) and the following functional dependencies exist in the schema.

(VOLUME, NUMBER, STARTPAGE, ENDPAGE) → TITLE
(VOLUME, NUMBER) → YEAR
(VOLUME, NUMBER, STARTPAGE, ENDPAGE) → PRICE

The data base is redesigned to use the following Schemas.
(VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, PRICE)
(VOLUME, NUMBER, YEAR)
Which is the weakest normal form that the new data base satisfies , but the old one does not?

(A) 1NF

(B) 2NF

(C) 3NF

(D) BCNF

ANS:-(B) 2NF

Q.24 Which one of the following protocols is NOT used to resolve one form of address to another one?

(A) DNS

(B) ARP

(C) DHCP

(D) RARP

ANS:-(C) DHCP

Q.25 Which of the following is/are example(s) of state ful application layer protocols?

(i) HTTP

(ii) FTP

(iii) TCP

(iv) POP3

(A) (i) and(ii)only

(B) (ii) and(iii)only

(C) (ii) and(iv)only

(D) (iv)only

ANS:-(C) (ii) and(iv)only

Q.26-Q.55 carry two marks each.

Q.26 The coefficient of x12 in (x3+x4+x5+x6+……… )3 is ——-.

ANS:-10.0 : 10.0

Q.27 Consider the recurrence relation  a1 = 8 , an = 6n2 + 2n + an-1 . Let a99 = K× 104  . The value of K is ————.

ANS:-197.9 : 198.1

Q.28 A function f : N+ → N+, defined on the set of positive integers N+, satisfies the following properties:

f (n) = f (n/2) if n is even
f (n) = f (n+5) if n is odd
Let R = {i |  ∃j : f ( j) = i} be these to f distinct values that f takes. The maximum possible size
of R is

ANS:-2.0 : 2.0

Q.29  Consider the following experiment.
Step 1. Flip a fair coin twice.
Step 2. If the out comes are(TAILS, HEADS) the n output Y and stop.
Step 3. If the out comes are either(HEADS, HEADS) or(HEADS, TAILS), the n output N and stop.
Step 4. If the outcomes are(TAILS, TAILS), then go to Step1.
The probability that the output of the experiment is Y is (upto two decimal places)

ANS:-0.33 : 0.34

Q.30 Consider the two cascaded 2-to-1 multiplexers as shown in the figure.

The minimal sum of products form of the output X is

(A) \overline P \overline Q +PQR

(B) P\overline Q+QR

(C) PQ+ \overline P Q\overline R

(D) \overline Q \overline R +PQR

ANS:-(D) \overline Q \overline R +PQR

Q.31 The size of the data count register of a DMA controller is 16 bits . The processor  needs to transfer a file of 29,154kilobytes from disk to main memory . The memory is byte addressable. The minimum number of times the DMA controller needs to get the control of the system bus from the process or to transfer the file from the disk to main memory is—————– .

ANS:-456.0 : 456.0

Q.32 The stagedelaysina4-stagepipelineare800,500,400and300picoseconds.Thefirst stage (with delay 800 pico seconds) is replaced with a functionally equivalent design involving two stages with respective delays 600 and 350 pico seconds. The through put increase of the pipeline is _________ percent.

ANS:-33.0 : 34.0

Q.33 Consider a carry look ahead adder for adding two n-bit integers ,built using gates of fan-in at most two. The time to perform addition using this adder is

(A) Θ(1)

(B) Θ(log(n))

(C) Θ(\sqrt n)

(D) Θ(n)

ANS:-(B) Θ(log(n))

Q.34 The following function computes the maximum value contained in an integer array p[] of size

n (n>=1).
int max (int*p,int n)
{
int a=0,b=n-1;
while (__________)
{
if (p[a]<=p[b]){a=a+1;}
else {b=b-1;}
}
return p[a];
}
The missing loop condition is

(A) a !=n

(B) b !=0

(C) b >(a+1)

(D) b !=a

ANS:-(D) b !=a

Q.35 What will be the output of the following C program?
void count(int n){
static int d=1;
print f(“%d “,n);
print f(“%d “,d);
d++;
if(n>1) count(n-1);
print f(“%d “,d);
}
void main(){
count(3);
}

(A) 3 12213444

(B) 3 12111222

(C) 3 122134

(D) 3 121112

ANS:-(A) 3 12213444
Q.36 What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
a=3;
void n(x){x=x*a;print(x);}
void m(y){a=1; a=y-a; n(a);print(a);}
void main() {m(a);}

(A) 6, 2

(B) 6, 6

(C) 4, 2

(D) 4, 4

ANS:-(D) 4, 4

Q.37 An operator delete(i) for a binary heap data structure is to be designed to delete the item in the i-th node. Assume that the heap is implemented in an array and i refers to the i-th index of the array. If the heap tree has depth d (number of edges on the path from the root to the farthest leaf),then what is the time complexity to re-fix the heap efficiently after the removal of the element?

(A) O(1)

(B) O(d) but not O(1)

(C) O(2d) but not O(d)

(D) O(2d) but not O(2d)

ANS:- (B) O(d) but not O(1)

Q.38 Consider the weighted undirected graph with 4 vertices , where the weight of edge {i , j} is given by the entry Wi j in the matrix     W.

\begin{bmatrix}0&2&8&5\\2&0&5&8\\8&5&0&x\\5&8&x&0\end{bmatrix}\;

The largest possible integer value of x, for which at least one shortest path between some pair of vertices will contain the edge with weight x is ——————.

ANS:-12.0 : 12.0

Q.39 Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being  1, 2, 3, 4, 5, and 6. The maximum possible weight that a minimum weight Spanning tree of G can haveis————— .

ANS:-7.0 : 7.0

Q.40 G = (V;E) is an undirected simple graph in which each edge has a distinct weight, and e is a particular edge of G. Which of the following statements about the minimum spanning trees (MSTs) of G is/are TRUE?
I. If e is the lightest edge of some cycle in G, then every MST of G includes e
II. If e is the heaviest edge of some cycle in G, then every MST of G excludes e

(A) I only

(B)II only

(C) both I and II

(D) neither I nor II

ANS:-(B)II only

Q.41 Let Q denote a queue containing sixteen numbers and S be an empty stack. Head(Q) returns the element at the head of the queue Q without removing it from Q. Similarly Top(S) returns the element at the top of S without removing it from S. Consider the algorithm given below.

The maximum possible number of iterations of the while loop in the algorithm is

ANS:-256.0 : 256.0

Q.42 Consider the following context-free grammars:
G1: S →a S |B, B → b | bB
G2: S→ a A |bB, A→ a A|B|ε ; B→bB|ε
Which one of the following pairs of languages is generated by G1 and G2, respectively?

(A) {a m b n | m > 0 or n > 0} and {a m bn|m > 0 and n > 0}

(B) {ambn|m > 0 and n > 0} and {ambn|m > 0 or n ≥ 0}

(C) {ambn|m  ≥ 0 or n > 0} and {ambn|m > 0 and n > 0}

(D) {ambn|m ≥ 0 and n > 0} and {ambn|m > 0 or n > 0}

ANS:-(D) {ambn|m ≥ 0 and n > 0} and {ambn|m > 0 or n > 0}

Q.43 Consider the transition diagram of a PDA given below with input alphabet ∑= {a ,b}   and stack alphabet τ = {X ,Z}. Z is the initial stack symbol .Let L denote the language accepted by the PDA.

Which oneofthefollowingis TRUE?

(A) L = {anbn|n ≥ 0} and is not accepted by any finite automata

(B) L = {anjn  ≥ 0} U{anbn | n ≥ 0} and is not accepted by any deterministic PDA

(C) L is not accepted by any Turing machine that halts on every input

(D) L = {an|n≥ 0}U {anbn|n ≥ 0g}and is deterministic context-free

ANS:-(D) L = {an|n≥ 0}U {anbn|n ≥ 0g}and is deterministic context-free

Q.44  Let X be a recursive language and Y be a recursively enumerable but not recursive language. Let W and Z be two languages such that Y reduces to W, and Z reduces to X (reduction means the standard many-one reduction). Which one of the following statements is TRUE?

(A) W can be recursively enumerable and Z is recursive.

(B) W can be recursive and Z is recursively enumerable.

(C) W is not recursively enumerable and Z is recursive.

(D) W is not recursively enumerable and Z is not recursive.

ANS:-(C) W is not recursively enumerable and Z is recursive.

Q.45 The attributes of three arithmetic operators in some programming language are given below.

OperatorPrecedenceAssociativityArity
+HighLeftBinary
MediumRightBinary
*LowLeftBinary

The value of the expression 2-5+1-7 * 3 in this language is .

ANS:-9.0 : 9.0

Q.46 Consider the following Syntax Directed Translation Scheme(SDTS),with non-terminals {S, A} and terminals{a, b}.
S→ aA {print1}
S→ a { print2}
A → Sb { print3}
Using the above SDTS, the output printed by a bottom-up parser, for the input aab is:

(A) 1 32

(B) 2 23

(C) 2 31

(D) syntax error

ANS:-(C) 2 31

Q.47 Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes. If the computer system has a one-level page table per process and each page table entry requires 48bits, then the size of the per-process page table is megabytes.

ANS:-384.0 : 384.0

Q.48Consider a disk queue with requests for I/O to blocks on cylinders 47 , 38, 121, 191, 87, 11, 92, 10. The CLOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) in curred while servicing these requests is————– .

ANS:-346.0 : 346.0

Q.49 Consider a computer system with ten physical page frames. The system is provided with an access sequence (a1,a2,…………,a20,a1,a2………………………..a20), where each ai is a distinct virtual page number. The difference in the number of page faults between the last-in-first-out page replacement policy and the optimal page replacement policy is———- .

ANS:-1.0 : 1.0

Q.50 Consider thefollowingproposedsolutionforthecriticalsectionproblem.Thereare nprocesses: P0 : ::Pn-1 .In the code ,function pmax returns an integer not smaller than any of its arguments. For all  i, t[i] is initialized to zero.
Code for Pi:
do {
c[i]=1; t[i]=pmax(t[0],: ::,t[n-1])+1; c[i]=0;
for every j 6= i in{0,: ::,n-1} {
while (c[j]);
while (t[j]!=0&&t[j]<=t[i]);
}
Critical Section;
t[i]=0;
Remainder Section;
} while(true);
Which one of the following is TRUE about the above solution?

(A) At most one process can be in the critical section at anytime

(B) The bounded wait condition is satisfied

(C) The progress condition is satisfied

(D) It cannot cause a deadlock

ANS:-(A) At most one process can be in the critical section at anytime

Q.51 Consider the following two phase locking protocol. Suppose a transaction T accesses (for read or write operations), a certain set of objects {O1, ……………………………….,Ok}. This is done in the following manner:

Step 1. T acquires exclusive locks to O1, …, Ok in increasing order of their addresses.

Step 2. The required operations are performed.

Step 3. All locks are released.

This protocol will

(A) guarantee serializability and deadlock-freedom

(B) guarantee neither serializability nor deadlock-freedom

(C) guarantee serializability but not deadlock-freedom

(D) guarantee deadlock-freedom but not serializability

ANS:-(A) guarantee serializability and deadlock-freedom

Q.52 Consider that B wants to send a message m that is digitally signed to A. Let the pair of private and public keys for A and B be denoted by Kx and K+x for x = A, B, respectively .Let Kx(m) represent the operation of encrypting m with a key Kx and H(m) represent the message digest. Which one of the following indicates the CORRECT way of sending the message m along with the digital signature to A?

A) {m , K+B (H(m))}

B) {m , KB (H(m))}

C) {m , KA (H(m))}

D) {m , K+A (H(m))}

ANS:-B) {m , KB (H(m))}

Q.53 An IP data gram of size 1000 bytes arrives at a router .The router has to forward this packet ona link whose MTU(maximum transmission unit) is 100bytes. Assume that the size of the IP header is 20 bytes. The number of fragments that the IP data gram will be divided into for transmission is ——————–.

ANS:-13.0 : 13.0
.
Q.54 For a host machine that uses the to ken bucket algorithm for congestion control, the to ken bucket has a capacity of 1 mega byte and the maximum out put rate is 20 mega bytes per second. To kens arrive at a rate to sustain output at a rate of 10 mega bytes per second .The token bucket is currently full and the machine needs to send 12 mega bytes of data. The minimum time required to transmit the data is seconds.

ANS:-1.1 : 1.1

Q.55 A sender uses the Stop-and-Wait ARQ  protocol for reliable transmission of frames. Frames are of size 1000 bytes and the transmission rate at the sender is 80 Kbps(1Kbps=1000 bits/second). Size of anacknowledgement is 100 bytes and the transmission rate at the receiver is 8Kbps.The one-way propagation delay is 100 milli seconds. Assuming no frame is lost ,the sender through put is bytes/second.

ANS:-2500.0 : 2500.0

Scroll to Top
error: Alert: Content selection is disabled!!