Gate 2004

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

I GATE-2004 I o( 12

COMPUTER SCIENCE & ENGINEERING

ONE MARKS QUESTIONS (t~O) b 3


c. ~

The goal of s tructured programmmg IS 113 d. 6


a. ha1'e well indented programs 5. 'rho best d:ua strucLUre to check whether
an anthmetJc expressiOn has balanced
b. be able Ul lofer the llow of control llarentheses i~ a
from the compiled code
a. queue
c. be able to infer the Oo"· or comrol
from the progra1n le,xl h stack

d avoid the use of GOTO statements c. tree


2. Cons1der the followmg C function d. list
-v-old a"WDp ft.nt. a .inr b)
1
6. Level order traversal of a rooted tree can
f int t.emp ; be done by sranmg from the root and
t.er.!p c a; perfonrong
a .. b~
b a t.emp; •~ pr~order traversal
b. inorder traversal
In Order 10 e.\Chrulge the values or 1110 c. d~ptb first search
variables>< nnd y.
d. breadth fil'St se.arcb
a. call swJp l~- y) 7, Given lhe tollow111g tnpul (-1322, 1334.
b. call swap (& "-. &y) 147 1.9679. l'Jll9. 6111.6 173. 41\19) and
c. swnp ~,.,, y} cannor be used as n does I he hash fm1cuon ~ mod l(}, wh1ch of the
not return any value roJJo""ng Statements nre true'/
d swap {:-.. y) cannot be used as the %7'J, I 98'1. .J I Q\) hush to the same
parameters ar~ passed by value \'alue
3, A smgle·array A[ I..MAXS IZEI is used to 2. 1471.6171 hashto thes.amevaJue
implemrut two stncks. The two stacks 3. All elements hash to tho same l'alue
gro" from opposite ends of the ~rray.
.J E<lch element hashes 10 a diO'eren1
Variables topl and top2 (lop I < lop2)
valu~
point to the location ()[ the topmost
element in each of the stacks. Jf the space n. I only
is to be used e!Itcietuly, the condi:Llo11 for b 2 only
''5~~ ruU'' IS c. I and 2 only
a. (topl = MAXSlZI!/2) and (lop2 = d 3 or 4
MAXSIZE/2+1)
~. Wh1ch of the follo\\i ng grammar rules
b. top 1 + top2 MAXSIZE violate ~1e rcqmremems of an operator
o: (lopl ~ MAXS IZE/2) vr (top2 grammnr1 P Q, R'? are non terminals. rutd
MAXSIZE) r, s. I are terminals,
(I) .... Q ll
d. top I = top2·1
\•1 .... Q • •
Tbe following numbers are inse.ned into an (ii) ..... .
<onpts blnurr search tree tn the givru r..> r-> Q ia..
order 10. I, 3, 5, 15. 12. 16. WhaL 1s the a (1) only
heigh t or the binary search ttee. (tl1e height b. (l) and (iii) on!~
the ma1dmum distance of a lenf node from
the root)'l c. (li) w1d {iii) only

a. 2 d (iii) nnd (il•) only


9, Con>ider II proBt~m P tb<>t consist!! of two tt. SQ\'•
source modtlle.• M, and M1 contained In b. ~(lol.
IWII diftc1tnt lilt~~. If M1 cOntAins n
rcl'clllnco to a fun.;tion ucfiuctl in M:!. the "· 25·~
reference wil,l be M olvetl at d. oo,,
n. Edit-time 1:;, Let R,(,&B. C) and R,t.Q.E) b" two
reiJiti.on scboma. 11 here t11" ptfmruy keys
b. Complle4i1n"
nro J hown underlined. ood l<~t C bu •
c. Link:time fOreign key in R1 refemng lo R.,. ~'uppo~e
cl. .Load-time lhere is no violalitltt of tile abf)ve
Ill Consider the gr:rmmat rule E .... Et · E1 for t..,fon:ntial iulegrity conslrllinL in tiJ~
~rilhmctic expNSsions. The wde aellerated oom:sponding. n:latinn instonc~ r 1 tUtd f'!.
is torg•ted to a CPU lwvuag n siugle user Which <m!l of the followln!f relational
rcgi~td', Tiao ~ ubtr<ac ti!ln upcr'!llion rc:iluirc>l alg.;bra exprllSSions would necessarily
the fin;l (>pemnd to be in the regi~ter. lf Et produce I:Ut etupl~· rdation?
and E, do not have any commoo •ub •. n.,(r>J- n (r,)
<Xj)tCIIsion. in order to get tho sborte>t
po!ISibl" code b. f1 . (1i) ll ~l r, )
u. Et s hould be <'valualctl!inu c. ll 0 (r, ~<1.,. 0 r, )
b. £2 should b. o:voLual<d Iitl!l
d. II . ( r. f><t "" r: )
c. Evaluation of nr and E, •hould
ttcceuarily be interleaved 14. Con.~ider the fnUowloy tcll!tjon sohema
d. Order of cYoluatioo or "t 11nd l~2 i~ ul' peru! in in~ \V P StUQCiil-5 dJitah~se;
nO COII$CllUC:IICC Sludonl (rollno, rumte, nddn:ss)
11. Cons ider Uae Jollowiu£ ~llllemeuts with Enroll (rollua. courseno. cuursen11me)
respect to U!cc-kwl lbrcnds lnd kontd· when; t.be pri~t~ary key~ ase shown
511pported lltrmds. underlined. Tit~> nmnbor of luples in the.
I Conte.xt 1Witoh is m•ter
with kernel· Student 11nd EIU'oll t.oblc~ are UO aod 8
supported threads re.•pechvely. What are the ma_ximum and
2, For u.•cr-le<."CI tbrend•, 11 Sl•stertt c:all minimum number of tuples that enn be
""" to lock the entire pmces~ · prtlSenl m (StudL'bt ' Enroll). whon:: ·•·
(letl<llO!>OGtur:tl JOi n7
3. Kemel-.•uppor1cd Llueods c.1n toe
scheduled independently a.. 8, 8
~ . trser-level l.h~ds ~re trttrmplirent 10 b. 120. 8
the: kt:111cl \!, 960~ 8

Which oft he •bove statements are tnw'! d. 9(',(), 120


<L 2. 3 and 4 only IS. C'hi)O~<: !be hc:st m:rtching betw<>en Group
b. 2 Md 3 only I and Group 2.
c. lon!l 3 only Group I
il. I 3ml 2 only I\ Onto hnk layer
IL ('onsider an nperttti11g •y•tem cnp•~le of' Q. NctWOr k lay"'
loodlng :md executing • single scqu~ntiul RJ TrtUlSpnttlayc:r
u.<cr process ut ~ lime. 'llt• disk bead Grou11 2
.scheduling •l@.Orithm used is Fir;l Come l ~L•ures reliable tr.tnsport of dat~ m·er
First Served (FC'I'S). IT I'CI' S ls replaced
• physical po!nHo·poinL lin!..
b)' Shllr1<:St Seck Time Fit~l (SST!').
dainaed by the vendor to give 5(l•u ·bolter 2. Encodes;decodes datil for physical
bem:.hmork T"C$tr1t•, w)t~t i.< the e~pectet.l uuusm.iss run
impi'IJvcmcnr in lhe 1/0 perrorm~nee ()f :;_ i\JIOIIS .:nd-1.11-cJ~d common i~Ation
llSer program1? l>tl\wactt LW(I pi'OC<mCS
~ ul 12
-l. Routes dAta from one nctworl• node to c. (ii) ~nd (iii)
the next d. (i), ( il) and (iv)
a. J>-1, Q-1, R·3 21. Titc mininlutu number of 1'"8" li'alllc~ thai
h. P-2, Q-~. R-1 rnu•t be dloc.rcd 1<1 o runnin.g ptO<.'C•s in a
c P-2. Q-3. R· J virtnnl memqry o:ovironment is detennined
u. P-1.• Q-3. R-2 by
a. tlte mJirnctlon .o.et arcbitectnre
16. Which ul the ti)1Jowing is NO'I true with
r<:sp<ll!t to • lrnn~p:II'Cn t budge nnd u b. page >i2;e
ruut"""l c. pltyskol mc;,·mory si7.e
:L. Both bridge and rout,.,. sole.:tiw l \' d. uumlx.T of proeoss~• iu mcntol')
fotw:trd dolo pacl-elli · 22. Ho" many 8-bit c.JturoctttrS C(ln be
b. A bridge uses IP o.ddros&"' while • tronslllitlc-d p<Or second over 4 %00 boud
router IISCS MAC 3ddresses serial communication lmk using
c. A bridge builds up its mutio11 inble b) •~>ynchnmous mOde ul' tf311smission with
io~pect ing inc(oming pacf;et. one iiJut bit, cjglll dam bil5. two slop bits.
and onu parity bit?
d. A rout.,.. l>lln connotrl betwe<m 11 LAN
and a WAN •. 600
IT l'he Boolean function x'y' • xy • x·y l& b. 800
equivalent to c. 876
••• x'+}'' d. 12QO
b. :ot "'t y ldo.utify tho correct lrM15latinn into losicol
>' notation of the foflo,ving .,.ssertion.
"'(), .'\: i
:c· ...y Some born m the cln.~s Are t3ller than oil
the girls
18. In on SR latch made h) ~m•s-cuuplmg twc.
Ni'u'\'D gate~. ifbotl1 Sand R inpuJs arc·S<I Note: laller(:o<,)'l i• lrue rf :< is taller titan y.
t C) 0, then it will resu~ in a. (3 x) (bo)'(1<) -J N y) {girl()') lalltr
... ~o.o·= r (X. y))l
b. Q L Q'O b. (3 .») (bo)(xj ('y Yl (!l,id(y) lnll<r
c.. Q. ~1
(J ~I.
(x. y)))

d. lnd<termonate Sillies ~. (3 X) lbJJy(:<.) • (V y) (Sirl(y ) • toller


(X. y )))
1!). If 73,. (in hnJe·., numb.,. system) !,. equ.1l
lo ~"r (in lme-y nurnb...- system), the d. (3 .K) (l>O)'(x) ''('Y y) {lsirl(y) - > wller
po~~Sible vatu.:• of x a.ud y ntco (X. y)))

n. ~- 16 24. Consid~r the binnrr robtioo;

h. 10, 12 S = {(x. y) I y ~ x - I >nd x. y ~ (0. 1.2.


c 9. 13 ...}}
The reJlexivo transitive closuf¢ ors ;,
d. 8. 11
20. Which of lh¢ f ollowing add""~ing modes a. t(x. y ) I }' > x and x, y E { 0. l. 1..
;uc rmitablc for progr:am reloc.a1ion r~l run ....}}
lime~ b. l{x. y) I y ~ x and x. y " {0, l. 2, •..•
( i) Ahsblnte adtlressi11g I}
l u) Based nddressing c. {(X, Yl l y < X and X. y <' (0, 1, 2, ...
tili) Re!nthe addressing tl
<1. ((x. y l ) y ~ u nd x. y L. {0, I. :l. ...
(iv} lnJirectaddt.,--sins
• (i-) nnd ( iv)
II
h. (il nnd (ii)
~ul 11
25. II' a liur ctlin i>t tos."'tl l'(uor times. whul is
11\e pi'ObJbilit~ Uu.ll two heod~ U!ld ''"' ~liiS
will rosult?
a. 318 31 Consider111-: following C fUnctjcm•

.._._,,
bt t l.bl:: ...
b. 1;2 f • blt.t.c .... t • \.:
u (A-- • • ....au..,
Q, 5t8
l ~·
. . . . . It taat,
d. 3r4
I
26. TI1o number cof dlff~ron l 1l xii svmmetrio
matri~es wi th each clement beong either 0 The value r.:tun1.:d b~ I( J ) is
o.-1 is: (Nohl: power(2. ~)is suno,e BS 2') <l,5
a. pn wer( z. nJ b. (;
b. powcr(2. nl) c. 7
c. f"'W.or(2, (o~ o!'2) d. R
d. powcr(Z.I u2 - o)12) 32. Consider fhc following progrnm frnj!mcnl
27 i.tt A, B. C. D ben x umarric¢s. eoch "ilh for ro1·~r..ing 1hu digit~ in 11 giv~ inli!gcr
non-zero dotenl1inanL [I' ADCD - L then to obtnin 11 no'~ integer l.cl n - d 1d2...d~.
t:r' is J.at: D, rey;
rev • o;
•· D''C'' t\ ., wldle(u > 01 {
r:ev - rev • 10 ~ D t 10:
b. COt\ n • D I 10;.
c. ADC
d. Does 1101 neeo~Ssari ly exist The loop tnvarinot cooditton at ilte e nd o(
Lht! j'h 11croru;m is:
28 What is the result Qf C\'nluating the
lbllowing l\1 o cxrrossions uslng thrll<l- n. n - d ,dJ... <I.,. und rev - d,.,dm·t•d.,.,_,
digit f.1Claling point arithmetic 11ith b. n - d,..,t ...d,..td., or rev - d.,, 1... d~t
""""ling'/ c. n c;. n:w
111 3 • -1 1111 751 d. 11 - d ,d~... d,. 01 rd\ - d,..dz(l1
IIJ I (-111. 7.51) 33. Cons1d"r tbo Jll.llowiog C pJ•ogrJm
to. 9 ..5 I mwl 10.0 r.:spee1iv~ly segment:
b, LO.Oaud 9.51 rcsJX:erivd) Cb&'f' p (20J :
cbll:r' •• ~ ·n~ t
c. 9,5) ruw 9.51 respective!) toe: leagdl • lltr'lea C• l,
fgc- (1 • 0 ; .l c_ 1~ t. ....
d. 10.() UJJd IQ.(I resp!cli\•oly p(il • •Clegtl> - 111
pri.At:_f t ...... . pol •
29 Tbc tigluest luwer bound ou U1e nuwber of
<omf"'ris<:>ns, in tl\e worst ens.:. lor The l>lltpui of tho program is
oomparis()n-based sorting is (If th.o l•rd.or of n. gninf
o. n h. s tring
b. 2 e. gnirt
<.:. 11 lc.g " d. l'lo out rut is pnntcd
,
d. n IC>lf n 34 It is desired tal de~lsn 110 obJeCt-onented
30 The rmhlcm$ 3-81\T nnd 2-81\T an: cmpiQycc rcc~1rd .!!.o~•stoQl for ;s comp3ny
ll~cb employee lms n unnoe. tuuque 1d and
~. hurh m fl
salary. Empluyccs belong to d10crcnl
b, b()~l NP-c<>m r lete categories und tbdr •'UIBrl '" detc.rnuoed
c. NP-completc and 1n I' n:speolll•cly bv theu et1legory. T he (WICfiOIIS !!etNruue.
d Uild..c:idabl<> nr1d N1'-cowpl<ta gelld ®d wmputeSnJprv are r"'l~ired
rc~-pcc:t.ivcly Gl,·•11 the olll~~ bier.Jrolty b.:ltm , pos~ible
luc:uions Jbr thc~e fw1ctlons arc:
5 ot I~
til gotld is implcmentcd !11 tl\c c. not possThli!. with n sil!gle pointe!'
superclass d 11ode next co front
I til gorid os omplementcd in !be subclass 37_ rite clem~nLS 3:2_ 15_ ~0, JO. 1.2, 25, to,
l iii) ~;~!Name is an abstract func&ion 111 nr.: mse,rtc.d one hy one In the gawn ord~r
che supercltlSii Into a m11.~He<1p The rc$ulmnl ma.~Hcnp i;
!IV] getName is tmpleon~nted on the 110
supercloss
IV) getName IS tmpleanemo:d Ill the
subclass
t VI) geLSalory Is on abstro~t fun en ion 111
lhe sot!)<!rclasli
Ivu) g<JLSalul)• Is [onplememetl on tlo~
superclass
lvtil) g,orSuJruy is 1mpkm~nted ill Ute
sui\Ciass

L__~_-__,) .._[---~---' - I

Ch1oose the best desagn


u. (t).ltv). (vo). (vnt)
h lo), (iv), (vii)
~. (i), (ui), (v), (vi ), (viio)
J, (tJI, (v), (V II I)
35 Consld~r th~ label SC([lK!nei!S obtained b}
th~ fol1011 loy paors of traversal:> 1111 11
labeleu hinruy trea Which of l hes~ prurs
idcnufy a tree unoquely7
lil preorder and postorder
(iiJ mordcr tmdpostordcr
Iiii) prcorder and inordcr
ttv J le1el order and postorder 38. Assume lhm th~ operators - ••• s lire len
a. (1)0111) :t'iliQCintive nne! ' ts right nssociolive, The
oru~r of pruccdcnce fl}om highest 10
b. uh. ooi\
ltowcsq is '· x. +. • The J)OStfi~ e'pr.:ssivn
l".. (iilJ only
co~nding to the onfi~ e:\'pre-~ion a + b
d (ov) only x e..:!' e ·n~
36 '\ ~lr!-'lllarl~ lm~ed ll5t rsu~l w repres<!nt a abcY - der' .
a Queue A sml:le vnnnhle 11 1s used lO b !lb.:~ -Je r-
access the Qu.:uc To which hode s.hmtld p
J)Oont such that both the opernl:!ons en c. nb ;.. exd-e (
Oueue nnd deQueue ctm be performed m d - +a~bc ,lef
constant umc? )9. Two m~lritc'S Mt Ulld M! IJte 10 be ~'lorl.ld
m armys A aod B respi.'Cuvel)• Each May
~ c;m be Sl~red either in row-major or
column-major orcler in eonliguoll!l memory
0-t IOOJiitlns The cime comple~ll}' of W1
a. 1 ~ar node algorithm to compute Mt ex M, ,llll re
b ITont n(lde a, best or A is in row-major, und R •~ on
colwt1n-mlljor order
r. or' ~
b hesl if both are in row-mnJOT order The value relU11lcd by the Junction
c. besltf both nre in column·mDJOTorder D.lSomctbing wh~n o pointer to tho root of
a non- empty true i.~ passed us nrgumenl is
d indcponllem ~>I' the smrogc .schcrti"
a. Th~ number of leal' oodQs in tbe tree
S~pf'll"" CliO it <Olt~ TC[,Irl"'tlTJlc<J lL~ a ltnkL'<,l
list with elements in urbitrun• ordl'< Wb1ch ,,r
b. rh~ numhor o~>dll$ m the troo
ol' lhe operallons runong UlliOD, c, !'he. number PI' mtemnl nodes m tho
imcrscctlon. membership. cardinahly wil.l tree
be the slowe~r/ J !'he height ul' the tree
u. union ouly 4<1. Suppose "e ruu Dijkl:trn's su>gle sonoce
b. mton;cctiou. mcrnborshq) sbonest-path al(!orilhm on tho roJJowitlj!
"· membersbip, cardina lil) edsc.-wcoghted dor~"1ecl ~ph With Vco'lex
l' os the source,
d union. tnu;rsecuon

~~
41 Consider th~:- tbll,1\\,ng l' ptilgr'dll)
.-1ft , ,
{ lftt :a:, y • e . IV
ecar\t t •\d w• . u . 'YJ ,

-~.)--...---
-oi.J)
,. ~ & ~ 0 &04 y • 0 . ,
• - xr D • YI
~. t tJ l • -a)
' if t• • cJ
• - " - hl In hal ord<:r <~J lhc.- nodes get mclL1dcd
I\
doe
n • tl - • r mw ~,e sot ol' vertices lor which the
l shune"' [)!lilt uistruoces '"" fiuu.ltzed7
¢nt.fr'"'t4·. ot :
) a. P, Q, R, S, T. U
The pru!',TlllllOOU1puL"s b. I', (,1. R, IJ. S,J'
n. x - osmg repeated subtmclloo c. P Q, R. 11, T, s
b. x m1ld 'f nsing rcpdllod ~ubtrltCLivn tl. P, Q,T, R, IJ, S
c. Ute l!!eatesl cnmmou tlivisor ol'x und y -15, Cons1dcr tb~ gt·runru;u 1dth the foUo\\ ins
U tbu Jcust CUtrullUU muJLiplc Of X lUlU J lrunslahon rules aud 8 as the s lm1 symbol
+2 Wbat i.lo"'' the lbllow10a nlgt.m thm E .... 8 , 1-T (6..a..• E1.-.•T.*•J
I T 11!.- · T.'nt... )

...,
lll>proximate'/ (As>'1Jmc tn > I, E > o)
T-T, .F IT". . --T, ...... ~ F...... )
I F tT.....• F..... I
F--
y ....
~. C• - 7 • e)
f • • hr • yJ I ~r j F:-· - .ntool
~ Y .-; • I a:
ertaccx• , Compute E. I'Hiue f<lr Lhi! rout of ll\o piJtS\l
tree lor the expression: 2 # 3 & 511 6 & 4
"· log m u. 200
b. ttl:
b 180
c. tn 1'
e. 1(70
d lnlll
d 4(1

--
4J Consider the fo lltn\1lll:' C pt:.>sr.u:n
:«:[Intent,
C<)nsldcr tbc Jollowln~ set ul' pwccsses,
11·ilh LJ1~ UITI\'Ul times tun! Uoc CHP-hur•'1
:-:..:..,-- --........... 1imus fPh11 in milli.sct:l>!ld.~
-~ nt
l• ft"tt~J Ar-ri"al Time- Bunt11mt:
f .....
-...........
-~~ PI 0 5
P2 I
--·--.u =-; J
~

I ''..._..._,IIIDIIIItW ,.. -.... PJ 2 :l


p~ 4
u J . ... h _,.,.... ............., ,. l

-1--· -r:.·...-· ·--..=-·&.110·· Wlwt i~ the u' oru!• Hu·ruu"uud umo: f••r
-~-
I
...., these prOCesses witlt 1h" preemptive
7 of 1:!
shonest rcmtlmlng proc.:.ssing time first c. 2' 1 byld-~
(SRPT) ul~olitbm'l d. 1" D)les
ll. s.so 5(1. The rdlllion scb~mc Sbow nt f'drfo.1m1•nc~
b. '5,75 rname_ caurseNt', l'oiiNo. grnde) has the
a. (,.oo foll•)\\in~ fumitionul d"pend"nclus:

tl ~.25 name. ~nlltSCN" -> gmde


Cllnsidcr o system wilb u two-levo.>l [")()ging rollNo. cou111<:No _, f:!.rnde
schema In \1 hich a regular memory acecs~ tlnnt• _, mltl'oil'
tnkc.• 150 nnnosoconds. and ..:n•icmg o
rutlN<l-t nume
page lillllt takcH 8 millisectllltls 1\ n
~vorngc mstrucrion tnk"" I00 nanosoc<1nd~ The hogbcsl o>ormnl form of thl,• rdqllt>n
•)f CPViimc. nnd to memory nccesscs. Tho scheme 1s
'1'1..11 hit rati1• is"9()'' •· al1d the rnge fuult •. 2Nr•
rulo is one In O\"Cry I0,()00 instructiong. b. 3NF
Whut is t h~ eCt:ccti••e o•ense lni<tn>ctinn
,:xccutiou time'/
e; BeNJ·
a, 645 unnosecunJs
J. 4NF
51 Couside.r !he relatiuu Snodeot (name. sa-.,
b. !050 nnnoso<unds
murlu>]. """"' the pcimuo)' k~y is si"1Wn
c. 1215 uuuusecuucl~ underlln¢d penaming to students in a class
d. 1230 nnno,se<:onds that has at leu.~t one boy ood one girl. What
4H. Cdn!iidur t\',t\ ~S!Ies Pt tmd p, docs the l'olltl\vlog rolationul ulgcbm

,__
accessing the shared val'iables X nnd Y cxpre$slon pro.xlucc? (Not.:; p tS the
rrotect~d by lwn hinnl') ~dmaphoros s. r~name opemtnr).
und Sj Tespeoti""el). oofh initialized 10 I P
,_ ...
·-
~~.---._, - ~~.-- lXI ~-
ljnd V donot~ 1hi! u~uul S\l<Mphoru
f'porulol:ll. where 1> deer.:mcnts the
scmophoro volne. nnd V !llcremoniS the a, nnmes of g.rl st\tdents "~ lh the highest
$ilJ1\Uphore ' uluo Thu psoudo-cooo nl' 1'0 marks
ru1d P1 is ~· f,llows; b. name~ o f girl sw® nts whh mor~
1\:
........
.., __
_.._. , marks thnn $01110 bny student

...-
~~-­
•·••&:
Y-• Y-1:
...___

-
~--
•· ••a:
X•Jl · ~
C. UllnteS Of s orl Sn!deutS Wllh

tl.
lts5 Ullln some
n1uue~ ,,r
boy J>1JJder11
gui stuoo.nts with
marks ~han all tho boy >1Udoots
lll&fkS

mor~
IIIli

In order 1.:0 :ovo.lid dettdlook. tl1e correct


52. The mdor ur IIU intemnl 1Kl<k Ill u a- "''"
Optlrntono at I,1, 1.:. 1. 1 omd I ~ ure
lude>< is ll>e muximum ouUJber of childron
respo.>erivel~
11 cuu h~ve. SupfX's~ tlt<U n child p•.•inter
a_ PtS1 ), P!S.X P(S. ), P(S1 ) takes 6 bytes" the S¢arch J.ield value illkes
b, P(S,). I'(S1): P(S,.).I'(S,) "14 bytes. ltnd tl\o hlucL •il:<l iii 5 I 2 hyto.s.
c. P(S, ). I'(S.); I'(S, ). I'{S,} What is the order ot' the internal node?
d. J1(S_,), I1(Sy)~ P(Sx)1 l'tS, ) IJt 24

49 A \JntX·style 1-node hM Ill direct pointers h 25


nnd o.~nu :;Ingle, •'ole double ~nd one tnple c. 26
onMiro<tt pointers. Disk blook: siz.: Is d 27
I KIM<:. di~k blocL uddrt!sS is 32 bit><, >tud
~J . The .,mployee infomtarion in a eompauy ts
.u!-tfu inlegors ""' used. Wb<~l i> d1d 'iloucd on the rolntion Employee (mume.
llt~mull! I'OSstbld tilo~ siz~·t
2
"""- Slllary dcptNnmo ).
"- 2 ' byt•s Consider the t'olltm1JJS SQL qucry
b. 2' 2 b_vtes
Hor 11
ldc~ l dtJ,pt.aa-
t.t- D:lploye.• ner.vor~ C The TCP layer pretixes <~ 20 b)'le
~o~bl'!re lllti'!i"' • >t•
!JrQUp b;- dooilrrut311..C
heatler to the message, This passes throu.gh an
flaYhg ~"''ll•d•eyl -. lntertnedi:ne network fl. The tna>dmum rncket
( ~~~eleC~ •vg t••la:ry. t~ ~9'J'dl
size, includmg l<l byte TP header. on each network
It rerurns the names of the depanmeots in is
lvhich k I000 bytes
a. the average salary IS more than the· B. 100 bytes
avenge salary in the company
C: I000 byte.«
h th~ awng~ salary of tnale ~m~loyees ts
The nelworks A and B are connected through a I
more than Ihe avenge salary of all male
Mbp:; link, whlle Il <tnd C 3J'e C(lnneeted by s 512
employees 111 the ~ompany
Kbp'l link tbl)~= bits per second)
I- •1•- 1- •1 JD-
c the avru•lle saltuy of male employees ~~
mo re than the average sahuy of r~-
--c-,1
e•nployees in the same depanment
d the nvernge salary of male emple>yees
IS tnore than the overage salary 111 the 56. Assumong Utat the packets are correctly
COn\pany delivered, h<1w many bytes. including
headers. are delivered to the ll' layer at the
A ru1d B are the only two stations on :tn destination for one application message, i 11
llthernet. F;ach has a steady queue of the bl!$1 case• Consider only d~m packets
frames to send. Both 1\ and B attempt to
tmnsnut a frJ tfie, colUde, and A wins the a 200
first bac~off race.. 1\t the end of this b .no
successful transmission by A. both i\ Md c. 240
B attempt to l'r!IUSinif and collide The
d 260
probability ~1al A WillS the se.:ond ba~koff
race is 57 What ts the rate at wh1ch applo clllu)n data
IS transferred to host Hr? Ignore errors,
a. 0.5 acknowledgements, and other ovet·heads.
b. 0.625
a. 325.5 Kbps
c 0.75
b 354.5 Kbps
d 10 c. 409,6 Kbps
ss The rottting rable of a routet ts shown d "i t2,0 Kbps
below
~8 A ClfC·lli i outputs a dJgil m the form of 4
b1Js. 0 Js represented by 0000, I by 000 I,
, 9 by IQOl. A combmnnonal clrctlltls
to b~ d~signed wb1cb Jakes tbcsc 4 b1ts as
Input ana OIItplliS l If th~ dik~l ~ 5, and 0
On whtch mterfuces \VI II lhe router otherwise, If only ANI) , OR and NOT
forward packets addressed to descinauons gates may be used, what is dte mtnimum·
128.75_43.1 6 attd 192.12. 17.10 num~er of gaies requiTed?
respectively~
a 2
a, Bth l and Elh2 b J
b, EthO and Etbl c. 4
c: EthO nnd EthJ d ~
d. Etltl and Etlt3 59 Whrch \lfe the· essenonl pnme implicnn\5
of the followmg, Boofea11 funcUon?
11te following informa tiOIIIlertuius lo Q.M-57 f{a, b,c) ~ a·c 1- ae' h'c
C()ns1der three JP network;r A. B and C Host I· a. n'c and ac'
1.4 111 network A sends messag<S each comammg b. a'c aod b'c
ISO bytes of application data to a bost He in
c. a' c only
d. ac· nnd be'
ConJ;Ider a mulupl~.xer with X nnd Y a_~
dnta lripll1s and Z os CQntrol Input. ZO
selects mput X. nnd. Z= I selects input Y
: n-n• k1
·u
;
-
; ..1 .... ..._,......
;_a .... ,, 1PlD

............
al ~-n
.~


I
I
1
I
II o( I>'
..CAt....,

What are ~o coauectioos requi red lo


real11e the .!- 1·anubltt Boolenn runctlon f=
(,3, Consoder that lhe memory Is byte
1' + R. 1vilhout USIII& Jtny uddotion:~
addressable with word so£e 32 bots. and the
hardware'!
program bas becu loaded. starnng from
~ I U\ Y , T II\ Z
R IQ X. memory loc.auou llXH} tdecmml). If au
b. T to K ..R to V. T to Z iuterrupt occurs whole the CPU has beep
c T to X. R to V. \) to Z halted after executing the HAL1'
iumuchon. tltc retum address ( 111 d~c.imaT)
d R to X. 0 toY. T to Z
s.wed u\ the stack 11i 11 be
Consider the pru1iallmplementation o[ n 2-
bh cOlonter usiog 1' Oip-llops follo11ing the a. IH\17
sequence0-2-3-1-U, as shmvn below ~ 1112(/

-
[ ; : iJ .Lor-,
., --,o.U
c. 11124
d 1\)28
(>4. Let the clock cycles requored for various
r~·=IS=IJ~--JrL-'-·SR-'
CU-j_ opera11ons be as follows:
Reglljter 10/frunt memqrv unnsJer; 3 clock
To complete the circuiL d1e inpm X should cycles -·
be ADD wiih botb operands tn register; I
a. Q:! clock cycle
b. (h + Ql lnstmction fetch md decode: 2 clock
e (Qo(j). Qi)' ~ cles penvord

d. Q,e 0:1 The tot~l number of Cl()(;.k cycles requo red


to e~ecute d1e program ls
fi2, A 4-bit carl') loo~ ahead nddcr, wl1lch a<lds
twa 4-bit number~. IS deslgn~d u.~ing a. 2\1
AND, OR, NOT, NAND NOR gates only. b. 2-'1
-~swniug !hnJ nU the inputs nrc a.v:tilabl~ c, 23
Ill both compl~me.nted m.td wo-
C(1111plemenled romlS ;sud the d~hW or e;~ch
<.1 10
gate i;; one time uniL whm is d;e overall 65, Consider n S!llall two-wur ~et-nssoctatll'e
11ropagation delal or the adder'/ A~suma c.achc memory. consisting of four blocks:
that lhe cany net11 ark has been For cltoosing th~ bloc~ to be replaced. use
implemented 11sing two-lewl AND·OR the least recendy used { t RU1scheme. The
logic.. number of c~che misses for 1]Je followmg.
sequence of block. addn!sses os
n. 4 time unots
t~. 12, ll. 12. II
b. (\ llme umts
c. J() time uniiS a 2
b 3
d. 12 tome units
c, 4
d 5
T he following lnfom mtion pertains to Q. 63-6-:1
(j(i, Let A = lllllt)HI and B = Utl()O lUlU be.
Consider UJC foUowmg program regnmnl lor n.
two H-biL 2"s complement numbers. Their
bypoihetical CPU hn1 lng three user r~gisters Rr.
product on 2· ~ complcmflJ1tos
R~ and R~.
rt, 1I 000 JO()
b. ltiO II IOo
c. 10 1001(11
lllufl::'
tL I 1010101 a, satisfiable but not vulid
67 'l'be mioroiuslruelooo~ stored in the <Mi m i b. Vlllid
wemory of a pro<osoor bave n wtdllt uf'2G ~. :1 oou!rndictiun
bit-s- Euob uuc.roiu.strucliou Js divided .lnto
d. none oflbe 11bovc
llll'ee i1eld>l: a mict'O·vperation iield tJr 13
bits. a net. address field LX,t. :tud a MUX 71 Hem man~' 9->lutious dt>os lhe t'lllluWiJtl;\
Sllloct licld 1Y). There 'Ire & statw; bits lJI ~')'<tam u[ Iin•nr eqwllilln~ ltuve·~
tlte utpnt.~ of 1be MUX. -x ~ Sv - 1

= l.
)t - \
x - 3)·-3
...::::-- I
- 1=1
• u, infinil~ly man~
b. lwo distiucl sululi011s
I~·
• . _I
1

- -

Flow monv bit.~ arc there in the X ttnd Y


tlcld.<. tllld what is tltc size of tbc control
memory in number i3f words?
72.
C:1

d. noue
I.UUqUI!

The following ts the incomplete t)pemuon


table or S ~-ekmeuiJ!_rclUp.
• • • .. c
;1. l(l.J, 1024 • • • b c
h 8, 5. 251i ..
• • " c •
c. ) , g, l(~~ •
d IO. J. 5t1 The It~" mw oft he table is
68. A hord disk wiih n transfer nuc or I0 a. c oeb
Mbytes<secood is constantly transl'errtng
b. cb uc
dam tn mcmury USII18 OM A. Thu
procc.<sor rmL< ut 600 Mllz. ond takes 300 c. c h "n
and 900 clock cycles to lnitiruc :md d. <: cuh
complete DMA transJ:Or respectivdy. lftho 13. Tho:. lnclllstOn ~·f 11hich flf the lbllowrl]g
si7.c of the transfer is 10 Kb;-tcs, whnt is sets lntu
the pereen~lJ!C 11f pmce~sor time COIL~UinCcJ
tor tho transfer OJ"'ratlon'l
s - : 11. 11. fl. 2.3\, !1.3. 51. 11. 2. -11.11.
2. 3, ·1.5 11
a. 5.0°1> IS •tL"CCS...~' nnd ~Lttlictcni to .-nnkc :\ o
b. 1.o•. comrlete lntuce under the ptll1l~l •Jrder
c. o.s•• dati ned by scLcont:unment'!
d. 0.1 "" • · {H
119 A ~-s~•ge pipt!liue hQ~ n1c swg~ deln}'s as b. !1:. {2.31
150. 120. 160 and J40 oauosect>uds e. :11. !1.31
respectively, Kcgisters lhul uro used
hcl\>eeu tbe stuges haw p delil\ of 5
J. II). Ill 1.2.,3AI. Il2,1.Sl
uauosecouds eucb. -~sswuing oollsliml 74 Au exauhqntloo paper bus 1.50 nlllltlple-
~locking t•ate. tlte tollll time lllken '" choice q uestwns of ouo 11Jar.k each. wi lh
process 1000 datu items on lhis piJ"'Iino eadt question having. fo ur choices. Each
IVill be lllCOrt'CCI WlSWer fetcJLeS ·0.25 11\IU'k.
Snpposc I 001) students oboose- all (heir
a. 120 .4 mitroS<:couds
answers mndorul) with uni(orm
b. 160.5 mitJV~onds probabilitv. The sum total o[ 1be cxpt!cted
c. 165.5 miorose~onds marks obtained by aU these .sLUdems i~
d. 590.0 micn>sccond~ tl. 0
70 The lbllowin@ propositlnnnl stntemeot is b. 2550
(I'~ (Q v R)) - \(P v Ql ~ R) c. 7525
J. 9375
75 Makt bus t t .:olouring book in wbkl1 eu~h
P:nghsh lclt~r is dmWlt IWO limes, Sh~
wan!$lu llllint euch of the~~ 52 prints wtth
on< ctr k colour,;, such tl1at the col<lllr·p>lits
lL"'-\1 to colour on} IW<I k llcrs llrc dil)i:rcnt e.
l:loih prints of o letler can nlso IJ<: co IIlii red •
\\~lh lhe $1\Ule colour What Is tho d. L:' ~ c·,
mimmrun l'wu<; or (( tlm~ sal.lsfies tlus ....
M llll fl.!lllt!Ul(! 80. A poinlts mndomh selccl<:d WtUt uruJorm
a. 9 pmbabwt)' in the X-Y pl.ane 111llun. the
b. g rccwnglc with coml!r.' ut (0.0). ( 1.()). (1.21
and ({1, 2). l)' p is the length or the posillon
i), 7 ·~clOr or
the po in.l, the expected value ol'
cL 6 p': IS
76 ltl lltl M ~ N mulri\ sudt Utot nil ottii..ZL1'0 a. 2/3
cni.rii:S uru C\JI'L1'iXI in a rows uud b ~ l
colunu~o. Then lhe llllll.imum munb;..,. or
t . .413
nmt-zero enlrie:r, such thm 110 lwo ru'e 011
U1e same row or column. IS Ll 5fJ.
a. Sit + lt 81 tel G1 =<(V, E tt and G2 "' tV. E:) be
connected grapbs ou lhc same vct1cx set V
b. S nliL~ (11
bl wlUt more than I 11~1 vcrttccs. l I 0 1 <h =
c. s min [M-d. N-b) (V. E,nE2) JS not a collllected grnph, then
J. s mill {a, ht the gmph o ,u0 1= (V. E,uE:j
77 The uurumum munber ot colours required ~~ cauuu t lul\'e u cui vertex.
to ~olour the lollo111ng grnplL >~tch thai no b. ~mtL'I huve u C)'Cic
111 o adjucenl venices are USSif!.ned the
c. mustlta\'e a cul-cJge (bndge1
s.1me colour. is
,..0..
d. has chnunalir ntuttber strictly greater
!him UH>SC uf G, und G1
S.2. l.et Ajl, __ n] b~ an ~rruy storin.g o blt (I
or IJ) at each location, and Qmj .is a
funclfon whose hmc complexity 1& O(li'l).
o. 2 Consider the followittg progmm lcat,rucnt
b. 3 wrill~n io 0 C like lm~guugc:
Ot
~ou.n:t.e.r.: •
1!.4 tor t 1•l 1 i<~ n: i+•)
cL 5 (if t AHJ - .U CO\UIUJ"+-t
else f ttooun ~e¥1; covncer· • o rt
78 Two n 'bit bulllt} strings. S 1 und Sl. nrc I
~h,)som nmOomly wiUt tUibbnn proi:lllbility
Th~ pmbol>ilit\' tlullthe lfamming distance
ll1e compiO.xil:) of tins progn1111 frogmlllll
between Uu:se strings ( Uu: mi!DI:k.--r of bit Is
poSitions where llli: two strings ditfur) is !1. 0 (11;)
L'tJ ual Ill d is It Ocn lo~ n j nnl.l Oht, )
a, nc(ll2u
c. ei t\ )
b. "CJ!li' tl ()(n)
c. till" 8.5. The titne complexi\y ol' the Jollo"'ing C
<l 112'1 funclionJS (BSsumc a >IJ)
79. !low runny graphs on n labeled vertkcs
.:xist which have ul Jeust (n'-Ju)/2 etlge!.1
l1 of J:!
.... . - . t - . L.a. ... f
J.t ( a - U s --> 1>.'> f nA lb
.....dC.nt.("Ur

ra:uJ.'IIf......._.Jwl:a~ tt • ~t:- ~• ..l.UT


A-> bA I al:l
B-> bD i llS W
a. O( rt) l.et Na(\\) nod N.,<w) donC>Ic the nuntbcr of
o's and b's ina string w respecth·cly. The
b. O(ulog nl longu.,ge L(G) ~ ~~~ bl ' geuenned by G is
c.. 0 ( .,: ) a. lw l N.rw) 3Nb(w)l
J.. 0 (2") h. lW I No,(w) > l!N,(w)l
84 The ro<urrcocc cqu~tion
c. {1\ I N.t \\') = 3k. k: E {0. I. '2 .... I)
r(l l = 1
d I" I Nb(") 3k, k ej0, 1.1.... 1!
T(n) = 2T(n-l) - 11. 11?: l ~vuluutes lo,J
89. L1 is n ra>nl'~ively cnumemble luuguuge
3, 2-r-~_ n-2
over 1:. An nlgorflbnl A effe~tivol)
b. 2"-n enumcrutOS it~ "''nl~ o~ 11'1, 11':. ''• · l)cfino
c. 2 11... 1-2n-2 ant)ther languaga L~ nvcr !:u l#}as {wiWw1
d. 2,. l n : II',. 1\t e' 1..1• i J l . H~re II is • nc•v
symbol. Consider the !allowing assertions.
&5. A f'l'O!\ntll l lOk:es u~ input a baJauccd
bionrv scarob trc'O wi th 11 leal' nodes urul
S 1 [ , iK NOu~we impl iet-~ L.= is rcol)rt:iive
comPutes chc vnruc or n r"unclir-n _g(x) ror S,: 1.~ is recursive intplies 1., is recursive
each node x. If tlte cost of Qomputing g(ll) Wbiob of fhc follt>wing stntemenl<·is true?
is mi11{uo. ofleru~uodes in left-subtree of a 13!'lth S 1 and ~ are true
x. uo ~f Jcaf-oodes tn riglll->'\tbtrl:e ol' XI
tbco lhe WOrSH>d!ie time cornplc!<it,y ol' tho h. s, l$ lntc btu s, is n<ll nooos:;nrily Into
pmg.tum i$ c. S: ts true but S1 ts tllll ncccss;~rily true
a. li:l( OJ d N d tltcr is nc<:o'SSadlj true
b. 0( u log n) Choose lbe best ruutobiug bet\Veeu lite
pt\)grnlllming ~tyles in G!oup I IIJJd their
c. e
( n, )
t b:ltacteristics in Group 2
d. (:) tn~ log 11 1 Gmup I
II(,. l'bc following J:inito 'ilatu tnachine nccopts P. PunctionnJ
all those bi M >J stnngs In lvhich tho
llllutlJe( llr I"• und o·s n11> re,,~otively Q, Logic
I R: Ol~cct-qricntcd
S : lmpcrallvc
Group 2
I. Connnillld-based.. proocclurnl
2. lmpcr:llive. abstr:lct d'tla types
3. Side-ctrcct tree. dechtmtlve.
11, di,•isihle by 3 aud 2 expression e\'aluation
b. odd :md CVOD ~ Dool11rntivt:. elau*ll rcr """'ntatinn,
c. e\'en und <odd 1heon:m r mviog
d. dh,isible by 2 rutd 3 a. P-2. Q·3, R-4. s.J
87 The lunguage {u"' h" tUN> 111. 11 ~ I f i~ b. 1'-4. Q·.l. R-2. S-1
a. rc_guJnr c:.P-3. Q-4, R-1, S-2
b. c(lntext-l'ree l)ul not resuillr d. 1'-3. Q-4. R·2, S-J
a, context scn.~llivc btu not context free
d. lype·U but JJQI coo!Cltl sensitive
88. Con~irlor Ute ft>ll<twiug grutnnlar (i:

You might also like