0% found this document useful (0 votes)
28 views13 pages

GATE2003

Gate Ar 2003

Uploaded by

Mohd Salahuddin
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)
28 views13 pages

GATE2003

Gate Ar 2003

Uploaded by

Mohd Salahuddin
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/ 13

I GAT£..

21loJ I or IJ

l COMPUTER SCIENCE & ENGINEERING


ONE MARKS QUESTIONS (1-30) b. 30
c. 56
Consider the foliO\\ ing C function d 156
llo.at te n.o.t. ... lat. r l .l 5. n couples are in••tted to a. party with tltll
float p , •t bt J,
l~ C~ l .~l.i•lt J ~ Yr i~, condition thai ev~· husband should be
accompanied ~ his wife, Howe\'cr. a '' tfe
..
D • • x l-1:;
. .... .l'l
_,.,.
I need no! be accomponied by her husband
The number of dilferen1 gmberings
For large values of)'. 1be re1um value of possible at !be pnrty is
!he f1U1Ciion f besl appro:o<Jmates
a. x-'' 0. (~11)·~·
b. e'it, b. 3"
c In( I - x) (2n)l
d x• c. - -
2 Assume lhe foiiO\Iiog C variable
z•
declaraiHYn
int 0 A [ l0) , B{10){10):
Oflhe follo\\log expressions (; , Lei T(n) be the number of different binnl)
r Al21 sel\fch 1rees on n distmcl elemems. ThClt
If AI2]J3(
ll1 Bill
rv BI2J 131
T(n) =
..
f r(k - I)T(x) . \\'here~ is
a. n -k -t' l
Which will Ml give eompilc-hme cn·ors iF b Jl . k
o;ed ns left hMd sides of nssi~;nmenl c. n·k-1
statements in a C program? d. n- k -2
a. L It and IV only 7 Consider 11te se1 r: of all stnng~ over 1he
b H. Ill, ;md IV only alphabet I ~ {0, I) -::.' \lilh lhe
c. 11 a•td 1v orll) concatennltOn opera!or for Slrin.gs
d. IV on!)· a. does not fQm1 a group
3. Lei P(E} denQte tlte probabil i1) of lhf,', b. forms a non-commutative group
evenl B. Gi•·cn F(A) = l,. P(BI = 11,. 1he c. does no I have a nght idenlhy ele.ment
1·alues of PIA!Bl and P(BfAl le!lpe&.1nely d forms a group if the empty siring JS
are removed (rom .r·
a. 'A. '11
Lei G be an arb11rary graph wi~l n nodes
b v, . Iii and k components. 1f a vertex is removed
c. 11. 1 front G. ~1e number of componeniS in the
ci L 11 res.llllrul1 gmpb musl necessarily lie
-1. Let A be a sequence of 8 distinc1 integers between
oorted in a;cending order, HO\\ Jl\lln) a. k and n
distincl pairs or sequences. 8 and C are b ~-1 and l + l
lhl!Je such thnt (i) each IS soned itt c. k ·I and n· l
ascending order, (ii) B hns 5 and C hns 3 d. k + landn-k
elements. ond (ill) th~ result of merging B
and C gil'es A''
Assuming nll numbers ~re 111 2's
complement representation, whicll of ~Je
a. 2
"2 ot J'i
l'ollowing number< t~ ~!visible: b} d. Whether L i• recu,.,lve or not win be
11111011'/ known after \1 e lincl uul if P = Nl'
:t I I I 110 I I I '1·1. ·n,e regular ~pression o'( tO•)• denote-<i
b. I l l ()(l WO U1e s am~ sd.M

c. llOIO III a. n'Ol ' l '


11. n o t tut 1 b. 0 I {0 10) •
Ill For a pipelmotl C'I'U with u ~ingl~ A.LU. c. (U I l) 'tO(O I L).
ClJt.,ldcr lhu follcJWII\8 silwll.ions d. oono uf Ot~> ahO\'C
f. 11u; j l 1·~1 mslfUCUun liSe.~ Ute I 5. l f the strings of a langoog,e L cun be
r<>•ull of the j -th in•lruclion us •n c:ffccl.i\'llJ)' onumctolod in Jo)(ie.,gmph ie
t>pernnd (i.e,. nlphnhetic) cmler, which of 1he
(I 1'he execution of ~ oal)ditian~l jump f'oJiowitl!l ~LDiements i ' tnue?
instru~tiou ~. L. is ne~ess:trjly fin.ite
111 f hc j-tl1 and j ~ 1-sl instntctions b. L i.< regular but not nec.essorily llnile
require ihc ALU orlhe snn1c time .:. 1. i~ cont ext l'ruc hut "''' oceey~~rily
Wbicb of lbe nl>~' a l!(ln cause n11•Zilrd? reguiJir
:t. 1 ond n only d. L i> NcuniVe btU nat Ju:c<:s:sarily
b. nand ill ouly conto;'Ct free
c. m only 16. Which of the fo llowing .u.m,,.,. UJ oon vett
d. All lhc thn-e an 11rbitury ('F'G lOan I.L( I) grammor7
U. Consider an ~no.y Jnuhiplier Jor a. Retn<Ning let\ ~IJI\tiOn Alone
mulhpl ying two n bit numlx:rs. II' ~"cl' b. 1'3ctoring U1e gmmmar ~ lone
S•le in the uircuii'h3s a unil delay, Ihe IIWtl c. Ri:lnovmg lei\ n::e.u.-sion :md J~cmring
dcllly oflbe n1ultiplier i~ l.bt grJmmar
:t. {ii(J) d. Nunc uf lite Ul!llve
b. 0( ll)g n) 17. Assume Uool Ut" SLR parser for a grammar
e (:}( n) G has o, • L>lcs ond tho L r\L'R parser fo r G
' l10• n, •toles The rel~l.ionship between nt
d. 0( n")
a.od n: is
11. lhm nnd Shy~m h•v~ h<:en :o~ked Ill ~lH>I\ a. n 1 i!i necessarily less lhan·nz-
that n c<ruin pmbl;:m I I is NP-<:omplete.
h, n, I> nc:ct:.~sarily cqUJtl 10 n1
Rllm shows a pul~•umuiol time l'Wuctiott
from the 3-SAT prob ltm to n.. aud Shy ant <::. no ia-necessanly g~ler lhon nr
shows • J)')lynomj_QI time reduction from D <l nnne ot Ole above
Jo .~-SAT. Wluc.h oJ' Uu: following ean t>e Jg, In ~ lxHlom-up ev• lu• licm of • ~yn~~~~
lnl'em:d lrom tho:se reducuonsV dil'eckd derwilion. inh~-riLc:d aur~1uteo .:an
~. II i~ NP-hord bul nol NP-co.mplele u. •lwa ys b~ cvnluated
1>. n ill in 'JJ>, bill L< not NP-coonplol-. b. be ~volualcd only if Ihe dcfiuililln ill[,.
nnrihuted
c. n is )I.'P -romplata
c. 1-e evnluol¢d <JniV if tho definition lt~
d. n is netU1er :-n'·h:ord, nor in NP synJheslr.ed nllril;ut(l!j
13. Nobo.Iy "kn011 ~ yet ifP : NP. Constder the d. never be evaluated
l:rng!Uige 1. detined ut tollows
(0 - J)• I} P : VP
19, a,
Soppo.;e the numhers 7. 5, 1, 3. 6, 0. "·
1.~ 4. 2 ore in~~1ed m tl!hl order oW> an
; otlum•ISI.' lniti•ll)' empty binary SCIIre.b ft<:e. TI1o
Which of the f'oll<l\1 h1g ~L'lle)neuLI i• uut!l hnwt) ~e.1rch treo u1e.~ I he u~uul ordering
nn nottnr>l numb=. \Vhm is the in-order
n. f. i~ It:CUr.ii\ u
lrnveo.nl seque11cc of Ute ro:sulwullrce~
b. L ls recursively o:uolmemble but ltul
II, 75 I 0324689.
J'CCUrsivc
tl. L ill nolt~oursh•cly c'l\Utnornhlc
b. 0 H 3 I 6 5 9 H 1
"· n 1 2.3 4 s (• 78 9
3 ofJ3
d. 9864230 j 57 d. E>(l)
20. Consider lne tb(lowing three claimS 24. Wltich of the following slatemeuiB is
I (n - k)'" = ®(n"'), where k and m are FALSE'/
con~(,mt:S a. In sbdio1dly typed llllljl\Ul!fCS, each
n 11
2• ~ 0(2") vari-ablei:rLa -prC~gra:m hrur a Ji.'lted ly!Je
m 'l'"' = ocn b. 11! 1n1-I;Yped IW!guage~, values do nlll
have any types
Wltich of these claitrtS are cOJrecf'
a. 1all(~ U c. In <lyn!Ullicnlly l}'ped Jangnages,
b, I and ill vllfiables have.no types
c. II and tJI d. Itt niJ ~taticniJy typed languag~, eaclL
variable ln a program is asS~>ciate<l
d. I, 11, ru1ll ill
With values .:.r 01lly a SU1gl0 type
21. CouJ>ider lh.e !PIlowing gr.•pl1 during lhe e.xcclllion ofll1e progrrun
25 Using a 1aiger block sJZe in a :fixed block
sJze file system leads to
a. bctter· disk !lu-oughput but puol·.er disk
~'Pace util.iz.ali011
b, better disk throughput and b!,rtter disk
$pace.utilizalion
c. PVorer dis!> IJLT01Jgllpul l11~ (letter tlisk
SJ)>!CC utifu:alioJt
d. poorer. di;;k 1hroughput·ruul poorer disk
Among d~~! flll!onting sequ.am.-es ·space utilizati.on
I ab.eghf 26. LTI a system ,villJ 32 bil virtUnl addr"!!ses
II a h fehg and 1KB page $li.tl:. llSe qf one-level page
:rn abfbgc bllllas for virtual Lo phy!!ical nddress
IV afghbe t.ranslo~rn is m>l rrnctital baonuse or
Wh.iclt lire deplh first tmversals nr llle a. tho )al'ge ru.uount of 1ttemal
above gn1ph? fulgrt1 entah.oJl
a_ l, ll 'illld rv only b. ll•e httge amount Df external
b. I and IV only fragmenlaiion
c, II, m and IV only c. the l!l(ge .memory ovorhead lu
n1aiutaini.ng pag~ tablll's
d, 1, Ill and IV only
d. thtt bu:ge computaU(\11 overJ1ead in Ut.e
22. Tile usual E>(u2) implementation of
ttanslation 1JIO<:ess
lu~ertion Sori. '1:0 sort !m art\IY uges linear
$eaflll\ to identify llle po.Ution where an
27 Wlliclt of tlte following ass.ortions is
element is to be imert<:d mto the i!lready FALSEabout tludntemet Protocol (IP)?
sorted part. ofth~ artay. If, inst~d, \\'e use a, Jt is _poosible for a COII!pt~er to nave
binmy search In il!enti.ty the ll"ilition, Jl:1e multiple II' addres~e~
worst case C1Jf1JllJlg time "'i.U b. P packets from tlte .same sour~e 1:0 dte
a. Tlffilnin e(if) same dest111a1ion can take ,litfe.:ent
t<mtes in the uetwork
b. become ®(n (log"/)
a. lP ellSqres fhal a packetis d.iscarded 1f
c. bccomc <;J{n log n) il 19 unable to reach il$ deslinabim
cl. become E>{n) wilhina given nmnberofhors
23. llia heap ivWut alcm~Jits. l\~tll 1h~ $illlillest d. 'l1u.> packet source cannot settha r.:.ute
e1mtcltt at t.be .mot, the 7th. sllllillost ol' :m Olllg<>i.ng pacl:els; OJ~ rmile is
elemertt can be tound ·in time detenniMd only by the routing tables
a. E>(n:Jogn) iu ih0 .r:olili!rs 011 U\e. way
b. 0(n) 28. WlricJL of il.te following Ji)Jictionali1ie•
c. 0(1og 11) mast be implemented by a trru.1sport:
4 ofl3
pro1ucol ove-r ond nbove l11e nctwort. 32. Wl1iclt or tlt~ tollowmg i~ u vuJiu li.rst
p!OIOOOI'/ order lbi'!DIIID'/ (llere 11 an<l I} nre rU"St
11. Recov~"fY from paekctiOS:SC$ order tormttlil<l with 'I os their onlv fr.:e
b. Detection oJ' dupliCille packets vnrinble) '
c. Packeulc.li very '" ll1e corructnnler a. (( v'xj Ittl = (V'x) Ill]= (\lxl[<.t = ll
d. P.ttd Ul ~nd connectivity b (Vx)[u] => (3x)[tt A jl]
Which of lh~ lollowing ~enurios muy l~tcl ~. ((\1~) ICLvlll => (.3s) lui = ('v'JiJI,o.LI
lo no im!covemble <'IJOr in " '~1l1thusd d (Vx)[~~ l =;o (VKll~l = (nl[fl])
systeoil 33. Consider the l'bllowing Jonnula u and its
a. A tmu;:accion wrices a d:ttu ilcnt after n two inlerptetations 11·and h
1.0 1'\!UU hv U11 WlCOIDJUl!ted IJ".mlitiGUOII 11 : (Vsl(J'.r.,. (VyXQ-') eo .....QJ71l :> (V.t)hP•I
''· A lninsadi!llll'I!U(l~ 11 tlaln itl!m alkr 11 lt. Domnin: the sct of nrllUnll numbers
i~ rclld hy rrn nttconlJllttU."<l tr.msaccion
c, A transaction reads a data .item after it Px • •x '" a prime num\x:r'
is wrruen by a cOt\unirtedtmt~S<~cticm Qx) ,. ·v c.lividi.'S x'
d A trunsucuon t'llads u dum item tt(kr it 12 ~un~< as 11 except tbut P\ .. -x is u
is wriucn by rut nncomm!tt(Jo.i cornpl.lsit<! nun1b.."f"
lran1100tion Vl!uch of the lbllowmg slnlemems Is true?
311 Coosider the foUo\\iug SQL que!) a. J1 sntislies a, l 1 docs not
JeiCC:l dlstiPct a 1. @]_, ..,.. , 0 111 h. 1, sat.slie.• ~ lrdoes 1101
rrom r,, (}. - . r... c. Neither It nor I! Sllttsti~'S u
w.I!Ut' P
,1, Bolltl 1 und 11 SOJiis fv u
l'or un w·bitr;uy Jll'l:die<~te f , Ons qu.JI} is
J..J m adeuucal 0.11~ ure to he nl~ced u1 n
cquivulenl 1.(1 which of !hi! following
relaliomil algebra expressions? distinct bags. Yoo nrc g1ven that m ;;:: bi.
fl U~ {n X 'i X • • • X~.) where k is a LJ1111lrtU numb<>r ~ 1 In bow
a. ..Aa-A. .. mMy way~ 0011 the balls lx: plnced in1he
n o, (r. ... 'i ~ ... p...ll ,_, bilgs If CHch bag must cunurln 111 k'Wlt k
1J .............
[J CT, ( r, I.J .. I.J ... U •.) halls'/
c. .. .... _.....
c1.
n
• t .... - .
a, ('i " "a n ... n ,_,
a. (::~~n
TWO MAIIKS QUESTIONS (31-80) h (m-4 rn-1)
11- 1

31 Let ($. s ) l>e • panial order wl!h IWCJ


miuunul elerncnLs ~ und h. und a uwxluuun
c. (::'~;)
dement c. Lt'l !'· S ~ JTnre.l'alse) ben
predicme dcfrned on S. Suppo~ ilJUl l'(n) <I, (
m - kn+u +k
Il - k
-2)
=True. P(b) = J7al~e and l'(x) = P(y) for
ull x. )' e s satisfyiug x $, "h= = ~llltld 35. C(>nsidt.:r the following ,,'Currence relnuoo
for logical impticatiotL Which Qf lbe T( l ) = I
follo11~11g statement C:Ai'fNOT l'>e tmc? T(n+ I )= f(n)·•· L(J,;:i)j foruUn ~ I
~. P(X.l = Trru; Cor all x e S ~udt tl\al l< "'
h The vnlne oJ'T(ru') lor ru:::: l is
b. PCx) = F'ulse !'or nU x e S such Uwt x .. /}/
a. ~ tlJ 111 J9) • 4
IJUild'"'c
c. L'(x) =False for oil xe S such that bs
b ~ (4n,~ - 3m .._ 5 )
x nnd ~ =c
\1. PCx) = Fulse for all x " S s~~b lbu1 u s
" and b s x
~ url 3
m _ ~ , 5 Wbic!J of the follo,vi.ug numbets ts the
c.L -(~m - 34m" t 137m • 104) - - encoding, h. of a non-empty sequence of
6 6
36. How many perfect marchings nte d1e1-e iu a stnngs?
complc11o ~,>raph of 6 vertices'? •. 213757
a. 15 b. 2~3~5·
b. 24 c. 2"3')59
t . 30 d 2 105 t"7 1"
c.L 60 ~C) A graph G = (V. E) sunsties IE! ~ J!Vl- 6.
37 Let f ; A ~ B be :m U>Jcc(Jyo (onc-to•vnc) l11e nun-degree of G is dcliued as
function. Deline~ : 2" ~ 2 as: minjdejlree(v)} 'Therefore, mm·dcgree or
G cauuut be ve V
g(C) = Ht~l I~ e t'i, toqll subsets C of
3, 3
A
b. 4
Define h : 213 ~ zA tiS: hCD} = lx I" e A,
Co S
l{x) e D) , Jorall subsets D of B.
Which of the following statements i~ d. 6
always true'/ 4 I. Consider the tbllowtng system of lntl'81'
equations
a. g(h!Dlg; D
b g(h(D))-2 D
c. g(h(D)} n D = ~
d. S(h(D)) n(B - D)~q,
C'onslder the set ja. b, c) "'ith binnrv Notice thur the seonnd nnd lhc third
opemtors + and x defined as follows. . colullltJS of Ute coefiicieut matri.x are
. • • ' X • • • liueatly depemleut. For how rnru>y values
of n. doc• this system of equurions bm'l!
• • • • • • b
'
•< • <b b' • ,, ' •,,
Infinitely many solutions'l
3. ()
• <
' '
F'or exampl.,, ~ + c = c, e I· a - 11., c ~ b = c b. I
and b 11 c = a. Given the followiog ser of c. 1
e.quarioos: d, infinitely many
(a >< x)+ (3 >< y ) = c ~2. A tllccew'se Hnear funcnon llx) is plotted
(b r x) + (c ~ y) = c using thick solid lini!:S in the figure below

'~:~:.~:~.~/..
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,

39 l .et 7 = Ia. b. c. d. e) be an alphabei We


de line ru1 encoding scheme as iollows:
g(aJ = 3. glb) = 5, g(c) = 7. g(d) =9'. g(e) =
II Ir we use lho Nowton-RaplL,On mctbud to
Let p, dcnl)te thu H h prime number (p 1 = lind the roots or ~l<) = 0 using " O· x 1• ;md
2) x.: respecri\•ely as tnitjal guesses. Ute roots
For u non empty string s = at .. . a,, .. obtained would be
where each 111 e I., define ils) = a . 1.3, 0 6, nnd 0.6 ri:SpecliYely
n!"", ,~(<lj I For- a O()ll empty sequence b. 0,6,0,6, aod 1.3 rcspeclh•e!Y"
<s, _.... s,> of string.• ITllm r tldinc c. U L3 . aod 0.6 respectively
I~ n· _ _ _ , r..1, ..,
, ....SI , .... .... Su>-
d I,3, 0 ,(\. nnd 1.3 respeclively
()of IJ
43 The followm~ is n scheme for floaung ' (9, 10)
poim number rejlrcsemullon using I6 hi~ d (II II)
. ._ , . .

Sip- -
'-'
I , l
14

Lets. c, Md m be the numbers represented


•n bmary m !he stgn. e.~ponent. and
'
I
·~ '"

0
J
-lb Constd<-r the ALIJ shown l:>elo1•
I: ---.r.:-----.
~,. I""
)
mannssa netds respeet1Vcl)' Then the Nl l.£L...l Nl
Dontiug point number rcprescnt~d Is. ... - - { ,_. I 1-
l ~ I)' ( 1-,,. 2 ' )2
fU,fllhrf'\fiSr:
1
.I{ tllc<:J<jlll!lml "IIIII I
! i
Wha1 is the mnx11'11um diiTerl!llce hetwee11 If the Open~tld:. are tn 2's 'I!Umplcmctlt

two su~:cess"'" real numbcrs l'!prcS¢nUtble rct)l'cscntation. whlcb of the followurg


in this sysrem1 opernttons cun he roerlbnrred b) suit.a!>ly
s~Uing Ur~ ronlfol hncs K Wid Co only (+
.b1, 2-··
:r'J nnd -dl!riOII! tldditlon nnd subtmction
r.!5pectiv~l~ Y1
c .,v
"- A+B, ttndA -B.bttlnotA+ 1
d 211
b A+ 13, 3n<l A- I, but not A-1-1
44 A 1-mput. 2-output synchronous c A + Fl. llUinol A - ll or A + I
sequenuat cm:ml belmves us fol lows.
d A+ B. and A-B, nndA +I
L.:t '"'· o~ denvte lh~ numhar ofO's ;ulcJ 1'!1
rus~e.ltvely w inillal l bits of the inplll (~
-H Considt'r the followmg circuit composoo
+ o~ = k ), The. crrcwt output 00 unul one
of XOR gates and non-tnvening. buffers
Ol tne following condrtrons holds,
'"' - ~ = 2 In thiS case, the oulpm M the k- :_QD-Q~
lh uttd ull subsequent clock ti~ks "' 10.
111.- ~ = 2. !Jr um eusc. the output ntthe k- l'he non-mverung buffer~ have delays St =
th nnd nll subsequent dock ticks rs 0 I 2 ns nnd lit= 11 ns as mown mthe lia:ure
Whst 1s the mminl\lm number of SillieS Both XOR gates nnd nil wtres ha1•e-1.cro
ret!Uired In the Slate llllllSIUOll graph Ol lh~ delfi~ Assum~ lltQl all gull! mputs. outputs
400V() cln:uJt7 ~rtd wires ur<! Sl(lbl<> (ILlogic II?\ tl 0 at time
a. 5 0 If the ft\llowin& w:wefonn rs applied ut
urput A. now many lr.Ul.~iuon(s) (tbur1ge of
b 6 logoc leldS) OC(ul(s) at B o.IUring the
c:. 7 rnl1:rvnl from 0 to I0 ns·l
d. 8
45 The htJ:rnl <'QUill ofn buolenn cxprcssivn i~ _, I , • ' j I f
the sum 111 Ure numher of time!' each lh(ral fAt I .., I ICII ON •
ap_pcar rn the c~presslon For oXIlnipl.:.. the
literal count of (x~ I xz·) ls -1 Whnt ure
1he minimum posstbk lrrernl counts of the Tbe following infunnulluu pe.rt.nius to Q.4849
product-or-sum and sum-or- produ~'t Cunsitler the followon& usscmbly l!onguugr:
represci\Uitlons rcspc'Cltl el) of the function progmm for o hypotlretlcnl processor A, B. mid C
givtm b) ih~ followmg K~maugh map• :tre ~ h1t regh~iers IIJe meanongs of 'nrious
Here, X denotes -don' 1rure'' 11\SlfUOtions ore shown as cumrncnll>
~ • tl U I 'HI
• lC I 0 I
OlOIXO
t1 1 X X 0
lt X 0 0 X
d.Ill, 9)
h t<J, tJ)
......... ";a-a c. Thore is u d~t<>nuini~tie pushduwn
7 uf IJ

.. ;...... . ........
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

. . ... a,....... ..,._..,.


&.t'-•r,l
Let tlt<l l3oguagc accepted by M be L. Ldt
L1 be the language ~ccspted by the Nl'A
a... M III.JII-• .,._1
lvl1. obrmned by cb.anging tb.e ucccp!Jng Here. gev IS n fmtcLtoa that generates tb.e
slale of M to a non-accepting stole ond b) output code. nnd IIC\1 lcJIP is a function
ehanging the non-aceepting ~totes of M to thDI rctutn~ the uU111e of n new temporal)
occspti1\g stales, Whic-h of the followinJI ~annble.on every Cllll. Assume thnl ti s are
statements is true? the lemponll) vnrinble names gcnera.ted by
a. L, 1= (tl, I } ..·L Uell'l:elllp.

b L 1 ~ 11L I I'' For the Sl'atcmenl ·x = y + z·, the 3-


c. L tc L addtess code sequence generated by llus
deliJtitiou is
d L,= I.
o. X ~ Y+ Z
56. Cous1dcr the gnuuut:lr shu" u bclo"
b. h=Y+Z. X = t1
S-> ' E 1SS'to
c. t 1 ~ Y , b = t 1 l Z. X = t1
S' 4eS i o:
d. ,, ...y : i2~ z: h"'lt + t: X • l1
E -+b
fill. A progfam consists of two modules
lo the predictive par8<l table, M. of this el<!'Cttted sequentially. Let f,(l) nud flt)
grmll!n:tr, the entries MIS-. e) mtd MfS'. rcspcctrvcl~ denote llte- probability densit)
$1 re.specllvel) are func1ions of time taken to execute tl1e two
n. rs·...... u st r"'d tS'-+ t:1 modules. The probabilitv densltv function
b, IS"-+ e Sl aud II oC Lhe 0\·ernU time tok~n to c~eoute !he
c, IS' - r. f rotd (S' --> r. f progrllln 1$ giYctt by
d (S' ->-eS. s· -> tl jlll}d [S' -+e l a. r;(l) + l':!t)
57 Coustdcr the graumtnr shu"u bclo" b J~/i (>·).HI}it
S-oCC
C - teoC!d c. J~.Ji (x) Ji (t-x)dt
This gnt1l1lll ar is d. mo~ ll't(l)- tj(l)l
n. LL(l )
b. SLR(I) bur not LL( I) The following lnfom1atlon pertains to Q. 61-62
c. LALR(IHutuolSLR(I) In 11 pcnnulnlion 01 ~ a,., of n tllstincl intcsers. an
d L.R(I) but not LA LR(I1 ul\'ersion i$ a pair (~J. ~,)such thai i <g uud. a;> a,.
9 uf13
d. Y+2X
6L Jfn.ll pl'fl!UJta6otiS !IN equally ti.\{ely, wlutl Consider the .followirtg 2-3-4 lll\El (i.e., B-
is Ute expectacl nuntlJer of iuven~iqu.• in. \L tree 1villt u minint!IIrl (Iegree o( lwo) in
randomly chQ<ien pe:rmllhltilm oil...,.~ wluch eac)t durn item i~ uletter. T)l" u.•ual
a. n(n - J)12 alphal)el:fc.U ordering of teeters i~ used in
11. tt(n -l)/4 co11sl:ritcting ·ll1e tree.
c, n(nl J)/4
d- 2n l log 1 iij
62. Wl\lli wmlltl he dte 1\'0tSt ~e rune
ct>mplexity of the [usert.ion S011 hlgonthm,
if llte inputs ll(e re;;tr\cled to permutation-•
()f 1.. J l Witll atlliCif<t l l if!VerSilltlS'I (II)
a. Elf.n' )
b.. E>(nlog n)
c. 0(n 1 ~
d. ®(n)
63. A data strudllr¢ 1~ required far slofin~ a
$el of integer!< sltch lhtJI l'\!Ch of lite
followiltg opetlllions can be done _itt O(l<l!',
n) tim<~, 1vher~ ti is Ote ntl1lll>er Qf eJem"!lls
in the set
[ Deletio.n ofthe amflllest element
.U l.JtJ<Ilttioa of au element j f i t is not
already presentln l'hc set
Whtch of llie following: dala slro1:tures C<Dt
be usedJi:lrlhts purpos~:l
a. A heap can be· used but not p balanced
biruuy searclt tree
(D) None llfthe above
b. A balSllced bulJl!Y search IJ'Ce ~ be
(it)_ The cul'te root o f u nalmal umniJe.r m i~
osed but uot a lit!ap
defined as the large&! natural number Sitch
¢, Both balanced biruuy selltch IJ:ee and
lhul m3 s; n. The complllXliy (If computing
hen fl can be us:ed the ollbe root of n ( n i:s: rep,;esent~l in
d. Neitltcr balanced bi-nstysCil!ch troeuor binary notation) is
h~mJ? c;ut be used
a. O(n) but uot O(Jf ))
64. I.e\ S be" st\tck of me " z 1- Slarlmg wiUt b. O(n° ~ l>uJ nol O((log n") lor ooy
tlJe. empcy s•:~~ck, • tq)j)QSe we p11Kh the :fusr COI)S!anl k > 0
n nlll llral numbe!'s in seqtl"-'l<>e, >m<i lhen
c. 0((log 1l)':) for some co.nstaut k > o.
perffirfll n ;pop operallons. As~mne that
but not O((Jog log n)'") f or any
PU!ih and Pop opemtions lake X seconds
""ch, mttl T' second.• elapse between l!te const;ull m > 0
end of oue such &tllCk oper.ntim and llle d. O((log log nl) for sam~ constillf! k >
slnrt of file- llCli.T <lpcrntiOtL f101' Ill 2 1., 0.5. bllt not O(gog Jog n)0 ' )
define Ute stack-Ufe of m as Ote time 61. Lei 0 = (V, I') be au Ulldirect<~ graph wllh
ei1tpscd trom the end af Push (m) w llie a $\tbgrapll 0 1 = (V t. EJ), Weigirts <Jrl'
slntf Of the pop operotion 1hal Temov"" m assigned t1>edge~ ofG n:.fllllows.

•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

' .. c. lf thl'fC ~~tisLS n path from J 10 k, A[J, k]


c(lmains the longest path length lfom j
to k
d. If dJere exist.a path from j to k. every
simple path frow j to k eoutBins al
most 1\U. kl edges
71 . Cons1der the followin!J IOgtc proh'l'lllll l'
A(x) ~ B (X. y), C'(y)
+- B(~x)
n, 29 Which of dJe following first order
b. 3 1 sel'ltences is t'quivulent lo P?
c. 38 a. ('v'xJ [(3y) [B(x, y ) 11 C(y)] ~ A(x}J "
d, 4 1 ~ (3x) I B(x. x)l

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

You might also like