Professional Documents
Culture Documents
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)
(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
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 ?
} (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
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.
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)
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
x4 ( 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)
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
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 QR
x3
3 Q t hen (0 + PR) Q(0 + PR) = QPR.
X = QR + 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
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