GATE 2015 (Set-01)

Question 1

Didn’t you buy _________ when you went shopping?

A
any paper
B
much paper
C
no paper
D
a few paper
       Aptitude       Verbal
Question 1 Explanation: 
In negative sentence we can use "any" with plural countable nouns.
Question 2

Which of the following combinations is incorrect?

A
Acquiescence – Submission
B
Wheedle – Roundabout
C
Flippancy – Lightness
D
Profligate – Extravagant
       Aptitude       Verbal
Question 2 Explanation: 
Acceptance = The reluctant acceptance of something without protest
Wheedle = Use endearments (or) flattery to persuade some to do something
Flippancy = Lack of respect (or) seriousness
Profligate = Recklessly extravagant
Question 3

Given set A = {2, 3, 4, 5} and Set B = {11, 12, 13, 14, 15}, two numbers are randomly selected, one from each set. What is probability that the sum of the two numbers equals 16?

A
0.20
B
0.25
C
0.30
D
0.33
       Aptitude       Numerical
Question 3 Explanation: 
Favourable outcomes = {2,14}, {3,13}, {4,12}, {5,11} = 4
Total outcomes = 4C1 × 5C1 = 20
Probability = Favourable outcomes/ Total outcomes = 4/20 = 0.20
Question 4

Which of the following options is the closest in meaning to the sentence below?

She enjoyed herself immensely at the party.

A
She had a terrible time at the party.
B
She had a horrible time at the party.
C
She had a terrific time at the party
D
She had a terrifying time at the party
       Aptitude       Verbal
Question 4 Explanation: 
The options A, B and D means that she didn't enjoy the party.
→ Horrible and terrible means fearful.
→ Terrific = Wonderful
→ So, C is the Answer.
Question 5

Based on the given statements, select the most appropriate option to solve the given question.

If two floors in a certain building are 9 feet apart, how many steps are there in a set of stairs that extends from the first floor to the second floor of the building?

    Statements:
        (I) Each step is 3/4 foot high.
        (II) Each step is 1 foot wide.
 
A
Statement I alone is sufficient, but statement II alone is not sufficient.
B
Statement II alone is sufficient, but statement I alone is not sufficient.
C
Both statements together are sufficient, but neither statement alone is sufficient.
D
Statement I and II together are not sufficient.
       Aptitude       Numerical
Question 5 Explanation: 
When you climbing, only height matters not the width.
Statement I:
Each step is 3/4 foot high.
No. of steps = 9/(3/4) = 12 steps
Statement I alone is sufficient.
Statement II:
Each step is 1 foot wide.
Statement II alone is not sufficient.
Question 6

The pie chart below has the breakup of the number of students from different departments in an engineering college for the year 2012. The proportion of male to female students in each department is 5:4. There are 40 males in Electrical Engineering. What is the difference between numbers of female students in the Civil department and the female students in the Mechanical department?

 
A
32
B
33
C
34
D
35
       Aptitude       Numerical
Question 6 Explanation: 
Male to female students in each department = 5 : 4
There are 40 males in Electrical Engineering.
⇒ Number of females in Electrical Engineering = 4/5 × 40 = 32
Total number of students in Electrical Engineering = 40+32 = 72
This constitutes 20% of the strength of college.
Number of students in Civil department = 30/100 × 72 = 108
Number of female students in Civil department = 4/(4+5) × 108 = 48
Number of students in Mechanical department = 10/20 × 72 = 36
Number of female students in Mechanical department = 4/(4+5) × 36 = 16
Required Difference = 48 - 16 = 32
Question 7

Select the alternative meaning of the underlined part of the sentence.

The chain snatchers took to their heels when the police party arrived.

A
took shelter in a thick jungle
B
open indiscriminate fire
C
took to flight
D
unconditionally surrendered
       Aptitude       Verbal
Question 7 Explanation: 
The words took to their heels and took to flight means that runaway.
Question 8

The probabilities that a student passes in Mathematics, Physics and Chemistry are m, p and c respectively. Of these subjects, the student has 75% chance of passing in at least one, a 50% chance of passing in at least two and a 40% chance of passing in exactly two. Following relations are drawn in m, p, c:

    (I) p + m + c = 27/20
    (II) p + m + c = 13/20
    (III) (p) × (m) × (c) = 1/10
A
Only relation I is true
B
Only relation II is true
C
Relations II and III are true.
D
Relations I and III are true.
       Aptitude       Numerical
Question 8 Explanation: 
75% of students have a chance of passing atleast one subject
= 1 - (1 - m) (1 - p) (1 - c) = 0.75 ----(i)
50% of students have a chance pass in atleast two
(1 - m)pc + (1 - p)mc + (1 - c) mp + mpc = 0.5 ----(ii)
40% of students have a chance of passing exactly two
(1 - m)pc + (1 - p)mc + (1 - c)mp = 0.4 ----(iii)
From equation (ii) and (iii) we can get
mpc = 0.1
⇒ m*p*c = 1/10
Statement (III) is correct.
→ Simplify eq (i), we get
⇒ p+c+m - (mp+mc+pc) + mpc = 0.75
⇒ p+c+m - (mp+mc+pc) = 0.65 ----(iv) → Simplify equation (iii), we get
⇒ pc + mc + mp - 3mpc = 0.4
From (iv) and (v)
p + c + m - 0.7 = 0.65
⇒ p + c + m = 1.35 = 27/20
Statement (I) is correct.
Question 9

The given statement is followed by some courses of action. Assuming the statement to be true, decide the correct option.

Statement:

There has been a significant drop in the water level in the lakes supplying water to the city.

Course of action:

    (I) The water supply authority should impose a partial cut in supply to tackle the situation.
    (II) The government should appeal to all the residents through mass media for minimal use of water.
    (III)The government should ban the water supply in lower areas.
A
Statements I and II follow
B
Statements I and III follow
C
Statements II and III follow
D
All statements follow
       Aptitude       Verbal
Question 9 Explanation: 
The statement III is not correct.
Banning of water in lower areas is not the solution of the problem.
Question 10

The number of students in a class who have answered correctly, wrongly, or not attempted each question in an exam, are listed in the table below. The marks for each question are also listed. There is no negative or partial marking.

What is the average of the marks obtained by the class in the examination?

A
2.290
B
2.970
C
6.795
D
8.795
       Aptitude       Numerical
Question 10 Explanation: 
Total number of students = 44 (Answered- correctly + Answered-wrongly + Not-attempted)
Total marks obtained = 21 × 2 + 15 × 3 + 11 × 1 + 23 × 2 + 31 × 5 = 299
Average marks = 299/44 = 6.795
Question 11

Which one of the following is True at any valid state in shift-reduce parsing?

 
A
Viable prefixes appear only at the bottom of the stack and not inside
B
Viable prefixes appear only at the top of the stack and not inside
C
The stack contains only a set of viable prefixes
D
The stack never contains viable prefixes
       Compiler-Design       Parsers
Question 11 Explanation: 
A handle is actually on the top of the stack.
A viable prefixes is prefix of the handle and so can never extend to the right of handle, i.e., top of stack.
So set of viable prefixes is in stack.
Question 12
 

Match the following:

(P) Condition coverage                      (i) Black-box testing
(Q) Equivalence class partitioning         (ii) System testing
(R) Volume testing                        (iii) White-box testing
(S) Alpha testing                          (iv) Performance testing
 
A
P-ii, Q-iii, R-i, S-iv
B
P-iii, Q-iv, R-ii, S-i
C
P-iii, Q-ii, R-iv, S-ii
D
P-iii, Q-i, R-ii, S-iv
       Software-Engineering       Testing
Question 12 Explanation: 
Condition coverage is also known as predicate coverage in which each of the Boolean expression evaluated to both true and false, which is nothing but white-box testing, which tests internal structures of an application. Hence A-3.
Equivalence class partitioning ⇒ is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived, which is nothing but black box testing. Hence B-1.
Volume testing ⇒ volume testing refers to testing a software application with certain amount of data which is nothing but system testing C-2.
Alpha testing ⇒ Alpha testing is simulated or actual operation testing by potential user/customers, which is nothing but performance testing. D-4.
Question 13
 

For computers based on three-address instruction formats, each address field can be used to specify which of the following:

    (S1) A memory operand
    (S2) A processor register
    (S3) An implied accumulator register
A
Either S1 or S2
B
Either S2 or S3
C
Only S2 and S3
D
All of S1, S2 and S3
       Computer-Organization       Machine-Instructions
Question 13 Explanation: 
Any implied register is never explicitly mentioned as an operand in an operation.
So as the question asks what can be specified using the address fields, implied accumulator register can't be represented in address field.
So, S3 is wrong.
Hence Option A is the correct answer.
Question 14

Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n(≥ 2) numbers? In the recurrence equations given in the options below, c is a constant.

A
T(n) = 2T(n/2) + cn
B
T(n) = T(n – 1) + T(1) + cn
C
T(n) = 2T(n – 1) + cn
D
T(n) = T(n/2) + cn
       Algorithms       Quick-Sort
Question 14 Explanation: 
When the pivot is the smallest (or largest) element at partitioning on a block of size n the result yields one empty sub-block, one element (pivot) in the correct place and sub block of size n-1.
Hence recurrence relation T(n) = T(n - 1) + T(1) + cn.
Question 15

For any two languages L1 and L2 such that L1 is context-free and L2 is recursively enumerable but not recursive, which of the following is/are necessarily true?

       
A
I only
B
III only
C
III and IV only
D
I and IV only
       Theory-of-Computation       Closure-Property
Question 15 Explanation: 
1 ⇒ is recursive,
This one is true, because L1 is context free which is nothing but recursive, recursive language is closed under complement hence true.
2 ⇒ (complement of L2) is recursive
If L2 and both are recursive enumerable then is recursive.
Hence option 2 is false
3 ⇒ is context free
Which is false because context free language does not closed under complement
4 ⇒ ∪L2 is recursive enumerable
⇒ recursive
Every recursive language is also recursive enumerable
L2 ⇒ recursive enumerable
∪ L2 ⇒ recursive enumerable
Because recursive enumerable language closed under union.
Question 16
   
A
III only
B
I and III only
C
I and IV only
D
II and IV only
       Computer-Networks       TCP
Question 16 Explanation: 
I. False.
If the sequence no. of the segment is m, then the sequence number of the subsequent segment depends on the current segment size.
II. True.
If the estimated RTT at any given point of time is t second, then the value of the retransmission timeout is always set to greater than or equal to t sec.
III. False.
The size of the advertized window may change during the course of the TCP connection depending on the processing capability at the receiver's side and the network traffic.
IV. True.
The number of unacknowledged bytes at the sender is always less than or equal to the advertised window, because the sender never sends no. of bytes greater than advertised window.
Question 17
     
A
3
B
4
C
5
D
6
       Operating-Systems       Process-Synchronization
Question 17 Explanation: 
If we execute P2 process after P1 process, then B = 3
If we execute P1 process after P2 process, then B = 4
If we did preemption between P1 & P2 processes, then B = 2 (Preemption have done from P1 to P2) or B = 3 (Preemption have done from P2 to P1). So, among 2 & 3 values, only one value will be saved in B. So, total no. of distinct values that B can possibly take after the execution is 3.
Question 18
Consider a 4-bit Johnson counter with an initial value of 0000. The counting sequence of this counter is
A
0, 1, 3, 7, 15, 14, 12, 8, 0
B
0, 1, 3, 5, 7, 9, 11, 13, 15, 0
C
0, 2, 4, 6, 8, 10, 12, 14, 0
D
0, 8, 12, 14, 15, 7, 3, 1, 0
       Digital-Logic-Design       Sequential-Circuits
Question 18 Explanation: 
In a Johnson’s counter LSB is complemented and a circular right shift operation has to be done to get the next state.

The state sequence is 0,8,12,14,15,7,3,1,0.
Question 19
Which one of the following fields of an IP header is NOT modified by a typical IP router?
A
Checksum
B
Source address
C
Time to Live (TTL)
D
Length
       Computer-Networks       IPv4-Header
Question 19 Explanation: 
Option C (TTL) is decremented by each visited router. When it reaches to Zero, then Packet will be discarded.
Option A (Checksum) needs to be updated by each visited Router since TTL Value is modified.
Option D (Length) also modified whenever there is a need of performing the fragmentation process.
Option B (Source Address) can’t be modified by an IP router. Only NAT can modify it.
Question 20
SELECT operation in SQL is equivalent to
A
the selection operation in relational algebra
B
the selection operation in relational algebra, except that SELECT in SQL retains duplicates
C
the projection operation in relational algebra
D
the projection operation in relational algebra, except that SELECT in SQL retains duplicates
       Database-Management-System       SQL
Question 20 Explanation: 
SELECT operation in SQL perform vertical partitioning which is performed by projection operation in relational calculus but SQL is multi sets; hence (D).
Question 21
 
A
5
B
6
C
7
D
8
       Engineering-Mathematics       Linear-Algebra
Question 21 Explanation: 
A = LU

l11 = 2 -----(1)
l11u12 = 2
u12 = 2/2
u12 = 1 ----- (2)
l21 = 4 ----- (3)
l21u12+l22 = 9
l22 = 9 - l21u12 = 9 - 4 × 1 = 5
Question 22
A
P-iii, Q-ii, R-iv, S-i
B
P-i, Q-ii, R-iv, S-iii
C
P-ii, Q-iii, R-iv, S-i
D
P-ii, Q-i, R-iii, S-iv
       Algorithms       Algorithms
Question 22 Explanation: 
Prim’s algorithm always select minimum distance between two of its sets which is nothing but greedy method.
Floyd-warshall always changes it distance at each iteration which is nothing but dynamic programming.
Merge sort in merge sort first we always divide and merge to perform sorting hence divide and conquer.
Hamiltonian circuit used to reach the entire vertex once, if some vertex is repeating in its path it will backtrack.
Question 23
A
-5
B
6
C
7
D
8
       Programming       Programming
Question 23 Explanation: 
Function f1 will not swap the value of 'a' and 'b' because f1 is call by value.
But f2 will swap the value of 'b' and 'c' because f2 is call by reference. So finally the value of
a=4
b=6
c=5
So, answer will be
c - a - b
5 - 4 - 6 = -5
Question 24
A
h(x)/g(x)
B
-1/x
C
g(x)/h(x)
D
x/(1-x)2
       Engineering-Mathematics       Calculus
Question 24 Explanation: 
g(x)= 1 – x, h(x)=x/x-1 -------- (2)
Replace x by h(x) in (1), replacing x by g(x) in (2),
g(h(x))=1-h(x)=1-x/x-1=-1/x-1
h(g(x))=g(x)/g(x)-1=1-x/-x
⇒ g(h(x))/h(g(x))=x/(x-1)(1-x)=(x/x-1)/1-x=h(x)/g(x)
Question 25
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
A
63 and 6, respectively
B
64 and 5, respectively
C
32 and 6, respectively
D
31 and 5, respectively
       Data-Structures       Trees
Question 25 Explanation: 
Maximum number of nodes in a binary tree of height h is,
2h+1 - 1 = 25+1 - 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
Question 26
 
A
2036, 2036, 2036
B
2012, 4, 2204
C
2036, 10, 10
D
2012, 4, 6
       Programming       Programming
Question 26 Explanation: 
⇒ Address of x = 2000
⇒ x [4] [3] can represents that x is a 2-dimensional array.
⇒ x+3 = (Address of x) + 3 * 4 * 3 [3×4×3 is inner dimention]
= 2000 + 36
= 2036
⇒ *(x+3) also returns the address i.e., 2036.
The '*' represents 1 - D but x is starting at 2036.
⇒ *(x+3)+3 = *(Address of x + 2 * 3 * 4) + 3
= *(2000 + 24) +3
= *(2024) + 3 ['*' will change from 2D to 1D]
= 2024 + 3 * 4
= 2024 + 12
= 2036
Question 27
A
1
B
2
C
3
D
4
       Theory-of-Computation       DFA
Question 27 Explanation: 
M accepts the strings which end with a and N accepts the strings which end with B. Their intersection should accept empty language.
Question 28
Consider a non-pipelined processor with a clock rate of 2.5 gigahertz and average cycles per instruction of four. The same processor is upgraded to a pipelined processor with five stages; but due to the internal pipeline delay, the clock speed is reduced to 2 gigahertz. Assume that there are no stalls in the pipeline. The speed up achieved in this pipelined processor is __________.
A
3.2
B
3.3
C
3.4
D
3.5
       Computer-Organization       Pipeling
Question 28 Explanation: 
Given that the processor clock rate = 2.5 GHz, the processor takes 2.5 G cycles in one second.
Time taken to complete one cycle = (1 / 2.5 G) seconds
Since it is given that average number of cycles per instruction = 4, the time taken for completing one instruction = (4 / 2.5 G) = 1.6 ns
In the pipelined case we know in the ideal case CPI = 1, and the clock speed = 2 GHz.
Time taken for one instruction in the pipelined case = (1 / 2 G) = 0.5 ns
Speedup = 1.6/0.5 = 3.2
Question 29
The least number of temporary variables required to create a three-address code in static single assignment form for the expression q + r/3 + s – t * 5 + u * v/w is _________.
A
8
B
9
C
10
D
11
       Compiler-Design       Static-single-assignment
Question 29 Explanation: 
We will need one temporary variable for storing the result of every binary operation as Static Single Assignment implies the variable cannot be repeated on left hand side of assignment.
The given expression:
q+r/3+s−t∗5+u∗v/w
t1=r/3;
t2=t∗5;
t3=u∗v;
t4=t3/w;
t5=q+t1;
t6=t5+s;
t7=t6−t2;
t8=t7+t4;
So in total we need 8 temporary variables. If it was not mentioned as static single assignment then answer would have been 3 because we can re-use the same temporary variable several times.
Question 30
A
pr = 0
B
pr = 1
C
0 < pr ≤ 1/5
D
1/5 < pr < 1
       Engineering-Mathematics       Set-Theory
Question 30 Explanation: 
Total number of elements i.e., ordered triplets (x,y,z) in L3 are 5×5×5 i.e., 125 n(s) = 125
Let A be the event that an element (x,y,z)∈ L3 satisfies x ∨(y∧z) = (x∨y) ∧ (x∨z) Since q∨(r∧s) = q∨p = q
and (q∨r)∧(q∨s)=t∧t=t q∨(r∧s)≠(q∨r)∧(q∨s)
Therefore, (x,y,z) = (q,r,s),(q,s,r),(r,q,s),(r,s,q),(s,r,q),(s,q,r)
i.e., 3! = 6 elements will not satisfy distributive law and all other (x,y,z) choices satisfy distributive law
n(A) = 125-6 = 119
∴ required probability is 119/125
⇒ 1/5
Question 31
A
10110
B
10010
C
01010
D
01001
       Theory-of-Computation       PDA
Question 31 Explanation: 
In q0 state for '1', a '1' is pushed and for a '0', a '0' is pushed. In q1 state, for a '0' a '1' is popped, and for '1' a '0' is popped. So the given PDA is accepting all strings of form x0(xr)' or x1(xr)' or x(xr)' , where (xr)' is the complement of reverse of x.
Question 32
 
A
{r = qx+y ∧ r
B
{x = qy+r ∧ r
C
{y = qx+r ∧ 0
D
{q+10}
       Programming       Programming
Question 32 Explanation: 
The loop terminates when r In each iteration q is incremented by 1 and y is subtracted from 'r'. Initial value of 'r' is 'x'. So, loop iterates x/y times and q will be equal to x/y and r = x%y.
⇒ x = qy + r
Question 33

An algorithm performs (log N)1/2 find operations, N insert operations, (log N)1/2 delete operations, and (log N)1/2 decrease-key operations on a set of data items with keys drawn from a linearly ordered set. For a delete operation, a pointer is provided to the record that must be deleted. For the decrease-key operation, a pointer is provided to the record that has its key decreased. Which one of the following data structures is the most suited for the algorithm to use, if the goal is to achieve the best total asymptotic complexity considering all the operations?

A
Unsorted array
B
Min-heap
C
Sorted array
D
Sorted doubly linked list
       Algorithms       Time-Complexity
Question 33 Explanation: 
Question 34
A
40, 30, 20, 10, 15, 16, 17, 8, 4, 35
B
40, 35, 20, 10, 30, 16, 17, 8, 4, 15
C
40, 30, 20, 10, 35, 16, 17, 8, 4, 15
D
40, 35, 20, 10, 15, 16, 17, 8, 4, 30
       Data-Structures       Heap
Question 34 Explanation: 
Given max. heap is

Heapification:

Array representation of above max-heap is (BFS)
40,35,20,10,30,16,17,8,4,15
Question 35
A
a=6,b=4
B
a=4,b=6
C
a=3,b=5
D
a=5,b=3
       Engineering-Mathematics       Linear-Algebra
Question 35 Explanation: 
Given λ1=-1 and λ2=7 are eigen values of A
By properties,

⇒ 6=1+a and -7=a-4b
⇒ a=5 ⇒ -7=5-4b
⇒ b=3
Question 36
Let G = (V, E) be a simple undirected graph, and s be a particular vertex in it called the source.  For x ∈ V , let d(x)denote the shortest distance in G from s to x. A breadth first search (BFS) is performed starting at s. Let T be the resultant BFS tree. If (u, v) is an edge of G that is not in T, then which one of the following CANNOT be the value of d(u- d(v) ?   
A
-1
B
0
C
1
D
2
       Engineering-Mathematics       BFS
Question 36 Explanation: 
In an undirected graph if (u, v) be the edge then (u, v) also the edge. So shortest path that can be obtained by the (u, v) of (u, v).
Then the difference between the d(u) and d(v) is not more than '1'.
In the option 'D' the difference is given as '2' it is not possible in the undirected graph.
Question 37
A
Both commutative and associative
B
Commutative but not associative
C
Not commutative but associative
D
Neither commutative nor associative
       Digital-Logic-Design       Truth Table and Boolean Expressions
Question 37 Explanation: 
It is clear that from the truth table, the binary operation # is equivalent to XOR i.e., ⊕, which satisfies both commutative and associative i.e., p#q q#p and p#(q#r) (p#q)#r
Question 38
 
A
4
B
6
C
7
D
8
       Database-Management-System       ER-Model
Question 38 Explanation: 


Question 39
A
69
B
70
C
71
D
72
       Algorithms       Minimum-Spanning-Tree
Question 39 Explanation: 

⇒ Total sum = 10 + 9 + 2 + 15 + 7 + 16 + 4 + 6 = 69
Question 40

Consider a disk pack with a seek time of 4 milliseconds and rotational speed of 10000 rotations per minute (RPM). It has 600 sectors per track and each sector can store 512 bytes of data. Consider a file stored in the disk. The file contains 2000 sectors. Assume that every sector access necessitates a seek, and the average rotational latency for accessing each sector is half of the time for one complete rotation. The total time (in milliseconds) needed to read the entire file is _________.

A
14020
B
14021
C
14022
D
14023
       Computer-Organization       Secondary-Storage
Question 40 Explanation: 
Given
Seek time = 4ms
60s→ 10000 rotations

∴ Rotational latency =1/2×6ms=3ms
1track→600sectors
⇒6ms←600sectors (1 rotation means 600 sectors (or)1 track)
1 track→6ms/600=0.01ms
2000sector→2000(0.01)=20ms
∴total time needed to read the entire file is
=2000(4+3)+20
=8000+6000+20
=14020ms
Question 41
 
A
-1
B
-2
C
-3
D
-4
       Engineering-Mathematics       Calculus
Question 41 Explanation: 
Question 42
A
5
B
6
C
7
D
8
       Programming       Programming
Question 42 Explanation: 
Note: Out of syllabus.
Question 43
 
A
n3
B
n(log n)2
C
nlog n
D
nlog (log n)
       Programming       Programming
Question 43 Explanation: 
for (i=1; i p=0;
for (j=n; j>1; j=j/2) --- p = O(log n) ++p;
for (k=1; k ++q;
}
∴ The return value of the function fun1,
q = n log p
= n log log n
Question 44
Let an represent the number of bit strings of length n containing two consecutive 1s. What is the recurrence relation for an?
A
an-2+an-1+2n-2
B
an-2+2an-1+2n-2
C
2an-2+an-1+2n-2
D
2an-2+2an-1+2n-2
       Compiler-Design       Live-Variable
Question 44 Explanation: 
For string of length 1, there is '0' consecutive 1's.
So, a1 = 0
For string of length 2,
a2 = 1
Similarly, a3 = 3
a4 = 8
Only (A) will satisfy the above values.
Question 45
A
p, s, u
B
r, s, u
C
r, u
D
q, v
       Compiler-Design       Live-Variable
Question 45 Explanation: 
In compilers, live variable analysis is a classic data flow analysis to calculate the variables that are live at each point in the program.
A variable is live at some point if it holds a value that may be needed in the future, of equivalently if its value may be read before the next time the variable is written to.
→ '1' can be assigned by the p and s and there is no intermediate use of them before that.
→ And p and s are not to be live in the both 2 & 3.
→ And q also assigned to u not live in 2 & 3.
→ And v is live at 3 not at 2.
→ u is live at 3 and also at 2, if we consider a path of length 0 from 2-8.
Finally r, u is the correct one.
Question 46
Consider a uniprocessor system executing three tasks T1, T2 and T3, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of T1, T2 and T3 requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1st millisecond and task preemptions are allowed, the first instance of T3 completes its execution at the end of ______________ milliseconds.
A
13
B
12
C
15
D
16
       Operating-Systems       Process-Scheduling
Question 46 Explanation: 
All the processes or tasks are available at the begining of 1st millisecond, means at t=0. So, Gantt chart will be as follows:

∴ At the end of 12 milliseconds, 1st instance of T3 will complete its execution.
Question 47
A
2
B
3
C
4
D
5
       Database-Management-System       SQL
Question 47 Explanation: 
Output table is
Question 48

A positive edge-triggered D flip-flop is connected to a positive edge-triggered JK flipflop as follows. The Q output of the D flip-flop is connected to both the J and K inputs of the JK flip-flop, while the Q output of the JK flip-flop is connected to the input of the D flip-flop. Initially, the output of the D flip-flop is set to logic one and the output of the JK flip-flop is cleared. Which one of the following is the bit sequence (including the initial state) generated at the Q output of the JK flip-flop when the flip-flops are connected to a free-running common clock? Assume that J = K = 1 is the toggle mode and J = K = 0 is the state-holding mode of the JK flip-flop. Both the flip-flops have non-zero propagation delays.

A
0110110...
B
0100100...
C
011101110...
D
011001100...
       Digital-Logic-Design       Sequential-Circuits
Question 48 Explanation: 
The circuit for the given data is

The characteristic equations are
QDN=D=QJK

The state table and state transition diagram are as follows:

Consider QDQJK=10 as initial state because in the options QJK=0 is the initial state of JK flip-flop.
The state sequence is

0 → 1 → 1 → 0 → 1 → 1
∴ Option (a) is the answer.
Question 49
Let G be a connected planar graph with 10 vertices. If the number of edges on each face is three, then the number of edges in G is _______________.
A
24
B
25
C
26
D
27
       Engineering-Mathematics       Graph-Theory
Question 49 Explanation: 
By Euler’s formula,
|V|+|R|=|E|+2 ------(1) where |V|, |E|, |R| are respectively number of vertices, edges and faces (regions)
Given |V|=10 ------(2) and number of edges on each face is three
∴3|R|=2|E|⇒|R|=2/3|E| ------(3)
Substituting (2), (3) in (1), we get
10+2/3|E|=|E|+2⇒|E|/3=8⇒|E|=24
Question 50

Consider  a LAN with four nodes S1, S2, S3 and S4. Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmit in the same slot. The probabilities of generation of a frame in a time slot by S1, S2, S3 and S4 are 0.1, 0.2, 0.3 and 0.4, respectively. The probability of sending a frame in the first slot without any collision by any of these four stations is _________.

A
0.4404
B
0.463
C
0.464
D
0.465
       Computer-Networks       Slotted-Channel-and-Probability
Question 50 Explanation: 
S1→0.1
S2→0.2
S3→0.3
S4→0.4
The probability of sending a frame without any collision by any of these stations is
Question 51

Suppose the following disk request sequence (track numbers) for a disk with 100 tracks is given: 45, 20, 90, 10, 50, 60, 80, 25, 70. Assume that the initial position of the R/W head is on track 50. The additional distance that will be traversed by the R/W head when the Shortest Seek Time First (SSTF) algorithm is used compared to the SCAN (Elevator) algorithm (assuming that SCAN algorithm moves towards 100 when it starts execution) is _________ tracks.

A
10
B
11
C
12
D
13
       Operating-Systems       Disk-Scheduling
Question 51 Explanation: 
SCAN:

∴ Total head movements,
= 10 + 10 + 10 + 10 + 10 + 55 + 20 + 5 + 10
= 140
SSTF:

∴ Total head movements
= 5 + 15 + 10 + 10 + 65 + 5 + 10 + 10
= 130
∴ Additional distance that will be traversed by R/W head is
= 140 - 130
= 10
Question 52

Suppose that the stop-and-wait protocol is used on a link with a bit rate of 64 kilobits per second and 20 milliseconds propagation delay. Assume that the transmission time for the acknowledgment and the processing time at nodes are negligible. Then the minimum frame size in bytes to achieve a link utilization of at least 50% is _________.

A
320
B
321
C
322
D
323
       Computer-Networks       Stop-and-Wait-protocol
Question 52 Explanation: 
Given B = 64 kbps
Tp = 20 ms
η ≥ 50%
For η≥50%⇒L≥BR
⇒ L=64×103×2×20×10-3
=2560bits
=320bytes
Question 53

Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First-In-First Out (FIFO) and Least Recently Used (LRU)?

A
Both incur the same number of page faults
B
FIFO incurs 2 more page faults than LRU
C
LRU incurs 2 more page faults than FIFO
D
FIFO incurs 1 more page faults than LRU
       Operating-Systems       Page-Replacement-Algorithm
Question 53 Explanation: 

∴ Number of page faults = 9

∴ Number of page faults = 9
Question 54
A
Both {f} and {g} are functionally complete
B
Only {f} is functionally complete
C
Only {g} is functionally complete
D
Neither {f} nor {g} is functionally complete
       Engineering-Mathematics       Set-Theory
Question 54 Explanation: 
A function is functionally complete if (OR, NOT) or (AND, NOT) are implemented by it.
f(X,X,X)=X'XX'+XX'+X'X'
=0+0+X'
=X'
Similarly, f(Y,Y,Y)=Y' and f(X,Z,Z)=Z'
f(Y',Y',Z')=(Y')'Y'Z'+Y'(Y')'+(Y')'(Z')'
=YY'Z'+Y'Y+YZ
=0+0+YZ
=YZ
We have derived NOT and AND. So f(X,Y,Z) is functionally complete.
g(X,Y,Z)=X'YZ+X'YZ'+XY
g(X,X,X)=X'XX+X'XZ'+XX
=0+0+X
=X
Similarly, g(Y,Y,Y)=Y and g(Z,Z,Z)=Z
NOT is not derived. Hence, g is not functionally complete.
Question 55
 
A
0.99
B
1.00
C
2.00
D
3.00
       Engineering-Mathematics       Calculus
Question 55 Explanation: 

=2-1/1(2)+3-2/2(3)+4-3/3(4)+…+100-99/99(100)
=1/1-1/2+1/2-1/3+1/3…+1/98-1/99+1/99-1/100
=1-1/100
=99/100
=0.99
There are 55 questions to complete.