100% found this document useful (2 votes)
1K views1,163 pages

Mscs Admission Buet

Uploaded by

KM Nayeem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
1K views1,163 pages

Mscs Admission Buet

Uploaded by

KM Nayeem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1163

About Pearson

Pearson is the world’s learning company, with presence across 70 countries


worldwide. Our unique insights and world-class expertise comes from a long
history of working closely with renowned teachers, authors and thought
leaders, as a result of which, we have emerged as the preferred choice for
millions of teachers and learners across the world.
We believe learning opens up opportunities, creates fulfilling careers and
hence better lives. We hence collaborate with the best of minds to deliver you
class-leading products, spread across the Higher Education and K12 spectrum.
Superior learning experience and improved outcomes are at the heart of
everything we do. This product is the result of one such effort.
Your feedback plays a critical role in the evolution of our products and you
can contact us at [email protected]. We look forward to it.
This page is intentionally left blank
GATE
(Graduate Aptitude Test in Engineering)

Computer Science
and
Information Technology

Trishna Knowledge Systems


Copyright © 2017 Trishna Knowledge System

Published by Pearson India Education Services Pvt. Ltd, CIN: U72200TN2005PTC057128,


formerly known as TutorVista Global Pvt. Ltd, licensee of Pearson Education in South Asia.

No part of this eBook may be used or reproduced in any manner whatsoever without the
publisher’s prior written consent.

This eBook may or may not include all assets that were part of the print version. The publisher
reserves the right to remove any material in this eBook at any time.

ISBN 978-93-528-6846-9
eISBN 978-93-530-6116-6
Head Office: 15th Floor, Tower-B, World Trade Tower, Plot No. 1, Block-C, Sector 16, Noida 201 301,
Uttar Pradesh, India.

Registered Office: 4th Floor, Software Block, Elnet Software City, TS-140, Block 2 & 9,
Rajiv Gandhi Salai, Taramani, Chennai 600 113, Tamil Nadu, India.
Fax:  080-30461003, Phone: 080-30461060
www.pearson.co.in, Email: [email protected]
Contents
Preface  ix
Key Pedagogical Features  x
Syllabus: Computer Science and Information Technology  xii
Chapter-wise Analysis of GATE Previous Years’ Papers  xiii
General Information about Gate  xiv
Solved Papers 2017 xvi
solved PaPers 2018 l i

PART I General Aptitude

PART A  Verbal Ability


Chapter 1  Grammar 1.5
Chapter 2  Vocabulary 1.49
PART B  Numerical Ability

UNIT I  Quantitative Aptitude 1.71


Chapter 1  Simple Equations 1.73
Chapter 2  Ratio-Proportion-Variation 1.79
Chapter 3  Numbers 1.85
Chapter 4  Percentage, Profit and Loss 1.99
Chapter 5  Simple Interest and Compound Interest 1.106
Chapter 6  Average, Mixtures, Alligations 1.112
Chapter 7  Time and Work 1.118
Chapter 8  Time and Distance 1.124
Chapter 9  Indices, Surds, and Logarithms 1.130
Chapter 10  Quadratic Equations 1.136
Chapter 11  Inequalities 1.142
Chapter 12  Progressions 1.146
Chapter 13  Permutations and Combinations 1.151
Chapter 14  Data Interpretation 1.158

UNIT II Reasoning 1.177
Chapter 1  Number and Letter Series 1.179
Chapter 2  Analogies 1.185
Chapter 3  Odd Man Out (Classification) 1.188
Chapter 4  Coding and Decoding 1.191
Chapter 5  Blood Relations 1.195
Chapter 6  Venn Diagrams 1.200
vi | Contents

Chapter 7  Seating Arrangements 1.204


Chapter 8  Puzzles 1.212
Chapter 9  Clocks and Calenders 1.225

PART I1 Engineering Mathematics
Chapter 1  Mathematical Logic 2.237
Chapter 2  Probability 2.250
Chapter 3  Set Theory and Algebra 2.266
Chapter 4  Combinatorics 2.287
Chapter 5  Graph Theory 2.299
Chapter 6  Linear Algebra 2.317
Chapter 8  Calculus 2.333

PART III Computer Science and Information Technology

UNIT  1 Digital Logic 3.351


Chapter 1  Number Systems 3.353
Chapter 2  Boolean Algebra and Minimization of Functions 3.364
Chapter 3  Combinational Circuits 3.384
Chapter 4  Sequential Circuits 3.405

UNIT II Computer Organization and Architecture 3.433


Chapter 1  Machine Instructions, Addressing Modes 3.435
Chapter 2  ALU and Data Path, CPU Control Design 3.448
Chapter 3  Memory Interface, I/O Interface 3.464
Chapter 4  Instruction Pipelining 3.478
Chapter 5  Cache and Main Memory, Secondary Storage 3.490

UNIT III  Programming and Data Structures 3.507


PART A  Programming and Data Structures
Chapter 1  Programming in C 3.509
Chapter 2  Functions 3.520
Chapter 3  Arrays, Pointers and Structures 3.535
Chapter 4  Linked Lists, Stacks and Queues 3.551
Chapter 5  Trees 3.564
Contents  |  vii

PART B  Algorithms
Chapter 1  Asymptotic Analysis 3.585

Chapter 2  Sorting Algorithms 3.601

Chapter 3  Divide and Conquer 3.610

Chapter 4  Greedy Approach 3.618

Chapter 5  Dynamic Programming 3.637

UNIT  1V Databases 3.657


Chapter 1  ER Model and Relational Model 3.659

Chapter 2  Structured Query Language 3.677

Chapter 3  Normalization 3.704

Chapter 4  Transaction and Concurrency 3.719


Chapter 5  File Management 3.736

UNIT V  Theory of Computation 3.753


Chapter 1  Finite Automata and Regular Languages 3.755

Chapter 2  Context Free Languages and Push Down Automata 3.776

Chapter 3  Recursively Enumerable Sets and Turing Machines, Decidability 3.788

UNIT V1 Compiler Design 3.803


Chapter 1  Lexical Analysis and Parsing 3.805

Chapter 2  Syntax Directed Translation 3.828

Chapter 3  Intermediate Code Generation 3.837

Chapter 4  Code Optimization 3.856

UNIT VII Operating System 3.873


Chapter 1  Processes and Threads  3.875

Chapter 2  Interprocess Communication, Concurrency and Synchronization  3.889

Chapter 3  Deadlock and CPU Scheduling 3.907

Chapter 4  Memory Management and Virtual Memory 3.925

Chapter 5  File Systems, I/O Systems, Protection and Security 3.945


viii | Contents

UNIT VIII Networks, Information Systems, Software


Engineering and Web Technology 3.969
Part A  Network
Chapter 1  OSI Layers 3.971
Chapter 2  Routing Algorithms 3.991
Chapter 3  TCP/UDP 3.1003
Chapter 4  IP(V4) 3.1018
Chapter 5  Network Security 3.1032

Part B  Information Systems


Chapter 1  Process Life Cycle 3.1045
Chapter 2  Project Management and Maintenance 3.1055

Part C  Software Engineering and Web Technology


Chapter 1  Markup Languages 3.1077
Preface
Graduate Aptitude Test in Engineering (GATE) is one of the preliminary tests for undergraduate subjects in Engineering/
Technology/Architecture and postgraduate subjects in Science stream only.
The number of aspirants appearing for the GATE examination is increasing significantly every year, owing to multifac-
eted opportunities open to any good performer. Apart from giving the aspirant a chance to pursue an M.Tech. from insti-
tutions like the IITs /NITs, a good GATE score can be highly instrumental in landing the candidate a plush public sector
job, as many PSUs are recruiting graduate engineers on the basis of their performance in GATE. The GATE examination
pattern has undergone several changes over the years—sometimes apparent and sometimes subtle. It is bound to continue
to do so with changing technological environment.
GATE Computer Science and Information Technology, as a complete resource helps the aspirants be ready with con-
ceptual understanding, and enables them to apply these concepts in various applications, rather than just proficiency with
questions type. Topics are handled in a comprehensive manner, beginning with the basics and progressing in a step-by-step
manner along with a bottom-up approach. This allows the student to better understand the concept and to practice applica-
tive techniques in a focused manner. The content has been systematically organized to facilitate easy understanding of all
topics. The given examples will not only help the students to understand the concepts involved in the problems but also help
to get a good idea about the different models of problems on that particular topic. Due care has also been taken to cover a
very wide range of problems including questions that have been appearing over the last few years in GATE examination.
The practice exercises in every chapter, contain questions ranging simple to moderate to difficult level. These exercises are
meant to hone the examination readiness over a period of time. At the end of each unit, practice tests have been placed. These tests
will help the student assess their level of learning on a regular interval.
This book has been prepared by a group of faculty who are highly experienced in training GATE preparations and
are also subject matter experts. As a result, this book would serve as an effective tool for GATE aspirant to crack the
examination.

Salient Features
1. Elaborate question bank covering previous 12 years’ GATE question papers
2. 5 free online mock tests for practice
3. Detailed coverage of key topics
4. Complete set of solved 2017 GATE online papers with chapter-wise analysis
5. Exhaustive pedagogy:
(a)  More than 1300 Solved Examples
(b)  More than 6000 Practice Questions
(c)  Unit-wise time-bound tests
(d)  Modular approach for easy understanding

We would like to thank the below mentioned reviewers for their valuable feedback and suggestions which has helped in
shaping this book.
R. Marudhachalam Professor (Sr. Grade), Kumaraguru College of Technology Coimbatore, Tamil Nadu
Daya Gupta Professor, Delhi Technological University, Main Bawana Road, Delhi
Manoj Kumar Gupta Associate Professor, Delhi Technological University Main Bawana Road, Delhi
Gurpreet Kour Lecturer, Lovely Professional University Phagwara, Punjab
Pinaki Chakraborty Assistant Professor, Netaji Subhas Institute of Technology Dwarka, Delhi
Gunit Kaur Lecturer, Lovely Professional University Phagwara, Punjab

Despite of our best efforts, some errors may have inadvertently crept into the book. Constructive comments and suggestions
to further improve the book are welcome and shall be acknowledged gratefully.
Wishing you all the very best..!!!

—Trishna Knowledge Systems


Chapter 1
Key Pedagogical Features
Number Systems 3.536 | Digital Logic

BCD addition Excess-3 (XS-3) code


• BCD addition is performed by individually adding the Excess-3 code is a non-weighted BCD code, where each
corresponding digits of the decimal number expressed in digit binary code word is the corresponding 8421 code word
Learning Objectives 4-bit binary groups
LEARNING starting from the LSB.
OBJECTIVES plus 0011.
• If there is no carry and the sum term is not an illegal code, Find the XS-3 code of
List of important top- no correction
After is needed.
reading this chapter, you will be able to understand: Example 47: (3)10 → (0011)BCD = (0110)xS3
ics which are covered in • If there is a carry out of one group to the next group or if
• Digital circuits Chapter
•Example
Weighted 2 (16)
48:and Boolean
→ (0001 Algebra
non-weighted codes
0110) and Minimization of Functions | 29
the sum term is an illegal code, the (6)10 is added to the
chapter.
10 BCD
•sum
Number
term system with different
of that group, and thebase
resulting carry is added • Error detection and→correction
(0100 1001)
code
xS3
•toConversion of number systems
the next group. • Sequential, reflective and cyclic codes
Gray code
• Complements Y = (code
• Self complementing A ⋅ B ⋅ AB) = ( A + Bnumber
Each gray code number differs from the preceding ) (A+ B)  ( A ⋅ B = A + B)
Solution: •=Subtraction
{A ⊕43:B44⊕
fExample +B
with12 ⊕ C } ⊕ {A ⊕ C
complement ⊕ B ⊕ A} by a single bit.
0100 0100 (44 in BCD)
• Numeric codes
     = {A ⊕ 0 ⊕ C} ⊕
0001 ⊕inCBCD)
{0(12
0010 ⊕ B} = ( A + BGray
Decimal ) + (Code
A + B) = A ⋅ B + A ⋅ B
0 0000
0101 0110 (56 in BCD)
     =A⊕C⊕C⊕B=A⊕0⊕B=A⊕B = 1A ⋅ B + A0001
⋅ B = A⊕ B
Example 44: 76.9+ 56.6 2 0011

DIGITAL CIRCUITS 0111 0110 . 1001 Example


Example 5: (658)8 = 6 ×3 84:
2
+ 5Simplify
+ 8 × 80 the
× 81 0010 Boolean function A ⊕ A B ⊕ A
0101 0110 . 0110
Computers work with binary numbers, which (all
Solved Examples use are
onlyillegal
the digits Solved
= 384Example
4 + 40 + 8 = 0110
Chapter
(432)10
1 Number Systems | 13
‘0’ and ‘1’. Since all the1100
digital1100 . 1111 are based
components
codes) on binary Solution:
Solved
5
⊕ A Bgiven
Asystem
problems
0111
⊕ A   topic-wise
operations, it is convenient0110 0110
to use binary numbers when analyzing Hexadecimal
. 0110 Binary to gray number
conversion
Example
(A) 11001001 1: Simplify the(B) Boolean
0010
or designing digital circuits. 10011100 function,
0010 . 0101 x y + x′z +
code.y
In z
ForI: example,
hexadecimal
Step Shifttothe learn
number
binary to -6
the system,
base
number number
apply
there 35 will
16the
areposition
one numbers 0be
the rep-
toconcepts
toright,
9, and
(C) 11010101 (D) +1 10101101
+1 +1 (propagate carry)resenteddigits bytheits
from 10 BCH code
to 15 number
are
Associativity
011101.
represented by A to F, respectively. The
LSB of shifted is discarded.
Solution:Number x y + x′Systems
z+ y z 0001 with 0011
Different
0011 .Base
0101 Inbase
learned in a
of hexadecimal number system is 16. particular section as
4. Let r denotes number system’s1radix. The3only value(s) Stepthis numbering
II: Exclusive or the system,
bits = ⊕
of1the the
AB
binary=BCH
A B
number code
with
By using consensus
Decimal number property
system 3 . 5 001001101011
Example
those of the per exam
corresponds
6: (1A5C)
binary number pattern.
= 1 × 16 3
to × 16following
+ Athe
shifted. 2
+ 5 × 16 + C
1
× 16
number 0

of r that satisfy thenumbers


equation 3 (1331) = (11) is/are 16
= 1 × 4096 + 10 × 256 + 5 × 16 + 12 × 1
xy + x′z +Decimal
yzBCD= xy + x′zare usual
subtraction BCDnumbers r which
subtraction r we use in our day-to-
is performed by sub- in base -6 system.
Example 49: Convert (1001)2 to = A
gray+ B
code (
= 4096 + 2560 + 80 + 12 = (6748)10 .
De Morgan’s)
(A) 10 daytracting
life. Thethe
base
digits (B)
of the 11 4-bit
ofdecimal
each number system
group is 10.
of the There are
subtrahend(A) Binary
4651 → 1010 (B) 4562
Y(C)= xy + x′z
ten
10 and 11 numbers 0 to 9.
from the corresponding (D) any r >group
4-bit 3 of the minuend in
Table 1 Different number systems
Binary → 101 ⊕ (D) 1353
(C) Shifted
1153
DecimalExample AB
1111 5: Octal
The value of the nth digit of the number from the right side
binary starting from the LSB. Gray →Binary Hexadecimal
5. Example 2: The
X is 16-bit signed outputThe of 2’s
= nth digit × (base)n–1
number. thecomplement
given circuit repre- is equal to signed 00 010of 11 1010
11. The
Gray to
0 2’s complement 000
CD
representation
0 (-589)
sentation ofExampleX is (F76A)
Example 1: 45:
(99)1042.→The × 10
90100 9 × 10(042 in BCD
2’s1 +complement
0010 repre-
) 1 binary conversion
001 1 1
A 8 × X is
16
= 90 + 9 = 99
in Hexadecimal
(a) Take the number
MSB of thesystem
binary 00 is
number 0 is 0
same 1
as MSB 1of
sentation of −12 −0001 0010 (12 IN BCD) (A) (F24D)
2 010 2
(B)3 (FDB3)16 3
2
→ × × × gray code number.
Example 2: (332) 3 10 + 3 10 + 2 10 01to 0 × × 1bit
2 1 0 16
(No borrow, so this is 3 011
(A) (1460) B16 30 (B)
10
0011(D643) 0000
= 300 + 30 + 2 16the correct difference) (C) (b) (F42D)
X-OR
4 16
the MSB (D)
100of the binary 4 (F3BD)
the next16significant
4
(C) (4460)16 (D) (BB50) 11 × ×5 1 ×
Example 3: (1024)10 → 1 × 103 + 0 ×16102 + 2 × 101 + × 10012. The baseof 5 the gray code.
of the 101 5
Example 46:
= 1000 = 1024 is (c) X-OR thenumber
2nd110bit ofsystem
binary for which the following
6to the 3rd bit 6of Gray code
6. The HEX number (CD.EF)16 in octal + 0number
+ 20 + 4 system
(Borrow
6
66 10 1 0 1 1
247.7 0010 0100 0111 . 0111 to7 is
getto3rd
bebitcorrect
binary and = so13
7on.
are operation
111 7
(A) (315.736) ABinary number (B) (513.637)8
system (d) Continue this1000
till all the
5 gray
8
− 8 10 bits are exhausted.
8
(C) (135.673) 156 . 9 0001
(D) there 0101
(531.367) 0110 . 1001 present,(A) 6 The minimized expression
(B)11 7 to binary for the given K–map is
BIn binary number system, are only
8 8 two digits ‘0’ and ‘1’. Example 9 50: Convert,
1001 gray code 1010 9
Since there are
90.8 0000 0111
only two numbers,
⋅0000 . 1110 subtract(C) 8
its base is 2. (D)12 19
7. 8-bit 2’s complement representation a decimal number 0110) Gray 10 Solution: 1010
1 0AB 0 A
Example 4: (1101)in = 1 × 23 + 1 ×−0100122 + 0 × −210110
+ 1 × 20 11 1011 13 B
is 10000000. The number 2 decimal is 13. The solution 1010
to the 1100
quadratic
⇓ ⊕ || equation
CD ⊕1400
 ||  x||2 - 11x
⊕ 01 11 +10 13 = 0
1000 Corrected
(A) +256 A  B = AB +(B)
= 8 + 4 + 11001 = (13)10 ⋅ 12 C
Solution: AB0 000
(in number system with radix are = x = 4.
difference 13 1100 1101 1 r)
1 15 00
00 x00 D1and 1
2
(C) -128 Octal number system (D) -256 (90.8) Then base = (1100)
14 of the2 number
1110 system 16 is (r) = E
A Octal number system has eight numbers 0 to 7. The base of the × F×
8. The range of signed decimal 1 numbers that can be rep- (A) 7 15 1111 (B)17 0
01 6 1
Exercises B number system is 8. The number (8)10 is represented by (10)8.Exercises
resented by 7-bit 1’s complement representation is (C) 5 (D)
11 ×
4 × 1
(Continued )×

Practice problems for (A) stu-


-64 to +Practice
63 Problems (B) -63 1 to + 63 3 2. Ifcomplement
14.y The 16’s (84)x (in base xofnumberBADA10 system)
is1 is0equal1to (64) 1 y (in
(C) -127 to + 128 (D) -128 to +127 base y number system), then possible values of x and y
dents to master the concepts Directions
Chapter 01.indd 529
for questions 1 to 15: Select the correct alterna-(A) 4525
are
(B) 4526 8/17/2015 8:25:39 PM
tive from the given choices.
Decimal A
studied in chapter. 9.Exercises 54 in hexadecimal and BCD number system is (C) ADAB (A) 12, = 9A + B C (D)(B) 21416, 8
2
1. Assuming all the numbers are in 2’s X OR gate rep-
complement
consist of two levels of prob-B
respectively
resentation, which of the following is divisible by
15. (11A1B) (C)=9,(12CD)
8
12
16
, in the above (D) expression
12, 18 A and B
(A)
lems “Practice Problem I” 63, 10000111 11110110? (B) 36,01010100 represent AExample
3. Letpositive = 1111 digits
1011in 6:
and In
octal the
0000 figure
B = number 1011 system shown,
be two and8-bitC y , y , y will be 1s
2 1 0
(C) 66, 01010100 (A) 11101010(D) 36, 00110110 (B) 11100010 and D have
signed their original meaning
2’s complement
complement numbers.
of x xin Their
Hexadecimal,
x if =
product
z ? in the
2’s
and “Practice Problem II” A  B = AB + (D)
(C) 11111010 AB11100111 values of A and B are?
complement representation is2 1 0
10.diffi
based on increasing A culty
new binary-coded hextary (BCH) number system
is proposed in which everycircuit
digit ofisa ‘0’. base As -6 number (A) 2, 5 (B) 2, 3
level. So the output of above two inputs are same
(C) 3, 2 (D)x03, 5
system is represented by its corresponding 3-bit binary y0
at third gate.
Output of XOR gate with two equal inputs is zero.
Chapter 01.indd 536 x 8/12/2015 12:15:36 PM

Practice Problems 2 \y=0 (A) 11111 (B) 110001 y1


(C) 01111 (D) 10000
Directions
Example for questions to 20: Select
3: The 1circuit shown theincorrect alterna-is functionally
the figure
tive from the given choices. 7. (0.25) in binary number systemx2is?
equivalent to 10
y2
(A) (0.01) (B) (0.11)
1. The hexadecimal representation of (567)8 is
(C) 0.001 (D) 0.101
(A)
A 1AF (B) D77
(C) 177 (D) 133 8. The equivalent of (25)6 in number system
z = with
? base 7
B is?
2. (2326)8 is equivalent to
(A) 22 (B) 23
(A)
A (14D6)16 (B) (103112)4
(C) 24
Solution: We(D) are26using X-OR gate
(C) (1283)10 (D) (09AC)16 ∴ XOR out-put is complement of input only when other
B 9. The operation 35 + 26 = 63 is true in number system
with radix input is high.
3. (0.46) equivalent in decimal is?
8
(A) 0.59375 (B) 0.3534
(A) 7 ∴Z=1 (B) 8
(C) 0.57395
Solution: (D) 0.3435
(C) 9 (D) 11
4. The 15’s complement of (CAFA)16 is Example 7: The output y of the circuit shown is the figure is
A 10. The hexadecimal equivalent of largest binary number
A
(A) (2051)16 (B) (2050)16A · B A
(C) (3506)16 (D) (3505)16 (A + B ) with 14-bits is?
(A)
y=A⊕B 2FFF B (B) 3FFFF
B
above code? What type of values is passed to the called procedure?
(A) 5 (A) l-values
(B) 6 (B) r-values
(C) Text of actual parameters
(C) 8
(D) None of these
(D) 7
19. Which of the following is FALSE regarding a Block?
17. A basic block can be analyzed by (A) The first statement is a leader.
(A) Flow graph (B) Any statement that is a target of conditional / un-
conditional goto is a leader.
(B) A graph with cycles
(C) Immediately next statement of goto is a leader.
(C) DAG
(D) The last statement is a leader.
(D) None of these

previous yeArs’ QuesTions Previous Years’


1. The least number of temporary variables required to
create a three-address code in static single assignment
(A) 5 and 7
(C) 5 and 5
(B) 6 and 7
(D) 7 and 8
Questions
form for the expression q + r/3 + s – t * 5 + u * v/w is 3. Consider the following code segment. [2016] Contains previous 10
________ [2015] x = u – t; years GATE Questions
2. Consider the intermediate code given below. y = x * v;
x = y + w; at end of every chapter
i=1
(1)
y = t – z; which help students to get
(2) j=1
y = x * y; an idea about the type of
(3) t1 = 5 * i
The minimum number of total variables required to con-
(4) t2 = t1 + j
vert the above code segment to static single assignment problems asked in GATE
(5) t3 = 4 * t2 form is _____ . and prepare accordingly.
(6) t4 = t3
4. What will be the output of the following pseudo-
(7) a[t4] = –1 code when parameters are passed by reference and
(8) j=j+1 dynamic scoping is assumed? [2016]
(9) if j < = 5 goto (3) a = 3;
(10) i=i+1
void n(x) { x = x* a; print (x);}
(11) if i < 5 goto (2)
void m(y) {a = 1; a = y – a; n(a) ; print (a)}
The number of nodes and edges in the control-flow-
graph constructed for the above code, respectively, void main( ) {m(a);}
are [2015] (A) 6,2 (B) 6,6
(C) 4,2 (D) 4,4

Answer keys
38 | Digital Logic
exerCises
Practice Problems 1 Hints/solutions Hints/Solutions
1. D 2. D 3. C 4. C 5. B 6. A 7. B 8. A 9. A 10. A This section gives complete
11. B
Practice 12. C
Problems13.
1 A 14. C 15. B Then Z = A + B
Hence, the correct option is (B).
solutions of all the unsolved
1.
Practice Problems0 2
A
A y=1 8. Error → transmits odd number of one’s, for both cases. questions given in the chapter.
1. B 2. B 3. A 4. B 5. B 6. A 7. B 8. C 9. A 10. A
11. B 12. D A 13. A A 14. C 15. C 16. A Hence, 17.theC correct18.
option
B is (A).
19. D The Hints/Solutions are
9. ∑(0, 1, 2, 4, 6) P should contain minterms of each func- included in the CD accompa-
X-ORYears’
Previous of two equal inputs will give you result as zero.
Questions tion of x as well as y nying the book.
1. 8Hence, the
2. B correct option
3. 10 is (B).4. D Hence, the correct option is (B).
2. Positive level OR means negative level AND vice versa 10. AB + ACD + AC
Hence, the correct option is (D). = AB(C + C )( D + D) + A( B + B )CD + A( B + B )C ( D + D)
3. AB⋅CD ⋅ EF ⋅ GH = AB (CD + CD + CD + C D) + ABCD + ABCD +
(De Morgan’s law) = AC ( BD + BD + BD + BD)
= ( A + B ) (C + D ) ( E + F ) (G + ( H )) ABCD + ABCD + ABCD + ABC D + ABCD +
Hence, the correct option is (B).
ABCD + ABCD + ABCD + ABCD
4. AB
A Hence, the correct option is (A).
B Test | 103
AB · B = AB + B (AB + B ) · B = A + B 11. ABCD + ABCD + ABCD + ABCD
Practice Tests = ABC + ABC TesT
Time-bound Test provided at = BC y DigiTal logic
end of each unit for assessment Hence, the correct option is (C). Time: 60 min.
C 12. YZ
of topics leaned in the(ABunit.
+ B ) · C = AC + BC
Directions for questions
WX
30: Select
1 to 01
00 11 10the correct alterna- 9. The number of product terms in the minimized SOP
tive from the given choices. from is
00 1 1
= ( A + B ) + AC + BC 1. What is the range of signed decimal numbers that can 1 0 0 1
01 1 1 1 1
be represented by 4-bit 1’s complement notation? 0 D 0 0
= ( A + C + B ) = ABC (A) –7 to + 7 11 1 (B) –161 to +16 0 0 D 1
Hence, the correct option is (C). (C) –7 to +8 10 1 (D) –151 to +16 1 0 0 1

5. The output should be high when at least two outputs 2. Which


are of the 1 octet + 1 quad
following signed representation have a (A) 2 (B) 4
high y = ABC + ABC + ABC + ABC unique representation
= z + wx of 0? (C) 5 (D) 3
(A) Sign-magnitude (B) 1’s complement
The minimized output Hence, the correct option is (D). 10. The minimum number of 2 input NAND gates needed
(C) 0’s complement (D) 2’s complement
y = AB + AC + BC 13. A AB to implement Z = XY + VW is
3. Find the oddBone out among the following
Hence, the correct option is (A). (A) 2 (B) 3
(A) EBCDIC (B) GRAY P = AB (C) 4 (D) 5
6. f1(x, y, z) x (C) Hamming (D)
A ASCII
x + f3 11. The operation a ⊕ b represents
f2(x, y, z) 4.z)Gray code for number 8 is
f (x, y, Y
(A) 1100 (B) 1111 A + B (A) C ab + a b (B) ab + ab
(C) 1000 (D)
B 1101
f3(x, y, z) (C) ab + ab (D) a − b
5. Find the equivalent
C = ABlogical
⋅(A + Bexpression
) for z = x + xy
12. Find the dual of X + [Y + XZ] + U
x consists of all min terms, so x = 0, and f = f3 (A) z = x y (B) Z = xy
(C) Z = x + y = ( A + B ) ( A + B )
(D) Z = x + y
(A) X + [Y(X + Z)] + U (B) X(Y + XZ)U
f3 (x1 y1 z) = (1, 4, 5) (C) X + [Y(X + Z)]U (D) X [Y(X + Z)]U
AB + AB
6. The number of=distinct Boolean expression of 3 vari-
Hence, the correct option is (A). 13. The simplified form of given function AB + BC + AC is
ables is Hence, the correct option is (A).
7. I J equal to
(A) 256 (B) 16
14. AB (A) AB + AC (B) AC + BC
A (C) 1024 C (D) 65536
Z Boolean expression
(C) AC + BC (D) AB + AC
7. The 0 0 0 for0the 0truth table shown is
14. Simplify the following
1 0 1 0 0
X Y Z F YZ
Traal and error method ⇒ 0 B( A0+ C ) 0( A + C0). WX
1 1 0 1
I = 1, J = B 0
Hence, 0 correct
the 1 option
0 is (A).
1 1 0 1
0 1 0 0
0 0 1 1
0 1 1 1
1 0 0 0 0 0 0 0
Syllabus: Computer Science
and Information Technology
Computer Science and Information Technology
Digital Logic: Boolean algebra. Combinational and sequential circuits. Minimization. Number representations and com-
puter arithmetic (fixed and floating point).

Computer Organization and Architecture: Machine instructions and addressing modes. ALU, data-path and control
unit. Instruction pipelining. Memory hierarchy: cache, main memory and secondary storage; I/O interface (interrupt and
DMA mode).

Programming and Data Structures: Programming in C. Recursion. Arrays, stacks, queues, linked lists, trees, binary
search trees, binary heaps, graphs.

Algorithms: Searching, sorting, hashing. Asymptotic worst case time and space complexity. Algorithm design tech-
niques: greedy, dynamic programming and divide-and-conquer. Graph search, minimum spanning trees, shortest paths.

Theory of Computation: Regular expressions and finite automata. Context-free grammars and push-down automata.
Regular and contex-free languages, pumping lemma. Turing machines and undecidability.

Compiler Design: Lexical analysis, parsing, syntax-directed translation. Runtime environments. Intermediate code
generation.

Operating System: Processes, threads, inter1process communication, concurrency and synchronization. Deadlock. CPU
scheduling. Memory management and virtual memory. File systems.

Databases: ER1model. Relational model: relational algebra, tuple calculus, SQL. Integrity constraints, normal forms.
File organization, indexing (e.g., B and B+ trees). Transactions and concurrency control.
Computer Networks: Concept of layering. LAN technologies (Ethernet). Flow and error control techniques, switch-
ing. IPv4/IPv6, routers and routing algorithms (distance vector, link state). TCP/UDP and sockets, congestion control.
Application layer protocols (DNS, SMTP, POP, FTP, HTTP). Basics of Wi-Fi. Network security: authentication, basics of
public key and private key cryptography, digital signatures and certificates, firewalls.
Chapter-wise Analysis of GATE
Previous Years’ Papers
Subject 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
General Aptitude                      
1 Marks Questions           5 5 5 5 5 5 5 5
2 Marks Questions           5 5 5 5 5 5 6 5
Total Marks           15 15 15 15 15 15 17 15
Engineering Mathematics                      
1 Marks 6 3 4 5 4 6 2 3 5 5 4 5 4
2 Marks 12 11 11 11 6 5 7 3 2 5 6 4 5
Total Marks 30 25 26 27 16 16 16 9 9 15 16 13 14
Theory of Computation                      
1 Marks 0 2 2 3 4 1 3 4 1 5 1 3 2
2 Marks 7 6 5 6 3 3 3 1 2 6 3 3 4
Total Marks 14 14 12 15 10 7 9 6 5 17 7 9 10
Digital Logic                      
1 Marks 4 1 3 4 2 3 3 2 3 3 1 2 2
2 Marks 5 5 5 1 0 2 3 2 1 5 2 1 2
Total Marks 14 11 13 6 2 7 9 6 5 13 5 4 6
Computer Organization and Architecture                      
1 Marks Questions 4 0 2 0 2 1 3 2 1 2 1 2 3
2 Marks Questions 9 7 6 12 4 4 2 4 7 2 2 2 4
Total Marks 22 14 14 24 10 9 7 10 15 6 5 6 11
Programming and Data Structures                      
1 Marks Questions 5 0 1 1 1 3 4 2 2 0 5 2 4
2 Marks Questions 3 6 3 3 3 5 7 6 5 2 3 5 4
Total Marks 11 12 7 7 7 13 18 14 12 4 11 12 12
Algorithm                      
1 Marks Questions 2 8 3 2 3 1 1 4 5 1 4 4 2
2 Marks Questions 10 7 12 15 6 3 0 2 3 2 4 5 2
Total Marks 22 22 27 32 15 7 1 8 11 5 12 14 6
Compiler Design                      
1 Marks Questions 1 1 1 2 1 2 1 1 2 1 2 1 2
2 Marks Questions 5 5 5 2 0 1 0 3 2 2 1 1 1
Total Marks 11 11 11 6 1 4 1 7 6 5 4 3 4
Operating System                      
1 Marks Questions 0 1 2 2 2 3 3 1 1 0 2 1 2
2 Marks Questions 2 8 6 5 5 2 2 3 1 2 2 4 2
Total Marks 4 17 14 12 12 7 7 7 3 4 6 9 6
Database                      
1 Marks Questions 3 1 0 1 0 3 0 3 1 3 1 3 2
2 Marks Questions 4 4 6 5 5 2 3 3 4 2 2 1 3
Total Mark 11 9 12 11 5 7 6 9 9 7 5 5 8
Computer Networks                      
1 Marks Questions 5 1 2 1 0 2 5 3 4 4 2 2 2
2 Marks Questions 2 5 6 4 5 3 2 3 2 2 3 4 3
Total Marks 9 11 14 9 5 8 9 9 8 8 8 10 8
Software Engineering                      
1 Marks Questions         1 0 1 0 0 1 1
2 Marks Questions         0 0 0 0 1 0 1
Total Marks         1 0 1 0 2 1 3
Web Technology                      
1 Marks Questions         1 0 1 0 0 0 1
2 Marks Questions         0 0 0 0 0 0 1
Total Marks         1 0 1 0 0 0 3
General Information about GATE
Structure of GATE
The GATE examination consists of a single online paper of 3-hour duration, in which there will be a total of 65 questions
carrying 100 marks out of which 10 questions carrying a total of 15 marks are in General Aptitude (GA).

Section Weightage and Marks


70% of the total marks is given to the technical section while 15% weightage is given to General Aptitude and Engineering
Mathematics each.
Weightage Questions (Total 65)
Respective 70 Marks 25—1markques-
EngineeringBranch tions30—2mark
EngineeringMaths 15 Marks questions

General Aptitude 15 Marks 5—1 mark ques-


tions 5—2 mark
questions

Particulars
For 1-mark multiple-choice questions, 1/3 marks will be deducted for a wrong answer. Likewise, for 2-mark ­multiple-choice
questions, 2/3 marks will be deducted for a wrong answer. There is no negative marking for numerical answer type questions.

Question Types
1. Multiple Choice Questions (MCQ) carrying 1 or 2 marks each in all papers and sections. These questions are
objective in nature, and each will have a choice of four answers, out of which the candidate has to mark the correct
answer.
2. Numerical Answer carrying 1 or 2 marks each in all papers and sections. For numerical answer questions, choices
will not be given. For these questions the answer is a real number, to be entered by the candidate using the virtual
keypad. No choices will be shown for this type of questions.

Design of Questions
The fill in the blank questions usually consist of 35%– 40% of the total weightage.
The questions in a paper may be designed to test the following abilities:
1. Recall: These are based on facts, principles, formulae or laws of the discipline of the paper. The candidate is expected
to be able to obtain the answer either from his/her memory of the subject or at most from a one-line computation.
2. Comprehension: These questions will test the candidate’s understanding of the basics of his/her field, by requiring
him/her to draw simple conclusions from fundamental ideas.
3. Application: In these questions, the candidate is expected to apply his/her knowledge either through computation or
by logical reasoning.
4. Analysis and Synthesis: In these questions, the candidate is presented with data, diagrams, images etc. that require
analysis before a question can be answered. A Synthesis question might require the candidate to compare two or
more pieces of information. Questions in this category could, for example, involve candidates in recognising unstated
assumptions, or separating useful information from irrelevant information.

About Online Pattern


The examination for all the papers will be carried out in an ONLINE Computer Based Test (CBT) mode where the candi-
dates will be shown the questions in a random sequence on a computer screen. The candidates are required to either select
the answer (for MCQ type) or enter the answer for numerical answer-type question using a mouse on a virtual keyboard
(keyboard of the computer will be disabled). The candidates will also be allowed to use a calculator with which the online
portal is equipped with.
Important Tips for GATE
The followings are some important tips which would be helpful for students to prepare for GATE exam
1. Go through the pattern (using previous year GATE paper) and syllabus of the exam and start preparing accordingly.
2. Preparation time for GATE depends on many factors, such as, individual’s aptitude, attitude, fundamentals,
concentration level etc., Generally rigorous preparation for 4 to 6 months is considered good but it may vary from
student to student.
3. Make a list of books which cover complete syllabus, contains solved previous year questions and mock tests for
practice based on latest GATE pattern. Purchase these books and start your preparation.
4. Make a list of topics which needs to be studied and make priority list for study of every topic based upon the marks
for which that particular topic is asked in GATE exam. Find out the topics which fetch more marks and give more
importance to those topics. Make a timetable for study of topics and follow the timetable strictly.
5. An effective way to brush up your knowledge about technical topics is group study with your friends. During group
study you can explore new techniques and procedures.
6. While preparing any subject highlight important points (key definitions, equations, derivations, theorems and laws)
which can be revised during last minute preparation.
7. Pay equal attention to both theory and numerical problems. Solve questions (numerical) based on latest exam pattern
as much as possible, keeping weightage of that topic in mind. Whatever topics you decide to study, make sure that
you know everything about it.
8. Try to use short-cut methods to solve problems instead of traditional lengthy and time consuming methods.
9. Go through previous year papers (say last ten years), to check your knowledge and note the distribution of different
topics. Also analyze the topics in which you are weak and concentrate more on those topics. Always try to solve
papers in given time, to obtain an idea how many questions you are able to solve in the given time limit.
10. Finish the detail study of topics one and a half month before your exam. During last month revise all the topics once
again and clear leftover doubts.
GATE 2017 Solved Paper
CS: Computer Science and Information Technology
Set – 1
Number of Questions: 65 Total Marks:100.0

Wrong answer for MCQ will result in negative marks, (-1/3) for 1 Mark Questions and (-2/3) for 2 Marks Question.

Computer Science & Engineering


Number of Questions: 55 Section Marks: 85

Q.1 to Q.25 carry 1 mark each and Q.26 to Q.55 carry 2 ∴ F: ∀ x (∃ y R (x, y)) implies ∃ y (∃ x R (x, y))
marks each. ∴ I is implied by F: ∀ x (∃ y R (x, y))
Question Number: 1  Question Type: MCQ
Hence, the correct option is (B).
The statement (¬p) ⇒ (¬q) is logically equivalent to which
of the statements below? Question Number: 3  Question Type: MCQ
     I. p ⇒ q n

  II. q ⇒ p Let c1,…,cn be scalers, not all zero, such that ∑c a i i =0


III. (¬ q) ∨ p where ai are column vectors in Rn. i =1

    IV. (¬ p) ∨ q Consider the set of linear equations


(A) I only (B) I and IV only Ax = b
(C) II only (D) II and III only
n
Solution:  We have (¬ p) ⇒ (¬ q) Where A = [a1,…,an] and b = ∑ ai . The set of equations
≡q⇒p has i =1

( An implication and its contra positive are equivalent) (A) a unique solution at x = Jn where Jn denotes a
∴II is equivalent to (¬ p) ⇒ (¬ q) n-dimensional vector of all 1
Also, (¬ p) ⇒ (¬ q) ≡ q ⇒ p (B) no solution
≡ (¬ q) ∨ p ( A ⇒ B ≡ ¬ A ∨ B) (C) infinitely many solutions
∴ III is equivalent to (¬ p) ⇒ (¬ q) (D) finitely many solutions
Hence, the correct option is (D). Solution:  As a1 , a2 ,...., an are column vectors, such that
Question Number: 2  Question Type: MCQ n

Consider the first-order logic sentence F:∀x(∃yR(x,y)). ∑ c a = 0 for some set of scalars c , c ,...., c
i=1
i i 1 2 n not all zero,
Assuming non-empty logical domains, which of the sen-
tences below are implied by F? a1 , a2 ,...., an are linearly dependent.
    I. ∃y(∃xR(x,y)) ∴ The rank of the matrix A = [ a1 , a2 , a3 ...., an ] is less
  II. ∃y(∀xR(x,y)) than n.
III. ∀y(∃xR(x,y)) n
Also, given that b = ∑ ai
    IV. ¬∃x(∀y ¬R(x,y)) i=1
(A) IV only (B) I and IV only Consider the set of linear equations:
(C) II only (D) II and III only
 
Solution:  Given F: ∀ x (∃ y R (x, y)) AX = b  x1 
 x2 
≡ [¬(¬(∀ x (∃ y R (x, y)))] ( p ≡ ¬ p)  
≡ [¬ (∃ x (¬(∃ y R (x, y))))] ( ¬ ((∀ t) P (t)) ≡ ∃ t i.e., [ a1 , a2 ,...., an ] .  = b (1)
(¬ P (t))) . 
 
≡ [¬ (∃ x (∀ y ¬ R (x, y)))] ( ¬ (∃ t P (t)) ≡ ∀ t ¬  
 xn 
P (t))
∴ IV is implied by F. By taking x1 = x2 ..... = xn = 1, equation (1) is satisfied
Also, F : ∀ x (∃ y R (x, y)) implies ∃ x (∃ y R (x, y)) (∀ x As AX = b has a solution and rank of A is less than n (= The
(∃ y P (x, y) implies ∃ x (∃ y P (x, y)) number of unknowns), AX = b has infinitely many solutions.
Also, ∃ x (∃ y R (x, y)) implies ∃ y (∃ x R (x, y)) Hence, the correct option is (C).
GATE 2017 Solved Paper CS: Set – 1  |  xvii

Question Number: 4 Question Type: MCQ Note: The height of a tree with a single node is 0.
Consider the following functions from positive integers to (A) 4 and 15 respectively
real numbers: (B) 3 and 14 respectively
100 (C) 4 and 14 respectively
10, n , n, log2 n, . (D) 3 and 15 respectively
n
The CORRECT arrangement of the above functions in Solution:  Binary Search Tree (BST) with 15 nodes, the
increasing order of asymptotic complexity is: minimum height possible, when it is complete BST, which
is of height 3.
100
log 2 n,
(A) ,10, n, n
n
100
(B) ,10, log 2 n, n , n
n
100
10,
(C) , n , log 2 n, n
n
100
(D) , log 2 n, 10, n , n
n

100
Solution:  10, n , n, log n2 ,
n
According to dominance ranking, for large values of ‘n’ in-
creasing order of asymptotic complexity is Maximum height is possible when BST is either left
skewed or right skewed, which is of height 14.
100
, 10, log 2 n , n , n Hence, the correct option is (B).
n
Hence, the correct option is (B). Question Number: 7 Question Type: MCQ
The n-bit fixed-point representation of an unsigned real
Question Number: 5 Question Type: MCQ number X uses f bits for the fraction part. Let i = n − f. The
Consider the following table: range of decimal values for X in this representation is
Algorithms Design Paradigms (A) 2− f to 2i (B) 2− f to (2i − 2− f)
(P) Kruskal (i) Divide and Conquer
(C) 0 to 2
i
(D) 0 to (2i − 2− f)
(Q) Quicksort (ii) Greedy Solution:  Given fixed-point representation has the form.
(R) Floyd-Warshall (iii) Dynamic Programming
n-bits
Match the algorithms to the design paradigms they are integral fraction
based on.
(A) (P) ↔ (ii), (Q) ↔ (iii), (R) ↔ (i) i f
(B) (P) ↔ (iii), (Q) ↔ (i), (R) ↔ (ii)
These numbers are in unsigned form.
(C) (P) ↔ (ii), (Q) ↔ (i), (R) ↔ (iii)
(D) (P) ↔ (i), (Q) ↔ (ii), (R) ↔ (iii) The least number possible is 0.00 …. 0 (last bit of fraction
is 1). = 0
Solution: The design strategy for Kruskals algorithm is
greedy method. The largest number possible is 1111 ….. 1.1111 …. 1
Quick sort is implemented using Divide and Conquer strat- (i 1’s in integral and f 1’s in fractional part).
egy. The range of integral part is 2i −1 (for unsigned).
Floyd-warshall algorithm is implemented using dynamic
programming. 1 1 1
The range of fraction part is + 2 + ..... + f = 1 − 2−f
2 2 2
Hence, the correct option is (C).
∴ The highest number possible is 2i −1 + 1− 2− f = 2i − 2-f
Question Number: 6 Question Type: MCQ
Let T be a binary search tree with 15 nodes. The minimum ∴ Required range is 0 to 2i − 2-f
and maximum possible heights of T are: Hence, the correct option is (D).
xviii | GATE 2017 Solved Paper CS: Set – 1

Question Number: 8 Question Type: MCQ Which one of the following represents the language gener-
Consider the C code fragment given below. ated by the above grammar?
(A) {(ab)n(cb)n | n ≥ 1}
typedef struct node {
{( ab ) cb 1 cb 2 …cb n | n, m1 , m2 ,…, mn ≥ 1}
n m m m
(B)
int data;
node* next; (C) {(ab)n(cbm)n | m, n ≥ 1}
} node; (D) {(ab)n(cbn)m | m, n ≥ 1}
void join (node* m, node* n) { Solution:  Given grammar
node* p = n;
S → abScT | abcT
while (p − >next != NULL) {
T → bT | b
p = p − >next;
The strings of this grammar are,
}
p − >next = m; 1. S → abcT
} → abcb
Assuming that m and n point to valid NULL-terminated 2. S → abcT
linked lists, invocation of join will → abcbT
(A) append list m to the end of list n for all inputs.
→ abcbb
(B) either cause a null pointer dereference or append
list m to the end of list n. 3. S → ab ScT
(C) cause a null pointer dereference for all inputs. → ab abcTcT
(D) append list n to the end of list m for all inputs. → ab ab cb cb
Solution:  The above code appends list m to the end of list n 4. S → abScT
(or) it may cause null pointer dereference error which may → ab ab cTcT
leads to segmentation fault, it happens when a page fault → ab abc bT cbT
handler fails. → ab ab cbbT cbb
Hence, the correct option is (B). → ab ab cb bb cbb

Question Number: 9 Question Type: MCQ {


Choice (A ): (ab) (cb) n ≥ 1
n n
}
When two 8-bit numbers A7… A0 and B7… B0 in 2’s comple-
ment representation (with A0 and B0 as the least significant This generates equal number of ‘ab’ and ‘cb’’s. So, this is
bits) are added using a ripple-carry adder, the sum bits not equivalent to given grammar.
obtained are S7…S0 and the carry bits are C7…C0. An over-
flow is said to have occurred if
{ n
}
Choice (B): (ab) cb 1 cb 2 .....cb n n, m1 , m2 ,..., mn ≥ 1
m m m

This generates strings like


(A) the carry bit C7 is 1
(B) all the carry bits (C7,…,C0) are 1 abcb m1 (m1 ≥ 1), ababcb m1 cb m2 (m1 , m2 ≥ 1) .
(C) ( A7 ⋅ B7 ⋅ S7 + A7 ⋅ B7 ⋅ S7 ) is 1 ∴ This is equivalent to given grammar.
( A0 ⋅ B0 ⋅ S0 + A0 ⋅ B0 ⋅ S0 ) is 1
(D)
{
Choice (C): (ab) (cb m ) m, n ≥ 1 .
n n
}
Solution:  Overflow occurs only when This generates strings like
A7:1 A7:0
abcb m (m ≥ 1) , abab (cb m ) (m ≥ 1) .
2

B7:1 (or) B7:0


S7:0 S7:1 (This cannot generate the strings like ab ab cbb cb).
Choice (D): This generates strings of the form ab cb cb, ab
∴ Overflow condition is given as
ab cbb.
A7 B7 S 7 + A7 B 7 S7 . Hence, the correct option is (B).
Hence, the correct option is (C).
Question Number: 11 Question Type: MCQ
Question Number: 10 Question Type: MCQ Consider the C struct defined below:
Consider the following context-free grammar over the struct data {
alphabet Σ = {a, b, c} with S as the start symbol: int marks [100];
S → abScT | abcT char grade;
T → bT | b
GATE 2017 Solved Paper CS: Set – 1  |  xix

int cnumber; }
}; void main ( ) {
struct data student; int *x = malloc (sizeof (int));
The base address of student is available in register R1. if (NULL == x) return;
The field student.grade can be accessed efficiently x = assignval (x, 0);
using if (x) {
(A) Post-increment addressing mode, (R1)+ x = (int *) malloc (sizeof
(B) Pre-decrement addressing mode, − (R1) (int));
(C) Register direct addressing mode, R1 if (NULL == x) return;
(D) Index addressing mode, X(R1), where X is an off- x = assignval (x, 10);
set represented in 2’s complement 16-bit represen- }
tation. printf(“%d\n”, *x);
free (x);
Solution:  Student grade can be accessed efficiently using
}
index addressing mode.
The code suffers from which one of the following problems:
X (R1) (A) compiler error as the return of malloc is not type-
R1 is base address of student. cast appropriately
X is an offset. (B) compiler error because the comparison should be
made as x == NULL and not as shown
The effective address of student grade is (C) compiles successfully but execution may result in
 X  dangling pointer
R1 + [(100) × size of (int )] (D) compiles successfully but execution may result in
memory leak
Hence, the correct option is (D).
Solution: The above program compiles successfully, but
Question Number: 12 Question Type: MCQ
the execution may result in the memory leak.
Consider the following intermediate program in three Hence, the correct option is (D).
address code
p=a−b Question Number: 14 Question Type: MCQ
q=p*c Consider a TCP client and a TCP server running on two
p=u*v different machines. After completing data transfer, the TCP
client calls close to terminate the connection and a FIN seg-
q=p+q
ment is sent to the TCP server. Server-side TCP responds
Which one of the following corresponds to a static single by sending an ACK, which is received by the client-side
assignment form of the above code? TCP. As per the TCP connection state diagram (RFC 793),
(A) p1 = a − b (B) p3 = a − b in which state does the client-side TCP connection wait for
q1 = p1 * c q4 = p3 * c the FIN from the server-side TCP?
p1 = u * v p4 = u * v (A) LAST-ACK
q1 = p1 + q1 q5 = p4 + q4 (B) TIME-WAIT
(C) p1 = a − b (D) p1 = a − b (C) FIN-WAIT-1
q1 = p2 * c q1 = p * c (D) FIN-WAIT-2
p3 = u * v p2 = u * v
q2 = p4 + q3 q2 = p + q Solution:  Fin-wait-1 state sends a segment, at which
close-wait state sends an ACK to the Fin-wait-2 state.
Solution:  In static single assignment, each assignment to a
Hence, the correct option is (D).
temporary variable is given a unique name and all the uses
reached by that assignment are renamed. Option (B) gives Question Number: 15 Question Type: MCQ
the static single assignment form for the above code.
A sender S sends a message m to receiver R, which is digi-
Hence, the correct option is (B). tally signed by S with its private key. In this scenario, one
Question Number: 13 Question Type: MCQ or more of the following security violations can take place.
(I) S can launch a birthday attack to replace m with a
Consider the following C code:
fraudulent message.
# include <stdio.h> (II) A third party attacker can launch a birthday attack to
int *assignval (int *x, int val) { replace m with a fraudulent message.
*x = val; (III) R can launch a birthday attack to replace m with a
return x; fraudulent message.
xx | GATE 2017 Solved Paper CS: Set – 1

Which of the following are possible security violations? Question Number: 17 Question Type: MCQ
(A) (I) and (II) only Consider the following grammar:
(B) (I) only
(C) (II) only P → xQRS
(D) (II) and (III) only Q → yz | z
Solution:  Sender can launch a birthday attack, which re- R→w |ε
places the message ‘m’ with fraud message. S→y
Hence, the correct option is (B).
What is FOLLOW (Q)?
Question Number: 16 Question Type: MCQ (A) {R} (B) {w}
The following functional dependencies hold true for the (C) {w, y} (D) {w, $}
relational schema R {V, W, X, Y, Z}:
Solution:  Consider the grammar given
V →W
P→xQRS
VW → X
Q→yz|z
Y → VX
R→w|ε
Y→Z
S→y
Which of the following is irreducible equivalent for this set
of set of functional dependencies? Follow (Q) = First (RS)
(A) V → W (B) V →W = First (R) – {ε} ∪ first (S)
V → X W→X = {w} ∪ {y}
Y → V Y →V
Y → Z Y→Z = {w, y}
(C) V → W (D) V →W Hence, the correct option is (C).
V → X W→X
Y → V Y →V Question Number: 18 Question Type: MCQ
Y → X Y→X Threads of a process share
Y → Z Y→Z (A) global variables but not heap.
Solution:  Given FD’s : (B) heap but not global variables.
(C) neither global variables nor heap.
V→W (D) both heap and global variables.
VW → X Solution:  Each program has 4 segments: Stack, Data,
Y → VX Code, Heap.
Y→Z All the threads of a process share all the segments except
the stack. Global variables are stored in heap. So, threads of
Using pseudotransitive rule, {V → W, VW → X} | = V → X.
a process share both heap and global variable.
Using projection rule, {Y → VX}| = Y → V, Y → X.
Hence, the correct option is (D).
∴ Equivalent set of FD’s for given FD’s is
Question Number: 19 Question Type: NAT
V→W
V→X Let X be a Gaussian random variable with mean 0 and vari-
ance σ2. Let Y = max (X, 0) where max (a, b) is the maxi-
Y→V
mum of a and b. The median of Y is .
Y→X
Y→Z Solution:  Given that X is a Gaussian random variable
Irreducible equivalent set of FD’s is Also given, mean of X = 0
Variance of X = s2
V→W
We know that in Gaussian distribution,
V→X
Mean = Median
Y→V  0; if X  0
Y→Z Given Y = max. (X, 0) = 
 X ; if X > 0
( X can be derived from either V or Y, so remove Y → X).
Hence, the median of Y = Median of X = 0
Hence, the correct option is (A). Hence, the correct answer is (0).
GATE 2017 Solved Paper CS: Set – 1  |  xxi

Question Number: 20 Question Type: NAT


Let T be a tree with 10 vertices. The sum of the degrees of c +a
all the vertices in T is _______ = ca
Solution:  Number of vertices (V) for given tree T is 10. Hence, we need one NOR gate.
Numbers of regions (R) for a tree is 1. Hence, the correct answer is (1).
we have Question Number: 22 Question Type: NAT
R=E–V+2 Consider the language L given by the regular expression (a
For the above tree, numbers of vertices are 10, + b)*b (a + b) over the alphabet {a, b}. The smallest num-
1 = E – 10 + 2 ber of states needed in a deterministic finite-state automaton
E=9 (DFA) accepting L is ________.
Sum of all degrees of all vertices are twice the number of Solution:  Given regular expression:
edges, i.e., 18
R = (a + b) * b (a + b)
Hence, the correct answer is (18).
The NFA for given R is
Question Number: 21 Question Type: NAT
a, b
Consider the Karnaugh map given below, where X repre-
sents “don’t care” and blank represents 0. b a, b
1 2 3
ba
00 01 11 10
dc The DFA equivalent to this NFA is
00
X X q\δ a b
A{1} {1} {1, 2}
01 1 X
B{2} {3} {3}
C{3} φ φ
11 1 1 D{1, 2} {1, 3} {1, 2, 3}
E{1, 3} {1} {1, 2}
X X
10 F{1, 2, 3} {1, 3} {1, 2, 3}

Assume for all inputs (a, b, c, d), the respective comple-


ments (a , b, c , d ) are also available. The above logic is a a
implemented using 2-input NOR gates only. The minimum b a
number of gates required is ________. A D E
Solution:
b b
ba
bc 00 01 11 10
a
00 X X 1 F

01 1 X

b
11 1 1
(B, C states are not reachable from initial state).
10 X X
Hence, the correct answer is (4).

Simplified expression is ca Question Number: 23 Question Type: NAT


Consider a database that has the relation schema EMP
a (EmpId, EmpName and DeptName). An instance of the
schema EMP and a SQL query on it are given below.
c
xxii | GATE 2017 Solved Paper CS: Set – 1

EMP
EmpId EmpName DeptName
1 XYA AA
2 XYB AA
SELECTIVE AVG ( EC.Num )
3 XYC AA
4 XYD AA FROM EC
5 XYE AB WHERE ( DeptName, Num ) IN
6 XYF AB (SELECT DeptName, COUNT ( EmpId ) AS
7 XYG AB
EC ( DeptName, Num )
8 XYH AC
FROM EMP
9 XYI AC
GROUP BY DeptName)
10 XYJ AC
11 XYK AD
12 XYL AD
13 XYM AE

The output of executing the SQL query is ______.


P1 P1 P1 P2 P2 P2 P4 P4 P1 P1 P1 P1 P3
Solution:  Based on given query EC table has Dept Name, 0 1 2 3 4 5 6 7 8 9 10 11 12 13
Count (EMPID) from EMP Table.
P3 :5
EC P1 :4
P2 :1
P3 :5
P1 : 4
P3 : 5 P4 : 2
Dept Name Num P2 : 3
P1 : 4
AA 4
AB 3 Waiting time of P1 = 5
AC 3
Waiting time of P2 = 0
AD 2
Waiting time of P3 = 12 − 5 = 7
AE 1
Waiting time of P4 = 0
4 + 3 + 3 + 2 +1
Average (EC. Num) = ∴ Average waiting time = 5 + 7 = 3
5 4
13 Hence, the correct answer is (3).
=
5
= 2.6 Question Number: 25 Question Type: NAT
Consider a two-level cache hierarchy with L1 and L2 caches.
Hence, the correct answer is (2.6).
An application incurs 1.4 memory accesses per instruction
Question Number: 24 Question Type: NAT on average. For this application, the miss rate of L1 cache is
Consider the following CPU processes with arrival times 0.1; the L2 cache experiences on average 7 misses per 1000
(in milliseconds) and length of CPU bursts (in millisec- instructions. The miss rate of L2 expressed correct to two
onds) as given below : decimal places is .

Process Arrival time Burst time Number of misses


Solution:  Miss rate =
P1 0 7 Total number of accesses
P2 3 3 7
=
P3 5 5 1000×1.4
P4 6 2 = 0.05
If the pre-emptive shortest remaining time first scheduling Hence, the correct answer is (0.05).
algorithm is used to schedule the processes, then the aver- Question Number: 26 Question Type: MCQ
age waiting time across all processes is milliseconds.
Let G = (V,E) be any connected undirected edge-weighted
Solution:  For the given processes using preemptive SRTF, graph. The weights of the edges in E are positive and dis-
the Gantt chart will be as below: tinct. Consider the following statements:
GATE 2017 Solved Paper CS: Set – 1  |  xxiii

(I) Minimum spanning Tree of G is always unique. minimum value of y together for which execution of P can
(II) Shortest path between any two vertices of G is always result in a deadlock are:
unique. (A) x = 1, y = 2 (B) x = 2, y = 1
Which of the above statements is/are necessarily true? (C) x = 2, y = 2 (D) x = 1, y = 1
(A) (I) only Solution:  As the non reentrant locks not allow a thread to
(B) (II) only reacquire the lock, so only one thread and only one lock can
(C) both (I) and (II) lead to deadlock, if it tries to reacquire the lock.
(D) neither (I) nor (II) Hence, the correct option is (D).
Solution: Question Number: 28 Question Type: MCQ
• When the edge weights of a graph ‘G’ are unique, then x 7 − 2 x5 +1
The value of lim 3
the minimum spanning tree for graph ‘G’ is unique. x →1 x − 3 x 2 + 2

• Shortest path between any 2 vertices of graph may not


(A) is 0
be always unique.
(B) is −1
Consider the following graph with above scenario. (C) is 1
1 (D) does not exist
A B x7 − 2 x5 + 1
Solution:  We have lim
x→1 x3 − 3x 2 + 2
3 2
4 7 x 6 −10 x 4
= lim  (By L’ Hospital’s Rule)
x→1 3 x 2 − 6 x

7 −10
D
5
C =
3− 6
The MST for the above graph ‘G’ is =1
1 Hence, the correct option is (C).
A B
Question Number: 29 Question Type: MCQ
Let p, q, and r be propositions and the expression (p
4 2 → q)→ r be a contradiction. Then, the expression
(r → p)→ q is
(A) a tautology
D C (B) a contradiction.
(C) always TRUE when p is FALSE.
The shortest path from vertex A to C is given by two paths. (D) always TRUE when q is TRUE.
i.e.,
Solution:  Given that (p → q) → r is a contradiction.
1 2
A B C
This is possible only when p → q is TRUE and r is FALSE.
p → q is TRUE only when p and q can have any combina-
tion of truth values except p is TRUE and q is FALSE.
Consider the expression, (r → p) → q
3
A C As r is FALSE, r → p is always TRUE.
∴ (r → p) → q is TRUE when q is TRUE and (r → p) → q
Hence, the correct option is (A). is FALSE when q is FALSE.
Question Number: 27 Question Type: MCQ So, (r → p) → q is always TRUE when q is TRUE.
A multithreaded program P executes with x number of Hence, the correct option is (D).
threads and uses y number of locks for ensuring mutual Question Number: 30 Question Type: MCQ
exclusion while operating on shared memory locations. All
Let u and v be two vectors in R whose Euclidean norms
2
locks in the program are non-reentrant, i.e., if a thread holds
satisfy ||u||= 2||v||. What is the value of α such that w = u +αv
a lock l, then it cannot re-acquire lock l without releasing
bisects the angle between u and v?
it. If a thread is unable to acquire a lock, it blocks until the
(A) 2 (B) 1/2
lock becomes available. The minimum value of x and the
(C) 1 (D) −1/2
xxiv | GATE 2017 Solved Paper CS: Set – 1

Solution:  For two vectors u and v, || u || = 2 || v || x3 + x + 1 as the generator polynomial to generate the check
⇒ u and 2v will have the same length. bits. In this network, the message 01011011 is transmitted
as
We know that if two vectors v1 and v2 have the same length, (A) 01011011010 (B) 01011011011
then v1 + v2 bisects the angle between v1 and v2. (C) 01011011101 (D) 01011011100
As || u || = 2|| v ||, u + 2v bisects the angle between the vec-
tors u and 2v. Solution:  Given polynomial generator as x3 + x + 1, then
generator will be 1011.
Also, we know that the angle between u and v is same as the Given data = 01011011
angle between u and 2v.
Message transmitted will be:
So, u + 2v bisects the angle between the vectors u and v.
∴ W = u + α v bisects the angle between u and v when α 1011 01011011000 01000011
= 2. 0000
1011
Hence, the correct option is (A). 1011
Question Number: 31 Question Type: MCQ 00000
0000
0001
Let A be n × n real valued square symmetric matrix of rank 0000
n n 0011
2 with ∑∑ A
i =1 j =1
2
ij = 50 . Consider the following statements. 0000
0110
0000
(I) One eigenvalue must be in [−5, 5] 1100
1011
(II) The eigenvalue with the largest magnitude must be 1110
strictly greater than 5 1101
101
Which of the above statements about eigenvalues of A is/are
necessarily CORRECT? The transmitted message is 01011011101.
(A) Both (I) and (II)
(B) (I) only Hence, the correct option is (C).
(C) (II) only
Question Number: 33 Question Type: MCQ
(D) Neither (I) nor (II)
Consider a combination of T and D flip-flops connected as
Solution:  Case (i):- shown below. The output of the D flip-flop is connected to
the input of the T flip-flop and the output of the T flip-flop is
Let n > 2.
connected to the input of the D flip-flop.
∴ P(A) = 2 < order of A.
⇒ A is a singular matrix.
⇒ O is an eigen value of A and 06[-5, 5]
Q1
∴ I is correct. T
Q0
D
Filp-
5 0 0  Flop
Filp-

Also for A = 0 0 0  , none of the eigen values have


 Flop

0 0 −5
magnitude not greater than 5.
Clock
So, II is not correct.
Case (II):- Let n = 2 Initially, both Q0 and Q1 are set to 1 (before the 1st clock
 −5 0  cycle). The outputs
Consider the matrix B =  
 0 5 (A) Q1 Q0 after the 3rd cycle are 11 and after the 4th
Clearly the eigen values of B lie in [-5, 5]. cycle are 00 respectively
But none of its eigen values have magnitude greater than 5. (B) Q1 Q0 after the 3rd cycle are 11 and after the 4th
cycle are 01 respectively
Hence, the correct option is (B).
(C) Q1 Q0 after the 3rd cycle are 00 and after the 4th
Question Number: 32 Question Type: MCQ cycle are 11 respectively
A computer network uses polynomials over GF(2) for (D) Q1 Q0 after the 3rd cycle are 01 and after the 4th
error checking with 8 bits as information bits and uses cycle are 01 respectively
GATE 2017 Solved Paper CS: Set – 1  |  xxv

Solution: Question Number: 35 Question Type: MCQ


Consider the following two functions.
void fun1 (int n) { void fun2 (int n) {
if (n == 0) return; if (n == 0) return;
Q1 Q0
T D printf (“%d”, n); printf (“%d”, n);
FF FF fun2 (n − 2) ; fun1(++n)
printf (“%d”, n); printf (“%d”, n);
} }

Clock The output printed when fun1 (5) is called is

present state next state (A) 53423122233445 (B) 53423120112233


Q1 Q0 Q1 +
Q0 + (C) 53423122132435 (D) 53423120213243
1 1 0 1
Solution:
0 1 1 0
1 0 1 1 fun 1(5)
1 1 0 0

Hence, the correct option is (B).

Question Number: 34 Question Type: MCQ fun 2(3)

If G is a grammar with productions Print (5) Print (5)

S → SaS | aSb | bSa | SS |∈


fun 1(4)
Where S is the start variable, then which one of the follow-
ing strings is not generated by G?
Print (3) Print (4)
(A) abab (B) aaab
(C) abbaa (D) babba fun 2(2)

Solution:  Given grammar


Print (4) Print (4)
S → SaS | aSb | bSa | SS | E
abab: fun 1(3)
S → aSb
→ abSab Print (2) Print (3)

→ abab
fun 2(1)
aaab:
S → aSb Print (3) Print (3)
→ aSaSb
→ aSaSaSb
→ aaab fun 1(2)

abbaa: Print (1)


Print (2)
S → SS
→ aSbSS fun 2(0)
→ abbSaSaS
→ abbaa Print (2) Print (2)

babba:
C → bSa
It prints
→ baSba
→ ba ba 53423122233445

babba not derivable from S. Hence, the correct option is (A).


Hence, the correct option is (D).
xxvi | GATE 2017 Solved Paper CS: Set – 1

Question Number: 36 Question Type: MCQ Which of the following are context-free languages?
Consider the C functions foo and bar given below: I. L1 ∪ L2
II. L1 ∩ L2
int foo (int val) { (A) I only (B) II only
int x = 0; (C) I and II (D) Neither I nor II
while (val > 0) {
x =x + foo (val−−); Solution:  Given :
}
return val; L1 = {a nb n c m m, n ≥ 0}
}
int bar (int val) { L2 = {a mb n c n m, n ≥ 0}
int x = 0;
while (val > 0) { Here both L1 and L2 are context-free languages.
x =x +bar (val − 1); CFL’s are under union but not under intersection.
} L1 ∪ L2 needs to check the equality of number of a’s and b’s
return val; or equality of number of b’s and c’s.
}
∴ L1 ∪ L2 is CFL.
Invocations of foo (3) and bar (3) will result in :
(A) Return of 6 and 6 respectively. L1 ∩ L2 requires equal number of a’s, b’s and c’s. A PDA
(B) Infinite loop and abnormal termination respectively. cannot check this.
(C) Abnormal termination and infinite loop respec- ∴ L1 ∩ L2 is not CFL.
tively. Hence, the correct option is (A).
(D) Both terminating abnormally.
Question Number: 39 Question Type: MCQ
Solution:  foo (3) terminates abnormally, while bar (3) Let A and B be finite alphabets and let # be a symbol out-
gets into infinite loop. side both A and B. Let f be a total function from A* to B*.
Hence, the correct option is (C). We say f is computable if there exists a turning machine M
which given an input x in A*, always halts with f(x) on its
Question Number: 37 Question Type: MCQ tape. Let Lf denote the language {x # f(x)| x ∈ A*}. Which of
Consider the context-free rammers over the alphabet {a, b, the following statements is true:
c} given below. S and T are non-terminals. (A) f is computable if and only if Lf is recursive.
G1 : S → aSb|T, T → cT|∈ (B)  f is computable if and only if Lf is recursively enu-
merable.
G2 : S → bSa|T, T → cT|∈ (C) If f is computable then Lf is recursive, but not con-
The language L(G1) ∩ L(G2) is versely.
(A) Finite (D) If f is computable then Lf is recursively enumer-
(B) Not finite but regular able, but not conversely.
(C) Context-Free but not regular Solution:  A computable function is same as recursive
(D) Recursive but not context-free. function. Hence, choice (A) is correct.
Solution:  The strings of L (G1) are {ε, c, cc … c, ab, acb, Hence, the correct option is (A).
ac … cb, …}
Question Number: 40 Question Type: MCQ
The strings of L (G2) are {ε, c, cc, … c, ba, bca, bc, …. Recall that Belady’s anomaly is that the page-fault rate may
ca, …} increase as the number of allocated frames increases. Now,
L (G1) ∩ L (G2) = {ε, c, cc, c, … c,} consider the following statements:
S1: Random page replacement algorithm (where a page
The resultant grammar can have zero or more c’s. chosen at random is replaced) suffers from Belady’s
This is regular and not finite. anomaly
S2: LRU page replacement algorithm suffers from Be-
Hence, the correct option is (B). lady’s anomaly
Question Number: 38 Question Type: MCQ Which of the following is CORRECT?
(A) S1 is true, S2 is true (B) S1 is true, S2 is false
Consider the following languages over the alphabet Σ = {a,
(C) S1 is false, S2 is true (D) S1 is false, S2 is false
b, c}.
Solution:  Random page replacement algorithm simulates
Let L1 = {anbncm| m, n ≥ 0} and L2 = {ambncn| m, n ≥ 0}.
FIFO. So, there is a possibility of Belady’s anomaly.
GATE 2017 Solved Paper CS: Set – 1  |  xxvii

There is no possibility of Belady’s anomaly in LRU. Question Number: 43 Question Type: NAT
∴ S1 is true. Consider the following grammar:
S2 is false. stmt − > if expr then expr else expr; stmt | Ò
expr − > term relop term | term
Hence, the correct option is (B).
term − > id | number
Question Number: 41 Question Type: MCQ id −>a|b|c
Consider a database that has the relation schemas number − > [0 − 9]
EMP(EmpId, EmpName, DeptId), and DEPT(DeptName, where relop is a relational operator (e.g., <, >,…), Ò refers
DeptId), Note that the DeptId can be permitted to be NULL to the empty statement, and if, then, else are terminals.
in the relation EMP. Consider the following queries on the
Consider a program P following the above grammar con-
database expressed in tuple relational calculus.
taining ten if terminals. The number of control flow paths in
(I) {t | ∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∀ v ∈
P is__________. For example, the program
DEPT(t[DeptId] ≠ v[DeptId]))}
(II)  {t | ∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃ v ∈ if e1 then e2 else e3
DEPT(t[DeptId] ≠ v[DeptId]))} has 2 control flow paths, e1 → e2 and e1 → e3.
(III) {t | ∃u ∈ EMP(t[EmpName] = u[EmpName] ∧ ∃ v ∈ Solution:  The flow graph for the above grammar for ten if
DEPT(t[DeptId] = v[DeptId]))} terminals is given below:
Which of the above queries are safe?
(A) (I) and (II) only
(B) (I) and (III) only
(C) (II) and (III) only
(D) (I), (II) and (III)
Solution:  All the queries are safe expressions.
( All giving finite tuples).
Hence, the correct option is (D).
Question Number: 42 Question Type: MCQ
In a database system, unique timestamps are assigned to
each transaction using Lamport’s logical clock. Let TS(T1)
and TS(T2) be the timestamps of transactions T1 and T2
respectively. Besides, T1 holds a lock on the resource R, and
T2 has requested a conflicting lock on the same resource
R. The following algorithm is used to prevent deadlocks in
the database system assuming that a killed transaction is
restarted with the same timestamp.
if TS(T2) < TS(T1) then
T1 is killed
else T2 waits.
Assume any transaction that is not killed terminates eventu-
ally. Which of the following is TRUE about the database
system that uses the above algorithm to prevent deadlocks?
(A) The database system is both deadlock-free and
starvation-free.
(B) The database system is deadlock-free, but not star-
vation-free.
(C) The database system is starvation-free, but not
deadlock-free.
(D) The database system is neither deadlock-free nor
starvation-free.
Solution:  Given Time Stamp algorithm is same as wound-
wait time stamp algorithm, which is free from deadlock and
starvation-free. The number of control flow paths will be 210.

Hence, the correct option is (A). Hence, the correct answer is (1024).
xxviii | GATE 2017 Solved Paper CS: Set – 1

Question Number: 44 Question Type: NAT Question Number: 46 Question Type: NAT
In a RSA cryptosystem, a participant A uses two prime Consider a database that has the relation schema CR (stu-
numbers p = 13 and q = 17 to generate her public and pri- dentName, CourseName). An instance of the schema CR is
vate keys. If the public key of A is 35, then the private key as given below.
of A is _________.
CR
Solution:  Given two prime numbers, p = 13, q = 17 StudentName CourseName
RSA algorithm:- SA CA
(1) p = 13, q = 17 SA CB
(2) n=p×q SA CC
= 13 × 17 ⇒221 SB CB
z = (p − 1) × (q − 1)
SB CC
= 12 × 16
= 192 SC CA
Given public key as 35 (i.e. e = 35) SC CB
(3) (d * e) mod Z = 1 SC CC
(d * 35) mod 192 = 1 SD CA
d = 11 SD CB
Hence, the correct answer is (11). SD CC
Question Number: 45 Question Type: NAT SD CD
The values of parameters for the Stop-and Wait ARQ proto- SE CD
col are as given below: SE CA
Bit rate of the transmission channel = 1Mbps. SE CB
Propagation delay from sender to receiver = 0.75 ms. SF CA

Time to process a frame = 0.25 ms. SF CB

Number of bytes in the information frame = 1980. SF CC

Number of bytes in the acknowledge frame = 20. The following query is made on the database.
Number of overhead bytes in the information frame = 20.
T 1 ← pCouraseName (sStudentName =' SA ' (CR))
Assume that there are no transmission errors. Then, the
transmission efficiency (expressed in percentage) of the T 2 ← CR ÷ T 1
stop-and-wait ARQ protocol for the above parameters is
________ (correct to 2 decimal places) The number of rows in T2 is .
length of data
Solution:  Transmission time =
band width Solution:  The resultant of studentName = ‘SA’ (CR) is :
2000×8 bits
= StudentName CourseName
106 bps
SA CA
= 16 m sec
SA CB
Propagation time = 0.75 m sec
SA CC
40×8 bits
ACK transmission time =
106 bps πCourseName (studentName = ‘SA’ (CR)) resultant is T1 and is
= 0.32 m sec equal to :
Time to process a frame = 0.25 sec
Course Name
Transmission efficiency (Stop an wait) CA
16 CB
CC
0.5 + 16 + 1.5 + 0.32
200 Now, T2 contains CR ÷ T1.
= × 100
229
T2 contains the StudentName’s who are enrolled for all the 3
= 87.3
courses CA, CB, CC. i.e.
Hence, the correct answer is (87.3).
GATE 2017 Solved Paper CS: Set – 1  |  xxix

T2 Question Number: 48 Question Type: NAT


Let A be an array of 31 numbers consisting of a sequence of
Student Name
0’s followed by a sequence of 1’s. The problem is to find the
SA
smallest index i such that A[i] is 1 by probing the minimum
SC number of locations in A. The worst case number of probes
SD performed by an optimal algorithm is .
SF
Solution: Using binary search, number of comparisions
required will be log n2 . Number of probes required is Èlog231˘
∴ T2 has 4 rows. =5
Hence, the correct answer is (5).
Hence, the correct answer is (4).
Question Number: 49 Question Type: NAT
Question Number: 47  Question Type: NAT
Consider a RISC machine where each instruction is exactly
The number of integers between 1 and 500 (both inclusive)
4 bytes long. Conditional and unconditional branch instruc-
that are divisible by 3 or 5 or 7 is _______.
tions use PC-relative addressing mode Offset specified in
bytes to the target location of the branch instruction. Further
Solution:  Let, A, B and C denote the sets of divisors of 3, 5
the Offset is always with respect to the address of the next
and 7 among the integers 1 to 500 respectively.
instruction in the program sequence. Consider the following
∴ The number of integers between 1 and 500 (both inclu- instruction sequence.
sive) that are divisible by 3 or 5 or 7 = n (A ∪ B ∪ C)
Instr. No. Instruction
We know that
i : add R2, R3, R4
n (A ∪ B ∪ C) = n (A) + n (B) + n (C) − n (A ∩ B) − n i+1 : sub R5, R6, R7
(B ∩ C) − n (C ∩ A) + n (A ∩ B ∩ C)  (1)
i + 2 : cmp R1, R9, R10
n (A) = The number of integers from 1 to 500 that are divis- i + 3 : beq R1, Offset
ible by 3 = 166
n (B) = The number of integers from 1 to 500 that are divis- If the target of the branch instruction is i, then the decimal
ible by 5 = 100 value of the Offset is .

n (C) = The number of integers from 1 to 500 that are divis- Solution:  Given instruction sequence
ible by 7 = 71 i : add R2, R3, R4
n (A ∩ B) = The number of integers from 1 to 500 that are i + 1: sub R5, R6, R7
divisible by 3 and 5 = The number of integers from 1 to 500 i + 2 : cmp R1, R9, R10
that are divisible by 15 = 33
i + 3 : beq R1, offset.
n (B ∩ C) = The number of integers from 1 to 500 that are
divisible by 5 and 7 = The number of integers from 1 to 500 In PC-relative addressing mode, effective address = PC +
that are divisible by 35 = 14 offset.

n (C ∩ A) = The number of integers from 1 to 500 that are PC always points to the address of next instruction.
divisible by 7 and 3 = The number of integers from 1 to 500 ∴ During execution of i + 3, the PC will point to address
that are divisible by 21 = 23 of i + 4.
n (A ∩ B ∩ C) = The number of integers from 1 to 500 that As each instruction requires 4 bytes, offset = − (4 × 4)
are divisible by 3, 5 and 7 = The number of integers from 1 = − 16 bytes.
to 500 that are divisible by 105 = 4
If ‘i’ is at address 1000, then i + 4 is at 1016.
∴ Substituting these in (1), we get
EA = 1016 − 16 = 1000.
n (A ∪ B ∪ C) = 166 + 100 + 71 − 33 − 14 − 23 + 4 = 271 This gives address of ith instruction.
Hence, the correct answer is (271). Hence, the correct answer is (−16).
xxx | GATE 2017 Solved Paper CS: Set – 1

Question Number: 50 Question Type: NAT In a 2-way set associative cache, a block is placed in the
Instruction execution in a processor is divided into 5 stages, location,
Instruction Fetch (IF), Instruction Decode (ID), Operand Block number % No. of sets in cache.
Fetch (OF), Execute (EX), and Write Back (WB). These set 0
0 % 128 = 0  → compulsory miss.
stages take 5, 4, 20, 10, and 3 nanoseconds (ns) respec-
tive. A pipelined implement action of the processor requires set 0
128 % 128 = 0  → compulsory miss.
buffering between each pair of consecutive stages with a set 0
256 % 128 = 0  → compulsory miss (1st time access)
delay of 2 ns. Two pipelined implementations of the proces-
sor are contemplated: set 0
128 % 128 = 0  → hit.
(i) A navie pipeline implementation (NP) with 5 stages set 0
0 % 128 = 0  → replace block 256, conflict miss.
and
(ii) An efficient pipeline (EP) where the OF stage is divided set 0
128 % 128 = 0  → hit.
into stages OF1 and OF2 with execution times of 12 ns set 0
256 % 128 = 0  → replace block 0, conflict miss.
and 8 ns respectively.
set 0
The speedup (correct to two decimal places) achieved by EP 128 % 128 = 0  → hit.
over NP in executing 20 independent instructions with no set 1
1 % 128 = 1 → compulsory miss.
hazards is .
set 1
129 % 128 = 1 → compulsory miss.
Solution:  5-stage pipeline: set 1
257 % 128 = 1 → compulsory miss (1st time access)
Cycle time = 20 + 2 set 1
129 % 128 = 1 → hit.
Execution time for 20 instructions = [5 + (20 − 1)] 22
set 1
1 % 128 = 1 → replace block 257, conflict miss.
6-stage pipeline:
set 1
Cycle time = 12 + 2 = 14 129 % 128 = 1 → hit.
set 1
Execution time for 20 instructions = [6 + (20 − 1)] 14 257 % 128 = 1 → replace block 1, conflict miss.
5 + (20 −1) 22 129 % 128 = 1 hit.
Speed up of EP over NP =  
 6 + (20 −1) 14 ∴ For 1st access, number of conflict misses = 4.
 
= 1.51 The contents of cache before starting 2nd time access is
Hence, the correct answer is (1.51).
256
......
Question Number: 51 Question Type: NAT set 0
128
Consider a 2-way set associative cache with 256 blocks and
257
......
uses LRU replacement. Initially the cache is empty. Conflict set 1
misses are those misses which occur due to contention of 129
multiple blocks for the same cache set. Compulsory misses
occur due to first time access to the block. The following
set 0
sequence of accesses to memory blocks 0 % 128 = 0  → conflict miss, replace block 256.
(0, 128, 256, 128, 0, 128, 256, 128, 1, 129, 257, 129, 1, 129, set 0
128 % 128 = 0  → Hit.
257, 129) set 0
256 % 128 = 0  → conflict miss, replace block 0.
is repeated 10 times. The number of conflict misses experi-
set 0
enced by the cache is . 128 % 128 = 0  → Hit.
set 0
0 % 128 = 0  → conflict miss, replace block 256.
Solution:  Cache has 256 blocks and is organized in a 2-way
set associative manner. set 0
128 % 128 = 0  → Hit.
∴ The cache has 256 = 128 sets. set 0
256 % 128 = 0  → conflict miss, replace block 0.
2 set 0
128 % 128 = 0  → Hit.
set 0
Similarly for next 8 accesses, we will get 4 conflict misses.
set 0
∴ Number of conflict misses for second access = 8.
Now, the cache state is same as before accessing the se-
set 127 quence for the second time.
GATE 2017 Solved Paper CS: Set – 1  |  xxxi

So, for remaining accesses also there will be 8 conflict Solution:


misses.
a b c d e f g h
∴ Total number of conflict misses to access the sequence
for 10 times = 4 + 9 × 8 = 76.
Hence, the correct answer is (76).
Question Number: 52 Question Type: NAT

Consider the expression (a—1) (((b + c)/3) + d)). Let X
be the minimum number of registers required by an optimal
code generation (without any register spill) algorithm for
a load/store architecture, in which (i) only load and store s t
instruction can have memory operands and (ii) arithmetic
instructions can have only register or immediate operands. strlen (t) = 5
strlen (s) = 3
The value of X is .
strlen( ) function return an unsigned value, computation
Solution:  Consider the expression among unsigned variables will result in unsigned value i.e.,
positive value.
(a – 1) * ((b + c) / 3) + d)
strlen(s) − strlen(t)

Consider 2 registers R1 and R2. ⇓
R1 = b (3 − 5)
R2 = c ⇓
| −2 | > 0 ⇒ 2 > 0
R1 = R1 + R2
R1 = R1/3 as condition is true, it stores strlen(s) into variable len.
It prints 3.
R2 = d
Hence, the correct answer is (3).
R1 = R1 + R2
R2 = a Question Number: 54 Question Type: NAT
R2 = R2 – 1 A cache memory unit with capacity of N words and block
size of B words is to be designed. If it is designed as a direct
R1 + R1 × R2
mapped cache, the length of the TAG field is 10 bits. If
Only 2 registers are required the cache unit is now designed as a 16-way set-associative
cache, the length of the TAG filed is _________ bits.
Hence, the correct answer is (2).
Solution:  Direct mapped cache:
Question Number: 53 Question Type: NAT
n
Consider the following C program.
Tag Line word
# include <<stdio.h>
10 l b
# include <<string.h>
void printlength (char *s, char *t) { Where, block size B = 2b
unsigned int c = 0;
int len = ((strlen(s) − strlen (t)) > Number of Lines = 2l
c) ? strlen (s) : strlen (t); 16-way set associative cache:
printf (“%d\n”, len); n
}
void main ( ) { Tag Set word
char *x = “abc”; t l-4 b
char *y = “defgh”; l
printlength (x, y); 2
Number of sets = = 2l−4
} 16
10 + l + b = t + l – 4 + b
Recall that strlen is defined in string.h as returning a value
t = 14.
of type size_t, which is an unsigned int. the output of the
program is _________. ∴ Required tag field is 14-bits.
Hence, the correct answer is (14).
xxxii | GATE 2017 Solved Paper CS: Set – 1

Question Number: 55 Question Type: NAT Total (5)


The output of executing the following C program is______. V = 5 count 0 1 2
# include <stdio.h>
int total (int v) { while (5)
static int count = 0; Count = count + V & 1 ; ⇒ 0 + (101) and (001) ⇒1
while (v) { V >> = 1 ⇒ (101) >> 1 ⇒ 2
count + = v&1;
while (2)
v >> = 1; Count = count + V & 1 ; ⇒ 1 + (010) and (001) ⇒ 1
}
return count; V >> = 1 ⇒ (010) >> 1 ⇒ 1
} while (1)
void main ( ) { Count = count + V & 1 ; ⇒ 1 + (001) and (001) ⇒ 2
static int x = 0;
V >> = 1 ⇒ (001) >> 1 ⇒ 0
int i = 5;
for (; i > 0,i−−) { total (5) returns value 2 and x=2
x = x + total (i); Similarly,
} total (4) returns value 3 and x=5
printf (“%d\n”, x); total (3) returns value 5 and x = 10
} total (2) returns value 6 and x = 16
total (1) returns value 7 and x = 23
Solution: For the above code, the total( ) function calls
will be total(5), total(4), total(3), total(2) and total(1). As The value printed is 23.
the variables ‘count’ and ‘x’ are static, it restores the previ-
ous value. The values of count and x at each function call is Hence, the correct answer is (23).
shown below.

General Aptitude
Number of Questions: 10  Section Marks: 15

Q.56 to Q.60 carry 1 mark each and Q.61 to Q.65 carry 2 Question Number: 59 Question Type: MCQ
marks each. Find the smallest number y such y × 162 is a perfect cube.
Question Number: 56 Question Type: MCQ (A) 24 (B) 27
(C) 32 (D) 36
After Rajender Chola returned from his voyage to Indonesia,
he ________ to visit the temple in Thanjavur. Ans:  (D)
(A) was wishing (B) is wishing Question Number: 60 Question Type: MCQ
(C) wished (D) had wished The probability that a k-digit number does NOT contain the
Ans:  (C) digits 0, 5, 0 or 9 is
(A) 0.3k (B) 0.6k
Question Number: 57 Question Type: MCQ
(C) 0.7 k
(D) 0.9k
Research in the workplace reveals that people work for
Ans:  (C)
many reasons .
(A) money beside (B) beside money Question Number: 61 Question Type: MCQ
(C) money besides (D) besides money “The hold of the nationalist imagination on our colonial past
is such that anything inadequately or improperly nationalist
Ans:  (D)
is just not history.”
Question Number: 58 Question Type: MCQ
Which of the following statements best reflects the author’s
Rahul, Murali, srinivas and Arul are seated around a square opinion?
table. Rahul is sitting to the left of Murali. Srinivas is setting (A) Nationalists are highly imaginative.
to the right of Arul. Which of the following paris are seated (B) History is viewed through the filter of nationalism.
opposite each other? (C) Our colonial past never happened.
(A) Rahul and Murali (B) Srinivas and Arul (D) Nationalism has to be both adequately and prop-
(C) Srinivas and Murali (D) Srinivas and Rahul erly imagined.
Ans:  (C) Ans:  (B)
GATE 2017 Solved Paper CS: Set – 1  |  xxxiii

Question Number: 62 Question Type: MCQ In how many different ways can they choose the shirts so
Six people are seated around a circular table. There are at that no one has a shirt with a colour he or she dislikes?
least two men and two women. There are at least three right- (A) 21 (B) 18
handed persons. Every woman has a left-handed person to (C) 16 (D) 14
her immediate right. None of the women are right- handed. Ans:  (D)
The number of women at the tables is Question Number: 65 Question Type: MCQ
(A) 2
A contour lines joins locations having the same height
(B) 3
above the mean sea level. The following is a contour plot
(C) 4
of a geographical region. Contour lines are shown at 25m
(D) Cannot be determined
intervals in this plot. If in a flood, the water level rises to
Ans:  (A) 525m, which of the villages P, Q, R, S, T get submerged ?
Question Number: 63 Question Type: MCQ
425 Q
( x − y) − x − y R
The expression is equal to 450 550
2
(A) the maximum of x and y
(B) the minimum of x and y P
(C) 1 550
(D) none of the above
T
500
Ans:  (B) 450

Question Number: 64 Question Type: MCQ 500 S

Arun, Gulab, Neel and Shweta must choose one shirt each
from a pile of four shirts coloured red, pink, blue and white (A) P, Q (B) P, Q, T
respectively. Arun dislikes the colour red and Shweta dis- (C) R, S, T (D) Q, R, S
likes the colour white. Gulab and Neel like all the colours. Ans:  (C)
GATE 2017 Solved Paper
CS: Computer Science and Information Technology
Set – 2
Number of Questions: 65 Total Marks:100.0

Wrong answer for MCQ will result in negative marks, (-1/3) for 1 Mark Questions and (-2/3) for 2 Marks Question.

Computer Science & Engineering


Number of Questions: 55 Section Marks: 85
Q.1 to Q.25 carry 1 mark each and Q.26 to Q.55 carry 2 Question Number: 3 Question Type: MCQ
marks each. Match the algorithms with their time complexities:
Question Number: 1 Question Type: MCQ
Algorithm Time complexity
The representation of the value of a 16-bit unsigned integer
X in hexadecimal number system is BCA9. The representa- (P) Towers of Hanoi with n disks (i) Θ (n2)
tion of the value of X in octal number system is (Q) B inary search given n sorted (ii) Θ (n log n)
(A) 571244 (B) 736251 numbers
(C) 571247 (D) 136251 (R) Heap sort given n numbers at the (iii) Θ (2n)
Solution: worst case
(BCA9)16 octal
 ( x )8 (S) Addition of two n × n matrices (iv) Θ (log n)
(BCA9)16 → (x)2
(BCA9)16 → (1011 1100 1010 1001) 2 (A) P → (iii), Q → (iv), R → (i), S → (ii)
(B) P → (iv), Q → (iii), R → (i), S → (ii)
⇓ (C) P → (iii), Q → (iv), R → (ii), S → (i)
(x)8 (D) P → (iv), Q → (iii), R → (ii), S → (i)
001 011 110 0 10 10 1 001 Solution:  To solve Towers of Hanoi puzzle of ‘n’ disks, it
→ (136251)8
1 3 6 2 5 1 takes θ(2n) time.
Hence, the correct option is (D). Binary search over ‘n’ sorted numbers takes θ(log n) time.
Question Number: 2 Question Type: MCQ ‘n’ numbers can be sorted in θ(n log n) time using Heap sort
Match the following: even in worst case.
Addition of two matrices of order n × n takes θ(n2) time,
(P) static char var; (i) 
Sequence of memory locations to
store addresses since it requires n2 computations.
(Q) m = malloc (10); (ii) A variable located in data section of Hence, the correct option is (C).
m = NULL; memory
Question Number: 4 Question Type: MCQ
(R) char *ptr [10]; (iii) Request to allocate a CPU register
to store data Let L1 L2 be any two context-free languages and R be
(S) register int var1; (iv) 
A lost memory which cannot be
any regular language. Then which of the following is/are
freed CORRECT?
(A) P → (ii), Q → (iv), R → (i), S → (iii) I. L1 ∪ L2 is context-free.
(B) P → (ii), Q → (i), R → (iv), S → (iii) II. L1 is context-free.
(C) P → (ii), Q → (iv), R → (iii), S → (i) III. L1 − R is context-free.
(D) P → (iii), Q → (iv), R → (i), S → (ii) IV. L1 ∩ L2 is context-free.
(A) I, II and IV only (B) I and III only
Solution:  (C) II and IV only (D) I only
• Static variables are stored in the program data segment.
• The statement m = malloc (10) is assigned with 10 Solution:  Given L1, L2 are CFL. R is regular.
memory units and when m is assigned with NULL val- CFL’s are closed under union. CFL’s are not closed under
ue, then memory allocated is lost and it can’t be freed. complement.
• char *ptr [10]; declaration specifies a 10 pointers which
L1 − R = L1 ∩ R
are used to store memory addresses.
• register int var1; declaration request the CPU for al- R is closed under complement. Intersection of regular and
location of CPU registers for storing data. CFL is CFL.
Hence, the correct option is (A).
GATE 2017 Solved Paper CS: Set – 2  |  xxxv

CFL’s are not closed under intersection. Question Number: 7 Question Type: MCQ
∴ I and III are correct. Which of the following is/are shared by all the threads in a
Hence, the correct option is (B). process?
I. Program counter
Question Number: 5 Question Type: MCQ II. Stack
Match the following according to input (from the left col- III. Address space
umn) to the compiler phase (in the right column) that pro- IV. Registers
cesses it: (A) I and II only (B) III only
(C) IV only (D) III and IV only
(P) Syntax tree (i) Code generator
Solution:  Each thread has its own program counter, stack,
(Q) Character stream (ii) Syntax analyzer
Registers and state.
(R) Intermediate representation (iii) Semantic analyzer
(S) Token stream (iv) Lexical analyzer
Address space is shared by all threads of a process
Hence, the correct option is (B).
(A) P → (ii), Q → (iii), R → (iv), S → (i)
(B) P → (ii), Q → (i), R → (iii), S → (iv) Question Number: 8 Question Type: MCQ
(C) P → (iii), Q → (iv), R → (i), S → (ii) In a file allocation system, which of the following alloca-
(B) P → (i), Q → (iv), R → (ii), S → (iii) tion scheme(s) can be used if no external fragmentation is
allowed?
Solution:  Phases of compiles with inputs I. Contiguous
Source code II. Linked
↓ Character stream III. Indexed
Lexical analysis (lexical analyzer) (A) I and III only (B) II only
↓ Token stream (C) III only (D) II and III only
Syntax analysis (syntax analyzer)
↓ Syntax tree Solution:  In contiguous allocation, there is a possibility of
Semantic analysis (semantic analyzer) external fragmentation.
↓ Intermediate representation Hence, the correct option is (D).
Code generator Question Number: 9 Question Type: MCQ

Consider the following statements about the routing proto-
Output
cols. Routing Information Protocol (RIP) and Open Shortest
Hence, the correct option is (C).
Path First (OSPF) in an IPv4 network.
Question Number: 6 Question Type: MCQ I: RIP uses distance vector routing
II: RIP packets are sent using UDP
Which of the following statements about parser is/are
III: OSPF packets are sent using TCP
CORRECT?
IV: OSPF operation is based on link-state routing
I. Canonical LR is more powerful than SLR.
II. SLR is more powerful than LALR. Which of the statements above are CORRECT?
III. SLR is more powerful than Canonical LR. (A) I and IV only
(A) I only (B) II only (B) I, II and III only
(C) III only (D) I and III only (C) I, II and IV only
(D) II, III and IV only
Solution:  Relation among parsers (with respect to accept-
Solution:
ing languages) is shown with below Venn diagram:
• RIP uses distance vector routing.
CLR (1)
LALR (1) • RIP packets are sent using UDP as RIP uses UDP as
SLR (1) transport protocol.
• OSPF packets are not sent using TCP and its operation
LR (0) is based on link state routing.
LL (1) Hence, the correct option is (C).
Question Number: 10 Question Type: MCQ
 p x   1  1 2R
If f(x) = R sin   + S , f '  = 2 and ∫ f ( x) dx = ,
Hence, the correct option is (A).  2   2  0 p
then the constants R and S are, respectively.
xxxvi | GATE 2017 Solved Paper CS: Set – 2

2 16 2 (C) (¬ p ∧ r) ∨ ((p ∧ q) → ¬ r)
(A) and (B) and 0
p p p (D) (¬ p ∧ r) ∨ ( r → (p ∧ q))
4 4 16 Solution:  Given statements are
(C) and 0 (D) and
p p p p: It is raining
q: It is cold
 πx 
Solution:  Given f ( x ) = R sin   + S r: It is pleasant
 2 
1 Given compound statement is
1 2R
f ′   = 2 and ∫ f ( x ) dx = “It is not raining and it is pleasant, and it is not pleasant,
 2  π
0
only if it is raining and it is cold”.
π π 
f 1 ( x) = R cos  x is same as,
2  2 
“It is not raining and it is pleasant, and if it is not pleasant
1 π π 1 then it is raining and it is cold”.
f   = 2 ⇒ R cos  ×  = 2
1

 2  2  2 2  Which can be written in symbolic form as (¬p ∧ r) ∧


π π (¬r → (p ∧ q))
⇒ R cos   = 2
2  4  Hence, the correct option is (A).
π 1 Question Number: 12 Question Type: MCQ
⇒ R. = 2
2 2 Given the following binary number in 32-bit (single preci-
4 sion) IEEE-754 format:
⇒ R=
π 00111110011011010000000000000000
1
2R The decimal value closest to this floating-point number is
Also, ∫ f ( x ) dx = (A) 1.45 × 101 (B) 1.45 × 10−1
π
0
(C) 2.27 × 10
−1
(D) 2.27 × 101
 4
2 
 1
π    π  Solution:  Given 32-bit IEEE 754 number is
⇒ ∫  R sin  x + S  dx =
0
  2   π 0 0111110 0 11011010000000000000000
1
4 π   8 Sign-bit = 0 ⇒ number is positive
⇒ ∫  π sin  2 x + S  dx = π 2
Biased exponent = 22 + 23 + 24 +25 + 26
0
1
=124
  π  
 − cos  x  ∴ Exponent = 124−127 = −3
4  2   8
⇒   + Sx  = 2 Mantissa = 1.1101101

π   π    π
     ∴ Number in binary
 2  
0 = 1.1101101 × 2−3
 −8 π   −8  8 = 0.0011101101
⇒  2 cos   + S  −  2 cos 0 + S × 0 = 2
 π  2    π  π = 0.2314453125
8 8 ≃ 2.3 × 10−1
⇒ S+ 2 = 2
π π This is approximately equal to choice (C).
⇒S=0
Hence, the correct option is (C).
4
∴ R = and S = 0 Question Number: 13 Question Type: MCQ
π
Hence, the correct option is (C). A circular queue has been implemented using a singly
linked list where each node consists of a value and a single
Question Number: 11 Question Type: MCQ pointer pointing to the next node. We maintain exactly two
Let p. q. r denote the statements “It is raining”, “It is cold”, external pointers FRONT and REAR pointing to the front
and “It is pleasant”, respectively. Then the statement “It is node and the rear node of the queue, respectively. Which of
not raining and it is pleasant, and it is not pleasant only if it the following statements is/are CORRECT for such a circu-
is raining and it is cold” is represented by lar queue, so that insertion and deletion operations can be
(A) (¬ p ∧ r) ∧ (¬ r → (p ∧ q)) performed in O (1) time?
(B) (¬ p ∧ r) ∧ ((p ∧ q) → ¬ r)
GATE 2017 Solved Paper CS: Set – 2  |  xxxvii

I. Next pointer of front node points to the rear node. (A) MNOPQR
II. Next pointer of rear node points to the front node. (B) NQMPOR
(A) I only (B) II only (C) QMNROP
(C) Both I and II (D) Neither I nor II (D) POQNMR
Solution:  Circular Queue with Linked List: Solution:  Given graph

M N O
a b c

FRONT REAR

In above, implementation of circular queue using linked list,


Rear pointer always points Front as it is done always for
every new insertion.
R Q P
FRONT node next pointer points to REAR only when they
are only 2 elements in a queue. Insertion and Deletion can In BFS traversal, it first traverse all the neighbours of start
be done in O(1) time. node and traverse corresponding neighbours iteratively till
Hence, the correct option is (B). all the nodes are visited. Option (D) is the correct BFS tra-
versal of above graph ‘G’.
Question Number: 14 Question Type: MCQ
Hence, the correct option is (D).
Consider the following function implemented in C:
Question Number: 16 Question Type: MCQ
void printxy (int x, int y) {
Identify the language generated by the following grammar,
int ptr;
where S is the start variable.
x = 0;
ptr = &x; S → XY
y = ptr; X → aX|a

ptr = 1; Y → aYb|∈
printf (“%d, %d” x, y);
(A) {ambn| m ≥ n, n > 0} (B) {ambn| m ≥ n, n ≥ 0}
}
(C) {ambn| m >n, n ≥ 0} (D) {ambn| m > n, n > 0}
The output of invoking printxy (1, 1) is
(A) 0, 0 (B) 0, 1 Solution:  Given grammar
(C) 1, 0 (D) 1, 1 S → XY
X →aX | a
Solution:  x 1 01 y 1 0
Y → aYb | ε
ptr  For given grammar, there need to atleast one a. There can
y = *ptr ⇒ y = 0 be zero b’s.
when * ptr = 1 ⇒ only value of x will change, i.e., 1 n≥0
when x and y are printed, it prints 1, 0. Y generals equal number of a’s, and b’s.
Hence, the correct option is (C). X generates one or more a’s so S generates
Question Number: 15 Question Type: MCQ {am bn | m > n, n ≥ 0}
The Breadth First Search (BFS) algorithm has been imple- Hence, the correct option is (C).
mented using the queue data structure. Which one of the
following is a possible order of visiting the nodes in the Question Number: 17 Question Type: MCQ
graph below? An ER model of a database consists of entity types A and
B. These are connected by a relationship R which does not
M N O have its own attribute, Under which one of the following
conditions, can the relational table for R be merged with
that of A?
(A) Relationship R is one-to-many and the participa-
tion of A in R is total.
(B) Relationship R is one-to-many and the participa-
R Q P tion of A in R is partial.
xxxviii | GATE 2017 Solved Paper CS: Set – 2

(C) Relationship R is many-to-one and the participa- 〈3, 8〉 from table T1, the number of additional records that
tion of A in R is total. need to be deleted from table T1 is __________.
(D) Relationship R is many-to-one and the participa- Solution:  Based on given description, S is depend on P; Q
tion of A in R is partial. is depend on R.
Solution: After deleting row (3, 8) from T1, set S = NULL at R = 8
in T2.
A m R I B
∴ zero rows will get deleted in T1, other than (3, 8).
Hence, the correct answer is (0).
The relationship R table can be merged with entity A’s table.
If R is many-to-one and A is total Participated in relation Question Number: 20 Question Type: NAT
R. The maximum number of IPv4 router addresses that can be
listed in the record route (RR) option field of an IPv4 header
Hence, the correct option is (C).
is__________.
Question Number: 18 Question Type: MCQ
Solution:  In IPV4, maximum number of router addresses
Consider socket API on a Linux machine that supports con- specified will be 9.
nected UDP sockets. A connected UDP socket is a UDP
socket on which connect function has already been called. Hence, the correct answer is (9).
Winch of the following statements is/are CORRECT? Question Number: 21 Question Type: NAT
I. A connected UDP socket can be used to communicate Consider the set X = {a,b,c,d,e} under the partial ordering
with multiple peers simultaneously.
R = {(a, a).(a, b). (a, c), (a, d). (a, e),(b, b), (b, c), (b, e), (c,
II. A process can successfully call connect function again
c). (c, e), (d, d), (d, e), (e, e)}.
for an already connected UDP socket.
(A) I only The Hasse diagram of the partial order (X, R) is shown
(B) II only below.
(C) Both I and II e
(D) Neither I nor II
Solution:  A process can use Connection function on a
UDP socket, if the communication is point to point.
Connected UDP simulates like TCP connection (like peer c
to peer connection)
Hence, the correct option is (B).
d
Question Number: 19 Question Type: NAT
Consider the following tables T1 and T2.
b
T1 T2
P Q R S

2 2 2 2
a
3 8 8 3 The minimum number of ordered pairs that need to be
7 3 3 2 added to R to make (X, R) a lattice is __________.
5 8 9 7 Solution:  Given poset (X, R) is itself a lattice.
6 9 5 7 So, the minimum number of ordered pairs to be added = 0.

8 5 7 2
Hence, the correct answer is (0).

9 8 Question Number: 22 Question Type: NAT


 1 1 −1 −1 −2 −1
   
In table T1, P is the primary key and Q is the foreign key Let P =  2 −3 4  and Q =  6 12 6  be two
referencing R in table T2 with on-delete cascade and on-    
 3 −2 3   5 10 5 
update cascade. In table T2, R is the primary key and S is    
matrices.
the foreign key referencing P in table Tl with on-delete set
Then the rank of P + Q is __________.
NULL and on-update cascade. In order to delete record
GATE 2017 Solved Paper CS: Set – 2  |  xxxix

 1 1 −1 −1 −2 −1 Question Number: 25 Question Type: NAT


   
Solution:  Let P =  2 −3 4  and Q =  6 12 6  The minimum possible number of states of a deterministic
 
 3 −2 3   5 10 5  finite automaton that accepts the regular
   
language L = {w1aw2| w1, w2 ∈ {a, b}*, |w1| = 2, |w2| ≥ 3} is
 0 −1 −2  __________.
 
∴ P + Q = 8 9 10 
  Sulution:  Given language
8 8 8 
 
L = {w1aw2 | w1, w2 ∈ {a, b}*,
0 −1 −2 |w1| = 2
Det ( P + Q ) = 8 9 10 = 0 |w2| ≥ 3}
8 8 8 The minimum DFA for L can be
 0 −1 a,b
and determinant of a 2 × 2 sub-matrix   of P + Q is
8 9 
8 ≠ 0.  
a,b a,b a b Dead
∴ Rank of P + Q = 2 siale

Hence, the correct answer is (2). a,b

Question Number: 23 Question Type: NAT


G is an undirected graph with n vertices and 25 edges such
that each vertex of G has degree at least 3. Then the maxi- a,b
mum possible value of n is __________.
Solution:  Number of edges of G = n (E) = 25
Given number of vertices of G = n (V) = n a,b

As the degree of each vertex is atleast 3, we have sum of the


degrees of all the vertices will be of the form 3n + k, where
k is a positive integer.
∴ Minimal DFA which accepts L has 8 states. (Including
We know that, sum of the degrees of all the vertices = 2 ×
dead state)
Number of edges
Hence, the correct answer is (8).
⇒ 3 n + k = 2 × 25
⇒ 3 n + k = 50 Question Number: 26 Question Type: MCQ
For, n to be maximum, k should be minimum. P and Q are considering to apply for a job. The probability
1
∴ 3 n + k = 50 and k is minimum only when n = 16. that P applies for the job is , the probability that P applies
4
1
Hence, the correct answer is (16). for the job given that Q applies for the job is and the
2
probability that Q applies for the job given that P applies for
Question Number: 24 Question Type: NAT
1
Consider a quadratic equation x − 13x + 36 = 0 with coeffi-
2 the job is . Then the probability that P does not apply for
3
cients in a base b. The solutions of this equation in the same the job given that Q does not apply for the job is
base b are x = 5 and x = 6. Then b = __________.
4 5
(A) (B)
Solution: 5 6
x2 − 13x +36 = 0 7 11
(C) (D)
5.6 = (36)b 8 12
30 = 3b + 6
Solution:  Let A and B denote the events of the persons P
3b = 24
and Q applying for a job respectively.
b=8
1  A 1  B 1
∴ base = 8 ∴ P ( A) = , P   = and P   =

4  B 2  A  3
Hence, the correct answer is (8.0 to 8.0).
xl | GATE 2017 Solved Paper CS: Set – 2

 B  P ( A ∩ B) 1
We have P   = 6
 A  P ( A) = 1−
 1 
1− 
 B  6 
⇒ P(A ∩ B) = P   ⋅ P (A)
 A 
1
1 1
= × = 1− 6
3 4 5
1 6
⇒ P ( A ∩ B ) =
12 1
From the diagram, we have = 1−
5
4
=
A B 5
Hence, the correct option is (A).
A∩B A∩B A∩B
Question Number: 27 Question Type: MCQ
If w, x, y, z are Boolean variables, then which one of the fol-
lowing is INCORRECT?
A = ( A ∩ B) ∪ ( A ∩ B)
(A) wx + w(x + y) + x(x + y) = x + wy
⇒ P ( A) = P ( A ∩ B ) + P ( A ∩ B ) (B) w x ( y + z ) + w x = w + x + yz

( A ∩ B and A ∩ B are mutually exclusive). (C) (w x ( y + x z ) + w x ) y = x y


⇒ P ( A ∩ B) = P ( A) − P ( A ∩ B ) (D) (w + y) (wxy + wyz) = wxy + wyz

1 1 Solution:  By observation, we can say that option (D) is


= − correct.
4 12
1 (wx ( y + xz ) + w x ) y
(C):
∴ P ( A ∩ B ) =
6 ( wxy + 0 + w x ) y
Also, we know that
wxy + w xy = x y ≠ x y
 A  P ( A ∩ B)
P   = Hence option (C) is wrong.
 B  P ( B)
wx y + z ) + wx
(B): (
P ( A ∩ B)
⇒ P ( B ) = w + x + yz + w x = w + x + yz
 A
P  
 B  Thus; option (B) is also correct.
1 wx + w ( x + y ) + x( x + y ) = x + wy
(A):
= 12 wx + wx + wy + x + xy
1
wx + wy + x = x + wy
2
1 Hence, the correct option is (C).
∴ P ( B ) =
6 Question Number: 28 Question Type: MCQ
∴ Probability that P does not apply for the job given that Q Given f(w, x, y, z) = ∑m(0,l,2,3,7,8,10) + ∑d(5,6,ll,15),
does not apply for the job. where d represents the don’t-care condition in Karnaugh
 A maps. Which of the following is a minimum product-of-
= P   sums (POS) form of f(w, x, y, z)?
 B 

(A) f = ( w + z )( x + z )
 A
= 1− P   (B) f = ( w + z )( x + z )
 B 

(C) f = ( w + z )( x + z )
P ( A ∩ B) P ( A ∩ B)
= 1− = 1− (D) f = ( w + z )( x + z )
P ( B) 1− P ( B )

GATE 2017 Solved Paper CS: Set – 2  |  xli

Solution: Given f (w, x, y, z) = ∑m (0, 1, 2, 3, 7, 8, 10) + Question Number: 30 Question Type: MCQ
∑d(5, 6, 11, 15). Consider the recurrence function

wx
yz
00 01 11 10
2T
T (n) = 
 ( n ) +1 n>2
2, 0<n≤2

00 1 1 1 1
Then T(n) in terms of Θ notation is
01 0 X 1 X (A) Θ (log log n) (B) Θ (log n)

11 0 0 X 0
Θ n
(C) ( ) (D) Θ (n)

10 1 0 X 1

I
2T
Solution:  T (n) = 
 ( n ) +1, n>2
 2 0<n≤2
on 1st iteration: 
II
T (n) = 2T ( n ) +1
F = I ⋅ II
on 2nd iteration:
I = ( x + z)

II = ( w + z )
T (n) = 22 T ( n ) +1+1
 1 2
F = ( w + z ) ( x + z) = 22 T n 2  + 2×1
 

Hence, the correct option is (A).
On kth iteration
Question Number: 29 Question Type: MCQ  1k 
T (n) = 2k T n 2  + k (1)
In a two-level cache system, the access times of L1 and L2  
caches are 1 and 8 clock cycles, respectively. The miss pen-
alty from the L2 cache to main memory is 18 clock cycles. implies
The miss rate of L1 cache is twice that of L2. The average 1

n2 = 2
k
memory access time (AMAT) of this cache system is 2
cycles. The miss rates of L1 and L2 respectively are: ⇒ k = log2 log2 n
(A) 0.111 and 0.056 (B) 0.056 and 0.111 substituting k in (1)
(C) 0.0892 and 0.1784 (D) 0.1784 and 0.0892
= 2log2 log2 n T (2) + log 2 log 2 n

Solution: Given, ≅ 2 log2 n
Access time of L1 = 1 cc ≅ θ (log2 n)
Access time of L2 = 8 cc T(n) is θ (log2 n).
Miss penalty of L2 = 18 cc Hence, the correct option is (B).
Miss rate of L1 = 2x Question Number: 31 Question Type: MCQ
Miss rate of L2 = x For any discrete random variable X, with probability mass
function
Miss penalty of L1 = (L2 access time + miss rate of L2 × miss N

penalty of L2) P(X = j) = pj, pj ≥ 0, j ∈ {0,....., N}, and ∑ p j = 1 , define


j =0
Miss penalty of L1 = (8 + 18x) N

Average memory access time = L1 access time + miss rate of the polynomial function g x ( z ) = ∑ p j z j . For a certain
j =0
L1 × miss penalty of L1
discrete random variable Y, there exists a scalar β ∈ [0,1]
2 = 1 + 2x × (8 +18x) such that gY(z) = (1 − β + β z)N . The expectation of Y is
1 = 16x + 36x2 (A) Nβ (l −β)
If x = 0.056, then 16 x + 36 x 2 is approximately equal to 1. (B) Nβ
(C) N(l-β)
Hence, the correct option is (A).
(D) Not expressible in terms of N and β alone
xlii | GATE 2017 Solved Paper CS: Set – 2

Solution:  Given g y ( z ) = (1− β + βz )


N Which of the following best describes current state of the
system?
N
= (1− β) + βz  (A) Safe. Deadlocked
(B) Safe. Not Deadlocked
It can be observed that by expanding g y ( z ), we will get (C) Not Safe. Deadlocked
a binomial distribution with n = number of trials = N and, (D) Not Safe, Not Deadlocked
p = Probability of success = β
Solution:  Total there are 9 tape drives
∴ Expectation of Y = E (Y) = np
⇒ E (Y) = Nβ Max. Req. Allocated Required

Hence, the correct option is (B). P1 7 3 4

Question Number: 32 Question Type: MCQ P2 6 1 5


P3 5 3 2
Consider the following expression grammar G :
E−>E−T|T After allocating 3 + 1 + 3 = 7 tape drives, 9 − 7 = 2 tape
T−>T+F|F drives. With these 2 tape drives, the safe sequences possible
F − > (E) | id are < P3, P2, P1> or <P3, P1, P2>
Which of the following grammars is not left recursive, but Hence, the system is in safe state and there is no deadlock.
is equivalent to G? Hence, the correct option is (B).
(A) E − >E − T | T (B) E − > TE
T − > T + F | F E′ − > −TE | ∈ Question Number: 34 Question Type: MCQ
F − > (E) | id T−>T+F|F Consider a binary code that consists of only four valid code-
F − > (E) | id words as given below:
(C) E − > TX (D) E − > TX | (TX) 00000,01011,10101,11110
X − > −TX | ∈ X − > −TX | +TX | ∈
Let the minimum Hamming distance of the code be p and
T − > FY T − > id
the maximum number of erroneous bits that can be cor-
Y − > + FY | ∈
rected by the code be q. Then the values of p and q are
F − > (E) | id
(A) p=3 and q=l
Solution:  The given grammar is : (B) p=3 and q=2
E → E –T |T (C) p=4 and q=1
(D) p=4 and q=2
T →T + F | F
F → (E) | id Solution:  Given code words
00000, 01011, 10101, 11110
Removal of left recursion of above grammar is: The hamming distance is
E → TE1 00000
E1 → -TE1| 01011
T → FT1 ± 01011
T1 → +FT1/E
Hamming distance = 3
F → (E)|id
Similarly, the hamming distance with 00000 and other code
It is similar to option (C) in which E is replaced with X and
1 words 10101, 11110 is 3, 4.
T1 is replaced with Y. The hamming distance between 01011 and 10101 is
Hence, the correct option is (C). 01011
Question Number: 33 Question Type: MCQ 10101
A system shares 9 tape drives. The current allocation and ±11110
maximum requirement of tape drives for three processes are
shown below: Hamming distance = 4
Process Current Allocation Maximum Requirement Similarly, hamming distance 01011 and 11110 is 3.
P1 3 7 Hamming distance between 10101 and 11110 is 3.
P2 1 6 ∴ p = 3.
P3 3 5
GATE 2017 Solved Paper CS: Set – 2  |  xliii

For correcting code, the condition is 12


2d+1=3
d=1
Therefore, the value of q = 1. 8, 6, 2, 7, 9, 10 16, 15, 19, 17, 20

Hence, the correct option is (A). fl

Question Number: 35 Question Type: MCQ 12


Consider two hosts X and Y connected by a single direct
link of rate 106 bits/sec. The distance between the two hosts
is 10.000 km and the propagation speed along the link is 2 16
8
× 108 m/sec. Host X sends a file of 50,000 bytes as one large
message to host Y continuously. Let the transmission and
propagation delays be p milliseconds and q milliseconds, 9 15
6 19
respectively. Then the values of p and q are
(A) p=50 and q=100
(B) p=50 and q=400 2 7 10 17 20

(C) p=100 and q=50


The post order transversal of above tree is 2, 7, 6, 10, 9, 8,
(D) p=400 and q=50
15, 17, 20, 19, 16, 12
Solution: Hence, the correct option is (B).
10,000kms
X Question Number: 37 Question Type: MCQ
Y
10 bps
6
2 × 108 m/s Consider the C program fragment below which is meant to
length of packet divide x by y using repeated subtractions. The variables x,
Transmission time = y, q and r are all unsigned int.
band width
50000×8 while (r >= y) {
= r = r − y;
106
q = q + 1;
= 400 ms
}
distance
propagation time = Which of the following conditions on the variables x, y, q
velocity
and r before the execution of the fragment will ensure that
10000×103 the loop terminates in a state satisfying the condition x ==
=
2×108 (y*q + r)?
= 50 msec (A) (q == r) && (r == 0)
Hence, the correct option is (D). (B) (x > 0) && (r == x) &&(y > 0)
(C) (q == 0) && (r == x) && (y > 0)
Question Number: 36 Question Type: MCQ
(D) (q == 0) && (y > 0)
The pre-order traversal of a binary search tree is given by
12,8,6,2,7,9,10,16,15,19,17,20. Then the post-order tra- Solution:  Given code :
versal of this tree is:
while (r >= y)
(A) 2, 6, 7, 8, 9, 10, 12, 15, 16, 17, 19, 20
{
(B) 2, 7, 6, 10, 9, 8, 15, 17, 20, 19, 16, 12 r = r – y;
(C) 7, 2, 6, 8, 9,10, 20, 17, 19, 15, 16, 12 q = q + 1;
(D) 7, 6, 2, 10, 9, 8, 15, 16, 17, 20, 19, 12 }
the pre-condition for x = = (y * q + r).
Solution:  Given pre order transversal of binary search tree
is 12, 8, 6, 2, 7, 9, 10, 16, 15, 19, 17, 20 Should be r = x, as x ÷ y is computed as r ÷ y. Similarly, q =
0 as the ‘x’ should be equal to ‘r’, i.e., (q = = 0), ‘y’ should
As the transversal is on binary search tree, it follows order-
be greater than 0 as it is unsigned variable (y > 0 ⇒ r > 0
ing property. From the given pre order transversal, 12 is the
⇒ x > 0).
root.
Hence, the correct option is (C).
xliv | GATE 2017 Solved Paper CS: Set – 2

Question Number: 38 Question Type: MCQ δˆ (q2 , aba ) gives all states reachable from q2, while reading
Consider the following C function. aba. So, it can reach q0, q1, q2.
int fun (int n) { Hence, the correct option is (C).
int i, j; Question Number: 40 Question Type: MCQ
for(i = 1; i <= n; i++) {
Consider the following languages.
for (j = l; j < n; j += i) {
printf{“ %d %d”,i, j); Lt = {ap | p is a prime number}
} L2 = {anbmc2m| n ≥ 0, m ≥ 0}
} L3 = {anbnc2n|n ≥ 0}
}
L4 = {anbn | n ≥ 1}
Time complexity of fun in terms of Θ notation is Winch of the following are CORRECT?
I. L1 is context-free but not regular.
(A) Θ n n ( ) (B) Θ(n2) II. L2is not context-free.
(C) Θ(n log n) (D) Θ(n2 log n) III. L3is not context-free but recursive.
IV. L4 is deterministic context-free.
Solution:  Outer for loop in fun() iterates ‘n’ times. (A) I, II and IV only (B) II and III only
n + (i −1) (C) I and IV only (D) III and IV only
For every ‘i’ value, the inner loop executes .
n Solution:  L1 is not context-free.
n +1 n +1 (∵ PDA can not check whether a number is prime or not)
i.e., n + + + ...... + 1
2 3 L2 is CFL.
n
 n + i −1 The PDA pushes two b’s for every b and Pops a, b for every
= ∑  
i=1 
 i  ‘c’.
n
n n n
1 L3 is not accepted by PDA.
= ∑ +∑ 1− ∑
i =1 i i =1 i L3 is accepted by TM and it halts for any input so it is re-
i =1

≅ n (log n) + n – (log n) cursive.


L4 is accepted by DCFL.
≅ θ (n log n)
(∵ Push a’s & Pop ‘a’ for each ‘b’ in input).
Hence, the correct option is (C).
∴ III and IV are correct.
Question Number: 39 Question Type: MCQ Hence, the correct option is (D).
Let δ denote the transition function and d̂ denote the
extended transition function of the ∈-NFA whose transition Question Number: 41 Question Type: MCQ
table is given below: Let L(R) be the language represented by regular expression
R. Let L(G) be the language generated by a context free
δ ∈ a b
grammar G. Let L(M) be the language accepted by a Turing
→q0 {q2} (q1} {q0} machine M. Which of the following decision problems are
q1 {q2} {q2} {q3} undecidable?
q2 {q0} Ø Ø I. Given a regular expression R and a string w, is w ∈
q3 Ø Ø (q2} L(R)?
II. Given a context-free grammar G, is L(G) = Ø ?
Then d̂ (q2, aba) is III. Given a context-free grammar G, is L(G) = ∑* for
(A) Ø (B) {q0, q1, q3} some alphabet ∑ ?
(C) {q0, q1, q2} (D) {q0, q2, q3} IV. Given a Turing machine M and a string w, is w ∈ L(M)?
(A) I and IV only (B) II and III only
Solution:  Given transitions are (C) II, III and IV only (D) III and IV only
b 
Solution:  I is Decidable.
q0 q2 II is Decidable

III is Undecidable
a b
, a
IV is Undecidable
q1 b q3 Hence, the correct option is (D).
GATE 2017 Solved Paper CS: Set – 2  |  xlv

Question Number: 42 Question Type: MCQ if (array[i] < array[i+1]) {


swap(&array[i], &array[i + 1]) ;
The next state table of a 2-bit saturating up-counter is given
done = 0;
below.
}
Q1 Q0 Q1+ Q0+ }
for (i=5; i >=l; i--) {
0 0 0 1 if (array[i] > array[i−l]) {
0 1 1 0 swap(&array[i], & array[i−1]);
1 0 1 1 done = 0;
1 1 1 1 }
}
The counter is built as a synchronous sequential circuit }
using T flip-flops. The expressions for T1 and T0are printf{“%d”, array[3]);
}
T1 = Q1Q0,
(A) T0 = Q1 Q 0
The output of the program is ________.
T1 = Q1Q0,
(B) T0 = Q1 + Q 0 Solution:  The above code sorts the elements in the de-
creasing order. The output array after the code execution is
T1 = Q1 + Q0,
(C) T0 = Q1 + Q 0
0 1 2 3 4 5
T1 = Q1Q0,
(D) T0 = Q1 + Q0 6 5 4 3 2 1
Solution:
So, array [3] contains an element ‘3’, so, it outputs 3.
Q1 Q0 Q1+ Q0+ T1 T0
Hence, the correct answer is (3).
0 0 0 1 0 1
Question Number: 44 Question Type: NAT
0 1 1 0 1 1
Two transactions T1 and T2 are given as
1 0 1 1 0 1
T1 : r1(X)w1 (X)r1 (Y)w1 (Y)
1 1 1 1 0 0
T2 : r2 (Y)w2 (Y)r2 (Z)w2 (Z)
By observation, T1 = Q1 Q0 where ri (V) denotes a read operation by transaction Ti on a
K’ map for T0 variable V and wi (V) denotes a write operation by transac-
tion Ti on a variable V. The total number of conflict serializ-
Q0
0 1 able schedules that can be formed by T1 and T2 is _______.
Q1
Solution:  Number of conflict serializable schedules pos-
0 sible such that T1 is depend on T2 is 1. Number of conflict
1 1
serislizable schedules possible such that T2 is depend on T1
is 53.
1 1 0 ∴ Total possible conflict serializable schedules is 54
Hence, the correct answer is (54).
Question Number: 45 Question Type: NAT
T0 = Q1 + Q0
The read access times and the hit ratios for different caches
T1 = Q1 Q0 , T0 = Q1 + Q0 in a memory hierarchy are as given below.
Hence, the correct option is (B).
Cache Read access time Hit ratio
Question Number: 43 Question Type: NAT (in nanoseconds)
Consider the following snippet of a C program. Assume that I-cache 2 0.8
swap (&x, &y) exchanges the contents of x and y. D-cache 2 0.9
L2-cache 8 0.9
int main () {
int array[] = {3, 5, 1, 4, 6, 2};
The read access time of main memory is 90 nanoseconds.
int done = 0;
Assume that the caches use the referred- word-first read pol-
int i;
icy and the write back policy. Assume that all the caches are
while (done == 0) {
direct mapped caches. Assume that the dirty bit is always 0
done = 1;
for all the blocks in the caches. In execution of a program.
for (i=0; i <=4; i++) {
xlvi | GATE 2017 Solved Paper CS: Set – 2

60% of memory reads are for instruction fetch and 40% are AND ta.goals >ANY (SELECT tc.goals
for memory operand fetch. The average read access time in FROM top_scorer AS tc
nanoseconds (up to 2 decimal places) is __________. WHERE tc. country = ‘Germany’)
The number of tuples returned by the above SQL query is
Solution:  Given there are 60% instruction fetch, 40% op- _________.
erand fetch.
Solution:  Select tb. goals FROM top-scorer AS tb where
For instruction fetch, average memory access time tb. ‘country’ = Spain
= 0.6 [HI * RI + (1 − HI) HL (RI + RL ) + (1 − HI) (1 − HL ) This query returns zero tuples as no country has name
2 2 2
(RI + RL + Rm)] ‘Spain’.
2
= 0.6[0.8 * 2 + (1−0.8) 0.9 (2 + 8) + (1 − 0.8) (1 − 0.9) (2 TC table has below rows:
+ 8 + 90)] tc
= 0.6[1.6 + 1.8 + 2]
tc. goals
= 3.24 ns 16
For operand fetch, 14
Average memory access time 11

= 0.4[HD * RD + (1 − HD) HL (RD + RL ) + (1 − HD) (1 − HL ) 10


2 2 2
(RD + RL + Rm)] ta consists the player name whose goals is > ANY (tc.goals)
2
= 0.4[0.9 * 2 + 0.1 * 0.9 * (2 + 8) + 0.1 * 0.1 * (2 + 8 + 90)] ta
= 0.4 [1.8 + 0.9 + 1] ta.player
= 3.7 * 0.4 = 1.48 ns Klose (∵ 16 >15)
∴ Average memory access time = 3.24 + 1.48 = 4.72
Ronaldo (∵ 15 >14)
Hence, the correct answer is (4.72).
G muller (∵ 14 >11)
Question Number: 46 Question Type: NAT Foundtaine (∵ 13 >10)
Consider the following database table named top_scorer.
Pele (∵ 12 >10)
top_scorer Klinsmann (∵ 11 >10)
player country goals
Kocsis (∵ 11 >10)
Klose Germany 16
Ronaldo Brazil 15
∴ 7 rows returned by given query.
G Miiller Germany 14
Hence, the correct answer is (7).
Fontaine France 13
Pelé Brazil 12
Question Number: 47 Question Type: NAT
Klinsmann Germany 11 If the ordinary generating function of a sequence
Kocsis Hungary 11 ∞ 1+ z
{an }n=0 is 3
then a3 −a0 is equal to __________.
Batistuta Argentina 10 (1− z )
Cubillas Peru 10
Solution:  Given, the generating function of a sequence
Lato Poland 10 ∞
{an }n=0 is
Lineker England 10
T Muller Germany 10 1+ z 1
= 3
= (1 + z ) 3
Rahn Germany 10 (1− z ) (1− z )
∞ 
Consider the following SQL query: = (1 + z )∑ C (3 −1 + r , r ) z r 
 r =0 
SELECT ta.player FROM top_scorer AS ta
WHERE ta.goals >ALL (SELECT tb.goals  1 ∞ 

 (1− X ) n = ∑ C (n −1 + r , r ) X r 
FROM top_scorer AS tb r =0 
WHERE tb.country = ‘Spain’)
GATE 2017 Solved Paper CS: Set – 2  |  xlvii


Question Number: 50 Question Type: NAT
= (1 + z ) ∑ C (2 + r , r ) z r
r =0 A message is made up entirely of characters from the set X
= (1 + z ) C (2, 0) z 0 + C (3,1) z + C (4, 2) z 2 + C (5,3) z 3 + ... = {P, Q, R, S,T}. The table of probabilities for each of the
characters is shown below:
= (1 + z ) 1 + 3 z + 6 z 2 + 10 z 3 + ......
Character Probability
= (1 + 3 z + 6 z + 10 z + ...) + ( z + 3 z + 6 z + 10 z + ...)
2 3 2 3 4
P 0.22

= 1 + 4 z + 9 z 2 + 16 z 3 + ....... Q 0.34

∴ a0 = constant term of the generating function R 0.17

⇒ a0 = 1 S 0.19

a3 = The coefficient of z in the generating function.


3 T 0.08

⇒ a3 = 16 Total 1.00

∴ a3 −a0 = 16 −1 = 15 If a message of 100 characters over X is encoded using


Hence, the correct answer is (15). Huffman coding, then the expected length of the encoded
message in bits is _________.
Question Number: 48 Question Type: NAT
If a random variable X has a Poisson distribution with mean Solution:  Message of 100 characters contains letters P, Q,
5. then the expectation E[(X + 2)2] equals _________. R, S, T with their frequencies 22, 34, 17, 19, 8.
The Huffman tree for the above is:
Solution:  Given X is a Poisson random variable and mean
of X = E(X) = 5 I4

∴ Variance of X = Var (X) = 5


Consider E ( X + 2)  = E  X 2 + 4 X + 4
2

 
= E ( X 2 ) + 4E ( X ) + 4

1
=  var ( X ) + ( E ( X )) + 4 E ( X ) + 4
2 0
 
= 5 + 52 + 4×5 + 4 = 54
Hence, the correct answer is (54). I3 (59)

Question Number: 49 Question Type: NAT


In a B+ tree, if the search-key value is 8 bytes long, the 0
1
block size is 512 bytes and the block pointer size is 2 bytes,
then the maximum order of the B+ tree is __________.

Solution: Given, I2 (41) Q I1 (25)


Search key value V = 8 B (34)

Block Size B = 512 B


Block pointer size P = 2B 0 1
1
0
If the maximum order is m, then
(m × P) + ((m – 1) × V) ≤ B
⇒ m * 2 + ((m – 1) × 8) ≤ 512 P S T
R
⇒ 2 m + 8m – 8 ≤ 512 (22) (19) (17) (8)

⇒ 10m ≤ 520 Number of bits required for each character is


⇒ m ≤ 52 P – 00 – 2 bits × 22 ⇒ 44
∴ maximum order is 52. Q – 10 – 2 bits × 34 ⇒ 68
Hence, the correct answer is (52). R – 110 – 3 bits × 17 ⇒ 51
xlviii | GATE 2017 Solved Paper CS: Set – 2

S – 01 – 2 bits × 19 ⇒ 38 one eigenvalue of M is 2, then the largest among the abso-


T – 111 – 3 bits x 8 ⇒ 24 lute values of the eigenvalues of M is__________.
Total bits required = 225 Solution:  Given the characteristic polynomial of a 3 × 3
Hence, the correct answer is (225). matrix M is λ3 − 4λ2 +aλ + 30, a ∈ 
Also given one eigen value of M is 2.
Question Number: 51 Question Type: NAT
Let λ1 and λ2 be the other two eigen values of M.
Consider the set of processes with arrival time (in millisec-
onds). CPU burst time (in milliseconds). and priority (0 is The characteristic equation of M is
the highest priority) shown below. None of the processes λ3 − 4λ2 + aλ + 30 = 0
have I/O burst time.
We know that,
Process Arrival Time Burst Time Priority Sum of the eigen values of M = − (The coefficient of λ2
P1 0 11 2 in its characteristic equation)
⇒ 2 × λ1 +λ2 = − (−4)
P2 5 28 0
⇒ λ1 + λ2 = 2 (1)
P3 12 2 3
and product of the eigen values of M = −(constant term of
P4 2 10 1 the characteristic equation of M).
P5 9 16 4 ⇒ 2 + λ1 × λ2 = −30
⇒ λ1λ2 = −15(2)
The average waiting time (in milliseconds) of all the pro-
We know that the quadratic equation with λ1 and λ2 as roots
cesses using preemptive priority scheduling algorithm
is
is________.
λ2 − (λ1 + λ2) λ + λ1 λ2 = 0
Solution:  Using preemptive priority scheduling algrithm,
the Gantt chart is as below: ⇒ λ2 − (2) λ − 15 = 0 (From (1) and (2))
⇒ λ − 2λ − 15 = 0
2

P1 P1 P4 P4 P4 P2 P4 P1 P3 P5
⇒ (λ − 5) (λ + 3) = 0
0 1 2 3 4 5 33 40 49 51 67
⇒ λ = 5; λ = −3
i.e., λ1 = 5 and λ2 = −3
P2 (Priority 0)
P4 (Priority 1) ∴ The eigen values of M are −3, 2 and 5.
At time 33 ∴ The largest among the absolute values of the eigen values
of M is 5.
P2 completed, P4 Left with 7 units of burst time.
Hence, the correct answer is (5).
At time 40
Question Number: 53 Question Type: NAT
P4 completed, P1 Left with 9 units of burst time
Consider a machine with a byte addressable main memory
After completion of process execution: of 232 bytes divided into blocks of size 32 bytes. Assume that
waiting time of P1 = 40 – 2 = 38 a direct mapped cache having 512 cache lines is used with
this machine. The size of the tag field in bits is_______.
waiting time of P2 = 0
waiting time of P3 = 49 – 12 = 37 Solution:  Main memory capacity = 232 B
Waiting time of P4 = 33 – 5 = 28 Block size = 32B = 25B
waiting time of P5 = 51 – 9 = 42 Number of lines in cache = 512 = 29
38 + 0 + 37 + 28 + 42 9 5
∴ Average waiting time =
5 Tag Line offset
= 29 ms 
32−bits
Hence, the correct answer is (29).
Tag = 32 − (9 + 5)
Question Number: 52 Question Type: NAT = 18
If the characteristic polynomial of a 3 × 3 matrix M over  Hence, the correct answer is (18).
(the set of real numbers) is λ3 − 4 λ2 + aλ + 30, a ∈ , and
GATE 2017 Solved Paper CS: Set – 2  |  xlix

Question Number: 54 Question Type: NAT n = n − n1; n 11 0


Consider the following C Program. ⇓
#include<stdio.h> n = 10 − 10;
int main () { n = 0;
int m = 10;
The output will result in 0.
int n, nl ;
n = ++m; Hence, the correct answer is (0).
nl = m++; Question Number: 55 Question Type: NAT
n−−;
Consider the following C Program.
−−nl;
n −= nl; #include<stdio.h>
printf (“%d”, n) ; #include<string,h>
return 0; int main () {
} char* c = “GATECSIT2017”;
The output of the program is _____________. char* p = c;
printf{“%d”,
Solution: 
(int) strlen(c+2[p]-6[p]-1)) ;
m 10 return 0;
n = ++m; }
n 11 m 11 The output of the program is __________.
n 1= m ++; Solution:  The expression
n1 11 m 11 12 (c + 2[p] − 6 [p] − 1) will map to the sub string 17, i.e.
n - -;
n 11 10 G A T E C S I T 2 0 1 7
- - n1;
n1 11 10 expression maps
to above character
n− =n1;
⇓ The string length for the expression will result in 2.
Hence, the correct answer is (2).

General Aptitude
Number of Questions: 10  Section Marks: 15

Q.56 to Q.60 carry 1 mark each and Q.61 to Q.65 carry 2 (A) V (B) W
marks each. (C) X (D) Y
Question Number: 56 Question Type: MCQ Ans: (A)
Choose the option with words that are not synonyms.
(A) aversion, dislike (B) luminous, radiant Question Number: 59 Question Type: MCQ
(C) Plunder, loot (D) yielding, resistant A test has twenty questions worth 100 marks in total. There
Ans: (D) are two types of questions. Multiple choice questions are
Question Number: 57 Question Type: MCQ worth 3 marks each and essay questions are worth 11 marks
Saturn is ________ to be seen on a clear night with the each. How many multiple choice questions does the exam
naked eye. have?
(A) enough bright (B) bright enough (A) 12 (B) 15
(C) as enough bright (D) bright as enough (C) 18 (D) 19

Ans: (B) Ans: (B)
Question Number: 58 Question Type: MCQ Question Number: 60 Question Type: MCQ
There are five buildings called V. W. X. Y and Z in a row
There are 3 red socks. 4 green socks and 3 blue socks. You
(not necessarily in that order). V is to the West of W. Z is to
choose 2 socks. The probability that they are of the same
the East of X and the West of V. W is to the West of Y. Which
colour is
is the building in the middle?
l | GATE 2017 Solved Paper CS: Set – 2

(A) 1/5 (B) 7/30 Question Number: 64 Question Type: MCQ
(C) 1/4 (D) 4/15 The number of roots of e + 0.5x − 2 = 0 in the range
x 2

Ans: (D) [−5, 5] is
Question Number : 61 Question Type: MCQ (A) 0 (B) 1
(C) 2 (D) 3
“We lived in a culture that denied any merit to literary
works, considering them important only when they were Ans: (C)
handmaidens to something seemingly more urgent - namely Question Number: 65 Question Type: MCQ
ideology. This was a country where all gestures, even the An air pressure contour line joins locations in a region hav-
most private, were interpreted in political terms.” ing the same atmospheric pressure. The following is an air
The author’s belief that ideology is not as important as lit- pressure contour plot of a geographical region. Contour
erature is revealed by the word: lines are shown at 0.05 bar intervals in this plot.
(A) ‘culture’ (B) ‘seemingly’
R
(C) ‘urgent’ (D) ‘political’
0.65 0.9
Ans: (B)
0.1
Question Number: 62 Question Type: MCQ

0.95
S

0.9
There are three boxes. One contains apples, another contains

5
oranges and the last one contains both apples and oranges. P 0.9
All three are known to be incorrectly labelled. If you are
permitted to open just one box and then pull out and inspect 0.8
only one fruit, which box would you open to determine the Q
contents of all three boxes? 0.75

8
0.
(A) The box labelled ‘Apples’
(B) The box labelled ‘Apples and Oranges’
(C) The box labelled ‘Oranges’ If the possibility of a thunderstorm is given by how fast air
(D) Cannot be determined pressure rises or drops over a region. which of the following
Ans: (B) regions is most likely to have a thunderstorm?
Question Number: 63 Question Type: MCQ (A) P (B) Q
(C) R (D) S
X is a 30 digit number starting with the digit 4 followed by
the digit 7. Then the number X3 will have Ans: (C)
(A) 90 digits (B) 91 digits
(C) 92 digits (D) 93 digits
Ans: (A)
GATE 2018 Solved Paper
CS: Computer Science and Information Technology
Set – 1
Number of Questions: 65 Total Marks: 100.0
Wrong answer for MCQ will result in negative marks, (-1/3) for 1 Mark Questions and (-2/3) for 2 Marks Question.

General Aptitude
Number of Questions: 10 Section Marks: 15

Q.1 to Q.5 carry one mark each. (A) 3047 (B) 6047
Question Number: 1 Question Type: MCQ (C) 7987 (D) 63847
“From where are they bringing their books? ______ bring- Solution:  The LCM of 20, 42, 76 = 20 (3) (7) (19)
ing ______ books from ______.” = 7980.
The words that best fill the blanks in the above sentence are: The required number is 7987.
(A) Their, they’re, there (B) They’re, their, there Hence, the correct option is (C).
(C) There, their, they’re (D) They’re, there, there Question Number: 5 Question Type: MCQ
What is the number missing in the following sequence?
Solution: The words that are apt for the three blanks are
“they’re” (which is a contraction of “they are”), “their” 2, 12, 60, 240, 720, 1440, ______, 0
(which means “belonging to the people previously men- (A) 2880 (B) 1440
tioned) and “there” (which means in that place). (C) 720 (D) 0
Hence, the correct option is (B). Solution:  2, 12, 60, 240, 720, 1440, ______, 0
Question Number: 2 Question Type: MCQ 2 12 60 240 720 1440 1440
“A ___ investigation can sometimes yield new facts, but
typically organized ones are more successful.”
2×6 12×5 60×4 240×3 720×2 1440×
The word best fills the blank in the above sentence is:
(A) meandering (B) timely The blank value will be 1440.
(C) consistent (D) systematic Hence, the correct option is (B).

Solution:  A process or activity that does not seem to have Q.6 to Q.10 carry two marks each.
a clear purpose or direction is said to meander. Thus, “me- Question Number: 6 Question Type: MCQ
andering” is the apt word; the sentence suggests that a me- In appreciation of the social improvements completed in a
andering investigation might yield new facts, but organized town, a wealthy philanthropist decided to gift `750 to each
ones are more successful. male senior citizen in the town and `1000 to each female
Hence, the correct option is (A). senior citizen. Altogether, there were 300 senior citizens
Question Number: 3 Question Type: MCQ eligible for this gift. However, only 8/9th of the eligible men
and 2/3rd of the eligible women claimed the gift. How much
The area of a square is d. What is the area of the circle which
money (in Rupees) did the philanthropist give away in total?
has the diagonal of the square as its diameter?
(A) 1,50,000 (B) 2,00,000
(A) πd (B) πd 2
(C) 1,75,000 (D) 1,51,000
1 2 1
(C) pd (D) pd Solution:  Let the number of men be 9x and the number
4 2
of women be 3y. (8/9 of the number of men and 2/3 of the
Solution:  The area of the square is d. Its side is d . Its di- number of women are integers)
∴ 9x + 3y = 300
agonal is 2d . This is the diameter of the circle. Therefore,
π(2d ) πd ⇒ 3x + y = 100 (1)
the area of the circle = = ⋅ 8x men and 2y women claimed the gift.
4 2
Hence, the correct option is (D). Amount given
= 750(8x) + 1000(2y)
Question Number: 4 Question Type: MCQ
= 6000x + 2000y (2)
What would be the smallest natural number which when
divided either by 20 or by 42 or by 76 leaves a remainder of = 6000x + 2000(100 – 3x)
7 in each case? = 200,000x

GATE_CSIT-2018.indd 51 5/2/2018 3:33:20 PM


lii | GATE 2018 Solved Paper CS: Set – 1

If x is an integer, among the options only B satisfies the (A) ∠BCD – ∠BAD
condition. (B) ∠BAD + ∠BCF
Hence, the correct option is (B). (C) ∠BAD + ∠BCD
(D) ∠CBA + ∠ADC
Question Number: 7 Question Type: MCQ
1 −y 1 1 Solution:
If pqr ≠ 0 and p − x = ,q = , r − z = , what is the
q r p E
value of the product xyz?
1
(A) –1 (B)
pqr D C
F
(C) 1 (D) pqr
1 1 1 B
Solution:  p–x = , q − y = , r − z =
q r p A
x y z
∴ p = q, q = r, r = p ∠E + ∠F + ∠A = ∠ECF = ∠BCD
p = rz = (qy)z = pxyz \ ∠E + ∠F = ∠BCD − ∠A
If p ≠ –1, 0 or 1, then xyz = 1 = ∠BCD − ∠BAD
The condition that p = –1 or 1 is not given, only with this Hence, the correct option is (A).
condition we can conclude that xyz = 1. But as cannot be
determined is not an option, we select 1. Question Number: 10 Question Type: MCQ
Hence, the correct option is (C). A six sided unbiased die with four green faces and two red
Question Number: 8 Question Type: MCQ faces is rolled seven times. Which of the following combi-
nations is the most likely outcome of the experiment?
In a party, 60% of the invited guests are male and 40% are
female. If 80% of the invited guests attended the party and (A) Three green faces and four red faces.
if all the invited female guests attended, what would be the (B) Four green faces and three red faces.
ratio of males to females among the attendees in the party? (C) Five green faces and two red faces.
(A) 2:3 (B) 1:1 (D) Six green faces and one red face.
(C) 3:2 (D) 2:1
Solution:  The most likely outcome in the one where the
Solution:  Let the number of invited men and women be
ratio of the number of green and red faces in closest to 2:1.
6 and 4. All the women attended. Overall 80% attended.
This is 5g, 2r. We may want to consider 4g, 3r.
Therefore, 4 men and 4 women attended. The required ratio
is 1:1. 2 5 1 2
P(5g, 2r) = 7C5     = 32(21)/37

Hence, the correct option is (B).  3 3

Question Number: 9 Question Type: MCQ = 16(42)/37
In the figure below, ∠DEC + ∠BFC is equal to ______.
2 4 1 3

P(4g, 3r) = 7C4     = 16(35)/37
E  3 3

C
We see that 5g, 2r is more probable.
D
F
Hence, the correct option is (C).
A B

Computer Science and Information Technology


Number of Questions: 55 Section Marks: 85

Q.1 to Q.25 carry one mark each. 3 3x


(A) 2
(B) 2
(1 − x ) (1 − x )
Question Number: 1 Question Type: MCQ
Which one of the following is a closed form expression
2−x 3− x
for the generating function of the sequence {an}, where (C) 2
(D) 2
an = 2n + 3 for all n = 0, 1, 2, ...? (1 − x ) (1 − x )

GATE_CSIT-2018.indd 52 5/2/2018 3:33:21 PM


GATE 2018 Solved Paper CS: Set – 1  |  liii

Solution:  The generating function of the given sequence


{an}, where an = 2n + 3 for all n = 0, 1, 2, ... is

F(x) = ∑ (2n + 3) x n head tail
n=0
Which one of the following is the time complexity of
= 3 + 5x + 7x2 + 9x3 + 11x4 + ...
the most time-efficient implementation of enqueue and
= (3 + 6x + 9x2 + 12x3 + 15x4 + ...) dequeue, respectively, for this data structure?
– (x + 2x2 + 3x3 + 4x4 + ...) (A) q(1), θ(1) (B) θ(1), θ(n)
= 3(1 + 2x + 3x2 + 4x3+ ...) (C) θ(n), θ(1) (D) θ(n), θ(n)
– x(1 + 2x + 3x2 + 4x3 + ...) Solution:  As the enqueue operation is done at header of
1 1 3− x linked list, if will take θ(1) time.
= 3⋅ 2
−x 2
= Dequeue() takes θ(n) time—as tail points last node of
(1 − x ) (1 − x ) (1 − x )2
linked list, after deletion it takes ‘n’ computations to reach
Hence, the correct option is (D). last node.
Question Number: 2 Question Type: MCQ Hence, the correct option is (B).
Consider the following C program. Question Number: 4 Question Type: MCQ
#include<stdio.h> Let ⊕ and  denote the Exclusive OR and Exclusive NOR
struct Ournode { operations, respectively. Which one of the following is NOT
char x, y, z; CORRECT?
} ; (A) P ⊕ Q = P  Q
Int main () { (B) P ⊕ Q = P  Q
struct Ournode p = {‘1’, ‘0’, ‘a’+2}; (C) P ⊕ Q = P ⊕ Q
struct Ournode *q = &p; (D) ( P ⊕ P ) ⊕ Q = ( P  P )  Q
printf (“%c, %c”, *( (char*)q+1),
Solution:  ( P ⊕ P ) ⊕ Q = ( P  P )  Q
* ( (char*)q+2) );
1 ⊕ Q ≠ 0  Q
return 0;
Q ≠ Q
}
Hence, the correct option is (D).
The output of this program is:
(A) 0, c Question Number: 5 Question Type: MCQ
(B) 0, a+2 Consider the following processor design characteristics.
(C) ‘0’, ‘a+2’ I. Register-to-register arithmetic operations only
(D) ‘0’, ‘c’ II. Fixed-length instruction format
III. Hardwired control unit
Solution: 
Which of the characteristics above are used in the design of
P→ 1 0 ‘a’ + 2
a RISC processor?
(A) I and II only (B) II and III only
  
q q+1 q+2 (C) I and III only (D) I, II and III

*((char*) q + 1)⇒0 Solution:  Characteristics of RISC:


OO The operations are done in the register of the CPU.
*((char*) q + 2)⇒‘a’+2
OO It has fixed length, easily decoded instruction format
   ⇒c
OO It uses Hard wired control unit rather than micro pro-
The output of program is 0, c
grammed control.
Hence, the correct option is (A).
Hence, the correct option is (D).
Question Number: 3 Question Type: MCQ
A queue is implemented using a non-circular singly linked Question Number: 6 Question Type: MCQ
list. The queue has a head pointer and a tail pointer, as Let N be an NFA with n states. Let k be the number of states
shown in the figure. Let n denote the number of nodes in of a minimal DFA which is equivalent to N. Which one of
the queue. Let enqueue be implemented by inserting a new the following is necessarily true?
node at the head, and dequeue be implemented by deletion (A) k ≥ 2n (B) k≥n
of a node from the tail. (C) k ≤ n2 (D) k ≤ 2n

GATE_CSIT-2018.indd 53 5/2/2018 3:33:22 PM


liv | GATE 2018 Solved Paper CS: Set – 1

Solution:  The maximum number of states minimal DFA (T) The processor loads the new PC value based on the
can have is 2n, when we convert NFA → DFA. interrupt.
∴ k ≤ 2n Which one of the following is the correct order in which the
events above occur?
Hence, the correct option is (D).
(A) QPTRS
Question Number: 7 Question Type: MCQ
(B) PTRSQ
The set of all recursively enumerable languages is: (C) TRPQS
(A) Closed under complementation. (D) QTPRS
(B) Closed under intersection.
(C) A subset of the set of all recursive languages. Solution:  Option (A) gives the correct sequence of the
(D) An uncountable set. events that occur after a device controller issues an inter-
rupt while process ‘L’ is under execution.
Solution:  The set of all recursively enumerable language is Hence, the correct option is (A).
closed under intersection. Question Number: 10 Question Type: MCQ
Hence, the correct option is (B).
Consider a process executing on an operating system that
Question Number: 8 Question Type: MCQ uses demand paging. The average time for a memory access
Which one of the following statements is FALSE? in the system is M units if the corresponding memory page
(A) Context-free grammar can be used to specify both is available in memory and D units if the memory access
lexical and syntax rules. causes a page fault. It has been experimentally measured
(B) Type checking is done before parsing. that the average time taken for a memory access in the pro-
(C) High-level language programs can be translated to cess is X units.
different Intermediate Representations. Which one of the following is the correct expression for the
(D) Arguments to a function can be passed using the page fault rate experienced by the process?
program stack. (A) (D – M)/(X – M)
Solution:  The parsing is implemented at syntax analysis (B) (X – M/(D – M)
phase of complier, whereas type checking is done by se- (C) (D – X/(D – M)
mantic analysis phase. (D) (X – M/(D – X)
Solution:  Effective memory access time
= (1 – α) ∗ memory access time
+ α (page fault overhead)
Syntax analyser α = page fault rate
From given data,
X = (1 – α) × M + α × D
Semantic analyser
X = M – αM + αD
X −M
α =
D−M
Hence, the correct option is (B).
Type checking is done after parsing, as syntax analysis is
Question Number: 11 Question Type: MCQ
done before semantic analysis.
In an Entity-Relationship (ER) model, suppose R is a many-
Hence, the correct option is (B).
to-one relationship from entity set E1 to entity set E2.
Question Number: 9 Question Type: MCQ Assume that E1 and E2 participate totally in R and that the
The following are some events that occur after a device con- cardinality of E1 is greater than the cardinality of E2.
troller issues an interrupt while process L is under execution. Which one of the following is true about R?
(P) The processor pushes the process status of L onto (A) Every entity in E1 is associated with exactly one
the control stack. entity in E2.
(Q) The processor finishes the execution of the current (B) Some entity in E1 is associated with more than one
instruction. entity in E2.
(R) The processor executes the interrupt service rou- (C) Every entity in E2 is associated with exactly one
tine. entity in E1.
(S) The processor pops the process status of L from (D) Every entity in E2 is associated with at most one
the control stack. entity in E1.

GATE_CSIT-2018.indd 54 5/2/2018 3:33:22 PM


GATE 2018 Solved Paper CS: Set – 1  |  lv

Solution Field Length in bits


R. IPv6 Next Header III. 32
M I
E1 R E2 S. TCP Header’s Sequence Number IV. 16

(A) P-III, Q-IV, R-II, S-I


(B) P-II, Q-I, R-IV, S-III
(C) P-IV, Q-I, R-II, S-III
(D) P-IV, Q-I, R-III, S-II
E1 > E2
Solution:
Every entity in E1 is associated with exactly one entity in E2.
OO UDP Header port Number is 16 bits
Hence, the correct option is (A).
OO The Ethernet MAC Address = 48 bits

Question Number: 12 Question Type: MCQ OO The length of IPV next header is 8 bits
6
Consider the following two tables and four queries in SQL. OO The sequence number field in TCP header is 4 bytes,
Book (isbn, bname), Stock (isbn, copies) which is 32 bits.
Query 1: SELECT B.isbn, S.copies Hence, the correct option is (C).
FROM Book B INNER JOIN Stock S
ON B.isbn = S.isbn; Question Number: 14 Question Type: MCQ
Query 2: SELECT B.isbn, S.copies Consider the following statements regarding the slow start
FROM Book B LEFT OUTER phase of the TCP congestion control algorithm. Note that
JOIN Stock S cwnd stands for the TCP congestion window and MSS
ON B.isbn = S.isbn; denotes the Maximum Segment Size.
Query 3: SELECT B.isbn, S.copies (i) The cwnd increases by 2 MSS on every successful
FROM Book B RIGHT OUTER acknowledgment.
JOIN Stock S (ii) The cwnd approximately doubles on every suc-
ON B.isbn = S.isbn; cessful acknowledgement.
Query 4: SELECT B.isbn, S.copies (iii) The cwnd increases by 1 MSS every round trip
FROM Book B FULL OUTER time.
JOIN Stock S (iv) The cwnd approximately doubles every round trip
ON B.isbn = S.isbn; time.
Which one of the queries above is certain to have an output Which one of the following is correct?
that is a superset of the outputs of the other three queries? (A) Only (ii) and (iii) are true
(A) Query 1 (B) Query 2 (B) Only (i) and (iii) are true
(C) Query 3 (D) Query 4
(C) Only (iv) is true
Solution:
1. The natural join will return only those values which are (D) Only (i) and (iv) are true
common in both the tables. Solution:  Slow start phase of TCP congestion control al-
2. The left outer join will gives all rows from left table gorithm:
with null values, if right side table is not having match.
Each time an ACK is received the congestion window is
3. The right outer join will gives all rows from table on
increased by one segment.
right hand side with null values, if left hand side table
is not having the match. So, cwnd approximately doubles every round trip time.
4. Full outer join will gives all rows in output which are Hence, the correct option is (C).
common in both tables, present in left table only or Question Number: 15 Question Type: NAT
right table only.
Two people, P and Q, decide to independently roll two iden-
Hence, the correct option is (D).
tical dice, each with 6 faces, numbered 1 to 6. The person
Question Number: 13 Question Type: MCQ with the lower number wins. In case of a tie, they roll the
Match the following: dice repeatedly until there is no tie. Define a trial as a throw
of the dice by P and Q. Assume that all 6 numbers on each
Field Length in bits dice are equi-probable and that all trials are independent.
P. UDP Header’s Port Number I. 48 The probability (rounded to 3 decimal places) that one of
Q. Ethernet MAC Address II. 8 them wins on the third trial is ______.

GATE_CSIT-2018.indd 55 5/2/2018 3:33:23 PM


lvi | GATE 2018 Solved Paper CS: Set – 1

Solution:  Let A = The event of both P and Q getting same Question Number: 17 Question Type: NAT
number on the dice in one trial and B = The event of P and 1 1
Q getting different numbers on the dice in one trial. Consider a matrix A = uvT where u =   , v =   ⋅ Note
2
  1
6 1 30 5
\ P(A) = = =
and P ( B ) = that vT denotes the transpose of v. The largest eigen value of
36 6 36 6 A is ______.
∴ The probability that one of them wins on the third
trial 1 1
Solution:  Given u =   and v =  
2 1
= P(A ∩ A ∩ B)  
= P(A) P(A) P(B) 1 1 1 
∴ A = uvT =   (1 1) =  2 2 
(∴ A and B are independent) 2
1 1 5 As det (A) = 0, one of the eigen values of A is 0.
= × ×
6 6 6 Let λ be the other eigen value of A
5 ∴ 0 + λ = Trace (A)
= = 0.023
216 ⇒ λ = 1 + 2 = 3
Hence, the correct answer is 0.021 to 0.024. So, the largest eigen value of A is 3.
Hence, the correct answer is (3).
Question Number: 16 Question Type: NAT
π/4 Question Number: 18 Question Type: NAT
The value of ∫ x cos ( x 2 ) dx correct to three decimal The chromatic number of the following graph is ______.
0
places (assuming that π = 3.14) is ______.
a e
π/4
Solution:  Let I = ∫ x cos ( x 2 ) dx (1)
0 
c d
2
Put x = t
⇒ 2x dx = dt
1 b f
⇒ xdx = dt
2
Solution:  The chromatic number of the given graph is 3.
At x = 0; t = 02 = 0
2
π π π2 1
and at x = ; t =  = 2
4 4 16 a e

∴ Equation (1) becomes, 3


π/4 c
I = ∫ x cos ( x 2 ) dx d
0 2 b f
π/4 3
= ∫ (cos ( x )) ( x dx ) 2
Hence, the correct answer is (3).
0
Question Number: 19 Question Type: NAT
π2 /16
1 Let G be a finite group on 84 elements. The size of a largest
= ∫ (cos (t )) dt
2 possible proper subgroup of G is ______.
t =0
2
Solution  Given order of G = O(G) = 84
π /16
1
= sin t  Any proper subgroup of G will have order less than 84.
2 0 Also, we know that the order of a subgroup of a finite group
divides the order of the group.
1   π2   ∴ The size of a largest possible proper subgroup of G.
=  sin   − sin 0 
2   16   = The largest divisor of 84 that is less than 84
= 0.289 = 42
Hence, the correct answer is 0.27 to 0.30. Hence, the correct answer is (42).

GATE_CSIT-2018.indd 56 5/2/2018 3:33:24 PM


GATE 2018 Solved Paper CS: Set – 1  |  lvii

Question Number: 20 Question Type: NAT }


The postorder traversal of a binary tree is 8, 9, 6, 7, 4, 5, 2, }
3, 1. The inorder traversal of the same tree is 8, 6, 9, 4, 7, int main () {
2, 5, 1, 3. The height of a tree is the length of the longest calc (4, 81);
path from the root to any leaf. The height of the binary tree printf (“%d”, counter);
above is ______. }
Solution:  Postorder: 8, 9, 6, 7, 4, 5, 2, 3, 1 The output of this program is ______.
In order: 8, 6, 9, 4, 7, 2, 5, 1, 3
Solution: 
calc (4, 81)

8694725 1 3
Counter = 1 calc (4, 27)

1
Counter = 2 calc (4, 9)
3
86947 2 5
Counter = 3 calc (4, 3)

1
Counter = 4
2 3
The output of this program is 4.
869 4 7
5 Hence, the correct answer is (4).
Question Number: 22 Question Type: NAT
1 Consider the sequential circuit shown in the figure, where
both flip-flops used are positive edge-triggered D flip-flops.
2 3

4 5
in out
8 6 9 7

D Q D Q
Clock

1 - - - - - - - - - - - - root level 0
The number of states in the state transition diagram of this
2 3 - - - - - - - - - - - level 1
circuit that have a transition back to the same state on some
4 5 - - - - -- - - - - - - - - - - level 2
value of “in” is ______.

6 7 - - - - - - - - - -- - - - - - - - - - - level 3 Solution:

8 9 - - - - - - - - - - - - - -- - - - - - - - - - - level 4
A B
In D Q D Q Out
Hence, the correct answer is (4).
Question Number: 21 Question Type: NAT
Consider the following C program: Clock
#include <stdio.h>
int counter = 0; p.s x DA DB n.s Out
int calc (int a, int b) {
A B A B B
int c;
0 0 0 0 0 0 0 0
counter++;
0 0 1 1 0 1 0 0
if (b==3) return (a*a*a);
0 1 0 0 0 0 0 0
else {
c = calc (a, b/3); 0 1 1 1 0 1 0 0

return (c*c*c); 1 0 0 0 1 0 1 1

GATE_CSIT-2018.indd 57 5/2/2018 3:33:25 PM


lviii | GATE 2018 Solved Paper CS: Set – 1

p.s x DA DB n.s Out Question Number: 24 Question Type: NAT


A B A B B Consider a system with 3 processes that share 4 instances
1 0 1 1 1 1 1 1
of the same resource type. Each process can request a maxi-
mum of K instances. Resource instances can be requested
1 1 0 0 1 0 1 1
and released only one at a time. The largest value of K that
1 1 1 1 1 1 1 1
will always avoid deadlock is ______.
States transition diagram of the above sequential circuit is Solution:  There are 3 processes and 4 resources, one pro-
as shown below: cess can be able to obtain two resources.
Maximum number of instances a process can request will
0/0 be 2.
P1→1 

00 P2→1  + 1
0/0
P3→1 
1/1
1/0 Hence, the correct answer is (2).
0/1 01
0/1 Question Number: 25 Question Type: NAT
11
Consider a long-lived TCP session with an end-to-end
1/1
bandwidth of 1 Gbps (= 109 bits-per-second). The session
1/0
10 starts with a sequence number of 1234. The minimum time
(in seconds, rounded to the closest integer) before this
\ the number of states in the state transition diagram of this sequence number can be used again is _______.
circuit that have a transition back to the same states on some Solution:  TCP sequence number field has 4 bytes i.e.,
value of “in” is 2. 32 bits.
Hence, the correct answer is (2). In one second, 109 bits are transferred.
Question Number: 23 Question Type: NAT Amount of time required to lapse sequence numbers are
A 32-bit wide main memory unit with a capacity of 1 GB is 232 × 8
= 34.35 sec.
built using 256 M × 4-bit DRAM chips. The number of rows 109
of memory cells in the DRAM chip is 214. The time taken
Hence, the correct answer is (34).
to perform one refresh operation is 50 nanoseconds. The
refresh period is 2 milliseconds. The percentage (rounded Q.26 to Q.55 carry two marks each.
to the closest integer) of the time available for performing Question Number: 26 Question Type: MCQ
the memory read write operations in the main memory unit
Consider a matrix P whose only eigenvectors are the mul-
is ______.
1 
Solution:  Given main memory capacity = 1 GB tiples of   ⋅
Having 256 × 4-bit DRAM chips 4
Number of memory cells rows in DRAM chip is Consider the following statements.
214 = 16 K (I) P does not have an inverse
(II) P has a repeated eigen value
Total time for refreshing, if one refreshing takes 50 nano-
(III) P cannot be diagonalized
seconds
Which one of the following options is correct?
= 16 K × 50 ns
(A) Only I and III are necessarily true
= 800 µ sec = 0.8 m sec. (B) Only II is necessarily true
Given refresh period (C) Only I and II are necessarily true
= 2 m sec (D) Only II and III are necessarily true
Out of 2 m sec, 0.8 m sec is used for refreshing and remain- Solution:  Given that any eigen vector of a matrix P is a
ing 1.2 msec is used for RD/WR operation.
1 
Percentage of time available for Read/Write operation multiple of   ⋅
4
1.2 m sec
= × 100 1 
2 m sec As every eigen vector of P is a multiple of   ,
4
= 60%.
Hence, the correct answer is 59 to 60. P has only one linearly independent eigen vector.

GATE_CSIT-2018.indd 58 5/2/2018 3:33:25 PM


GATE 2018 Solved Paper CS: Set – 1  |  lix

As P is a 2 × 2 matrix, if the two eigen values of P are distinct, Question Number: 28 Question Type: MCQ
then P should have two linearly independent eigen vectors. Consider the first-order logic sentence
So, P has a repeated eigen value j = ∃ s ∃ t ∃ u∀v∀w∀x∀yψ( s, t , u, v, w, x, y )
Hence, statement (II) is correct. where ψ( s, t , u, v, w, x, y ) is a quantifier-free first-order
A 2 × 2 matrix is diagonalizable if and only if it has two logic formula using only predicate symbols, and possibly
linearly independent eigen vectors. equality, but no function symbols. Suppose ϕ has a model
But P has only one linearly independent eigen vector. with a universe containing 7 elements.
Hence P is not diagonalizable. Which one of the following statements is necessarily true?
So, statement (III) is correct. (A) There exists at least one model of ϕ with universe
P need not be a singular matrix. of size less than or equal to 3.
(B) There exists no model of ϕ with universe of size
So, statement (I) is not correct.
less than or equal to 3.
∴ Only statements (II) and (III) are necessarily correct. (C) There exists no model of ϕ with universe of size
Hence, the correct option is (D). greater than 7.
Question Number: 27 Question Type: MCQ (D) Every model of ϕ has a universe of size equal to 7.
Let N be the set of natural numbers. Consider the following Solution:  There exists atleast one model of ϕ with universe
sets. of size less than or equal to 3.
P: Set of Rational numbers (positive and negative) Hence, the correct option is (A).
Q: Set of functions from {0, 1} to N Question Number: 29 Question Type: MCQ
R: Set of functions from N to {0, 1}
Consider the following C program:
S: Set of finite subsets of N.
#include<stdio.h>
Which of the sets above are countable?
void fun1 (char *s1, char * s2) {
(A) Q and S only (B) P and S only
char *tmp;
(C) P and R only (D) P, Q and S only
tmp = s1;
Solution:  We know that the set of rational numbers is
countable. So, P is countable. s1 = s2
s2 = tmp;
Q: set of functions from {0, 1} to N.
As 0 can be mapped to a number in N ways and }
1 can be mapped to a number in N ways, void fun2 (char **s1, char **s2) {
The number of elements in the set of functions char *tmp;
from {0, 1} to N tmp = *s1;
= The number of elements in the Cartesian product *s1 = *s2;
N×N *s2 = tmp;
We know that the Cartesian product of two count- }
able sets is countable. int main () {
As N is countable, N × N is countable char *str1 = “Hi”, *str2 = “Bye”;
So, Q is countable. fun1 (str1, str2);
R: Set of functions from N to { 0, 1} printf (“%s %s “, str1, str2);
In a function from N to {0, 1}, fun2 (&str1, &str2);
Every element of N is mapped to 0 or 1
printf (“%s %s”, str1, str2);
So, the number of ways of mapping any element of
return 0;
N is 2.
}
∴ The number or elements in the set of functions
from N to {0, 1} The output of the program above is:
= The number of elements in the power set of N (A) Hi Bye Bye Hi (B) Hi Bye Hi Bye
But the power set of N is uncountable because the (C) Bye Hi Hi Bye (D) Bye Hi Bye Hi
power set of a infinite countable set is uncountable. Solution: 
So R is uncountable.
S: Set of finite subsets of N. 100 H i 10
As we are considering only the finite subsets of N, Str 1 100
S is a countably infinite set.
So, only P, Q and S are countable. 200 B y e 10
Hence, the correct option is (D). Str 2 200

GATE_CSIT-2018.indd 59 5/2/2018 3:33:26 PM


lx | GATE 2018 Solved Paper CS: Set – 1

main ( ) (C) F3F4 only


fun 1 ( ) (D) F1F2 and F4F5 only

Str 2 Solution:  Use Parenthesization ((F1(F2(F3F4)))F5)


Str 1
F3F4 = 48 [16 × 3 × 1]
(F2(F3F4)) = 75 [25 × 3 × 1]
100 200
(F1(F2(F3F4))) = 50 [2 × 25 × 1]
S1 S2
((F1(F2(F3F4)))F5) = 2000 [2 × 1 × 1000]
fun 2 ( ) ∴ Total no. of multiplication required
= 2000 + 50 + 75 + 48
Str 1 Str 2 Str 2 Str 1 = 2173 (minimum number of
multiplications).
S1 S2 Hence, the correct option is (C).

The output of the program is Hi Bye Bye Hi Question Number: 32 Question Type: MCQ
Hence, the correct option is (A). Consider the following C code. Assume that unsigned long
int type length is 64 bits.
Question Number: 30 Question Type: MCQ unsigned long int fun (unsigned long int n) {
Let G be a simple undirected graph. Let TD be a depth first unsigned long int i, j = 0, sum = 0;
search tree of G. Let TB be a breadth first search tree of G. for (i = n; i > 1. i = i/2) j++;
Consider the following statements. for (; j > 1; j = j/2) sum++;
(I) No edge of G is a cross edge with respect to TD. return (sum);
(A cross edge in G is between two nodes neither of }
which is an ancestor of the other in TD.) The value returned when we call fun with the input 240 is:
(II) For every edge (u, v) of G, if u is at depth i and v is
(A) 4 (B) 5
at depth j in TB, then |i – j| = 1.
(C) 6 (D) 40
Which of the statements above must necessarily be true?
(A) I only (B) II only Solution:  For input 240, j get incremented to ‘40’
(C) Both I and II (D) Neither I nor II j = 40 j = 20 j = 10 j=5 j=2
sum=1 sum=2 sum=3 sum=4 sum=5
Solution:  In DFS of an undirected graph, we will not get
cross edge since all edges that are incident on a vertex are Hence, the correct option is (B).
explored.
In directed graph, if we apply DFS, then we may get cross Question Number: 33 Question Type: MCQ
edge. Consider the unsigned 8-bit fixed point binary number rep-
Hence, the correct option is (A). resentation below:
b7 b6 b5 b4 b3 ⋅ b2 b1 b0
Question Number: 31 Question Type: MCQ
where the position of the binary point is between b3 and b2.
Assume that multiplying a matrix G1 of dimension p × q Assume b7 is the most significant bit. Some of the decimal
with another matrix G2 of dimension q × r requires pqr sca- numbers listed below cannot be represented exactly in the
lar multiplications. Computing the product of n matrices above representation:
G1G2G3, ..., Gn can be done by parenthesizing in different
(i) 31.500 (ii) 0.875
ways. Define Gi Gi+1 as an explicitly computed pair for a
(iii) 12.100 (iv) 3.001
given paranthesization if they are directly multiplied. For
Which one of the following statements is true?
example, in the matrix multiplication chain G1G2G3G4G5G6
using parenthesization (G1(G2G3))(G4(G5G6)), G2G3 and (A) None of (i), (ii), (iii), (iv) can be exactly represent-
G5G6 are the only explicitly computed pairs. ed
(B) Only (ii) cannot be exactly represented
Consider a matrix multiplication chain F1F2F3F4F5, where
(C) Only (iii) and (iv) cannot be exactly represented
matrices F1, F2, F3, F4, and F5 are of dimensions 2 × 25,
(D) Only (i) and (ii) cannot be exactly represented
25 × 3, 3 × 16, 16 × 1 and 1 × 1000, respectively. In the
parenthesization of F1F2F3F4F5 that minimizes the total Solution:  Binary representation of given numbers are:
number of scalar multiplications, the explicitly computed (i) (31.500)10 = (11111.100)2
pairs is/are: (ii) (0.875)10 = (00000.111)2
(A) F1F2 and F3F4 only (iii) (12.100)10 = (01100.000110011...)2
(B) F2F3 only (iv) (3.001)10 = (00011.0000000001...)2

GATE_CSIT-2018.indd 60 5/2/2018 3:33:26 PM


GATE 2018 Solved Paper CS: Set – 1  |  lxi

Fraction part in the given representation is of only 3-bits, Question Number: 36 Question Type: MCQ
(iii) and (iv) can’t be represented accurately due to lack of Consider the following problems. L(G) denotes the lan-
storage. guage generated by a grammar G. L(M) denotes the lan-
Hence, the correct option is (C). guage accepted by a machine M.
Question Number: 34 Question Type: MCQ (I) For an unrestricted grammar G and a string w,
whether w ∈ L(G)
The size of the physical address space of a processor is
(II) Given a Turing machine M, whether L(M) is regu-
2P bytes. The word length is 2W bytes. The capacity of
lar
cache memory is 2N bytes. The size of each cache block is
(III) Given two grammars G1 and G2, whether L(G1)
2M words. For a K-way set-associative cache memory, the
= L(G2)
length (in number of bits) of the tag field is:
(IV) Given and NFA N, whether there is a determinis-
(A) P – N – log2 K tic PDA P such that N and P accept the same lan-
(B) P – N + log2 K guage.
(C) P – N – M – W – log2 K Which one of the following statements is correct?
(D) P – N – M – W + log2 K
(A) Only I and II are undecidable
Solution:  Given main memory space
(B) Only III is undecidable
= 2M bytes (C) Only II and IV are undecidable
Physical address size = ‘P’ bits (D) Only I, II and III are undecidable
Cache memory size = 2N bytes
Solution
Then size of the block = (2M+W) B (2M words ×
I. Membership problem of unrestricted grammar (i.e.
2W bytes/word)
REL) is undecidable as there is a possibility of etering
Number of lines = 2N–M–W into infinite loop.
Number of Cache memory II. Every regular language is REL, but REL may or may
Number of sets =
P -way not be regular. (undecidable)
III. As the type of grammar is not given, the equivalence
2 N − M −W problem is undecidable in REL.
=
log K IV. Every regular language is Deterministic CFL. (decid-
2
able)
∴ The Tage size will be
Hence, the correct option is (D).
= P – (M + W – log2 K + M + W)
Question Number: 37 Question Type: MCQ
= P – N + log2 K.
A lexical analyzer uses the following patterns to recognize
Hence, the correct option is (B).
three tokens T1, T2, and T3 over the alphabet {a, b, c}.
Question Number: 35 Question Type: MCQ T1: a?(b|c)*a
Consider the following languages: T2: b?(a|c)*b
I. {ambncpdq | m + p = n + q, where m, n, p, q ≥ 0} T3: c?(b|a)*c
II. {ambncpdq | m = n and p = q, where m, n, p, q ≥ 0}
Note that ‘x?’ means 0 or 1 occurrence of the symbol x.
III. {ambncpdq | m = n = p and p ≠ q, where m, n, p,
Note also that the analyzer outputs the token that matches
q ≥ 0}
the longest possible prefix.
IV. {ambncpdq | mn = p + q, where m, n, p, q ≥ 0}
Which of the languages above are context-free? If the string bbaacabc is processed by the analyzer, which
one of the following is the sequence of tokens it outputs?
(A) I and IV only (B) I and II only
(C) II and III only (D) II and IV only (A) T1T2T3 (B) T1T1T3
(C) T2T1T3 (D) T3T3
Solution:
I. {am bn cp dq | m + p = n+ q} Solution  Given string
The given language is context free language, as it can bbaacabc
be implemented by using stack The longest possible prefix will be bbaac that can be obtained
II. {am bn cp dq | m = n and p = q} from T3. a b c is the another possible prefix obtained from
The given language is CFL, as it can be implemented T3.
by using stack. bbaac abc
III. Not CFL, more than one comparison at a time. ↓ ↓
IV. Not CFL, multiplication is not possible with stack.   T3   T3
Hence, the correct option is (B).
Hence, the correct option is (D).

GATE_CSIT-2018.indd 61 5/2/2018 3:33:26 PM


lxii | GATE 2018 Solved Paper CS: Set – 1

Question Number: 38 Question Type: MCQ (C) $ has higher precedence and is left associative; # is
Consider the following parse tree for the expression left associative
a#b$c$d#e#f, involving two binary operators $ and #. (D) # has higher precedence and is right associative;
$ is left associative
# Solution: 
a #
#
a #
$ #

$ d e f $ #

b c
$ d e f

Which one of the following is correct for the given parse c


b
tree?
The operator which appears at lower level of tree has higher
(A) $ has higher precedence and is left associative; # is
precedence. Therefore ‘$’ has higher precedence.
right associative
(B) # has higher precedence and is left associative; $ is # operator is right associative, as right subtree is extended.
right associative Hence, the correct option is (A).

Question Number: 39 Question Type: MCQ


In a system, there are three types of resources: E, F and G. Four processes P0, P1, P2 and P3 execute concurrently. At the
outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For
example, Max[P2, F] is the maximum number of instances of F that P2 would require. The number of instances of the
resources allocated to the various processes at any given state is given by a matrix named Allocation.
Consider a state of the system with the Allocation matrix as shown below, and in which 3 instances of E and 3 instances
of F are the only resources available.
Allocation Max
E F G E F G
P0 1 0 1 P0 4 3 1
P1 1 1 2 P1 2 1 4
P2 1 0 3 P2 1 3 3
P3 2 0 0 P3 5 4 1

From the perspective of deadlock avoidance, which one of the following is true?
(A) The system is in safe state.
(B) The system is not in safe state, but would be safe if one more instance of E were available.
(C) The system is not in safe state, but would be safe if one more instance of F were available.
(D) The system is not in safe state, but would be safe if one more instance of G were available.
Solution:
Max Allocation Need Available
E F G E F G E F G E(3) F(3) G(0)
P0 4 3 1 1 0 1 3 3 0 3 3 0 (On ‘P1’ execution)
↓ ↓ ↓
P1 2 1 4 1 1 2 1 0 2 4 3 1 (On ‘P2’ execution)
↓ ↓ ↓
P2 1 3 3 1 0 3 0 3 0 5 3 4 (On ‘P1’ execution)
↓ ↓ ↓
P3 5 4 1 2 0 0 3 4 1 6 4 6 (On ‘P3’ execution)
↓ ↓ ↓
8 4 6

The system is in safe state, with safe sequence P0, P2, P1, P3.
Hence, the correct option is (A).

GATE_CSIT-2018.indd 62 5/2/2018 3:33:27 PM


GATE 2018 Solved Paper CS: Set – 1  |  lxiii

Question Number: 40 Question Type: MCQ (A) σB<5(r  s) (B) σB<5(r LOJ s)
Consider the following solution to the producer-consumer σB<5(r) LOJ s
(C) r LOJ (σB<5(s)) (D)
synchronization problem. The shared buffer size is N. Three
Solution:  Consider a data set
semaphores empty, full and mutex are defined with respec-
tive initial values of 0, N and 1. Semaphore empty denotes r A B s B C
the number of available slots in the buffer, for the consumer 12 2 2 A
to read from. Semaphore full denotes the number of avail- 13 6 3 B
able slots in the buffer, for the producer to write to. The
15 4 4 C
placeholder variables, denoted by P, Q, R, and S, in the code
12 6 5 A
below can be assigned either empty or full. The valid sema-
phore operations are: wait () and signal (). 13 4 6 C
16 7
Producer Consumer
do { do { Q: x  (σB<5 (s))
 wait(P);  wait(R);
A B C
  wait (mutex);   wait (mutex);
12 2 A
  //Add item to   //Consume item
15 4 C
 buffer   from buffer
13 4 C
  signal (mutex);   signal (mutex);
  signal (Q);   signal (S); (A) σB<5 (r  s)
} while (1); } while (1);
A B C
Which one of the following assignments to P, Q, R and S 12 2 A
will yield the correct solution?
15 4 C
(A) P: full, Q: full, R: empty, S: empty
13 4 C
(B) P: empty, Q: empty, R: full, S: full
(C) P: full, Q: empty, R: empty, S: full 13 6 C
(D) P: empty, Q: full, R: full, S: empty 12 6 C
Solution:  In the producer-consumer problem, producer
keeps the item in buffer when the slots on the buffer are (B) σB<5 (x LOJS)
empty. While, it has to wait when the buffer is full. In the
A B C
given problem, full denotes number of available slots in
12 2 A
buffer, i.e. full will be 0, when there are no empty slots in
buffer. So, P: full. 13 6 C

When producer places an item in buffer, it implies there is 15 4 C


increase in the number of available slots in the buffer, for the 12 6 C
consumer to read from. This can be done by signal (empty). 13 4 C
So, Q: empty. 16 7 —
Similarly, consumer has to wait when there are no items to
consume in buffer, which can be shown by wait (empty). (C) x LOJ (σB<5(s))
So, R: empty.
 B C 
Once the consumer consumes item, it implies, there is
r LOJ  2 A 
increase in-the available slots in the buffer, for the producer  
 3 B 
to write to. So, S: full.  
 4 C 
Hence, the correct option is (C).
Question Number: 41 Question Type: MCQ
A B C
Consider the relations r(A, B) and s(B, C), where s ⋅ B is
12 2 A
a primary key and r ⋅ B is a foreign key referencing s ⋅ B.
13 6 –
Consider the query
Q: r  (σB<5 (S)) 15 4 C

Let LOJ denote the natural left outer-join operation. Assume 12 6 –


that r and s contain no null values. 13 4 C
Which one of the following queries is NOT equivalent to Q? 16 7 –

GATE_CSIT-2018.indd 63 5/2/2018 3:33:27 PM


lxiv | GATE 2018 Solved Paper CS: Set – 1

(D) σB<5 (x) LOJS Question Number: 43 Question Type: NAT
A B Let G be a graph with 100! vertices, with each vertex labeled
 
  by a distinct permutation of the numbers 1, 2, ..., 100. There
 12 2 
  is an edge between vertices u and v if and only if the label
 15 4  LOJS
  of u can be obtained by swapping two adjacent numbers in
13 4
the label of v. Let y denote the degree of a vertex in G, and
z denote the number of connected components in G.
A B C
Then, y + 10z = ______.
12 2 A
Solution:  As the label of a vertex in the graph G is a per-
15 4 C mutation of the numbers 1, 2, 3, ..., 100 and two vertices u
13 4 C and v of G are adjacent if and only if the label of one vertex
can be obtained from the other by swapping two adjacent
Hence, the correct option is (C). numbers,
Question Number: 42 Question Type: MCQ If the label of a vertex u of G is 1, 2, 3, ..., 100
Consider the following four relational schemas. For each deg(u) = Number of ways of swapping
schema, all non-trivial functional dependencies are listed. two adjacent numbers in 1, 2,
The underlined attributes are the respective primary keys. 3, ..., 100 = 99
Schema I: Similarly, we can observe that every vertex will have the
Registration (rollno, courses) same degree.
Field ‘courses’ is a set-valued attribute containing the set of ∴ y = 99
courses a student has registered for. Also, from any permutation consisting of the numbers 1, 2,
Non-trivial functional dependency: 3, ..., and 100, we can obtain any other permutation of the
100! permutations of 1, 2, 3, ..., 100 by a finite number of
Rollno → courses
swaps with swapping two adjacent numbers at a time.
Schema II: This means there exists a path from any vertex of G to any
Registration (rollno, courseid, email) other vertex of G.
Non-trivial functional dependencies: So, G is a connected graph.
Rollno, courseid → email Hence, the number of connected components in
email → rollno G = z = 1
Schema III: So, y + 10z = 99 + 10 × 1 = 109.
Registration (rollno, courseid, marks, grade) Hence, the correct answer is (109).
Non-trivial functional dependencies: Question Number: 44 Question Type: NAT
Rollno, courseid → marks, grade Consider Guwahati (G) and Delhi (D) whose temperatures
Marks → grade can be classified as high (H), medium (M) and low (L).
Schema IV: Let P(HG) denote the probability that Guwahati has high
Registration (rollno, courseid, credit) temperature. Similarly, P(MG) and P(LG) denotes the prob-
ability of Guwahati having medium and low temperatures
Non-trivial functional dependencies:
respectively. Similarly, we use P(HD), P(MD) and P(LD) for
Rollno, courseid → credit Delhi.
Courseid → credit The following table gives the conditional probabilities for
Which one of the relational schemas above is in 3NF but Delhi’s temperature given Guwahati’s temperature.
not in BCNF?
(A) Schema I HD MD LD
(B) Schema II HG 0.40 0.48 0.12
(C) Schema III MG 0.10 0.65 0.25
(D) Schema IV LG 0.01 0.50 0.49

Solution: Consider the first row in the table above. The first entry
I. The given relation is not having transitivity dependen- denotes that if Guwahati has high temperature (HG) then the
cy therefore it is in 3NF. For BCNF, every determinant probability of Delhi also having a high temperature (HD) is
should be candidate key as email is determinant but not 0.40; i.e., P(HD|HG) = 0.40. Similarly, the next two entries are
candidate key, the given schema is not in BCNF.
P(MD|HG) = 0.48 and P(LD|HG) = 0.12.
Hence, the correct option is (B).

GATE_CSIT-2018.indd 64 5/2/2018 3:33:27 PM


GATE 2018 Solved Paper CS: Set – 1  |  lxv

Similarly for the other rows. Count (1024, y);


If it is known that P(HG) = 0.2, P(MG) = 0.5, and P(LG) = 0.3, }
then the probability (correct to two decimal places) that }
Guwahati has high temperature given that Delhi has high }
temperature is ______. The number of times that the print statement is executed by
the call count (1024, 1024) is ______.
Solution:  Probability that Guwahati has high temperature
given that Delhi has high temperature Solution:  The number of times that the print statement is
= P(HG/HD) executed = (1023/10)
P ( H G ) P ( H D /H G ) = 10230
= Hence, the correct answer is (10230).
P ( H G ) P ( H D /H G ) + P ( M G ) P ( H D /M G )
+ P ( LG ) P ( H D /LG ) Question Number: 46 Question Type: NAT
(By Baye’s theorem) The number of possible min-heaps containing each value
Given from {1, 2, 3, 4, 5, 6, 7} exactly once is ______.
P(HG) = 0.2, Solution:  For min-heap, only root possible is ‘1’.
P(MG) = 0.5 and P(LG) = 0.3 The total ways to design a min heap
From the table given, f (N) = (N–1 CL) × f (L) × f (R)
P(HD/HG) = 0.40, P(HD/MG) L = 2K–1 – 1 + min (2K–1, m)
= 0.1 and P(HD/LG) = 0.01 R = 2K–1 – 1 + max (0, m – 2K–1)
Substituting these in the above, we have M = 1 + N – 2K
0.2 × 0.40 N = 7, M = 4 (no. of leaf nodes)
P(HG/HD) =
0 . 2 × 0 . 40 + 0.5 × 0.1 + 0.3 × 0.01 4 = 1 + 7 – 2K
= 0.601 2K = 1 + 7 – 4
Hence, the correct answer is 0.60 to 0.62. 2K = 4
K = 2
Question Number: 45 Question Type: NAT
f (7) = 6C3 × f (3) × f (3)
Consider the following program written in pseudo-code.
Assume that x and y are integers. L = 21 – 1 + min (21, 4)
Count (x,y) { = 2 – 1 + 2 = 3
if (y ! = 1) { R = 21 – 1 + max (0, 4 – 21)
if (x ! = 1) { = 2 – 1 + 2 = 3
print (“*”); f (3) = 2C1 × f (1) × f (1) = 2 × 1 × 1 = 2
Count (x/2, y); 6! 6 × 5 × 4 × 3!
f (7) = ×2×2 = ×2×2
} 3! 3! 3 × 2 × 3!

else {
= 80.
y = y–1;
Hence, the correct answer is (80).

Question Number: 47 Question Type: NAT


Consider the following undirected graph G:

4 x

1 3

4 5

Choose a value for x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of
MWSTs of G for this value of x is ______.

GATE_CSIT-2018.indd 65 5/2/2018 3:33:28 PM


lxvi | GATE 2018 Solved Paper CS: Set – 1

Solution:  Consider Kruskal’s algorithm to find Minimum Weight Spanning Tree (MWST).
Arrange the edges in ascending order 1, 3, 4, 4, 4, 5, ssx

4
1 1 3 3
1

1 2
1 3 4
4 3 1 3
1 4 5
5

If x = 5

3 4
5 5
4
3 1 3
1 4
4

if x < = 4, then vertex with weight ‘4’ will be considered every time, and If x > 5, then vertex with weight ‘5’ will be
considered everytime—which gives total of 2-spanning trees. When x = 5, there will be two choices, which gives total of
4 spanning trees.
Hence, the correct answer is (4).

Question Number: 48 Question Type: NAT n


Consider the weights and values of items listed below. Note Subject to = ∑ wi xi <m
that there is only one unit of each item. 1
xi = 0 or 1
Item no. Weight Value
(in Kgs) (in Rupees) 1 ≤i≤n
1 10 60 M = 11 kgs
2 7 28 Item Weight value v/w
3 4 20 no. (in kgs) (in rupees)
4 2 24 1 10 60 6
2 7 28 4
The task is to pick a subset of these items such that their
3 4 20 5
total weight is no more than 11 kgs and their total value is
4 2 24 12
maximized. Moreover, no item may be split. The total value
of items picked by an optimal algorithm is denoted by Vopt. v/w in descending order:
A greedy algorithm sorts the items by their value-to-weight
12 6 5 4
ratios in descending order and packs them greedily, start-
ing from the first item in the ordered list. The total value of x4 x1 x3 x2
items picked by the greedy algorithm is denoted by Vgreedy.  
The value of Vopt – Vgreedy is ______. (2 + 4 ≤ 11
6 ≤ 11
n
Solution:  It is 0/1 knapsack problem max ∑ pi xi . \ Vgreedy = ∑ pi xi
i =1

GATE_CSIT-2018.indd 66 5/2/2018 3:33:28 PM


GATE 2018 Solved Paper CS: Set – 1  |  lxvii

= 24 + 20 Question Number: 50 Question Type: NAT


= 44 The instruction pipeline of a RISC processor has the fol-
S 0 = {(0, 0)} lowing stages: Instruction Fetch (IF), Instruction Decode
S 1 = {(0, 0), (60, 10)} (ID), Operand Fetch (OF), Perform Operation (PO) and
S10 = {(60, 10)}
Write back (WB). The IF, ID, OF and WB stages take
S11 = {(28, 7), (88, 17)} 1 clock cycle each for every instruction. Consider a
sequence of 100 instructions. In the PO stage, 40 instruc-
{ 17 > 11 overflow}
tions take 3 clock cycles each, 35 instructions take 2 clock
S2 = {(0, 0), (60, 10), (28, 7)} cycles each, and the remaining 25 instructions take 1 clock
S12 = {(20, 4), (80, 14), (48, 11)} cycle each. Assume that there are no data hazards and no
control hazards.
{∵ 14 > 11 overflow}
The number of clock cycles required for completion of exe-
S3 = {(0, 0), (60, 10), (28, 7), cution of the sequence of instructions is ______.
(20, 4), (48, 11)} Solution:  From the given question, there are three types of
S13 = {(24, 2), (84, 12), (52, 9), questions, based on number cycles required by PO stage,
(44, 6), (72, 13)} and remaining stages in instruction takes one cycle each.
{∵ 12 > 11, 13 > 11 overflow} Number of Number of Number
S4 = {(0, 0), (60, 10), (28, 7), instructions cycles of cycles
required by required for
(20, 4), (48, 11), (24, 2), PO stage Instruction
(52, 9), (44, 6)} execution
Optimal solution is (60, 10) after back tracking x1 = 1, Type 1 40 3 7

\ Vopt = ∑ pi xi = 60 Type 2
Type 3
35
25
2
1
6
5
The value
Vopt – Vgreedy = 60 – 44 Type 1 instruction executions ends on 124th cycle.
= 16 Similarly, Type 2 Instruction execution ends on 194th cycle

Hence, the correct answer is (16). and Type 3 Instructions execution ends on 219th cycle.
In other words, Number of clock cycles required is
Question Number: 49 Question Type: NAT
= 1 + 1 + 1 + [(40 × 3) + (35 × 2) + (25 × 1)] + 1
Consider the minterm list form of a Boolean function F
= 219
given below.
Hence, the correct answer is (219).
F(P, Q, R, S) = ∑ m(0, 2, 5, 7, 9, 11)
Question Number: 51 Question Type: NAT
+ d (3, 8, 10, 12, 14) A processor has 16 integer registers (R0, R1, ..., R15) and
Here, m denotes a minterm and d denotes a don’t care term. 64 floating point registers (F0, F1, ..., F63). It uses a 2-byte
The number of essential prime implicants of the function F instruction format. There are four categories of instructions:
is ______. Type-1, Type-2, Type-3, and Type-4. Type-1 category con-
sists of four instructions, each with 3 integer register oper-
Solution:  F(P, Q, R, S) = ∑ m (0, 2, 5, 7, 9, 11) ands (3Rs). Type-2 category consists of eight instructions,
+ d (3, 8, 10, 12, 14)
each with 2 floating point register operands (2Fs). Type-3
RS category consists of fourteen instructions, each with one
PQ 00 01 11 10 integer register operand and one floating point register oper-
00 1 x 1 and (1R + 1F). Type-4 category consists of N instructions,
01 1 1 III each with a floating point register operand (1F).
11 x
The maximum value of N is ______.
x
10 x 1 1 x II Solution:  Instruction size = 16 bits
Integer register requires 4 bits
I Floating point register requires 6 bits
OO Both Type-1 and Type-2 opcode sizes will be 4-bits in
I, II, III all are essential prime implicants.
which max number of instructions to be formulated are
\ 3 essential prime implicants
16, but it uses 12 instructions out of 16, other 4 combi-
Hence, the correct answer is (3). nations are reserved for Type-3.

GATE_CSIT-2018.indd 67 5/2/2018 3:33:29 PM


lxviii | GATE 2018 Solved Paper CS: Set – 1

Similarly for Type-3, number of instruction produced


OO Currently the head is positioned at sector number 100 of
are maximum 16 bit instructions, it uses 14 instructions cylinder 80, and is moving towards higher cylinder num-
out of 16. bers. The average power dissipation in moving the head over
from 110000 to 111101 100 cylinders is 20 milliwatts and for reversing the direction
and of the head movement once is 15 milliwatts. Power dissi-
111110 and 111111 are combinations used for Type-4 pation associated with rotational latency and switching of
instructions. head between different platters is negligible.
Type-4: The total power consumption in milliwatts to satisfy all of
the above disk requests using the Shortest Seek Time First
111110 Floating
----
register
disk scheduling algorithm is _________.
111111
4-free 6
Solution:  Disk requests in cylinders are 72, 134, 2.0, 8.6,
Bits 116, 16 currently it is at 80.

For each, there will be free combination of first 6-bit opcode 16 20 72 80 86 116 134
and 4-bits are used for Type-4 instructions.
∴ Maximum number of instructions to be formed
= 2 × 24 = 32
Hence, the correct answer is (32).
Question Number: 52 Question Type: NAT
Given a language L, define Li as follows:
L0 = {ε}
Li = Li–1. L for all i > 0 Number of head movements
The order of a language L is defined as the smallest k such
= |86 – 80| + |72 – 86| + |116 – 72|
that Lk = Lk+1. Consider the language L1 (over alphabet 0)
accepted by the following automaton. + |134 – 116| + |20 – 134| + |20 – 16|
= 200
0
Average power dissipation for 200 cylinders = 40 milliwatt
0
0 and there are 3 reversals of head movement direction which
takes 45 milliwatt.
The order of L1 is ______. Total power consumption
Solution:  L1 = {ε, 0, 000, 00000, ...} = 40 + 45 ⇒ 85 milliwatt.
L0 = {ε}
Hence, the correct answer is (85).
L1 = L0 ⋅  L1
L1 = {ε, 0, 000, 00000, ...} Question Number: 54 Question Type: NAT

L2 = L1 ⋅ L1 Consider an IP packet with a length of 4,500 bytes that
L2 = {ε, 0, 000, 0000, ...} includes a 20-byte IPv4 header and a 40-byte TCP header.
The packet is forwarded to an IPv4 router that supports a
L3 = L2 ⋅ L1
Maximum Transmission Unit (MTU) of 600 bytes. Assume
L3 = {ε, 0, 00, 0000, 00000, ...} that the length of the IP header in all the outgoing fragments
∴ L2 = L3 of this packet is 20 bytes. Assume that the fragmentation

So, K = 2. offset value stored in the first fragment is 0.
Hence the correct answer is (2). The fragmentation offset value stored in the third fragment
Question Number: 53 Question Type: NAT is ______.
Consider a storage disk with 4 platters (numbered as 0, 1, 2
Solution:  Data packet length
and 3), 200 cylinders (numbered as 0, 1, ..., 199), and 256
sectors per track (numbered as 0, 1, ..., 255). The following = 4.500B
6 disk requests of the form [sector number, cylinder num- TCP header = 40 bytes
ber, platter number] are received by the disk controller at
IP header = 20 bites
the same time:
[120, 72, 2], [180, 134, 1], [60, 20, 0], [212, 86, 3], [56, 116, 2], Given maximum transmission unit of 600 bytes
[118, 16, 1]

GATE_CSIT-2018.indd 68 5/2/2018 3:33:29 PM


GATE 2018 Solved Paper CS: Set – 1  |  lxix

Data packet will be and then begins to carrier-sense for 5 time units again. Once
Data Header they start to transmit, nodes do not perform any collision
580 20
detection and continue transmission even if a collision
occurs. All transmissions last for 20 units of time. Assume
The fragmented bytes and its offset are: that the transmission signal travels at the speed of 10 meters
per unit time in the medium.
1st fragment 2nd fragment 3rd fragment
Assume that the system has two nodes P and Q, located at
576 576 576 a distance d meters from each other. P starts transmitting a
+ + + packet at time t = 0 after successfully completing its carrier-
20 20 20 sense phase. Node Q has a packet to transmit at time t = 0
Fragment offset 0 72 144 and begins to carrier-sense medium.
The maximum distance d (in meters, rounded to the clos-
Hence, the correct answer is (144). est integer) that allows Q to successfully avoid a collision
Question Number: 55 Question Type: NAT between its proposed transmission and P’s ongoing trans-
Consider a simple communication system where multiple mission is ______.
nodes are connected by a shared broadcast medium (like
Solution:  Given channel sensing time
Ethernet or wireless). The nodes in the system use the fol-
= 5 units time.
lowing carrier-sense based medium access protocol. A
node that receives a packet to transmit will carrier-sense As a packet travel time
the medium for 5 units of time. If the node does not detect = 10 meters/sec
any other transmission in this duration, it starts transmitting For avoiding collision for Q, the distance should be
its packet in the next time unit. If the node detects another 50 meters.
transmission, it waits until this other transmission finishes, Hence, the correct answer is (50).

GATE_CSIT-2018.indd 69 5/2/2018 3:33:29 PM


GATE_CSIT-2018.indd 70 5/2/2018 3:33:29 PM
P
General Aptitude

Part A: 
Verbal Ability 1.3

A
Part B: 
Numerical Ability 1.69

R
T
I
This page is intentionally left blank
P
Verbal Ability

Chapter 1: 
Grammar1.5

A
Chapter 2: 
Vocabulary1.49

R
T
A
This page is intentionally left blank
Chapter 1
Grammar

LEARNING OBJECTIVES
After reading this chapter, you will be able to understand:
• Nouns, Pronouns, Articles • Active/Passive voice, Direct/Indirect speech
• Verbs, Auxiliaries, Modals • Verbal phrases
• Adjectives, Adverbs • Sentence completion
• Prepositions, Conjunctions

introduCtion 1. Synonyms
The Verbal Ability section of the book includes inputs followed by 2. Antonyms
Practice Exercises. It comprises inputs in following sections.
1. Grammar Verbal Analogies
2. Sentence Corrections The word ‘Analogy’ means a comparison. Vocabulary plays an
3. Vocabulary important part here. This question type involves identifying the
logical relationship between the words. This section includes.
Grammar 1. Analogy
The questions under this category are based on English Grammar. 2. Reverse Analogy
These questions test the student’s knowledge of grammar and
ability to use English Language correctly. The grammar section
Verbal Reasoning
includes.
The ability to isolate the key issue and to identify irrelevant issues
1. Nouns, Pronouns, Articles is important.
2. Verbs, Auxiliaries, Modals Logical reasoning is important. This section includes
3. Adjectives, Adverbs
4. Prepositions, Conjunctions 1. Critical reasoning
5. Active/Passive Voice, Direct/Indirect speech 2. Logical reasoning
6. Verbal Phrases.
Grammar—overvieW
Sentence Completion
Sentence
This section includes sentence correction and sentence rephrasing
questions. Questions in this section test a students ability to com- A group of words which makes complete sense is a sentence.
prehend a given context and indentify grammatical errors.
Examples:
1. Birds fly.
Vocabulary
2. It is a good college.
The verbal questions are based on the meanings of words or their
3. The children of that school wear blue uniform.
opposites. These question types are designed to test the students
vocabulary. This section includes. 4. This is the theory which throws light on superconductivity.
1.6 | Verbal Ability

Parts of a sentence Now study the following sentences:


A sentence can be divided into two parts: Group A
(1) Subject and (2) Predicate
Here are some sentences divided into the two parts. 1. There is a beautiful garden in front of my house.
2. It has been raining heavily since morning.
A B 3. There is a phone call for your friend.
(subject) (predicate) Note : The words underlined in these sentences are not
real subjects. They are said to be grammatical or dummy
1. Birds fly. subjects.
2. Mohan is an engineer.
3. He  teaches Engineering Now study the following sentences:
Graphics. Group B
4. This intelligent girl has passed her examination
in the first division. 1. Here come my friends and their parents.
5. The President of India has awarded him a gold 2. There go the principal and the members of the
medal. teaching staff.
Note:  In these sentences you notice that the predicate part
precedes the subject part. This is called S.P and P.P inver-
Notes: sion. This construction is allowed in standard English. This
1. The words underlined in Part A are Subject words and is used for emphasis.
those underlined in Part B are Verbs.
2. The Subject is a noun or a pronoun with or without
other words going with it. Parts of Speech:  Identification
3. The Predicate is the verb with or without other words English words (according to their functions in a sentence)
going with it (other words may be object, complement, can be classified into Parts of Speech as follows:
adverb, adverb phrase, etc.). 1. Noun 5. Adverb
4. The subject of the sentence usually comes first but 2. Pronoun 6. Preposition
occasionally the predicate precedes. 3. Adjective 7. Conjunction
4. Verb 8. Interjection
Example:
•• Down went the Royal Francis. Noun
A noun is a word used as the name of a person, place,
­animal, thing, etc.
Sample Exercise–1 Examples:  Rajitha, Hyderabad, lion, table, etc.
Underline the subject parts in the following sentences.
Pronoun
1. The train arrived late.
A word used instead of a noun.
2. He was the captain of his team.
3. There was a large crowd on the platform to receive Examples:  he, she, it, they, etc.
the team.
4. Birds of the same feather flock together. Adjective
5. The Prime Minister with all his Cabinet members has A word that qualifies or describes a noun or a pronoun.
submitted his resignation to the President.
Examples:
Underline the predicate parts in the following sentences.
1. Our team played a good game.
1. Aeroplanes fly over my house frequently. adj. noun
2. Every sentence that he spoke was listened to with
2. They are shortly moving out of their house.
adj. noun
3. He is suffering from a fever. great attention.
4. The college is equipped with new furniture. 3. All these proposals are good.
5. The Secretary and the members of the club have been noun adj.
discussing the issue since morning. Note: Some words are used either as pronouns or as adjec-
tives as in the following examples.
Chapter 1  Grammar  |  1.7

Pronoun Adjective Interjection


a. These are good students. 1. These students are good. A word which expresses a strong or sudden feeling such as
surprise, joy, fear, sorrow, etc. It is not grammatically con-
b. 
Each of these books is 2. Each book has some special
worth reading. features worth reading. nected with the rest of the sentence. Usually, an ­exclamatory
mark is put after it.
c. Some of the problems are 3. Some problems are difficult
difficult to solve to solve. Examples:  Ah!, Hurrah!, Well!, Dear!, Oh!
d. 
Either of you can partici- 4. Either book is good for
pate in the competition. reference.
1. Alas! she is dead.
2. Hurrah! we won the match.
Verb Note:
A verb expresses what the subject of a sentence is or does, As words are divided into different parts of speech, depend-
or has, or what is done to it. ing on the work they do in the sentences, it is not possible
to say to which part of speech a word belongs unless we see
1. Dr. Rao teaches English. what function it performs in the sentence.
verb
2. He has taught the subject for twenty-five years.
verb Phrases and Clauses
3. He is a capable teacher. Phrase
verb
A phrase is a group of words without a finite verb. There are
4. She has a car.
three types of phrases.
verb
1.
Noun Phrase
Adverb A fifty year old man is seen in the garden.
A word that modifies an adjective or a verb or another 2.
Adjective Phrase
adverb. This chain is made of gold.
3.
Adverb Phrase
1. I am deeply grateful to you for your timely help. Please place the chemicals in the store-room.
adv. adj.
2. This horse runs very fast. Note: A ‘finite verb’ is a word that denotes tense and a ‘non-
verb adv. adv. finite’ is a verb which does not.
3. He read the passage quickly. Examples:
verb adv
1. He has written some books. (finite verb) (present
perfect tense)
Preposition 2. Speaking on the occasion, the Minister said
A preposition is a word used with a noun or a pronoun to prohibition would be lifted soon. (non-finite verb)
show how the person or thing denoted by the noun or pro-
There are three types of non-finites in English: INFINITIVE,
noun stands in relation to something else.
GERUND, PARTICIPLE.
1. Work in the college begins at 10 a.m. (*Please note that there is a separate chapter on non-finites.)
2. He wrote the document with a pen.
3. The Professor gave a lecture on superconductivity. Clause
4. I washed my plate after I had eaten. A Clause is a group of words which contains a ‘finite verb’.
In the above sentences, the words underlined are called Clauses are of two types:
prepositions.
1. Main Clause
2. Subordinate Clause
Conjunction (Connector)
A Main Clause is also called a Principal Clause or an
A Conjunction is a word that joins words, phrases or Independent Clause because it makes complete sense.
sentences. A Subordinate Clause, which can also be called a
1. Delhi and Kolkata are densely populated cities. Dependent Clause, is divided into three types:
2. She must be either the President or the Secretary of NOUN CLAUSE, ADJECTIVE CLAUSE, ADVERB
YMCA. CLAUSE
3. The professor read the essay and was impressed by it. Now study the uses (functions) of these three types of
4. He is not only intelligent but also industrious. clauses.
1.8 | Verbal Ability

THE NOUN CLAUSE is used as


1. (g)  If/whether clauses as noun clauses:
-  I asked him if/whether he can speak French.
(a)  the subject of a verb. - I don’t know if/whether he has been appointed
That he will be appointed to the job is certain. or not.
subject verb - I don’t care whether he attends the meeting or
(b)  the object of a verb. not.
We knew that the plan was impractical. - Whether or not he comes doesn’t worry my
verb object boss.

 (c)  the complement of a verb. ADJECTIVE CLAUSES: (also called relative


2.
Our hope is that he will secure first rank. clauses). It does the work of an Adjective. It qualifies
  v. complement a noun or a pronoun in the main clause.

(d)  the complement of an adjective. (a) The young man who was here a little while ago is
We were certain that he would pass. the President of the union.
adj. complement    antecedent adj. cl
(b)  I have finished reading the novel (that) you
I am hopeful that he will agree to our proposal.
ant. adj.
adj complement
gave me.
Note: When the noun clause is an object or a com-
 cl
plement, the conjunction that may be omitted. (c) This is the story (which) my friend wrote.
ant. adj. cl
Examples: Note: ( ) indicates optional use, i.e., may or may
I believed he was right. (I believed that he was not be used.
verb object
Notes:
right)
1. The words who, that, and which introducing
I was sure he was right. (I was sure that he was the relative clauses are relative pronouns.
adj. compl. 2. Who is used to refer to persons; That is used to
right) refer to persons or things; and which is used to
refer to things, animals, etc.
(e)  in apposition to the noun before it. 3. The noun or noun phrase, which a relative
The suggestion, that the meeting should be pronoun refers to is called its antecedent (ant.)
adjourned, was unanimously accepted.
   N N.Cl (in apposition) Special Note 1: The object form ‘whom’, can
also function as a relative pronoun introducing
(f)  Wh - clauses as Noun Clauses adjective clauses.
 Wh - clauses perform all the five functions that
Example:  This is the person whom you want to
the ‘that’ clauses do. In addition to these, they can
meet.
function as the objects of prepositions.

Special Note 2: When the adjective clause
Examples: defines a place, time, or reason, we use where,
Subject: What you say is true. Where he lives is when, and why in place of the relative adverbs.
a mystery.
Examples:
Object: I don’t know what he would say to this 1. We visited the place where Mrs. Gandhi was
proposal. assassinated. (place)
2. At a time when prices are high, we must
Subject Complement: The question is who will reduce our expenditure. (time)
bell the cat.
3. Could you tell me the reason why he has not
In apposition: My question, who is responsible been appointed? (reason)
for the loss, has not been answered. Note: The Possessive form whose can also intro-
Adjectival Complement: I wasn’t sure whose duce a relative clause. ‘Whose’ can be used in
fault it was. speaking of persons, animals and also things
without life.
Object of a Preposition: We were not aware of
what they were doing. Example: The doctor whose car I bought wants
to buy it back.
Chapter 1  Grammar  |  1.9

ADVERBIAL CLAUSES: Adverbial Clauses are of


3. 1. He reached the place when the sun had set. ( )
different kinds. They modify the verbs to which they 2. Because you have done this, you must explain ( )
are connected in meaning i.e., they do the work of an 3. If you can do it fast, please do so. ( )
Adverb.
4. The table which has a broken leg is from the staff
(a) Adverbial Clauses of Time: room. ( )
(The conjunctions used are : when, as, while, till/
5. He expects that he would get through the examination.
until, before, after, as soon as, whenever, since,
 ( )
as long as, etc.)
6. He is very rich, yet he is unhappy. ( )
Example: Some persons in the audience were
asleep while the chief guest was speaking. 7. Although he is an industrious student, he failed in the
examination. ( )
(b) Adverbial clause of place: 8. The children clapped as the clown entered the ring.
You may go wherever you like.
 ( )
(c) Adverbial clause of Reason or Cause : 9. People started running out as soon as the accident
(as, because, since, now that) took place. ( )
You can be punctual to school now that you have 10. Please answer the call for me in case I go out. ( )
a school bus.
(d) Adverbial clause of Purpose:
(so that, that, in order that) Conditionals
The police officer went in plain clothes so that no There is a great variety of conditional sentences.
one might recognize him. The two main divisions are:
(e) Adverbial clause of Result or Effect:
(that, so that, that) Type A
It rained very heavily for two days so that the Those with clauses that contain a condition that may or may
rivers and lakes were flooded. not be fulfilled.
(f) Adverbial clause of condition: These are called clauses of open condition or factual
(if/unless) condition.
If he apologizes to me, I shall forgive him.
Example:  What shall we do if it rains?
(g) Adverbial clause of concession: In the above example the speaker does not declare that
(though, although, even though) the condition will be realized or that it will not be realized.
Though he is intelligent he cannot argue well. He leaves the question open or unanswered.
(h) Adverbial clause of manner: The speaker here merely puts forward the possibility that
You may complete the work as you please. it may rain.

More examples:
Sample Exercise–2
•• Don’t come unless I tell you to come.
In each of the following sentences you will find a word/ •• We shall go provided the weather is fine.
a group of words underlined. Write (P) or (C) in the
bracket to denote phrase or clause respectively, as the case
Type B
may be.
Those with clauses in which a theoretical condition is put
1. Mangoes are expensive this year. ( ) forward.
2. I found this book in the university library. ( ) These are clauses in which the condition is combined
3. This is the novel which Saul Bellow has written. ( ) with improbability or unreality.
4. Smoke from vehicle exhausts causes air pollution. •• He would come, if he had time.
 ( ) •• If you were a bird, you could fly.
5. He bought the house which belonged to his friend.
Conditional clauses may be introduced by if (even if, if
 ()
only), so long as, suppose or supposing (that), on condition
Given below are a few sentences in which clauses are under- (that), provided (that), and for a negative condition, unless
lined. Identify the type of clause, (Noun clause, Adjective (which means the same as if ….not, but is more emphatic).
clause, Adverb clause) in each sentence and write its name In case (this is used to introduce a contingency or possibil-
in the brackets provided against each sentence. ity against which a precaution is needed).
1.10 | Verbal Ability

•• If you have enough money, why don’t you buy a house? Examples: If he were rich, he would go to the U.S.A. for
•• So long as you return the book faithfully, I will lend it to higher studies.
you with pleasure. If I were a bird, I would fly to England without a Visa.
•• You’d better take an umbrella with you in case it rains.

If–Conditionals Examples of Errors in the Usage of


Type–I Conditionals
Look at the following example. The following examples will make clear some of the com-
mon mistakes committed in the usage of conditionals.
If he comes to the library, I will give him these books.
   pres.   fut. 1. WRONG: If I will win the contest, I will buy a new
(It is possible that he will come) house.
Note: This is an open condition i.e., this expresses a pos- RIGHT: If I win the contest, I will buy a new house.
sible situation. 2. WRONG: If I had been there, I would make a speech.
In the above example, the present tense is used in the
RIGHT:  If I were there, I would make a speech.
if–clause (or conditional clause), and the future tense is
used in the result clause. If I had been there, I would have made a speech.
3. WRONG: If I would have a degree from that University,
Type–II I would get a good job.
If she practised well, she could win the game. RIGHT: If I had a degree from that University, I would
(She doesn’t practise well) get a good job.
If she came to my house, I would give her your message.
(She doesn’t come to my house)
Note: This is an unlikely condition. This is called unreal Types of Sentences
condition used for impossible or unreal situations.
The past tense is used in the ‘if-clause’ and would, could, (Structural)
or might + the simple past tense verb is used in the main A sentence, for the purpose of analysis, can be examined
clause. from the point of view of its structure. Depending on the
number of clauses it contains, a sentence can be called
Type–III SIMPLE, COMPLEX or COMPOUND.
If she had come to my house, I would have given her your Let us look at each of these types of sentences with
message. Would + have + past participle examples.
past perf. (She didn’t come to my house)
Note: This is a closed condition. 1.  Simple Sentence
When the past perfect is used in the ‘if–clause’, would, A simple sentence is one which contains only one subject
could, or might + have + the past participle are used in the and one predicate.
main clause.
We can summarize the usage of the conditionals discussed (The subject: Person or thing about which something is
above as follows: said).

  If–clause Main clause (The predicate:  What is said about the subject).
In other words a simple sentence contains only one main
If + present . . . . . . . future (result)
clause. It does not have subordinate clauses.
If + past . . . . . . . would + verb (result)
If + past perfect . . . . . . . would + have + past participle
Examples:
(result)
Notes: 1.
My father is a senior manager in this organisation.
(A) In general, avoid using would in the if-clause. subject (s). The predicate (p)
(B) If the if–conditionals express a 2.
Chandigarh is a planned city.
(i) doubt or supposition or   s p
(ii) a wish or desire, the form of the verb to be used is 3.
Microbiology is an interesting subject for me.
‘were’.   s p
Chapter 1  Grammar  |  1.11

Note that there is only one finite verb in each of the above 3.  Complex Sentence
sentences. That means there is only one clause. One clause A complex sentence is one which contains only
sentence is a simple sentence. one main clause and one or more subordinate clauses. Study
the following examples.
2.  Compound Sentence Example 1: If you work hard you will pass.
A compound sentence is one which contains two or more
main or principal clauses. It may or may not have subordi- In the above example, the clause ‘you will pass’ makes good
nate clauses. sense by itself, and hence can stand by itself. This is called
In other words a compound sentence consists of two or the principal or independent clause.
more independent sentences joined together by a coordinat- The clause ‘If you work hard,’ cannot stand indepen-
ing conjunction. dently, it depends on the clause, ‘you will pass’. It is there-
fore called a dependent or a subordinate clause.
Example: He is poor yet he is happy.
Example 2: As soon as the meeting began, a member said
The above sentence consists of two parts.
that he wanted to raise a point of order.
(i)  He is poor (ii)  He is happy
These two are joined by the co-ordinating conjunction ‘yet’. Analysis:  This sentence has only one main clause and two
In the above example, each part contains a subject and a subordinate clauses. Therefore, this is a complex sentence.
predicate of its own i.e., each part is called a clause. Subordinate clause 1: That he wanted to raise a point of
Each clause makes good sense by itself, and hence can order.
stand independent of the other. Hence, each is called a prin-
cipal clause or a main clause. Subordinate clause 2:  As soon as the meeting began.

Study the following examples. Main clause: A member said


Some more examples of Complex Sentences:
Examples:
1. The children rode an elephant when they visited the
1. You may either stay in the hostel or stay with your
zoo.
relatives.
2. I think that the president will not accept this proposal.
2. The flowers were blooming, the birds were singing,
3. They were so tired that they simply had to sit down to
and spring was in the air.
take rest.
Analysis: In sentence 1, there are two main clauses. 4. He knew that he had to get someone to cut down the
trees in the garden.
In sentence 2, there are three main clauses. 5. If you want a passport, you must consult the passport
So each of them is a compound sentence. issuing authority in the city.
Some more examples of compound sentences: In the above examples, the underlined words are called
1. I went to his farmhouse several times, but I was subordinating conjunctions which introduce subordinate
unable to meet him. classes.
2. He is very intelligent, yet he has failed in the The following is a list of some subordinating conjunctions.
examination. After, before, since, as soon as, while, until, as, so long as,
3. Many doctors are attending on him, still he is not out till, in order to, lest, so that, that, because, since, supposing,
of danger. unless, whether, on condition, so ….. that, than, no less than,
4. He is very tired, for he has been working since as much as, so far as, according as, if, though, although,
morning. however, notwithstanding, even if, whatever, whichever.
5. There is no quorum, so the meeting was adjourned.

Note: In the above examples, the underlined words are Sample Exercise–3
called coordinating conjunctions. Coordinating conjunc- Identify the type of sentence—Simple, Complex or
tions join main clauses. Compound.
The following is a list of some co-ordinating conjunctions 1. As soon as the boy saw the cobra, he began to run.
and, as well as, also, too, both ….. and, not only …….. but 2. The South Pole is too cold for human beings to live in.
also, now, well, either ….. or, neither …….. nor, otherwise, 3. A hundred per cent in English is a very high score
or else, still, yet, only, however, whereas, but, nevertheless, and it is almost impossible for a student to achieve
therefore, for, so then, so then. this.
1.12 | Verbal Ability

4. On account of mismanagement, the company suffered Examples:


a great loss. Let the manager talk to the director first.
5. In spite of being supplied with the best weapons, the Let’s start at once.
army could not win the battle.
Let the boys assemble in the auditorium for the seminar.
6. The rooms were so selected as to enable me to reach
the place of my interview.
7. It is in the field of education that the seed of secularism Interrogative Sentences
has to be sown at the earliest stage possible so that the Sentences that are used to make enquiries and to ask
plant can be carefully nurtured as it grows. ­questions are interrogative or question sentences.
8. Our hope that the clouds would disperse, was
cheering. Examples:
9. To most people a long journey by motorcar is Can I help you?
exhausting and disagreeable. What shall we have for lunch?
10. Although mountains are undoubtedly impressive, Is the bus late this morning?
they have a kind of dreadful monotony that makes
people like me, feel hostile to their beauty.
Exclamatory Sentences
Sentences that express surprise, admiration, pity, sorrow
Types of Sentences (Semantic) and other feelings in an emphatic way are called exclama-
Based on the meaning (Semantic), sentences are catego- tory sentences.
rised into: Examples:
1. Assertive sentences How fast time flies!
2. Imperative sentences What a beautiful view we have from here!
3. Interrogative sentences What a wonderful piece of art this is!
4. Exclamatory sentences
What a tragedy!
5. Affirmative sentences
6. Negative sentences
Affirmative Sentences
Assertive Sentences (or) You have seen that all the sentences given above as ­examples
Declarative Sentences are statements, commands, questions and exclamations.
They affirm something in a positive way. They are affirma-
Sentences which state facts, describe things, or report events tive sentences.
are called assertive or declarative sentences.

Examples: Negative Sentences


Dr. Mohan teaches English. Look at the following sentences.
Varanasi is on the banks of the Ganga.
Hyderabad is the capital of Andhra Pradesh. Examples:
He is not a rich man.
Imperative Sentences I cannot complete this work today.
Sentences that express an order, a request, advice, a They don’t understand our difficulties.
­direction, a suggestion, a command, etc. are imperative I have never watched a test match.
sentences. These sentences start with the verb, and the
­ All these are also statements but they use words such as
­subject (You) is understood. NOT and NEVER and are negative in meaning. They are
called negative sentences.
Examples:
Take these books to the library. Note: Commands can also be negative.
Get me a cup of coffee, please. Example: Don’t touch those glass exhibits.
Be neither a borrower nor a lender. Sentences of this kind are called negative commands or pro-
hibitions. There can also be questions which are negative:
Note: There are some sentences which express ‘commands’
in an indirect way. Let is used at the beginning of these Hasn’t he got a car?
sentences. Subject is not omitted but expressed in these Why didn’t you come to the class in time?
sentences. Sentences of this kind are called negative questions.
Chapter 1  Grammar  |  1.13

Sentences Correction Uncountable nouns fall into the following groups:


1. Things which are considered in mass or quantity and
Correct Use of Nouns not in numbers: sugar, sand, hair, dust etc.
A noun is a naming word. It is the name of a person, place, 2. Materials: wood, cloth, silver, gold, iron, etc.
thing, animal, concept, river, etc. Nouns are divided into 3. Liquids: water, milk, oil, ink, honey, etc.
five main kinds. 4. Gases: steam, mist, nitrogen, air, etc.
5. Natural phenomena: heat, cold, electricity, lightning,
1. Common Noun: A name given in common to every
etc.
person or thing of the same class is called a common
6. Abstract nouns: stages of life, states of mind,
noun.
qualities, processes, actions, ideas, etc.
Examples:
courage, happiness, freedom, attention, childhood,
• Hyderabad is a big city.
honesty, enjoyment.
• She is a good girl.
Note: A number of words used to refer to qualities,
2. Proper Noun: The name of a particular person or
states, actions, etc., are however countable. These
place is called a Proper Noun.
may be considered exceptions.
Examples:
• King Solomon was a wise king. Examples: joys, sorrows, dreams, miseries, etc.
• Kalidas was a great poet.
Branches of learning: Economics, Mathematics,
7.
3. Collective Noun: It is the name of a number of Politics etc.
persons or things taken together and spoken of as a Note: There are some uncountable nouns which we
whole. refer to in parts. When we do so, we use them with
Examples: expressions such as a piece of, a grain of, a kilo of,
• A herd of cattle is grazing in the field. etc. Here is a list of such expressions:
• A bunch of keys is on the table.
a piece of chalk a piece of information
4. Abstract Noun: The name of a quality, a state of a cake of soap a piece of furniture
mind or a stage of life is called an Abstract noun. a block of ice a loaf of bread
Examples: a piece of advice a log of wood, etc.
• Kindness is a virtue.
• Childhood is the happiest stage of one’s life. These expressions have their plural forms: pieces of chalk,
cakes of soap, etc.
5. Material Noun: All those nouns, which are used Proper Nouns are not categorised either as Countable
to refer to metals and materials, are called Material Nouns or as Uncountable Nouns.
Nouns. Now study carefully some rules related to the correct use
Examples: of nouns:
• This chain is made of gold.
• This house is built of brick. Rule 1: A proper noun becomes a common noun when
it is used in the plural form, or when an article is placed
In the above examples ‘gold’ and ‘brick’ are material nouns. before it.
Nouns are further classified into two types depending on Examples:
whether they can be counted or not.
There are five Gandhis in our college.
Countable Nouns: Countable nouns are nouns that
1. Vijay Kumar is the Milton of your college.
we can count: for eg. boy - one boy, two boys, three Kalidas is the Shakespeare of India.
boys, etc.
Note: The classes of nouns known as ‘common Rule 2: A collective noun takes a singular verb when the
nouns’ (boy, table, etc.) and ‘collective nouns’ (flock, whole group is considered as one unit.
regiment, crowd, troop, etc.) can be included in the
Examples:
larger class of countable nouns.
The committee consists of five members.
Uncountable Nouns: (also called non-count nouns)
2. The family living next door has come from Chennai.
Uncountable nouns (NCNs) name things which we
cannot count or usually don’t count. The classes of Note: If we refer to the members of the committee or fam-
nouns known as Material nouns and abstract nouns ily separately, the collective noun takes a plural verb, but it
can be included in this category. (the collective noun) remains singular in form, for eg.: The
committee have taken their seats.
1.14 | Verbal Ability

Rule 3: An abstract noun can also be used as a common Examples:


noun by placing an article before it. Ten thousand rupees is a large amount.
Six kilometres is not a long distance for a runner like you.
Example: Rajani is a beauty (a beautiful girl).
Rule 12: Inanimate objects (lifeless objects) which are
Rule 4: An abstract noun can also be used in the sense remarkable for beauty, gentleness, gracefulness, tenderness,
of a collective noun. When an abstract noun is used as a weakness, and so on, are treated as feminine gender.
collective noun it takes a plural verb.
Example: the moon, the earth, spring, virtue, peace, c­ harity,
Example: Youth are the pillars of the nation. (collective fame, nature, hope, justice, mercy, pity, fortune, truth, vic-
noun) tory, defeat, modesty, liberty, etc.
Rule 5: When a material noun denotes a mass of matter, Note: Poets refer to them as feminine gender.
it is not used in the plural form.
Rule 13: Inanimate things which are known for strength,
Examples: courage, violence, superiority, and so forth, are treated as
Their house is built of bricks and stones. (incorrect) masculine.
Their house is built of brick and stone. (correct) Example: the sun, death, summer, winter, war, anger, fear,
Rule 6: Some nouns have the same form for the plural as thunder, etc.
well as for the singular. The following are some nouns that Note: The possessive case of nouns is formed when we put
belong to this category. ’s to the noun (apostrophe s)
Example: sheep, species, deer, aircraft, offspring, yoke, Examples:
space craft, salmon, etc. •• The girl’s dress.
•• The boy’s pen
Rule 7: Some nouns are used in the singular only. The
following are some nouns that belong to this category. The possessive case is used with the nouns of living things
but not with inanimate objects.
Example: advice, corn, grain, justice, clothing, informa- •• Table’s leg (incorrect)
tion, poetry, scenery, machinery, hair, etc. •• Leg of the table (correct)
Note: Advice is the noun form and Advise is the verb form. The possessive is used with the names of personified objects.
The advice of the doctor is that I should not smoke. •• Death’s icy hands
(noun)
Rule 14: When the noun is plural, and ends in s; the possessive
The doctor advised me not to smoke. (verb) case is formed by adding only an apostrophe (after s).
Similarly, Practice is noun and Practise is verb.
Examples:
Rule 8: There are some nouns which are used only in the •• Girls’ hostel
plural form. •• Birds’ nests
Examples: Rule 15: When the noun is plural but does not end in s, the
scissors shears spectacles possessive case is formed by adding ’s.
trousers pantaloons shorts Examples:
bowels intestines biceps •• Men’s club
genitals gymnastics premises •• Children’s park
proceeds riches thanks •• Women’s day
nuptials outskirts gallows
doldrums earnings Rule 16: When a noun or a title consists of several words,
the possessive case is formed by adding ’s to the last word.
Rule 9: Some nouns are apparently plural in form but are
singular in use. Examples:
•• The Prime Minister of India’s speech.
Example: news, economics, physics, measles, mumps, ethics. •• The king of Bhutan’s visit to India…..
Note: summons is singular and summonses is plural. Rule 17: When two or more proper nouns are joined by
Rule 10: The following nouns are always used in plural. ‘and’, and a common possession is meant, the possessive
Example: cattle, police, people, vermin, poultry, etc. case will be formed by adding (’s) to the last noun.

Rule 11: When a plural noun denotes a specific amount, Example: Amar and Kumar’s house is really beautiful.
length, weight, quantity, etc. considered as a whole, the verb Note: This sentence denotes that the house belongs to both
must be in the singular form. Amar and Kumar.
Chapter 1  Grammar  |  1.15

Rule 18: When there are two nouns in apposition, the 4. ‘An’ is used before the word, the pronunciation of
possessive case will be formed by adding (’s) to the second which starts with a vowel sound.
noun. 5. There are 44 sounds (each is given a symbol from the
Examples: International Phonetic Alphabet).
1. Penicillin, Flemming’s discovery, has saved the lives of 6. Out of the 44 sounds, there are 20 vowel and 24
many people. consonant sounds.
2.  Mohan, the professor’s son, is very intelligent. 7. Please note that, strictly speaking, A, E, I, O, U are
not vowels but just letters of the English Alphabet
Rule 19: The possessive case of a compound noun will be consisting of 26 letters.
formed by adding (’s) to the last word. 8. The indefinite article ‘a’ is used before
Examples: (a)  a word beginning with a letter which has a
Sister-in-law’s house. consonant sound. e.g.: a book, a man, a pen.
(b) a word that begins with a letter (like O) with the
Commander-in-chief’s office.
sound like ‘wa’ e.g.: a one-rupee note, a one-
Rule 20: If the last syllable of a singular noun ends in eyed man, etc.
‘-s’ or –‘ce’ and the noun is followed by the word ‘sake’, (c)  a word beginning with ‘u’ or ‘eu’ giving the
the possessive case of the noun will be formed by adding consonant sound ‘yu’.
(’) only. However, modern day English accepts the use Examples: a university, a European.
of ‘s’ after apostrophe as the word is pronounced so–eg– 9. The indefinite article ‘an’ is used before:
goodness’s sake. (a) a word beginning with a letter which has a vowel
sound.
Examples:
Examples: an apple, an egg, an umbrella, etc.
for goodness’ sake, for justice’ sake.
(b) a word beginning with ‘h’ but the pronunciation
for conscience’ sake, for Jesus’ sake. of which starts with a vowel sound.
 Examples: an heir, an hour, an honest man, etc.
Sample Exercise–4 (c) an abbreviation, the first letter of which has a
vowel sound
Correct the following sentences where necessary.   Examples: an M.L.A., an M.P., an M.Com, an
1. This scissor will not cut such a hard wire. S.D.O., an F.R.C.S., an X-mas gift, etc.
2. I have seen many cannons in the military parade ground.
3. The beggar is begging for alm. Some Important Rules Regarding the
4. He has lost all his luggages on his way home. Use of Articles
5. The company wants to dispose of the equipment.
6. She took great pain to write the essay properly. Rule 1: A or An is not used before:
7. The first innings is over just now. 1. plural nouns: a books, a universities, a dinners, etc.
8. These sceneries of Kashmir are beautiful. (wrong)
9. My brother-in-laws will come to our house next week. 2. uncountable nouns: an advice, an information, etc.
10. These golds have been brought from South Africa. (wrong)
3. names of meals:
Correct Use of Articles Examples:
There are two types of articles: Let us have dinner (correct)
Let us have a dinner (incorrect)
1. The Indefinite Article
2. The Definite Article Note: An indefinite article can be used before names of
meals when these are preceded by an adjective.
The Indefinite Article: A and An (Please note that ‘An’ is
a variant of ‘A’.) Example: She gave me a good breakfast at 8 a.m.
The Definite Article: The
Rule 2: A or An is used in the following ways:
Notes: Before the word ‘most’ when it is used in the sense of very
1. A or An is used before a singular countable noun. or much or exceedingly.
2. The choice between A and An wholly depends on the
Examples:
pronunciation of the word.
Sreedhar is a most intelligent student.
3. In English the ‘spelling of a word’ is different from its
‘pronunciation’. This is a most unfortunate event.
1.16 | Verbal Ability

Note: It must be borne in mind that ‘man’ or ‘woman’, Example: He has gone to the hospital to visit a friend.
when used in a general sense to represent ‘mankind’ as a
Rule 12:
whole, never takes an article.
Before an adjective in the superlative degree.
Example: Man is mortal. Michael is the tallest boy in the class.
Rule 3: With a noun complement. This includes names of Rule 13: With nouns which refer to things which are unique.
professions.
Example: the sun, the moon, the sky, the earth, the equator,
Examples:
etc.
He is an actor.
She is a good dancer. Rule 14: Before an abstract noun or a material if it is used
It was an accident. with an adjunct (a qualifying clause)
* The words underlined are noun complements. They are (or when there is a particular reference to the material noun)
also called subject complements. Example: The gold you have brought from the U.S.A. is of
Rule 4: In certain phrases:  a cold, a pain, on an average, good quality.
make a noise, make an effort, make a mistake, a fever, etc. Rule 15: Before a singular countable noun which picks out
Rule 5: With certain numbers: a hundred, a thousand, a one individual, object, etc. as representative of a class.
million, etc. Example: The tiger is a ferocious animal.
Rule 6: ‘A’ can be used before Mr./ Miss/ Mrs. + name Notes:
Example:  a Mr. Bose, a Mrs. Bose, etc. All the following sentences mean the same thing.
The tiger is a fierce animal.
Notes:
A Mr. Bose denotes a person who is called Bose, and A tiger is a fierce animal.
implies that he is a stranger to the speaker. Tigers are fierce animals.
Mr. Bose, without ‘a’, implies that the speaker knows Rule 16: The is used before certain adjectives to give a
Mr. Bose, or knows of his existence. plural meaning.
Rule 7: Before a proper noun to make it a common noun.
Examples:
Examples: rich, poor, dead, sick, healthy, deaf, blind, etc.
Mohan is a Newton (Mohan is a great scientist) the rich = rich people
Amaresh is a Shakespeare (Amaresh is a great dramatist). the poor = poor people
Rule 8: Before certain uncountable nouns preceded by Rule 17: With certain adjectives indicating nationality.
nouns + of
Example: the Dutch, the Spanish, the Chinese, the
Example: a piece of advice, a bit of news, a drop of water, Burmese, etc.
etc.
Rule 18: Before ‘only’ and ordinal numbers, such as first,
Rule 9: After the words many, rather, such, quite, etc. in second, millionth, etc.
certain structures. Examples:
Examples: All the students of the first year are invited.
Many a friend of mine is attending the party. The second ranker is my son.
Such a show cannot be arranged now. Rule 19: Before a noun when special emphasis is needed.
He is rather a fool to take such decisions.
Example: This is the novel I am talking about.
Rule 10: In certain expressions of quantity.
Rule 20: Before a common noun to give it the meaning of
Example:  a lot of, a couple, a great many, a good deal of, an abstract noun.
a good many, a great deal of, a few, a little, etc.
Example: At last the father in him prevailed and excused
THE is used in the following ways: him.
Rule 11: Before a noun denoting a hospital, temple, school, Rule 21: Before an adjective in the comparative degree,
college, prison etc, if its purpose or use is not referred to or when the selection of one out of only two persons, places
if used not in its primary purpose. or things is meant.
Chapter 1  Grammar  |  1.17

Example: Nalini is the more beautiful of the two girls in Example: the Krishna, the Ganga, the Yamuna, etc.
the class.
Rule 33: Before the names of seas.
Rule 22: In special comparatives.
Example: the Arabian Sea, the Red Sea, etc.
Examples: Rule 34: Before the name of Oceans.
The more you earn, the more you spend.
The more, the better. Example: the Indian Ocean, the Atlantic Ocean, etc.
The higher you go, the cooler you feel. Rule 35: Before the names of certain chains of Mountains.

Rule 23: Before musical instruments. Example: the Himalayas, the Alps, etc.

Example: Rajani can play the piano very well. Rule 36: Before the names of deserts
Example:  the Sahara, the Thar, etc.
Rule 24: Before the proper names of certain well-known or
sacred books. Rule 37: Before the names of newspapers, magazines, etc.

Example: the Mahabharat, the Ramayana, the Gita, the Example:  the Hindustan Times, the Statesman, the Deccan
Bible, the Quran. Chronicle, etc.
Rule 38: Before groups of islands.
Rule 25: Before the names of certain countries each of
which is a union of smaller units. Example:  the Andamans, the West Indies, etc.

Example: the U.S.A., the U.A.E., the U.K., etc. Rule 39: Before the names of certain countries.
Example:  the Yemen, the Sudan, the Hagues, etc.
Rule 26: Before the words like north, south, etc. when these
are used as nouns. Rule 40: Before the dates of months.

Example: the north of India, the Middle East, the West Asia Example:  the 23 October, 1949, the 15th August, 1947,
etc.
Rule 27: Before some proper nouns consisting of adjectives THE is omitted in the following cases:
and noun or noun + of + noun.
Rule 41: Before a common noun used in the widest sense.
Example: the State Bank Of India, the National Museum
Examples: 
Rule 28: The + singular noun + clause or phrase can be used In general woman is kind-hearted.
to ­distinguish one person from another of the same name. Man is mortal.

Examples: Rule 42: Before material nouns.


We have two Reddys, which Reddy do you want? Example:  Gold is a precious metal.
I want the Reddy who signed the letter.
Note: The may be used with a material noun if it is used
Rule 29: Before the names of political parties. with an adjunct which makes it definite.

Example: The Congress, The B.J.P., etc. Example:  The gold we use in India is all imported.
Rule 43: Usually before proper nouns.
Rule 30: When it is clear from the context that a particular
person, place or thing is meant. Example:  Hyderabad is the capital of Andhra Pradesh.
Examples: Rule 44:  Before abstract nouns used in a general sense.
I talked to the principal yesterday. Examples:
The students are playing in the garden. Honesty is the best policy.
Rule 31: Before the names of the historical or public Sincerity pays dividends.
buildings
Note: If an abstract noun is qualified by an adjective or
Example: the Taj Mahal, the Red Fort, the Rashtrapati an adjectival phrase or clause it may have the article ‘the’
Bhavan, etc. before it.
Rule 32: Before the names of rivers. Example:  The wisdom of Moses is biblically significant.
1.18 | Verbal Ability

Rule 45: Before the words—father, mother, aunt, uncle, when these places are visited or used for their primary
etc., in general sense. purpose.
Example:  Father is very angry today. We go to bed to sleep.
We go to hospital as doctors.
Rule 46: Before predicative nouns denoting a position that
We go to university for higher studies.
is normally held at one time by one person only.
Note: When these places are visited or used for the other
Examples: reasons or purposes ‘the’ should be used.
Mr. Kiran was elected chairman of the committee.
He became principal of our college in 1996. Example:  Sometimes I go to the prison to give lectures on
morality, social behaviour, etc.
Rule 47: Before plural nouns which are used to denote a
The articles a, an or the can be used as follows in some
class.
cases:
Examples: Rule 53: When two or more adjectives qualify the same
Historians study old monuments for research purposes. noun, the article is used before the first adjective only.
Camels are useful animals in deserts.
Example:  He has a black and white coat.
Rule 48: Before plural nouns used in general sense.
Rule 54: When two or more connected nouns refer to the
Example:  Members are requested to pay their subscriptions same person or thing, the article is placed before the first
in time. noun only.

Rule 49: Before the names of meals. Example:  The chief accounts officer and financial adviser
is supposed to certify your documents.
Examples:
Rule 55: In expressing a comparison, if two nouns refer to
I had lunch at 2.30 p.m.
the same person or thing, article ‘a’ is used before the first
Let’s have dinner at 9.00 p.m. noun only.
Note: ‘The’ can be used when meals are preceded by an Example:  He is a better teacher than administrator.
adjective or a clause or phrase particularising them. Articles are omitted in the following cases:
Examples: English ⇒ the English language
The dinner given by our colony association yesterday was the English ⇒ the English people
not properly arranged.
Examples:
What about the wedding dinner tonight? We speak English at home.
Rule 50: Before common nouns used in pairs. The English and the French have fought various wars.
He has gone to ⇒ He has gone to make purchases.
Examples: market
He worked day and night to prepare for the Civil Service
He has gone to the ⇒ He has gone to the place where
exam.
market there is a market, not necessarily
Both husband and wife are supposed to take part in this to make purchases.
competition. To see light ⇒ to look at light
Rule 51: No article is used before the nouns in the following To see the light ⇒ to be born
expressions: Examples:
I see light at the end of the tunnel. (metaphoric use which
to catch fire to send word to give ear
means there is hope)
to lose heart to leave home to take offence
at home in hand in debt His proposals for a new international airport never saw the
by day at sunrise at noon light of the day.
on demand by land by air The article ‘the’ is omitted before the nouns in the phrases
at night on foot at ease below:
He invited me to lunch/tea/dinner.
Rule 52: ‘The’ is not used before the words—bed, hospital,
sea, temple, prison, court, school, university, college, etc., Note:  lunch/tea/dinner are used in general sense.
Chapter 1  Grammar  |  1.19

Correct use of Pronouns Pronouns of Number


A pronoun is a word used in the place of a noun. Examples:
1. Of the ten guests, three were men.
Types of pronouns:
2. Many of them are not good books.
Personal Pronouns Pronouns of Quantity
Person Singular Plural Examples:  more, much, little, etc.
First person I We
Second person You You
Distributive Pronouns
Look at the pronouns underlined in the sentences given
Third person He, She, It They
below:
Forms of pronouns: (cases) Examples:
1. Everyone has his own problems.
Nominative case Accusative case Possessive 2. Either of these applicants can be employed.
(subject) (object) 3. Neither of the students can get through the
I Me My Mine examination.
We Us Our Ours
4. Each of those players deserves a prize.
5. Everybody will be given a chance to participate in
You You Your Yours
this match.
He Him His His These words, which are underlined, are distributive pro-
She Her Her Hers nouns. They are called so because they refer to persons
It It Its Its considered individually. The distributive pronouns are in
They Them Their Theirs the singular number and are therefore followed by singular
verbs.
Note: The forms my, our, your, his, her, its and their are
determiners. They can also be used as possessive adjectives. Note:
1. Neither is a negative word which is used to refer to
Possessive Pronouns
two persons or things.
Example:  This book is his. 2. None is also a negative word which is used to refer to
Reflexive Pronouns more than two persons or things.
3. The usage: Each one of the boys …… (is wrong
Examples: because ‘one’ becomes redundant)
1. She washed herself at a well.
2. They killed themselves for no reason. Reciprocal Pronouns
3. I must blame myself for this. Look at these sentences:
Emphatic Pronouns Examples:
Example:  I offered to drive the car myself. She herself 1. The two girls helped each other in every respect.
made the mistake. 2. The political parties quarrelled with one another.
Each other and one another express a mutual or recipro-
Demonstrative Pronouns cal relationship. They are considered as single units, and
Examples: are called reciprocal pronouns or ‘compound personal
1. That is Dr. Rao’s house. pronouns’.
2. Those are some new buildings.
Note: Each other is usually used to refer to two persons or
3. This is your passport.
things and one another to more than two persons or things.
4. These are good books.

Indefinite Pronouns Interrogative Pronouns


The words underlined in the following sentences are called
Example:
interrogative pronouns because they are used in questions.
1. Some are born great.
Examples:
2. Anyone can take a horse to the pond, but no one can
1. Who is the president of India?
make it drink.
2. Whose is this calculator?
Other indefinite pronouns are: 3. To whom did you give the parcel?
somebody, anybody, anything, something, (the) other, oth- 4. Which is the road to the hospital?
ers, another, nobody, nothing etc. 5. What have you to do now?
1.20 | Verbal Ability

6.
Whom did you borrow this book from? Example:  You, he and I, will get an award for the good
7.
Whom did she refer to in her lecture? work we have done.
Sequence:  Second person, third person and first person.
Relative Pronouns In standard English, however, the sequence of third
Look at these sentences: ­second and first is also accepted (i.e.) He, you and I _____.
Examples: Rule 4: When two singular nouns joined by and denote the
1. The gentleman who is speaking is our principal. same person or thing, the pronoun used for them must be
2. This is the gentleman whose guest I was in Bombay. singular in number. The definite article the is placed before
The words underlined are pronouns standing for the nouns the first noun.
used before them. The nouns are called antecedents and Example:  The accounts officer and treasurer should be
the pronouns are called relative pronouns. They relate the careful in his work of keeping accounts.
adjective clauses to the main clauses.
Rule 5: When two singular nouns are joined by ‘and’,
and are preceded by each or every, the pronoun must be in
Rules for use of Pronouns singular number.
Now let us look at some aspects related to pronouns that will Example:  Every student and every teacher took his or her
be helpful in answering questions in Sentence Correction. seat.
Rule 1: Some important uses of the pronoun ‘it’ are given Rule 6: When a personal pronoun is connected by a
below with examples. conjunction with some other word in the objective case, it
1. To introduce a sentence must be in the objective or accusative case.
Example:  It is not certain that the president will Example:  These clothes are for you and me.
come.
2. To give emphasis to the noun or pronoun that follows Rule 7: When a singular noun and a plural noun are
Example:  It was you who began the quarrel with us. combined by or, either ... or, neither ... nor, the singular
3. As an indefinite nominative of an impersonal verb. noun usually comes first in the sentence, and the pronoun
Examples: must be in the plural number, corresponding to the plural
It rains. noun which is closer to it.
It is snowing outside. Example:  Either the manager or his subordinates failed in
4. In sentences showing distance their duty in sending the official message.
Example:  It is not far to walk.
5. In sentences indicating time. Rule 8: The personal pronouns—yours, ours, hers, theirs
Example:  It is ten O’clock now. and its—are written without the apostrophe (’).
6. To introduce a phrase. Examples:
Example:  It is decided to declare a holiday today. Your’s sincerely (Wrong)
7. In exclamatory sentences. Yours sincerely (Right)
Example:  What a beautiful book it is!
8. To introduce a that clause. Note: ‘It’s’ means ‘It is’ and not belonging to it.
Example:  It is said that smoking is injurious to Example:  It’s a mad dog which bites its tail.
health.
9. As a sort of object in order to avoid repetition. Rule 9: When a personal pronoun is used as a complement
Example:  Let us fight it (the issue) out. to the verb to be, it (the pronoun) must be in the nominative
case.
Rule 2: While confessing a fault (or expressing a negative
idea) the sequence of the personal pronouns should be as Example:  It was he, who could solve the problem easily.
follows: Rule 10: A pronoun should be used in the objective case in
Example:  I, you, and he are in the wrong and will be a sentence beginning with let.
punished. Examples:
Sequence: First person first, second person next and third Let him go to his office immediately.
person last. Let her submit the records in time.
Rule 3: While expressing a positive idea or praise, the Rule 11: One can be used to talk about people in general.
sequence of the personal pronouns should be as follows: the pronoun that follows one should be one’s. (not his/her)*
Chapter 1  Grammar  |  1.21

Examples: 2. When selection is expressed.


One should do his duty (wrong) Example: Which of these television sets do you
One should do one’s duty (correct) want to purchase?
3. To refer to a sentence.
Note: But there is a controversy here. In American English Example:  He was said to be drunk, which was not
one can be followed by his or her. Students taking TOEFL or true.
GRE or GMAT or SAT should keep this in mind. However,
usually one need not worry about this problem. If a sen- Rule 17: Uses of THAT:
tence begins with one, be sure that you or they DOES NOT ‘That’ is used in the following ways:
­follow. Hence it is never correct to say: 1. For persons, lifeless things and small animals in the
If one takes this exam without studying, you are likely to singular or in the plural number.
fail. Examples:
This is the girl that failed in the exam.
Additional example: One should never tell his secrets to a This is the radio that I bought yesterday.
gossip if he wishes them to remain secret. (Correct)}
2. As a substitute for a singular noun already mentioned.
Rule 12: A relative pronoun must always be placed as near (pay attention to this use particularly in the
its a­ ntecedent as possible. Also, it must always agree with comparative degree)
its antecedent in number, gender and person. Examples:
The weather of Hyderabad is far better than Chennai
Example:
(wrong).
This is the manager who abused the clerk.
The weather of Hyderabad is far better than that of
ant. rel. pr.
Chennai.
Rule 13: Generally, the relative pronoun in the objective 3. After a noun phrase used as direct object.
case is omitted. I vividly remember the night that she came.
(Here that is used in the sense of when)
Example:  The student (whom is omitted) you wanted to
punish is absent today. Rule 18: ‘Either’ and ‘neither’ are used in speaking of two
persons or places or things etc.
Rule 14: The pronouns who, whom and whose are generally
used for persons. Examples: 
Neither Mahesh nor Mohan is intelligent.
Who is used in the nominative case.
(negative meaning is implied)
Whom is used in the objective case.
Either Mahesh or Mohan is expected to get a prize.
Whose is used in the possessive case.
(positive meaning is implied)
Examples: Rule 19: Uses of each other and one another
1. Sarita is the student who got an award.
2. They are the thieves whom the police caught. 1. Each other is used for two persons or things or places
3. This is the student whose certificates are lost. etc.
Example:  These two students love each other.
Rule 15: When the relative pronoun is in different cases,
one in the nominative and the other in the objective, it must 2. One another is used for more than two persons or
be mentioned twice, once for each verb. things.
Example:  Those four countries always disagree with
Example:  The girl, who is my daughter and whom you met one another.
in the library yesterday, left for Mumbai this morning.
In the above example the subject of the sentence ‘the Rule 20: Each can come in three different positions in a
girl’ is also the object of the sentence. Hence both ‘who’ sentence.
and ‘whom’ are used. 1. Each of the students got a prize.  (initial)
Rule 16:  Uses of WHICH: 2. The students got a prize each.  (end)
3. The students were each given a prize  (middle)
‘Which’ is used in the following ways:
Rule 21: ONE is used in the following ways :
1. For infants, small animals, and objects
Examples: 1. For people in general.
This is the baby which was lost in the theatre. Examples:
This is the dog which my friend bought from the One must try to do one’s duty.
Kennel’s club. One must not be proud of oneself.
1.22 | Verbal Ability

2. In place of a noun previously mentioned. Positive degree: No other student in the class is as
Examples: good as Mohan.
Give me a banana which is a fresh one. •• The Positive Degree of an adjective is the adjective in its
Give me bananas which are fresh ones. simple form. It is used to refer to the mere existence of a
particular quality.
Rule 22: As regards anybody, everyone, everybody, etc.
•• The comparative degree of an adjective denotes a higher
the pronoun of the masculine or feminine gender should be
degree of the quality than the positive, and is used, when
used according to the context.
two things are compared.
Example:  Everyone of the boys got his hall ticket. •• The superlative degree denotes the highest degree of the
quality.
Sample Exercise–5 Note:
Rewrite the following sentences after making the necessary 1. The usages ‘as ...... as’ and ‘so ...... as’ appear in
corrections. positive degree.
Comparative degree has ‘adjective + er ... than’.
1. She availed of the opportunity. Superlative degree has ‘the + adjective in the
2. Those two companies always help one another. superlative form’.
3. India and Pakistan should cooperate with one another Note the use of ‘the’, before the adjective in the
in this matter. Superlative (superlative form).
4. Dear students, enjoy during the holidays.
5. The committee were divided in its opinion regarding 2. There is no superlative degree if the comparison
this issue. involves only two objects, persons, or places, etc.
6. The team, after taking its bath, have gone for practice Examples:
of cricket. Of the two sisters she is the best.  (wrong)
7. My opinion is the same as your. Of the two sisters she is the better.  (correct)
8. We were told to let only you and she enter. When selection of one of the two persons or things
9. This is the scientist which won the first prize. (sets of things) of the same kind is meant, the
10. His problems are the same as my. comparative degree is preceded by ‘the’ and is
followed by ‘of’.
Correct Use of Adjectives Example:
An adjective is a word which qualifies a noun or a pronoun. She is the better of the two sisters.
Let us look at some important rules in the use of
Example: adjectives:
She is a good teacher.
adj. noun Rule 1: Most adjectives form their comparatives by the
addition of -r or -er, and their superlative by the addition of
An adjective can be used in two ways: -st or -est (depending on the spelling) to the positive.
(1) attributively (2) predicatively
Examples:
An adjective is used attributively if it is placed immediately
before the noun it qualifies. Positive Comparative Superlative
Great Greater Greatest
Example: 
She is a good teacher. Brave Braver Bravest

adj. noun Rule 2: Some adjectives (usually having more than two
syllables in the spelling) form their comparative by using
An adjective is used predicatively if it is used after the verb.
the adverb more with the positive, and the superlative by
Example: using the adverb most with the positive.
Bimala is intelligent.
Examples:
v. adj.
Positive Comparative Superlative
An adjective has three forms: Positive, Comparative, and
beautiful more beautiful most beautiful
Superlative. These are the three degrees of comparison:
interesting more interesting most interesting
Look at the following examples:
Superlative degree: Mohan is the best student in the class. Rule 3: (very important) When two qualities in the same
Comparative degree: Mohan is better than any other stu- person or thing are compared, the comparative degree is
dent in the class. formed by using more, instead of -r or -er with the positive.
Chapter 1  Grammar  |  1.23

Example: Example:  Ramakrishna is by far the ablest lecturer in the


Reddy is more wise than intelligent. college.
(This sentence means that Reddy is both wise and intelli- Rule 12: Two adjectives which refer to the same noun or
gent. But his wisdom is greater than his intelligence.) pronoun joined by a conjunction must be in the same degree
Rule 4: When an object is compared with the rest of the of comparison.
group, the latter term of comparison must exclude the Example:  Gandhiji is the noblest and wisest of all national
former by using ‘any other’. leaders.
Examples: Rule 13: Certain adjectives, when preceded by ‘the’ become
Gold is more precious than any other metal.  (correct) nouns in plural and require a plural verb if they are used as
Gold is more precious than any metal.  (wrong) subjects.
Rule 5: There are some words which are used only in the These are: rich, poor, needy, aged, blind, dead, meek,
positive and cannot be used in the comparitive, or in the wicked, etc.
superlative. Examples:  The rich (rich people) usually hate the poor
Example:  interior, exterior, ulterior, major, minor, etc. (poor people).
•• This is more inferior than that.  (wrong) Rule 14: Some adjectives often confused:
•• This is inferior to that.  (right) 1. FARTHER - FURTHER
Rule 6: The following are used as comparative adjectives Farther denotes more distant in space,
and are followed by to and not than: Examples:
Example:  superior, senior, junior, inferior, prior, anterior, Sheela lives at the farther end of this street.
posterior, prefer, etc. Further means additional; more
Examples:
Rule 7: The adjectives—empty, excellent, circular, extreme, There is nothing further to say about him.
chief, entire, complete, perfect, final, last, unique, universal, For further details please contact the director.
round, square, triangular, eternal, etc., are not used in the 2. Many, a great many, a good many
comparative or superlative degree. All these take a plural noun and a plural verb after
Rule 8: Some adjectives can be used only in the positive them.
and in the superlative. They are: Examples:
1. A great many people died in the cyclone.
Positive Superlative 2. My sister has a good many friends.
top topmost 3. Use of many + a + noun (singular) + verb (singular)
northern northernmost
structure :
southern southernmost
Examples:
Many a delegate is attending this seminar.
eastern easternmost
(meaning:  Many delegates are attending this
western westernmost seminar)
4. MODIFIERS: FEW, LITTLE, MUCH, and MANY
Rule 9: The adjective ‘preferable’ is used as a comparative.
Few is used with plural nouns. Little is used with
It is followed by to. It is not used with more.
singular non-count nouns.
Examples: Without articles, few, and little usually have rather
This is more preferable than that.  (wrong) negative meanings. They often suggest ‘not as much/
This is preferable to that.  (correct) many as one would like’, or ‘not as much/many as
expected’ or a similar idea.
Rule 10: The comparative adjectives ending in ‘or’ are   With articles ‘few’ and ‘little’ i.e., a few, and a little
followed by the preposition to. are more positive in meaning. Their meaning is closer
Inferior, superior, prior, anterior, posterior, senior, junior to ‘some’. They often suggest ideas like ‘better than
nothing’ or ‘more than expected’.
Examples:
He is superior to me.  (correct) Examples:
He is superior than me.  (incorrect) (a) There are few books on ‘Thermodynamics’ in
the library, so you have to purchase them.
Rule 11: Sometimes the words much, less, far, etc., are used (b) You don’t need to go shopping. There are a few
before the comparatives to denote emphasis or excess. eggs in the fridge.
1.24 | Verbal Ability

(c) I’ve got a little bread and cheese. It’ll be enough Examples:
for supper. He had money enough to buy a new car.
Difference between fewer and less:  In theory, fewer N
(the comparative of few) is used before countable OR
nouns, and less (the comparative of little) before He had enough money to buy a new car.
uncountable words. N
Examples: 6. MODIFIERS - NEGATION
(a)  There are fewer exploited workers than there There are some words that have negative meanings
used to be. even though they do not appear to be negative, for
(b) My friend earns lesser than a postman does. example: hardly, scarcely, rarely, seldom, without,
Note the following: and only. Do not use another negative word with these
P.D. C.D. S.D. words.
few - fewer - fewest Examples:
little - less/lesser - least (a) He had scarcely enough money to purchase books.
* fewer and less (lesser) are followed by than as they (b) They went to bed without dinner.
are the comparative forms. Note: Scarcely and hardly are followed by when and
Note: ‘Many’ like ‘few’ is used before a count noun. not than. No sooner is followed by than.
These expressions mean ‘as soon as’.
Example:
Many/few students. Examples:
C.N. (a) As soon as I reached the station the train left.
(b) No sooner had I reached the station than the train
‘Much’, like ‘less’ is used before a non-count or a
left.
material noun.
No sooner + had + Subject + Past participle + …
Example: (c) No sooner did I reach the station than the train left.
Much/less water. No sooner + did + Subject + Present tense verb +
NCN ……….
5. MODIFIERS—TOO, VERY, ENOUGH Similarly: Hardly/Scarcely + had + Sub + Past
Compare the meanings and patterns of too, very, and participle …….. when …..
enough. OR
Scarcely/Hardly + did + Sub + Present tense verb
(a) Very means to a high degree, but does not suggest …….. when …..
impossibility.
Rule 15: MODIFIERS : ADJECTIVES AFTER VERBS
Mary is very intelligent.
OF SENSATION
(b) Too suggests impossibility or undesirable degree. These verbs of sensation are generally followed by
too + adj + to + v ­adjectives* not by adverbs: feel, look, seem, appear, smell,
She is too sick to come to class today taste and sound.
Note: It is better not to use ‘Too’ with a positive (* These are also called predicate adjectives)
adjective.
He feels bad (correct)
Instead of ‘too’ it is better to use ‘very’.
He feels badly (wrong)
(c) Enough suggests possibility or sufficient degree. The soup smells delicious (correct)
He is tall enough to play basketball. The soup smells deliciously (wrong)
Notes: Rule 16: MODIFIERS - HYPHENATED OR COMPOUND
1. Be careful to put enough after the adjective. ADJECTIVES
2. Be careful to put to+v (infinitive) after enough.
Nouns are sometimes found as part of hyphenated or com-
3. In patterns 2 and 3 above, do not use any other
pound adjectives (adjectives of more than one word joined
structure word after the adjective or adverb except to.
by hyphens). These nouns are never plural.
4. In the above patterns adverbs can be used in the
same position as adjectives. I bought a four hundred year-old painting in Germany.
Example: HYPHENATED ADJ. N
Mary sings very well. Some more examples:
5. Enough can come before or after a noun to express 1. B.Com is a three-year degree course.
sufficiency. 2. This is a ten-kilometre-long distance.
Chapter 1  Grammar  |  1.25

3. The professor has delivered a two-hour lecture 5. The later suggestion is better than the former.
today. 6. These flowers smell sweetly.
7. Little learning is a dangerous thing.
Rule 17: MODIFIERS - CARDINAL AND ORDINAL
8. Her birthday is the most happiest event this year.
NUMBERS
9. Usually the rich people hate poor.
There are two kinds of numbers, cardinal and ordinal. 10. Go and meet the concerned clerk in the university.
Examples: 11. Honour is dear to me than life.
CARDINAL   ORDINAL 12. Little act would have saved the situation.
one first 13. The tiger is the ferocious of all animals in the forest.
two second 14. My knife is the sharpest of the two.
three third
four fourth
twenty-one twenty-first Correct use of Adverbs
The following patterns are used to designate items in a series: An adverb is a word which modifies a verb, an adjective or
another adverb in a given sentence.
1. Ordinal numbers are used in this pattern:
THE + ORDINAL + NOUN Examples:
The first book of the series is about verbs. She is reading very fast.
verb adv.
2. Cardinal numbers are used in this pattern:
NOUN + CARDINAL She is a very intelligent girl.
Book one of the series is about verbs. adv. adj.
Notes: The horse runs very quickly
1. Use the with ordinal numbers. adv. adv.
2. Do not use the with cardinal numbers. (Note: usually the adverbs end with -ly.)
3. Be careful to use the correct word order for each
pattern.
Rules Pertaining to Use of Adverbs
Rule 18: MODIFIERS:  NOUN ADJECTIVES
The first noun (N) in the following pattern is used as an Rule 1: In order to make our meaning clear, an adverb must
adjective. be placed as near as possible to the word it modifies.
All these are language students. Examples:
N N She has only three dollars with her.
adv. adj.
Notes:
He says he often visits my place.
1. When nouns are used as adjectives, they do not have
plural or possessive forms. He often says he visits my place.
2. Exceptions:  The following nouns always end in -s but Note: Other adverbs like only are: just, nearly, hardly,
are singular in number when they are used as names of almost and scarcely.
courses or sciences : Physics, Mathematics, etc. Read the following examples:
He is an Economics teacher. Wrong : We only have four hours to finish this paper.
N N Right : We have only four hours to finish this paper.
BUT The current economic situation is extremely uncertain. Wrong : She just wants to take one class. [not anything
else]
Note: Right : She wants to take just one class. [not even
‘Economic’ is an adjective here. second]
‘Economical’ means frugal, thrifty. Wrong :  That building nearly costs sixty thousand
rupees.
Sample Exercise–6 Right :  That building costs nearly sixty thousand
rupees.
Correct the mistakes relating to the use of adjectives in the
following sentences where necessary. Rule 2: When an adverb modifies an intransitive verb, it
usually ­follows it.
1. The two first chapters of this book are very important.
2. Suvarna is greater than any student in the class. Examples:
3. Shakuntala is better than any drama in Sanskrit. •• She sang melodiously.
4. His house is further from the station than yours. •• She writes neatly.
1.26 | Verbal Ability

Rule 3: When a verb consists of an auxiliary and a main Does he often go fishing?
verb, the adverb is placed between the auxiliary and the Has he ever travelled by air?
main verb.
At times ‘often’ may be placed at the end to emphasise
Wrong : I have told him often not to come late.
it. This is mainly confined to negative statements and
Right : I have often told him not to come late questions.
Rule 4: When an adverb modifies an adjective or another He does not see his friend often, as he lives in a remote
adverb, the adverb usually comes before it. village,
‘Never’ is sometimes placed at the beginning to emphasise
Examples:
it. Then the verb and subject are inverted as in a question.
The Cuckoo sings quite sweetly.
I never saw such an accident.
Adv.
Do not speak so fast. Never did I see such an accident.
Adv. (S - V becomes V - S here)
Rule 7: USE OF HARD, HARDLY, SCARCE, SCARCELY
Note: The adverb ‘enough’ is always placed after the word
it modifies. 1.
Hard as an adverb means ‘diligently’ . It usually
•• Why don’t you speak loud enough to be heard. follows the verb.
He works hard to make both ends meet.
Rule 5: The word ‘only’ should be placed before the word it
2.
Hardly when used as an adverb means scarcely, barely
is intended to modify.
It conveys a negative meaning.
Examples: Hardly (scarcely) had he reached the station, when
•• Only she gave me this book. (i.e., she and nobody else) the train left.
•• She only told me the truth. (and nothing else) Note: Hardly and scarcely are followed by when not
•• I solved only two problems. (correct) than . No sooner is followed by than not when (This
•• I only solved two problems. (incorrect) is very important)
3.
Scarce as an adjective means ‘not plentiful’, hard to
Rule 6: POSITION OF ADVERBS find, not often found.
The position of adverbs is often determined by shades of Coal has become scarce in England.
meaning, for which rules cannot be given, but some gener- Scarcely as an adverb is almost synonymous with
alisations can be made. ‘hardly’. I can scarcely hear you.
They have scarcely enough money to look after their
Adverbs of frequency: always, often, rarely, never, ever, children.
generally, usually, sometimes, occasionally, etc.
Rule 8: SPLIT INFINITIVE
•• If the verb is in the simple tense form, the adverb is usu-
ally placed between the subject and the verb, preferably The infinitive is to + the simple form of the verb (V).
before the verb it modifies. Do not put an adverb between to and verb.
He always goes to college on foot. 1. He refused to do the work quickly.
He often visits the US.
to+v Adv.
His brother never takes alcohol.
2. They have decided to repeat the experiments carefully.
•• When the verb is some form of ‘be’ (is, am, was, are) the
adverb follows the verb: to+v adv.
They are always late. Wrong:   He wanted to carefully read the directions.
He is never punctual. Right:   He wanted to read the directions carefully.
If you are ever in trouble, please meet me.
Rule 9: DANGLING MODIFIER
If the verb is a compound one, the adverb is usually placed The subject of the main clause must be the same as the
after the auxiliary: understood subject of the introductory phrase. In other
I shall never forget his help. words, the introductory phrase modifies the subject of the
He will always behave properly. main clause.
In negative sentences the adverb of frequency follows not. Examples:
1. Looking at his watch, Mr.Vijaykumar got up and left.
They are not often late.
Introductory Ph. Subject
In interrogative sentences the adverb of frequency follows Who looked at his watch? Mr. Vijaykumar
the subject immediately: Who got up and left? Mr. Vijaykumar
Chapter 1  Grammar  |  1.27

2. Travelling to Bombay, Nalini injured her leg. Main Verb


Verbs
Introductory Ph. Subject
Auxiliary Verb
Note: Both these sentences are right. In both these s­ entences, Simple Present Tense - Sing
the subject of the introductory phrase and the subject of the Simple Past Tense - Sang
Main Verb –
main clause are same.
Basic forms Present Participle - Singing
Wrong:  When only a baby, my mother took me to the Past Participle - Sung
circus.
Right:  When only a child, I was taken to the circus by
my mother. Auxiliary Verbs and their Forms
Primary Auxiliaries Modal Auxiliaries
BE be, is, are, am, was, can, might, may, must,
Sample Exercise–7 were, being, been will, needn’t
HAVE have, has, had, having shall, daren’t, should, ought
Directions for questions 1 to 4:  Fill in the blanks with suit-
able adverbs. DO do, does, did, doing, done would, used to, could

1. The speaker pauses ________ in order to heighten the


Note: The Verb Phrase in any sentence is constituted by
beauty of his speech.
using only the Main Verb form or one of the basic forms
(A) hastily (B) briefly
of the Main Verb and the primary auxiliaries or modal
(C) lustrously (D) incandescently
auxiliaries or both the primary auxiliaries and the modal
2. He always speaks ________ unmindful of the serious- auxiliaries.
ness of situation.
(A) facetiously (B) soberly Examples:
(C) solemnly (D) thoughtfully 1. I teach English.
3. Though they are married, they are living ________. M.V
(A) apart (B) away 2. I am teaching English now.
(C) differently (D) together P.A M.V
4. The politician was careless and ________ made promises. 3. I will have been teaching English.
(A) uncommunicatively (B) inconsiderately M.A P.A P.A M.V
(C) uncommittedly (D) unceremoniously Special Note: Every verb phrase has a particular structure
acceptable according to standard written English.
The verb phrases in the following sentences are wrong.
Correct Use of the Verb
1. I will the work
Structure of the Verb Phrase 2. I will did the work
A verb indicates the action done by the subject or the state 3. I going there
of being of the subject. 4. I can done the work
Examples:
1. He has completed the work  (action). Verbs:  Transitive and Intransitive
2. Radha is an intelligent student  (state). The verbs which do not require or do not have objects in
In every sentence you find a verb phrase (VP). the sentence in which they are used are called intransitive
A verb phrase may have a single word, two words or verbs (i.v.).
a group of words.
In the following sentences complements are used, not
Examples: objects.
1. The Sun rises in the east.
Examples:
1
This book costs ten rupees
2. He has ordered tea for us.
i.v comp.
1 2
3. She has been teaching English since 1965. The play lasted an hour
1 2 3 i.v comp.
4. She will have been typing when I meet her at 10 a.m. The birds fly in the sky
1 2 3 4 i.v adv. ph.
1.28 | Verbal Ability

The verbs which require or have objects are called transitive Present Perfect I have been teaching English.
verbs :
Continuous
Example:
Past
The professor gave them some assignments
v object Simple Past : I taught English.
Past Continuous : I was teaching English
Note: There are a number of verbs which can be used with
or without objects, that is, ‘transitively’ or ‘intransitively.’ Past Perfect : I had taught English.
Here are some examples of verbs used both intransitively Past Perfect : I had been teaching
and transitively. Continuous English

Future
Intransitive use Transitive use
My father is reading. He is reading the newspaper. Simple Future : I will teach English.
The play ended at five. Rain ended the play.
Future Continuous : I will be teaching English.
Future Perfect : I will have taught English.
Voice Future Perfect Continuous : I will have been teaching
English.
There are two voices:
1. Active voice Uses of Tenses—Some Important Rules
2. Passive voice
Simple Present Tense is used to express habitual actions, per-
Notice the change in the following sentences. manent or verifiable truths or facts (scientific or universal).
1. She has done the work. (A.V) 1. He goes to church every Sunday.
The work has been done by her. (P.V) 2. Water boils at 100°c.
2. These engineers can draw good designs. (A.V) 3. Calcutta stands on the banks of the Hoogli.
Good designs can be drawn by these engineers. (P.V) 4. The sun rises in the east.
3. The Principal read the report. (A.V)
The report was read by the Principal. (P.V) The Simple Present tense is used to express a planned future
action, or a series of such planned actions.
Note:
1. Depending on the emphasis we want to lay, we use a 1. We leave Hyderabad at 8:30 p.m. next Tuesday and
particular voice in a particular context. arrive in New Delhi at 11 a.m. on Thursday.
Examples: The Present Continuous tense is used to describe an
Some people dug a well to provide water to the village action that is in progress at the time of speaking.
(A.V) 2. The children are playing in the garden now.
A well was dug to provide water to the village (P.V) The Present Continuous tense is also used to describe
Here we would prefer to use the second rather than an action that is in progress and will be continued, but
the first sentence, because what we want to refer to not necessarily going on at the moment of speaking.
is not the action of the Panchayat but the result of 3. The college authorities are building a new hostel.
the action, namely, a well, being provided in order to The Present Continuous tense can also express an action
supply water to the village. Who dug the well is not that has been arranged to take place in the near future and
the main idea in our minds. one’s immediate plans.
2. Intransitive verbs do not have passive voice. i.e., we
cannot transform a sentence from Active to Passive if 1. I am meeting the CM tomorrow morning.
the verb is intransitive. 2. We are going to a movie this evening.

For example the sentence ‘Birds fly in the sky’ cannot be There are a number of verbs which are not normally used in
transformed into passive voice. the present continuous tense. These are:
A more detailed note on Voice is included in a later 1.
verbs of perception :
chapter. see, hear, smell, notice, etc.
2.
verbs used to express feelings or states of mind:
Verb—Form and Use of the Tenses want, desire, wish, refuse, forgive, care, hate, like,
There are 12 tense-structures in English. admire, love, etc.
Present 3.
verbs involving the process of thinking:
Simple Present : I teach English. feel, know, mean, remember, forget, recall, etc.
Present Continuous : I am teaching English. 4.
verbs denoting possession:
Present Perfect : I have taught English have, own, belong, possess, etc.
Chapter 1  Grammar  |  1.29

5.
verbs such as: Note the difference in meaning between the following two
contain, consist, keep, seem, cost sentences:
When some of the verbs listed above are used in the present Dr. Mohan lived in Delhi for fifteen years. (in the past)
continuous tense, their meanings change. Dr. Mohan has lived in Delhi for fifteen years.
(still Dr. Mohan lives in Delhi)
1. I see several mistakes in this book.
I am seeing the principal at 3 p.m. Simple Past Tense indicates an action completed sometime
(will be meeting) in the past.
2. We hear several rumours about the Minister Example:  I lived in Hyderabad for ten years (in the past)
The judge is hearing the case tomorrow. (conducting
the trial). Past Progressive Tense:
3. I have a house at Malakpet 1. The past progressive (continuous) tense expresses
I am having my breakfast. (act of eating) an action that was in progress at a point of time in
The following sentences are wrong the past, having begun before that point and probably
continuing after it.
1. I am loving that girl. (love )
Examples:
2. They are understanding the lesson. (understand ) (a)  I was reading the newspaper at 7 a.m. this morning.
3. I am slowly understanding you. (wrong) (b)  I was having my breakfast at 9 a.m.
I have begun to understand you. (right)
4. I am having a telephone at my residence. (have ) 2.
The past progressive tense expresses an action
continuing over a period of time in the past.
The Present Perfect Tense is used to indicate an action that Example:  The students in the hostel were listening
has just been completed. to the cricket commentary the whole of yesterday.
Examples: 3. The past continuous tense describes two or more
I have finished my work. (just now) actions going on at the same time; often the
The present perfect tense is also used to represent a past conjunction ‘while’ is used to connect the clauses.
action continuing to the present. Example: While some boys were reading in the
library the others were playing.
Examples:
We have lived in Hyderabad for ten years. (i.e., we are still Past Perfect Tense:  This tense is used when we wish to
living in Hyderabad.) emphasise the sequence of the two actions in the past, and
Do not use present perfect tense (has or have) when time is when the earlier action has some relation to the later action
specified (e.g.: last year, 1994, etc.) in the sentence. or situation.

Examples: Examples:
I have seen this film last year   (incorrect) 1. On reaching the school I found that I had forgotten to
bring my English textbook.
I saw this film last year  (correct) 2. When we reached the theatre, the play had begun
Also note that for and since are commonly used with the already.
present perfect tense. ‘For’ shows length of time and ‘since’ 3. I borrowed some money from a friend of mine, since
shows some point of time in the past as being the starting I had lost my purse.
point of the action or event.
The Future Tense:  There are several ways of expressing
Examples: future time in English.
1. My friend has lived in Hyderabad for twenty years. One of the most common ways to express this is to use shall
(He still lives here) or will with the bare forms of the verb : shall come, will go,
2. These monuments have been here since 1650 A.D. etc. But there are other ways of expressing the future :
(still they are here) Example:  Our cricket team leaves for Bombay this
The following are some time-expressions that go with evening. They play two matches in Bombay. They play one
the simple past and some that go with the present at Poona. They return next Monday.
perfect. In the above sentences the present simple tense is used to
Simple Past Tense Present Perfect Tense express a series of intended or planned actions in future.
yesterday so far 1. The P.M is visiting the city tomorrow.
a week ago since 2. The college team is playing a match with the city
recently lately team next Sunday.
1.30 | Verbal Ability

The Present Continuous tense is used in these sentences The law and order situation in the state is under control.
to express a future event. Usually the time is mentioned His power and influence is on the decline.
(tomorrow, next sunday, etc) and it is in the near future. Note Power and position has no charm for my friend.
that the verbs go and come are not usually used with going
Peace and prosperity is the need of the day.
to. We don’t say, for instance, He is going to go to Bombay
tomorrow; we say, He is going to Bombay tomorrow. Rule 5: If two singular subjects (combined by and) are
Special expressions to indicate future: preceded by each or every, the verb should be in the singular.

1. The train is about to leave. 1. Every boy and girl was present in the class yesterday.
2. The President is about to speak. 2. Every man and every woman has the right to express
his or her view.
This construction be about to + verb expresses events which
are likely to happen in a very short while. Rule 6: When the subjects joined by ‘either - or’ or ‘neither
- nor’ are of different persons, the verb will agree in person
1. I am to be at a meeting at 5 o’clock.
and number with the noun nearest to it. Also, the plural
2. There is to be an enquiry into the railway accident.
subject must be placed nearest to the verb. (This is very
In these sentences the form be + to + the base form of the important)
verb is used to express a duty or necessity or planned course Either Radha or Rajani has done this mischief.
of action, in the future.
Neither Mohini nor Ragini is beautiful.
* Either the chief minister or the cabinet ministers are
Rules Regarding the Use of Verbs responsible for this problem.
Subject–Verb Agreement Neither you nor he is to take up this task.
General rule: The verb must agree with its subject in num- Either you or I am responsible for this mistake.
ber and person. In other words, the verb must be of the same
number and person as the subject. Rule 7: If connectives like with, together with, as well as,
accompanied by, etc. are used to combine two subjects the
Note: In the correction of sentences section of many com- verb agrees with the subject mentioned first.
petitive examinations the S - V concord is usually tested. The President of India together with his personal secre-
Rule 1: When two subjects are joined by ‘and’, the verb is taries is invited to this function.
plural. The actress, along with her manager and some friends, is
My friend and his father are in India. attending the function.
Mr. Michael, accompanied by his wife and children is
Rule 2: When two singular nouns joined by and refer to the arriving tonight by train.
same person or thing, the verb is singular.
The secretary and treasurer has been arrested. Note: If the conjunction and is used instead, the verb would
The District Magistrate and Collector is on leave today. then be plural.
Compare (i) Saritha and Rajitha are our professor’s
Notes: daughters.
1. Article ‘The’ is used only once when the two nouns
refer to the same person or thing. Rule 8: When ‘not only ...... but also’ is used to combine
2. If the two nouns refer to different persons or things, two ­subjects, the verb agrees with the subject close to it.
article ‘The’ is used before each noun. In such cases, Not only Harish, but also his brothers were arrested.
the verb will be in the plural form.
Rule 9: None / No
Example:  The secretary and the president have been given
warm welcome. None can take either a singular or a plural verb depending
on the noun which follows it;
Rule 3: If two different singular nouns express one idea, the
verb should be in the singular form. Structure: none + of the + non-count noun + singular verb
Bread and milk is good for breakfast. None of the counterfeit money has been found.
Rice and curry is my favourite dish.
This is the long and the short of the matter. Structure: none + of the + plural count noun + plural verb

Rule 4: None of the students have finished the exam yet.


When two singular subjects are practically synonymous the No can take either a singular or plural verb depending on
verb should be in the singular form. the noun which follows it.
Chapter 1  Grammar  |  1.31

Structure: No + singular noun + singular verb. Rule 14: When a lot of, a great deal of, plenty of, most of,
and some of refer to number, a plural verb is used.
Example:  No example is relevant to this case.
Structure: No + plural noun + plural verb Examples:
Example:  No examples are relevant to this case. A lot of people were present in the gallery.
Some of the students were absent.
Rule 10: Many words indicating a number of people or
animals are singular. The following nouns are usually Note: If these expressions refer to an amount or an uncount-
singular. In some cases they are plural if the sentence able noun the verb is in the singular number.
indicates that the individual members are acting separately.
Examples:
congress family group
A lot of work has to be completed before we go.
committee class organisation
A great deal of work has been finished.
team army club
crowd government jury Rule 15: When the percentage or a part of something is
minority public mentioned with plural meaning the plural verb is used.
Examples of collective nouns used with a singular verb:
Examples:
The committee has met, and it has accepted the proposal.
30% of Indian women are literate.
The family was happy at the news.
The crowd was wild with excitement. Three-quarters of the food has been eaten.
The Congress has initiated a new plan to combat inflation. (Here the reference is to the food as a whole.)
Our team is certain to win the match.
Some collective nouns are used in plural: Rule 16: ‘Barracks’, ‘headquarters’, ‘whereabouts’ ‘alms’,
etc., take a singular verb, as well as the plural verb.
Examples: The headquarters of the UNO is/are New York.
The committee have arrived by different trains.
The family were fighting over inheritance. Rule 17: In sports, while referring to the players, the name
The family living next door often quarrel among themselves of the country is followed by plural verb.
Rule 11: Majority can be singular or plural. If it is alone England have won the World Cup.
it is usually singular, if it is followed by a plural noun, it is V
usually plural.
Rule 18: When the word ‘enemy’ is used in the sense of
The majority believes that the country can progress. ‘armed forces’ of a nation with which one’s country is at
V. war, we have to use the plural verb:
The majority of the lecturers believe that the student has not The enemy were forced to retreat.
copied in the examination.
V.

Rule 12: A number of / the number of observe the two Sample Exercise–8
structures:
Directions for questions 1 to 4: Fill in the blanks with
1. A number of + plural noun + plural verb. appropriate verbs.
2. The number of + plural noun + singular verb.
1. I am sure that you will soon ________ to this
Examples: environment.
1. A number of students are going to the class picnic. (A) get used (B) be used
2. The number of days in a week is seven. (C) be habituated (D) be linked
3. The number of residents who have been living in this 2. I ________ him from taking unnecessary loans.
colony is quite small. (A) distinguished (B) dissuaded
4. A number of the applicants have already been (C) diverted (D) dissented
interviewed. 3. He ________ his studies.
Rule 13: Collective nouns indicating time, money, and (A) has left (B) is learning
measurements used as a whole are singular and take a (C) deserts (D) has discontinued
singular verb. 4. This big book ________ 30 chapters.
Twenty-five rupees is not such a big amount for him. (A) is comprising of (B) consists
Two miles is too much for this man to run. (C) comprises of (D) comprises
1.32 | Verbal Ability

Non-Finites 2. The infinitives shown above have the word to before


them.
Verbs can be classified as
But look at these sentences:
1. Finites and (a)  The mother made the child drink the medicine.
2. Non-finites. (b)  Then she let the child go out and play.
A Finite Verb is a verb that denotes tense.
‘To’ is very commonly used with the infinite, but it is not a
Example: necessary sign of the infinitive. The following verbs take the
He goes to school. infinitive without ‘to’.
‘goes’ represents the simple present tense.
1. The principal verbs: can, must, let, make, bid, dare,
Similarly ‘went’, ‘gone’ are the other forms of the verb. please, need, etc.
These have been discussed in a later chapter. 2. Verbs denoting some kind of perception: see, hear,
Non-finites are verb forms which do not give complete feel, watch, know, think, etc.
(finite) meaning. They have none of the tenses, have no
number and take no modals (auxiliary verbs). There are four Examples:
types of non-finites : 1. Make her do the work.
2. You need not go there.
1. Infinitive 3. Please go there.
2. Gerund 4. Let him stand there.
3. Present participle
The infinitive without ‘to’ is used after had better, had rather,
4. Past participle had sooner, would rather, sooner than, rather than.
Look at these sentences: Examples:
1. She wants to buy a new house. (Infinitive) 1. You had better meet your uncle.
2. Buying a new house needs money. (Gerund) 2. He would rather fight than give up.
3. I found him looking for a new house. (Present 3. I had rather write than play.
participle) 4. She had sooner run than walk.
4. Wounded in the war the soldier was brought to the
medical camp. (Past participle)

The Infinitives Sample Exercise–9


1. Look at the forms of the infinitive in the following Rewrite the following sentences using to, wherever neces-
sentences: sary, before the verbs given in the brackets.
(a) Rajitha wanted to learn photography. 1. Dr. Rao asked his daughter _____ home before 9 o’
(b) She is reported to be learning it. clock. (come)
(c) She is reported to have learnt painting already. 2. If you have planned _____ the airport before five, you
(d) She is known to have been learning music for the had better _____ at once.  (reach, start)
last five years. 3. He wouldn’t let anyone _____ his bicycle. (use)
  In these sentences you see four forms of the infini- 4. We wanted _____ the house where Mahatma Gandhi
tive. The following are the structures of these four was born.  (see)
infinitives.
5. He would rather _____ than _____ a lie.  (die, tell)
Sentence (a) to + verb
Sentence (b) to be + verb -ing (present
participle) The Gerund
Sentence (c) to have + past participle The gerund and the present participle have the same form,
Sentence (d) to have + past participle of be verb + ing : swimming, walking, cutting, etc. (the gerund is
+ verb -ing also called the verbal noun)
Some of these forms have the corresponding Uses of the gerund:
­passive voice.
to learn - to be learnt: 1. As the subject of a verb:
There is a great deal to be learnt in photography. Swimming is a good exercise.
To have asked - to have been asked: Smoking is injurious to health.
He was happy to have been asked to deliver the Speaking is easier than writing.
convocation address. Looking after children needs a lot of patience.
Chapter 1  Grammar  |  1.33

2. As the object of a verb: decide on think about keep on think of


He likes reading detective novels. plan on put off look forward to
Would you mind returning these books to him?
I hate waiting at bus stop.
The Participle
3. As the object of a preposition:
Look at the words underlined in these sentences.
The minister inaugurated the school by lighting a
lamp. 1. The crying child gets milk.
He was fined for being drunk. 2. We found a man running for the bus.
He is thinking of resigning his job. 3. Inaugurating the seminar, the Education Minister
They resumed their journey after resting for an hour. spoke about the prohibition policy.
The words underlined are participles. There are two
4. As the subject complement:
types of participles.
Talking to him is wasting time.
Seeing is believing. 1. The Present Participle
2. The Past Participle
Note:  When a Noun or Pronoun is placed before a Gerund,
it must be in the possessive case. The form of the Present Participle:
Verb + ing Example: cry + ing
Example: The form of the Past Participle:
•• I was pleased at Robert coming here  (Incorrect) V + ed Example: wound + ed
•• I was pleased at Robert’s coming here  (Correct)
•• They insisted upon me writing the essay.  (Incorrect) (OR)
•• They insisted upon my writing the essay.  (Correct) V + en Example: drunk + en
But the possessive case cannot be used with the Gerund Wrong use of participles:
in the following cases. 1. Whenever a participle is used, the Noun or Pronoun
1. When the Noun denotes a lifeless thing. to which it refers, must also be mentioned.
Look at the following sentence:
Examples: While taking a bath, the shampoo bottle fell.
There is no danger of the wall’s falling down.  (Incorrect) What is wrong with this sentence?
The sentence, as it stands means that the ‘shampoo bot-
There is no danger of the wall falling down.  (Correct)
tle’ was taking a bath. In other words there is no noun or
Note: pronoun to which the participle ‘taking’ refers. Hence, the
1. The following verbs can take either an infinitive or a sentence should be re-written, as ‘while I was taking bath,
gerund as an object. the shampoo bottle fell.’
Continue regret try propose Given below are a few more examples.
forget neglect rememberlearn 1. Being a rainy day, I did not go out.  (Incorrect)
It being a rainy a day, I did not go out.  (Correct)
2. The following verbs can be followed by the infinitive 2. Crossing the road, a truck hit her. (Incorrect)
(to + v) as the direct object. While she was crossing the road, a truck hit her.  (Correct)
agree forbid learn offer
care forget plan decide Note:
hope pretend deserve intend 1. Sometimes the spellings of the past participles are not
mean refuse fail different in the case of some verbs.
3. The following verbs can be followed by the gerund Example: come, hit, etc.
(V + ing) as the direct object. 2. Sometimes, the present participle and the past
admit deny postpone appreciate participle can function like adjectives.
enjoy practise avoid finish
stop cannot help keep suggest Examples:
consider 1. The wounded soldier was carried to the medical
camp.
4. The following verb phrases (verb + preposition) can past. part.
be followed by the gerund (v + ing). Remember 2. A rolling stone gathers no moss.
that gerunds, not infinitives, follow prepositions in pre. part.
general.
1.34 | Verbal Ability

Correct Use of Prepositions She was well till a few days ago. (adverbial phrase)
A preposition is a word placed before a noun or a pronoun I shall see it for what it is worth. (adverbial clause)
or a noun equivalent and shows some relationship between
that and some other word in the sentence.
Rules Pertaining to the Use of Prepositions
Rule 1: A preposition is placed at the end of a sentence in
1. Mohan gave a lecture on patriotism. the ­following ways:
prep N
2. The prize is given to her 1. When the relative pronoun is ‘that’:
prep. pr. noun Example: Here is the pen that you are looking for.
3. His objection is to what all you say. 2. If a preposition governs a relative pronoun:
prep. noun eq. (clause) Example: This is the student whom I spoke about.
The words underlined are called Prepositions because 3. When the relative pronoun is understood:
they normally take position before (pre) a noun. The prepo- Example: This is the person you spoke to.
sition is said to ‘govern’ the noun that follows it. The noun 4. If a preposition governs an interrogative pronoun or
is said to be the ‘object’ of the preposition. an interrogative adverb:
Besides single-word prepositions, there are also phrases Example: What are you looking at?
which do the work of prepositions and are called ‘Phrase 5. When the preposition is used with the infinitive
Prepositions.’ placed at the end of the sentence:
Types of Prepositions: Example: Do you have a chair to sit on?
6. When the object governed by the preposition is placed
1.
Single-word Prepositions
first:
in, on, after, at, with, under, above, etc. (These are
Examples: This I insist on.
Simple Prepositions)
He is known all the world over.
2.
Phrase Prepositions (Complex Prepositions)
Rule 2: A preposition can also be used at the beginning of
Some types of Complex Preposition structures with exam- an interrogative sentence.
ples are given below.
Examples:
1. Adverb + Preposition In which city do you live?
along with, apart from, as for, as to, away from, onto, To whom are you referring?
out of, together with, upto, such as, instead of
2. Verb/adjective/conjunction, etc. + Preposition Rule 3: There are many words which can be used as
except for, owing to, due to, but for, because of. prepositions or as adverbs. The most important of these are
3. Preposition + noun + preposition about, above, across, along, before, below, behind, besides, by,
by means of, on account of, in comparison with, in down, in, near, off, over, past, round, through, under, up, etc.
accordance with, in view of, in spite of, Examples:
Note:  On certain occasions it is both necessary and correct Preposition Adverb
to end a sentence with a preposition. English is a flexible
He was here before ten. He has done this before.
language and defies pedantic rules of grammar.
Now, look at the following sentences: He was behind us. She is long way behind.
This is the boy I gave the book to. The shop is just round Come round and see me this
This is the house that I was born in. the corner. afternoon.
In these sentences the preposition is used at the end of a
Rule 4: There are some words with prepositions which
sentence.
require ­gerunds after them.
Object of the Preposition Examples:
refrain from hurting abstain from drinking
The noun or noun-equivalent (pronoun, adverb, gerund,
infinitive, adverbial clause, or any clause that can be used as prevent from working aid at doing
the object of the preposition) before which the preposition persist in disobeying addicted to gambling
is placed is called its object. succeed in doing bent upon doing
disqualified from doing averse to playing
Examples: knack of getting expert in inventing
The glass is on the table. (noun) prohibit from entering desist from talking
I depend on him. (pronoun) tired of writing capable of teaching
Go away from here. (adverb) pretext for delaying desirous of going
He is fond of playing. (gerund) fond of playing insist on going
Chapter 1  Grammar  |  1.35

Rule 5: The verbs, which are placed immediately after Rule 11: BESIDE and BESIDES
prepositions are usually in the gerund form. Beside means ‘by the side of’
Examples: Example:
Manohar insisted on buying a television. My house is beside the Kali temple.
She left the hotel without paying the bill. Besides means in addition to or moreover
Examples:
Rule 6: Some words with prepositions can take the gerund
•• There are four professors in the department besides the
as well as the infinitive.
head of the department.
Examples: •• Besides English we are taught French.
He is afraid of going out alone at night. Rule 12: BETWEEN and AMONG
He is afraid to go out alone at night. Between is used for two persons or things
Distribute these sweets between the two children.
Rule 7: Some intransitive verbs become transitive by
placing prepositions after them. There is a good understanding between him and her.
Among is used for more than two persons or things.
Examples:  laugh at, listen to, depend on / upon, prevail on
The boys were fighting among themselves in the absence of
/ upon etc.
their teacher.
Rule 8:  In and Within Rule 13: BY is used to mean:
1.
In refers to the end of a period of time usually in the 1. according to; from the evidence of
future, e.g. He will return in a month. (at the end of By my watch, it is 10.30.
one month) 2. to denote the doer of an action in the passive voice.
2.
Within means before the end of a period of time The thief was beaten by the policeman.
(at any time before the specified period) Rule 14: Prepositions from, since, for with reference to
He will return within a month. (he may come after time.
two weeks also)
From, Since indicate a point of time.
Rule 9: In and Into 1. I have not seen her since Monday.
1. ‘In’ indicates rest or motion inside anything. I have not seen her from August.
For indicates a length or period of time.
Examples: 2. I have not seen her for six months.
She is in the garden. (rest, inside)
She is walking in the garden (motion inside) Sample Exercise–10
2. ‘Into’ means motion towards the inside of anything. Directions for questions 1 to 5:  Fill in the blanks with
appropriate prepositions.
Examples:
1. The aggrieved party demands that the CBI should
I walked into the garden.
investigate _____ the case.
Thieves broke into my friend’s house yesterday. (A) into (B) in
(C) at (D) no preposition required
Rule 10:
1. On is used: 2. He is persistently prevailing _____ his wife to resign
(i) in speaking of things at rest. her job.
He sat on a big stone. (A) to (B) upon
(ii) before the names of days and dates. (C) at (D) over
On Friday, on the 2nd of August, etc. 3. Though she searched _____ the ring everywhere, it was
(iii)  to denote support for and concern about in vain.
somebody or something. (A) for (B) about
He lives on his maternal uncle’s wealth. (C) out (D) no preposition required
I wrote books on politics. 4. The speaker has not yet entered _____ the assembly
2. Upon is used: hall.
in speaking of things in motion. (A) into (B) in
The tiger sprang upon the goat. (C) to (D) no preposition required
1.36 | Verbal Ability

5. Which pen would you like to write _____? Illative Conjunctions: Such a conjunction shows
4.
(A) for that a statement or fact is proved or inferred from
(B) with another.
(C) in Therefore, hence, so, consequently, for, etc., are
(D) no preposition required illative conjunctions.
Example:
He is honest and amiable, hence he is revered.
Correct Use of Conjunctions
A Conjunction is a word which connects words, phrases, 5. The Subordinate Conjunctions are the conjunctions
clauses or sentences. It also brings about relationship that connect a clause to another on which it depends
between the elements which are thus joined. There are two for its full meaning.
types of conjunctions: The adverbial clauses are usually connected to
the main clauses by means of the subordinate
1. Co-ordinate conjunctions conjunctions:
2. Subordinate conjunctions
The Chief Subordinating Conjunctions are after, because,
A Co-ordinate Conjunction joins two clauses or sentences if, another, though, till, etc.
of equal rank. Also, it joins two words of equal grammati-
cal rank. The following are some sentences in which important sub-
And, but, for, nor, or, but, otherwise, else, also, either - ordinate conjunctions are used.
or, neither - nor etc., are the chief co-ordinate conjunctions. 1. The patient had died before the doctor arrived.
Examples: 2. We eat so that we may live.
He went to the hospital and met the doctor. 3. He behaved in such a manner that all disliked him.
Dr. Rao and Dr. Reddy are best friends. The following compound expressions also can be used as
The Co-ordinate Conjunctions are of four kinds: conjunctions.
Cumulative Conjunction: A conjunction which
1. Examples:  In order that, on condition that, even if, so that,
adds one statement or fact to another is a cumulative provided that, as though, as well as, as if, etc.
conjunction.
Note: There are some words which are used both as con-
Example: junctions and as prepositions.
The professor as well as the lecturer has accepted to
conduct the examination next week. Conjunctions Prepositions
The following are the cumulative conjunctions: We went home after he We went home after sunset.
Not only ----- but also, came to the office
Both ----- and, I went to bed early, for I I shall do it for him.
as well as was tired.
too, also, moreover etc.

Alternative Conjunctions: A conjunction of this


2. The following conjunctions are used in pairs and hence are
kind expresses a choice between two alternatives. called correlative conjunctions.
Either ---- or, neither --- nor, otherwise, else, etc., are Either …….. or
alternative conjunctions. Neither ……… nor
Both ……… and
Examples:
Whether …….. or
She is good neither at games nor at studies.
Not only …….. but also.
Work hard, otherwise you will fail.
Note: When conjunctions are used as correlatives, each of
Adversative Conjunctions: An adversative con-
3. the correlated words should be placed immediately before
junction expresses a contrast between two facts or the words to be connected.
­statements. For example
Only, however, but, still, yet, whereas, nevertheless,
etc., are adversative conjunctions. •• He not only visited Bombay but also Pune.  (wrong)
•• He visited not only Bombay but also Pune.  (correct)
Examples:
She was angry, but she kept quiet. •• He is neither good at Mathematics nor at Science.
She hates me, yet I love her. (incorrect)
•• He is good at neither Mathematics nor Sceince. (correct)
Chapter 1  Grammar  |  1.37

Sample Exercise–11 2. Bear down: to overthrow; to overcome.


When people could not endure the atrocities of the
Directions for questions 1 to 10:  Fill in the blanks with
government in power, they bore it down.
appropriate conjunctions.
3. Bear with: to tolerate.
1. I don’t know how to rate him; he is neither innocent I cannot bear with his peevish nature any further.
________ intelligent. 4. Break out: to escape from a place or a situation.
(A) And (B) Nor I think Archana needs to break out of her daily routine
(C) Or (D) But and do something exciting.
5. Break in / into: to enter a building by force.
2. I am ready to help him, ________ he may not accept it.
Burglars broke into my neighbour’s house while they
(A) Therefore (B) However
were not at home.
(C) Even (D) Despite
6. Call for: to demand.
3. In functions, better be first as far as food is concerned The Reading Comprehension section calls for good
________ you might starve. reading skills from the students.
(A) Lest (B) Otherwise 7. Call up: to recall.
(C) So that (D) Hence The beautiful scenery around called up memories of
4. He says that he is speaking the truth but I don’t think my childhood.
________. 8. Come by: to obtain.
(A) Still (B) Although How did you come by that beautifully embroidered
(C) So (D) No conjunction skirt?
5. ________his ill health, he has successfully completed 9. Come upon: to find by accident.
the given task. I came upon some very interesting facts about our
(A) Despite (B) Besides planet in this Encyclopaedia.
(C) Because of (D) Owing to 10. Go about: to start working on something, to tackle
6. Beyond doubt he is rich, ________ he could afford to Can you just explain to me how to go about solving
study abroad. this problem?
(A) As well as (B) Though 11. Go by: to be guided by.
(C) Still (D) Hence This is a good example to go by while solving the
7. ________ it was very hot, we could not walk further. problems.
(A) Because (B) As such 12. Hang back: to hesitate to proceed.
(C) Although (D) Though Don’t hang back, you can do it as well as anyone else
8. Many people waste power and water ________ many can do.
others are completely deprived of it. 13. Hang on: to depend on.
(A) When (B) Because Your success hangs on how much effort you are going
(C) While (D) For to put in.
14. Fall back: to recede, or to retreat.
9. The weather is very hot, ________ it is middle of May.
Having seen the armed guards, the civilians fell back.
(A) While (B) Since
(C) Supposing (D) Hence 15. Fall off: to withdraw; to drop off.
A true friend does not fall off in adversity.
10. He is very poor ________ he managed to get a good
16. Live for: to devote one’s life to.
education.
All through his life he lived for the amelioration of
(A) Where (B) Nevertheless
the poor and the destitute.
(C) Despite (D) Inspite
17. Live on: to depend on.
Most people of this region live on rice and fish.
18. Lay about: to attack some one violently.
Notes on Phrasal Verbs A group of ruffians laid about him with sticks while
Phrasal verbs: Certain verbs when followed by certain prep- he was returning home.
ositions or Adverbs, acquire a new significance. 19. Lay out: to plan how something should look and
They are said to be phrasal verbs. arrange it in this way.
Given below are a few phrasal verbs with meanings and The ancient Chinese laid out beautiful gardens with
usage. Study them carefully. lawns, and flower beds.
20. Make away with: to squander.
1. Back up: to support; to sustain. After his father’s demise, he made away with the
You need to back up your statement with correct data. entire property.
1.38 | Verbal Ability

Parallelism Examples:
1. Items in a series must be parallel : that is, they must You are going to the cinema this evening, isn’t it? (Incorrect)
have the same grammatical form. You are going to the cinema this evening, aren’t you?
(a) NOUNS He likes music, art, and history. (Correct)
N N N
The following rules pertaining to the use of question tags
(b) GERUNDS He likes swimming, dancing, should be borne in mind to avoid making errors:
and riding.
V+ING V+ING V+ING 1. Use the same auxiliary verb as in the main clause.
2. If the sentence has no auxiliary verb use do, did or
(c) ADJECTIVES He is tall, dark, and handsome.
does
ADJ ADJ ADJ
Examples:
(d) ADJECTIVES They wanted to paint the living John sings very well, doesn’t he?
INFIN. John does not sing very well, does he?
room, to lay a new carpet, and to buy a new sofa. 3. If the given sentence is positive, the tag is negative.
INFIN. INFIN. If the given sentence is negative, the tag is positive.
(e) PAST TENSE The Romans conquered, Examples:
colonized, and governed much of the world. Positive Statement Negative Tag
PAST PAST PAST Rajini is a music teacher, isn’t she?
(f) PAST PERFECT TENSE Negative Statement Positive Tag
He had finished the game, had taken a shower, and had eaten Rajini is not a music teacher, is she?
lunch by the time I went to his house. 4. Don’t change the tense.
Note: The auxiliary ‘had’ may be omitted in the second and The tense of the verb in the tag should be the same as
the third verb phrases. the one in the statement.
Examples:
2. The structure joined by and, but, as, or then, or Mahesh did not accept the job, did he ? (correct)
although must have the same grammatical form.
Mahesh did not accept the job, doesn’t he? (incorrect).
(a) AND
He enjoyed the music of Spain and the sculpture 5. Both the main sentence and the tag should have the
of France. same subject. The tag must contain the subject form
N PHRASE N PHRASE of the pronoun.
Example:  You are teaching them grammar, aren’t you?
(b) BUT
That verb form is not active, but passive 6. If the main sentence consists of the forms like it is,
ADJ ADJ there are and there is; the question tag also takes there
or it.
(c) AS
Example:  There are only twenty boys in this class,
Taking the bus can be as costly as taking a plane.
aren’t there?
V+ING V+ING
(d) OR Observe the following: (All of the following are correct)
He wanted to borrow a car or to hire one while his 1. Dr. Rao is a professor of English, isn’t he?
car was being repaired. 2. My cousin cannot run fast, can he?
INFIN. INFIN. 3. She mustn’t see the film, must she?
(e) THAN 4. We used to live in Nigeria, didn’t we?
Eating in a restaurant is more fun than cooking at 5. You couldn’t swim a mile, could you?
home.
6. Mr. Brown will be our new principal, won’t he?
V+ING V+ING
7. I am not a good player, am I?
(f) ALTHOUGH
 Although he liked to eat good food, he did not 8. I am a good player, aren’t I?
like to pay a high price for it.
INFIN. INFIN. INFIN. Active & Passive Voice
In English, the active voice is more common than the pas-
Question Tags sive voice, although the passive voice is acceptable and even
Question Tags are a feature of most languages, but English preferred at times. It is the context that is to be taken into
differs from many of them. Consequently the following consideration while deciding upon the type of construction -
error is sometimes found. active or passive. While both types of construction may be
Chapter 1  Grammar  |  1.39

grammatically correct, one of them could be more elegant. 3. The passive voice is preferred when the doer of the
The following are some of the points of observation. action is unknown or unimportant.
1. When the subject of the sentence is the doer of the The cure for cancer will probably be discovered by
action, denoted by the verb, then the sentence is said some unknown scientist in a laboratory.
to be in Active Voice.* (‘the cure for cancer’ is the main idea in the sentence
* Example: The hunter shot the tiger. and not ‘the unknown scientist’)
s v o That church was built in the 16th century.
2. When the subject of the sentence is the receiver of the (who built the church is unimportant and hence not
action denoted by the verb, then it is said to be in the mentioned)
passive voice.
The tiger was shot by the hunter. 4. When discussing history, the passive voice is often
used.
s v o
Note: The subject of the verb in the Active Voice is Example:
made the Object of the verb in the Passive Voice and is The war was fought over gold.
introduced with the preposition ‘by’. Sometimes the
word ‘by’ is omitted when the agent is not required to 5. The active voice is used when the subject is more
be mentioned. important than the object.
Example:  He was elected the leader of the group. We watched the news.
Archimedes discovered the laws of floating bodies.
This can be shown graphically:
6. Avoid using active and passive in the same sentence.
Verb
Subject object The food was cooked and served.
(Active form)
passive passive
Active
He Helps Her Susan cooked the dinner and washed the dishes.
voice:
active active
By him
Passive Is helped 7. Use one verb instead of two whenever possible.
She By +
voice: (passive form)
object Saritha enjoys good food and music.

[In agreement with (Saritha enjoys good food and music is also enjoyed
the number and by her.)
person of the subject]

The following table will help you to note the changes from the Active Voice to the Passive Voice:
Tense Active Passive
 1. Simple Present Tense He writes a letter A letter is written by him
 2. Present continuous He is writing a letter A letter is being written by him.
 3. Present perfect tense He has written a letter A letter has been written by him.
 4. Present prefect continuous tense He has been writing a letter No passive form.

 5. Simple Past Tense He wrote a letter A letter was written by him.
 6. Past continuous tense He was writing a letter A letter was being written by him.
 7. Past perfect tense He had written a letter. A letter had been written by him.
 8. Past perfect continuous tense He had been writing a letter. No passive form.

 9. Simple future He will write a letter. A letter will be written by him.
10. Future continuous tense He will be writing a letter. No passive form.

11. Future Perfect tense He will have written a letter. A letter will have been written by him.
12. Future Perfect Continuous tense He will have been writing a letter. No passive form.
1.40 | Verbal Ability

Note: Sentences with intransitive verbs cannot be changed (a)  Simple Present becomes Simple Past
to passive voice because such verbs do not take objects after Examples:
them. Raju said, ‘I am happy.’
Raju said that he was happy.
Example:
(b) Present Continuous becomes Past Continuous
The sky is blue. Examples:
He goes to school. (intransitive verb) Madhav said, ‘My father is sleeping.’ Madhav
said that his father was sleeping.
Additional Examples (c)  Present Perfect becomes Past Perfect.
In the following examples we cannot say that the first sen- Examples:
tence is absolutely wrong. In certain contexts it may even Umesh said, ‘I have failed in my duty.’ Umesh
be preferred. However, generally speaking, the corrected said that he had failed in his duty.
sentence (the second sentence) is preferrable. We are call- (d) ‘Shall’ of the Future Tense changes to ‘should’,
ing the first sentence AWKWARD and the second sentence ‘will’ changes to ‘would’ or ‘should’.
BETTER. Example:
1. AWKWARD: Ice cream was eaten at the party by He said to me, ‘I will meet you tomorrow.’
the children. He told me that he would meet me the next day.
BETTER: The children ate ice cream at the party.
2. AWKWARD: 
Some people painted pictures of Exceptions
animals on ancient cave walls.
1. If the Reporting Verb is in the Present or in the Future
BETTER: Pictures of animals were painted on
Tense, the tense of the verb in the Reported Speech
ancient cave walls.
does not change.
3. AWKWARD: Henry likes swimming and golfing Examples:
is also liked by him He says, ‘I will never come back.’
BETTER: Henry likes swimming and golfing. He says that he will never come back.
My father will say, ‘I cannot buy you a car.’
Direct and Indirect Speech My father will say that he cannot buy me a car.
2. If the reported speech expresses a universal truth or a
Speech can be reported in two ways habitual fact its tense remains unchanged.
1. The actual words of the speaker can be repeated. This Examples:
is called DIRECT SPEECH The teacher said, ‘Honesty is the best policy.’
Example:  Meena said, ‘I don’t want to play now.’ The teacher said that honesty is the best policy.
2. We can report what the speaker said without quoting Mother said, ‘Mahesh drinks milk before going to
his exact words. This is called INDIRECT SPEECH. bed every night.’
Example:  Meena said that she didn’t want to play Mother said that Mahesh drinks milk before going to
then. bed every night.
The verb that introduces the Reported Speech is called the 3. When the reported speech contains a time clause, and
Reporting Verb and the words which are put within inverted both the main verb and the verb in the time clause are
commas are called the Reported Speech. in the simple past, the verbs remain unchanged.
Direct Speech is always enclosed within inverted commas Examples:
and it always begins with a capital letter. He said, ‘The bus did not move till all the passengers
were seated.’
It is separated from the Reporting Verb (said) by a comma. He said that the bus did not move till all the passengers
Rules for changing Direct Speech into Indirect Speech. were seated.
1. No inverted commas are used in Indirect Speech and Note: If the main verb is in the Simple Past Tense and
no comma is used after the Reporting Verb. the verb in the time clause is in the Past Continuous
Tense it is usual to change the main verb to Past Perfect
2. The tense of the Reporting Verb is never changed.
and leave the verb in the time clause unchanged.
3. The conjunction ‘that’ is used after the reporting verb
in the case of statements. Examples:
4. When the Reporting Verb is in the Past Tense, the She said, ‘Dhiren fell while he was crossing the road.’
Present Tenses of the Direct Speech are changed into She said that Dhiren had fallen while he was crossing
the corresponding Past Tenses. the road.
Chapter 1  Grammar  |  1.41

4. If the Reported Speech describes a state of affairs ago before


that still exists when the speech is reported, its tense thus so
remains unchanged.
today that day
Examples:
tomorrow the next day
Ram said, ‘My wife keeps complaining of aches and
pains.’ yesterday the day before the previous day
Ram said that his wife keeps complaining of aches last night the night before/the previous night
and pains. next week the following week
5. When the verb in the spoken sentence is in the Past
Perfect Tense, there is no change in the tense of the Examples:
verb in the Reported Speech. He said, ‘These are the books I am looking for.’
He said that those were the books he was looking for.
Examples:
He said, ‘I had waited there for half an hour before the Reporting different kinds of sentences
9.
bus arrived.’ (a) Statements
He said that he had waited there for half an hour In Indirect statements the conjunction ‘that’ is
before the bus arrived. placed after the reporting verb. However, it is
often omitted. Indirect statements are introduced
6. (a) The Simple Past in Direct Speech becomes Past by such verbs as ‘say’, ‘tell’, ‘reply’ and ‘inform’
Perfect in Indirect.
Examples:
Examples:
He said, ‘I am feeling very weak.’
The student said,‘ I wrote a letter yesterday.’
He said that he was feeling very weak.
The student said that he had written a letter the
She said to me, ‘You must obey your parents.’
previous day.
She told me that I must obey my parents.
(b)  Past Continuous Tense of Direct Speech is
Sheela said, ‘No, I will not be able to come.’
changed to Past Perfect Continuous.
Sheela replied that she would not be able to come.
Examples: Madhav said, ‘The last train leaves at 10 o’clock.’
Seema said, ‘We were watching TV the whole evening.’ Madhav informed me that the last train leaves at
Seema said that they had been watching TV all evening. 10 o’ clock.
7. The pronouns of the Direct speech are changed where (b) Questions
necessary so that it is clear who said what to whom,  In reporting questions, the Indirect Speech is
about whom. introduced by verbs such as ‘asked’, ‘inquired’,
etc.
Examples:
In Indirect questions, the question form changes
He said, ‘I don’t understand you.’
to the statement form. That is, the verb is placed
He said he didn’t understand me.
after the subject
I said to him, ‘I don’t trust you.’ Examples:
I told him that I didn’t trust him He said, ‘Where is the letter?’
Note: ‘Said’ followed by ‘to’ changes to ‘told’. He asked where the letter was.
They said, ‘We will come again tomorrow.’ They said If the question in Direct Speech begins with a
that they would come again the next day. question word (eg: who, what, which, when) this
I said, ‘I have done my duty.’ word serves as a link between the reporting verb
I said that I had done my duty. and the reported question.
The teacher said, ‘You have done well.’ ‘Why did she come?’ Sekhar said.
The teacher said that I had done well
Sekhar asked why she had come.
He said, ‘You should be regular to class.’
He said that I should be regular to class. If the question has no question word and can be
answered with a ‘yes’ or ‘no’, the conjunction
8. Words expressing nearness in terms of time and place ‘whether’ or ‘if’ is placed after the reported verb.
become words of distance.
Examples:
Direct Indirect ‘Do you know French?’ she said.
this/these that/those She asked me if I knew French.
here there (c) Commands and Requests
In reporting commands and requests the Indirect
now then
speech is introduced by a verb expressing
1.42 | Verbal Ability

command or request and the Imperative mood is Examples:


changed into the infinitive. ‘What a beautiful house you have!’ my friend said.
In indirect commands and requests, a verb such My friend exclaimed that I had a very beautiful
as ‘tell’, ‘ask’, ‘order‘ ‘command’ and ‘request’, house.
is followed by the person addressed and the ‘to Alice said, ‘How clever you are!.’
infinitive’ Alice exclaimed that I was very clever.
‘Bravo! You have done well,’ the Principal said.
Examples: The Principal applauded the boy for doing well.
He said to his servant, ‘Bring me a glass of milk.’
Here are some more reporting verbs for statements.
He ordered his servant to bring him a glass of milk.
declare inform maintain
‘Can you post this letter for me?’ she said.
state propose announce
She requested me to post that letter for her.
When the spoken sentence is by way of a reply to a question
(d) Exclamations we can use ‘answer’, ‘reply’, ‘respond’ etc.
In reporting exclamations and wishes, the Indirect
Some more verbs for reporting imperative sentences:
Speech is introduced by a verb which expresses
an exclamation or a wish such as exclaimed, order advise
praised, blamed, applauded, called to witness, command pray
wished, desired, etc. tell suggest

Diction (Words with Similar Pronunciation)


Diction is the choice of words. In English there are many words which are usually confused. Some words have similar
meanings, but cannot be used interchangeably; that is, a choice must be made according to the grammatical situation. The
following are some pairs of words which are often confused in their usage.
1. Advice :  (Noun) The teacher gave much advice to the students.
Advise :  (Verb) The doctor advised me to take nutritious food.
2. Adapt :  (make suitable) Novels are adapted for the stage.
Adopt :  (take a child as one’s own) He adopted a son.
3. Allusion :  (reference) The allusion that I am stingy is a mistake.
Illusion :  (false notion) I do not have illusions about his ability.
4. Amiable :  (pleasant and good-tempered) Radha is quite an amiable person.
Amicable :  (friendly) The dispute is quite serious and therefore cannot be settled
amicably.
5. Apposite :  (Relevant) His speech was apposite to the occasion.
Opposite : (contrary) Heavy is the opposite of light.
6. Beside :  (by the side of, close) His mother sat beside him.
Besides :  (in addition to) Is anyone else coming besides you?
7. Childish :  (silly) I don’t like his childish behaviour.
Childlike :  (innocent) Gandhiji always put on a childlike smile on his lips.
8. Confidant :  (person with whom one Nehruji was a confidant of Gandhiji in political matters.
  trusts with secrets)
Confident :  (to be sure) I am confident of success in the examination.
9. Continual :  (very frequent) He had continual arguments with his wife.
Continuous :  (going on without a break) There was continuous rain yesterday.
10. Deny :  (ascertain that something The minister denied the allegation that he had taken bribe.
  is wrong)
Refuse :  (decline to take something He refused the money given as bribe.
  that is offered or to do
  something that one is
  asked to do)
Chapter 1  Grammar  |  1.43

Exercise
Practice Problems 10. ______ Rome is one of the ancient cities of the world.
(A) An
Grammar—Nouns/Articles/Pronouns (Basic)
(B) No article
Directions for questions 1 to 5: Fill in the blanks with (C) A
the correct pair of words or phrases so that the sentence is (D) The
grammatically correct and meaningful.
1. ______ man loves ______ money. Grammar—Nouns/Articles/Pronouns
(A) The . . . . the (Advanced)
(B) A . . . .the Directions for questions 11 to 14:  Correct the following
(C) The . . . .no article sentences where necessary.
(D) No article required . . . . no article required
11. The doctor has given me many informations about the
2. ______ student of the class ______ to finish the work disease.
by tomorrow.
12. The magistrate has issued a summon asking me to
(A) All . . . .has
attend his court on Monday.
(B) Each . . . .have
(C) Every . . . .were 13. Our office has purchased new furnitures for our
(D) Each . . . .has department.
3. ______ platinum is ______ any other metal. 14. Four thiefs broke into my cousin’s house yesterday.
(A) The . . . .costlier than Directions for questions 15 to 20:  Rewrite the following
(B) No article required . . . . costlier than sentences after making the necessary corrections.
(C) The . . . .more costlier than
15. Good students like you and he should study regularly.
(D) No article required . . . . more costlier than
16. You, he and I are in the wrong.
4. The ______ of my professors inspired me to ______
hard and win the competition. 17. Only you and him can do this work fast.
(A) Advise . . . .practise 18. She helped everyone of those boys in doing their work.
(B) Advice . . . .practise 19. Every teacher and every student should do their duty.
(C) Advise . . . .practice
20. Neither of the boys have submitted their records.
(D) Advice. . . . practice
5. In India, ______ power to commute a death sentence is Grammar—Verbs/Tenses/Auxiliary (Basic)
vested ______ the president.
Directions for questions 21 to 25:  Fill in the blanks with
(A) The. . . . for
suitable verbs.
(B) No article required . . . . by
(C) No article required . . . .on 21. We ______ with the photograph trying to hang it, till it
(D) The. . . . in fell to the floor and the frame broke.
(A) Wrested (B) Wrestled
Directions for questions 6 to 10:  Fill in the blanks with (C) Strived (D) Wrecked
suitable articles. 22. The young boy was lying in the middle of the road, and
6. ______ British ruled India for four hundred years. ______ in pain but nobody picked him up.
(A) No article (B) A (A) Shaking (B) Squirming
(C) An (D) The (C) Twisting (D) Writhing
7. The teacher ordered the students not to make ______ 23. I took some flowers and chocolates with me for I was
noise. anxious to ______ for my thoughtlessness.
(A) A (B) An (A) Atone (B) Compensate
(C) No article (D) The (C) Propitiate (D) Redeem
8. Women in many Middle Eastern countries are deprived 24. The ship was scheduled to ______ a couple of days
of ______ freedom even to this day. later when it hit an iceberg and sank.
(A) A (B) An (A) Port (B) Dock
(C) The (D) No article (C) Wharf (D) Moor
9. Besides being a scholar, he is also ______ eminent 25. He ______ on his old feet but there was nobody to
orator. extend a helping hand.
(A) The (B) No article (A) Tottered (B) Drooled
(C) An (D) A (C) Doddered (D) Lurched
1.44 | Verbal Ability

Directions for questions 26 to 30:  Fill in the blanks with 39. Sanjay as well as his brothers have gone home.
appropriate verbs. 40. The notorious dacoit with his followers have escaped.
26. Sixty miles ______ a very long distance to drive.
(A) Are (B) Were Grammar—Adjectives/Adverbs (Basic)
(C) Is (D) Has been
Directions for questions 41 to 45:  Fill in the blanks with
27. We hope that they ______ good health. suitable adjectives.
(A) Kept (B) Are enjoying 41. In the face of public censure, the government was
(C) Keep (D) Indulge in ­compelled to take a more ______ stand.
28. The Prime Minister ______ to the U.S. next week. (A) Staid (B) Acquiescent
(A) Is flown (B) Fly (C) Beneficial (D) Belligerent
(C) Flied (D) Will fly 42. The ultra modern building looked ______ in such a
quaint old village.
29. Did you ______ him any letter last week?
(A) Competent (B) Devious
(A) Write for (B) Write to
(C) Incongruous (D) Decorous
(C) Write (D) Wrote
43. He was already well _____ when we reached the party
30. If I ______ you, I would have served them to the best of a little late.
my ability. (A) Advanced (B) Sloshed
(A) Were (B) Was (C) Incapacitated (D) Slurred
(C) Am (D) Will be like
44. I keep away from _____ people who always preach
about morals, values and principles to everyone.
Grammar—Verbs/Tenses/Auxiliary (Advanced) (A) Spiritual (B) Sacrosanct
Directions for questions 31 to 35:  Fill in the blanks in the (C) Sanctimonious (D) Devout
given sentences so as to make sense. Select the correct word 45. The preacher’s _____ remarks were well received by
from the answer choices and mark its number as the answer. the audience.
31. In our country Agriculture must _____ pace with (A) Sententious (B) Sensuous
Industrial development. (C) Sequestrable (D) Sheathed
(A) Take (B) Make Directions for questions 46 to 50:  Fill in the blanks with
(C) Loose (D) Keep suitable adverbs.
32. The people of South Asia _____ behind in economic 46. They struggled ______ all through the wind and rain
development because of tensions and conflicts. and finally reached their destination.
(A) Has been left (B) Had been left (A) Madly (B) Skillfully
(C) Left (D) Will be left (C) Manfully (D) Roughly
33. The motivation to _____ comes from a burning desire 47. After winning the match, he ______ held the trophy
to achieve a purpose. aloft for all to see.
(A) Meet (B) Start (A) Urgently (B) Surreptitiously
(C) Succeed (D) Idolize (C) Vicariously (D) Victoriously
34. He does not _____ the ugly aspects of human nature 48. As many people repose faith in him, he is ________ a
from his picture of life. leader of the masses.
(A) Eliminate (B) Include (A) Irrefutably (B) Arguably
(C) Excuse (D) Extricate (C) Interestingly (D) Officially
49. In spite of the big hoardings and TV commercials, there
35. After the shipwreck, they were _____ on the island for
were ________ any people in the theatre for the first
three days
show of the picture.
(A) Stuck (B) Sleeping
(A) Realistically (B) Hardly
(C) Marooned (D) Guided
(C) Reasonably (D) Discreetly
Direction for questions 36 to 40: Correct the mistakes 50. He was appointed the spokesman of the party ________
relating to the use of verbs in the sentences given below. to focus on the ideology of the party.
36. The ‘Arabian Nights’ are an interesting book. (A) Pre-eminently
(B) Conspicuously
37. The cost of all essential commodities have gone up.
(C) Outstandingly
38. Bread and milk are my only food for today. (D) Uniquely
Chapter 1  Grammar  |  1.45

Grammar—Adjectives/Adverbs (Advanced) 68. You will be allowed to enter by the gate ______ you
Directions for questions 51 to 57: Correct the mistakes bribe the gateman.
relating to the use of adjectives in the following sentences (A) Provided
where necessary. (B) Nevertheless
(C) While
51.  I am more wiser than that student.
(D) Whereas
52.  The climate of Hyderabad is better than Madras.
69. I started early ______ I might reach in time.
53.  Many a student is attending the meeting today. (A) So that (B) Lest
54.  My friend is senior than me by 4 years. (C) For (D) Since
55.  Death is preferable than disgrace. 70. He went to bed early ______ to wake up early in the
56.  Kolkata is a worth-seeing city. morning.
(A) Such that (B) As though
57.  Shakuntala is better than any drama in Sanskrit.
(C) Such as (D) So as
Directions for questions 58 to 60: Correct the mistakes
relating to the use of adverbs in the following sentences Grammar—Conjunctions/Prepositions
where necessary. (Advanced)
58. His house is further from the station than yours. Correct Directions for questions 71 to 75:  Correct the errors relat-
the following sentences. ing to the use of conjunctions in each of the following
59.  She was so quiet that hardly he noticed her. sentences.
60. No sooner did I go to the railway station when the train 71. It had been raining as he left the house.
left. 72. Your action was either just or fair.
73. I shall not come unless I am not invited.
Grammar—Conjunctions/Prepositions (Basic)