You are on page 1of 13

GATE – 2 0 1 6

CS : COM PU T ER SCI EN CE
& I N F ORM AT I ON T ECH N OL OGY
Set - 1
N o. of Qu est i on s : 65 M a xi m u m M a r k s : 100

I N ST RU CT I ON S
1. Tot al of 65 quest ions car r ying 100 mar ks, out of which 10 quest ions car r ying a t ot al of 15 mar ks ar e in
Gener al Apt it ude (GA)
2. The Engineer ing M at hemat ics will car r y ar ound 15% of t h e t ot al m ar k s, t he Gener al Apt it ude sect ion
will car r y 15% of t h e t ot al m ar k s and t he r em ai n i n g 70% of t h e t ot al m ar k s.
3. Ty p es of Qu est i on s
(a ) M u l t i p l e Ch oi ce Qu est i on s (M CQ) car r ying 1 or 2 mar ks each in all paper s and sect ions. These
questions ar e object ive in nat ur e, and each will have a choice of four options, out of which the candidate
has t o mar k t he cor r ect answer (s).
(b) N u m er i cal An sw er Qu est i on s of 1 or 2 mar ks each in all paper s and sect ions. For t hese quest ions
t he answer is a r eal number, t o be ent er ed by t he candidat e using t he vir t ual keypad. No choices will
be shown for t hese t ype of quest ions.
4. For 1-m ar k mult iple-choice quest ions, 1/3 m ar k s will be deduct ed for a wr ong answer. L ikewise, for
2-m ar k s mult iple-choice quest ions, 2/3 mar ks will be deduct ed for a wr ong answer. Ther e is no negat ive
mar king for numer ical answer t ype quest ions.
5. A cube is built using 64 cubic blocks of side one
GEN ERAL APT I T U D E (GA) unit . Aft er it is built , one cubic block is r emoved
(Q.1 – 5) : Car r y On e M ar k Each fr om ever y cor ner of t he cube. The r esul t i ng
sur face ar ea of t he body (in squar e unit s) aft er
1. Out of t he foll owing four sent ences, select t he t he r emoval is _______.
most suit able sent ence wit h r espect t o gr ammar
and usage. (a) 56
(a) I will not leave t he place unt il t he minist er (b) 64
does not meet me. (c) 72
(b) I will not leave t he place unt il t he minist er (d) 96
doesn't meet me. (Q.6 – 10) : Car r y Tw o M ar k s Each
(c) I will not leave t he place unt il t he minist er 6. A shaving set company sells 4 differ ent t ypes of
meet me. r azor s, Elegance, Smoot h, Soft and Execut ive.
(d) I will not leave t he place unt il t he minist er Elegance sells at Rs. 48, Smoot h at Rs. 63, Soft
meet s me. at Rs. 78 and Execut ive at Rs. 173 per piece. The
2. A r ewor ding of somet hing wr it t en or spoken is t able below shows t he number s of each r azor sold
a__________. in each quar t er of a year.
(a) par aphr ase (b) par adox
Quart er
(c) par adigm (d) par affin Elegance Smoot h Soft Execut ive
\ product
3. Ar chimedes said, “ Give me a lever long enough
and a fulcr um on which to place it, and I will move Q1 27300 20009 17602 9999
t he wor ld.” Q2 25222 19392 18445 8942
The sent ence above is an example of a ________ Q3 28976 22429 19544 10234
st at ement . Q4 21012 18229 16595 10109
(a) figur at ive (b) collat er al
(c) lit er al (d) figur ine Which pr oduct cont r ibut es t he gr eat est fr act ion
t o t he r evenue of t he company in t hat year ?
4. I f ‘r elftaga' means car efr ee, ‘ot aga' means car eful
an d ‘f er t aga' m ean s car el ess, wh i ch of t h e (a) Elegance
following could mean ‘aft er car e'? (b) Execut ive
(a) zent aga (b) t agafer (c) Smoot h
(c) t agazen (d) r elffer (d) Soft
2 SOLVED PAPER – 2016 (SET - 1)

7. I ndi an cur r ency not es show t he denominat i on


T ECH N I CAL SECT I ON
indicat ed in at least sevent een languages. I f t his
i s not an i ndi cat i on of t he nat i on's di ver si t y, (Q.1 – 25) : Car r y On e M ar k Each
not hing else is. 1. L et p, q, r , s r epr esent t he following pr oposit ions.
Which of t he following can be logically infer r ed p : x  {8, 9, 10, 11, 12}
fr om t he above sent ences?
q : x is a composit e number
(a) I n di a i s a cou n t r y of ex act l y seven t een
r : x is a per fect squar e
languages.
s : x is a pr ime number
(b) L inguist ic plur alism is t he only indicat or of a
nat ion's diver sit y. The int eger x  2 which sat i sfies ((p  q) 
(r  s)) is ______.
(c) I ndian cur r ency not es have sufficient space
for all t he I ndian languages. 2. L et an be t he number of n-bit st r ings that do NOT
cont ai n t wo consecut i ve 1s. Whi ch one of t he
(d) L i ngui st i c pl ur al i sm i s st r ong evi dence of
following is t he r ecur r ence r elat ion for an?
I ndia's diver sit y.
(a) an = an– 1 + 2an– 2
8. Consider t he following st at ements r elat ing to the
level of poker play of four player s P, Q, R and S. (b) an = an– 1 + an– 2
I . P always beat s Q (c) an = 2an– 1 + an– 2

I I . R always beat s S (d) an = 2an– 1 + 2an– 2

I I I .S loses t o P only somet imes sin( x  4)


3. lxim = ______.
I V. R always loses t o Q 4 x4
Which of t he following can be logically infer r ed 4. A pr obabi li t y densi t y funct ion on t he int er val
fr om t he above st at ement s? [a, 1] is given by 1/x2 and out side t his int er val
(i ) P is likely t o beat all t he t hr ee ot her player s t he value of t he funct ion is zer o. The value of a
(i i ) S is t he absolut e wor st player in t he set is ______ .

(a) (i ) only 5. Two ei genvalues of a 3  3 r eal mat r i x P ar e

(b) (i i ) only 2  
1 and 3. The det er minant of P is______.
(c) (i ) and (i i )
6. Con si der t h e B ool ean oper at or # w i t h t h e
(d) neit her (i ) nor (i i ) following pr oper t ies:
9. I f f(x) = 2x7 + 3x – 5, which of t he following is a x#0 = x, x#1 = x , x#x = 0 and x# x = 1, Then x#y
fact or of f(x) ? is equivalent t o
(a) (x3 + 8)
(a) xy  xy (b) xy  x y
(b) (x – 1)
(c) (2x – 5) (c) xy  xy (d) xy  x y

(d) (x + 1) 7. The 16-bit 2's complement r epr esent at ion of an


i n t eger i s 1111 1111 1111 0101; i t s deci mal
10. I n a pr ocess, t he number of cycl es t o fai l ur e
r epr esent at ion is ______.
decr eases exponent ially with an incr ease in load.
At a load of 80 units, it takes 100 cycles for failur e. 8. We want t o design a synchr onous count er t hat
When t he load is halved, it t akes 10000 cycles for counts the sequence 0-1-0-2-0-3 and then r epeats.
failur e. The load for which t he failur e will happen The minimum number of J-K flip-flops r equir ed
in 5000 cycles is _____. t o implement t his count er is ________.
(a) 40.00 9. A pr ocessor can suppor t a maximum memor y of
4 GB, wher e t he memor y i s wor d-addr essabl e
(b) 46.02
(a wor d consist s of t wo byt es) . The size of t he
(c) 60.01 addr ess bus of t he pr ocessor is at least ________
(d) 92.02 bit s.
SOLVED PAPER – 2016 (SET - 1) 3

10. A queue is implemented using an ar r ay such t hat 14. L et G be a weight ed connect ed undir ect ed gr aph
E N QU E U E an d DE QU E U E oper at i on s ar e wit h dist inct posit ive edge weight s. I f ever y edge
per for med efficient ly. Which one of t he following weight is incr eased by the same value, then which
statements is CORRECT (n r efer s to the number of t he following st at ement s is/ar e T RU E?
of it ems in t he queue) ? P : M inimum spanning t r ee of G does not change
(a) Both oper ations can be per for med in O(1) time Q : Shor t est pat h bet ween any pair of ver t i ces
(b) At most one oper at ion can be per for med in does not change
O(1) time but t he wor st case time for the other (a) P only (b) Q only
oper at ion will be (n)
(c) Neit her P nor Q (d) Bot h P and Q
(c) The wor st case t i me compl exi t y for bot h
15. Consider t he following C pr ogr am.
oper at ions will be (n)
#include<st dio.h>
(d) Wor st case t i m e com pl ex i t y f or bot h
oper at ions will be (log n) void myst er y (int * pt r a, int * pt r b) {
11. Consider t he following dir ect ed gr aph: int * t emp;
t emp = pt r b;
b c pt r b = pt r a;
pt r a = t emp;
a f
}
int main () {
d e
int a=2016, b=0, c=4, d=42;

The number of differ ent t opological or der ings of myst er y (& a, & b) ;
t he ver t ices of t he gr aph is _________. if (a < c)
12. Consider t he following C pr ogr am. myst er y (& c, & a) ;
void f(int ,shor t ); myst er y (& a, & d) ;
void main() pr int f("%d\ n", a);
{ }
int i = 100; The out put of t he pr ogr am is ______ .
shor t s = 12; 16. Which of t he following languages is gener at ed by
shor t * p = & s; t he given gr ammar ?

__________ ; // call t o f () S  aS| bS| 

} (a) {anbm | n, m  0}
Whi ch one of t he fol lowi ng expr essi ons, when (b) {w  {a, b}* | w has equal number of a's and
placed in t he blank above, will NOT r esult in a b's }
t ype checking er r or ? (c) { a n | n  0}  {bn | n  0}  { a n bn | n  0}
(a) f (s,* s)
(d) {a, b}*
(b) i = f (i, s)
17. Whi ch of t he fol l owi ng deci si on pr obl ems ar e
(c) f (i, * s) undecidable?
(d) f (i, * p) I . GivenNFAs N 1 and N 2, is L (N 1)  L (N 2) = ?
13. The wor st case r unning t imes of I nser ti on sor t, I I . Given a CFG G = (N, , P, S) and a st r ing x 
M er ge sor t and Qui ck sor t, r espect ively, ar e: * , does x  L (G) ?
(a) (n log n), (n log n), and (n 2) I I I .Given CFGs G1 and G2, is L (G1) = L (G2)?
(b) (n 2), (n 2), and (n log n) I V. Given a TM M , is L (M ) = ?
(c) (n 2), (n log n), and (n log n) (a) I and I V only (b) I I and I I I only
(d) (n ) , (n log n), and (n )
2 2
(c) I I I and I V only (d) I I and I V only
4 SOLVED PAPER – 2016 (SET - 1)

18. Which one of t he following r egular expr essions 23. A dat abase of r esear ch ar t icles in a jour nal uses
r epr esent s t he l anguage: the set of al l bi nar y t he following schema.
st r i n gs h avi n g t wo con secu t i ve 0s an d t wo (V OL U M E , N U M BER, START PAGE , E N D PAGE , T I TL E ,
consecuti ve 1s? Y EAR, PRI CE )
(a) (0 + 1)* 0011 (0 + 1)* + (0 + 1)* 1100 (0 + 1)* The pr imar y key is (V OL UM E , N UM BER, START PAGE ,
(b) (0 + 1)* (00 (0 + 1)* 11 + 11(0 + 1)* 00) (0 + 1) * E N D P A GE ) an d t h e f ol l ow i n g f u n ct i on al
dependencies exist in t he schema.
(c) (0 + 1)* 00 (0 + 1)* + (0 + 1)* 11 (0 + 1) *
(V OL UM E , N UM BER, START PAGE , E ND PAGE )  T I TL E
(d) 00(0 + 1)* 11 + 11(0 + 1)* 00
(V OL UM E , N UM BER)  Y EAR
19. Consider t he following code segment .
(V OL UM E , N UM BER, START PAGE , E ND PAGE )  PRI CE
x = u – t;
The dat abase is r edesigned t o use t he following
y = x * v; schemas.
x = y + w; (VOLUME, N UMBER, STARTPAGE, ENDPAGE, TITLE, PRICE)
y = t – z; (V OL UM E , N UM BER, Y EAR)
y = x * y; Which is t he weakest nor mal for m t hat t he new
T h e m i n i m u m n u m ber of t ot al v ar i abl es dat abase sat isfies, but t he old one does not ?
r equir ed t o conver t t he above code segment t o (a) 1NF (b) 2NF
stati c si ngl e assi gnment for m is _______ . (c) 3NF (d) BCNF
20. Consider an ar bitr ar y set of CPU-bound pr ocesses 24. Which one of t he following pr ot ocols is N OT used
with unequal CPU bur st lengths submit ted at t he t o r esolve one for m of addr ess t o anot her one?
same t ime t o a comput er syst em. Which one of
(a) DNS (b) ARP
t he fol l owi ng pr ocess schedul i ng al gor i t hms
would minimize t he aver age wait ing t ime in t he (c) DH CP (d) RARP
r eady queue? 25. Whi ch of t he fol l owi ng i s/ar e exampl e (s) of
(a) Shor t est r emaining t ime fir st st at eful applicat ion layer pr ot ocols?
(i ) H TTP (i i ) FTP
(b) Round-r obin with time quant um less t han t he
shor t est CPU bur st (iii)TCP (i v) POP3
(c) Unifor m r andom (a) (i ) and (i i ) only (b) (i i ) and (i i i ) only
(d) H i gh est pr i or i t y f i r st w i t h pr i or i t y (c) (i i ) and (i v) only (d) (i v) only
pr opor t ional t o CPU bur st lengt h (Q.26 – 55) : Car r y Tw o M ar k s Each
21. Which of t he following is N OT a super key in a 26. The coefficient of x12 in (x3 + x4 + x5 + x6 + ...)3
r elat ional schema wit h at t r ibut es V, W, X, Y, Z is ______.
and pr imar y key V Y? 27. Con si der t h e r ecu r r en ce r el at i on a 1 = 8,
(a) VXYZ an = 6n 2 + 2n + an– 1. L et a99 = K  104. The value of
K is ______.
(b) VWXZ
28. A funct i on f :    , defi ned on t he set of
 
(c) VWXY
(d) VWXYZ posi t i ve i nt eger s   , sat i sf i es t h e f ol l owi n g
22. Which one of t he following is N OT a par t of t he pr oper t ies:
ACI D pr oper t ies of dat abase t r ansact ions? f(n) = f(n / 2) i f n is even
(a) At omicit y f(n) = f(n + 5) i f n is odd
(b) Consist ency L et R = {i | j : f(j) = i } be t he set of dist inct values
(c) I solat ion t hat f t akes. The maximum possi bl e si ze of R
is ______.
(d) Deadlock-fr eedom
SOLVED PAPER – 2016 (SET - 1) 5

29. Consider t he following exper iment . 34. T h e f ol l ow i n g f u n ct i on com pu t es t h e


St ep 1. Flip a fair coin t wice. maximum value cont ained in an int eger ar r ay
p [ ] of size
St ep 2. I f t he out comes ar e (T AI L S, H EADS) t hen
out put Y and st op. n (n >= 1) .

St ep 3. I f t he out comes ar e either (H EADS, H EADS) int max (int * p, int n) {


or (H EADS, T AI L S) , t hen out put N and st op. int a=0, b=n-1;
St ep 4. I f t he out comes ar e (T AI L S, T AI L S) , t hen while (_______) {
go t o St ep 1. if (p[a] <= p[b]) { a = a+1; }
The pr obability that t he output of t he exper iment else {b = b – 1; }
is Y is (up t o t wo decimal places) ________.
}
30. Consider t he t wo cascaded 2-t o-l mult iplexer s as
r et ur n p[a];
shown in t he figur e.
}
R
The missing loop condit ion is
0 0 2-t o-1 0 2-t o-1 X (a) a ! = n (b) b ! = 0
R 1 MUX 1 MUX
s s (c) b > (a + 1) (d) b ! = a
35. Wh at wi l l be t h e out put of t he fol l owi ng C
P Q
pr ogr am?
The minimal sum of pr oduct s for m of t he out put
void count (int n) {
X is
st at ic int d=1;
(a) PQ + PQR (b) PQ + QR
pr int f (“ %d” n) ;
(c) PQ + PQR (d) QR + PQR pr int f (“ %d” d) ;
31. The si ze of t he dat a count r egi st er of a DM A d++;
cont r ol l er i s 16 bi t s. The pr ocessor needs t o
if (n>l) count (n-1) ;
t r ansfer a file of 29,154 kilobyt es fr om disk t o
main memor y. The memor y is byt e addr essable. pr int f (“ %d” d) ;
T h e m i n i m u m n u m ber of t i m es t h e D M A }
cont r oller needs t o get t he cont r ol of t he syst em void main () {
bus fr om t he pr ocessor t o t r ansfer t he file fr om
count (3) ;
t he disk t o main memor y is ______.
}
32. The st age delays in a 4-st age pipeline ar e 800,
(a) 3 1 2 2 1 3 4 4 4 (b) 3 1 2 1 1 1 2 2 2
500, 400 and 300 pi coseconds. The fi r st st age
(wit h delay 800 picoseconds) is r eplaced wit h a (c) 3 1 2 2 1 3 4 (d) 3 1 2 1 1 1 2
funct i onal l y equi val ent desi gn i nvol vi ng t wo 36. What will be t he out put of t he following pseudo-
st ages wi t h r espect i v e del ays 600 an d 350 code when par amet er s ar e passed by r efer ence
pi coseconds. The t hr oughput i ncr ease of t he and dynamic scoping is assumed?
pipeline is ______ per cent . a=3;
33. Consider a car r y lookahead adder for adding t wo void n (x) {x = x * a; pr int (x) ;}
n-bit int eger s, built using gat es of fan-in at most
void m (y) {a = 1; a = y - a; n (a) ; pr int (a) ;}
t wo. The t i me t o per for m addi t i on usi ng t hi s
void main () {m (a) ; }
adder is
(a) 6, 2
(a) (1)
(b) 6, 6
(b) (log (n))
(c) 4, 2
(c) ( n )
(d) 4, 4
(d) (n)
6 SOLVED PAPER – 2016 (SET - 1)

37. An oper at or del et e (i ) for a bi nar y heap dat a 41. Let Q denote a queue containing sixteen number s
st r uct ur e is t o be designed t o delet e t he it em in and S be an empt y st ack. H ead (Q) r et ur ns t he
t h e i -t h n ode. A ssu m e t h at t h e h eap i s element at t he head of t he queue Q w i t h ou t
implement ed in an ar r ay and i r efer s t o t he i -t h r emoving it fr om Q, Similar ly Top (S) r et ur ns t he
index of t he ar r ay. I f t he heap t r ee has dept h d element at t he t op of S w i t h ou t r emoving it fr om
(number of edges on t he pat h fr om t he r oot t o S, Consider t he algor it hm given below.
t h e f ar t h est l eaf ) , t h en w h at i s t h e t i m e
complexit y t o r e-fix t he heap efficient ly aft er t he w h i l e Q i s not Empty do
r emoval of t he element ? i f S is Empty OR Top (S)  H ead (Q) t hen
x:=Dequeue (Q);
(a) O(1)
Push(S; x);
(b) O(d) but not O(1) el se
x:= Pop(S);
(c) O(2d) but not O(d) Enqueue (Q,x);
en d
(d) O(d2d) but not O(2d)
en d
38. Consider t he weight ed undir ect ed gr aph wit h 4
ver t ices, wher e t he weight of edge {i , j} is given
by t he ent r y W i j in t he mat r ix W. The maximum possible number of it er at ions of
t he w h i l e loop in t he algor it hm is _________.
0 2 8 5 42. Consider t he following cont ext -fr ee gr ammar s:
2 0 5 8  G1 : S  aS| , B  b| bB
W= 
8 5 0 x G2 : S  aA| bB, A  aA| B| , B  bB| 
 
5 8 x 0 Which one of t he following pair s of languages is
gener at ed by G1 and G2, r espect ively?
The lar gest possible int eger value of x, for which
(a) {ambn| m > 0 or n > 0} and {ambn| m > 0 and n > 0}
at least one shor t est pat h bet ween some pair of
ver t i ces wi l l cont ai n t he edge wi t h wei ght x (b) {ambn| m > 0 and n > 0} and {ambn| m > 0 or n  0}
is ______. (c) {ambn| m  0 or n > 0} and {ambn| m > 0 and n > 0}
39. L et G be a com pl et e u n di r ect ed gr aph on (d) {ambn| m  0 and n > 0} and {ambn| m > 0 or n > 0}
4 ver t ices, havi ng 6 edges wi t h wei ght s bei ng 43. Consider t he t r ansit ion diagr am of a PDA given
1, 2, 3, 4, 5, and 6. The maximum possible weight below wit h input alphabet  = {a,b} and st ack
t hat a minimum weight spanning t r ee of G can alphabet  = {X,Z}. Z is t he init ial st ack symbol.
have is ______. L et L denot e t he language accept ed by t he PDA.

40. G = (V, E) is an undir ect ed simple gr aph in which a;X/XX


each edge has a di st i nct wei ght , and e i s a a;Z/XZ b;X/

par t i cul ar edge of G. Whi ch of t he fol l owi ng b;X/ ;Z/Z


st at ement s about t he minimum spanning t r ees
(M STs) of G is/ar e T RU E?
Which one of t he following is TRUE?
I . I f e is t he light est edge of some cycle in G,
t hen ever y M ST of G includes e (a) L = {anbn| n  0} and is not accept ed by any
finit e aut omat a
I I . I f e is t he heaviest edge of some cycle in G,
(b) L = {a n | n  0}  {a n bn | n  0} and i s not
t hen ever y M ST of G excludes e
accept ed by any det er minist ic PDA
(a) I only
(c) L is not accept ed by any Tur ing machine t hat
(b) I I only halt s on ever y input
(c) bot h I and I I (d) L = {a n | n  0}  {a n b n | n  0} an d i s
(d) neit her I nor I I det er minist ic cont ext -fr ee
SOLVED PAPER – 2016 (SET - 1) 7

44. L et X be a r ecu r si ve l an gu age an d Y be a 49. Consider a comput er syst em wit h t en physical


r ecu r si v el y en u m er abl e bu t n ot r ecu r si v e page fr ames. The syst em i s pr ovi ded wi t h an
language. L et W and Z be t wo languages such access sequence (a1, a2,..., a20, a1, a2,...., a20), wher e
t h at Y r edu ces t o W, an d Z r edu ces t o X each ai is a dist i nct vir t ual page number. The
(r edu ct i on m ean s t h e st an dar d m an y -on e differ ence in t he number of page fault s bet ween
r eduction) . Which one of the following statements t he last -in-fir st -out page r eplacement policy and
is T RU E? t he opt imal page r eplacement policy is ______ .
(a) W can be r ecur sivel y enumer abl e and Z is 50. Consider t he following pr oposed solut ion for t he
r ecur sive. cr it ical sect ion pr oblem. Ther e ar e n pr ocesses:
(b) W can be r ecur si ve and Z i s r ecur si vel y P0 ... Pn– 1, I n t he code, funct ion pmax r et ur ns an
enumer able. int eger not smaller t han any of it s ar gument s.
For all i , t [ i ] is init ialized t o zer o,
(c) W i s not r ecur si vel y enumer abl e and Z i s
r ecur sive. Code for Pi :

(d) W is not r ecur sively enumer able and Z is not do {


r ecur sive. c[i]=1; t [i] = pmax (t [0] ,...,t [n-1] ) + 1; c[i]=0;
45. The at t r ibut es of t hr ee ar it hmet ic oper at or s in for ever y j  i in {0,..., n – 1} {
some pr ogr amming language ar e given below. while (c[j]) ;
Oper at or Pr eceden ce Associ at i vi t y Ar i t y while (t [ j] != 0 & & t [j] <= t [i]) ;
+ H igh L eft Binar y }
— M edium Right Binar y Cr it ical Sect ion ;
* L ow L eft Binar y t [i] = 0;
The value of t he expr ession 2 – 5 + 1 – 7* 3 in t his Remainder Sect ion;
language is ______ .
} while (t r ue) ;
46. Con si der t h e f ol l ow i n g Sy n t ax D i r ect ed
Which one of t he following is T RU E about t he
Tr anslat ion Scheme (SDTS) , with non-t er minals
above solut ion?
{S, A} and t er minals {a, b}.
(a) At most one pr ocess can be i n t he cr i t i cal
S  aA { pr int 1 }
sect ion at any t ime
S  a { pr int 2 }
(b) The bounded wait condit ion is sat isfied
A  Sb { pr int 3 }
(c) The pr ogr ess condit ion is sat isfied
Using t he above SDTS, t he out put pr int ed by a
(d) I t cannot cause a deadlock
bot t om-up par ser, for t he input aab is:
51. Consider the following two phase locking protocol.
(a) 1 3 2 (b) 2 2 3
Suppose a t r ansact i on T accesses (for r ead or
(c) 2 3 1 (d) synt ax er r or wr it e oper at ions) , a cer t ain set of object s {O1,...,
47. Consider a comput er syst em wit h 40-bit vir t ual Ok }. This is done in t he following manner :
addr essing and page size of sixt een kilobyt es. I f St ep 1. T acquir es exclusive locks t o O1, ..., Ok in
t he comput er syst em has a one-level page t able incr easing or der of t heir addr esses.
per pr ocess and each page t able ent r y r equir es
St ep 2. The r equir ed oper at ions ar e per for med.
48 bit s, t hen the size of the per-pr ocess page t able
is ______ megabyt es. St ep 3. All locks ar e r eleased.
48. Consider a disk queue wit h r equest s for I /O t o This pr ot ocol will
blocks on cylinder s 47, 38, 121, 191, 87, 11, 92, (a) gu ar an t ee ser i al i zabi l i t y an d deadl ock -
10. The C-L OOK scheduling algor it hm is used. fr eedom
The head i s i ni t i al l y at cyl i nder number 63,
(b) gu ar an t ee n ei t h er ser i al i zabi l i t y n or
moving t owar ds lar ger cylinder number s on it s
deadlock-fr eedom
ser vicing pass. The cylinder s ar e number ed fr om
0 t o 199. The t ot al head movement (in number of (c) guar ant ee ser ial izabi l it y but not deadl ock -
cylinder s) incur r ed while ser vicing t hese r equests fr eedom
is ______ . (d) gu ar an t ee deadl ock -f r eedom bu t n ot
ser ializabilit y
8 SOLVED PAPER – 2016 (SET - 1)

52. Consider t hat B want s t o send a message m t hat 54. For a host machine t hat uses t he t oken bucket
is digit ally signed t o A. L et t he pair of pr ivat e algor ithm for congestion contr ol, the token bucket
and public keys for A and B be denot ed by K x has a capacit y of 1 megabyt e and t he maximum
and K x for x = A, B, r espect i vel y. L et K x (m) out put r at e is 20 megabyt es per second. Tokens
r epr esent t he oper at ion of encr ypt ing m wit h a ar r ive at a r at e t o sust ain out put at a r at e of
key K x and H (m) r epr esent t he message digest . 10 megabyt es per second. The t oken bucket is
W h i ch on e of t h e f ol l ow i n g i n di cat es t h e cur r ent l y ful l and t he machi ne needs t o send
CORRECT way of sending t he message m along 12 m egabyt es of dat a. T h e m i n i m u m t i m e
wit h t he digit al signat ur e t o A? r equir ed t o t r ansmit t he dat a is ______ seconds.

(a) {m, K B (H (m))} (b) {m, K B– (H (m))} 55. A sender uses t he St op-and-Wait ARQ pr ot ocol
for r eliable t r ansmission of fr ames. Fr ames ar e
(c) {m, K –A (H (m))} (d) {m, K A (H (m))} of size 1000 byt es and t he t r ansmission r at e at
53. An I P dat agr am of size 1000 byt es ar r ives at a t he sender is 80 K bps (1K bps = 1000 bit s/second).
r out er. The r out er has t o for war d t his packet on Size of an acknowledgement is 100 byt es and t he
a link whose MTU (maximum t r ansmission unit ) t r ansmission r at e at t he r eceiver is 8 K bps. The
is 100 bytes. Assume that the size of the I P header one-way pr opagat ion delay is 100 milliseconds.
is 20 byt es. Assuming no fr ame is lost, t he sender thr oughput
The number of fr agment s t hat t he I P dat agr am is ______ byt es/second.
will be divided int o for t r ansmission is _______.

AN SWERS

Gen er al Ap t i t u d e (GA)

1. (d) 2. (a) 3. (a) 4. (c) 5. (d) 6. (b) 7. (d) 8. (a) 9. (b) 10. (b)

Tech n i cal Sect i on

1. (11) 2. (b) 3. (1) 4. (0.5) 5. (15) 6. (a) 7. (– 11) 8. (4) 9. (31) 10. (a)

11. (6) 12. (d) 13. (d) 14. (d) 15. (2016) 16. (d) 17. (c) 18. (b) 19. (7) 20. (a)

21. (b) 22. (d) 23. (2N F) 24. (a) 25. (c) 26. (10) 27. (198) 28. (3) 29. (0.33) 30. (d)

31. (456) 32. (33.28) 33. (b) 34. (d) 35. (a) 36. (c) 37. (b) 38. (11) 39. (7) 40. (c)

41. (256) 42. (d) 43. (d) 44. (c) 45. (9) 46. (c) 47. (384 M B) 48. (346) 49. (1)

50. (a) 51. (a) 52. (b) 53. (13) 54. (1.1) 55. (2500)
SOLVED PAPER – 2016 (SET - 1) 9

EXPL AN AT I ON S
Gen er al Ap t i t u d e (GA)
 (
p  r )s
  q  Pr ime Number
1. I will not leave t he place unt il t he minist er meet s 
11
me.
So q = s
2. Rewor di ng of somet hi ng wr i t t en or spok en i s
The pr ime number fr om set x i s 11
PARAPH RASE.
2. L et n l engt h of st r i ng
3. Fi gur at ive st at ement
T(n) = a n
4. r el ft aga car efr ee 10.............. or 0.............
ot aga car eful T(n – 2) T(n – 1)
fer t aga car eless T(n) = T(n – 2) + T(n – 1)
t aga car e = an– 2 + an– 1
aft er car e t aga____. sin( x  4) 0 
Opt ion (c) mat ches i.e. t agazen. 3. lim  for m 
x4 ( x  4)  0 
5.
Appl y L ’ H ospit al Rule :
 cos( x  4) 
lim  
4 uni t
x 4
 1 
cos0
4 uni t   1.
1
4 uni t
4. Tot al pr obabil it y = 1
Requir ed Sur face Ar ea = (6  4) + (8  6) + (3  8) 1
1
= 24 + 48 + 24 So  =1
a x2
= 96 unit s.
1
6. Elegance  (27300 + 25222 + 28976 + 21012)  48  1
 x  = 1
Execut ive  (9999 + 8942 + 10234 + 10109)  173  a
Smoot h  (20009 + 19392 + 22429 + 18229)  63 1
=2
Soft  (17602 + 18445 + 19544 + 16595)  78 a
Execut ive has t he highest r evenue. 1
a= = 0.5
2
8. (i ) is fol lowed.
5. (2 + i ) is an eigenval ue
(i i ) is not followed.
So (2 – i ) wi ll be ot her.
9. f(x) = 2x7 + 3x – 5
So Det er minant wil l be pr oduct of eigenval ues.
Put t i ng x = 1
So | A| = (2 + i )(2 – i )  3
f(1) = 2 + 3 – 5 = 0
(22 – i 2)  3 = 15
So, (x – 1) is t he fact or of f(x).
6. x # 0 = x, x # 1 = x , x # x = 0, x # x = 1.
Tech n i cal Sect i on x#y=?
1. p : x  {8, 9, 10, 11, 12} x y x y xy xy x y x y xy  x y
q : x i s a composit e number. 0 0 1 1 0 0 0 1 1
r : x i s a per fect squar e.
0 1 1 0 0 0 1 0 0
s : x i s a pr ime number.
1 0 0 1 0 1 0 0 1
{x  2}
1 1 0 0 1 0 0 0 0
((p  q)  (r v s))
 ((p  q)  (r  s)) Case  xy  xy
 ((p + q) . (r  + s)) 0
 (p + q) + (r  + s) 1
 pq + r s 1
 ps + r s q  Composi t e Number 0
This sat i sfy t he above 4 condi t i ons.
10 SOLVED PAPER – 2016 (SET - 1)

7. 1111 1111 1111 0101 14. Ex am p l e :


–1 1 1
G: M ST :
1111 1111 1111 0100 1
1 1 1 1 1
1111 1111 1111 1011
1
– 11
2 2
230  2 G : M ST  :
9. = 231 2
2 2 2 2 2 2
So 31 bit s r equi r ed.
10. Both ENQUEUE and DEQUEUE oper at ions can 2
be per for med i n O(1) t ime.  Minimum spanning tr ee of G does not change.
11.  Shor t est pat h bet ween any pair of ver t ices
c b
does not change.
a f 15. int main ( )
{
d e
int a = 2016, b = 0, c = 4, d = 42;
a a b c d

2016 0 4 42
b c
1000 2000 3000 4000
f myst er y (& a, & b);

e
if (a < c)
d
myst er y (& c, & a);
ab ad
myst er y (& a, & d);
c Simi larl y 3 pr int f(“ %d \ n” , a);
sol ut ions are }
f possible her e
void myst er y (int * pt r a, int * pt r b)
d e {
abc abd int * t emp;
t emp = pt r b;
d – e– f c a b d c ef
f pt r b = pt r a;
a b cd ef e a b d ecf
pt r a = t emp;
So t ot al solut ion 6. }
12. f(i , * p) Out put  2016.
void f(int , shor t ); 16. S  aS | bS | 
void mai n( )
S  , S  a, S  b, S  aa
{
S  ab, S  ba, S  bb ......
int i = 100;
H ence {a, b}* .
shor t s = 12;
17. L [N 1]  L [N 2]  – undecidable
shor t * p = & s;
f(i, * p); x  L (G) – decidable
} L (G1) = L (G2) – decidable
13. Wor st Case L [M ] =  i s also undecidabl e.
I nser t i on sor t  O(n 2) 18. (0 + 1)* (00(0 + 1)* 11 + 11(0 + 1)* 00) (0 + 1)*
M er ge sor t  O(n log n) 20. Shor t est r emai ni ng t i me fi r st mi ni mi zes t he
Quick sor t  O(n 2) aver age wai t ing t ime in t he r eady queue.
SOLVED PAPER – 2016 (SET - 1) 11

21. Super k ey a99 = 6  992 + 2  99 + 6  982 + 2  98


= Candi dat e key + Ot her At t r i but e of set + .... + 6  22 + 2  2 + 8
= Pr imar y k ey + Ot her At t r ibut e of set . = 6[1 + 2 + 3 + .... + 992] + 2[1 + 2 +... 99]
2 2 2

(99(99  1)(2  99  1)) (99(99  1))


Gi ven, Pr imar y k ey = VY = 6. 2
6 2
So, VXYZ, VWXY, VWXYZ ar e super keys except
= 99  100  199 + 99  100
VWXZ.
= 100  99 (199 + 1)
22. A C I D
= 2  99  104 = 198  104
Durability

value of K

I solat ion 28. M axi mum number of dist inct values f t akes is
Consistency only 3.
Atomicity
1st  f(1) = f(2) = f(3) = f(4) = f(8)
23. I t i s 2N F because i ni t i al l y i t cont ai ns par t i al
2nd  f(5) = f(10)
dependency.
3r d  f(6) = f(7) = f(9)
24. I n DNS (mappi ng of I P addr ess & U RL )
Remaining all ot her n val ues wil l pr ovide only
I P address URL one of t hese t hr ee val ues.
197.12.0.7 www.xyz.com 1
29. Pr obabili t y =  0.33 .
25. FTP and POP3 ar e non-H TTP pr ot ocols 3
R
These ar e st at eful appli cat i on layer pr ot ocol s.
30.
26. (x3 + x4 + x5 + x6 ...... )3 O 0 0 2×1
2×1
3 X
 x  R 1 MUS 1 MUX
   x  x2  S S
1  x 
3
 x  x(1  x)  x2 (1  x) 
P Q
  
 (1  x)  P t hen 0  P 0 = 0
3
 x  x  x 2  x 2  x3  P t hen R  PR
  
 (1  x)  Q t hen R  QR
 x3 
3 Q t hen (0 + PR)  Q(0 + PR) = QPR.
   X = QR + PQR
1 x 
3 31. Dat a Count Regist er of DM A cont r oller = 16-bi t s
 x3 
 Coefficient of x i n 
12
 Count Val ue = 216 = 64 K B
1 x  Number of cont r ols t o t r ansfer = 29154 K
3
 1  456 t i mes Syst em Bus cont r ol i s needed.
 Coefficient of x3 i n  
1 x  33. Ti me t o per for m addi t i on usi ng t hi s adder i s
 Coefficient of x3 i n (1 – x)– 3 O(log n).
x2 x3 34. b ! = a
f(0) + xf (0) + f (0)  f (0)
2! 3! 35. Count (3)
f(x) = (1 – x)– 3
f (x) = + 3(1 – x)– 4
f (x) = + 12(1 – x)– 5 d=1 pf(3) pf(1) d=2 Count (2) pf(d)
f (x) = + 60(1 – x)– 6
60
Coefficient of x3 i n (1 – x)– 3 =  10 d=2 pf(2) pf(2) d=3 Count (1) pf(d)
3!
27. a n = 6n + 2n + an– 1, a1 = 8.
2

a 2 = 6  22 + 2  2 + a 1
d=3 pf(1) pf(3) d=4 pf(4)
a 3 = 6  32 + 2  3 + a 2
= 6  32 + 2  3 + 6  22 + 2  2 + a 1 Ou t p u t : 3 1 2 2 1 3 4 4 4

12 SOLVED PAPER – 2016 (SET - 1)

36. m (3)
46. S

a = 1 a = 3– 1 = 2 n (2) a A pf(1)
a = 1/2
x = 2* 2 = 4
S b pf(3)
Ou t p u t : 4, 2
a pf(2)
37. I n a Bi nar y heap
The r e-fi x t ak es logn t ime
H er e d i s dept h 40-bit s

H ence O(d). 47. V.A. : Page # offset


14-bit s
38. 5
48-bit s
P.T.E. :
A 2 B 6-Byt es

P.T. si ze = #ent r ies in P.T. * P.T.E. si ze


5 240
8 8 = *6
214
= 226 * 6
= 64 M B  6
C x D
= 384 M B
Smal lest pat h bet ween C & D is 12. 48. 0 10 11 38 47 87 92 121 191 199
So maxi mum possi ble val ue of x i s 11.
63
39. 5

3
1 4 Tot al head movement
= (191 – 63) + (191 – 10) + (47 – 10)
= 128 + 181 + 37
2 = 346
H er e 3 can’t be t ak en because i t wil l pr oduce a 49. Fr ame size = 10
cycl e so t ak e 4. Sequence {a1, a2, ..., a20, a1, a2,...., a20}
This solut i on is 1 + 2 + 4 = 7  Fi n d di ffer ence of page faul t of L I F O &
40. Bot h I and I I opt i mal page r eplacement pol icy.
41. for n = 16. Consider a small case :
Al gor it hm r uns whil e loop 16  16 = 256. Fr ame size = 2
42. a can be 0. Sequence = a1 a2 a3 a4 a1 a2 a3 a4
b can’t be 0. L I FO :
43. St r i ng wi ll be of for m anbn a1 a2 a3 a4 a1 a2 a3 a4
45. 2 – (5 + 1) – 7 * 3 a2 a3 a4 a4 a2 a3 a4
2 – (6 – 7) * 3  7 faults
a1 a1 a1 a1 a1 a1 a1 a1
2 – (– 1) * 3
F F F F H F F F
3* 3=9
SOLVED PAPER – 2016 (SET - 1) 13

Op t i on al : 54. C + ps = mS
a1 a2 a3 a4 a1 a2 a3 a4 1M B
a2 a3 a4 a4 a4 a4 a4 S= = 0.1 sec.
 6 faults (20  10)M BPs
a1 a1 a1 a1 a1 a2 a3 a3
Dat a t r ansmission in 0.1 sec.
F F F F H F F H
= 0.1  out put dat a r at e
Differ ence = LIFO page faults – Optimal page faults = 2 M B.
=7– 6 Dat a Remaining = (12 M B – 2 M B) = 10 M B.
=1
To t r ansmit 1 M B 
t akes
 0.1 sec.
Si mi lar ly for :
Fr ame size = 10 10 M B 
 10  0.1 sec.
Sequence = a1 a2 a3 a4 ...... a20 a1 a2 a3 ... a20 Tot al t ime = 1 + 0.1 = 1.1 sec.
Difference = LI FO page faults – Optimal page faults
= 31 – 30 out put L
55. Thr oughput = = T + T
=1 t ime dat a ack + 2Pd

53. I P dat agr am = 1000 byt es. 1000  8 1


M TU = 100 byt es Td = = sec = 100 ms
80  1000 10
I P header = 20 byt es. 100  8
T ack =
100 8  1000
M TU 1
20 80
= sec = 100 ms
H Dat a 10
1000
= = 2500
100  100  2  100
 1000 
Number of fr agment s     [12.4]  13
 80 


You might also like