Professional Documents
Culture Documents
PDF Gate 2020 Computer Science and Information Technology 8Th Edition Trishna Knowledge Systems Ebook Full Chapter
PDF Gate 2020 Computer Science and Information Technology 8Th Edition Trishna Knowledge Systems Ebook Full Chapter
PDF Gate 2020 Computer Science and Information Technology 8Th Edition Trishna Knowledge Systems Ebook Full Chapter
https://textbookfull.com/product/systems-analysis-and-synthesis-
bridging-computer-science-and-information-technology-1st-edition-
barry-dwyer/
https://textbookfull.com/product/chemistry-class-9-3rd-edition-
trishna-knowledge-systems/
https://textbookfull.com/product/chemistry-class-10-6th-edition-
trishna-knowledge-systems/
https://textbookfull.com/product/physics-class-9-2nd-edition-
trishna-knowledge-systems/
Pearson IIT Foundation Series Chemistry Class 7 5th
Edition Trishna Knowledge Systems
https://textbookfull.com/product/pearson-iit-foundation-series-
chemistry-class-7-5th-edition-trishna-knowledge-systems/
https://textbookfull.com/product/pearson-iit-foundation-series-
chemistry-class-7-6th-edition-trishna-knowledge-systems/
https://textbookfull.com/product/pearson-iit-foundation-series-
chemistry-class-8-7th-edition-trishna-knowledge-systems/
https://textbookfull.com/product/pearson-iit-foundation-series-
chemistry-class-9-6th-edition-trishna-knowledge-systems/
https://textbookfull.com/product/pearson-iit-foundation-series-
chemistry-class-9-7th-edition-trishna-knowledge-systems/
C ra c k th e
COMPUTER SCIENCE
tr
Also Helpful for GAIL, BARC, HPCL, BHEL, ONGC, SAIL, DRDO & Other PSU’s
C rac k t he
AND INFORMATION
ish
TECHNOLOGY
na
G R AD UAT E A PT I T UD E T E S T I N E NG I N EE R I N G
SERIES
SERIES 2020
’s
This book has been prepared by a group of faculty who are highly experienced in training GATE
SERIES
candidates and are also subject matter experts. As a result, this book will serve as a one-stop solution for
any GATE aspirant looking to crack the examination.
Coverage is as per the syllabus prescribed for GATE and topics are handled comprehensively; beginning
COMPUTER SCIENCE
TECHNOLOGY
AND INFORMATION
from the basics and progressing step – by – step, supported by an ample number of solved and unsolved
problems. Extra care has been taken to present the content in a modular and systematic manner to facilitate
easy understanding of all topics.
The book is very useful for students preparing for GATE as it contains all the material required for GATE exam as
per latest syllabus. Content is modular, ample solved and unsolved problems are given, previous years’ GATE
questions are given topic-wise.
Dr. Manoj Kumar, Associate Professor, Computer Engineering Department, DTU COMPUTER SCIENCE
This book focuses on requirements of students preparing for GATE and would be useful for faculties also. The book
covers all the topics in detail along with adequate problems as per latest examination pattern.
AND INFORMATION
Gurpreet Kour, Assistant Professor, LPU
TECHNOLOGY
crack the gate series
2020
2020
Cover Image: Blackboard.shutterstock.com
C rac k th e
HIGHLIGHTS
Maximum Coverage/Explanations/Illustrations as per Latest Syllabus
770+ Solved Problems and 2550+ Practice Questions
Elaborated Question Bank Covering Previous 12 Years' GATE Question Papers
trishna’s
Unit -wise Time -bound Tests
2019 GATE Online Papers with Topic -wise Analysis
Solution Manual available in online resources
Online resources available at MRP Inclusive
www.pearsoned.co.in/GATE-CSIT of all Taxes `799.00
in.pearson.com CD CONTAINS
AVAILABLE
SOLUTIONS
AS e-book
FOR EXERCISES
AVAILABLE
Includes Max. Free Online Mock TestsAS
-5e-book
Papers
Log on to: https://goo.gl/4mXjwZ
Size: 203x254mm Spine: 26mm ISBN: 9789353433949 Title Sub Title Edition Authors / Editors Name With CD Red Band Territory line URL Price mQuest
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 reachus@pearson.com. We look forward to it.
This page is intentionally left blank
GATE
(Graduate Aptitude Test in Engineering)
Computer Science
and
Information Technology
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-534-3394-9
eISBN:
Head Office: A-8(A), 7th Floor, Knowledge Boulevard, Sector 62, Noida 201 309, Uttar Pradesh, India.
Registered Office: The HIVE, 3rd Floor, Metro Zone, No.44, Pillayar Koil Street, Jawaharlal Nehru Road, Anna Nagar,
Chennai 600 040, Tamil Nadu, India.
Phone: 044-66540100
Website: in.pearson.com, Email: companysecretary.india@pearson.com
Contents
Preface viii
Key Pedagogical Features ix
Syllabus: Computer Science and Information Technology xi
Chapter-wise Analysis of GATE Previous Years’ Papers xii
General Information about Gate xiii
Solved Papers 2019 xv
PART B Algorithms
Chapter 1 Asymptotic Analysis 3.81
Salient Features
1. Elaborate question bank covering previous 16 years’ GATE question papers
2. 5 free online mock tests for practice
3. Detailed coverage of key topics
4. Complete set of solved 2019 GATE online papers with chapter-wise analysis
5. Exhaustive pedagogy:
(a) More than 770+ Solved Examples
(b) More than 2550+ 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..!!!
Hints/solutions Hints/Solutions
This section gives complete
Practice Problems 1 Then Z = A + B
Hence, the correct option is (B).
solutions of all the unsolved
1.
A
0 A y=1 8. Error → transmits odd number of one’s, for both cases. questions given in the chapter.
A A Hence, the correct option is (A). The Hints/Solutions are
9. ∑(0, 1, 2, 4, 6) P should contain minterms of each func- included in the CD accompa-
X-OR of two equal inputs will give you result as zero. tion of x as well as y
Hence, the correct option is (B).
nying the book.
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 1.80 | Unit 1 • Digital Logic
AB · B = AB + B (AB + B ) · B = A + B 11. ABCD + ABCD + ABCD + ABCD
Practice Tests = ABC + ABC Test
y
Time-bound Test provided at = BC
end of each unit for assessment Digital logic 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
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 2018 2019
Theory of Computation
1 Mark 0 2 2 3 4 1 3 4 1 5 1 3 2 2 2
2 Marks 7 6 5 6 3 3 3 1 2 6 3 3 4 3 3
Total Marks 14 14 12 15 10 7 9 6 5 17 7 9 10 8 8
Digital Logic
1 Mark 4 1 3 4 2 3 3 2 3 3 1 2 2 2 3
2 Marks 5 5 5 1 0 2 3 2 1 5 2 1 2 1 2
Total Marks 14 11 13 6 2 7 9 6 5 13 5 4 6 4 7
Computer Organization and Architecture
1 Mark 4 0 2 0 2 1 3 2 1 2 1 2 3 3 3
2 Marks 9 7 6 12 4 4 2 4 7 2 2 2 4 4 1
Total Marks 22 14 14 24 10 9 7 10 15 6 5 6 11 11 5
Programming and Data Structures
1 Mark 5 0 1 1 1 3 4 2 2 0 5 2 4 3 2
2 Marks 3 6 3 3 3 5 7 6 5 2 3 5 4 3 5
Total Marks 11 12 7 7 7 13 18 14 12 4 11 12 12 9 12
Algorithm
1 Mark 2 8 3 2 3 1 1 4 5 1 4 4 2 1 2
2 Marks 10 7 12 15 6 3 0 2 3 2 4 5 2 5 3
Total Marks 22 22 27 32 15 7 1 8 11 5 12 14 6 11 8
Compiler Design
1 Mark 1 1 1 2 1 2 1 1 2 1 2 1 2 1 2
2 Marks 5 5 5 2 0 1 0 3 2 2 1 1 1 2 2
Total Marks 11 11 11 6 1 4 1 7 6 5 4 3 4 5 6
Operating System
1 Mark 0 1 2 2 2 3 3 1 1 0 2 1 2 2 2
2 Marks 2 8 6 5 5 2 2 3 1 2 2 4 2 3 4
Total Marks 4 17 14 12 12 7 7 7 3 4 6 9 6 8 10
Database
1 Mark 3 1 0 1 0 3 0 3 1 3 1 3 2 2 2
2 Marks 4 4 6 5 5 2 3 3 4 2 2 1 3 2 3
Total Marks 11 9 12 11 5 7 6 9 9 7 5 5 8 6 8
Computer Networks
1 Mark 5 1 2 1 0 2 5 3 4 4 2 2 2 3 1
2 Marks 2 5 6 4 5 3 2 3 2 2 3 4 3 2 4
Total Marks 9 11 14 9 5 8 9 9 8 8 8 10 8 7 9
Software Engineering
1 Mark 1 0 1 0 0 1 1
2 Marks 0 0 0 0 1 0 1
Total Marks 1 0 1 0 2 1 3
Web Technology
1 Mark 1 0 1 0 0 0 1
2 Marks 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).
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.
Q.1–Q.25 carry one mark each. Question Number: 3 Question Type: MCQ
Question Number: 1 Question Type: MCQ For ∑ = {a, b}, let us consider the regular language
L = {x | x = a2 + 3k or x = b10 + 12k, k ≥ 0}. Which one of the
Consider Z = X – Y, where X, Y and Z are all in sign-magni-
following can be a pumping length (the constant guaranteed
tude form. X and Y are each represented in n bits. To avoid
by the pumping lemma) for L?
overflow, the representation of Z would require a minimum
of: (A) 5 (B) 3
(C) 24 (D) 9
(A) n bits (B) n + 2 bits
(C) n + 1 bits (D) n – 1 bits Solution: If L is a regular language, then there is a number
Solution: Z = X - Y P (the pumping length) such that S is any string in L of
X is n-bit sign magnitude number length P or more can be written as S = xyz, satisfying the
Y is n-bit sign magnitude number following conditions.
for each i ≥ 0, xyi z ∊ L,
To avoid overflow, the representation of Z would require a
minimum of n + 1 bits |y| > 0 and |xy| ≤ P
Hence, the correct option is (C). So we need to find the minimum length string s = xyz ∊ L
Question Number: 2 Question Type: MCQ such that xyiz should also be L.
The chip select logic for a certain DRAM chip in a memory L = {a2, a5, a8, a11…….}
system design is shown below. Assume that the memory Here we can take pumping length as 3.
system has 16 address lines denoted by A15 to A0. What is OR
the range of addresses (in hexadecimal) of the memory sys- 10 22 34
tem that can get enabled by the chip select (CS) signal? L = {b , b , b …….}
Here, the pumping length can be 12.
A15
A14 If we take pumping length as 24, in every repetition we will
A13 CS get multiple of 3 and 12.
A12
A11 Hence, the correct option is (C).
(A) CA00 to CAFF (B) C800 to CFFF Question Number: 4 Question Type: MCQ
(C) C800 to C8FF (D) DA00 to DFFF Which one of the following is NOT a valid identity?
Solution: (A) x ⊕ y = x + y, if xy = 0
A15 (B) (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)
A14
A13 CS (C) (x + y) ⊕ z = x ⊕ (y + z)
A12 (D) x ⊕ y = (xy + x′y′)′
A11
Solution: (x + y) ⊕ z = x ⊕ (y + z) is not a valid statement.
A15 A14 A13 A12 A11 - A4 A3 A2 A1 A0
Hence, the correct option is (C).
1 1 0 0 1 - 0 0 0 0 0 C800H
. Question Number: 5 Question Type: MCQ
. Which one of the following kinds of derivation is used by
. LR parsers?
(A) Leftmost in reverse
1 1 0 0 1 1 1 1 1 1 CFFFH (B) Leftmost
Hence, the correct option is (B). (C) Rightmost in reverse
(D) Rightmost
xvi | GATE 2019 Solved Paper CS
Solution: LR parser is a bottom up parser. Bottom up pars- Question Number: 9 Question Type: NAT
er uses reverse of right most derivation. Consider the following C program:
Hence, the correct option is (C).
#include <stdio.h>
Question Number: 6 Question Type: NAT int jumble (int x. int y) {
Consider a sequence of 14 elements; A = [–5 , –10, 6, 3, –1, x = 2 *x + y;
–2, 13, 4, –9, –1, 4, 12, –3, 0]. The subsequence sum s(i, j), return x;
where 0 ≤ i ≤ j < 14. (Divide and conquer approach may be
}
used.)
int main ( ) {
Solution: A[–5, –10, 6, 3, –1, –2, 13, 4, –9, –1, 4, 12, –3, 0] int x = 2, y = 5;
∑
11
Max (S(i, j)) = S(2, 11) = A[k ] = 29 y = jumble (y, x);
k =2
Solution:
16 28
Pivot ele 1– c
24 ele
(28)10 = (1C)16 = (00011100)2
Or + 2810 : 0000 0000 0001 1100
The last element is considered as a pivot – 2810 : 1111 1111 1110 0100
Hence, the correct option is (D).
Question Number: 19 Question Type: NAT
Consider the grammar given below:
Pivot
24 elements S → Aa
Except first and last position all are either average case or A → BD
best case, as list will get divided in to 2 sublists. B → b|∈
2 D → d|∈
Probability = = 0.08.
25 Let a, b, d, and $ be indexed as follows:
Hence, the correct answer is (0.08).
Question Number: 16 Question Type: MCQ a b d $
Which of the following protocol pairs can be used to send 3 2 1 0
and retrieve e- mails (in that order)? Compute the FOLLOW set of the non-terminal B and write
(A) IMAP, SMTP (B) SMTP, MIME the index values for the symbols in the FOLLOW set in the
(C) SMTP, POP3 (D) IMAM, POP3 descending order. (For example, if the FOLLOW set is {a,
Solution: Mails can be sent using SMTP and to retrieve b, d, $}, then the answer should be 3210)
emails POP3 is used. Solution: Follow (B) = First (D) U
Hence, the correct option is (C). Follow (A) – {∈}
Question Number: 17 Question Type: NAT = {a, d}
The following C program is executed on a Unix/Linux It is indexed as 31.
system Hence, the correct answer is (31).
#include <unistd.h> Q.26–Q.55 carry two marks each.
int main( )
Question Number: 20 Question Type: NAT
{
Let ∑ be the set of all bijections from {1, …..5} to {1, …..,
int i; 5}, where id denotes the identity function, i.e. id(j) = j, ∀j.
for (i = 0 ; i + +) Let ° denotes composition on functions. For a string x = x1,
if (i % 2 = = 0 ) fork( ): x2, ….xn ∈ ∑n, n ≥ 0, let π(x) = x1 ° x2 °….°xn. Consider the
return 0; language L = {x ∈ ∑* | π(x) = id}. The minimum number of
} states in any DFA accepting L is _____.
The total number of child processes created is ______. Solution: For a set of 5 elements number of bijections pos-
sible with itself are 5!= 120.
Solution: Number of times fork() get executed is 5 times Minimum number of states required for the language given
i.e for i = 0, 2, 4, 6, 8. in the question are 120.
Number of child process created for ‘n’ fork() calls are Hence, the correct answer is (120).
2n – 1
Question Number: 21 Question Type: NAT
Hence, the correct answer is (31).
Consider the following relations P(X,Y,Z) Q(X,Y,T) and
Question Number: 18 Question Type: MCQ R(Y,V).
In 16-bit 2’s complement representation, the decimal num-
ber – 28 is: P Q R
(A) 1000 0000 1110 0100 X Y Z X Y T Y V
(B) 1111 1111 0001 1100 X1 Y1 Z1 X2 Y1 2 Y1 V1
(C) 0000 0000 1110 0100 X1 Y1 Z2 X1 Y2 5 Y3 V2
(D) 1111 1111 1110 0100
GATE 2019 Solved Paper CS | xix
Solution: Logical address = 64 bits The primary key of the Student table is Roll_no. For the
Physical address = 48 bits Performance table, the columns Roll_no and Subject_code
Page size = 8KB together form the primary key. Consider the SQL query
given below:
Word size = 4B
SELECT S.Student name, sum(P.Marks)
TLB entries = 128
8KB FROM Student S, Performance P
Number of entries in page = = 2k WHERE P.Marks > 84
4B
As the number of entries in TLB are 128. 128 entries trans- GROUP BY S. Student_name;
lates 128 page numbers into frame numbers. The number of rows returned by the above SQL query is
Distinct virtual addresses can be translated with TLB miss _____.
is Solution:
128 × 211 Student_name Sum (P.marks)
256 × 210 Amit 452
Hence, the correct option is (D). Priya 452
Question Number: 26 Question Type: MCQ Rohan 452
Consider the first order predicate formula ϕ : Smita 452
∀x [(∀z z|x ⇒ ((z = x) ∨ (z = 1))) ⇒ ∃w (w > x) ∧ (∀z z|w Vinit 452
⇒((w = z) ∨ (z = 1)))] Here ‘a|b’ denotes that ‘a divides b’,
Hence, the correct answer is (5).
where a and b are integers. Consider the following sets:
S1. {1, 2, 3,…….,100} Question Number: 28 Question Type: MCQ
S2. Set of all positive integers There are n unsorted arrays: A1. A2, ….., An Assume that n
S3. Set of all integers is odd. Each of A1. A2, ….., An contains n distinct elements.
There are no common elements between any two arrays.
Which of the above sets satisfy ϕ?
The worst-case time complexity of computing the median
(A) S1, S2 and S3 (B) S1 and S3 of A1. A2, ….., An is
(C) S1 and S2 (D) S2 and S3
(A) O(n)
Solution: Given (B) O(n log n)
ϕ : ∀ x [(∀ z z | x ⇒ ((z = x) ∨ (z = 1))) ⇒ ∃ w (w > x) ∧ (∀ (C) Ω(n2 log n)
z z | w ⇒ (w = z ) ∨ (z = 1)))] (D) O(n2)
Means, for every prime number, x, we can find another
Solution: To compute the median of unsorted array of n
prime number w such that w > x.
elements, it takes O(n) time. To find the medians of median,
Consider S1: {1, 2, 3, …,100} it will take O(n2) time.
Take x = 97 Hence, the correct option is (D).
GATE 2019 Solved Paper CS | xxi
Question Number: 29 Question Type: NAT Machine N and P belong to the same subnet.
Consider the following four processes with arrival times (in Hence, the correct option is (B).
milliseconds) and their length of CPU bursts (in millisec-
Question Number: 31 Question Type: MCQ
onds) as shown below:
Consider three 4-variable functions f1, f2, and f3, which are
Process P1 P2 P3 P4 expressed in sum-of-minterms as
Arrival time 0 1 3 4 f1 = ∑(0, 2, 5, 8, 14),
CPU burst time 3 1 3 Z f2 = ∑(2, 3, 6, 8, 14, 15),
These processes are run on a single processor using preemp- f3 = ∑(2, 7, 11, 14)
tive Shortest Remaining Time First scheduling algorithm. If For the following circuit with one AND gate and one XOR
the average waiting time of the processes is 1 millisecond, gate, the output function f can be expressed as:
then the value of Z is _____.
Solution: f1
AND
Process P1 P2 P3 P4 f2 XOR f
Arrival time 0 1 3 4
f3
Burse time 3 1 3 Z
Number of items in I1 are 5. two processes p and q such that Yp = Yq = 0. Which one of
Hence, the correct answer is (5). the following conditions guarantees that no other process
apart from p and q can complete execution?
Question Number: 33 Question Type: MCQ
(A) Min (Xp, Xq) ≤ Max {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
Suppose that in a IP-over-Ethernet network, a machine X
wishes to find the MAC address of another machine Y in its (B) Xp + Xq < Max {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
subnet. Which one of the following techniques can be used (C) Xp + Xq < Min {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
for this? (D) Min (Xp, Xq) ≥ Min {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}
(A) X send an ARP request packet to the local gate- Solution: Given
way’s IP address which then finds the MAC ad- Xi → Holding resources for process pi
dress of Y and sends to X.
Yi → Additional resources for process pi
(B) X send an ARP request packet to the local gate-
As process p and q doesn’t require any additional resources,
way’s MAC address which then finds the MAC ad-
it completes its execution and available resources are
dress of Y and sends to X.
(Xp + Xq)
(C) X sends an ARP request packet with broadcast IP
There are (n – 2) process pi (1 < i < n, i ≠ p, q) with their
address in its local subnet.
requirements as Yi (1 < i < n, i ≠ p, q). In order to not execute
(D) X sends an ARP request packet with broadcast process pi, no instance of Yi should be satisfied with (Xp
MAC address in its local subnet. + Xq) resources, i.e., minimum of Yi instances should be
Solution: In IP over Ethernet network, If machine X wants greater than (Xp + Xq).
to find MAC address of another machine Y in its subnet, Hence, the correct option is (C).
then X sends an ARP request packet with broadcast MAC Question Number: 36 Question Type: NAT
address in its local subnet.
Consider the following C program:
Hence, the correct option is (D).
# include < stdio. h>
Question Number: 34 Question Type: NAT int main ( )
The index node (inode) of Unix-like file system has 12 {
direct, one single – indirect and one double – indirect point-
Int a [ ] = {2, 4, 6, 8, 10}
ers. The disk block size is 4 kB, and the disk block address is
32 – bits long. The maximum possible file size is (rounded int i, sum = 0, *b = a + 4;
off to 1 decimal place) _____GB. for (i = 0; i < 5; i + +)
sum = sum + (*b – i) – *(b – i);
Solution: Maximum file size
printf(“%d\n”, sum);
Disk block size return 0;
Number of direct pointers + Disk block addresss
= }
Disk block size
+ The output of the above C program is ___
disk block address
Solution:
∗ (Disk Block size) 0 1 2 3 4
a 2 4 6 8 10
4 KB 4 KB
2
= 12 + + 4 KB *
4B 4B
b
= [12 + 4K + 1M] ∗ 4KB
= 48KB + 16MB + 4GB i=0
sum = 0 + 10 – 10 = 0
≅ 4GB
i=1
Hence, the correct answer is (3.7 to 3.8 or 4.0 to 4.1).
sum = 0 + 9 – 8 = 1
Question Number: 35 Question Type: MCQ i=2
Consider the following snapshot of a system running n con- sum = 1 + 8 – 6 = 3
current processes. Processes i is holding Xi instances of a i=3
resource R, 1 ≤ i ≤ n. Assume that all instances of R are cur- sum = 3 + 7 – 4 = 6
rently in use. Further, for all i, process i can place a request i=4
for at most Yi additional instances of R while holding the Xi sum = 6 + 6 – 2 = 10
instances it already has. Of the n processes, there are exactly Hence, the correct answer is (10).
GATE 2019 Solved Paper CS | xxiii
Production rule Semantic action Solution: It is not possible to draw a PDA for language
L = {wan wR bn | w ∊ {a, b}*, n ≥ 0}
D → TL X1. type = X2 type
Hence, the correct option is (C).
T → int T. type = int
This page is intentionally left blank
Digital Logic
U
Chapter 1: Number Systems
Chapter 2: Boolean Algebra and
Minimization of Functions
Chapter 3: Combinational Circuits
1.3
1.14
1.35
n
i
Chapter 4: Sequential Circuits 1.56
t
1
This page is intentionally left blank
Another random document with
no related content on Scribd:
„Wat nu gedaan?
„De pastor kreeg een gedacht. Koster! riep hij, ’k en kan [75]ik volstrekt in
de kerke niet gaan, ge zult gij moeten de kruiskes geven.
„De koster, die zijnen pastor gewend was, verstond dat nog al wel.
„Ge weet wat ge moet zeggen, binst dat ge de kruiskes geeft: Memento,
homo! quia pulvis es et in pulverum reverteris (Herinner, mensch! dat gij
stof zijt en in stof zult wederkeeren).
„De pastor herhaalde ’t latijn, maar de koster en verstond het nog niet.
„Ja, Mijnheer Pastor, zei de koster, en hij trok de kerke binnen, peinzende
in zijn eigen dat ze toch aardige dingen zeggen aan de menschen in ’t
latijn.
„En hij begon maar kruiskes te geven en te herhalen dat hij schuimde:
„De menschen keken wat aardig en dat wierd beklapt en besproken als zij
buiten de kerke kwamen.
„Onverdiend!”
Hier voren (op bladzijde 70) heb ik reeds met een enkel woord
vermeld de verzen van eenen Vlaming uit den ouden tijd, waarin al
de spotnamen van Vlaamsche steden en dorpen zijn opgenoemd.
Op dat hoogst merkwaardige stuk wil ik hier nader terug komen.
Sommigen van deze oude namen leven nog heden in den mond des
volks. De H e e r e n van Gent, de K i n d e r e n van Yperen, de
P a s t e i - e t e r s van Kortrijk, de M a k e l - e t e r s van
Dendermonde, de W i t v o e t e n van Aalst, en anderen zijn nog
heden ten dage zoo goed bekend als tijdens Eduwaert den Dene.
Daarentegen zijn de rijke en machtige P o o r t e r s van Brugge uit
de zestiende eeuw in onze negentiende eeuw tot Z o t t e n
vernederd, zijn de oude L e d i g g a n g e r s van Oudenaarde thans
B o o n e n k n o o p e r s , de H u i d e v e t t e r s van Geeraartsbergen
thans B e r g k r u i p e r s , de K a n d e e l e t e r s van Meenen thans
Ta a r t e b a k k e r s , de R o o m e t e r s van Moerbeke thans
S m e e r k o e k e t e r s (de hedendaagsche lieden van Meenen en
van Moerbeke zijn toch liefhebbers van lekkernij gebleven, zoo als
hunne oud-eeuwsche voorvaders reeds waren); de
V a c h t p l u k k e r s van Poperinge heeten thans K e i k o p p e n , de
O v e r m o e d i g e n van Ronse zijn tot Z o t t e n ,
V l i e g e n v a n g e r s en S l e k k e n t r e k k e r s geworden, en de
zestiende-eeuwsche B u e t e r - e t e r s van Diksmude thans, min
hoffelijk, tot B o t e r - k o p p e n .
Uit een taalkundig oogpunt zijn eenigen van deze namen zeer
merkwaardig; b.v. de D a r y n c b a r n e r s van ’t Land van den Vrijen
van Brugge (eene gouw in ’t Noorden van West-Vlaanderen), die in ’t
hedendaagsche Hollandsche Nederduitsch T u r f b r a n d e r s
zouden moeten genoemd worden. Darync, Darink, Daring,
hedendaags in West-Vlaanderen als dèring of derring uitgesproken,
is de oorspronkelijke vorm van ons hedendaagsch Noord-
Nederlandsche woord derrie.—Verder de H u d e v e t t e r s
(Lederbereiders) van Geeraartsbergen, de D r o o g h a e r t s
(Droogscheerders) van Werveke, de T h o o l n a e r s (Tollenaars of,
zoo als de verbasterde Hollanders zeggen, „Douanen”) van
Rupelmonde, enz.
Daar zijn nog oudere Vlaamsche spotnamen bekend, dan dezen van
1560. In de Anzeiger für Kunde der Teutschen Vorzeit, jaargang
1835, bladzijde 299 vindt men een lijstje van die namen
medegedeeld, ’t welk volgens de meening van sommige geleerden
tusschen de jaren 1347 en 1414 moet zijn opgesteld. Deze
middeleeuwsche spotnamen zijn in hoofdzaak de zelfden als die
men in „den langhen Adieu” vindt opgesomd. Sommigen echter
wijken in meerdere of mindere mate af van de namen in dat [81]rijm
voorkomende. Zoo heeten in dit middeleeuwsche lijstje de
ingezetenen van Poperingen V a c h t p l o t e r s , terwijl Eduwaert
de Dene ze V a c h t p l u c k e r s noemt; die van Meenen
P e l s m a k e r s , tegenover de C a n d e e l e t e r s van de Dene; die
van Werveke V e r w a t e n l i e d e n , tegenover de
D r o o g h a e r t s van de Dene; die van Deinse G a r e n c o e p e r s
tegenover de C a e r d e m a e c k e r s van de Dene. En er worden in
het oude lijstje ook eenigen genoemd, die de Dene niet heeft; bij
voorbeeld de W a f e l e t e r s van Bethune, de U t r e c h t s c h e
V l a m i n g e n van de Vier-Ambachten, de P l a t t e G e s e l l e n
van Sleedingen (hedendaags Sleidinge), de D a n s e r s van
Everghem, de S c i p h e e r e n van der Sluus, de T u u s c h e r s van
Theemsche (hedendaags Temseke), en anderen.
De Engelschman J o h n B u l l , de Franschman J e a n
P o t a g e e n zijn wijf M a r i a n n e , J a n t j e - K a a s de Hollander
(door Vlamingen en Brabanders zoo genoemd) en de Duitsche
M i c h e l of H a n s - M i c h e l zijn overbekend. Overbekend is ook in
onze dagen de spotnaam R o o i n e k en R o o i b a a i t j i e , dien
onze Zuid-Afrikaansche stamgenooten den Engelschman geven. De
Hollanders in ’t bijzonder hebben ook nog eenen bijzonderen
spotnaam voor den Duitscher, dien ze M o f noemen. Naar den
oorsprong van dezen naam is door velen vruchteloos gezocht.
Opmerkelijk is het dat de Duitschers, die langs onze oostelijke
grenzen wonen, dien spotnaam M o f (zij zeggen M u f ) wederkeerig
op de Nederlanders toepassen, en ons H o l l a n d e r - M u f
noemen; zie Ten Doornkaat Koolman, Wörterbuch der
Ostfriesischen Sprache, waar almede eene verklaring van dit woord
Muf of Mof te vinden is. De Nederlanders noemen geheel
Duitschland wel M o f f r i k a , maar de Duitschers zelven geven dien
naam M u f f r i k a in ’t bijzonder aan eene kleine gouw, langs onze
grenzen zich uitstrekkende, aan het zoogenoemde Nedersticht van
Munster, tusschen Oost-Friesland en Bentheim gelegen, en de
stadjes Meppen en Lingen met omstreken omvattende.
Opmerkelijk is het, dat men dit woord P o e p als spotnaam ook hier
en daar elders in de Nederlanden terug vindt. De ingezetenen van
Deventer toch dragen bij de andere Overijsselaars en bij de
Gelderschen in hunne nabuurschap ook dezen naam. En ook de
Zeeuwen noemen hunne Vlaamsche en Brabantsche naburen
P o e p e n . Zoo hoorde ik in 1869 door een paar burgers van Goes
zeggen, van een gezelschap boeren en boerinnen uit de polders van
Zandvliet bij Antwerpen, die door ’t stadje Goes ronddwaalden: „’t
zijn maar P o e p e n ,” eenigszins minachtender wijze, juist zoo als
de Friezen spreken van de Duitschers. Volgens van Dale (zelf een
Zeeuwsche Vlaming), Nieuw Woordenboek der Nederlandsche taal,
is p o e p een scheldnaam dien de bewoners van Zuid-Beveland aan
de bewoners van Zeeuwsch-Vlaanderen geven. En volgens De Bo’s
Westvlaamsch Idioticon noemt men in West-Vlaanderen „iemand die
weinig verstand of weinig moed heeft,” een „dwazerik” dus, of een
„lafaard”, een „p o e p g a a i .”
In der daad, de stad Dokkum dagteekent reeds uit zeer ouden tijd;
reeds ten jare 754 verkondigde Sint-Bonifacius daar het Evangelie.
Het Dokkumer taai, eene soort van grof Sint-Nicolaasgebak, is in
geheel Friesland vermaard. En wat de Dokkumer garnaten
(garnalen) aangaat, daar moet men maar niet te luide van spreken,
als er Dokkumers bij zijn (zie bladzijde 21 en vervolgens). [87]
Zeer aardig kenschetsend zijn deze twee rijmkes, van een
Utrechtsch en van een Noordbrabantsch dorp:
Neêr-Langbroek,
Die schrale hoek!
Daar wonen niets dan edellui
En bedellui,
Ridders
En broodbidders;
Daar staan anders niet als kasteelen en nesten,
Sterkenburg is het beste.
Loon-op-Zand,
Licht volk, licht land;
Ze schooien den kost.
En ze stelen den brand. 16
De Bressianen
Zijn hanen,
Maar voor Schoondijke
Moeten ze wijken,
En komen die van de Groe,
Dan houden ze beter hun deuren maar toe!
[88]
Van groote ingenomenheid met zich zelven getuigt het volgende rijm
van sommige Noordhollandsche steden, dat bij de
Monnikendammers in zwang is:
Ten slotte kan ik nog een zeer bijzonder rijm hier mede deelen, dat
betrekking heeft op de Friesche eilandenreeks die zich uitstrekt
tusschen de Weser en het Marsdiep, en dat door mij is
opgeschreven uit den mond van eenen Frieschen schipperszoon,
die met de tjalk van zijnen vader wel oostwaarts naar Emden,
Bremen en Hamburg, en wel zuidwaarts naar Amsterdam,
Rotterdam, Dordrecht en Antwerpen voer. Het rijm is niet in de
eigenlijke Friesche taal opgesteld, maar in het zoogenoemde Stad-
Friesch of „Stêdsk”, dat is Oud-Dietsch met Friesche woorden en
woordvormen vermengd, en met eenen Frieschen mond
uitgesproken.
Wrangero de skoone,
Spikeroog de krone,
Langeroog is ’n butterfat
En Baltrum is ’n sangat.
En de Norderneyers frete har mar half sat
Juust dat is ’n rooverland;
En Borkum is ’n tooverland;
Rottumeroog is ’n klein land,
Mar Skiermonnikoog is sterk bemand:
De Amelander skalken
Hewwe stolen drie balken,
Avons in ’e maneskijn,
Daarom sal ’t har wapen sijn. [89]
Skilingen het ’n hooge toren,
Flielan het siin naam ferloren,
Tessel is mar ’n seegat,
De Helderse T r a a n b o k k e n segge dat.
Dit is het einde van mijn opstel over spotnamen, spotrijmen, enz.
Mogen anderen hierin aanleiding vinden dit belangrijke onderwerp
nog eens beter en uitvoeriger te behandelen. [90]
[Inhoud]