(Mathematical Logic, Set Theory & Algebra)
 
(141 intermediate revisions by the same user not shown)
Line 1: Line 1:
<quiz>
 
{Question
 
|type="()"}
 
  
 
+
==Algorithms & Data Structures ==
Q.1
+
<div>
Consider the following logical inferences.
+
<b> Algorithms:</b>  
   
+
<ul>
<QP
+
<li>Analysis, Asymptotic notation, Notions of space and time complexity, Worst and  
$I_{1}$: If it rains then the cricket match will not be played.
+
average case analysis; </li>
The cricket match was played.
+
<li>Design: Greedy approach, Dynamic programming, Divide-and-conquer; </li>
<b>Inference: </b> There was no rain.
+
<li> Tree and graph traversals, Connected components, Spanning trees, Shortest paths; </li>
$I_{2}$: If it rains then the cricket match will not be played.
+
<li>Hashing, Sorting, Searching. </li>
It did not rain.
+
<li>Asymptotic analysis (best, worst, average cases) of time and space, upper and lower bounds, Basic concepts of complexity classes – P, NP, NP-hard, NP-complete. </li> </ul></div>
<b>Inference: </b> The cricket match was played.
+
<div>
>QP
+
<b> Data Structures: </b> <br>
 
+
<ul>
Which of the following is <b>TRUE</b>?
+
<li> Abstract data types, Arrays, Stacks, Queues </li>
 
+
<li> Linked Lists </li>
(A) Both $I_{1}$ and $I_{2}$ are correct inferences
+
<li>Trees, Binary search trees, Binary heaps. </li>
(B) $I_{1}$ is correct but $I_{2}$ is not a correct inference
+
</ul></div>
(C) $I_{1}$ is not correct but $I_{2}$ is a correct inference
+
{| class="wikitable"
(D) Both $I_{1}$ and $I_{2}$ are not correct inferences
+
! style="color: #f7f7f7; background-color: #3b5998;"|
 
+
Course Videos
 
+
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
Q.2
+
Description
Which of the following is <b>TRUE</b>?
+
|-
(A) Every relation in 3NF is also in BCNF
+
| [http://www.aduni.org/courses/algorithms/index.php?view=cw ''Algorithms'']
(B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every
+
Shai Simonson, Aduni.org
key of R
+
| Aduni.org: before you do any other thing, the first thing to do is watch these videos, you won’t believe how awesome Shai is.
(C) Every relation in BCNF is also in 3NF
+
|-
(D) No relation can be in both BCNF and 3NF
+
|[http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/ ''Introduction to Algorithms'']
 
+
Leiserson, OCW.MIT
 
+
|One of the lecturers is C. Leiserson, The “L” in CLRS..
Q.3
+
|-
What will be the output of the following C program segment?
+
| [http://nptel.ac.in/video.php?subjectId=106102064  ''Introduction to Data Structures & Algorithms'' ]
<pre><code
+
NPTEL
class="language-c">
+
|
char inChar = ‘A’ ;
+
|-
switch ( inChar ) {
+
|[https://www.coursera.org/course/algs4partI  Coursera Course]
case ‘A’ : printf (“Choice A\ n”) ;
+
Kevin Wayne, Robert Sedgewick, Princeton University
case ‘B’ :
+
| Course and slides
case ‘C’ : printf (“Choice B”) ;
+
|}
case ‘D’ :
 
case ‘E’ :
 
default : printf ( “ No Choice” ) ; }
 
</code>
 
</pre>
 
(A) No Choice
 
(B) Choice A
 
(C) Choice A
 
Choice B No Choice
 
(D) Program gives no output as it is erroneous
 
 
 
 
 
Q.4 Assuming P ≠ NP, which of the following is
 
<b>TRUE</b>?
 
(A) NP-complete = NP
 
(B) $NP-complete \cap p P = \phi $
 
(C) NP-hard = NP                                             
 
(D) P = NP-complete
 
 
 
 
 
Q.5 The worst case running time to search for an element in a balanced binary search tree with ($n2^{n}$)
 
elements is
 
(A) $\theta(n log n)$
 
(B) $\theta(n2^2)$
 
(C) $\theta(n)$
 
(D) $\theta(log n)$
 
 
 
 
 
Q.6
 
The truth table
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b>X</b></th>
 
<th colspan="1"><b>Y</b></th>
 
<th colspan="1"><b>(X,Y)</b></th>
 
</tr>
 
<tr>
 
<td>$0$</td>
 
<td>$0$</td>
 
<td>$0$</td>
 
</tr>
 
<tr>
 
<td>$0$</td>
 
<td>$1$</td>
 
<td>$0$</td>
 
</tr>
 
<tr>
 
<td>$1$</td>
 
<td>$0$</td>
 
<td>$1$</td>
 
</tr>
 
<tr>
 
<td>$1$</td>
 
<td>$1$</td>
 
<td>$1$</td>
 
</tr> represents the Boolean function
 
(A)$ X$
 
(B) $X + Y$
 
(C) $X \oplus Y$
 
(D) $Y$
 
  
  
Q.7
 
The decimal value $0.5$ in IEEE single precision floating point
 
representation has
 
(A) fraction bits of 000...000 and exponent value of 0
 
(B) fraction bits of 000...000 and exponent value of −1
 
(C) fraction bits of 100...000 and exponent value of 0
 
(D) no exact representation
 
  
  
Q.8
+
==Databases==
A process executes the code <pre><code
+
<div>
class="language-c">
+
<ul>
fork();
+
<li> ER-model, Relational model (relational algebra, tuple calculus) </li>
fork();
+
<li> Database design (integrity constraints, normal forms) </li>
fork();
+
<li> Query languages (SQL) </li>
</code
+
<li> File structures (sequential files, indexing, B and B+ trees) </li>
></pre>
+
<li> Transactions and concurrency control </li>
The total number of <b>child</b> processes created is
 
(A) 3
 
(B) 4
 
(C) 7
 
(D) 8
 
  
 +
</ul></div>
 +
{| class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
| [https://www.youtube.com/playlist?list=PLyvBGMFYV3auVdxQ1-88ivNFpmUEy-U3M ''DBMS NPTEL PPC - IIT KGP'']
 +
NPTEL
 +
| IIT KGP PPC DBMS lecture is good one
 +
|-
 +
| [http://web.stanford.edu/class/cs145/ ''CS145 Introduction to Databases'' ]
 +
Stanford
 +
|Course and slides for DBMS
 +
|}
  
Q.9 Consider the function $f(x) = sin(x)$ in the interval $x ∈ [π/4, 7π/4]$. The number and location(s) of the local minima of this function are
 
(A) One, at $π/2$
 
(B) One, at $3π/2$
 
(C) Two, at $π/2$ and $3π/2$
 
(D) Two, at $π/4$ and $3π/2$
 
  
  
Q.10 The protocol data unit (PDU) for the application layer in the Internet stack is
 
(A) Segment
 
(B) Datagram
 
(C) Message
 
(D) Frame
 
  
 +
==Compiler Design==
 +
<div>
 +
<ul>
 +
<li>Lexical analysis, Parsing </li>
 +
<li> Syntax directed translation, Runtime environments </li>
 +
<li>Intermediate and target code generation, Basics of code optimization. </li>
 +
</ul></div>
 +
{| class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[https://www.youtube.com/playlist?list=PLFB9EC7B8FE963EB8&feature=plcp ''CS143 Compilers'' ]
 +
Stanford
 +
|Best notes and assignment for Compiler Course, no video
 +
|-
 +
|[http://web.stanford.edu/class/archive/cs/cs143/cs143.1128/ ''Compilers Stanford'' ]
 +
Alex Aiken, Coursera
 +
| Comprehensive
 +
|}
  
Q.11 Let A be the $2 × 2$ matrix with elements $a_{11}= a_{12} = a_{21} = +1$ and $a_{22} = −1. $
 
Then the eigenvalues of the matrix $A^{19}$ are
 
(A) $1024$ and $−1024$
 
(B) $1024\sqrt{2}$ and $−1024 \sqrt{2}$
 
(C) $4 \sqrt{2}$ and $−4 \sqrt{2}$
 
(D) $512 \sqrt{2}$ and $−512 \sqrt{2}$
 
  
  
Q.12 What is the complement of the language accepted by the NFA shown below?
 
 
<QP
 
Assume $Σ = {a}$ and $ε$ is the empty string.>QP
 
<IMG
 
a
 
ε
 
ε
 
>IMG
 
(A) $∅$
 
(B) ${ε}$
 
(C) $a_{*}$
 
(D) ${a , ε}$
 
  
 +
==Operating Systems==
 +
<div>
 +
<ul>
 +
<li> Processes, Threads, Inter-process communication </li>
 +
<li> Concurrency, Synchronization </li>
 +
<li> Deadlock </li>
 +
<li> CPU scheduling </li>
 +
<li> Memory management and virtual memory </li>
 +
<li> File systems, I/O systems, Protection and security. </li>
 +
</ul></div>
 +
{| class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
| [https://www.youtube.com/playlist?list=PLLDC70psjvq5hIT0kfr1sirNuees0NIbG ''Operating Systems'' ]
 +
P.K.Biswas
 +
| Enough for GATE
 +
|-
 +
|[https://www.youtube.com/watch?v=sjs5PtCsVA4&index=1&list=PLEAFEC6160DADC7AA ''Computer Science 162 - Lecture 1'' ]
 +
UCBerkeley
 +
|
 +
|}
  
Q.13 What is the correct translation of the following statement into mathematical logic?
 
 
<QP 
 
“Some real numbers are rational”>QP
 
(A)$ ∃x (real(x) ∨ rational(x))$
 
(B) $∀x (real(x) → rational(x))$
 
(C) $∃x (real(x) ∧ rational(x))$
 
(D) $∃x (rational(x) → real(x))$
 
  
  
Q.14
 
Given the basic ER and relational models, which of the following is
 
<b>INCORRECT</b>?
 
(A) An attribute of an entity can have more than one value
 
(B) An attribute of an entity can be composite
 
(C) In a row of a relational table, an attribute can have more than one value
 
(D) In a row of a relational table, an attribute can have exactly one value or a NULL value
 
  
 +
==Theory of Computation==
 +
<div>
 +
<ul>
 +
<li>  Regular languages and finite automata </li>
 +
<li>Context free languages and Push-down automata </li>
 +
<li>Recursively enumerable sets and Turing machines</li>
 +
<li> Undecidability. </li>
 +
</ul></div>
 +
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[http://www.aduni.org/courses/theory/index.php?view=cw ''Theory of Computation'' ]
 +
Shai Simonson, Aduni.org
 +
| If you have not seen these videos, don’t do anything go and see the videos immediately, no excuses.
 +
|}
  
Q.15 Which of the following statements are <b>TRUE</b> about an SQL query?
 
 
<QP
 
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
 
Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause
 
R : All attributes used in the GROUP BY clause must appear in the SELECT clause
 
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
 
>QP
 
(A) P and R
 
(B) P and S
 
(C) Q and R
 
(D) Q and S
 
  
  
Q.16 The recurrence relation capturing the optimal execution time of the $Towers of Hanoi$ problem with
 
$n$ discs is
 
(A) $T(n) = 2T(n − 2) + 2$
 
(B) $T(n) = 2T(n − 1) + n$
 
(C) $T(n) = 2T(n/2) + 1$
 
(D) $T(n) = 2T(n − 1) + 1$
 
  
 +
==CO & Architecture==
 +
<div>
 +
<ul>
 +
<li> Machine instructions and addressing modes</li>
 +
<li> ALU and data-path, CPU control design</li>
 +
<li> Memory interface, I/O interface (Interrupt and DMA mode) </li>
 +
<li> Instruction pipelining </li>
 +
<li> Cache and main memory, Secondary storage. </li>
 +
</ul>
 +
</div>
 +
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[https://www.youtube.com/course?category=University%2FScience%2FComputer%2520Science%2FComputer%2520Architecture&list=EC1A5A6AE8AFC187B7&feature=edu ''Computer Architecture'' ]
 +
Prof. Anshul Kumar, IIT Delhi, NPTEL
 +
|
 +
|-
 +
|[https://www.youtube.com/course?category=University%2FScience%2FComputer%2520Science%2FComputer%2520Architecture&list=EC1A5A6AE8AFC187B7&feature=edu ''Computer Organization'' ]
 +
Prof. S. Raman, IIT Madras, NPTEL
 +
|
 +
|-
 +
| [https://www.coursera.org/course/comparch ''Computer Architecture'']
 +
David Wentzlaff, Princeton University, Coursera
 +
| Full Course
 +
|}
  
Q.17
 
Let $G$ be a simple undirected planar graph on $10$ vertices with $15$ edges. If $G$ is a
 
connected graph, then the number of <b>bounded</b> faces in any embedding of $G$ on the
 
plane is equal to
 
(A) 3
 
(B) 4
 
(C) 5
 
(D) 6
 
  
  
Q.18
 
Let $ W(n) $ and $ A(n)$ denote respectively, the worst case and average case running
 
time of an algorithm executed on an input of size $ n$ . Which of the following is <b>ALWAYS
 
TRUE</b>?
 
(A) $A(n) = \Omega (W(n))$
 
(B) $A(n) = \theta (W(n))$
 
(C) $A(n) = O (W(n))$
 
(D) $A(n) = o (W(n))$
 
  
 +
==Computer Networks==
 +
<div>
 +
<ul>
 +
<li> ISO/OSI stack, LAN technologies (Ethernet, Token ring) </li>
 +
<li> Flow and error control techniques, Routing algorithms, Congestion control </li>
 +
<li> TCP/UDP and sockets, IP(v4), Application layer protocols (icmp, dns, smtp, pop, ftp, http)</li>
 +
<li>Basic concepts of hubs, switches, gateways, and routers</li>
 +
<li> Network security – basic concepts of public key and private key cryptography, digital signature, firewalls </li>
 +
</ul></div>
 +
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[http://nptel.ac.in/video.php?subjectId=106105081 ''Computer Networks'']
 +
NPTEL
 +
|
 +
|-
 +
|[http://www.cse.wustl.edu/~jain/cse473-10/index.html ''Introduction to Computer Networks'']
 +
Jain, WUSTL
 +
|
 +
|}
  
Q.19
 
The amount of ROM needed to implement a 4 bit multiplier is
 
(A) 64 bits
 
(B) 128 bits
 
(C) 1 Kbits
 
(D) 2 Kbits
 
  
  
Q.20
 
Register renaming is done in pipelined processors
 
(A) as an alternative to register allocation at compile time
 
(B) for efficient access to function parameters and local variables
 
(C) to handle certain kinds of hazards
 
(D) as part of address translation
 
  
 +
==Programming==
 +
<div>
 +
<ul>
 +
<li> Programming in C </li>
 +
<li> Functions, Recursion </li>
 +
<li> Parameter passing, Scope, Binding </li>
 +
</ul> </div>
 +
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[https://www.youtube.com/watch?v=_eR4rxnM7Lc&list=PL9D558D49CA734A02&index=4 ''Programming Paradigms'']
 +
Jerry Cain, Stanford
 +
| Doesn't cover the entire GATE syllabus in programming but useful
 +
|-
 +
|[https://www.youtube.com/course?category=University%2FEngineering%2FComputer%2520Science%2FData%2520Structures&list=EC4BBB74C7D2A1049C&feature=edu ''Computer Science 61B - Fall 2006'']
 +
UCBerkeley
 +
|For Data structures
 +
|}
  
Q.21 Consider a random variable $X$ that takes values $+1$ and $−1$ with probability $0.5$ each. The
 
values of the cumulative distribution function $F(x)$ at $x = −1$ and $+1$ are
 
(A) $0 and 0.5$
 
(B) $0 and 1$
 
(C) $0.5 and 1$
 
(D) $0.25 and 0.75
 
  
  
Q.22 Which of the following transport layer protocols is used to support electronic mail?
 
(A) SMTP
 
(B) IP
 
(C) TCP
 
(D) UDP
 
  
 +
==Digital Logic==
 +
<div>
 +
<ul>
 +
<li>Logic functions, Minimization </li>
 +
<li> Design and synthesis of combinational and sequential circuits </li>
 +
<li> Number representation and computer arithmetic (fixed and floating point) </li>
 +
</ul>
 +
</div>
 +
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
| [https://www.youtube.com/watch?v=CeD2L6KbtVM ''Introduction to Digital Circuits'']
 +
Prof. S. Srinivasan, IIT Madras, NPTEL
 +
|
 +
|}
  
Q.23 In the IPv4 addressing format, the number of networks allowed under Class C addresses is
 
(A) $2^{14}$
 
(B) $2^{7}$
 
(C) $2^{21}$
 
(D) $2^{24}$
 
  
  
Q.24
 
  
Which of the following problems are decidable?
+
==Information Systems and Software Engineering==
+
<div>
<QP
+
<ul>
1) Does a given program ever produce an output?
+
<li>Information gathering, requirement and feasibility analysis data flow diagrams </li>
2) If $L$ is a context-free language, then, is $\bar{L}$ also context-free?
+
<li>Process specifications, input/output design, process life cycle </li>
3) If $L$ is a regular language, then, $\bar{L}$ is also regular?
+
<li>Planning and managing the project, design, coding </li>
4) If $L$ is a recursive language, then, is $\bar{L}$also recursive?
+
<li>Testing, implementation, maintenance. </li>
>QP
+
</ul> </div>
(A) 1, 2, 3, 4
+
{|class="wikitable"
(B) 1, 2
+
! style="color: #f7f7f7; background-color: #3b5998;"|
(C) 2, 3, 4
+
Course Videos
(D) 3, 4
+
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 
+
Description
 
+
|-
Q.25 Given the language $L = {ab, aa, baa}$, which of the following strings are in $L^{*}$?
+
|[http://nptel.ac.in/courses/106101061/ ''Introduction to Software Engineering Challenges'']
+
IIT Bombay, NPTEL
<QP
+
|
1) $ abaabaaabaa$
+
|}
2) $ aaaabaaaa$
 
3) $ baaaaabaaaab$
 
4) $ baaaaabaa$
 
>QP
 
(A) 1, 2 and 3
 
(B) 2, 3 and 4
 
(C) 1, 2 and 4
 
(D) 1, 3 and 4
 
  
  
<0 <b> Q.26 to Q.55 carry two marks each.</b>
 
  
  
Q.26
+
==Web technologies==
Which of the following graphs is isomorphic to
+
<div>
<IMG
+
<ul>
>IMG
+
<li> HTML, XML </li>
(A) <IMG
+
<li>Basic concepts of client-server computing </li>
>IMG
+
</ul>
(B) <IMG
+
</div>
>IMG
+
{|class="wikitable"
(C) <IMG
+
! style="color: #f7f7f7; background-color: #3b5998;"|
>IMG
+
Course Videos
(D) <IMG
+
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
>IMG
+
Description
 +
|-
 +
|[http://gatecse.in/w/images/0/02/Web-Technologies-Fundamentals-and-HTTP.pptx ''Web Technologies Basics'']
 +
Telerik Academy
 +
| This presentation is enough for GATE.
 +
|}
  
  
Q.27
 
Consider the following transactions with data items P and Q initialized to zero:
 
<pre> <code class="language-c">
 
<b>T1</b> :read (P);
 
read (Q);
 
if P = 0 then Q := Q + 1 ;
 
write (Q).
 
<b>T2</b>: read (Q);
 
read (P);
 
if Q = 0 then P := P + 1 ;
 
write (P).
 
</code></pre>
 
 
<QP
 
Any non-serial interleaving of T1 and T2 for concurrent execution leads to >QP
 
(A) a serializable schedule
 
(B) a schedule that is not conflict serializable
 
(C) a conflict serializable schedule
 
(D) a schedule for which a precedence graph cannot be drawn
 
  
 +
== Engineering Mathematics==
  
Q.28
 
The bisection method is applied to compute a zero of the function $f(x) =x ^{4} – x ^{3} – x
 
^{2} – 4$ in the interval [1,9]. The method converges to a solution after ––––– iterations.
 
(A) 1
 
(B) 3
 
(C) 5
 
(D) 7
 
  
 +
===Combinatory & Probability===
 +
'''Combinatory'''
 +
<div>
 +
<ul>
 +
<li>Permutations, Combinations </li>
 +
<li> Counting, Summation </li>
 +
<li> Generating functions, recurrence relations, asymptotics </li>
 +
</ul></div>
 +
'''Probability'''
 +
<div>
 +
<ul>
 +
<li>Conditional Probability </li>
 +
<li>Mean, Median, Mode and Standard Deviation </li>
 +
<li> Random Variables </li>
 +
<li> Distributions; uniform, normal, exponential, Poisson, Binomial. </li>
 +
</ul></div>
 +
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[https://www.youtube.com/playlist?list=PL5BC8D7CFBA5732EA ''Sets, Counting, and Probability'']
 +
Harvard
 +
|Covers the basics
 +
|-
 +
|[https://www.youtube.com/playlist?list=PLvjECquwN5_Emuhi-ISxBOk82-zp-6lTf ''Applied Probability'']
 +
MIT
 +
|Advanced course and topics are mostly above GATE syllabus.
 +
|}
  
Q.29
 
Let G be a weighted graph with edge weights greater than one and $G′$ be the graph constructed
 
by squaring the weights of edges in $G$. Let $T$ and $T′$ be the minimum spanning trees of
 
$G$ and $G′$, respectively, with total weights $t$ and $t′$. Which of the following statements is
 
<b>TRUE</b>?
 
(A) $T′ = T$ with total weight $t' = t^2$
 
(B) $T′ = T$ with total weight $t'< t^2$
 
(C) $T′ ≠ T$ but total weight $t' = t$
 
(D) None of the above
 
  
 +
===Mathematical Logic, Set Theory & Algebra===
  
Q.30
 
What is the minimal form of the Karnaugh map shown below? Assume that X denotes a don’t
 
care term
 
<IMG
 
(A) $\bar{b} \bar{d}$
 
(B) $ \ b a r { b } \ b a r { d } + \ b a r { b } \ b a r { c } $
 
(C) $ \bar{b} \bar{d} + \bar{a} \bar{b} \bar{c} \bar{d}$
 
(D) $ \bar{b} \bar{d} + \bar{b} \bar{c} + \bar{c} \bar{d} $
 
  
 +
'''Mathematical Logic'''
 +
<div>
 +
<ul>
 +
<li>Propositional Logic </li>
 +
<li> First Order Logic </li>
 +
</ul> </div>
 +
<div>
  
Q.31 Consider the 3 processes, $P1,$ $P2$ and $P3$ shown in the table.
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b> Process </b></th>
 
<th colspan="1"><b> Arrival time </b></th>
 
<th colspan="1"><b> Time Units Required </b></th>
 
</tr>
 
<tr>
 
<td>$ P1$</td>
 
<td>$0$</td>
 
<td>$5$</td>
 
</tr>
 
<tr>
 
<td>$ P2$</td>
 
<td>$1$</td>
 
<td>$7$</td>
 
</tr>
 
<tr>
 
<td>$ P3$</td>
 
<td>$3$</td>
 
<td>$4$</td>
 
</tr>
 
 
<QP
 
The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling
 
with CPU quantum of 2 time units) are >QP
 
(A) $<b>FCFS</b>: P1, P2, P3
 
(B) $<b>FCFS</b>: P1, P3, P2
 
(C) $<b>FCFS</b>: P1, P2, P3
 
(D) $<b>FCFS</b>: P1, P3, P2
 
<b>RR2</b>: P1, P2, P3$
 
<b>RR2</b>: P1, P3, P2$
 
<b>RR2</b>: P1, P3, P2$
 
<b>RR2</b>: P1, P2, P3$
 
  
 +
'''Set Theory & Algebra'''
 +
<ul>
 +
<li> Sets, Relations, Functions </li>
 +
<li> Groups </li>
 +
<li> Partial Orders, Lattice </li>
 +
<li> Boolean Algebra </li>
 +
</ul></div>
 +
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[https://www.youtube.com/view_play_list?p=0862D1A947252D20 ''Discrete Mathematical Structures'']
 +
Prof. Kamala Krithivasan, IIT Madras, NPTEL
 +
| Covers Mathematical logic, Set Theory and Algebra syllabus from GATE completely
 +
|}
  
Q.32
+
===Graph Theory===
$ Fetch_And_Add(X,i)$ is an atomic Read-Modify-Write instruction that reads the value of
+
<div>
memory location X, increments it by the value i, and returns the old value of X. It is used in the
+
<ul>
pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable
+
<li>Connectivity, spanning trees</li>
initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value
+
<li> Cut vertices & edges </li>
corresponds to the lock being not available.
+
<li> Covering, matching, independent sets </li>
<pre> <code class="language-c">
+
<li> Colouring, Planarity, Isomorphism </li>
AcquireLock(L){
+
</ul></div>
while (Fetch_And_Add(L,1)) L
+
{|class="wikitable"
= 1;
+
! style="color: #f7f7f7; background-color: #3b5998;"|
}
+
Course Videos
ReleaseLock(L)
+
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
{ L = 0;
+
Description
}
+
|-
</code></pre>
+
|[http://www.nptel.ac.in/courses/106108054/1''Graph Theory'']
+
NPTEL
<QP
+
|Advanced course, just take what you need from GATE syllabus
This implementation
+
|}
>QP
 
(A) fails as L can overflow
 
(B) fails as L can take on a non-zero value when the lock is actually available
 
(C) works correctly but may starve some processes
 
(D) works correctly without starvation
 
  
  
Q.33
+
===Linear Algebra===
Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a
+
<div><ul>
second time. What is the probability that the sum total of values that turn up is at least 6?
+
<li>Algebra of matrices, determinants </li>
(A) $10/21$
+
<li> Systems of linear equations </li>
(B) $5/12$
+
<li> Eigen values and Eigen vectors </li>
(C) $2/3$
+
</ul></div>
(D) $1/6$
+
{|class="wikitable"
 +
! style="color: #f7f7f7; background-color: #3b5998;"|
 +
Course Videos
 +
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
 +
Description
 +
|-
 +
|[http://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/video-lectures/ ''Linear Algebra'']
 +
Gilbert Strang, OCW.MIT
 +
| Straight from the master
 +
|-
 +
|}
  
  
Q.34
+
===Numerical Methods & Calculus===
An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available
+
'''Numerical Methods'''
with it: $245.248.128.0/20$. The ISP wants to give half of this chunk of addresses to Organization
+
<div>
$A$, and a quarter to Organization $B$, while retaining the remaining with itself. Which of the
+
<ul>
following is a valid allocation of addresses to $A$ and $B$?
+
<li>LU decomposition for systems of linear equations </li>
(A) $245.248.136.0/21 and
+
<li> Numerical solutions of non-linear algebraic equations by Secant, Bisection and Newton-Raphson Methods </li>
245.248.128.0/22$
+
<li> Numerical integration by trapezoidal and Simpson’s rules </li>
(B) $245.248.128.0/21 and
+
</ul></div>
245.248.128.0/22$
 
(C) $245.248.132.0/22 and
 
245.248.132.0/21$
 
(D) $245.248.136.0/24 and
 
245.248.132.0/21$
 
  
 +
'''Calculus'''
 +
<div>
 +
<ul>
 +
<li> Limit, Continuity & differentiability </li>
 +
<li> Mean value theorems </li>
 +
<li> Theorems of integral calculus, evaluation of definite & improper integrals</li>
 +
<li> Partial derivatives, Total derivatives, maxima & minima </li>
 +
</ul></div>
  
Q.35 Suppose a circular queue of capacity $(n −1)$ elements is implemented with an array of $n$ elements.
+
{|class="wikitable"
Assume that the insertion and deletion operations are carried out using $REAR$ and
+
! style="color: #f7f7f7; background-color: #3b5998;"|
$FRONT$ as array index variables, respectively. Initially, $REAR = FRONT = 0$. The
+
Course Videos
conditions to detect $queue full$ and $queue empty$ are
+
! style="width: 70%;color:#f7f7f7; background-color: #3b5998;"|
(A) $full: (REAR+1) mod n == FRONT$
+
Description
$empty: REAR == FRONT$
+
|-
(B) $full: (REAR+1) mod n == FRONT$
+
|[http://ocw.mit.edu/courses/mathematics/18-01-single-variable-calculus-fall-2006/video-lectures/ ''Single Variable Calculus'']
$empty: (FRONT+1) mod n == REAR$
+
David Jerison, OCW.MIT
(C) $full: REAR == FRONT$
+
| Very good videos
$empty: (REAR+1) mod n == FRONT$
+
|}
(D) full: (FRONT+1) mod n == REAR
 
$empty: REAR == FRONT$
 
  
  
Q.36
+
==General Aptitude==
Consider the program given below, in a block-structured pseudo-language with lexical scoping and
+
===Numerical Ability===
nesting of procedures permitted.
+
<div>
<pre><code class="language-c">
+
<ul>
Program
+
<li>Numerical computation </li>
main; Var ...
+
<li> Numerical estimation </li>
Procedure A1;
+
<li> Numerical reasoning and data interpretation </li>
Var ... Call
+
</ul></div>
A2;
 
End A1
 
Procedure A2;
 
Var ...
 
Procedure A21;
 
Var ...
 
Call A1;
 
End A21
 
Call A21;
 
End A2
 
Call A1;
 
End main.
 
</code></pre>
 
 
   
 
   
<QP
 
Consider the calling chain: Main  A1  A2  A21  A1
 
The correct set of activation records along with their access links is given by >QP
 
(A)
 
<IMG>
 
Main
 
A1
 
A2
 
A21
 
FRAME
 
POINTER
 
</IMG>
 
(B)
 
A1
 
ACCESS
 
LINKS<IMG>
 
Main
 
A1
 
A2
 
A21
 
FRAME
 
POINTER
 
A1
 
ACCESS
 
LINKS
 
</IMG>
 
(C)
 
<IMG>
 
Main
 
FRAME
 
POINTER
 
A1
 
A2
 
A21
 
ACCESS
 
LINKS
 
</IMG>
 
(D)
 
<IMG>
 
Main
 
A1
 
A2
 
A21
 
FRAME
 
POINTER
 
A1
 
ACCESS
 
LINKS
 
</IMG>
 
 
 
Q.37 How many onto (or surjective) functions are there from an $n-element (n ≥ 2)$ set to a
 
$2-element$ set?
 
(A) $ 2^{n}$
 
(B) $2^{n} – 1$
 
(C) $2^{n} – 2$
 
(D) $2($2^{n} – 2)$
 
 
 
 
 
Q.38 Let $G$ be a complete undirected graph on $6$ vertices. If vertices of $G$ are labeled, then the number
 
of distinct cycles of length $4$ in $G$ is equal to
 
(A) 15
 
(B) 30
 
(C) 90
 
(D) 360
 
 
 
Q.39
 
A list of $n$ strings, each of length $n$, is sorted into lexicographic order using the merge-sort
 
algorithm. The worst case running time of this computation is
 
(A) $O (n log n) $
 
(B) $O (n^{2} log n) $
 
(C) $O (n^{2} + log n) $
 
(D) $O (n^{2}) $
 
 
 
Q.40
 
Consider the directed graph shown in the figure below. There are multiple shortest paths between
 
vertices $S$ and $T$. Which one will be reported by Dijkstra’s shortest path algorithm? Assume
 
that, in any iteration, the shortest path to a vertex $v$ is updated only when a strictly shorter path to
 
$v$ is discovered.<IMG>
 
</IMG>
 
(A) SDT
 
(B) SBDT
 
(C) SACDT
 
(D) SACET
 
 
 
Q.41
 
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect
 
block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the
 
size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
 
(A) 3 KBytes
 
(B) 35 KBytes
 
(C) 280 KBytes
 
(D) dependent on the size of the disk
 
 
 
Q.42 Consider the virtual page reference string
 
 
<QP
 
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
 
on a demand paged virtual memory system running on a computer system that has main memory
 
size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number
 
of page faults under the corresponding page replacement policy. Then >QP
 
(A) $OPTIMAL < LRU < FIFO$
 
(B) $OPTIMAL < FIFO < LRU$
 
(C) $OPTIMAL = LRU$
 
(D) $OPTIMAL = FIFO$
 
 
 
Q.43
 
Suppose $R_{1} (A, B)$ and $R_{2} (C, D) $ are two relation schemas. Let $r_{1}$ and
 
$r_{2}$ be the corresponding relation instances. $B$ is a foreign key that refers to $C$ in
 
$R_{2}$. If data in $r_{1}$ and $r_{2}$ satisfy referential integrity constraints, which of the
 
following is <b>ALWAYS TRUE</b>?
 
(A) $\prod_{B}(r_{1})- \prod _{C}r_{2}= \prod _{C}r_{2} = \varnothing$
 
(B) $\prod_{c}(r_{2})- \prod _{B}r_{1}= \varnothing$
 
(C) $\prod_{B}(r_{1}) = \prod _{c}r_{2}$
 
(D) $\prod_{B}(r_{1}) = \prod _{c}r_{2} \neq \varnothing$
 
 
 
Q.44
 
Consider a source computer $ (S)$ transmitting a file of size $10^{6}$ bits to a destination
 
computer $ (D)4 over a network of two routers $(R_{1} and R_{2})$ and three links $(L_{1},L_{2}, and L_{3})$. $L_{1}$ connects $S$ to $R_{1}$; $L_{2}$ connects $R_{1}$ to $R_{2}$;
 
and $L_{3}$ connects $R_{2}$ to $D$. Let each link be of length 100 km. Assume signals travel
 
over each link at a speed of $10^{8}$ meters per second. Assume that the link bandwidth on each
 
link is 1Mbps. Let the file be broken down into 1000 packets each of size 1000 bits. Find the total
 
sum of transmission and propagation delays in transmitting the file from S to D?
 
(A) 1005 ms
 
(B) 1010 ms
 
(C) 3000 ms
 
(D) 3003 ms
 
 
 
Q.45
 
Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where
 
the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first
 
transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the
 
congestion window size at the end of the tenth transmission.
 
(A) 8 MSS
 
(B) 14 MSS
 
(C) 7 MSS
 
(D) 12 MSS
 
 
 
Q.46 Consider the set of strings on ${0,1}$ in which, $every substring of 3 symbols$ has at most $two$
 
zeros.
 
 
<QP
 
For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less
 
than 3 are also in the language. A partially completed DFA that accepts this language is shown
 
below. >QP
 
<IMG>
 
</IMG>
 
 
<QP
 
The missing arcs in the DFA are >QP
 
(A)
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b> </b></th>
 
<th colspan="1"><b>00</b></th>
 
<th colspan="1"><b>01</b></th>
 
<th colspan="1"><b>10</b></th>
 
<th colspan="1"><b>11</b></th><th colspan="1"><b>q</b></th>
 
</tr>
 
<tr>
 
<td><b>$00$</b></td>
 
<td>$1$</td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$01$</b></td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
<td>$1$</td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$10$</b></td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$11$</b></td>
 
<td> </td>
 
<td> </td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
(B)
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b> </b></th>
 
<th colspan="1"><b>00</b></th>
 
<th colspan="1"><b>01</b></th>
 
<th colspan="1"><b>10</b></th>
 
<th colspan="1"><b>11</b></th>
 
<th colspan="1"><b>q</b></th>
 
</tr>
 
<tr>
 
<td><b>$00$</b></td>
 
<td> </td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
<td>$1$</td>
 
</tr><tr>
 
<td><b>$01$</b></td>
 
<td> </td>
 
<td>$1$</td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$10$</b></td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
<td>$0$</td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$11$</b></td>
 
<td> </td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
(C)
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b> </b></th>
 
<th colspan="1"><b>00</b></th>
 
<th colspan="1"><b>01</b></th>
 
<th colspan="1"><b>10</b></th>
 
<th colspan="1"><b>11</b></th>
 
<th colspan="1"><b>q</b></th>
 
</tr>
 
<tr>
 
<td><b>$00$</b></td>
 
<td> </td>
 
<td>$1$</td>
 
<td> </td>
 
<td> </td>
 
<td>$0$</td>
 
</tr>
 
<tr>
 
<td><b>$01$</b></td>
 
<td> </td>
 
<td>$1$</td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$10$</b></td><td> </td>
 
<td> </td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$11$</b></td>
 
<td> </td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
(D)
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b> </b></th>
 
<th colspan="1"><b>00</b></th>
 
<th colspan="1"><b>01</b></th>
 
<th colspan="1"><b>10</b></th>
 
<th colspan="1"><b>11</b></th>
 
<th colspan="1"><b>q</b></th>
 
</tr>
 
<tr>
 
<td><b>$00$</b></td>
 
<td> </td>
 
<td>$1$</td>
 
<td> </td>
 
<td> </td>
 
<td>$0$</td>
 
</tr>
 
<tr>
 
<td><b>$01$</b></td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
<td>$1$</td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$10$</b></td>
 
<td>$0$</td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
<tr>
 
<td><b>$11$</b></td>
 
<td> </td>
 
<td> </td><td>$0$</td>
 
<td> </td>
 
<td> </td>
 
</tr>
 
 
 
Q.47
 
The height of a tree is defined as the number of edges on the longest path in the tree. The function
 
shown in the pseudocode below is invoked as height(root) to compute the height of a binary tree
 
rooted at the tree pointer root.
 
<pre><code>
 
int height (treeptr n)
 
{ if (n == NULL) return -1;
 
if (n  left == NULL)
 
if (n  right == NULL) return 0;
 
else return B1
 
;
 
// Box 1
 
else { h1 = height (n  left);
 
if (n  right == NULL) return (1+h1);
 
else { h2 = height (n  right);
 
return
 
B2
 
;
 
// Box 2
 
}
 
}
 
}
 
</code></pre>
 
 
<QP
 
The appropriate expressions for the two boxes B1 and B2 are >QP
 
(A) $B1: (1+height(n  right)) B2: (1+max(h1, h2))
 
(B) $B1: (height(n  right)) B2: (1+max(h1,h2))$
 
(C) $B1: height(n  right) B2: max(h1, h2) $
 
(D) $B1: (1+ height(n  right)) B2: max(h1, h2)$
 
 
 
<9 <b> Common Data Questions
 
 
<QP
 
Common Data for Questions 48
 
and 49:</b>
 
Consider the following C code segment.
 
>QP
 
<pre><code>
 
int a, b, c = 0; void
 
prtFun(void); main(
 
)
 
{ static int a = 1;
 
/* Line 1 */
 
prtFun( ); a
 
+= 1;
 
prtFun( );
 
printf(“ \n %d %d ”, a, b);
 
}
 
void prtFun(void)
 
{ static int a = 2;
 
int b = 1;
 
/* Line 2 */a += ++b;
 
printf(“ \n %d %d ”, a, b);
 
}
 
</code></pre>
 
?>
 
 
Q.48 What output will be generated by the given code segment?
 
(A)
 
<IMG>
 
</IMG>
 
(B)
 
<IMG>
 
</IMG>
 
(C)
 
<IMG>
 
</IMG>
 
(D)
 
<IMG>
 
</IMG>
 
 
 
Q.49 What output will be generated by the given code segment if:
 
 
<QP
 
Line 1 is replaced by <b> auto int a = 1;</b>
 
Line 2 is replaced by <b> register int a = 2;</b> >QP
 
(A)
 
<IMG>
 
</IMG>
 
(B)
 
<IMG>
 
</IMG>
 
(C)
 
<IMG>
 
</IMG>
 
(D)
 
<IMG></IMG>
 
 
 
<9<b> Common Data for Questions 50 and 51:</b>
 
 
<QP
 
Consider the following relations A, B and C: >QP
 
(A)
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b>Id</b></th>
 
<th colspan="1"><b>Name</b></th>
 
<th colspan="1"><b>Age</b></th>
 
</tr>
 
<tr>
 
<td>12</td>
 
<td>Arun</td>
 
<td>60</td>
 
</tr>
 
<tr>
 
<td>15</td>
 
<td>Shreya</td>
 
<td>24</td>
 
</tr>
 
<tr>
 
<td>99</td>
 
<td>Rohit</td>
 
<td>11</td>
 
</tr>
 
<tr>
 
(B)
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b>Id</b></th>
 
<th colspan="1"><b>Name</b></th>
 
<th colspan="1"><b>Age</b></th>
 
</tr>
 
<tr>
 
<td>15</td>
 
<td>Shreya</td>
 
<td>24</td>
 
</tr>
 
<tr>
 
<td>25</td>
 
<td>Hari</td>
 
<td>40</td>
 
</tr>
 
<tr>
 
<td>98</td>
 
<td>Rohit</td>
 
<td>20</td></tr>
 
<tr>
 
<td>99</td>
 
<td>Rohit</td>
 
<td>11</td>
 
</tr>
 
<tr>
 
(C)
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b>Id</b></th>
 
<th colspan="1"><b>Phone</b></th>
 
<th colspan="1"><b>Area</b></th>
 
</tr>
 
<tr>
 
<td>10</td>
 
<td>2200</td>
 
<td>02</td>
 
</tr>
 
<tr>
 
<td>99</td>
 
<td>2100</td>
 
<td>01</td>
 
</tr>
 
?>
 
 
Q.50
 
How many tuples does the result of the following relational algebra expression contain? Assume
 
that the schema of $A\bigcup B$ is the same as that of $A$.
 
 
<QP
 
$(A\bigcup B)\bowtie _{A.Id> 40 v C.Id < 15} C$
 
>QP
 
(A) 7
 
(B) 4
 
(C) 5
 
(D) 9
 
 
 
Q.51
 
How many tuples does the result of the following SQL query contain?
 
 
<QP
 
SELECT A.Id
 
FROM A
 
WHERE A.Age > ALL (SELECT B.Age
 
FROM B
 
WHERE B.Name = ‘Arun’) >QP
 
(A) 4
 
(B) 3
 
(C) 0
 
(D) 1
 
 
<9 <b>Linked Answer Questions
 
Statement for Linked Answer Questions 52 and 53:</b>?
 
 
 
<QP
 
For the grammar below, a partial $LL(1)$ parsing table is also presented along with the grammar. Entries
 
that need to be filled are indicated as <b>E1</b>, <b>E2</b>, and <b>E3</b>. $\varepsilon$ is the empty
 
string, $ indicates end of input, and, $\mid$ separates alternate right hand sides of productions.
 
>QP
 
$S\rightarrow a A b B \mid b A a B \mid \varepsilon$
 
$A\rightarrow S$
 
$B\rightarrow S$
 
<table border="1" align="center" cellpadding="15">
 
<tr>
 
<th colspan="1"><b></b></th>
 
<th colspan="1"><b>a</b></th>
 
<th colspan="1"><b>b</b></th>
 
<th colspan="1"><b>$</b></th>
 
</tr>
 
<tr>
 
<td>S</td>
 
<td><b>E1</b></td>
 
<td><b>E2</b></td>
 
<td><b>S\rightarrow \varepsilon </b></td>
 
</tr>
 
<tr>
 
<td>A</td>
 
<td> A\rightarrow S</td>
 
<td> A\rightarrow S</td>
 
<td>error</td>
 
</tr>
 
<tr>
 
<td>B</td>
 
<td> B\rightarrow S</td>
 
<td> B\rightarrow S</td>
 
<td><b>E3</b></td>
 
</tr>
 
?>
 
 
Q.52
 
The FIRST and FOLLOW sets for the non-terminals A and B are
 
(A) $FIRST(A) = {a, b, \varepsilon } = FIRST(B)$
 
$FOLLOW(A) = {a, b}$
 
$FOLLOW(B) = {a, b, $}$
 
(B) $FIRST(A) = {a, b, $}$
 
$FIRST(B) = {a, b, \varepsilon}$
 
$FOLLOW(A) = {a, b}$
 
$FOLLOW(B) = {$}$
 
(C) $FIRST(A) = {a, b, \varepsilon} = FIRST(B)$
 
$FOLLOW(A) = {a, b}$
 
$FOLLOW(B) = \varnothing$
 
(D) $FIRST(A) = {a, b} = FIRST(B)$
 
$FOLLOW(A) = {a, b}$
 
$FOLLOW(B) = {a, b}$
 
 
 
Q.53 The appropriate entries for $E1$, $E2$, and $E3$ are
 
(A) $ E1:S\rightarrow aAbB, A\rightarrow S$
 
$ E2:S\rightarrow bAaB, B\rightarrow S $
 
$E1: B\rightarrow S$
 
(B) $ E1:S\rightarrow aAbB, S\rightarrow \varepsilon$
 
$E2:S \rightarrow bAaB, S\rightarrow \varepsilon$
 
$E3:S\rightarrow \varepsilon$
 
(C) $ E1:S\rightarrow aAbB, S\rightarrow \varepsilon$
 
$ E2:S\rightarrow bAaB, S\rightarrow \varepsilon$
 
$ E3: B\rightarrow S$
 
(D) $ E1:A\rightarrow S,S\rightarrow \varepsilon$
 
$ E2:B\rightarrow S,S\rightarrow \varepsilon$
 
$ E3:B\rightarrow S$
 
 
<0 <b>Statement for Linked Answer Questions 54 and 55:</b>
 
 
<9
 
 
<QP
 
A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The
 
processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in
 
addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.>QP
 
?>
 
 
Q.54 The number of bits in the tag field of an address is
 
(A) 11
 
(B) 14
 
(C) 16
 
(D) 27
 
 
 
Q.55 The size of the cache tag directory is
 
(A) 160 Kbits
 
(B) 136 Kbits
 
(C) 40 Kbits
 
(D) 32 Kbits
 
<b>General Aptitude (GA) Questions
 
 
 
<0 <b> Q. 56 – Q. 60 carry one mark each. </b>
 
 
 
Q.56 The cost function for a product in a firm is given by $5q^{2}$, where $q$ is the amount of production.
 
The firm can sell the product at a market price of <IMG> </IMG> 50 per unit. The number of units to
 
be produced by the firm such that the profit is maximized is
 
(A) 5
 
(B) 10
 
(C) 15
 
(D) 25
 
 
 
Q.57 Choose the most appropriate alternative from the options given below to complete the following sentence:
 
 
<QP
 
<b> Despite several ––––––––– the mission succeeded in its attempt to resolve the conflict. </b> >QP
 
(A) attempts
 
(B) setbacks
 
(C) meetings
 
(D) delegations
 
 
 
Q.58 Which one of the following options is the closest in meaning to the word given below?
 
 
<QP
 
<b> Mitigate </b> >QP
 
(A) Diminish
 
(B) Divulge
 
(C) Dedicate
 
(D) Denote
 
 
 
Q.59 Choose the grammatically <b> INCORRECT</b> sentence:
 
(A) They gave us the money back less the service charges of Three Hundred rupees.
 
(B) This country’s expenditure is not less than that of Bangladesh.
 
(C) The committee initially asked for a funding of Fifty Lakh rupees, but later settled for a lesser sum.
 
(D) This country’s expenditure on educational reforms is very less.
 
 
 
Q.60 Choose the most appropriate alternative from the options given below to complete the following sentence:
 
 
<QP
 
<b>Suresh’s dog is the one ––––––––– was hurt in the stampede. </b>
 
>QP
 
(A) that
 
(B) which
 
(C) who
 
(D) whom
 
<b>
 
 
<0 Q. 61 - Q. 65 carry two marks each. </b>
 
 
 
Q.61 <b> Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal
 
interviews to collect and collate economic data. Requirements: High School-pass, must be available for
 
Day, Evening and Saturday work. Transportation paid, expenses reimbursed. </b>
 
 
<QP
 
Which one of the following is the best inference from the above advertisement? >QP
 
(A) Gender-discriminatory
 
(B) Xenophobic
 
(C) Not designed to make the post attractive
 
(D) Not gender-discriminatory
 
 
 
Q.62 A political party orders an arch for the entrance to the ground in which the annual convention is being
 
held. The profile of the arch follows the equation $y=2x-0.1x^{2}$ where $y$ is the height of the arch in
 
meters. The maximum possible height of the arch is
 
(A) 8 meters
 
(B) 10 meters
 
(C) 12 meters
 
(D) 14 meters
 
 
 
Q.63 An automobile plant contracted to buy shock absorbers from two suppliers $ X$ and $ Y$ . $ X$
 
supplies 60% and Y supplies 40% of the shock absorbers. All shock absorbers are subjected to a quality test. The
 
ones that pass the quality test are considered reliable. Of $ X’s$ shock absorbers, 96% are reliable. Of $ Y’s$
 
shock absorbers, 72% are reliable.
 
 
<QP
 
The probability that a randomly chosen shock absorber, which is found to be reliable, is made by Y is
 
>QP
 
(A) 0.288
 
(B) 0.334
 
(C) 0.667
 
(D) 0.720
 
 
 
Q.64 Which of the following assertions are <b>CORRECT</b>?
 
 
<QP
 
P: Adding 7 to each entry in a list adds 7 to the mean of the list
 
Q: Adding 7 to each entry in a list adds 7 to the standard deviation of the list
 
R: Doubling each entry in a list doubles the mean of the list
 
S: Doubling each entry in a list leaves the standard deviation of the list unchanged
 
>QP
 
(A) P, Q
 
(B) Q, R
 
(C) P, R
 
(D) R, S
 
 
 
Q.65 Given the sequence of terms, AD CG FK JP, the next term is
 
(A) OV
 
(B) OW
 
(C) PV
 
(D) PW
 
 
  
<0 END OF THE QUESTION PAPER
+
===Verbal Ability===
</quiz>
+
<div>
 +
<ul>
 +
<li>English grammar, sentence completion </li>
 +
<li> Verbal analogies, word groups </li>
 +
<li> Instructions, critical reasoning and verbal deduction </li>
 +
</ul></div>

Latest revision as of 10:44, 10 October 2014

Algorithms & Data Structures

Algorithms:

  • Analysis, Asymptotic notation, Notions of space and time complexity, Worst and average case analysis;
  • Design: Greedy approach, Dynamic programming, Divide-and-conquer;
  • Tree and graph traversals, Connected components, Spanning trees, Shortest paths;
  • Hashing, Sorting, Searching.
  • Asymptotic analysis (best, worst, average cases) of time and space, upper and lower bounds, Basic concepts of complexity classes – P, NP, NP-hard, NP-complete.

Data Structures:

  • Abstract data types, Arrays, Stacks, Queues
  • Linked Lists
  • Trees, Binary search trees, Binary heaps.

Course Videos

Description

Algorithms

Shai Simonson, Aduni.org

Aduni.org: before you do any other thing, the first thing to do is watch these videos, you won’t believe how awesome Shai is.
Introduction to Algorithms

Leiserson, OCW.MIT

One of the lecturers is C. Leiserson, The “L” in CLRS..
Introduction to Data Structures & Algorithms

NPTEL

Coursera Course

Kevin Wayne, Robert Sedgewick, Princeton University

Course and slides



Databases

  • ER-model, Relational model (relational algebra, tuple calculus)
  • Database design (integrity constraints, normal forms)
  • Query languages (SQL)
  • File structures (sequential files, indexing, B and B+ trees)
  • Transactions and concurrency control

Course Videos

Description

DBMS NPTEL PPC - IIT KGP

NPTEL

IIT KGP PPC DBMS lecture is good one
CS145 Introduction to Databases

Stanford

Course and slides for DBMS



Compiler Design

  • Lexical analysis, Parsing
  • Syntax directed translation, Runtime environments
  • Intermediate and target code generation, Basics of code optimization.

Course Videos

Description

CS143 Compilers

Stanford

Best notes and assignment for Compiler Course, no video
Compilers Stanford

Alex Aiken, Coursera

Comprehensive



Operating Systems

  • Processes, Threads, Inter-process communication
  • Concurrency, Synchronization
  • Deadlock
  • CPU scheduling
  • Memory management and virtual memory
  • File systems, I/O systems, Protection and security.

Course Videos

Description

Operating Systems

P.K.Biswas

Enough for GATE
Computer Science 162 - Lecture 1

UCBerkeley



Theory of Computation

  • Regular languages and finite automata
  • Context free languages and Push-down automata
  • Recursively enumerable sets and Turing machines
  • Undecidability.

Course Videos

Description

Theory of Computation

Shai Simonson, Aduni.org

If you have not seen these videos, don’t do anything go and see the videos immediately, no excuses.



CO & Architecture

  • Machine instructions and addressing modes
  • ALU and data-path, CPU control design
  • Memory interface, I/O interface (Interrupt and DMA mode)
  • Instruction pipelining
  • Cache and main memory, Secondary storage.

Course Videos

Description

Computer Architecture

Prof. Anshul Kumar, IIT Delhi, NPTEL

Computer Organization

Prof. S. Raman, IIT Madras, NPTEL

Computer Architecture

David Wentzlaff, Princeton University, Coursera

Full Course



Computer Networks

  • ISO/OSI stack, LAN technologies (Ethernet, Token ring)
  • Flow and error control techniques, Routing algorithms, Congestion control
  • TCP/UDP and sockets, IP(v4), Application layer protocols (icmp, dns, smtp, pop, ftp, http)
  • Basic concepts of hubs, switches, gateways, and routers
  • Network security – basic concepts of public key and private key cryptography, digital signature, firewalls

Course Videos

Description

Computer Networks

NPTEL

Introduction to Computer Networks

Jain, WUSTL



Programming

  • Programming in C
  • Functions, Recursion
  • Parameter passing, Scope, Binding

Course Videos

Description

Programming Paradigms

Jerry Cain, Stanford

Doesn't cover the entire GATE syllabus in programming but useful
Computer Science 61B - Fall 2006

UCBerkeley

For Data structures



Digital Logic

  • Logic functions, Minimization
  • Design and synthesis of combinational and sequential circuits
  • Number representation and computer arithmetic (fixed and floating point)

Course Videos

Description

Introduction to Digital Circuits

Prof. S. Srinivasan, IIT Madras, NPTEL



Information Systems and Software Engineering

  • Information gathering, requirement and feasibility analysis data flow diagrams
  • Process specifications, input/output design, process life cycle
  • Planning and managing the project, design, coding
  • Testing, implementation, maintenance.

Course Videos

Description

Introduction to Software Engineering Challenges

IIT Bombay, NPTEL



Web technologies

  • HTML, XML
  • Basic concepts of client-server computing

Course Videos

Description

Web Technologies Basics

Telerik Academy

This presentation is enough for GATE.


Engineering Mathematics

Combinatory & Probability

Combinatory

  • Permutations, Combinations
  • Counting, Summation
  • Generating functions, recurrence relations, asymptotics

Probability

  • Conditional Probability
  • Mean, Median, Mode and Standard Deviation
  • Random Variables
  • Distributions; uniform, normal, exponential, Poisson, Binomial.

Course Videos

Description

Sets, Counting, and Probability

Harvard

Covers the basics
Applied Probability

MIT

Advanced course and topics are mostly above GATE syllabus.


Mathematical Logic, Set Theory & Algebra

Mathematical Logic

  • Propositional Logic
  • First Order Logic


Set Theory & Algebra

  • Sets, Relations, Functions
  • Groups
  • Partial Orders, Lattice
  • Boolean Algebra

Course Videos

Description

Discrete Mathematical Structures

Prof. Kamala Krithivasan, IIT Madras, NPTEL

Covers Mathematical logic, Set Theory and Algebra syllabus from GATE completely

Graph Theory

  • Connectivity, spanning trees
  • Cut vertices & edges
  • Covering, matching, independent sets
  • Colouring, Planarity, Isomorphism

Course Videos

Description

Graph Theory

NPTEL

Advanced course, just take what you need from GATE syllabus


Linear Algebra

  • Algebra of matrices, determinants
  • Systems of linear equations
  • Eigen values and Eigen vectors

Course Videos

Description

Linear Algebra

Gilbert Strang, OCW.MIT

Straight from the master


Numerical Methods & Calculus

Numerical Methods

  • LU decomposition for systems of linear equations
  • Numerical solutions of non-linear algebraic equations by Secant, Bisection and Newton-Raphson Methods
  • Numerical integration by trapezoidal and Simpson’s rules

Calculus

  • Limit, Continuity & differentiability
  • Mean value theorems
  • Theorems of integral calculus, evaluation of definite & improper integrals
  • Partial derivatives, Total derivatives, maxima & minima

Course Videos

Description

Single Variable Calculus

David Jerison, OCW.MIT

Very good videos


General Aptitude

Numerical Ability

  • Numerical computation
  • Numerical estimation
  • Numerical reasoning and data interpretation


Verbal Ability

  • English grammar, sentence completion
  • Verbal analogies, word groups
  • Instructions, critical reasoning and verbal deduction

<quiz> {Question |type="()"}


Q.1 Consider the following logical inferences.

<QP $I_{1}$: If it rains then the cricket match will not be played. The cricket match was played. Inference: There was no rain. $I_{2}$: If it rains then the cricket match will not be played. It did not rain. Inference: The cricket match was played. >QP

Which of the following is TRUE?

(A) Both $I_{1}$ and $I_{2}$ are correct inferences (B) $I_{1}$ is correct but $I_{2}$ is not a correct inference (C) $I_{1}$ is not correct but $I_{2}$ is a correct inference (D) Both $I_{1}$ and $I_{2}$ are not correct inferences


Q.2 Which of the following is TRUE? (A) Every relation in 3NF is also in BCNF (B) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on every key of R (C) Every relation in BCNF is also in 3NF (D) No relation can be in both BCNF and 3NF


Q.3 What will be the output of the following C program segment?

<code
class="language-c">
char inChar = ‘A’ ;
switch ( inChar ) {
case ‘A’ : printf (“Choice A\ n”) ;
case ‘B’ :
case ‘C’ : printf (“Choice B”) ;
case ‘D’ :
case ‘E’ :
default : printf ( “ No Choice” ) ; }
</code>

(A) No Choice (B) Choice A (C) Choice A Choice B No Choice (D) Program gives no output as it is erroneous


Q.4 Assuming P ≠ NP, which of the following is TRUE? (A) NP-complete = NP (B) $NP-complete \cap p P = \phi $ (C) NP-hard = NP (D) P = NP-complete


Q.5 The worst case running time to search for an element in a balanced binary search tree with ($n2^{n}$) elements is (A) $\theta(n log n)$ (B) $\theta(n2^2)$ (C) $\theta(n)$ (D) $\theta(log n)$


Q.6 The truth table

represents the Boolean function (A)$ X$ (B) $X + Y$ (C) $X \oplus Y$ (D) $Y$ Q.7 The decimal value $0.5$ in IEEE single precision floating point representation has (A) fraction bits of 000...000 and exponent value of 0 (B) fraction bits of 000...000 and exponent value of −1 (C) fraction bits of 100...000 and exponent value of 0 (D) no exact representation Q.8 A process executes the code
<code
class="language-c">
fork();
fork();
fork();
</code
>

The total number of child processes created is (A) 3 (B) 4 (C) 7 (D) 8


Q.9 Consider the function $f(x) = sin(x)$ in the interval $x ∈ [π/4, 7π/4]$. The number and location(s) of the local minima of this function are (A) One, at $π/2$ (B) One, at $3π/2$ (C) Two, at $π/2$ and $3π/2$ (D) Two, at $π/4$ and $3π/2$


Q.10 The protocol data unit (PDU) for the application layer in the Internet stack is (A) Segment (B) Datagram (C) Message (D) Frame


Q.11 Let A be the $2 × 2$ matrix with elements $a_{11}= a_{12} = a_{21} = +1$ and $a_{22} = −1. $ Then the eigenvalues of the matrix $A^{19}$ are (A) $1024$ and $−1024$ (B) $1024\sqrt{2}$ and $−1024 \sqrt{2}$ (C) $4 \sqrt{2}$ and $−4 \sqrt{2}$ (D) $512 \sqrt{2}$ and $−512 \sqrt{2}$


Q.12 What is the complement of the language accepted by the NFA shown below?

<QP Assume $Σ = {a}$ and $ε$ is the empty string.>QP <IMG a ε ε >IMG (A) $∅$ (B) ${ε}$ (C) $a_{*}$ (D) ${a , ε}$


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

<QP “Some real numbers are rational”>QP (A)$ ∃x (real(x) ∨ rational(x))$ (B) $∀x (real(x) → rational(x))$ (C) $∃x (real(x) ∧ rational(x))$ (D) $∃x (rational(x) → real(x))$


Q.14 Given the basic ER and relational models, which of the following is INCORRECT? (A) An attribute of an entity can have more than one value (B) An attribute of an entity can be composite (C) In a row of a relational table, an attribute can have more than one value (D) In a row of a relational table, an attribute can have exactly one value or a NULL value


Q.15 Which of the following statements are TRUE about an SQL query?

<QP P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause Q : An SQL query can contain a HAVING clause only if it has a GROUP BY clause R : All attributes used in the GROUP BY clause must appear in the SELECT clause S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause >QP (A) P and R (B) P and S (C) Q and R (D) Q and S


Q.16 The recurrence relation capturing the optimal execution time of the $Towers of Hanoi$ problem with $n$ discs is (A) $T(n) = 2T(n − 2) + 2$ (B) $T(n) = 2T(n − 1) + n$ (C) $T(n) = 2T(n/2) + 1$ (D) $T(n) = 2T(n − 1) + 1$


Q.17 Let $G$ be a simple undirected planar graph on $10$ vertices with $15$ edges. If $G$ is a connected graph, then the number of bounded faces in any embedding of $G$ on the plane is equal to (A) 3 (B) 4 (C) 5 (D) 6


Q.18 Let $ W(n) $ and $ A(n)$ denote respectively, the worst case and average case running time of an algorithm executed on an input of size $ n$ . Which of the following is ALWAYS TRUE? (A) $A(n) = \Omega (W(n))$ (B) $A(n) = \theta (W(n))$ (C) $A(n) = O (W(n))$ (D) $A(n) = o (W(n))$


Q.19 The amount of ROM needed to implement a 4 bit multiplier is (A) 64 bits (B) 128 bits (C) 1 Kbits (D) 2 Kbits


Q.20 Register renaming is done in pipelined processors (A) as an alternative to register allocation at compile time (B) for efficient access to function parameters and local variables (C) to handle certain kinds of hazards (D) as part of address translation


Q.21 Consider a random variable $X$ that takes values $+1$ and $−1$ with probability $0.5$ each. The values of the cumulative distribution function $F(x)$ at $x = −1$ and $+1$ are (A) $0 and 0.5$ (B) $0 and 1$ (C) $0.5 and 1$ (D) $0.25 and 0.75


Q.22 Which of the following transport layer protocols is used to support electronic mail? (A) SMTP (B) IP (C) TCP (D) UDP


Q.23 In the IPv4 addressing format, the number of networks allowed under Class C addresses is (A) $2^{14}$ (B) $2^{7}$ (C) $2^{21}$ (D) $2^{24}$


Q.24

Which of the following problems are decidable?

<QP 1) Does a given program ever produce an output? 2) If $L$ is a context-free language, then, is $\bar{L}$ also context-free? 3) If $L$ is a regular language, then, $\bar{L}$ is also regular? 4) If $L$ is a recursive language, then, is $\bar{L}$also recursive? >QP (A) 1, 2, 3, 4 (B) 1, 2 (C) 2, 3, 4 (D) 3, 4


Q.25 Given the language $L = {ab, aa, baa}$, which of the following strings are in $L^{*}$?

<QP 1) $ abaabaaabaa$ 2) $ aaaabaaaa$ 3) $ baaaaabaaaab$ 4) $ baaaaabaa$ >QP (A) 1, 2 and 3 (B) 2, 3 and 4 (C) 1, 2 and 4 (D) 1, 3 and 4


<0 Q.26 to Q.55 carry two marks each.


Q.26 Which of the following graphs is isomorphic to <IMG >IMG (A) <IMG >IMG (B) <IMG >IMG (C) <IMG >IMG (D) <IMG >IMG


Q.27 Consider the following transactions with data items P and Q initialized to zero:

 <code class="language-c">
<b>T1</b> :read (P);
read (Q);
if P = 0 then Q := Q + 1 ;
write (Q).
<b>T2</b>: read (Q);
read (P);
if Q = 0 then P := P + 1 ;
write (P).
</code>

<QP Any non-serial interleaving of T1 and T2 for concurrent execution leads to >QP (A) a serializable schedule (B) a schedule that is not conflict serializable (C) a conflict serializable schedule (D) a schedule for which a precedence graph cannot be drawn


Q.28 The bisection method is applied to compute a zero of the function $f(x) =x ^{4} – x ^{3} – x ^{2} – 4$ in the interval [1,9]. The method converges to a solution after ––––– iterations. (A) 1 (B) 3 (C) 5 (D) 7


Q.29 Let G be a weighted graph with edge weights greater than one and $G′$ be the graph constructed by squaring the weights of edges in $G$. Let $T$ and $T′$ be the minimum spanning trees of $G$ and $G′$, respectively, with total weights $t$ and $t′$. Which of the following statements is TRUE? (A) $T′ = T$ with total weight $t' = t^2$ (B) $T′ = T$ with total weight $t'< t^2$ (C) $T′ ≠ T$ but total weight $t' = t$ (D) None of the above


Q.30 What is the minimal form of the Karnaugh map shown below? Assume that X denotes a don’t care term <IMG (A) $\bar{b} \bar{d}$ (B) $ \ b a r { b } \ b a r { d } + \ b a r { b } \ b a r { c } $ (C) $ \bar{b} \bar{d} + \bar{a} \bar{b} \bar{c} \bar{d}$ (D) $ \bar{b} \bar{d} + \bar{b} \bar{c} + \bar{c} \bar{d} $


Q.31 Consider the 3 processes, $P1,$ $P2$ and $P3$ shown in the table.

X Y (X,Y)
$0$ $0$ $0$
$0$ $1$ $0$
$1$ $0$ $1$
$1$ $1$ $1$
<QP The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are >QP (A) $FCFS: P1, P2, P3 (B) $FCFS: P1, P3, P2 (C) $FCFS: P1, P2, P3 (D) $FCFS: P1, P3, P2 RR2: P1, P2, P3$ RR2: P1, P3, P2$ RR2: P1, P3, P2$ RR2: P1, P2, P3$ Q.32 $ Fetch_And_Add(X,i)$ is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available.
 <code class="language-c">
AcquireLock(L){
while (Fetch_And_Add(L,1)) L
= 1;
}
ReleaseLock(L)
{ L = 0;
}
</code>

<QP This implementation >QP (A) fails as L can overflow (B) fails as L can take on a non-zero value when the lock is actually available (C) works correctly but may starve some processes (D) works correctly without starvation


Q.33 Suppose a fair six-sided die is rolled once. If the value on the die is 1, 2, or 3, the die is rolled a second time. What is the probability that the sum total of values that turn up is at least 6? (A) $10/21$ (B) $5/12$ (C) $2/3$ (D) $1/6$


Q.34 An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: $245.248.128.0/20$. The ISP wants to give half of this chunk of addresses to Organization $A$, and a quarter to Organization $B$, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to $A$ and $B$? (A) $245.248.136.0/21 and 245.248.128.0/22$ (B) $245.248.128.0/21 and 245.248.128.0/22$ (C) $245.248.132.0/22 and 245.248.132.0/21$ (D) $245.248.136.0/24 and 245.248.132.0/21$


Q.35 Suppose a circular queue of capacity $(n −1)$ elements is implemented with an array of $n$ elements.

Assume that the insertion and deletion operations are carried out using $REAR$ and

$FRONT$ as array index variables, respectively. Initially, $REAR = FRONT = 0$. The conditions to detect $queue full$ and $queue empty$ are (A) $full: (REAR+1) mod n == FRONT$ $empty: REAR == FRONT$ (B) $full: (REAR+1) mod n == FRONT$ $empty: (FRONT+1) mod n == REAR$ (C) $full: REAR == FRONT$ $empty: (REAR+1) mod n == FRONT$ (D) full: (FRONT+1) mod n == REAR $empty: REAR == FRONT$


Q.36 Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.

<code class="language-c">
Program
main; Var ...
Procedure A1;
Var ... Call
A2;
End A1
Procedure A2;
Var ...
Procedure A21;
Var ...
Call A1;
End A21
Call A21;
End A2
Call A1;
End main.
</code>

<QP Consider the calling chain: Main  A1  A2  A21  A1 The correct set of activation records along with their access links is given by >QP (A) <IMG> Main A1 A2 A21 FRAME POINTER </IMG> (B) A1 ACCESS LINKS<IMG> Main A1 A2 A21 FRAME POINTER A1 ACCESS LINKS </IMG> (C) <IMG> Main FRAME POINTER A1 A2 A21 ACCESS LINKS </IMG> (D) <IMG> Main A1 A2 A21 FRAME POINTER A1 ACCESS LINKS </IMG>


Q.37 How many onto (or surjective) functions are there from an $n-element (n ≥ 2)$ set to a $2-element$ set? (A) $ 2^{n}$ (B) $2^{n} – 1$ (C) $2^{n} – 2$ (D) $2($2^{n} – 2)$



Q.38 Let $G$ be a complete undirected graph on $6$ vertices. If vertices of $G$ are labeled, then the number of distinct cycles of length $4$ in $G$ is equal to (A) 15 (B) 30 (C) 90 (D) 360


Q.39 A list of $n$ strings, each of length $n$, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is (A) $O (n log n) $ (B) $O (n^{2} log n) $ (C) $O (n^{2} + log n) $ (D) $O (n^{2}) $


Q.40 Consider the directed graph shown in the figure below. There are multiple shortest paths between vertices $S$ and $T$. Which one will be reported by Dijkstra’s shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex $v$ is updated only when a strictly shorter path to $v$ is discovered.<IMG> </IMG> (A) SDT (B) SBDT (C) SACDT (D) SACET


Q.41 A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is (A) 3 KBytes (B) 35 KBytes (C) 280 KBytes (D) dependent on the size of the disk


Q.42 Consider the virtual page reference string

<QP 1, 2, 3, 2, 4, 1, 3, 2, 4, 1 on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then >QP (A) $OPTIMAL < LRU < FIFO$ (B) $OPTIMAL < FIFO < LRU$ (C) $OPTIMAL = LRU$ (D) $OPTIMAL = FIFO$


Q.43 Suppose $R_{1} (A, B)$ and $R_{2} (C, D) $ are two relation schemas. Let $r_{1}$ and $r_{2}$ be the corresponding relation instances. $B$ is a foreign key that refers to $C$ in $R_{2}$. If data in $r_{1}$ and $r_{2}$ satisfy referential integrity constraints, which of the following is ALWAYS TRUE? (A) $\prod_{B}(r_{1})- \prod _{C}r_{2}= \prod _{C}r_{2} = \varnothing$ (B) $\prod_{c}(r_{2})- \prod _{B}r_{1}= \varnothing$ (C) $\prod_{B}(r_{1}) = \prod _{c}r_{2}$ (D) $\prod_{B}(r_{1}) = \prod _{c}r_{2} \neq \varnothing$


Q.44 Consider a source computer $ (S)$ transmitting a file of size $10^{6}$ bits to a destination computer $ (D)4 over a network of two routers $(R_{1} and R_{2})$ and three links $(L_{1},L_{2}, and L_{3})$. $L_{1}$ connects $S$ to $R_{1}$; $L_{2}$ connects $R_{1}$ to $R_{2}$; and $L_{3}$ connects $R_{2}$ to $D$. Let each link be of length 100 km. Assume signals travel over each link at a speed of $10^{8}$ meters per second. Assume that the link bandwidth on each link is 1Mbps. Let the file be broken down into 1000 packets each of size 1000 bits. Find the total sum of transmission and propagation delays in transmitting the file from S to D? (A) 1005 ms (B) 1010 ms (C) 3000 ms (D) 3003 ms


Q.45 Consider an instance of TCP’s Additive Increase Multiplicative Decrease (AIMD) algorithm where the window size at the start of the slow start phase is 2 MSS and the threshold at the start of the first transmission is 8 MSS. Assume that a timeout occurs during the fifth transmission. Find the congestion window size at the end of the tenth transmission. (A) 8 MSS (B) 14 MSS (C) 7 MSS (D) 12 MSS


Q.46 Consider the set of strings on ${0,1}$ in which, $every substring of 3 symbols$ has at most $two$ zeros.

<QP For example, 001110 and 011001 are in the language, but 100010 is not. All strings of length less than 3 are also in the language. A partially completed DFA that accepts this language is shown below. >QP <IMG> </IMG>

<QP The missing arcs in the DFA are >QP (A)

Process Arrival time Time Units Required
$ P1$ $0$ $5$
$ P2$ $1$ $7$
$ P3$ $3$ $4$
(B)
00 01 10 11q
$00$ $1$ $0$
$01$ $1$
$10$ $0$
$11$ $0$
(C)
00 01 10 11 q
$00$ $0$ $1$
$01$ $1$
$10$ $0$
$11$ $0$
(D)
00 01 10 11 q
$00$ $1$ $0$
$01$ $1$
$10$ $0$
$11$ $0$
Q.47 The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height(root) to compute the height of a binary tree rooted at the tree pointer root.
<code>
int height (treeptr n)
{ if (n == NULL) return -1;
if (n  left == NULL)
if (n  right == NULL) return 0;
else return B1
;
// Box 1
else { h1 = height (n  left);
if (n  right == NULL) return (1+h1);
else { h2 = height (n  right);
return
B2
;
// Box 2
}
}
}
</code>

<QP The appropriate expressions for the two boxes B1 and B2 are >QP (A) $B1: (1+height(n  right)) B2: (1+max(h1, h2)) (B) $B1: (height(n  right)) B2: (1+max(h1,h2))$ (C) $B1: height(n  right) B2: max(h1, h2) $ (D) $B1: (1+ height(n  right)) B2: max(h1, h2)$


<9 Common Data Questions

<QP Common Data for Questions 48 and 49: Consider the following C code segment. >QP

<code>
int a, b, c = 0; void
prtFun(void); main(
)
{ static int a = 1;
/* Line 1 */
prtFun( ); a
+= 1;
prtFun( );
printf(“ \n %d %d ”, a, b);
}
void prtFun(void)
{ static int a = 2;
int b = 1;
/* Line 2 */a += ++b;
printf(“ \n %d %d ”, a, b);
}
</code>

?>

Q.48 What output will be generated by the given code segment? (A) <IMG> </IMG> (B) <IMG> </IMG> (C) <IMG> </IMG> (D) <IMG> </IMG>


Q.49 What output will be generated by the given code segment if:

<QP Line 1 is replaced by auto int a = 1; Line 2 is replaced by register int a = 2; >QP (A) <IMG> </IMG> (B) <IMG> </IMG> (C) <IMG> </IMG> (D) <IMG></IMG>


<9 Common Data for Questions 50 and 51:

<QP Consider the following relations A, B and C: >QP (A)

00 01 10 11 q
$00$ $1$ $0$
$01$ $1$
$10$ $0$
$11$ $0$
(B)
Id Name Age
12 Arun 60
15 Shreya 24
99 Rohit 11
(C)
Id Name Age
15 Shreya 24
25 Hari 40
98 Rohit 20
99 Rohit 11
?> Q.50 How many tuples does the result of the following relational algebra expression contain? Assume that the schema of $A\bigcup B$ is the same as that of $A$. <QP $(A\bigcup B)\bowtie _{A.Id> 40 v C.Id < 15} C$ >QP (A) 7 (B) 4 (C) 5 (D) 9 Q.51 How many tuples does the result of the following SQL query contain? <QP SELECT A.Id FROM A WHERE A.Age > ALL (SELECT B.Age FROM B WHERE B.Name = ‘Arun’) >QP (A) 4 (B) 3 (C) 0 (D) 1 <9 Linked Answer Questions Statement for Linked Answer Questions 52 and 53:? <QP For the grammar below, a partial $LL(1)$ parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1, E2, and E3. $\varepsilon$ is the empty string, $ indicates end of input, and, $\mid$ separates alternate right hand sides of productions. >QP $S\rightarrow a A b B \mid b A a B \mid \varepsilon$ $A\rightarrow S$ $B\rightarrow S$
Id Phone Area
10 2200 02
99 2100 01
?> Q.52 The FIRST and FOLLOW sets for the non-terminals A and B are (A) $FIRST(A) = {a, b, \varepsilon } = FIRST(B)$ $FOLLOW(A) = {a, b}$ $FOLLOW(B) = {a, b, $}$ (B) $FIRST(A) = {a, b, $}$ $FIRST(B) = {a, b, \varepsilon}$ $FOLLOW(A) = {a, b}$ $FOLLOW(B) = {$}$ (C) $FIRST(A) = {a, b, \varepsilon} = FIRST(B)$ $FOLLOW(A) = {a, b}$ $FOLLOW(B) = \varnothing$ (D) $FIRST(A) = {a, b} = FIRST(B)$ $FOLLOW(A) = {a, b}$ $FOLLOW(B) = {a, b}$ Q.53 The appropriate entries for $E1$, $E2$, and $E3$ are (A) $ E1:S\rightarrow aAbB, A\rightarrow S$ $ E2:S\rightarrow bAaB, B\rightarrow S $ $E1: B\rightarrow S$ (B) $ E1:S\rightarrow aAbB, S\rightarrow \varepsilon$ $E2:S \rightarrow bAaB, S\rightarrow \varepsilon$ $E3:S\rightarrow \varepsilon$ (C) $ E1:S\rightarrow aAbB, S\rightarrow \varepsilon$ $ E2:S\rightarrow bAaB, S\rightarrow \varepsilon$ $ E3: B\rightarrow S$ (D) $ E1:A\rightarrow S,S\rightarrow \varepsilon$ $ E2:B\rightarrow S,S\rightarrow \varepsilon$ $ E3:B\rightarrow S$ <0 Statement for Linked Answer Questions 54 and 55: <9 <QP A computer has a 256 KByte, 4-way set associative, write back data cache with block size of 32 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.>QP ?> Q.54 The number of bits in the tag field of an address is (A) 11 (B) 14 (C) 16 (D) 27 Q.55 The size of the cache tag directory is (A) 160 Kbits (B) 136 Kbits (C) 40 Kbits (D) 32 Kbits General Aptitude (GA) Questions <0 <b> Q. 56 – Q. 60 carry one mark each. Q.56 The cost function for a product in a firm is given by $5q^{2}$, where $q$ is the amount of production. The firm can sell the product at a market price of <IMG> </IMG> 50 per unit. The number of units to be produced by the firm such that the profit is maximized is (A) 5 (B) 10 (C) 15 (D) 25 Q.57 Choose the most appropriate alternative from the options given below to complete the following sentence: <QP Despite several ––––––––– the mission succeeded in its attempt to resolve the conflict. >QP (A) attempts (B) setbacks (C) meetings (D) delegations Q.58 Which one of the following options is the closest in meaning to the word given below? <QP Mitigate >QP (A) Diminish (B) Divulge (C) Dedicate (D) Denote Q.59 Choose the grammatically INCORRECT sentence: (A) They gave us the money back less the service charges of Three Hundred rupees. (B) This country’s expenditure is not less than that of Bangladesh. (C) The committee initially asked for a funding of Fifty Lakh rupees, but later settled for a lesser sum. (D) This country’s expenditure on educational reforms is very less. Q.60 Choose the most appropriate alternative from the options given below to complete the following sentence: <QP Suresh’s dog is the one ––––––––– was hurt in the stampede. >QP (A) that (B) which (C) who (D) whom <0 Q. 61 - Q. 65 carry two marks each. Q.61 Wanted Temporary, Part-time persons for the post of Field Interviewer to conduct personal interviews to collect and collate economic data. Requirements: High School-pass, must be available for Day, Evening and Saturday work. Transportation paid, expenses reimbursed. <QP Which one of the following is the best inference from the above advertisement? >QP (A) Gender-discriminatory (B) Xenophobic (C) Not designed to make the post attractive (D) Not gender-discriminatory Q.62 A political party orders an arch for the entrance to the ground in which the annual convention is being held. The profile of the arch follows the equation $y=2x-0.1x^{2}$ where $y$ is the height of the arch in meters. The maximum possible height of the arch is (A) 8 meters (B) 10 meters (C) 12 meters (D) 14 meters Q.63 An automobile plant contracted to buy shock absorbers from two suppliers $ X$ and $ Y$ . $ X$ supplies 60% and Y supplies 40% of the shock absorbers. All shock absorbers are subjected to a quality test. The ones that pass the quality test are considered reliable. Of $ X’s$ shock absorbers, 96% are reliable. Of $ Y’s$ shock absorbers, 72% are reliable. <QP The probability that a randomly chosen shock absorber, which is found to be reliable, is made by Y is >QP (A) 0.288 (B) 0.334 (C) 0.667 (D) 0.720 Q.64 Which of the following assertions are CORRECT? <QP P: Adding 7 to each entry in a list adds 7 to the mean of the list Q: Adding 7 to each entry in a list adds 7 to the standard deviation of the list R: Doubling each entry in a list doubles the mean of the list S: Doubling each entry in a list leaves the standard deviation of the list unchanged >QP (A) P, Q (B) Q, R (C) P, R (D) R, S Q.65 Given the sequence of terms, AD CG FK JP, the next term is (A) OV (B) OW (C) PV (D) PW <0 END OF THE QUESTION PAPER </quiz>
a b $
S E1 E2 S\rightarrow \varepsilon
A A\rightarrow S A\rightarrow S error
B B\rightarrow S B\rightarrow S E3