Cs
Cs
Cs
R +P
S
The minimal sum-of-products form of F is
(A) P +R + S (B) P + +R +S (C) P
+R
+S
(D) P
R +P
S +P
Q.8 The base (or radix) of the number system such that the following equation holds is____________.
S12
2u
= 1S.1
Q.9 A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of
which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in
addition to two register operands. Assuming that the immediate operand is an unsigned integer, the
maximum value of the immediate operand is ____________.
Q.10 Consider the following program in C language:
#include <stdio.h>
main()
{
int i;
int *pi = &i;
scanf(%d,pi);
printf(%d\n, i+5);
}
Which one of the following statements is TRUE?
(A) Compilation fails.
(B) Execution results in a run-time error.
(C) On execution, the value printed is 5 more than the address of variable i.
(D) On execution, the value printed is 5 more than the integer value entered.
C
S
0
1
(
G
A
T
E
2
0
1
4
)
G
GATE 2014
Q.11 Let 0
of De
(A)
Q.12 Cons
requi
value
Q.13 Cons
Whic
(A)
(B)
(C)
(D)
Q.14 Let P
pivot
[4 1
(A) t
(C) t
Q.15 Whic
(A) T
(B) T
(C) T
(D) T
0 be a graph w
epth First Sea
(n)
sider a rooted
ired to determ
e of o + 1ub
sider the direc
ch one of the
The graph d
Both PQRS
Both PSRQ
PSRQ is the
P be a quickso
t. Let t
1
and
5 3 2] resp
t
1
= 5
t
1
> t
2
ch one of the
The language
The language
The language
The language
with n vertice
arch on 0, wh
(B) (n
d n node binar
mine the num
is ________
cted graph giv
following is T
does not have
and SRQP ar
and SPRQ ar
e only topolog
ort program t
t
2
be the num
ectively. Whi
following is T
I = {o
n
b
n
I = {o
n
| n
I = {w | w
I = { ww | w
SE
es and m edg
hen 0 is repre
n + m)
ry tree repres
mber of subtre
___.
ven below.
TRUE?
any topologi
re topological
re topological
gical ordering
o sort numbe
mber of comp
ich one of the
TRUE?
| n u] is re
is primc] is
os Sk + 1 b
w e
wit
ET-1
ges. What is th
esented as an
(C) (n
2
sented using p
ees having ex
cal ordering.
l orderings.
l orderings.
g.
rs in ascendin
parisons made
e following ho
(B) t
1
<
(D) t
1
=
egular.
s regular.
b
i
s or somc
= {u,1]] is
he tightest upp
adjacency ma
2
)
pointers. The
xactly 4 node
ng order using
e by P for the
olds?
t
2
t
2
c k H wit
s regular.
COMPUT
per bound on
atrix?
(D) (m
2
)
e best upper b
es is 0(n
u
log
g the first elem
inputs [1 2
= {o, b]]
TER CS
n the running
)
bound on the
g
b
n). Then
ment as the
3 4 5] and
is regular.
time
time
n the
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 4/14
Q.16 Consider the finite automaton in the following figure.
What is the set of reachable states for the input string 0011?
(A) {q
0
, q
1
, q
2
]
(B) {q
0
, q
1
]
(C) {q
0
, q
1
, q
2,
q
3
]
(D) {q
3
]
Q.17 Which one of the following is FALSE?
(A) A basic block is a sequence of instructions where control enters the sequence at the beginning
and exits at the end.
(B) Available expression analysis can be used for common subexpression elimination.
(C) Live variable analysis can be used for dead code elimination.
(D) x = 4 S x = 2u is an example of common subexpression elimination.
Q.18 Match the following:
1) Waterfall model a) Specifications can be developed
incrementally
2) Evolutionary model
b) Requirements compromises are inevitable
3) Component-based software engineering
c) Explicit recognition of risk
4) Spiral development d) Inflexible partitioning of the project into
stages
(A) 1-a, 2-b, 3-c, 4-d (B) 1-d, 2-a, 3-b, 4-c
(C) 1-d, 2-b, 3-a, 4-c (D) 1-c, 2-a, 3-b, 4-d
q
0
q
1
q
2
q
3
1 0,1 0,1
0,1 1
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 5/14
Q.19 Suppose a disk has 201 cylinders, numbered from 0 to 200. At some time the disk arm is at cylinder
100, and there is a queue of disk access requests for cylinders 30, 85, 90, 100, 105, 110, 135 and
145. If Shortest-Seek Time First (SSTF) is being used for scheduling the disk access, the request for
cylinder 90 is serviced after servicing ____________ number of requests.
Q.20 Which one of the following is FALSE?
(A) User level threads are not scheduled by the kernel.
(B) When a user level thread is blocked, all other threads of its process are blocked.
(C) Context switching between user level threads is faster than context switching between kernel
level threads.
(D) Kernel level threads cannot share the code segment.
Q.21 Consider the relation scheme R = (E, F, 0, E, I, [, K, I, H, N) and the set of functional dependencies
{{E, F] {0], {F} {I, [], {E, E] {K, I], {K] {H], {I] {N]] on R. What is the key for
R ?
(A) {E, F] (B) {E, F, E] (C) {E, F, E, K, I] (D) {E]
Q.22 Given the following statements:
S1: A foreign key declaration can always be replaced by an equivalent check
assertion in SQL.
S2: Given the table R(a,b,c) where a and b together form the primary key,
the following is a valid table definition.
CREATE TABLE S (
a INTEGER,
d INTEGER,
e INTEGER,
PRIMARY KEY (d),
FOREIGN KEY (a) references R)
Which one of the following statements is CORRECT?
(A) S1 is TRUE and S2 is FALSE.
(B) Both S1 and S2 are TRUE.
(C) S1 is FALSE and S2 is TRUE.
(D) Both S1 and S2 are FALSE.
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 6/14
Q.23 Consider the following three statements about link state and distance vector routing protocols, for a
large network with 500 network nodes and 4000 links.
[S1] The computational overhead in link state protocols is higher than in distance vector protocols.
[S2] A distance vector protocol (with split horizon) avoids persistent routing loops, but not a link
state protocol.
[S3] After a topology change, a link state protocol will converge faster than a distance vector
protocol.
Which one of the following is correct about S1, S2, and S3 ?
(A) S1, S2, and S3 are all true. (B) S1, S2, and S3 are all false.
(C) S1 and S2 are true, but S3 is false. (D) S1 and S3 are true, but S2 is false.
Q.24 Which of the following are used to generate a message digest by the network security protocols?
(P) RSA (Q) SHA-1 (R) DES (S) MD5
(A) P and R only (B) Q and R only
(C) Q and S only (D) R and S only
Q.25 Identify the correct order in which the following actions take place in an interaction between a web
browser and a web server.
1. The web browser requests a webpage using HTTP.
2. The web browser establishes a TCP connection with the web server.
3. The web server sends the requested webpage using HTTP.
4. The web browser resolves the domain name using DNS.
(A) 4,2,1,3 (B) 1,2,3,4 (C) 4,1,2,3 (D) 2,4,1,3
Q. 26 Q. 55 carry two marks each.
Q.26 Consider a token ring network with a length of 2 km having 10 stations including a monitoring
station. The propagation speed of the signal is 2 1u
8
m/s and the token transmission time is
ignored. If each station is allowed to hold the token for 2 sec, the minimum time for which the
monitoring station should wait (in sec)before assuming that the token is lost is _______.
Q.27 Let the size of congestion window of a TCP connection be 32 KB when a timeout occurs. The round
trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken
(in msec) by the TCP connection to get back to 32 KB congestion window is _________.
Q.28 Consider a selective repeat sliding window protocol that uses a frame size of 1 KB to send data on a
1.5 Mbps link with a one-way latency of 50 msec. To achieve a link utilization of 60%, the
minimum number of bits required to represent the sequence number field is ________.
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 7/14
Q.29 Consider the following four schedules due to three transactions (indicated by the subscript) using
read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is
conflict serializable?
(A) r
1
(x); r
2
(x); w
1
(x); r
3
(x); w
2
(x)
(B) r
2
(x);r
1
(x);w
2
(x);r
3
(x);w
1
(x)
(C) r
3
(x);r
2
(x);r
1
(x);w
2
(x);w
1
(x)
(D) r
2
(x);w
2
(x);r
3
(x);r
1
(x);w
1
(x)
Q.30 Given the following two statements:
S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF
and BCNF.
S2: ABC, DE, EC is a minimal cover for the set of functional
dependencies ABC, DE, ABE, EC.
Which one of the following is CORRECT?
(A) S1 is TRUE and S2 is FALSE.
(B) Both S1 and S2 are TRUE.
(C) S1 is FALSE and S2 is TRUE.
(D) Both S1 and S2 are FALSE.
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 8/14
Q.31 An operating system uses the Bankers algorithm for deadlock avoidance when managing the
allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given
below presents the current system state. Here, the Allocation matrix shows the current number of
resources of each type allocated to each process and the Max matrix shows the maximum number
of resources of each type required by each process during its execution.
Allocation Max
X Y Z X Y Z
P0 0 0 1 8 4 3
P1 3 2 0 6 2 0
P2 2 1 1 3 3 3
There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is
currently in a safe state. Consider the following independent requests for additional resources in the
current state:
REQ1: P0 requests 0 units of X, 0 units of Y and 2 units of Z
REQ2: P1 requests 2 units of X, 0 units of Y and 0 units of Z
Which one of the following is TRUE?
(A) Only REQ1 can be permitted.
(B) Only REQ2 can be permitted.
(C) Both REQ1 and REQ2 can be permitted.
(D) Neither REQ1 nor REQ2 can be permitted.
Q.32 Consider the following set of processes that need to be scheduled on a single CPU. All the times are
given in milliseconds.
Process Name Arrival Time Execution Time
A 0 6
B 3 2
C 5 4
D 7 6
E 10 3
Using the shortest remaining time first scheduling algorithm, the average process turnaround time
(in msec) is ____________________.
Q.33 Assume that there are 3 page frames which are initially empty. If the page reference string is 1, 2, 3,
4, 2, 1, 5, 3, 2, 4, 6, the number of page faults using the optimal replacement policy is__________.
Q.34 A canonical set of items is given below
S I . > R
R .
On input symbol < the set has
(A) a shift-reduce conflict and a reduce-reduce conflict.
(B) a shift-reduce conflict but not a reduce-reduce conflict.
(C) a reduce-reduce conflict but not a shift-reduce conflict.
(D) neither a shift-reduce nor a reduce-reduce conflict.
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 9/14
Q.35 Let I be a language and I
are recursive.
Q.36 Which of the regular expressions given below represent the following DFA?
I) 0*1(1+00*1)*
II) 0*1*1+11*0*1
III) (0+1)*1
(A) I and II only (B) I and III only
(C) II and III only (D) I, II, and III
Q.37 There are 5 bags labeled 1 to 5. All the coins in a given bag have the same weight. Some bags
have coins of weight 10 gm, others have coins of weight 11 gm. I pick 1, 2, 4, 8, 16 coins
respectively from bags 1 to 5. Their total weight comes out to 323 gm. Then the product of the
labels of the bags having 11 gm coins is ___.
0 1
0
1
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 10/14
Q.38 Suppose a polynomial time algorithm is discovered that correctly computes the largest clique in a
given graph. In this scenario, which one of the following represents the correct Venn diagram of the
complexity classes P, NP and NP Complete (NPC)?
(A)
(B)
(C)
(D)
Q.39 The minimum number of comparisons required to find the minimum and the maximum of 100
numbers is _________________.
Q.40 Consider a hash table with 9 slots. The hash function is (k) = k moJ 9. The collisions are
resolved by chaining. The following 9 keys are inserted in the order: 5, 28, 19, 15, 20, 33, 12, 17,
10. The maximum, minimum, and average chain lengths in the hash table, respectively, are
(A) 3, 0, and 1
(B) 3, 3, and 3
(C) 4, 0, and 1
(D) 3, 0, and 2
NPC
P
NP
P NP
NPC
P=NP=NPC
NPC
P=NP
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 11/14
Q.41 Consider the following C function in which size is the number of elements in the array E:
int MyX(int *E, unsigned int size)
{
int Y = 0;
int Z;
int i, j, k;
for(i = 0; i < size; i++)
Y = Y + E[i];
for(i = 0; i < size; i++)
for(j = i; j < size; j++)
{
Z = 0;
for(k = i; k <= j; k++)
Z = Z + E[k];
if (Z > Y)
Y = Z;
}
return Y;
}
The value returned by the function MyX is the
(A) maximum possible sum of elements in any sub-array of array E.
(B) maximum element in any sub-array of array E.
(C) sum of the maximum elements in all possible sub-arrays of array E.
(D) the sum of all the elements in the array E.
Q.42 Consider the following pseudo code. What is the total number of multiplications to be performed?
D = 2
for i = 1 to n do
for j = i to n do
for k = j + 1 to n do
D = D * 3
(A) Half of the product of the 3 consecutive integers.
(B) One-third of the product of the 3 consecutive integers.
(C) One-sixth of the product of the 3 consecutive integers.
(D) None of the above.
Q.43 Consider a 6-stage instruction pipeline, where all stages are perfectly balanced.Assume that there is
no cycle-time overhead of pipelining. When an application is executing on this 6-stage pipeline, the
speedup achieved with respect to non-pipelined execution if 25% of the instructions incur 2
pipeline stall cycles is ______________________.
C
S
0
1
(
G
A
T
E
2
0
1
4
)
G
GATE 2014
Q.44 An a
The n
is bo
assoc
(A) n
Q.45 Cons
The m
(A)
(B) P
(C)
(D)
Q.46 The f
value
Q.47 A fun
(1)
(A)
(B) F
(C) T
(D)
Q.48
Four
The v
access sequen
number of un
ounded above
ciativity A k
n/N
sider the 4-to-
minimal sum
P
+ R
+ P
P
+ P
+
P
R + P
PR
function (x)
e of t is ____
nction (x) i
= 1. Which
There exists a
For every y in
The maximum
There exists a
r fair six-sided
value of X is
nce of cache b
nique block ad
e by k. What
k exercising l
(B) 1/N
-1 multiplexe
-of-products
P
R
+ PR
+ P
R
+ R
+ P
R
) = x sin x sa
__.
s continuous
one of the fo
a y in the inte
n the interva
m value of the
a y in the int
d dice are rol
s __________
SE
block addresse
ddresses betw
is the miss ra
least-recently
N
r with two se
form of the B
R
R
atisfies the fol
in the interva
llowing statem
erval (u,1) su
l (u,1), (y)
e function in
terval (u,1) su
led. The prob
____.
ET-1
es is of length
ween two cons
atio if the acc
y-used replace
(C) 1/A
lect lines S
1
a
Boolean expre
llowing equat
al |u,2]. It is k
ments must b
uch that (y)
= (2 y)
the interval (
uch that (y)
bability that th
h N and conta
secutive acce
cess sequence
ement policy?
and S
0
given b
ession for the
tion:
ii
(x) +
known that (
be true?
= (y + 1)
u,2) is 1
= (2 y
he sum of the
COMPUT
ains n unique
sses to the sa
e is passed th
?
(D) k/n
below.
output F of th
+ (x) + t co
(u) = (2) =
y)
e results being
TER CS
e block addres
ame block add
hrough a cach
he multiplexe
os x = u. The
= 1 and
g 22 is
X
12
,
sses.
dress
he of
er is
296
.
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 13/14
Q.49 A pennant is a sequence of numbers, each number being 1 or 2. An n-pennant is a sequence of
numbers with sum equal to n. For example, (1,1,2) is a 4-pennant. The set of all possible 1-pennants
is {(1)}, the set of all possible 2-pennants is {(2), (1,1)}and the set of all 3-pennants is {(2,1),
(1,1,1), (1,2)}. Note that the pennant (1,2) is not the same as the pennant (2,1). The number of 10-
pennants is ______________.
Q.50 Let S denote the set of all functions : {u,1]
4
{u,1]. Denote by N the number of functions
from S to the set {u,1]. The value of log
2
log
2
N is ______.
Q.51 Consider an undirected graph 0 where self-loops are not allowed. The vertex set of 0 is {(i, ]): 1
i 12, 1 ] 12]. There is an edge between (o, b) and (c, J) if |o c| 1 and |b J| 1.
The number of edges in this graph is __________.
Q.52 An ordered n-tuple (J
1
, J
2
, , J
n
) with J
1
J
2
J
n
is called graphic if there exists a simple
undirected graph with n vertices having degrees J
1
, J
2
, , J
n
respectively. Which of the following
6-tuples is NOT graphic?
(A) (1, 1, 1, 1, 1, 1) (B) (2, 2, 2, 2, 2, 2)
(C) (3, 3, 3, 1, 0, 0) (D) (3, 2, 1, 1, 1, 0)
Q.53 Which one of the following propositional logic formulas is TRUE when exactly two of p, q, and r
are TRUE?
(A) ((p q) r) (p q r)
(B) ( (p q) r) (p q r)
(C) ((p q) r) (p q r)
(D) ( (p q) r) (p q r)
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-1 COMPUTER CS
CS 14/14
Q.54 Given the following schema:
employees(emp-id, first-name, last-name, hire-date,
dept-id, salary)
departments(dept-id, dept-name, manager-id, location-id)
You want to display the last names and hire dates of all latest hires in their respective departments
in the location ID 1700. You issue the following query:
SQL>SELECT last-name, hire-date
FROM employees
WHERE (dept-id, hire-date) IN
(SELECT dept-id, MAX(hire-date)
FROM employees JOIN departments USING(dept-id)
WHERE location-id = 1700
GROUP BY dept-id);
What is the outcome?
(A) It executes but does not give the correct result.
(B) It executes and gives the correct result.
(C) It generates an error because of pairwise comparison.
(D) It generates an error because the GROUP BY clause cannot be used with table joins in a sub-
query.
Q.55 Consider two processors P
1
and P
2
executing the same instruction set. Assume that under identical
conditions, for the same input, a program running on P
2
takes 25% less time but incurs 20% more
CPI (clock cycles per instruction) as compared to the program running on P
1
. If the clock frequency
of P
1
is 1GHz, then the clock frequency of P
2
(in GHz) is _________.
END OF THE QUESTION PAPER
C
S
0
1
(
G
A
T
E
2
0
1
4
)
GATE 2014: General Instructions during Examination
1. Total duration of the GATE examination is 180 minutes.
2. The clock will be set at the server. The countdown timer at the top right corner of
screen will display the remaining time available for you to complete the examination.
When the timer reaches zero, the examination will end by itself. You need not
terminate the examination or submit your paper.
3. Any useful data required for your paper can be viewed by clicking on the Useful
Common Data button that appears on the screen.
4. Use the scribble pad provided to you for any rough work. Submit the scribble pad at
the end of the examination.
5. You are allowed to use a non-programmable type calculator, however, sharing of
calculators is not allowed.
6. The Question Palette displayed on the right side of screen will show the status of
each question using one of the following symbols:
The Marked for Review status for a question simply indicates that you would like to look at
that question again. If a question is answered, but marked for review, then the answer will
be considered for evaluation unless the status is modified by the candidate.
Navigating to a Question :
7. To answer a question, do the following:
a. Click on the question number in the Question Palette to go to that question
directly.
b. Select an answer for a multiple choice type question by clicking on the bubble
placed before the 4 choices, namely A, B, C and D. Use the virtual numeric
keypad to enter a number as answer for a numerical type question.
c. Click on Save & Next to save your answer for the current question and then go
to the next question.
d. Click on Mark for Review & Next to save your answer for the current question
and also mark it for review, and then go to the next question.
Caution: Note that your answer for the current question will not be saved, if you navigate
to another question directly by clicking on a question number without saving the answer to
the previous question.
You can view all the questions by clicking on the Question Paper button. This feature is
provided, so that if you want you can just see the entire question paper at a glance.
Answering a Question :
8. Procedure for answering a multiple choice (MCQ) type question:
a. Choose one answer from the 4 options (A,B,C,D) given below the question,
click on the bubble placed before the chosen option.
b. To deselect your chosen answer, click on the bubble of the chosen option again
or click on the Clear Response button.
c. To change your chosen answer, click on the bubble of another option.
d. To save your answer, you MUST click on the Save & Next button.
9. Procedure for answering a numerical answer type question:
a. To enter a number as your answer, use the virtual numerical keypad.
b. A fraction (e.g. -0.3 or -.3) can be entered as an answer with or without '0'
before the decimal point. As many as four decimal points, e.g. 12.5435 or
0.003 or -932.6711 or 12.82 can be entered.
c. To clear your answer, click on the Clear Response button.
d. To save your answer, you MUST click on the Save & Next button
10. To mark a question for review, click on the Mark for Review & Next button. If an
answer is selected (for MCQ) or entered (for numerical answer type) for a question
that is Marked for Review, that answer will be considered in the evaluation unless
the status is modified by the candidate.
11. To change your answer to a question that has already been answered, first select
that question for answering and then follow the procedure for answering that type of
question.
12. Note that ONLY Questions for which answers are saved or marked for review after
answering will be considered for evaluation.
Choosing a Section :
13. Sections in this question paper are displayed on the top bar of the screen. Questions
in a Section can be viewed by clicking on the name of that Section. The Section you
are currently viewing will be highlighted.
14. A checkbox is displayed for every optional Section, if any, in the Question Paper. To
select the optional Section for answering, click on the checkbox for that Section.
15. If the checkbox for an optional Section is not selected, the Save & Next button and
the Mark for Review & Next button will NOT be enabled for that Section. You will
only be able to see questions in this Section, but you will not be able to answer
questions in the Section.
16. After clicking the Save & Next button for the last question in a Section, you will
automatically be taken to the first question of the next Section in sequence.
17. You can move the mouse cursor over the name of a Section to view the answering
status for that Section.
Changing the Optional Section :
18. After answering the chosen optional Section, partially or completely, you can change
the optional Section by selecting the checkbox for a new Section that you want to
attempt. A warning message will appear along with a table showing the number of
questions answered in each of the previously chosen optional Sections and a
checkbox against each of these Sections. Click on a checkbox against a Section that
you want to reset and then click on the RESET button. Note that RESETTING a Section
will DELETE all the answers for questions in that Section. Hence, if you think that you
may want to select this Section again later, you will have to note down your answers
for questions in that Section. If you do not want to reset the Section and want to
continue answering the previously chosen optional Section, then click on the BACK
button.
19. If you deselect the checkbox for an optional Section in the top bar, the following
warning message will appear: "Deselecting the checkbox will DELETE all the answers
for questions in this Section. Do you want to deselect this Section? If you want to
deselect, click on the RESET button. If you do not want to deselect, click on the BACK
button.
20. You can shuffle between different Sections or change the optional Sections any
number of times.
GATE 2014 Examination
CS: Computer Science & Information Technology
Duration: 180 minutes Maximum Marks: 100
Read the following instructions carefully.
1. To login, enter your Registration Number and password provided to you. Kindly go through the various
symbols used in the test and understand their meaning before you start the examination.
2. Once you login and after the start of the examination, you can view all the questions in the question
paper, by clicking on the View All Questions button in the screen.
3. This question paper consists of 2 sections, General Aptitude (GA) for 15 marks and the subject
specific GATE paper for 85 marks. Both these sections are compulsory.
The GA section consists of 10 questions. Question numbers 1 to 5 are of 1-mark each, while question
numbers 6 to 10 are of 2-mark each.
The subject specific GATE paper section consists of 55 questions, out of which question numbers 1 to
25 are of 1-mark each, while question numbers 26 to 55 are of 2-mark each.
4. Depending upon the GATE paper, there may be useful common data that may be required for
answering the questions. If the paper has such useful data, the same can be viewed by clicking on the
Useful Common Data button that appears at the top, right hand side of the screen.
5. The computer allotted to you at the examination center runs specialized software that permits only one
answer to be selected for multiple-choice questions using a mouse and to enter a suitable number for
the numerical answer type questions using the virtual keyboard and mouse.
6. Your answers shall be updated and saved on a server periodically and also at the end of the
examination. The examination will stop automatically at the end of 180 minutes.
7. In each paper a candidate can answer a total of 65 questions carrying 100 marks.
8. The question paper may consist of questions of multiple choice type (MCQ) and numerical answer
type.
9. Multiple choice type questions will have four choices against A, B, C, D, out of which only ONE is the
correct answer. The candidate has to choose the correct answer by clicking on the bubble () placed
before the choice.
10. For numerical answer type questions, each question will have a numerical answer and there will not be
any choices. For these questions, the answer should be enteredby using the virtual keyboard that
appears on the monitor and the mouse.
11. All questions that are not attempted will result in zero marks. However, wrong answers for multiple
choice type questions (MCQ) will result in NEGATIVE marks. For all MCQ questions a wrong
answer will result in deduction of marks for a 1-mark question and marks for a 2-mark question.
12. There is NO NEGATIVE MARKING for questions of NUMERICAL ANSWER TYPE.
13. Non-programmable type Calculator is allowed. Charts, graph sheets, and mathematical tables are NOT
allowed in the Examination Hall. You must use the Scribble pad provided to you at the examination
centre for all your rough work. The Scribble Pad has to be returned at the end of the examination.
Declaration by the candidate:
I have read and understood all the above instructions. I have also read and understood clearly the
instructions given on the admit card and shall follow the same. I also understand that in case I am found to
violate any of these instructions, my candidature is liable to be cancelled. I also confirm that at the start of
the examination all the computer hardware allotted to me are in proper working condition.
GATE 2014 SET- 8 General Aptitude -GA
GA 1/2
Q. 1 Q. 5 carry one mark each.
Q.1 Choose the most appropriate phrase from the options given below to complete the following
sentence.
India is a post-colonial country because
(A) it was a former British colony
(B) Indian Information Technology professionals have colonized the world
(C) India does not follow any colonial practices
(D) India has helped other countries gain freedom
Q.2 Who ___________ was coming to see us this evening?
(A) you said (B) did you say
(C) did you say that (D) had you said
Q.3 Match the columns.
Column 1 Column 2
1) eradicate P) misrepresent
2) distort Q) soak completely
3) saturate R) use
4) utilize S) destroy utterly
(A) 1:S, 2:P, 3:Q, 4:R (B) 1:P, 2:Q, 3:R, 4:S
(C) 1:Q, 2:R, 3:S, 4:P (D) 1:S, 2:P, 3:R, 4:Q
Q.4 What is the average of all multiples of 10 from 2 to 198?
(A) 90 (B) 100 (C) 110 (D) 120
Q.5
The value of
12 +
12 +12 + is
(A) 3.464 (B) 3.932 (C) 4.000 (D) 4.444
Q. 6 Q. 10 carry two marks each.
Q.6 The old city of Koenigsberg, which had a German majority population before World War 2, is now
called Kaliningrad. After the events of the war, Kaliningrad is now a Russian territory and has a
predominantly Russian population. It is bordered by the Baltic Sea on the north and the countries of
Poland to the south and west and Lithuania to the east respectively. Which of the statements below
can be inferred from this passage?
(A) Kaliningrad was historically Russian in its ethnic make up
(B) Kaliningrad is a part of Russia despite it not being contiguous with the rest of Russia
(C) Koenigsberg was renamed Kaliningrad, as that was its original Russian name
(D) Poland and Lithuania are on the route from Kaliningrad to the rest of Russia
G
A
0
8
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET- 8 General Aptitude -GA
GA 2/2
Q.7 The number of people diagnosed with dengue fever (contracted from the bite of a mosquito) in
north India is twice the number diagnosed last year. Municipal authorities have concluded that
measures to control the mosquito population have failed in this region.
Which one of the following statements, if true, does not contradict this conclusion?
(A) A high proportion of the affected population has returned from neighbouring countries where
dengue is prevalent
(B) More cases of dengue are now reported because of an increase in the Municipal Offices
administrative efficiency
(C) Many more cases of dengue are being diagnosed this year since the introduction of a new and
effective diagnostic test
(D) The number of people with malarial fever (also contracted from mosquito bites) has increased
this year
Q.8 If x is real and |
2
2 +3| = 11, then possible values of |
3
+
2
| include
(A) 2, 4 (B) 2, 14 (C) 4, 52 (D) 14, 52
Q.9 The ratio of male to female students in a college for five years is plotted in the following line graph.
If the number of female students doubled in 2009, by what percent did the number of male students
increase in 2009?
Q.10 At what time between 6 . . and 7 . . will the minute hand and hour hand of a clock make an
angle closest to 60?
(A) 6: 22 . . (B) 6: 27 . .
(C) 6: 38 . . (D) 6: 45 . .
END OF THE QUESTION PAPER
G
A
0
8
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-2 COMPUTER CS
CS 1/15
Q. 1 Q. 25 carry one mark each.
Q.1 The security system at an IT office is composed of 1u computers of which exactly four are
working. To check whether the system is functional, the officials inspect four of the computers
picked at random (without replacement). The system is deemed functional if at least three of the
four computers inspected are working. Let the probability that the system is deemed functional be
denoted by p. Then 1uup = _____________.
Q.2 Each of the nine words in the sentence The quick brown fox jumps over the lazy
dog is written on a separate piece of paper. These nine pieces of paper are kept in a box. One of
the pieces is drawn at random from the box. The expected length of the word drawn is
_____________. (The answer should be rounded to one decimal place.)
Q.3 The maximum number of edges in a bipartite graph on 12 vertices is
__________________________.
Q.4 If the matrix A is such that
A = _
2
4
7
_ |
1 9 S
]
then the determinant of A is equal to ______.
Q.5 A non-zero polynomial (x) of degree S has roots at x = 1, x = 2 and x = S. Which one of the
following must be TRUE?
(A) (u)(4) < u
(B) (u)(4) > u
(C) (u) + (4) > u
(D) (u) + (4) < u
Q.6
The dual of a Boolean function F(x
1
, x
2
, , x
n
, +, , ), written as F
is obtained for the function
u.7Sx
3
2x
2
2x +4 = u
Consiuei the statements
(I) x
3
= u.
(II) The method converges to a solution in a finite number of iterations.
Which of the following is TRUE?
(A) Only I (B) Only II (C) Both I and II (D) Neither I nor II
Q.47 The product of the non-zero eigenvalues of the matrix
l
l
l
l
l
1 u u u 1
u 1 1 1 u
u 1 1 1 u
u 1 1 1 u
1 u u u 1
1
1
1
1
1
is ______.
Q.48 The probability that a given positive integer lying between 1 and 100 (both inclusive) is NOT
divisible by 2, 3 or 5 is ______ .
Q.49 The number of distinct positive integral factors of 2014 is _________________________
___________
Q.50 Consider the following relation on subsets of the set S of integers between 1 and 2014. For two
distinct subsets u and I of S we say u < I if the minimum element in the symmetric difference of
the two sets is in u.
Consider the following two statements:
S1: There is a subset of S that is larger than every other subset.
S2: There is a subset of S that is smaller than every other subset.
Which one of the following is CORRECT?
(A) Both S1 and S2 are true
(B) S1 is true and S2 is false
(C) S2 is true and S1 is false
(D) Neither S1 nor S2 is true
C
S
0
2
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-2 COMPUTER CS
CS 14/15
Q.51 A cycle on n vertices is isomorphic to its complement. The value of n is _____.
Q.52 The number of distinct minimum spanning trees for the weighted graph below is _____
Q.53 Which one of the following Boolean expressions is NOT a tautology?
(A) ((o b) (b c)) (o c)
(B) (o c) ( b (o c))
(C) (o b c) (c o)
(D) o (b o)
Q.54 SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in
the result of joins. Which one of the following queries always gives the same answer as the nested
query shown below:
select * from R where a in (select S.a from S)
(A) select R.* from R, S where R.a=S.a
(B) select distinct R.* from R,S where R.a=S.a
(C) select R.* from R,(select distinct a from S) as S1 where
R.a=S1.a
(D) select R.* from R,S where R.a=S.a and is unique R
C
S
0
2
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-2 COMPUTER CS
CS 15/15
Q.55 Consider a main memory system that consists of 8 memory modules attached to the system bus,
which is one word wide. When a write request is made, the bus is occupied for 100 nanoseconds
(ns) by the data, address, and control signals. During the same 100 ns, and for 500 ns thereafter, the
addressed memory module executes one cycle accepting and storing the data. The (internal)
operation of different memory modules may overlap in time, but only one request can be on the bus
at any time. The maximum number of stores (of one word each) that can be initiated in 1
millisecond is ____________
END OF THE QUESTION PAPER
C
S
0
2
(
G
A
T
E
2
0
1
4
)
GATE 2014: General Instructions during Examination
1. Total duration of the GATE examination is 180 minutes.
2. The clock will be set at the server. The countdown timer at the top right corner of
screen will display the remaining time available for you to complete the examination.
When the timer reaches zero, the examination will end by itself. You need not
terminate the examination or submit your paper.
3. Any useful data required for your paper can be viewed by clicking on the Useful
Common Data button that appears on the screen.
4. Use the scribble pad provided to you for any rough work. Submit the scribble pad at
the end of the examination.
5. You are allowed to use a non-programmable type calculator, however, sharing of
calculators is not allowed.
6. The Question Palette displayed on the right side of screen will show the status of
each question using one of the following symbols:
The Marked for Review status for a question simply indicates that you would like to look at
that question again. If a question is answered, but marked for review, then the answer will
be considered for evaluation unless the status is modified by the candidate.
Navigating to a Question :
7. To answer a question, do the following:
a. Click on the question number in the Question Palette to go to that question
directly.
b. Select an answer for a multiple choice type question by clicking on the bubble
placed before the 4 choices, namely A, B, C and D. Use the virtual numeric
keypad to enter a number as answer for a numerical type question.
c. Click on Save & Next to save your answer for the current question and then go
to the next question.
d. Click on Mark for Review & Next to save your answer for the current question
and also mark it for review, and then go to the next question.
Caution: Note that your answer for the current question will not be saved, if you navigate
to another question directly by clicking on a question number without saving the answer to
the previous question.
You can view all the questions by clicking on the Question Paper button. This feature is
provided, so that if you want you can just see the entire question paper at a glance.
Answering a Question :
8. Procedure for answering a multiple choice (MCQ) type question:
a. Choose one answer from the 4 options (A,B,C,D) given below the question,
click on the bubble placed before the chosen option.
b. To deselect your chosen answer, click on the bubble of the chosen option again
or click on the Clear Response button.
c. To change your chosen answer, click on the bubble of another option.
d. To save your answer, you MUST click on the Save & Next button.
9. Procedure for answering a numerical answer type question:
a. To enter a number as your answer, use the virtual numerical keypad.
b. A fraction (e.g. -0.3 or -.3) can be entered as an answer with or without '0'
before the decimal point. As many as four decimal points, e.g. 12.5435 or
0.003 or -932.6711 or 12.82 can be entered.
c. To clear your answer, click on the Clear Response button.
d. To save your answer, you MUST click on the Save & Next button
10. To mark a question for review, click on the Mark for Review & Next button. If an
answer is selected (for MCQ) or entered (for numerical answer type) for a question
that is Marked for Review, that answer will be considered in the evaluation unless
the status is modified by the candidate.
11. To change your answer to a question that has already been answered, first select
that question for answering and then follow the procedure for answering that type of
question.
12. Note that ONLY Questions for which answers are saved or marked for review after
answering will be considered for evaluation.
Choosing a Section :
13. Sections in this question paper are displayed on the top bar of the screen. Questions
in a Section can be viewed by clicking on the name of that Section. The Section you
are currently viewing will be highlighted.
14. A checkbox is displayed for every optional Section, if any, in the Question Paper. To
select the optional Section for answering, click on the checkbox for that Section.
15. If the checkbox for an optional Section is not selected, the Save & Next button and
the Mark for Review & Next button will NOT be enabled for that Section. You will
only be able to see questions in this Section, but you will not be able to answer
questions in the Section.
16. After clicking the Save & Next button for the last question in a Section, you will
automatically be taken to the first question of the next Section in sequence.
17. You can move the mouse cursor over the name of a Section to view the answering
status for that Section.
Changing the Optional Section :
18. After answering the chosen optional Section, partially or completely, you can change
the optional Section by selecting the checkbox for a new Section that you want to
attempt. A warning message will appear along with a table showing the number of
questions answered in each of the previously chosen optional Sections and a
checkbox against each of these Sections. Click on a checkbox against a Section that
you want to reset and then click on the RESET button. Note that RESETTING a Section
will DELETE all the answers for questions in that Section. Hence, if you think that you
may want to select this Section again later, you will have to note down your answers
for questions in that Section. If you do not want to reset the Section and want to
continue answering the previously chosen optional Section, then click on the BACK
button.
19. If you deselect the checkbox for an optional Section in the top bar, the following
warning message will appear: "Deselecting the checkbox will DELETE all the answers
for questions in this Section. Do you want to deselect this Section? If you want to
deselect, click on the RESET button. If you do not want to deselect, click on the BACK
button.
20. You can shuffle between different Sections or change the optional Sections any
number of times.
GATE 2014 Examination
CS: Computer Science & Information Technology
Duration: 180 minutes Maximum Marks: 100
Read the following instructions carefully.
1. To login, enter your Registration Number and password provided to you. Kindly go through the various
symbols used in the test and understand their meaning before you start the examination.
2. Once you login and after the start of the examination, you can view all the questions in the question
paper, by clicking on the View All Questions button in the screen.
3. This question paper consists of 2 sections, General Aptitude (GA) for 15 marks and the subject
specific GATE paper for 85 marks. Both these sections are compulsory.
The GA section consists of 10 questions. Question numbers 1 to 5 are of 1-mark each, while question
numbers 6 to 10 are of 2-mark each.
The subject specific GATE paper section consists of 55 questions, out of which question numbers 1 to
25 are of 1-mark each, while question numbers 26 to 55 are of 2-mark each.
4. Depending upon the GATE paper, there may be useful common data that may be required for
answering the questions. If the paper has such useful data, the same can be viewed by clicking on the
Useful Common Data button that appears at the top, right hand side of the screen.
5. The computer allotted to you at the examination center runs specialized software that permits only one
answer to be selected for multiple-choice questions using a mouse and to enter a suitable number for
the numerical answer type questions using the virtual keyboard and mouse.
6. Your answers shall be updated and saved on a server periodically and also at the end of the
examination. The examination will stop automatically at the end of 180 minutes.
7. In each paper a candidate can answer a total of 65 questions carrying 100 marks.
8. The question paper may consist of questions of multiple choice type (MCQ) and numerical answer
type.
9. Multiple choice type questions will have four choices against A, B, C, D, out of which only ONE is the
correct answer. The candidate has to choose the correct answer by clicking on the bubble () placed
before the choice.
10. For numerical answer type questions, each question will have a numerical answer and there will not be
any choices. For these questions, the answer should be enteredby using the virtual keyboard that
appears on the monitor and the mouse.
11. All questions that are not attempted will result in zero marks. However, wrong answers for multiple
choice type questions (MCQ) will result in NEGATIVE marks. For all MCQ questions a wrong
answer will result in deduction of marks for a 1-mark question and marks for a 2-mark question.
12. There is NO NEGATIVE MARKING for questions of NUMERICAL ANSWER TYPE.
13. Non-programmable type Calculator is allowed. Charts, graph sheets, and mathematical tables are NOT
allowed in the Examination Hall. You must use the Scribble pad provided to you at the examination
centre for all your rough work. The Scribble Pad has to be returned at the end of the examination.
Declaration by the candidate:
I have read and understood all the above instructions. I have also read and understood clearly the
instructions given on the admit card and shall follow the same. I also understand that in case I am found to
violate any of these instructions, my candidature is liable to be cancelled. I also confirm that at the start of
the examination all the computer hardware allotted to me are in proper working condition.
GATE 2014 SET- 9 General Aptitude -GA
GA 1/2
Q. 1 Q. 5 carry one mark each.
Q.1 While trying to collect an envelope from under the table, Mr. X fell down and
I II III
was losing consciousness.
IV
Which one of the above underlined parts of the sentence is NOT appropriate?
(A) I (B) II (C) III (D) IV
Q.2 If she _______________ how to calibrate the instrument, she _______________ done the
experiment.
(A) knows, will have (B) knew, had
(C) had known, could have (D) should have known, would have
Q.3 Choose the word that is opposite in meaning to the word coherent.
(A) sticky (B) well-connected (C) rambling (D) friendly
Q.4 Which number does not belong in the series below?
2, 5, 10, 17, 26, 37, 50, 64
(A) 17 (B) 37 (C) 64 (D) 26
Q.5 The table below has question-wise data on the performance of students in an examination. The
marks for each question are also listed. There is no negative or partial marking in the examination.
What is the average of the marks obtained by the class in the examination?
Q No. Marks
Answered
Correctly
Answered
Wrongly
Not
Attempted
1 2 21 17 6
2 3 15 27 2
3 2 23 18 3
(A) 1.34 (B) 1.74 (C) 3.02 (D) 3.91
Q. 6 Q. 10 carry two marks each.
Q.6 A dance programme is scheduled for 10.00 a.m. Some students are participating in the programme
and they need to come an hour earlier than the start of the event. These students should be
accompanied by a parent. Other students and parents should come in time for the programme. The
instruction you think that is appropriate for this is
(A) Students should come at 9.00 a.m. and parents should come at 10.00 a.m.
(B) Participating students should come at 9.00 a.m. accompanied by a parent, and other parents
and students should come by 10.00 a.m.
(C) Students who are not participating should come by 10.00 a.m. and they should not bring their
parents. Participating students should come at 9.00 a.m.
(D) Participating students should come before 9.00 a.m. Parents who accompany them should
come at 9.00 a.m. All others should come at 10.00 a.m.
G
A
0
9
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET- 9 General Aptitude -GA
GA 2/2
Q.7 By the beginning of the 20
th
century, several hypotheses were being proposed, suggesting a
paradigm shift in our understanding of the universe. However, the clinching evidence was provided
by experimental measurements of the position of a star which was directly behind our sun.
Which of the following inference(s) may be drawn from the above passage?
(i) Our understanding of the universe changes based on the positions of stars
(ii) Paradigm shifts usually occur at the beginning of centuries
(iii) Stars are important objects in the universe
(iv) Experimental evidence was important in confirming this paradigm shift
(A) (i), (ii) and (iv) (B) (iii) only (C) (i) and (iv) (D) (iv) only
Q.8 The Gross Domestic Product (GDP) in Rupees grew at 7% during 2012-2013. For international
comparison, the GDP is compared in US Dollars (USD) after conversion based on the market
exchange rate. During the period 2012-2013 the exchange rate for the USD increased from
Rs. 50/ USD to Rs. 60/ USD. Indias GDP in USD during the period 2012-2013
(A) increased by 5 % (B) decreased by 13%
(C) decreased by 20% (D) decreased by 11%
Q.9 The ratio of male to female students in a college for five years is plotted in the following line graph.
If the number of female students in 2011 and 2012 is equal, what is the ratio of male students in
2012 to male students in 2011?
(A) 1:1 (B) 2:1 (C) 1.5:1 (D) 2.5:1
Q.10 Consider the equation: (7526)
8
(Y)
8
=(4364)
8
, where (X)
N
stands for X to the base N. Find Y.
(A) 1634 (B) 1737 (C) 3142 (D) 3162
END OF THE QUESTION PAPER
G
A
0
9
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 1/14
Q. 1 Q. 25 carry one mark each.
Q.1 Consider the following statements:
P: Good mobile phones are not cheap
Q: Cheap mobile phones are not good
L: P implies Q
M: Q implies P
N: P is equivalent to Q
Which one of the following about L, M, and N is CORRECT?
(A) Only L is TRUE.
(B) Only M is TRUE.
(C) Only N is TRUE.
(D) L, M and N are TRUE.
Q.2 Let X and be finite sets and : X be a function. Which one of the following statements is
TRUE?
(A) For any subsets A and B of X, |(A B)| = |(A)| +|(B)|
(B) For any subsets A and B of X, (A B) = (A) (B)
(C) For any subsets A and B of X, |(A B)| = min {|(A)|, |(B)|]
(D) For any subsets S and I of ,
-1
(S I) =
-1
(S)
-1
(I)
Q.3 Let 0 be a group with 1S elements. Let I be a subgroup of 0. It is known that I 0 and that the
size of I is at least 4. The size of I is __________.
Q.4 Which one of the following statements is TRUE about every n n matrix with only real
eigenvalues?
(A) If the trace of the matrix is positive and the determinant of the matrix is negative, at least one
of its eigenvalues is negative.
(B) If the trace of the matrix is positive, all its eigenvalues are positive.
(C) If the determinant of the matrix is positive, all its eigenvalues are positive.
(D) If the product of the trace and determinant of the matrix is positive, all its eigenvalues are
positive.
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 2/14
Q.5 If V
1
and V
2
are 4-dimensional subspaces of a 6-dimensional vector space V, then the smallest
possible dimension of V
1
V
2
is ______.
Q.6
If ] |x sinx| Jx = kn
2n
0
, then the value of k is equal to ______ .
Q.7 Consider the following minterm expression for F:
F (P, , R, S) = u, 2, S, 7, 8, 1u, 1S, 1S
The minterms 2, 7, 8 and 13 are do not care terms. The minimal sum-of-products form for F is
(A) S
S
(B)
+S
(C)
RS
+R
S + RS
(D) P
+ P
S + PS + P
Q.8 Consider the following combinational function block involving four Boolean variables x, y, a,
b where x, a, b are inputs and y is the output.
f (x, y, a, b)
{
if (x is 1) y = a;
else y = b;
}
Which one of the following digital logic blocks is the most suitable for implementing this function?
(A) Full adder (B) Priority encoder (C) Multiplexor (D) Flip-flop
Q.9 Consider the following processors (ns stands for nanoseconds). Assume that the pipeline registers
have zero latency.
P1: Four-stage pipeline with stage latencies 1 ns, 2 ns, 2 ns, 1 ns.
P2: Four-stage pipeline with stage latencies 1 ns, 1.5 ns, 1.5 ns, 1.5 ns.
P3: Five-stage pipeline with stage latencies 0.5 ns, 1 ns, 1 ns, 0.6 ns, 1 ns.
P4: Five-stage pipeline with stage latencies 0.5 ns, 0.5 ns, 1 ns, 1 ns, 1.1 ns.
Which processor has the highest peak clock frequency?
(A) P1 (B) P2 (C) P3 (D) P4
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014
CS
Q.10 Let
out
(A)
(B)
(C)
(D)
Q.11 The
P(X
___
Q.12 Con
The
(A)
(B)
(C)
(D)
4
t A be a squa
tput?
) The matrix
) Transpose
) Adding 100
of A
) None of th
e minimum
X) = X
5
+ 4
____.
nsider the fo
e order in wh
) SQPTRW
) SQPTUW
) SQPTWU
) SQPTRUW
are matrix o
C = 10
for i
for
{
T
A
A
}
for i
for
o
x A itself
of the matrix
0 to the uppe
e above
m number
4 X
3
+ 6 X +
llowing root
hich the node
WUV
WRV
UVR
WV
f size n n
00;
= 1 to n
j = 1 to
Temp = A[
A[i][j]=
A[j][i] =
= 1 to n
j = 1 to
output (A
x A
er diagonal e
of arithmet
+ S for a g
ted tree with
es are visited
SET-3
. Consider th
n do
o n do
[i][j] +
A[j][i];
= Temp
n do
o n do
A[i][j]);
elements and
tic operatio
given value
the vertex la
d during an in
he following
C;
C;
subtracting
ons required
of X, usin
abeled P as th
n-order trave
CO
g pseudocode
100 from low
d to evalu
ng only one
he root:
ersal of the tr
OMPUTER
e. What is th
wer diagonal
uate the
temporary
ree is
CS
3/14
he expected
l elements
polynomial
variable is
4
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 4/14
Q.14 You have an array of n elements. Suppose you implement quicksort by always choosing the central
element of the array as the pivot. Then the tightest upper bound for the worst case performance is
(A) 0(n
2
) (B) 0(n log n) (C) (n log n) (D) 0(n
3
)
Q.15 The length of the shortest string NOT in the language (over = {o, b]) of the following regular
expression is ______________.
o
(bo)
Q.16
Let be a finite non-empty alphabet and let 2
empId
(employee)-
empId
(employee
(empId = eID)(empAge depAge)
dependent)
The above query evaluates to the set of empIds of employees whose age is greater than that of
(A) some dependent.
(B) all dependents.
(C) some of his/her dependents.
(D) all of his/her dependents.
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 8/14
Q.31 A system contains three programs and each requires three tape units for its operation. The
minimum number of tape units which the system must have such that deadlocks never arise
is _________.
Q.32 An operating system uses shortest remaining time first scheduling algorithm for pre-emptive
scheduling of processes. Consider the following set of processes with their arrival times and CPU
burst times (in milliseconds):
Process Arrival Time Burst Time
P1 0 12
P2 2 4
P3 3 6
P4 8 5
The average waiting time (in milliseconds) of the processes is _________.
Q.33 Consider a paging hardware with a TLB. Assume that the entire page table and all the pages are in
the physical memory. It takes 10 milliseconds to search the TLB and 80 milliseconds to access the
physical memory. If the TLB hit ratio is 0.6, the effective memory access time (in milliseconds) is
_________.
Q.34 Consider the basic block given below.
a = b + c
c = a + d
d = b + c
e = d - b
a = e + b
The minimum number of nodes and edges present in the DAG representation of the above basic
block respectively are
(A) 6 and 6 (B) 8 and 10 (C) 9 and 12 (D) 4 and 4
Q.35 Which one of the following problems is undecidable?
(A) Deciding if a given context-free grammar is ambiguous.
(B) Deciding if a given string is generated by a given context-free grammar.
(C) Deciding if the language generated by a given context-free grammar is empty.
(D) Deciding if the language generated by a given context-free grammar is finite.
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 9/14
Q.36 Consider the following languages over the alphabet = {u,1, c]:
I
1
= {u
n
1
n
| n u]
I
2
= {wcw
|w {u,1]
]
I
3
= {ww
|w {u,1]
]
Here, w
is the reverse of the string w. Which of these languages are deterministic Context-free
languages?
(A) None of the languages
(B) Only I
1
(C) Only I
1
and I
2
(D) All the three languages
Q.37 Suppose you want to move from 0 to 100 on the number line. In each step, you either
move right by a unit distance or you take a shortcut. A shortcut is simply a pre-specified
pair of integers i, ] with i < ]. Given a shortcut i, ] if you are at position i on the number
line, you may directly move to ]. Suppose I(k) denotes the smallest number of steps
needed to move from k to 100. Suppose further that there is at most 1 shortcut involving
any number, and in particular from 9 there is a shortcut to 15. Let y and z be such that
I(9) = 1 +min(I(y), I(z)). Then the value of the product yz is _____.
Q.38 Consider the decision problem 2CNFSAT defined as follows:
{ 1 | 1 is a satisfiable piopositional foimula in CNF with at most two liteials pei clause ]
For example, 1 = (x
1
x
2
)(x
1
x
3
)(x
2
x
4
) is a Boolean formula and it is in 2CNFSAT.
The decision problem 2CNFSAT is
(A) NP-Complete.
(B) solvable in polynomial time by reduction to directed graph reachability.
(C) solvable in constant time since any input instance is satisfiable.
(D) NP-hard, but not NP-complete.
Q.39
Suppose we have a balanced binary search tree I holding n numbers. We are given two
numbers I and E and wish to sum up all the numbers in I that lie between I and E.
Suppose there are m such numbers in I. If the tightest upper bound on the time to
compute the sum is 0(n
u
log
b
n + m
c
log
d
n), the value of o +1ub +1uuc +1uuuJ is
____.
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 10/14
Q.40 Consider a hash table with 100 slots. Collisions are resolved using chaining. Assuming simple
uniform hashing, what is the probability that the first 3 slots are unfilled after the first 3 insertions?
(A) (97 97 97)1uu
3
(B) (99 98 97)1uu
3
(C) (97 96 9S)1uu
3
(D) (97 96 9S)(S! 1uu
3
)
Q.41 Consider the pseudocode given below. The function DoSomething() takes as argument a
pointer to the root of an arbitrary tree represented by the leftMostChild-rightSibling representation.
Each node of the tree is of type treeNode.
typedef struct treeNode* treeptr;
struct treeNode
{
treeptr leftMostChild, rightSibling;
};
int DoSomething (treeptr tree)
{
int value=0;
if (tree != NULL) {
if (tree->leftMostChild == NULL)
value = 1;
else
value = DoSomething(tree->leftMostChild);
value = value + DoSomething(tree->rightSibling);
}
return(value);
}
When the pointer to the root of a tree is passed as the argument to DoSomething, the value
returned by the function corresponds to the
(A) number of internal nodes in the tree.
(B) height of the tree.
(C) number of nodes without a right sibling in the tree.
(D) number of leaf nodes in the tree.
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 11/14
Q.42 Consider the C function given below. Assume that the array listA contains n (> 0) elements,
sorted in ascending order.
int ProcessArray(int *listA, int x, int n)
{
int i, j, k;
i = 0;
j = n-1;
do {
k = (i+j)/2;
if (x <= listA[k])
j = k-1;
if (listA[k] <= x)
i = k+1;
}while (i <= j);
if (listA[k] == x)
return(k);
else
return -1;
}
Which one of the following statements about the function ProcessArray is CORRECT?
(A) It will run into an infinite loop when x is not in listA.
(B) It is an implementation of binary search.
(C) It will always find the maximum element in listA.
(D) It will return 1 even when x is present in listA.
Q.43 An instruction pipeline has five stages, namely, instruction fetch (IF), instruction decode and
register fetch (ID/RF), instruction execution (EX), memory access (MEM), and register writeback
(WB) with stage latencies 1 ns, 2.2 ns, 2 ns, 1 ns, and 0.75 ns, respectively (ns stands for
nanoseconds). To gain in terms of frequency, the designers have decided to split the ID/RF stage
into three stages (ID, RF1, RF2) each of latency 2.2/3 ns. Also, the EX stage is split into two stages
(EX1, EX2) each of latency 1 ns. The new design has a total of eight pipeline stages. A program
has 20% branch instructions which execute in the EX stage and produce the next instruction pointer
at the end of the EX stage in the old design and at the end of the EX2 stage in the new design. The
IF stage stalls after fetching a branch instruction until the next instruction pointer is computed. All
instructions other than the branch instruction have an average CPI of one in both the designs. The
execution times of this program on the old and the new design are P and Q nanoseconds,
respectively. The value of P/Q is __________.
Q.44 The memory access time is 1 nanosecond for a read operation with a hit in cache, 5 nanoseconds
for a read operation with a miss in cache, 2 nanoseconds for a write operation with a hit in cache
and 10 nanoseconds for a write operation with a miss in cache. Execution of a sequence of
instructions involves 100 instruction fetch operations, 60 memory operand read operations and 40
memory operand write operations. The cache hit-ratio is 0.9. The average memory access time (in
nanoseconds) in executing the sequence of instructions is __________.
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014
CS
Q.45
The
(A)
(B)
(C)
(D)
Q.46
Wit
giv
(A)
Q.47 The
(A)
Q.48 Let
P(
4
e above sy
0
= uuu
) 001, 010, 0
) 111, 110, 1
) 100, 110, 1
) 100, 011, 0
th respect to
ven, which of
I) The
exa
II) The
the
) I only
e value of the
) 2n
t S be a sam
) denotes th
ynchronous
u. The state se
011
101
111
001
o the numeric
f the followin
e value of K
act value of t
e value of K
definite inte
(B)
e integral giv
(B)
mple space an
he probability
sequential
equence for
cal evaluatio
ng statement
obtained usi
the definite in
obtained us
egral.
II only
ven below is
n
nd two mutu
y of the even
SET-3
circuit bu
this circuit f
on of the defi
ts is/are TRU
ing the trape
ntegral.
ing the Simp
(C)
_ x
2
n
0
cos
(C)
ually exclusi
nt, the maxim
ilt using J
for the next 3
inite integral
UE?
zoidal rule is
psons rule is
Both I and I
s x Jx
n
ive events A
mum value o
CO
JK flip-flop
3 clock cycle
l, K = ] x
2
b
u
s always gre
s always equ
II (D)
(D)
A and B be su
of P(A)P(B
OMPUTER
ps is initia
s is
2
Jx, where o
ater than or e
ual to the exa
Neither I no
2n
uch that A
) is _______
CS
12/14
alized with
o and b are
equal to the
act value of
or II
B = S. If
____.
4
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 13/14
Q.49
Consider the set of all functions : {u,1, ,2u14] {u,1, ,2u14] such that ((i)) = i,
for all u i 2u14. Consider the following statements:
P. For each such function it must be the case that for every i, (i) = i.
. For each such function it must be the case that for some i, (i) = i.
R. Each such function must be onto.
Which one of the following is CORRECT?
(A) P, and R are true
(B) Only and R are true
(C) Only P and are true
(D) Only R is true
Q.50
There are two elements x, y in a group (0,) such that every element in the group can be
written as a product of some number of x's and y's in some order. It is known that
x x = y y = x y x y = y x y x = c
where c is the identity element. The maximum number of elements in such a group is
__________.
Q.51 If 0 is a forest with n vertices and k connected components, how many edges does 0 have?
(A) |nkj (B) |nk] (C) n k (D) n k + 1
Q.52 Let o denote the minimum degree of a vertex in a graph. For all planar graphs on n vertices with
o S, which one of the following is TRUE?
(A) In any planar embedding, the number of faces is at least
n
2
+ 2
(B) In any planar embedding, the number of faces is less than
n
2
+ 2
(C) There is a planar embedding in which the number of faces is less than
n
2
+ 2
(D) There is a planar embedding in which the number of faces is at most
n
6+1
C
S
0
3
(
G
A
T
E
2
0
1
4
)
GATE 2014 SET-3 COMPUTER CS
CS 14/14
Q.53 The CORRECT formula for the sentence, not all rainy days are cold is
(A) d (Rainy(d) Cold(d))
(B) d (Rainy(d) Cold(d))
(C) d (Rainy(d) Cold(d))
(D) d (Rainy(d) Cold(d))
Q.54 Consider the following relational schema:
employee(empId,empName,empDept)
customer(custId,custName,salesRepId,rating)
salesRepId is a foreign key referring to empId of the employee relation. Assume that each
employee makes a sale to at least one customer. What does the following query return?
SELECT empName
FROM employee E
WHERE NOT EXISTS (SELECT custId
FROM customer C
WHERE C.salesRepId = E.empId
AND C.rating <> GOOD);
(A) Names of all the employees with at least one of their customers having a GOOD rating.
(B) Names of all the employees with at most one of their customers having a GOOD rating.
(C) Names of all the employees with none of their customers having a GOOD rating.
(D) Names of all the employees with all their customers having a GOOD rating.
Q.55 Let denote the Exclusive OR (XOR) operation. Let 1 and 0 denote the binary constants.
Consider the following Boolean expression for F over two variables P and Q:
F(P, ) = ((1P)(P)) ((P)(u))
The equivalent expression for F is
(A) P + (B) P +
(C) P (D) P
END OF THE QUESTION PAPER
C
S
0
3
(
G
A
T
E
2
0
1
4
)