GATE 2015 [Set1]
Question 1 
Didn’t you buy _________ when you went shopping?
any paper  
much paper  
no paper  
a few paper 
Question 2 
Which of the following combinations is incorrect?
Acquiescence – Submission  
Wheedle – Roundabout  
Flippancy – Lightness  
Profligate – Extravagant 
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?
0.20  
0.25  
0.30  
0.33 
Total outcomes = ^{4}C_{1} × ^{5}C_{1} = 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.
She had a terrible time at the party.  
She had a horrible time at the party.  
She had a terrific time at the party.  
She had a terrifying time at 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.
Statement I alone is sufficient, but statement II alone is not sufficient.  
Statement II alone is sufficient, but statement I alone is not sufficient.
 
Both statements together are sufficient, but neither statement alone is sufficient.  
Statement I and II together are not sufficient. 
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?
32  
33  
34  
35 
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.
took shelter in a thick jungle  
open indiscriminate fire  
took to flight  
unconditionally surrendered 
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
Only relation I is true  
Only relation II is true  
Relations II and III are true.  
Relations I and III are true. 
= 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.
Statements I and II follow  
Statements I and III follow  
Statements II and III follow  
All statements follow 
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?
2.290  
2.970  
6.795  
8.795 
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 shiftreduce parsing?
Viable prefixes appear only at the bottom of the stack and not inside  
Viable prefixes appear only at the top of the stack and not inside  
The stack contains only a set of viable prefixes  
The stack never contains viable prefixes 
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) Blackbox testing (Q) Equivalence class partitioning (ii) System testing (R) Volume testing (iii) Whitebox testing (S) Alpha testing (iv) Performance testing
Pii, Qiii, Ri, Siv  
Piii, Qiv, Rii, Si  
Piii, Qi, Riv, Sii  
Piii, Qi, Rii, Siv 
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 B1.
Volume testing ⇒ Performance testing  C4.
Alpha testing ⇒ System Testing D2.
Question 13 
For computers based on threeaddress 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
Either S1 or S2  
Either S2 or S3  
Only S2 and S3  
All of S1, S2 and S3 
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.
T(n) = 2T(n/2) + cn  
T(n) = T(n – 1) + T(1) + cn  
T(n) = 2T(n – 1) + cn  
T(n) = T(n/2) + cn

Hence recurrence relation T(n) = T(n  1) + T(1) + cn.
Question 15 
For any two languages L_{1} and L_{2} such that L_{1} is contextfree and L_{2} is recursively enumerable but not recursive, which of the following is/are necessarily true?
I only  
III only  
III and IV only  
I and IV only 
This one is true, because L_{1} is context free which is nothing but recursive, recursive language is closed under complement hence true.
2 ⇒ (complement of L_{2}) is recursive
If L_{2} 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 ⇒ ∪L_{2} is recursive enumerable
⇒ recursive
Every recursive language is also recursive enumerable
L_{2} ⇒ recursive enumerable
∪ L_{2} ⇒ recursive enumerable
Because recursive enumerable language closed under union.
Question 16 
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are False with respect to the TCP connection?
 1. If the sequence number of a segment is m, then the sequence
number of the subsequent segment is always m+1.
2. If the estimated round trip time at any given point of time is t sec, the value of the retransmission timeout is always set to greater than or equal to t sec.
3. The size of the advertised window never changes during the course of the TCP connection.
4. The number of unacknowledged bytes at the sender is always less than or equal to the advertised window.
III only  
I and III only  
I and IV only  
II and IV only 
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 advertised 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 
The following two functions P1 and P2 that share a variable B with an initial value of 2 execute concurrently.
P1() { C = B – 1; B = 2*C; } P2() { D = 2 * B; B = D  1; }
The number of distinct values that B can possibly take after the execution is
3  
4  
5  
6 
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 4bit Johnson counter with an initial value of 0000. The counting sequence of this counter is
0, 1, 3, 7, 15, 14, 12, 8, 0  
0, 1, 3, 5, 7, 9, 11, 13, 15, 0  
0, 2, 4, 6, 8, 10, 12, 14, 0  
0, 8, 12, 14, 15, 7, 3, 1, 0 
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?
Checksum  
Source address  
Time to Live (TTL)  
Length 
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
the selection operation in relational algebra  
the selection operation in relational algebra, except that SELECT in SQL retains duplicates
 
the projection operation in relational algebra  
the projection operation in relational algebra, except that SELECT in SQL retains duplicates

Question 21 
In the LU decomposition of the matrix ,if the diagonal elements of U are both 1, then the lower diagonal entry l_{22} of L is
5  
6  
7  
8 
l_{11} = 2 (1)
l_{11}u_{12} = 2
u_{12} = 2/2
u_{12} = 1  (2)
l_{21} = 4  (3)
l_{21}u_{12}+l_{22} = 9
l_{22} = 9  l_{21}u_{12} = 9  4 × 1 = 5
Question 22 
Match the following:
(P) Prim's algorithm for minimum spanning tree (i) Backtracking (Q) FloydWarshall algorithm for all pairs shortest paths (ii) Greedy method (R) Mergesort (iii) Dynamic programming (S) Hamiltonian circuit (iv) Divide and conquer
Piii, Qii, Riv, Si  
Pi, Qii, Riv, Siii  
Pii, Qiii, Riv, Si  
Pii, Qi, Riii, Siv 
Floydwarshall 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 
The output of the following C program is __________.
void f1 (int a, int b) { int c; c=a; a=b; b=c; } void f2 (int *a, int *b) { int c; c=*a; *a=*b;*b=c; } int main() { int a=4, b=5, c=6; f1(a, b); f2(&b, &c); printf (“%d”, cab); return 0; }
5  
6  
7  
8 
But f_{2} will swap the value of 'b' and 'c' because f_{2} 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 
If g(x) = 1  x and h(x) , then is:
h(x)/g(x)  
1/x  
g(x)/h(x)  
x/(1x)^{2} 
Replace x by h(x) in (1), replacing x by g(x) in (2),
g(h(x))=1h(x)=1x/x1=1/x1
h(g(x))=g(x)/g(x)1=1x/x
⇒ g(h(x))/h(g(x))=x/(x1)(1x)=(x/x1)/1x=h(x)/g(x)
Question 25 
The height of a tree is the length of the longest roottoleaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
63 and 6, respectively  
64 and 5, respectively  
32 and 6, respectively  
31 and 5, respectively 
2^{h+1}  1 = 2^{5+1}  1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
Question 26 
What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory.
int main() { unsigned int x[4][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf("%u, %u, %u", x+3, *(x+3), *(x+2)+3); }
2036, 2036, 2036  
2012, 4, 2204  
2036, 10, 10  
2012, 4, 6 
⇒ x [4] [3] can represents that x is a 2dimensional 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 
Consider the DFAs M and N given above. The number of states in a minimal DFA that accepts the language L(M) ∩ L(N) is __________.
1  
2  
3  
4 
Question 28 
Consider a nonpipelined 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 __________.
3.2  
3.3  
3.4  
3.5 
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 threeaddress code in static single assignment form for the expression q + r/3 + s – t * 5 + u * v/w is _________.
8  
9  
10  
11 
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 reuse the same temporary variable several times.
Question 30 
Suppose L = {p, q, r, s, t} is a lattice represented by the following Hasse diagram:
For any x, y ∈ L, not necessarily distinct, x ∨ y and x ∧ y are join and meet of x, y respectively. Let L^{3} = {(x,y,z): x, y, z ∈ L} be the set of all ordered triplets of the elements of L. Let p_{r} be the probability that an element (x,y,z) ∈ L^{3} chosen equiprobably satisfies x ∨ (y ∧ z) = (x ∨ y) ∧ (x ∨ z). Then
pr = 0  
pr = 1  
0 < pr ≤ 1/5  
1/5 < pr < 1 
Let A be the event that an element (x,y,z)∈ L^{3} 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) = 1256 = 119
∴ required probability is 119/125
⇒ 1/5
Question 31 
Consider the NPDA 〈Q = {q0, q1, q2}, Σ = {0, 1}, Γ = {0, 1, ⊥}, δ, q0, ⊥, F = {q2}〉, where (as per usual convention) Q is the set of states, Σ is the input alphabet, Γ is stack alphabet, δ is the state transition function, q0 is the initial state, ⊥ is the initial stack symbol, and F is the set of accepting states, The state transition is as follows:
10110  
10010  
01010  
01001 
Question 32 
Consider the following pseudo code, where x and y are positive integers.
begin q := 0 r := x while r >= y do begin r := r – y q := q + 1 end end
The post condition that needs to be satisfied after the program terminates is
{r = qx+y ∧ r  
{x = qy+r ∧ r  
{y = qx+r ∧ 0  
{q+1 
⇒ 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} decreasekey 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 decreasekey 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?
Unsorted array  
Minheap  
Sorted array  
Sorted doubly linked list 
Question 34 
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.
Now consider that a value 35 is inserted into this heap. After insertion, the new heap is
40, 30, 20, 10, 15, 16, 17, 8, 4, 35  
40, 35, 20, 10, 30, 16, 17, 8, 4, 15  
40, 30, 20, 10, 35, 16, 17, 8, 4, 15  
40, 35, 20, 10, 15, 16, 17, 8, 4, 30 
Heapification:
Array representation of above maxheap is (BFS)
40, 35, 20, 10, 30, 16, 17, 8, 4, 15
Question 35 
Consider the following 2 × 2 matrix A where two elements are unknown and are marked by a and b. The eigenvalues of this matrix are –1 and 7. What are the values of a and b?
a=6, b=4  
a=4, b=6  
a=3, b=5  
a=5, b=3 
By properties,
⇒ 6=1+a and 7=a4b
⇒ a=5 ⇒ 7=54b
⇒ 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) ?
1  
0  
1  
2 
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 
The binary operator ≠ is defined by the following truth table
Which one of the following is true about the binary operator ≠?
Both commutative and associative  
Commutative but not associative  
Not commutative but associative  
Neither commutative nor associative 
Question 38 
Consider an EntityRelationship (ER) model in which entity sets E_{1} and E_{2} are connected by an m:n relationship R_{12}, E_{1} and E_{3} are connected by a 1:n (1 on the side of E_{1} and n on the side of E_{3}) relationship R_{13}.
E_{1} has two singlevalued attributes a_{11} and a_{12} of which a_{11} is the key attribute. E_{2} has two singlevalued attributes a_{21} and a_{22} is the key attribute. E_{3} has two singlevalued attributes a_{31} and a_{32} of which a_{31} is the key attribute. The relationships do not have any attributes.
If a relational model is derived from the above ER model, then the minimum number of relations that would be generated if all the relations are in 3NF is ___________.
4  
6  
7  
8 
Question 39 
The graph shown below 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D, F)}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this graph is ______________.
69  
70  
71  
72 
⇒ Total sum = 10 + 9 + 2 + 15 + 7 + 16 + 4 + 6 = 69
> First we compare AC and AB we find 9 at AC it means AB must greater than AC and for minimum possible greater value than 9 will be 10
> Second we compare BE and CD in which we select BE is 15 which CD possible weight 16.
> Third, we compare ED and FD in which we select FD 6 means ED must be greater than 6 so possible value greater than 6 is 7 .
Note: Add First+Second+Third=(AB=10)+(CD=16)+(ED=7)
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 _________.
14020  
14021  
14022  
14023 
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 42 
Consider the following C program segment.
while (first <= last) { if (array [middle] < search) first = middle +1; else if (array [middle] == search) found = True; else last = middle – 1; middle = (first + last)/2; } if (first < last) not Present = True;
The cyclomatic complexity of the program segment is __________.
5  
6  
7  
8 
Question 43 
Consider the following C function.
int fun1 (int n) { int i, j, k, p, q = 0; for (i = 1; i<n; ++i) { p = 0; for (j = n; j > 1; j = j/2) ++p; for (k = 1; k < p; k = k*2) ++q; } return q; }
Which one of the following most closely approximates the return value of the function fun1?
n^{3}  
n(log n)^{2}  
nlog n  
nlog (log n) 
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 a_{n} represent the number of bit strings of length n containing two consecutive 1s. What is the recurrence relation for a_{n}?
a_{n2} + a_{n1} + 2^{n2}
 
a_{n2} + 2a_{n1} + 2^{n2}  
2a_{n2} + a_{n1} + 2^{n2}  
2a_{n2} + 2a_{n1} + 2^{n2} 
So, a_{1} = 0
For string of length 2,
a_{2} = 1
Similarly, a_{3} = 3
a_{4} = 8
Only (A) will satisfy the above values.
Question 45 
A variable x is said to be live at a statement S_{i} in a program if the following three conditions hold simultaneously:
 i. There exists a statement S_{j} that uses x
ii. There is a path from S_{i} to S_{j} in the flow graph corresponding to the program
iii. The path has no intervening assignment to x including at S_{i} and S_{j}
The variables which are live both at the statement in basic block 2 and at the statement in basic block 3 of the above control flow graph are
p, s, u  
r, s, u  
r, u  
q, v 
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 28.
Finally r, u is the correct one.
Question 46 
Consider a uniprocessor system executing three tasks T_{1}, T_{2} and T_{3}, 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 T_{1}, T_{2} and T_{3} requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1^{st} millisecond and task preemptions are allowed, the first instance of T_{3} completes its execution at the end of ______________ milliseconds.
13  
12  
15  
16 
∴ At the end of 12 milliseconds, 1st instance of T_{3} will complete its execution.
Question 47 
Consider the following relations:
Consider the following SQL query.
SELECT S. Student_Name, sum(P.Marks) FROM Student S, Performance P WHERE S.Roll_No = P.Roll_No GROUP BY S.Student_Name
The number of rows that will be returned by the SQL query is _________.
2  
3  
4  
5 
Question 48 
A positive edgetriggered D flipflop is connected to a positive edgetriggered JK flipflop as follows. The Q output of the D flipflop is connected to both the J and K inputs of the JK flipflop, while the Q output of the JK flipflop is connected to the input of the D flipflop. Initially, the output of the D flipflop is set to logic one and the output of the JK flipflop is cleared. Which one of the following is the bit sequence (including the initial state) generated at the Q output of the JK flipflop when the flipflops are connected to a freerunning common clock? Assume that J = K = 1 is the toggle mode and J = K = 0 is the stateholding mode of the JK flipflop. Both the flipflops have nonzero propagation delays.
0110110...  
0100100...  
011101110...  
011001100... 
The characteristic equations are
Q_{DN}=D=Q_{JK}
The state table and state transition diagram are as follows:
Consider Q_{D}Q_{JK}=10 as initial state because in the options Q_{JK}=0 is the initial state of JK flipflop.
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 _______________.
24  
25  
26  
27 
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
∴3R = 2E ⇒ R = 2/3E (3)
Substituting (2), (3) in (1), we get
10 + 2/3E = E + 2 ⇒ E/3 = 8 ⇒ E = 24
Question 50 
Consider a LAN with four nodes S_{1}, S_{2}, S_{3} and S_{4}. Time is divided into fixedsize 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 S_{1}, S_{2}, S_{3} and S_{4} 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 _________.
0.4404  
0.463  
0.464  
0.465 
S_{2}→0.2
S_{3}→0.3
S_{4}→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.
10  
11  
12  
13 
∴ 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 stopandwait 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 _________.
320  
321  
322  
323 
T_{p} = 20 ms
η ≥ 50%
For η≥50% ⇒ L≥BR
⇒ L = 64×10^{3}×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 FirstInFirst Out (FIFO) and Least Recently Used (LRU)?
Both incur the same number of page faults
 
FIFO incurs 2 more page faults than LRU  
LRU incurs 2 more page faults than FIFO  
FIFO incurs 1 more page faults than LRU 
∴ Number of page faults = 9
∴ Number of page faults = 9
Question 54 
Consider the operations f(X, Y, Z) = X'YZ + XY' + Y'Z' and g(X′, Y, Z) = X′YZ + X′YZ′ + XY Which one of the following is correct?
Both {f} and {g} are functionally complete  
Only {f} is functionally complete  
Only {g} is functionally complete
 
Neither {f} nor {g} is functionally complete 
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 
0.99  
1.00  
2.00  
3.00 
= 21/1(2)+32/2(3)+43/3(4)+…+10099/99(100)
= 1/11/2+1/21/3+1/3…+1/981/99+1/991/100
= 11/100
= 99/100
= 0.99