Computer Science & Engineering: A (Mark)
Computer Science & Engineering: A (Mark)
Computer Science & Engineering: A (Mark)
(i)
.
Ft>r the digital circuit in Pig. I the
expression fonhe outpU1 I is
...
... .....
CiT) ln interleaved metnOI)' organiwtion.
{h:) if the binary tree in Fig. 3 is
consecutive words are stored in
traversed in inorder. th~n the order in
c.onsecmive memory modules in
which lhe nodes wil l be visited is
interleaving. whereas
consecurive words are stored within
lhe module in imerleaving.
............
(\>iil)C0113iaer thltfoUowing Pascal fiutction!
ex.ecutes m in&tmcti.on •nPJ>lied
_ _.IJ',,._),......,,
(B)
by an e.xteroa1 device lhrough
UtelNTA si~al
_
(C) ex~1es an iu•lru<·libn from f:•t :
.... ,.• <·•••:•'+•·
-·
mem01y location 20R
I X:•i
(D) executes a NOP
()!) none of tlu~ above. The 6m~tinn onl.l 'X(N), i f N i•
positive, will retwn
(;«) .tndicale nil the true statements lrom (B) Tho ootlj~toct1on F1 P~ i~ not
t11e fuUowiiiJ!: soti;fi3ble
(A} RcoUBive descant pomn& (C") Noithcr is llt UtOhl¥tlll•
cannot be used for grammars (D) Neitb<"'' i• ~nlislinble
wiOl lell recursion.
(E) Non.• of U1e •llwe.
(B) The intct'rucdi• te fnnn for
(Xiii)L~ r 1 (1 + 0)••• l l "O >llJt • 1•0
rep.uentin.ll e~pres~ions which
i.~ bc;st ~uited for CQde be three regular exprassiooL Which
011timi.zation Is tho po$tfil( one of the follmvmg is true'/
iorm. !Al Lis) Lit) •nd L\s) \ L(l}
1C') '\ prOgrttmming langu~&c n(Jt (B) L(r) = L (s) ~od L(&) ~ L( t)
s upJli,lrting cilltef re.,ur~it)n '"
pointer typ<:o! <lOCI! nol need the (C) L(.s) =L(t) and L(s) ,;: L(r )
•np(l(frt nr dyn~mic memor}
(I)) l. (t) - I, (•) :tnd J ,(~) - q r)
oiiOil.'ltion,
(£) Nlltlc of Ut<- abuw
(D) Altltougll C doo~ not ~upport
call·by·nnmo pnrnmeter (xiv) \Vh,ch one of the rollowing i~ the
pnssing, the effect can be strongest corre~t statement about a
cot~lly simulated :in C. finir.e l3llguogo over sumo fitlile
(E) No fc:~ture of P>S<:Al vlolot.a olpbabol ~?
strons typmg in Paso~ I. (AI It could tx: undeoidahle
t.<i) lndicate Jill the flllsc st.atcmonL• li mn (!:!) It is "ruring-mochine
the stotcm<lnL~ gken below: recogniz!tble
(AI The amount or virtual m<:nHll)' (C) It i• n context-sensitive
•vaiiAble L• limited by tl•" language
•v•il•bility tof $<'C<lttd o.l)
~tomge,
(D) rt is a rogular language
(R) Non• qfU1e ·~()ve,
(8) Anv implen>ent.ation nf n
critical section roiJUOO tho usco. ~. {,jj\le ~hQrt DOS\I'Cli! hi the 1\llliiW in!4
q~~tslions:
jut M
(4 x 2 ~ 8) \Yib}re 111 w1d d denote tlte
·mintcmJ$ und don· ! earll)i,
(i) Coll\"<rl the ti>llowing Pascnl
rcspoclivcly.
stulcmClll 111 11 aiugle n.~sigmnent
s tntcmonl; (4)
_,,_.... ,
11 >1' - , !- - - (c) l'tnd U1t maximum clock Ircqucnc')
>•t 1\ hkh the ~<)Uuter iu fig. 5 ~nu
be operute<i Assume tiJal tlte
Jlrupogntion delay t.brouglt eucb
(ii J Couvert the Pasc;~l st:Jtcmc nl n:pcat Oip-Oor and euob AND guw is 1\1
S uoti l l:l; mlo on "'luivalent f'ascnl ns. Also nssume thut tb" wtup time
statement that uses the. wltilc for tl•~ . I K inpuu. •lf tho Oip·Jl~p~
COnS'truCL 1$ negligible.
data paib
__.. ,,....
specJficatrons: code. (all d311t items arc or type
mtegcr)
Crystal frequency 6 MHz.. ~) ;
ROM map:
RAM mup .
0000 through 07FF,
I 000 through 17FF
ROM reqt~ires one watt ~tate
.....• :•2 ;
e!•• + • :
{,):
• := t:
RAM reqwres no wait state.
..
F! •S ;
.,,.,.
'"' t-..·
Determrne the rnS1ruct10n cycle time for z := tOO ;
e8ch of tbu following lnstrucliuns
(l)
(li)
ORI r\ , 22
OCR M
... .... ;
.-.-~ -·. 1)
-
through the most stgniftcrutl bit <~nd the
01
least signilicant btL respectively. The twlf• t·. -'• •. 'b =- •• bl
output data port Is nt the same 1(0 address
-101-1 and is acuvated by a write operation
Assume Ute availauil.ity of SSI. and MSJ (4)
level compenents Qrtly
7 n[l!
10. Consider tb~ follo\\1ng grUituttor ror (u) D•~ tlli• }ic~e111e ensure ntuluul
urithmelic express•••••q u.<tng bin•!) ex.olusioo in 1he critlrul .>ecli1111'l
Qperotors and 1,1hicb o.re not assooiutive: Brielly ~xplnin.
li 4 E- 1~T (5)
I'~TI-' F (b) Is there n ~ituotion in wlu~>h n
waiting process can never enter the
f'-+(6) i d critical HCCt'iNJ'l U' ~ ~"\plnin 1111d
tJ: os 1be stan •Ymbol ) s uggest modifications to ~Jc c.odc
l'.' oolve this Pfl)blem
(u) Is lb1s .srruwnar un:uubis,9us'l lf so,
what is the n:l•live pn:cedoucc (5)
between ~und 1'1 u: not. gtve en 12. SuppQSil, u dnht bu•c consi.qt, ~f lhe
unamblgous grammar lhul rollbwing TCiulionR:
gives! precedence o'"er-
S\JPPIJE.R (SCODE, SNAME, CfTY)
(21
PART (PCODE. PNAM I!, PDBSC. cn·Yl
ib) Does ~~•
grn,nmur allmv
exprossoons wid1 redundant PROJECTS (PRCODI!, I'RNAMI!., CITY)
JJ<Itcothescs us in (id i u) nr in ld- SPPR (SCODI!. PCODE. PRCODE.
(idtid)? U: so, convcJ1 ll1c grammar Q'J'Y) ,
iuto o ne which db~:$ uol genomic
e~pressious with rcdund1wt (u} Write SQL progr•ms
parentheses. Do Utis whb minimwu currespoudinji to Ute following
number of changes to lhc given quencs;
l)rtllluutiun rules t\J\J uJJing ttl fi) Print PCODE values lp r
most une murl! ·pn•ducli()n rule. parts supphcd let nny
(4) project In DELl 0 b) a
supplier m 1)1\LIII
(o) Convel1 H1e grnmmnr Qbtamed in
is not loti
( b ) inln one ll>ut I tt / Prtut all tci pl"" (CITY.
rtoursivc. I>COD!c:. CITY ~ such thnt a
suppltcr in the U I'St ci.ty
H) ~uppJi<l.$ t be spt'Cwed pat1
II Cunsirlet the lilllml "'$ sobcme IC.It h> u project iu th~ second
iJnplotllculiull- u. c:rilje<u section iu a ci ty. but do not print triples
silualiuu \\itiJ Um:c: processes P 1• P" and in which lhe two CITY
Pli. volucs are the same.
,,
-_.......
. .. Cif=::l-
..... cn-- -.. w.•
1 (b) Write ul!!ebrruu solmiun$ ~co
(6)
the
·-.....--···1
tn llcl\viug.
h•..,rn e..
( i) (Jel SCODJ; vnlues f<>r
. .. t4t•W.t
~uppli¢~ who supply 1u
-................
,
. . t4h--- ixlth projects PR I nnd E'B2.
...,.. .....
·~ ·-··1 ~ -
,...
, ;
,
(ii) Get PRCODE 'olue" for
projects supplied by nl lea<l
one supplier not 10 the
.... , h . ...
---
---
..... ............ ,f
. . (11 ; - .... ,
.... ; ~
13.
Srune cit)
(-I I
01ve dn optlmul ulgoritlllll Ill p:<eudC>-Il<><lc
t'or SQrtmg a sequence of n mtmbers which
ha.• only k disti nct numbers (k i> llol
~ ofl>
C..t..) ctt• fi (A1Y) A (Arr O:rHflb.f)- - - {f•'H
~nown • lllll!OI G,;e • bnef llnuly>O~ far,
"' ._.,, ' ">') c.v• Ul <..: ;t,.. 111 ,,, ,, - 111 ,. , ,,.
the ume-comple\l t)' of )(lur ni!!Qnthm I\ IA.d - 1(.4 11~
110) (A - uniHTsal qunnufict dni.l I' -
14 tXISI<ntial quamiliet)
Whttl Jlntctun: ,. I"CJ'fC>Cnlttl b) Does 11 hn• e finite model•?
the bu1~ lf'ee..,
Is n sansf111ble' If so, ~·e a
Ill countable model fN n~
tbl Gt~C me dtll'~enl >ICps for dcleltnll (51
the node .,;,h ~ey S "" rh31 rhe I(> lot Fmd !he number of b!nal') stnR!I>
ilTUCIUI-c r• fl<"-"""' cd " o f l~n~th 2n \\lUI 1111 cquol
(l) number or 1-s and O's. and the
propal)' !hal c.-cry ~lh or w luu
ttl Outhnc o proe:~urc m pscud~t at leas~ u.< orumy ll's rs. I'>
w dd<t< nn atbttnl1) node frocn
wch a hrnal') 1m: wuh n nodes thlll (SI
"''"'"!\cot:. 1hc ~tnu:tur~ Whnt ,, 1h" tbl Sh"" lhot all •nile~ tn 011
\\C>I'SI<tb< tunc-comple~uy llfyuur
undirected fioue j,traplt cannot hn• •
proccdurc'l
di•noa d~ if tile 11mph lm~ pt
(3) lcu.'a hHJ ''Mt«:~.
(51
1 7~ (U) Sho\\ thm I urutg on!IChoneo. \\ hldo
have a read-<»tly Input tape and a
constnnl-•izc \Vat k· tape. rcllOjlno""
po'l>CtS<lly the ch.ss of resu1nr
lanb'llages.
15 Ia)
. ..
Show that the product ol the letbt
(b) Let 1. b~ Lhc htnguaj,!e oll btiiUI)
>tnu~ "' •\'luch 1he Lhlrrl onll(ol
or
'>
(51
common rnuluplo nn<l the and tlte rrom !he nghr IS 1) 1 Oh e • 11011-
determinislic fi nile antomntoo 1ha1
lt'feiH~t COIItmUII d t\ t"()t nf l'\0
rccogntto> 1 111N muny <tutu'
JX'ICiiCI\C IUIU~t.:r' ft und b IS t1 ' h
docs the uu..nJm.szrd cqun:alcru
15) deterministic fimtc 8UIOinAton
lonlildcr the folhmrn~ litSl-otucr hO• <'~ Jtt,lll) ) our"'""' c• bncOy
fomJUla (51