0% found this document useful (0 votes)
25 views10 pages

Gate 2001

The document consists of a series of one-mark questions related to computer science and engineering topics, including propositional logic, matrix theory, automata, and memory management. Each question presents multiple-choice answers, with only one correct option for each. The questions cover various concepts such as equivalence relations, context-free languages, and algorithm complexities.

Uploaded by

Anjali Maurya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views10 pages

Gate 2001

The document consists of a series of one-mark questions related to computer science and engineering topics, including propositional logic, matrix theory, automata, and memory management. Each question presents multiple-choice answers, with only one correct option for each. The questions cover various concepts such as equivalence relations, context-free languages, and algorithm complexities.

Uploaded by

Anjali Maurya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

j G,\TE - 2001 1 ol 111

I COMPUTER SCIENCE & ENGINEERING


SECTION A d. R I, R2. R3 a~~d R4 are all e<Jui valence
relauons
ONE MARKS QUESTIONS (1· 25) 3. Consider '" o \\'ell-formed fomtulas in
propositional logic
This quesrion consbis of (TWENTY FIVE) snb· F J: P => ~P F2 · (P= -.Plv(-.P=>P)
questions (I - 2S) of ONE mark each, For eacb of Which of the following statements ts
the sub-questions. four poSs1ble> mlS\vers (A, B, C correct''
and D) arc gh•cn, out of which only one is correct
Answer each sub-question by dru'kcning the a. Fl Is satisfiable. F2 IS valid
appropriate bubble on the OBJECTIVE b. F I ls unsatisliable, F2 is satisfiable
RESPONSE SHEET (ORS) using a sot\ HB c, Fl 1s unsatosfiabl e, F2 is valid
pencil. Do not use the ORS for any roug)lwork.
You may like to use the Answer Book for any d. Fl and F2 are both sat1sliahle.
rough work. If' needed. -1. Consider the foUo"ing t\\ o statements:
I Cons1der the following statementS' Sl: 10~11121 I is a regular language
S I The sum of two singular n x n matrices S2 : (O"'I"l)"" I m <!: I and n ~ l f is a
ma~· be non-si11gular regular l::mguage
S2: Tioe sum of cwo n x n non-singular Wh1ch of the followong statements os
mal rices may be singular correct'
Wh1ch of the followmg statements 15 a Only S I is correct
correct'!
b. Only S2 is correct
a. S I and SZ are both true
c. Both S I and S2 are corm<: I
b. S 1 is true. S2 is false
d. None of S I and S2 is correct
c. S I is false. S2 is moe
5 WhiCh of the follo\\'lng statementS is tn1e'/
d S I and S2 are both false
a. If a language is context free 11 can
2. Consider the lolloMnS relations: alwavs be accepted by a detennooost1c
Rl(a, b) iff (a + b) IS eren over the set of push·down automaton
it1tegers b. 11te union of two context Ji·ee
R2(a. b) oiT (a -1 b) is odd over ~~• set of languages Is context free
integers C. The intersection Of tWO COillC~t free
R3(a. b) iffa.b > 0 over the set of non·zero languages is con1exc Free
rational numbers d. The complement or a context lree
R4(a, b) iff 1 a - b 1 s 2 over ~1e set of language is context free
natwal numbers 6 Given an nrbitrruy non-deierrninistic finite
Which of the rol lo"1nJl statements is aul.omaton (NFA) with N states. the
COITeCt1 maximum number of states in an
equ11•alen1 m1111ml/.ed DFA is at lease
a. R l and R2 are equivalence relations.
R3 and R4 are not a. N1
b. R I and R3 are equil alence relations. b. z"
R2 and R4 are not c, 2N
c. R I mod R<l are oquH alence relations. d. NJ
R2 and R3 are not
.!ul lll
7 More than one lhtrd ore put in one unoho a. xy - y z.
block to b. wx'y' - 1\)' - xz
a. Exploit fhe ternpnrol loeolity M c. w'x: .. y'z + xy
reference· in a program
d. xz._ - ~
b. l!xploit l11e spatiulloculity nf n:lercuce
1n a program 12. A processor needs software interrupt to
c, Reduce the mif<l pe1talty o. Test !be interrupt ~)'stem of tho
processor
d N11nc •1f the above
b. Implement co-routines
8. Whtcb of ~10 fniiOWIIljl. sllllements is
tltlse? c. Obta1n system scrvi~es which uel:d
c.:·XCGution of privileged iuslrucllons
a. Vir1unl memory implements the
translation of a program's Ctddrcss d. Return fronL subroutioe
space into phys1cru memory address IJ. A CPU has 1wo modes · privi lcgc<l aud
space ''"n·pndlcgcd. In a rdor to change tlic
1>. Virtuul memO!)' nll<lws euclo tll'ngt:lnl mode fl'll lll privileged I•Hon-privOeged
lo e><c"ed tl1c size of the prun:uy it A hardware iolerru~t is n~eded
memory b. A software intcm1~t 1$ needed
c. Vir1ual memory incrensesthe degree of '· A privileged instruction (wbfc b llocs
mulliprogromming nul gcncmte ''" interrupt) Is needed
d. Virt11al memory reduces the context ll. A ll<ln-privi leged instruetion (which
switching ovcrho3d docs not geoemte nn intemopt) is
9. A s luw momory CU1I be connoottd l(l 8085 needed
by USUI!' 14. Randomized quick.sor1 1s an extension of
a. INTR qwcksort where the pi vol i.< cboseu
mndomly. What is the worst case
b. RESET IN
complexity of sorting H numbt:·rs lL~ing
c. HOLD nUldoutized quickson'/
d. READY a. O(n)
10. Suppose a processor dues utlt buve any b O(n lg u)
stack paintor register Which of tho
c. O!u')
tollowiog statemenl!; is true?
d. 0(n 1 J
u. II cnnnl)l have subroutine cnll
instruction 15. Com;jder an nrrny l'ep l c~urntlou of an n
clement bi nary he-•p where the clemeul.<
b. It csn bal'e subroutine cal l instruotio1t.
are stored from iudex I lv iudcx n uf tho
btu nu nested subn)Uiine ~.ails :1m1y. Fur 01e clement stonld at lntlex i of
c. Nested subrm~inc coils nrc Pl"'ihlc. the urruy (i S n). 1)1~ ind•x ofthe parent IS
but intenupts urc no1
3 , i ·I
tl. All secrneooes o r srobrout[oe c>~ll• sJlcl
also interrupts rut possible b. Li·2 J
II . Giwn tht' ft>llowing Komaugh ruap. wh1eh c. r ii2l
one of the following re~>resc1\ls the d. (i I jl2
niinlmul Sum·Of-ProducL~ of tht 11iop? 16. 2 11
Lei l{n) = n 1!' nand g(nl = n(lg n) ' be
two posHhc functions ~r n. Wl1ich of tloo
~ 00 01 II 10 lOllowing !'t1alemc-nts IS ~orrcct''/
00 0 X 0 X
01 X 1 X I a. f1 n) - f)(g( n l) and g(n) 1' ()( 11 n))
II 0 X I 0
IG b. g(n) = O( l(u)) and JtnJ"' ()(g(u)l
0 I X 0
~ ul Ill
c. fl n) "" O(g(n)) and g(n) F CJ<I\n)) 22. \Vltich of th< lollowing l'C(tulres u device
d. 1l u) = U(g(n)) aud g(ll) O(l!n) ) driver?
~. Register
17. nte process or assigning load addresses lo
Lh<> v;uious parts of ~t~ progr;uu and b. C•cl>t
adjusting the code and d;~tu in the program c. Main memory
to reflect ~•eauigned o.ddresses is c;,llcd
d. Disk
a. .'\.<sembl~
23. Cons ider a sc.betn(o R(AJ H .:J.>) ond
ll Parsing fU11ctionol dcpend~noies A >R oml C >0.
c.. Relocation Tit<:n llte decomposition of R into R , (AB)
d. Symbol re!olutioo and R,CCD) i>
I!;. Which of the follttwing siJJtements is a. Dcpendenoy t>re.~ervin.g •nd 'lou les,.
fa lsc1 join
n. An uoambiguou~ grammar has tho b. Losslcss join bu( not dcp<nd.mc)
sume lefunost and righlmo•Lderivation preservmg
c. Dopcndutcy P""'••~•ing but not
b. An LL( I) parser is a top-down parser
lossless JOin
c. LALR ill more powerful than SLR
d. Not dcpcmloo~y Jll"'l!crving Atld nnL
(l An ambiguous granunar can never be loss I""• jQi.tt
LR(k) for nny k
24. Suppose ~1e adjacency relation of v.:•tices
19. Consider a set or n '"sks I• ith known ito • @'ll t>h is represented iu a table
1untin1e1. r1. ... .. th to be run un :.
r:.~ Ad,j(X..Y), \\'hJch of dte followlnll qoen es
unipro~n t m:tchinc:. \Vltich of 1hc cannot be expressed by a rclotional rugebt-a
litllowing lJl'OCe<~M •chetluling olgmithms expression of conslltnllcngtb'l
will n:suh inlltt: maxJmW11 Um>ughpuiY
a. L.isl all vertices adjacent to a given
a, RoU11d·Rohin \ ' 1!11CX

b. ShorlllSL·Job-Fit~l b. f,ist ~II vertices which hnvc ~~If loops


c, lflghest·R.:spo~c-Rntio·N<~:-1 c. List oll ,-crticos wbioh bdlong lo cycl<s
1l Pil'l)t-l:() one-First-Serv~ of less lhnn Uu'ee verticO<
20. Where docs ~to '"'"I' space reside? d. LisLnU \'crticcs roacublc from o gn on
verte.x
a. RAM
h. Disk 25. Let r •nd s b~ two rclol.iono <>V<T 11to
rebtiou sc,ht.-m~ R arid S I'Cf.lpectivcJy. ;,nd
c. ROM let A be •n attribute: in It '!'hen the
d. Un-chip Cilch" relational al.gebro expression a • .,. (r 1><1 s)
21. Con~ide-r n vi.rtnnl memOI)' syl!.tcm witJ1 is •lwoys "'jU3 I to
FIFO p:og~ rc;placcment policy, For Jn a. GA,.(r)
.trbitrary 1'"8" >cces• paucru. iucr=ing b. r
tho uumbct of p>go fr;un..,; i D:IJ)ln momory
wnl c. a.,.(r) 1><1 s
n. AJways dccr\:45tl Ute nuntbc:r of pagu: d. None of the .ohnve
fitults
b. Always incn;as-, Utf: number of pngc:
f.tuhs
le'a·l /lt ' ,1 ;~ 1·\f l ~ $st·1:fff{ t.J·ll
'ntis question consist~ of (TWENTY FIVE) s11b·
e. Somctin'lt:.s iucre.a.Se lho. nurnUcr uf
qu,.lion• 126 • 50) uf TWO n10rl<s c;lch. For each
page faults
of tho ~~~b~uesliollJl, fout' puss ible •n•wOfs (II, B,
tl. Never afleet Ute number of Jl•g~ faults C and 0) are gh·en, ""' <tf which <>nly nne is
correc t. An.swcr e-•ch su1,.qu~tloo by d:trkcning
·1 of lO
the approprii~l.e bubble on Uoe 06JECTTV8 ~. 8
RESPONSE SHEET (ORS) using a soft PIB l> 1,1
penci I. Do no! use the ORS for any rough work.
Yon may ~ke I<> 11se tJ1e Answer Book for any c. L5
rough work, if needecl d. 'IS
26. How man)· 4 digit even numbers have all •I 31. Consider the followitlg langt•tges·
digits distiltct? Ll ={ww l W E {s,b)• )
a. 2240 f.,2 - (.w~ j we! <~o)•.~is ~h~ J'i:\'<r'c ofw)

b. 22% U - (if I i i• ill> iul<ycr)


lA - (~I i i• !fl1 inltgcr)
c. 2620
Which o f1J1e lan~uages. are re~tulat?
d. 4536
27. Consider !he foll owing statt~tle llts~ a. Only Ll and L2
b Only L2, L3, and V I
S I: '!'ham exist infinite s~ll! A B, C sucll
thai A n (B v t:) is finite. c. Only L3 and L4
S2: Tlum exi~t· two inational munbers x d. Only 1.3
andysnch that (x + y) is r.alionaL 32. Consider l:lle f'Qll owing pr<'l>iem X.
Which of the following is lrue abo111 S I Given a Tudng machine M O""f the input
and S2'? alphabet L:. any slnto q of M anda word w
a. Only S I is correct e '!:*, does lite c<lmpulatiOTo of M on w
b. Only S2 is correct visit the stale q 7
c. BotlL S I and S2 are correct Which of l11e fullowing statements about X
is correct'?
<L None ofS l and S2 i.t<eoo·ect
a. X is decidable
28. Let f ; A - > B he a n mctlon. and let E an(l
b. X i.s urodecidable huJ partially
F l1e subsets of A. Con&der the following
decidable
st.Jtemen\s about mJage•.
c. X is undecidable and not even partially
S 1: f(EuF) = !(E) u f(F) decidable
S2~ f\Er.F) = f(E) r dtF) d. X is hot a deci&on problem
Wlrich of 61e following is lrne about S 1 33. Comider tlte following circuit witlo initial
and 52? =
slate Ql), = Q1 0. The D Ftip-Fiops are
a. Only'S I i" corre<'l positive edge lri.ggered and nave •el np
b, Only S2 is correcl tUnes 20 uanosecond 3lld !JOid tlloies 0.

·:.~r
c. Botli S 1 and S2 are correct
cl None ofS I and S2 is col'l'lXlt
29. Seven (distinct) car accidents occuned in a
week. Whal is the -probabilfly !hat tJ1ey nll
o<Jcorred on !he srune day 7 c
a. Jn 7 Consider d1tf fcllowi.11g timu1g disgr>l!lls <lf
X !llld C; the d ock period of C ~ 40
b. tn•
nanosecond Whicll one IS the correct plot
c. J/21 ofY?
c1 7tz7
10. Comider a DPA over· L: = (u,. b)
aoocptit~g all s11in~ wlricllliavc number of
a's di\~s ihle by 6 and number c.f b"s
divisible by 8. What is the min.i.nJUIII
number of statesdJattlte DFA wi.ll luwe? a.
5 of Ill

IH~----t-
37 C(>nsider IJ>e clreuit £iven bei0\1 wi th
Initial state; Q0 = I. Q1 = ~~ = 0 The; .slate
of the circuit is given by th~ val u~ 4Q:
b. 2Q, Qu.

-tll-+---+--
d
Which one of tho following is the ~orrcot
___._~_l-----1L sune ~quem:e. ,.,flhe circuit?
34. Which os the most nppro,-iale mulch lbr a. 1.3.4.6.1.5.2
the olcms in the lirst column wi th t·hc item ~ b. 1.2.5.3.7.6,4
in the .sccom..l column?
c. 1.2.7,3.5.6.4
X, lmlirect Addressing
d. 1.6,5.7.2.3.4
Y , lnde,.ed Addressing
38. Consider U1e following dalapatlt ul u
Z.. 13ase Register Addressit•l! >iruple non-pipollnod CPU. Tbc registers
t Anay impleruentaliou A. B. A,. A,. MDR.. the bus und the' ALU
n. Writing relocotoble oodc arc 8-bot wide. SP UJld MAR :tre [(,..bit
rel/)sters. The MU X is of size 8 x (2 : I)
Ut Pn~si "ll ~n'!ly '"' J~orumeler ~nd ~te DEMUX ~~ of size 8 x (1 : 2).
IL (X. Ill). (Y. 1). (Z. II ) Each memorv operation rakes 2 CJ'U cluck
b. (X, II J, (Y, III), (7. I) cycles :111tl uses MAR (Men>ory Address
Register) and MDR (MemO!)' Data
c. tX. I U~ (Y.II~ (Z.. IJ Reg1ste• ). S P Cllu be decremented ICI"'llly
d. (X, I), (Y. U[), (Z.. I[)
35. The 2's complement represent:otiool M (·
5.l9) in hesadecimol is
a. ABE
h. nne
c. OE5 The CPU i11~1nultion ·•push C. where r ~ 1\
d. 9E7 or B. hus Ute specilicsrion
36. Cousoder tJ>c Circuit 5hown below. Tho M [ SP]<-r
(lltlpur of s 2: I Mux is l!I\'Cn by tlto SP.....SJ>-1
Junction (nc' - be), How mnny CPU clock cycles UN ne0l!ed
• tr>c)(ecute tl1e "pusb r'' instruction?
1-
~. 2
0 b c
b. 3
c. 4
Wbicb M tbe following Is true'/ d. 5
u, r=sl'- -a 39 Ctm!Sider un untlirectt.-d unweighted _gruph
b. t' - xl ' x2 1 J<lx2' 0. Lttt. a breudth-t:irsl 1roversul of G be
done >1nniug from a node r. Let d(r.u) nnd
c.. f = slx2 + x l·a·
d(r,,,J he the longtbs .,r the shorrcst paths
d. r- xl ~ x2' from r U> 11 and v r~spectivel y in G. If u IS
11isited betore ,, duriJlg tl>e breudtlHirst
6ol 10
IJ'tlvcrsal. which of Ute following 1'21 ... •& ( - 1
sllltcmunls is oorrecl'l I
.......
.,. .....
n. d(r.u) < d(r.v)
b. d(r.u) ' d(r,v)
..... ,..
c. (l(r,u)S<~r,v)
d. Nouo <>f tl"' above .... ,..,
,. = ,..., _ _ _ lk
·10. !-low many undirected graphs (not
!lcocssarily corUiecled) can l)e constructed
· -10;
out or"
vct1ices?
given set v ~ l v., v,, ..... v,. I o( u -""'
WhiQh of the nbove lhr.:e functions nre
8. n(n· l )12 likely to eonse prohlems 1\ith pointcn<?
b. 1' •· OnlyP3
o. nl b. C)nf)' Pl nnd P3
d. t'IJ>·l• 2 c. Only Pl nnd P2
41 "1tat i~ tlte minimum numher of slack.• of d. Pl. P2. and P~
size n required to irnplemo:nl ;, !JUt!Ue of ~4 . Comider the foUowing prognun.
size n? .._n
. . . :lot;
a. Cine
..... 2

•wt••:la)

.....
-

b. Two
a • s+li
c. Tiu-ee
d. Four
-1:1.. Wb~t i> printed by !be print s!alements In
the prog.nun PI-assuming <>ull by N f =
pttnsn~c:tcr vms~ing?

J'nlcr-PI()
I lletla
... 't. ..... P1

...
lt • 10; ft • tO;
0;
'Y - 3;
f'unel( f , X, X);
print x; If litelt11tg~gc has dyuumic >coping and
Frillt y; prunmeler:. ore pnl!Sed by retbrenC<:. 1\ilnl
will be printed by the progrom?
• . 10
fuocl( " · ,, " )
I b. II
c. 3
l d None of the above
~5. Wlucb of the foUowing doe> not interrupt
n. 10. 3
a running process?
b 31. J
11. A device
0. 27. 7 b, Timer
,1, None of lhe above
c. Scheduler process
-13. Consider Ure following Uuve C functions.
d Power failure
trl) .... , , _ ,
I
Conside.· ~ maobine \~iUl 64 MB physi~l
m<~mory nod n 32-bil virtual uddress spa~e.
If the J>rl~c size is .IKB, wh:~t is lhc
npprox<rnote size of ll1e pnge tahle?
7 elf I 0
a. 16MB Wllic.ll of the following is poss:ible if a
b. 8MB tuple (x,y) i$ deleted?
c. 2 Ml:l a. A tuple (Z, w) with :t > y is deleted
d. 24MB b. A 111ple (:r., w) with r. > xis deleted
47, Consider Peterson's algod~ur1 for mutual c. A tuple (z. w) with w < x.is deleted
exclusion between concurrent
two d, The deletion of (x; y) is prohibited

-___
pfOC<J$Ses i and j , The prog:rum executed
by process iis shown below.

.. lil · -
- ·.1:.
-(Pl.. _ ,..... ____ _ SECTION 8
Pl¥2 MAIUCS QUESnOifS (51 & 7 0)

11111- -----
1111{11 • -

For the J>rogra:nJ to guarantee mutual


exdn!<ion.. the predicate Pin tlte while loop
This sec-tion cons.ists of TWENTY quesl'i ons of
FN E marks eacb. ANY FTFTEEN out of these
questions have 1.1> be llnSWered on Ute AT>swer
Book pmvided.
5I AnJ:wer the following:
slmold be a. Prove that p owersct (A 1"'1 B) =
powerse1 (A) r-. powetset (B)
a. flag l.il "' tflJe and turu =J
1>, l,et SIIDL(J1) = 0 + 1 + '2 ~ ,.,, + II lO t ai l
1>. flag [j] =true and turu = j
natural numbers n. Give an induction
c. flag [i] = l.rue and hun = j proof to show that the following
cL flag [i] = Lme and turn= i equation is ln1e t\1r nlluahmd number•
n1 and u :
48. R(A, B, C, D) is a relation Which of tlte
following does not have a losslessj om, swll(m + tO = sum(m) ~ ~Uil>(>l) + mn
dependency presetvi.ng BCNF 52 . Consider tho function k N x N ~ N so
decomposition? Dtat lt(a, b) = {2a + J)2" - 1, where N =
a, A~ B,~D (0, 1,2,3,... ) is the set of naturalmnnbcrs .
b. A-+aB-+C,C-40 a. Prove tltat 1lte function his an Injection
(one-one).
c. AB~,C~AD
b. Prove tl>at it is also» Swjectio11 (onlo).
d, A~BCD
53. Cor1struct DFA 'a ff.lf the following
49. Wl1icll of lite tbUowing relnlional calculu• laugnages:
e.'\1Jressions l$ not safe?
a. L = (w(w E (a,b)*, w has baab as a
a. { ti3u E R1(t(Aj = u[A]) Y1 - .3s E
substring )
R2(t[A]- s[Aj)}
b. L- {w I w E: {a, bj*, w hag an odd
b. {!i'Vu "' R,(ufA l = ''X." :::>3so; R2(t[A] rlwnber of a 's m1d aJl odd number of
= s[A) 1\ s[A)u[AJ))) l>'s)
~- (q..,(te R 1)) i4, Qjve<Jdeterministic l'DA for the language
cl {tl~n ~o R1(t [A]-u[A]) I\;Is "' R2(t[A] L= ( s"cb2n I 1121)
=•[AJ>)
ov«r dte alpltabet ~ = {a, b, c). SpeciJY tlte
50. Consider a relation geq 1vltich represents acceprance stnte.
''greater th1111 or equal to", that ts, (x.y) E
55 . Le.t n deci•ion problem X be defined as

--1"1
geq.oTll y ify <: X-

(• l'*Ff IOilllill
.. .... IMilllllll
follows.
X · Given a Turing machlne M over L and
any word w E L:*, does M l oop tocever on
pria!Yb:ytJ W'/
lo<cipi;oy(ob)IUfa ..... JIIIGGdelolo ....... )
8ofJ IJ
You may assume ilJul tll• hulling prnblem d. Hmv many uddrll.'ls biu; ure rllquired W
or Turing muohino is uodt>ciduhle but lind tho byte oO:<et within a cuch<>
pnrtittlly decidable. block'!
n. Show dtat X is undecidable. e. What Is Ute total amount of extra
memo~ (In byt~s) req11lred t(>r the lug
(>. Show lhul X is not cv~n purtiull)·
decidable. bfts?
56. Consider u <It~~ with fbllnwlns 58. Ao.•wcr rho folio"~ Ill!
SJ'Ie·Cilicatilln~; 20 surface"' 1000 a. Is U1e 3-vuriablc function I' = ~ ( 0, I.
tm<>kSJsurlb~e. 16 secl~rsi tr:tck. dakl 2• .J) its scif-dunl? Jus tif) vour answer.
densil) IKB/st.'Ctor. roL~Iion sp;:ed 3000 IJ. Give n minimal pruduct-u(~~i\1111 forut
rpm . The opcroring >'Y~tcm iuitiutes- the of the b, output of Llt< following
l'rnnsfer between the dis~ und the m~m•JIJ excess.-3 1o DCD couvet1er.
sector-wise. Once tile hcnd hns heen
placed on the right LnJcl:. t.hc disk reads u
sector in a single scan . ll read• bit;; fr<•n• IW:<a•J
lite $0Clor while ~'" head is f"lliSing over To
lite sector The read bits ore ft>mtcd into BCD
by1es in a serial-in-pnrullel-out bufter und
each byte ts then trJnsfctTcd to memOI)'. 59. /1 ~equenttul circ~il tnkc>S uu mput Strt!a ltl
The disk \vriting IS exactly o
complementary prO<:css.
of o·s
and I '~ and produces an output
s1renm of 1)'5 and i's. lnrtlally It replicates
For pans (c) rmd (d) below. a."<Sttmc the input un it~ ')utput until twv
memory rcnd·writc: li mo - 0.1 mioro consecutive ()'s nrc oncountcNd un the
secondlbytc. mtcmtpt driven tmnslcr has input. From then onword it produces an
au mtcrrupl ovt:rheatl = ().4 tnicro-seconcl, output stre:uu whi"h is the bit-ll'ise
UJc DMA iuitialitJltiolt nnd lonuuwtiou cmnpleme1H uf IIIIHII strenm until u
ol'crhcocl "' ocgligibk oomP"rcd to tlto encounters two consecutive l"s, whe.n:upon
totnl sector trutL•fer time. DMA requests U1e prucess n:pe:il>. Au cx11uple ..,( i11pu1
ore uh1 uys grauteJ. and output weam i~ ~lll>\l'tl below
a. Who! is 1hc tntul ca.pacity oft~o disk?
· ··- JO II OOI OtOOt l tt! Otl
b. What is the dntn tronsJilt· rate? no......., I 0 II OOjt 0 tl 0 I 0~0 I t

e. Whnt is the l"'reentago l•f time tl•c S-K master-sial~ l1 ip-llops ora tCI be used
Cl"ll is required for this disk tlo tl>r to desig n the Clrcuh.
bylc . . wisc interrupt driven lrun.stcr'f a. Give Ute smle transition dingram .
cL Wltru i~the ntll.~IUUUI f"'TCenllJge (tf ll. Gh'e the minlmized sum-ot~rrl>duct
time tltc CPU is held up For this disk expressions for J <illd K inputs of ono
iro for cyclc-stoul i ng DMA tmnsfc.r? of its state !lip-Oops.
A CPU bas 32-bit memory address und o 60. Consider u 5smgc pipeline - IF ( ln.~lntction
256 KB coche memol)'. l'he cache is Fetch ~ 10 (Instruction Dccooc and register
orgnliiled as a 4-way scL;\ssociative ~chc rcnd1 EX tJ;xccuto ~ MEM ( Memory). and
with t.uche hind.. Nizcof Hi hytes. WU ( WrJ IO back), AJI ( IIICIIIO'Y Ill n:gis(cr)
n. Whnl Is the num~r <>f sets w the rends tnke place iu Ill< sccoud phase o f u
cuche? clock oycl ~ aod writes occur 111 Lhe li rsl
b. Wbul ts tho si.<e (in bits) ol the lag phase of Oto clock cycle. Consider tlto
lieiJ ptlf cnche block? exe<>ution of the foll,llvi ng tnstructiou
S(..-"l.JllCI\Ce~
c. What is the number and <i<e of
comparators rcquircuJ ror tllg
II : oob r:!. rl . l'l: ,. a._ rl - .C •1
12 : ... 14. r2. I(); ,. 14 ~ r:!.-tl •t
OJ31Chlllg'/ D : "' r2.1CIO!tll ,. Nlrl • lOili o- t! •1
....... 13. ....~ ,. 13 ... ~ -a •t
9 of l O
a, ShOI~ all da~. depeltdettL11!S oetweeJI n6, 3), (Jl2, n4, 4), (n2, n5, 12), (Jt3, n4, 7),
dte four instruction!<, (n4, n5, 9), (n4, n6, 4)). The third qalue in
b. ldenti!)r the data hazards. each t·•q,le rt.<presenrs lhe weiehl of lhe
edge speci tied in the lnple, -
c. Can all the ltazards be avoided by
forwaJ'ding in tlris case? a. List the edges of a mirumom ~pannins
tree of the graplL
6 1.
...........
Consider the following C program!

I
~

w~~"W> .....-.r.
b. How lnany distinct minimum spanuing
trees does this grnph have?
*'C.t+l)t c. Is lhe ntininlllll1 nmong the ed'ge
llbo(a + I );
...~.oflll)o
weights of 11 mulimwn spamcing lree
un&que over all possible minimum
spmming ~ >Jf a graph?
d. is the ma:cimum runong the edge
weights of a minimiJJII spanning h:ee
a. What will be Ote oulpu1 of ~1e ~nique over all JlOssible minimum
progrartt'l spanning trees of a graph7
b. lf abL{s) is caDet! with a nuH- 6<1. C'ousidlll' llte following grammar wiOt
ll>rmin"ted string s ,,r lellJ.!Ih 11 lemtinal alphabet !: = {a, (,), ~, •· } and
characters (not comrting the null ('\0") simi sym~ol A. The production n~es of lite
character), how many characters will grammar are ~
be printed by abc{s)? E4aA
62. An::wer tlle foUowing ; E4(E)
a. I.Jt.'<ldt the foDowillg keys oue hy one A~+E
in to • b inary .s~¢arcll lree in U1e order
sveci fied. A4*E
15, 32, 20. 9. 3, 25, 12, I A4s
Show the final binary search tree after a. Compute the FIRST and FOLLOW
tlte· insertions. sets forE and A.
b. Draw the binarv search lrec after b. Compute the LL( I) parse mble for cl1e
deleting 15 ftum ft. gT\IITlffiaJ',

~. Ce>mplete the statement.• S I, 82, and 65. Tlte synlal\ oftlie repear-w1til statement is
S3 in tl1e following timed on so rhallhe given by the following grammal'
function compnte$ lhe depltl of ~ S ~ repe<Jt S 1 unfU E

____
llu1ary trlle rooted al L
c:noW_ _ ,

,,_
......,
!OIIoor.,
where E stands fur expressions, S and S1
stand tor statements. The non· terminals S
and S 1 have an a tlribute code Omt
represents generated code. The non·
-.·,cm.o tenninal B has two attnoutcs. The attribute
I cod.e represents generated code to evaluate
llla.r. the e:q,>t·ession arul slote its truth value irt n
l( p- ~-o.
•.•,.u,......,.,. distinct variable, and tlte attribute
sI ~ voo"a:me contaitJS tho name of the Vlltiable
lnwltich lhe lraUt value is sl\:lred. The. trutl1
S2: ·if~'(:>y) retum _ __ value stored in lhe variable is I if 1: is lme,
S3 : elsor<.1Um._ _ _ __ OifEi• fulse.
} Give a zyn:tax-direcl:ed defullti011 Jo
generate three-address code for lhe repeat·
63. Consider a weighted w1dU·ooted graph with
l UJtil statemeu~ Assume J.hat you can caJJ a
vert'ex set V = {ul , u2, n3, n4., p5, ·~6) and
fimction, newlabel( ) tlwt returns a distinct
edg~sel E = {(111 , 112, 2). {nl , n3, 8), (nl ,
llloflll
label lbr 3 stnttm~nL Use the operator "I ' 100. The time hl move th~ heaJ between
10 concatcnstc lWu strings aild thu twu suctc;smvc tracks is 0.2 millisecond.
fuu.;tiuu ~en(s) to generule n line a. Consider ~ set of disk requeMs to reoo
ootllaining the st.riug s. data !rom truckc• 32. 7. 45, 5. :md I0.
1]{1. Answonhc ft>ll11wi ng : Assuming that the a1cvut<)t' ulguridt111i~
a. Remove lcl\-rocursiou from tho used IP schedule disk requests. nnd tho
following gratmnnr hcnd is in1tin11y at track 25 moving up
( 10\l'ard,; larger track numbcl'll). whut is
S- >Sa l Sb l a l b t·he totnl seek lime lor servicing tho
b. Consjdc.r the LOilowi11g_ g_.naumtut: requtSLi?
S ~ aSbS bSaS I r. b. Consider au iniUal set ut' 100 urbtl!OJ')'
di!-i:l.: reque-sts ruJd assume L.hat no uew
ConstrUct all possible parse trees for the
disk r.:quests unive while servicing
~1ting abab. Is U1c grammar ambiguous'/
1hcse requests. lllhc head is initially a t
67. Two coocummt processc.~ PI and 1'2 watrl tmck 0 and the de~ator algorithm is
to usc two resources &I ""d R2 in u ltsed Ill schedule disk t'equest>. lllutt is
mutually cxclu.o;i ve munncr. Initially. R I Ute wurst case tiutt to complete all lht
and R2 me tree. Tlte rrngroms oxccuted by t·eques{!;'!
'lhe two rrncesses arc given helow
69 Consider lhc relution e)(llmincc(regno,
l'rogmm tllr 1'1: name. some). where regno is tho pnniary
Sl: Wle (IUI&...,) do - key und score is a real number.
sz, 5rt IU +-boom
S3: Wk(Jt11o lotoly) do - a. Write a relationa l a.Jg~bra quc.."f) USIR£.
S4: Soltt! +- _ , (IT. o. p. • ) to find 11tc list oJf n•m•s
ss: llOo 11.1 ood 112;
which apJl""r more tlltlll once in
se: .. Ill +- fi'eo:
$7: SoiiU +- Inc; e)wminoc.
b. Write an SQI. query to lis1 the regno of
Prog:rom for 1'2:
t.1xwnwocs who tul\lc u sc,m;. greater
Ql: WliiD(Itllo...,) • - d1a11 d1e average sc()rc.
Q,2: Sot IU._ '-r.
Ql; - (JII II "'"tl doo....,: c, Suppose tl1e relation appeurs( regno.
Q4; Sa . .... boor. oentr code) speoities tbe centre whore
~ U..lti •U2;
Qlc Slllt2 ..., _ an exatntnce ap~s. Write an SQL
Q7: kii U ..,._ quc.ry to list tl1e centr_code havln!l :Ill
e>Uullinee uf s<:ure greuter tbau 80.
:1. Is wutw~ ll.xclusiuu guw·:mtect.l for Rl
und R2? If not, sb11w u IX>o"lible 70. \Vc wish hl constmc1 a B- irue with fon·
imerle<Jving of the statemeots of PI (lUI(lite lllllllbc:r uf [X>intCr:> por ll<!UC)
und P2 such that mutool oxclusion is eqool to J for the f<'llo\\ing set n t key
vinlurL'<l (i.e., both P I und P2 u~e R1 or val ue~:
R2 ut tlte sawc tinoe), 80. 50, I0. 7\J, 31), I0[), \10
b. Can dendlnck occur in the above Assume Owt lhe rrec is 1nirially empty nnd
prngratn'l If ,VOl< show u jl(>ssiblo 1hc ' 'a lites oro nJdcd in thb urdcr g~vcn .
interleaving (If the stnte111ents <>I f' I
a. Show the tree allcr mscrtion ol' 10.
ond P2 lca.Ji n~ to deadlock
:Jtler iusetrion of30, ~hHI after 111~r1 iou
c. Exobange U1c s tmements Ql anJ Q3 of 90. lllltnnediato lr- ueet.l not be
ond statements Q2 und Q4. Is tlllltltn.l shmvu.
exclush>n guarunlee.J rluw'J Cnu
deudlook occur'/ b. The key vutues 3\l UJ1d l (/ u.-.: """'
deleted from tlte tree in dull order.
Cnn.<>t.lcr u diak with 1h" 100 IT:lclts Shmv the tree after each delctiun.
numbered from 0 10 9'1 rt,t:uting u l 3000
rpm. The number of :scet<>rs pcor tmck ss

You might also like