GATE2003
GATE2003
21loJ I or IJ
'~:~:.~:~.~/..
tbe 11umber of solutjon(sl (i.e.. pan·ts) lx.
y) tl"'r ~misf} the eq,;strons) is
B. 0
b
c. 2
c.L 3
I
.:7, r,
Sip- -
'-'
I , l
14
•
.. ;...... . ........
ltM:IVC. .. tCrl
Oil' C. .. : ...- c e~~~r~o U\tttlmnltln tltnt uccepts L~G)
.Ill< :
d We van lind a dclcrmtntStic finite slnlc
_,._
IWC.II __!C+-C4 WI, '1lrllc
..........,...,.. . . ........
uutomoton thai accepts I ~0)
A..._...~..,_.
_... . ....
A_, .. ._, ...
: '#61: ililftl . . . . ..a ......-_,
52. Consider two lnngtmges L 1 11nd 1..~. each <111
...... r:
.......
: ......._. . . .. ...,_... _.,. I · teb~
;~•"Y itc.yfllltW• tho ulphabct 1: Let f: ~ ~·be a
;
:
p<Jlyumnial time cumputoble bijectiOn
·• •t suclt tltat (lfxl [x e L 1 iil' t(x) E ~].
Purther, let r '"' nl~t polynorniul timo
compuULbl~.
48 If 1hc initial l'ulue ~xceutinu will b.: of Whteb.o!tltc foll011~nl! CAN NO'I' be true'/
rcgilncr ,\ 1S 1\J, the '"'Inc of r.;g1stcr B a, I •1 e Jl ~nd Ll is finite
nlior lhe pmgrnm
b l.i E NP and (,, e f'
(l th.:> nunil:>:>r ClfO bits m A.,
c. L.1 is und~cidtible and 1.., ls uecid!lbl~
b, the nttmbcr of I bus ill A,1
d. L 1 is n:;cursivol) cuuwcrable aud L1,.
c, A~ t~cursh•d
<f, 8 53. A singl.c tnpc 'lunng. Mochino M has two
Which of th~ fvllowmg instruetioos "It'"' stntcs qu nnd '11 <11' which qo is the sr.lrtong
'"~rl<~d a t locatltm X will cnsur~ that tlto stale. The wp: alphabet nf M tS {0. I, 0}
vultte of '"SISler A ;tiler pn•gram and Its input alphabet i.~(O, I ~I The ""nbol
ex<-C&IhUH is tbe sault: us its lni linl vulue·? D h the blank symbol USild 10 indicar" end
o, RRC A, i; l of an input ;;ring . T he transitimi funlllion
b. 'NOP : n<J IIJ"'rnl ion ofM is U"-'1trilxd iu the foll<'wing tab!...
14 LRC A, '! I : let\ Mole A lhrougb curry 0 L S
flns by 0.11" btl t1J ql,l .R ql.l.R lblt
d. APDA. -,1 1 ql ql.l.R <IJ.LL ...,s.L
so C1•nstd•r. tho! fnll(lwing detemlitlt~lic lioitd The tnble is interpreted ns ill ustmted
sulk ou!Qma\<JJt M. belo\\.
f h~ "1111}' lqa. 1 . R) in ttJW 'lo nud <;olumu
I sigoiiies tltlil ifM i~ in ~wt<l QoJ lllld reads
1 o n the. cumml ttlpe lK!IIllr~. then ir writes
.I on tbe same lnpe squure. moves its tap:
head OtiC postlion In th<> pghl and
lmnsitiollS to state qt.
Let !:1 ~onole llto !11!1 nr s.n•cn bel binniJ' Which lli' th" tollll\1-tog ~lut~melll~ is true
sl~riuss in whtoh tb~ first, the fourth, uud aboulMZ
the l!!st bi~;o am I l'hc ntunbcr or strings In
o. M d~s nN halt l'n ony sltlng in I()
S thatsr~ ;u:c.:ptcd by M is
I)'
~. I b. M doos lUll halt <In auy stnng in (O() -
b. 5 1 )"
c. 7 c. M halts on :lll striJtgs etlding io a 0
d. 8 d M holts on nil wings ending 111 a I
51 Ld 0 - (lSi. In, IH. lt. S) IJu 11 ~unt~XI 54 D~fioe languages!..,) cmd Lt os foJJows-
U.:.. gmllllllar wlt~rc tho rule set R is
1.0- 1M. w. 0;. M hull.~ un)
S-+uSI> jSS j;: [. 1 - {<'M. w. I >j M dn...--s nN halt ~tn wl
\\<1\lch C>f thc fo>llowing StolcmcntRis true'~ Hera <M. 11. l> is o triplet. whi''lll lin;t
11, G is 11111 nmbtgthll.l• component• .M. is 1111 encoding of a Turing
b. Titer~ <!~o•l X.) « L(G) ~u<h that v.y I! Machin<. second compuoenL w'. i~ u
l.{O) string, ond tb1rd C<'mronent. i. is n bit,
Mor 13
Lot L u Lt,u Lt WWcb oCihcfoUo\\iug IS Consider tho Lrauslntion scheme sho1'~'
true'/ bei0\1 .
a L rs recursirel~ cnumc:rablc. ·hul [ IS S-.TR
R - t+ T (prlmf+"): I R I•
nol T --:t num (£lr/uttnunt.va.ll:)
b, L IS recursi\'CI> enumerable, but L IS Here uUJll is a token that .represculs :w
not utlcgcr' nud mun vul reproscn!s thc
c. Both L and [ nre rocursh e correspoocUng integer value. For an inpul
d. Neither L nor [. is rccut~ivel) slring ·9 + 5 1- 2'. !his trruL~Iauoo schenle
enumernble wil l pri1ll
55. Consider the NFA Msho11n below, a. !) + 5 + 2
b 95 + 2 +
~,...:;:.
11 _~(: O.L c. 9.52 •1
~ d. ~+9.5 2
---..... . -
.....
Ar
"/ Consider the ~"'"-' directed deffnition
shmllil>elow.
cr 1-+W: -a t~P+~Ct/
. ..... + .. , ..........();
-~.l
•t•tel=~J
from S. The average stack-life af 8ll ·o if tt e £~
olementoftltis srnck.is otherwise
a. n(X+Y)
A s,ingk-source shotiesi patl1. alg6.ritlurt is
b. 3 Y+ 2X cxccut,ed or~ the wdj_LW:cd grapl1. (V. E, w)
c. n(X+Y) - X with ru1 11rbitraty vortex v1 of V 1 as tlte
IIi nf IJ
~orce. Which of the following can always for 1:-1 t O fl
[oy j -. l.lOtl
be inferred from the patb costs computed1 t,, r a a. 1 tn
A( ;.~ _.
o
f!IIIXI' ArJ,··q .\(j ,i l • 1oU,_.J),
n. 111e number of edges iu. tbe shortesl
\\~1ich of Ute following sta.lements Is
paths fronn •1 to all vertices of G necessarily true for aU j ·and k after
b. G1 is coru1ected t<nnlnariori of lhe nomrc nlgorlthm'l
c. y, fonns a clique in G a. Apj.k]~ll
d Gt is a l!'tt
b. If A[j. 11 ~ n-1, then G has Hamflloniau
68. Whads the we1gln of a miJJimum spanning cyc.le
11'1!0 of the following gJ1lpl1'1
The fbllol\ing are the starting and ending b. (V'x)[('v'y)[B(X. y\ " C(y)l ~ A(x)] 1\
times of acti,•ities A- B, C, 0 , E. F. G and ~ (:ix) l'B(x. x)J
H respecti vely in cltrouological order: "a,. C, ('ifx) [(3y) rep<. y) 1\ C'(y)] :::) A(x) l v
b1o. c,. a•• d.. e..f,.b,,d.,. s~ e•.. t.. ft. g.,. b,~ -. (3:t) [B(x, x)}
f~ere. X, denotes the starting ume and X
d. ('v'x ) [('v'y) [B(x. y) " C(y)] ::::> A(x)] ll
denotes the ending ltme of aclivily X. We
-. (3x) IB(x, XI I
need to schedule the activities io a set of
•uotus uvrulable IQ us. All activity cau be n. The Jbllo,ving resolution rule is used it.l
scheduled in a room only if the room is logic prO!,'l'amming,
reserved for ~te activity for irs entire Ocr'"" clause (1' v Q) From cl(ws~s (J> v
dtrration. What Is the minimun\ number of R), (Q v ~R)
rooms required? Which o( the fi>tiOwing stotemeniS related
lo this rule is FALSE7
''· 3
b. 4 a. {( Pv R) 11 (Qv-,R)J ::::> (PvQ) Is
c. 5 logically valid
d. 6 b. (PvQJ = ((PVR)v(Qv-.R)) Is
70. Let G = {V. E) lle a directed gmph wuh n logieally \ltllld
ven:ices. A paU1 .from Vl to v1 in G in a c. ( PvQ} is salisfiable if and only If
seqt•eoce of ••et1ices (Vi. v,, ,, .,_._ V1) such (Pv,R},(Qv....ZR) issatisfi11ble
UJut ( v,. v, , ) e E fur all k i.n i Uu·ough j- L d. (PvQ} ~ FALSE if and pnly 1r both P
1\ simple p11dJ is a path in whicl1 no verte'i nnd QMt tutS.1tisllable
sppears more d1an once.
Let A be an n l< o array inltiall7.ed as The following inforut aiion 11erLains to Q. 73-74
follows rh~ f<JIImving progmm ITagment is wrltten in a
A /. k ={Iif(.l, k)rd!! programming language U13t allows global
vt!rin\ilcs aod docs JlOI allow nested dedanltions
[. ] 0 •)1/ll!l'l'l.w;.
oPfunctfons.
Consi,derlhe following algoritl1m.
II ot 13
vlobal int 1 • 1 oo. j = ·s: c. Fnster progrom startup
vo14 PIX! [
a. Exisifng p rognulk\ need not be re·
int t • 10: linked IO luke ndvnnl~gc nr newer
r>rinth< • 10 1, vcrsi<m~ ofl i br11ries
I. • ZOO; 77. A uni-povce1<.wr con{pular system lluly ,hiLs
j =20:
two prooe.o;sas, blltb (If wblclt alloma~e I 0
prlnt.(ll') :
ms CPU bursiS ''ltb <)() ons 1/0 bUtsiS.
Bo1h lbo proces'lds ""re lll'llt1lo!d ut olcarl)
1!14in() ( Pii • jld
UJe sante LiJUe. The L0 of both processes
cun pn•cc"'tl itl J'lllrJJicl, Which of 1h~
73, lf lhe stnlic
pl'<l!;I'I,IIUJililll! JUII!!IIII!li> IOS..S rolh,wing scheduling slr•t"!li~ ,, ill result
~teoping ruul cull b~·
u.:etl jl<1fnttli:l~r jn lh~ (uasJ CPU u1ilizali011 (il' ur u l()nJ!
JJU.~sin;: m~cbunism. the vul ues pri01<d b) !"'nod ol' llmcJ lor this sysl<m'l
the nbove programMe 3. Fir'f! come first sorvod sohoduling
u. 115. 2W b. Shorlc•l rumainiJ~ lion~ fiJ'sl
b. 25. 220 schcdutlujl
1>, 25. 15 c. StuGc rnont) scheduling will•
J_ 11.5, 1().5 dillerenl pciorili~s lor tlte. two
7~ . IF lh~ 11rugrmumlhg ltlll!JIInge U~ -proces.~$
dynamic ""opi oJg nnd cnll by qam~ d. Round robtn schcdnling whh n rime
pamm<ter passlns mechnnostu, I he ~ olue,~ qunntunoni" 5 IllS
j1fLulecl by the ul>ove ptograro are
u. 115.220 The followingirlfomoation pen ains 10 Q.78-7!1
b. 25.220 A prooessur uses 2-l~l·ol page lablcs tor l'irtulll lu
c. 25. 15 jlh) sicul oddres.~ truusluli<ul. Puse lliblu:l fur l;><>lh
d. 115. 105 levels lire stored in tho; u\ttin ntemul)'. Virtuul uml
75. Considcrthc l'oll"wons class dclio>lloons in physieltl uddrost'<l~ nre b<lth 32 bil~ wide. Tho
a hypothoticnl ObJeat Orienr~ I language memo!) is hyl-> uUdra;;:;ubl~. l111f 'inuul li>
iJJal5upporls uthcnlauce.and uses dyorunic physicnl ndd~s tronslation. the I0 mOSI
binding. The lllllguuge should 1101 be ;ignili~am biiH M rh;: vitrual addro:ss are used a;,.
ussumcd to be oltber Javn or Ci+. lhuugl\ indCl< in~1 th~ lino1 level page lllblo while the ncx1
Ihe S) nrox i~ >imilur. I() lli1s u"' ns.:d ~s index into lhc second l~'·el
a - 0 ...-.,_ .c , I
_.• .tU.. U f
~, ...., ptgo ruble. I 1\e 11 least •igniJicUJil bits of the
''irwal uddtas~ u.fll u~d us t>ITs~t within th~ page
Assumo tl!ul the page wble cmries in both 1~1 cis
Now cousid¢r the tollo1vm!! progrtlJll <If pug"' litblol<> ure 4 b~1"" \\id~. Furtlwr, th~
fra,qmeut: processor hns u traoslatio•J look-aside buffer
P x * new Q() : (J1 ,13). wirh a hit rotc of 96•·. Th~ 'ri. B cnch~•
0Y = l1-ClCI T
IIZ = MVQ(I ;
""""'' lly to:oc<! v•rlunl pngc numbers pod lho
x .C(llt I I Rly) . f(l l ; z_f( LI ; ooftl:sp<)ndlog pllysic11l page numbers, th~
processor also bas n physocully addmssod cache
ller~ ((Pl yl denol¢5 6 typecast ol'y 10 1>
lvillt u hoi mlo ut'9()0o. Mnou meumrv 11ccess litne
r~c output r roducod by c>x<:cutmg lho
is I0 us. cuche access lltne is I. us. and T LB
nl>ove prol'o-atu frn.ttm~nt wfll b.!
ncce"" ume tS also I os.
"- I 2 I
b. 2 I I
c. 212
7R. Assuming UUJt no page faults occur. lh~
average lime llllwn to ucc~s a virtual
d. 222
addrc$$ ,, npprmdmnlel)- (to lha nearest
76. Which ,,r
lho lullnwing is NOT un
0.5 ns)
udv:utmga of n~ins sharerl dyuamicnll)
linked libmfies us opposed ttl 11si ng "' l.Sns
staticnllv linked tibrmi.:s'/
b. 2 1\.~
a. Stu;u~r s~:?es ofdl<""lllubl~ tiles e. 3 aos
d. ~ ..~
b. Loss~r overoll pag.o l'at~l I"Jto in lhe
•YSiom
1~ of l3
79 Suppose aJ?rocess has only the foUowing c, 191.203.31.3'7 and 191.23431.88
p~ges lli its virtual addre:..<s ~(l'<lce': two d. 1 23.8. 129.'13 and 128.8. 161.55
contiguous coae pages starting ill: virtual 83. A 2 km long btoadcast LAN has I 01 bps
addr~s 0 lt 00000000, t\YO l'QntigU<,>US (lata bandwidllt !!nd uses CS!I'WCO. 11o.e
pug...S sflirting l\l virtuW address 0 x oign;u tmvels along the wire at 2x Jr:! m/6
0040Q000, and .n, ~lacl< ~lW stmtin{l. at Wlml is the minimum packet oi?.e •thnl e>n1
vtrtual address Ox FFF'FFOOO. The amount beused ortthis network?
of Jtlentory roquit:ed fur storing U,til page a. 50 bytes
tlibl~• ofthi.s J'''""'J!!'!I is b. I00 bytt!i!
a 8KI3 c. 200 bytes
b. 12 KE\ d. None of IJ1e above
a, Hi KB ~·I Rosl· Ajs sending darn In 'host B over a fiill
d. 20KB duplex link. A and B are using the sliding
window protocol for flow controL TI1e
T he following htfonnatlon perta ins to Q..80-81 S'Gncl and rccclve wmdow sizes arc 5
S uppo;re we want to synchronize two concurrent pad<ets eack. Data l*'ket~ (sent only front
vrocesses (' <tnd Q usmg bln<try sema:piKues S ancl A lo B) are all 10()0 bytes IOllg and Ute·
1'. Tite ood~t ror tllel)roresse!l P and Q ~~· !ihQwn
-P:
ln~Jl$Inissi,,n L.tnu• ftij' ~uch a packei is 50
below. .us. Acknowledgement packe~ (s.e nt ordy.
from B til A) are very small and reqoiro
..,11• Ill I .e.tl• t11 I nesJ.igjble lrJJlSmissiton time. The
W:.
JWpsgalion delay over the link is 200 ~.
X: Z: What is tlte onllXitnum achievable
I I throughput ut this commwlirotio:~n?
S)'Tlchronlzlition. st:alemeJlts can be utSerted ollly at a. 7.69 x 1o•bp$
l'Qillta W, '}(, Y. Ultd'Z. bo 11 II x 1 0•1w~
c J2.33'X ut bps
30. Wlticl1 of the following will always lt>ad to d. ts.oo· xJ06 bps
an output stnr'il•g wilf1·oo l!OOUO.Ol l "I 85. Consider the fotlm'l(iug fimctional
a P(S) atW,V(S)atX,P(l)at Y,V(I') at depenil"n01es in a database.
2.,. S :qod T initially [ Date_of_Bi:rth4 Age·
b, P(S) at W, V(T) at X, P(T) al Y, V(S) Age~ Elig:iJ)ility
at~S in1ti"ally 4 and T initially·O Nnme-> Roll_nom·ber
C, P(S) Ul W,Y(T) at. X, PC(T) •1. Y,V(S)
Rolnumbcr~·Name
atz, S arul T initially L
CQu!l1e number-~Cow:~e name
d. P(S) at W,'/(S) " LX, P(f) at Y, V('r) >tl
Z, S irutmlly J ancl T tnitiaUy 0 Course=nwn bor ->l.nstrucfur
81. Which of!he foDowi.ng will ensure that the (Rbll n umber. Cq\ooite. nom1ber) ~·ade
Ootput.slnng never contains a ;rob;~ of T he relation (RoU_ uumber, N~IT)i!,
thll funn 01"0 or I 0"1 wJ10reii JS oild:7 Dale_of:..birth, A,ge) i$
s. P(S) •.t: W,V(S) ai X, P(T) at Y. V('T') a. in sc.:ohd nqnna11imu but not in Ourd
~lZ. s.•md 1' hrillally 1 normal fontJ
b. i n tliin:l m:mnul fonn butnol in BCNI"
b. I'(S) fit W, V(l? nl X, P(T) al Y, V{J>)
•t Z, SandT initially l cr. in BCNF
it F(S) at W, V(S) at X, P(S) at Y. V(S) <l i r1110ne of Ute aiJove
a.tZ, S ioi:1i ally l 86, Consider the set Df relati!>JIS sl1own below
d. V(S) atW. V(T) at X, P(S) atY, P('T') and the SQL qoe!Y fltat fuUows.
atZ, SandT initially I Students: (Roll ·number. Name,
82. The gOJhner- m!IBk for a parlit·I!Jar network Dale_of_bhth) -
is 255:255,3J..O Whiclt ofihe :fullowing Cool)1!es: (Cau:I}Oe JHUrtlJer. Cqlii'$e nmue.
pairs of!P addresses oould helong to ilus I.Jtslroctor)
network? G!.<>des: (Roll_ numbe.r, Com:se_nnmber,
a. 172.57.88,62 and 172.56,S7.2H Grrule.)
b, 10.35.'28.2 and 10.3).2!).4 select distiuct Nrune
rrono Studerlt~, Courses, ~des
13 or IJ
wMrc Srudents.Ron_uumber for l k ~J; 1< ~ n; 1<++1
A(k ] •O;
Gradcs.Rol nwnbcr
and Courses.lnsrructor ~ Korth for ( k -=;2; k <= 'NOLOQ...J:t; k -+t-)
and Courses.Course_numher for Cj• k +1; j <= n1 -j++)
A(j J a AljJ II lj11Jc.l;
Grades. Cow·se_ nwnber
~nd Gratles.grade = A f or U • l; J <• n; )++)
i l (lA (jJ) p rini:LI "Id ~ .j)r
Which of the following ~ets is c.omputed
by the above query1 The sel of nwnbcJ'S prlntc<l by tlds
a. Names of students who have got an A program fTilgmenttS
grade mall courses taught by Korth a·. lmJm:Su.(3i)[m : i!)l
b. Names of students who have got tm 1\ b. fm lm S' n, (3l)[m-=f )f
gtade in nil ~outses c. lm lm S' n. m is prime I
e, Name~ of students whu llave got tlll A d. ll
grade iu at ltast one of the tourse.s Consider tlte C prog,rrun shown below.
taught by Korilt tincl ude q,tdl.o .:b;>
d. None orthe above tde.fioe p rint Cx l printf I • \d • , x )
87, Consider thr~c datn item~ 01, D2. and D3, inc '"
and lhe following execution schedule of void Olint zc) {
u'ansacllcms 'f l . 1'2, and. T:l. In Ott )
.x •=- x; pri.J1t ts)-;
diagram. R(D) and W(D) denote lh~ void II (i.Dt "Yl {
actions reading and wriring.the data Hem D .int 1C ==. •y+2 :-
Q (x l; "Y : · x -l;
respectively, p rinc(x );
T1 TJ }
R(D3); ~~&inl vo id ) {
lt(DZ); X • 5;
W(DZ); P (""l .;
R(Dl); p rin.t bt) 1
limo
R(D3);
R(Dl): The output of Lius. prognuu ts
9((01); lL 12 76
W(D2):
W(D3):
b. 221211
116>1);
e, 14 66
f:!(D2); d. 7 6 6
9((00); 'JO. Consider the function f de lined be loll'.
W(I>J): OU'...Cb i , q,tD I
l.q~ d•1:d l
•trwl;ll; i ~ • ~~~t. ;
\Ybicl! of Lite follcnviug statemeru:s is 1'
correct•?
a. The schedule is serializ.able as 1', : T , : iAL H•t. n~C' L il~ ., , I
t'l:tt.Vnl ( <P = JftltOL1 I I IP- ..flext - - J«n...L.I II
Tt ( (p->,to'lt41 ~ P'"~n<:" t-...>dan• u
Et p-, nttxt; ));
,.,
b. The Schcdul< is seriali7.a'ble as T1: Tt ;
For
I
II given linked lisi p. the function f'
c;, The schedule is serializable ns T, : T; retwns I lf :llld only if
T, a. the lfst i~ cmply or hns ~xaotly one
d. 'fhc sch~dulc is 111H scriullzable clement
88, In the following C pro~,'ram (hsgmenL j , 1\, b. tbe elements in tbe lise are sorted m
n and TwoLog_n are integer variallles and nun-decreasing orde1 of dala value
A is om array of integerS. The varinbk n is ~. the dements in the list are !i<>rtcod lfl
inioali;wd to an ittleger ~ 3. 101d no11-incr.easing order or data. value
TwoL<>!Lil is iniuallzed to the value of d. not all elements b1 the list have lhe
2*Liog,(u)J same dara value