11
www.examrace.com I G,\ TE-2007 I or I J I, COMPUTER SCIENCE & ENGINEERING J1 2. 3. -1 . 5. Cons ider th e folloMng t\\o s tatements abo utthef lmction f(x)=lxl. P. f (x) is co ntinu ous for all real valu es ofx Q_ .f(x) IS diJferontiabl e for al l real values of'< Wh1ch of the fo llowing is TRUE'? a, P IS tru e and Q is false. b P is false and Q IS true, c. Bot h P and Q are true d Both P and Q are fa lse. Let S be u set or ii elemen ts. The number of o rdered prurs smallest equhalence rolaiions on S are in the largest aJtd the a, nand n b. n 1 and u c. n 2 and 0 d. n Wid I What is the maximum number of differ en t Boolean funcuons involl'ing n Boolean Yari abl es'/ c. 2' d 2' ' Le t G be the non-planar graph With the tmmmum possible nu mber of edges. Then Ghas a \1 edges and 5 venices h 'I edges and 6 vertices c. 10 edges and 5 vcnices d. I 0 dges and 6 vertices Consider the DAG 11 V = 1 1.2.3.4.5/ J), shown below 7 •) , Which of the fol1 o11 ing Is NOT a topological ordenng? a. I 2 3 4 5 C. b. 13245 (\ c. 1324(;5 tl . 324165 Which of lhe follo" ing problems Is undecidabl e'/ n. Membership p.roblem fo r CFGs, b. Ambtguity problem for CFGs. c. Fi niteness problem for FSAs d Eq uil alence problem for F SAs. Which of the foll olvmg.ls TRUE'' a Every subset of n r eg ular set is regular b. EYery finit e s ubset o( a non-regular set is regular, c. TI1e union of two non- regular sets is not reg ul ar . d Infinite union of fitute sets is r eg ular. Row man y 3-to-8 line decoders wi th ru1 enable input are needed to construct a 6-to- 64 line decoder without usmg any od 1er log1c gates'/ a. 7 b. 8 c. \) d. 10 Consider lhe fo ll owing Bool enn function of lour va ri abl es: ffll. X. )' . l) < !:(!. 3.4, 6, 9, 11. 12. 14} The function is <L independent of one variable. b. i nd ependent of two variables, c. ind ependent of three ariables d, dependent on all the \'ntiables. Consider a 4-way associative cache consisting of 128 · nnes with a line size of 64 words . Th e CPU generates a 20-bit address of a word in main memory. The number of bits in the TAO, LIN£ and WORD fields are res1 Jeci1 ve ly· a. Y. 6. 5 b. 7. 7. G All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in ALL JNTU WORLD

I I, COMPUTER SCIENCE J1 - JNTU World COMPUTER SCIENCE & ENGINEERING J1 2. 3. -1. 5. Consider the folloMng t\\o statements abouttheflmction f(x)=lxl. P. f (x) is continuous for all

  • Upload
    lekiet

  • View
    223

  • Download
    2

Embed Size (px)

Citation preview

www.exam

race.c

om

I G,\ TE-2007 I or I J

I, COMPUTER SCIENCE & ENGINEERING J1

2.

3.

-1 .

5.

Consider the folloMng t\\o s tatements abouttheflmction f(x)=lxl .

P. f (x) is continuous for all real values

ofx

Q_ .f(x) IS diJferontiabl e for al l real values of'<

Wh1ch of the following is TRUE'?

a, P IS true and Q is false. b P is false and Q IS true, c. Both P and Q are true d Both P and Q are false. Let S be u set or ii elements. The number of ordered prurs smallest equhalence rolaiions on S are in the largest aJtd the a, nand n

b. n1 and u

c. n2 and 0

d. n Wid I What is the maximum number of different Boolean funcuons involl'ing n Boolean Yariables'/

c. 2'

d 2'' Let G be the non-planar graph With the tmmmum possible number of edges. Then Ghas

a \1 edges and 5 venices h 'I edges and 6 vertices c. 10 edges and 5 vcnices d. I 0 dges and 6 vertices

Consider the DAG 11 i~l V = 1 1.2.3.4.5/J), shown below

·~

7

•) ,

Which of the fol1o11 ing Is NOT a topological ordenng? a. I 2 3 4 5 C. b. 13245 (\

c. 1324(;5

tl. 324165

Which of lhe follo" ing problems Is undecidable'/ n. Membership p.roblem for CFGs,

b. Ambtguity problem for CFGs. c. Finiteness problem for FSAs

d Equil alence problem for FSAs. Which of the follolvmg.ls TRUE''

a Every subset of n regular set is regular b. EYery finite subset o( a non-regular set

is regular, c. TI1e union of two non-regular sets is

not regular.

d Infinite union of fitute sets is regular. Row many 3-to-8 line decoders with ru1 enable input are needed to construct a 6-to-64 line decoder without usmg any od1er log1c gates'/ a. 7

b. 8 c. \) d. 10

Consider lhe following Boolenn function of lour variables:

ffll. X. )'. l) < !:(!. 3.4, 6, 9, 11. 12. 14}

The function is <L independent of one variable. b. independent of two variables, c. independent of three ,·ariables d, dependent on all the \'ntiables. Consider a 4-way ~et associative cache consisting of 128 · nnes with a line size of 64 words. The CPU generates a 20-bit address of a word in main memory. The number of bits in the TAO, LIN£ and WORD fields are res1Jeci1 vely· a. Y. 6. 5

b. 7. 7. G

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

omII.

12.

13.

14.

15.

I (j.

c. 7. 5. 8

d. 9. 5, 6 Consider a disk p~ck with l6 surf~ces, l28 irockl; per ~w:face and 156 sectors per tr~ck. 512 b)'~es ot' data are stored in a bit serial manner in :1 sector~ 11t~ capa~,.' ity ot' the dis~ pad, nnd the number ot' biis requir~l to ~pec i fy ;1 (ll'rtiL111nr !iC<;tur jn 1h~ di~k nn! rwpt\:fivt:ly;

~. 256 .Mbyk 19 bits

h. 256 Ml)yte, 28 hi18

c. 512 Mh)~o. 20 hils

d 64 Gbyt<. 28 bits

'l11c hdght ol' a binary '"'e " the mnximum nmnhcr of edges in any mol to 1ouf path. 111c 1119XiliiU111 llUIIlix:r of 11011\.'S

w a binar)' !r~c of hoigJJI b is :

• 1, 211·1 b. 2b·l I

c. 2b'1- 1 cl 2 b•l

·1111!- nta~imum UlUllb\!t OJ' blnftry lr~ thttt C<UI be fonneJ \\ ilh lhre~ un1abele.d nod.;.~ is: ... b. 5 c. 4 d. 3

Which ofth~ folll,wiug sortin!) algorithlll$ hJL~ the 1\lWCst worst .. C'a';"t:: compl"~ity'}

a. l\-1 ergc son b 13ubblcson o. Quick sort

cl Stlo.'Ction •ort Con•ider ~Jc followmg segment of(:-code: tnt j, n:

j • l; "'hile ( j <= n)

j = j ' 2;

111c numb<r of ,•omparisons made In the c:-.crution of th< loop for lll1Y n > 0 tO!

a. (logz nl · I

b. n

c. l lo&J nl d. [togl nl ~ I

GJ:l)up 1 cQftllllns ~0111< Cl'l ~ohoduling :tlgoritlurts r01d Group 2 contnutS some

2 or ll applfcalions. Match entnes In Group I to <illries in Group 2. Gr<111[1 I

P. Gang Sc.hodu ling

Q. R;ue Monotonl~ St·heduling

ll F:Ur Sl1are Scheduling

Group 2

l. Gu:u-anlced Scheduling

2. Re:tl-time Scheduling

:t Thre•d Scb~duti u.g

a_ P-3: Q-2: R-1

b. 1'·1: Q·:!; R·3

c. P-2: Q·3: R·l

d. P-1 : Q-J: R-2 17 Cortsidcr the following star<meniS nbout

US« lev~! tlu:cads 1md kernel level llwads . Which on• of !he following stat•ments is FALSE? a. Conlcx1 SWIIc.h time is longer fo r

kernel level UIJ'Ollds tlnut lor use1• levd threads.

h, [ ser I eve: I thre:,1.d~ thl nnl need uny hardware suppl)l'l

c. Rclakd kcmcl levd threads c•u• lx: scheduled on diJTerent proccs"''"" in a muJtiproce~sor systeot

d, BlocUng one kontel level thr~td

hlo.;ks .,u ,·cluted threads.

I~- \l' lucb one of tbe tbUowing i.< n top· down parser'/

19.

20.

a. Recursiw di!Scel\l flilr!'~r·.

b. Oper:tlor precedence pnl'!<er.

"- An LR(k) paf'er.

d. Au LALR(k) parsu .

lu EtiJeru"t whon M•u~<·besrer encoding i~ used, tht:" bit ndc:- i.s: a Hall. the baud rat<.

b. Twice th« bsud rnte.

c. Sumc as.th~ baud nth!._ d. ~on~ of tl1o abilw.

Which ont of' the following us"" lll)fl as tile tmnspo r1 pruloc:ul?

a. HTEP

h. Teln'' ' c. DNS

,1. SMTI'

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om

I •'.'t. J ,~ f.,;! !£1~ \I J t:; i t.J: f: l fj §fil

21

22.

23

24

25.

How many difl'erem non-Isomorphic A bel ian groups of order 4 ate there?

a. 2 b. 3 c. 4 d 5 Let Grnph(X) oo a prcd1ca1e which denotes thai x is a graph Let Connected(<) be a predicate wh1ch denotes ~lal x ·~ eomJected Which of ~1e following first order log•c sentences DOES NOT represent the statement: "Not every graph is connected'?

? ~V'x( Graph( .r}= Conne~/ed (x))

b. 3x( Graph( .<) 1\ • rom•ca1ed (x))

c. -Nx( -.Urapl•( .1·) v CuiJne<Yed (x ))

d \lx( Graph( ,t·) =-. ('mmecM:I( x)}

Wh1ch of the followmg graphs has an Eulerian clrcult'! a. Any k-rcgular graph where k ls an

even number

b A complete graph on 90 vertices.

c The complement of n cycle on 25 vertices.

d Noneoftheabove.

Suppose we uniformly and raudomly select u permutation from !be 201 pennutahons of 1, 2. 3, .20, What is the probability !hat 2 appears at an earl•cr pos•non than any other even number in the selected permutation?

I 3.

2

b. 1

10

c. 91 10!

d None of the above Let A be a 4 x 4 matrix wt~l eigenvalues-5, -2, l 4. Wlucb of the following JS nn

eigenvalue of ' where I is the 4 X . . [A '] I A

4 •dent ity matrix?

a ·5

26.

27.

h -7

c. 2

d

3 uf II

Consider the sm S - la. b, c, d) Con.~ider

the followmg 4 pani11ons n,, n,. "·'· 1t.1 on

S. n,= {ah<.:d) , nl = {ail, tv!) , n, =

{alw.J) , n, : {a,b.c,if) . Let ~ be the

partial order on the set of partitions S' = ] 111, n,, l\J. n,t defi ned as follows: 1ti"' 11J

if and only 1f n:, refines n;. '!'he posel diagram for (S', ..; ) 1s

a

b

c.

d

\V' ~r.

Con.~ider the Set of (column) vectors defined by X ~ lx e R! I x, + 1<1 + 1<' = 0, where x 1 ~ (x1, x2, x,]r Which of the followms is TRUE7

r r a (II, · 1,0] , (1 , 0, · I] 1s a baSJs for the subspace X.

b. {[1,-L o]'', fl. 0, -1] 1}1•s a Hnearly indep.,ndent set. but 11 docs not span X and therefore ls not a basis of X

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om

c. X is not osub..,ace ofRJ.

d. Nrme oftlte •b<we. 28. Coll$ider U1e ~c:rics

).' 9 x,, - - - - ··''o- O.Sohtainod ft'Om the 2 8r,

Newton-Rllpbson method. Tile •cries comrerge!i to

;1 , 1.:5

b. .fi. c. 16

cL lA 29. A mmtmum state deterministic finite

aulomoton accepting the I<Ulj!U3ge L = {w ~v.:(ll. 1}'. number oCOs anti Ls in 11

nrc divi•ible by 3 >ntl 5, n:spc-ctivcly) lw

a. 15 s tat.,.

b. J I stale.

c. I() stales

d. 9 states

30. l'he language I = t 01:! 11 • _ ()) over lhe

alphabet !(). I. 21 is

:.. not recUI'%ive.

b. i.~ recu ... ive and ;, a detenmni•tic CFL. c. i~ a regulor b nguage.. d. is not :r determinf5lic CFL but u CFL.

3 J. Which of tbe following 1Pli£UD!!CS ~ regular?

a. {ww' I ~~~ ~ (0. 1)'}

b. ( Wl~·l .t, I!'~ ( O.ltj c. (u•.n••' .~.wo; (ll. l ) ' )

d. l·'w"'' ·'·"'oic (n.rr} 32. Let f (W. )(. y. Z) = ~ ((), ~- 5. 7. 8. 9, );\,

15). Which of the fniJ<Ming cxpn:ssi•ms nrc NOT "qui\~rlent lo f1 P . . ~'y ': ' ...- l$1 ' Xy' -... wy'z- -.~\.-=

u . w•y• : '' ltW'y ' + ~-= R. w·y·.:• 1 W.\!'y ' 1 xy;-.. Ay',;

S. x'y'z'-.- wx'y' ,.- •"' )•

11, Ponly b. Q ond S c. RandS d. S Urtl)

.1 uf I I 33. Define the connective • for dte Boole~n

variahle< X andY as: x•y = XY - X'Y'. Let Z = x•Y. Consider the (ollowing c.~pres•ion> P. Q ond R. P:X= Y •z Q:Y =x• z R:x•v•z = 1 Which of !be following is TRUE?

" · Only P and Q are valid b. Only Q :rnd Rnre valid. c. Only Pond R.•re v alid

d. All P. Q. Rate valid.

34. Suppose only one multirk·" '' Jlnd unc inverter lire aUowcd t.o be used I() imple,neni any l'l<><>llllm functiun of n variables. \VItal i< the minimum size of Ote multil>l(!l(er needed\' a. 2" line to 1 line b. 2"' 1 lioe lll t I inc c. 2n .. l line to 1 I ine

d. 2"'~ line to I line 35. In a look-ahead corry generator. the c""'Y

generate function G,. arid the carry lll'Dpagotc fuucliuu P, fol' inputs A, :md B1 are g iven by;

36.

P, ~A. e B u)rd a,~ . 1,8

The e-:presstons lor the sum bit S und the c.1rry bit e;,, ul'lhe look.-ahcod e.arry adder ate gh•c:n by;

S. =~$C.~mdCt~1 =-G.-. J~C',, where Cd is the input c:rrry, C'oru;ider a two-level logic irnplementatjon 1rf the look-ahcod ""rry generator. A•suroe Utat all P1 3otd cr. ure av~ilablt for Ute C<>n)' g~merator circuit und that Ute AND and C'JR gnles con ha,•e any number of inpuls. The numl><.:r of AND gates and C'JR glltcs needed h> implement the loc\l-ultcad can·y _gc:ncrutor for tt 4-bit lldder with S;-~

s'!;. S\.. s'fl rmd (... us its OUlputs are JtSI)ectively: a (), 3 h. Ill. <I

Ct 6, 4 d. 10. 5

The ~unh'UI &igunl fitUotion• of " +hit binM) cuunt~"r ·'"' given l><;lnw (w her;e X is ·'dnn lt C3n:"'•);

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om

37

3M.

Clear Clock LoutJ Couul J1w1c1iou

I X X X Clear 10 ( I

(I X 0 0 No t:hnni!G. (I t I X LonJ Uiplll

( I t v I tcHrnl 11e:\l

TI1c counler ls connected as lbllows. M .AJ II) AI

t t t t I I I I I ,_, "'"

.... _ ,_. --o 0 I I

Assume liwl the counter and gate delays arc negligible. If the cow1ler starts ut 0. then 11 cycles through the folio\\ ing :SeQl1011CC:

a. 0, 3, 4 b. o_ 3, 4. 5

c. Q_ L 2. 3. 4 d t). u. 3.4. 5 Consider it pipcloncd processor With t.hu tollowing tour stages: LF- Instruction Fetch I D: Instruction Dt.-codc und Opc;raud Fetch ~X: Execute WB. Write Back The IF. 1D aud WB stages take ode clock cycle each to complete the operntiou, The number of clock c.yclcs for tbo E.:X st:lgo depends on the instruction The ADD and SUB lnStntcltOilS need 1 clock cyc.le nnd the MUI , 111stnoction needs 3 clock cycles in the EX stage. Operand forwarding is used 111 01e popeliued processor V.~1~1 os the number of clock cycles t.akcn to comt>lelc the following sequence of lnstructiolls'! AOD R2, Rl, RO MUL R4, R3. R2 SUB R6, RS, R4

a. 7

b. ~

c. IU d 14

R2 <- Rl + RO R4 t- R3 • R2 R6~R.5 - .R4

Tbc following postfix expression wlll1 single d[git ()perands is c1 nluated using n st.ock:

39

40

41.

42.

5 of IJ 813 1\1 23*•51* · Note that 11 IS lhc exponentiation operator. TI1e lop til o clements of ~~~~ slllck after the Grs1• is C1•alua1cd arc: a. 6. I b. 5, 7 c. 3. 2 d. L5 The i11ordcr and prco1'der traversal of u binary tree are db e u lc g and a b d c erg. rcspccllvoly. The postorder tr~versal of tl1e binary tree is a. deb fgc a

b. edbgfc.u c, o d bl'gca

cl defgbca Consider o hash tnblc of si1,c sc1cn. wi01 starting mdex >.ero, and a hnsb function (3xt4)mod 7, Assum1ng Lbe hush tublc 15 init ially empty. wh1ch uf the following is lhe contents of lhe table when lhe sequence I. 3. K. I 0 is inserted into thi.\ lnblc IISlng closed hnshing'/ Note that­denotes an empty location m the tnble. a. ~,-.-,-.-,-.10

b, I , ~. Ill.-.---.~

c. 1 .-~-,-.-.-13

d I, Ill. M,- .- ,- .3 In nn tum cigbted. undirected com1ected gmph, ~!C shorLCst path from a node S to every mhcr node- is coml)ulcd most cfliciently, in tem1s ol' time complexity. by a. Dijkstra's algorithm starting from S. b. War:lhall"salgorithm c. performing a Df S starling from S. d. performing a BPS staniug from S. Consider UJC follow111g C functlon:

lnL CCint n ) ( sta t.i c tnt ceO; i f tn <= 0) re~u~ 1 : 1f tn > .31

I r • n; return ftn- 2) -+2;

I r-tul'n f C 1\- l l •r-1

I What os ~1c value. of lt:O )'I 8. 5 b. 7 c. 1)

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om

43.

44.

45.

46.

d 18

A comple.te n·ary tree is 3 tn .. >e i01 which each node has n children or no children. Let I be rhe number of internal nodes and L be I he num~J<,r of lcavllS 'n o ooonplclc n· ary lree, If L = 41. ""d 1=10, what is rho valueofn?

a. 3

b. ·l c. 5o

d. ()

In lhe following C timclion, let n 2: m. i nt. gcd(n 1 ml I

Lt(ni m -- 0) cetu~n rnt n .a. nl m; return gcd(0fnj;

I How many recursive cnlls are made by tlds lime I iou?

a. 0(log, n)

b. O(n)

c. 00o,2 logz n)

d. e(.f,;) What is tltc time complc.xity of tit~ loll<>wing re.cursive fimclion: int DoS~t.Mrlll) I ~ tit. 1\) I

a b. c.

d.

f-Z fn <- 11 I0C.!I.f11 1;

e be ..-cturnlllr!Stllf•'-hii\.9\Ue>orltCitt:lftll) I n)1

0(o~)

0(nlo~ li)

0(lofl2 n)

0(1~ logl 11)

Consider ~te following C program segme111 where CeliNode l'epresents a nod in a birtury tree:

•M-et:t. e•l)~" • ~trGCt. ('ei"JII'O.W. ' 10I I,CIU lo:l !

'"'" ····-lltJ t ltuct C"•Uaoct- ~ei.<J!ttO!IIII;l

" int GnVvl.,,.htNC:I Cf'ill'oocl• •ptTI I l n' Yll.l!itc .. 01 1 r lpou I• -'ln.l. l 1

I( ( l.pt:r-JohhC::Iulu - IIIUU.~ ''" (ph•>r,llb!.Chf hl .a •nn.~olt

v.thue • 1 1 eel••

v•u,. .. ..:tue- _. QnV.HtM~Pt' .,._JtrtCI"IIII

I "'' u M'!(V"'l!IO!k I

• Cn\lalu•(pt.tc·~riot>ttt~Ua• t

rhe value relwued by GetValue when a poinJc•· to 1he root of a blnary tree is passe-d as its argumenl is: ..

a. the number of nodes in llk li'cc.

47.

48.

49.

5D.

'' or1 1 b. the number or intemal nodes in the

u·ee,

c. the number ol'leafnodes in the u•ee. d. I he heig,bl oftbe tree.

C<msitlcr UJO process or WSCI till£ 8JJ

elemetJt Into a Mal< Heap, where the Ma.~ Heap is represented by an mTny. Suppose we perfonn a binary search ou the path !rom Ute now tear 10 IJ1c root 10 find IJ1e po$irion lor the newly inserted clement, I he number of comparisons perlurmed is:

a 0(1qgo n)

b. 0(1og, logt n)

c. 0(11)

d. 0(nlo~n)

Whtch of the following is TRUE about fotmulae in Conjunctive Nonnal Form?

a. for any formula Utere is a o·uth ussignm~lll for wltich at least half the clauses evaluate to true.

b. l'ot any fonnula. lh.ere is a truth assignmenl for which •ll th~ clauses evaluate to rrue,

c. There is n lbnnula suoh thai for each truth as~igumenl, al most one-fourth of d1eclauses evaluate to true.

d. None ofthe above. l,el w l)e. 1he minimum weigh! amon~ all edge weights in an undirected connected gmplc Lee e be a speci tic edge of w<igln "'• Wluch oftlce following is f'A LS~? a. There is a min.muru spanning. tree

comahuug c. b. \Ve iS uol in a minimum spruuaing. u·ee

T tl1cu w th< cycle formed by addiug e I'll T, all edges have the s3mo weight.

c. Lvery minimum spanniug ll'("e has an edge of weight w.

d. c u; proscut m every u.unuuwr1 spannillg ••·ee.

Au army ofu JLwubcrs is given, where u IS

an even number. The maximum as well as the minimum or these ii numbers needs to be determiu.ed. Which of the followiJtg is T RUE about tho number of comparisons nce<led?

a. AI least 2n-c comparisons. for soma consl'ant c, are needed.

b. At mo~t I ,511?2 compariSons arc ncodcd.

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

omI st

52

53

54.

c 1\ t leas1 nlog,o1 compansons are needed.

d .None of (he above. C'nns1der the follow111!l ('code se!lmenr

lnr 1-.,,.,_ .. ,, I

I

"'" ~.fiJ totli .. :ru C'O' uart.-I~Hi·•l

!•tr.U ..., Ill iprlndt"tl!Dt ?d ,.. \(\")' ,.~ ... ~~·on

rec.urn tr

Let T(u) denote the number of umes the for loop is executed uy tho progr!lln on input n Wbiah oft he foUo";ng is TRUE?

" T(n) = 0( ..[,;)and T(n) = !1 ( .J/, ) b. T(n) = 0( .J/, ) and T(n) = 0(1)

c. Ttn) = O(o) and T(n) - 0( .J/,) d None of the above. Consider the grammar witJ1 non-terminals N {S.C.SI) ,termtnals T= (a, b, l. 1., el, with S liS the stan symbol. and the foilow~ns set of ru les

S -> ICtSStla $, -. eSj&

c-. b

The ,grammar ts NOT LL( I) because:

a. it is left recursive b 1t as raght recurs1ve

c 1t IS ambiguous

d. 1t IS not cuutext-frcc. Consider the follow1n,g two statements. P· Every regular grammar 1s LL( I) Q. Every regular set h:t>-a L.R( 1) grammar Which of the followmg isTJtUE0

a. Both P and Q are tntc. b P IS true and Q IS false. c P IS false and Q IS trt•e. d Both P and Q are false. In a sunplifred computer tl1e mstrucllons are: OP R.. R;- P~rlon·ns R, OP R, and stores the

resuJt tu rcg1sl~r R1 OP m, R,- ~o.rfomt~ vat OP R, and s•ores 1he

resull irt R1- vnl denotes Lhe coni em of memo~ loc..11.iQn ru.

1MOV m. Ri 4 Mo\'e.s 1he co"tent or memo" locouon m to register Ri. ·

MOV RJ. 111 - Moves the co11tcnl of reg~ster R, to memory locauon m

55

56.

7 of I I The computer has on ly two reg1s1ers, and OP is enher t\ 00 or SUB Consider the following basic block ,, & Q ~· b

t, = o -r- d

t.;=e·b l,=t, · t:.

Assume lhal all operands are initially "' memory The ftnal value of the computatoon should be in memory What is I he min11num number of MOV inslruchons 1n the code generated for th1s basic bloc.k?

a. 2 b J c. 5 d. 6

A11 operat ing system uses Shonest RemruniJlS Time i1tsl (SRT) process scheduling algorithm Cons1der the arriv-al times and execution tunes for the following processes·

Process Execution Arnvnl ume hme

Pl 20 0 P2 25 15 P3 10 30 1'4 15 45

What is the total waiting time lor pr.Jc~ss PTI

a. 5 b IS

c. 41l d. 55

A VIrtual memory system use~ First ln F1rst Out ( FrFO) page replacement policy 1

and allocates a fixed number of frames to a process Consrder lhc follow1ng statements: P: Increasing the number of page

frames allocated to a process sometimes mcreases the page fault rate

Q Some programs do not exhibn localotv of reference.

Wh1ch one oft he followmg IS TRUE'' a, Doth I' and Q are true. and Q Js the

reason For P

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om57.

58.

59.

b. Both P and Q are 011e. bm Q is not the reason for P.

c. P is false., but Q is tme. d. Borh P and Q are false. A single processor !;)'Stem has threa resource IYIJes X, Y, rutd Z, which are. shared by three J)roccsses. !'here are 5 tmits of each resource tyVe. Consider the followiug scenario. where llte colunut alloc d~uotes the number of units of each resource type atlo~-ated to each process. and the column roquest denmes the '""nber or umrs or each resource rype requesled by a process in order to complete cxecuuon.

Whrch of these proces;es will finish I,AST'I

PO PI P2

a. 'PO

b. Pl c. P2

•II« XYZ Ill 201 2 21

fq­XYZ 1 0 J 012 120

d. Noue of the ~bove. since the system is in a deadlock.

Two processes .. PI and P2. nee~ to access a critkal section of code. Consider me rollowing synchronf:tJrllon constnrct used by the processes:

I ,. ttl 0 /

.t~H• lt'"-1 l ... ., ... u .. tr-1 Oft! I )• cw...u.?-l."-" )1 ( • l:ri~ql

II•N:don ' I ••~J .. .t..hon

,. " ., •Mill itru<J) I

oitii"UI • trll• ,

I

•t•.U• l•~n.u.l-tn..J I I • Crt! \~

Stl~9" .,

"'~tt<t--h-Snr

/ 0 8-111P• r •'!>OtU.n II

Here. wru1ts I nnd wants2 are shared vmiahlcs. which are inillali7.ed to f~lse. Which one of rhe tollowing statements is TRLIE about dte above cons01tct?

a. II does not ensure mutual exclusion. b 11 does nnt ensure bounded waiting, c. II requires that processes enr~r rhc

critical section in strict alternation. d II doo:s not prevent deadlocks. but

ensw·es mutual e,'(clusion. Ia lonnatiou about a collection of s111dems is given by tile relation studknfo(srudl!i name, sex). The relation enroll llli!llli!, courseld) gives which student has mrolled for (or takeo) what cow:se(s). Assume that

60.

61.

62.

8 of ! I every course is taken by al least one male and at leas! <me female studenr. What does I he followntg relarional algebra e.,pression rep[eseor7 n......,«n-(._ • ......C ....... Jx" ( '0)-..s)

a. Courses in which all the female studenrs are. enrolled.

b. Courses in which a proper snbset of fe.UJale studems are e.urolled,

c. Courses in which only male studen(S arc e.urolled.

d. Noue of the above. Coosider d1e relation employce(name. sex, supervisorName) with name as the key, SupervisorName gives Ute name of the supervisor of the employee under conSideration. What docs the following Tuple Relat ional Calculus query prodncc1 t<-1~·

!*l 'j41)Y. ¢ bollaz•-V.-•....,1 a. Names of employees with a male

supurv1sor. b NaJUos of employees with no

immediat" male sulrordinmes. c~ Narnes o( (:!mployees wich 110

immediate female subordinates. d. Names of employees with a female

superviSQr. Consider llte table employee( empld, name, department, salary) and the. two queric.s Ot. Q, below. Assuming: that department 5 bas more ~lfJO one employee, and we wam to r,,,d ~te employees who gel higher salaJ)' th1111 anyo11e in the dt:panmcllt 5 . which one of ~1e statements is TRUE for any arbitrary emph'l)'ce.tahle1 II<_,... _...,... ---...... /: ..... d ... ~ .... ~ a.-.--...... --· .. ~---,. ...... - I; ..,

a, Q1 is tloe coJ~ecl q1rcry. U Q, is the COITCCJ llliCI')' c. Botb Qr and Q2 produce tb< satne

answer. d Neither Q, 1tor <b is the ·COITect quc1y Wbicb one ot' the following statements is FALSE'/

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om63.

64.

65

66.

:t. An~· relation with two ~ttnlmt"" is in 13CNP.

b, A relation in which ewry key has only one alb1bur.e is hi ZNF.

c. A prime attribute cJ~n l1e tran• ilivel)• dependent on a key in" JNF rcl~tit111 .

tl. I\ prime •11ributc c.1n be lran<itivcly tlvpendcut on u l<oy m !I DCNF relntion.

l11c <>rdcr· of • ltnf llcldc in n 13' -tltlc is the mnxim\lm nt•mher of (value, dot11 record pointer ) pai~ it can hold. Givc:n thot o,., blo.:.k •ize is lK bytes. doll! record pointer is 7 byte& long, tltb value tield is 9 byre& long and • block pt1inter is 6 byte. long, ~~hat i~ the order ofihe lear node'/

n. 63 b. 64 c, 67

d. 68 Consider the followins sclte<Lule& involving two transactions. Winch one of tho loiiOI\ in!!.-•talem<mls is TRUE'' Sr : r1(X); r,( Y); rl(X)~ r l( Y); \\,( Y): 1\ 1(X)

S::rr(X): rl (X ): r1CY\: w:(Y): r,()ll Wt(X)

a. Both Sr nnd Sr arc contlict ~crinli?.llble.

b. s. is c:onllict .seri:~liz.1ble and s~ is not conflict ~~ l izable.

c. Sr is no t con:flict serializable and S, i• oonflict serial izable.

d. Both s, and s, •re not co•Ul ic~ seri3lizable.

lhe~oe ar-e n stations in as lolled LAN. Each station allcmpts to O';tnsmit "itb • probability p in each lime> •lot. Whotas rho probobility lbot ONLY one station tfansmits in a giveu time s lot'? a. np(i-p),. ,

" ( l·p)"'' o. p(1- p)"'1

d. 1 -( l·p)"''

fn n tokon ring li~o:.twork: the tran.snuss.ion speed is lll' bps and the propagation ~peed 1~ 200 metres ,IS. J'be 1-bil delay in th1• network l< equivalent tO! a~ 500 metres of cable.

b 200 meooes of cable.

c. 20 metres of ~ble.

d. 50 metres of c:~ble.

67.

68.

6!1.

70.

? ul I I 1l1e address of o class U ho~t is to be split into subnctS with a 6-bit subnet number. What o~ the maximum nuonb"r uf • ubnets and the uutximum numbcr t}f ltO!Il'!. iu cnch sub net?

a. 62 •11bncts :mol 262l-12 hosts.

h. 64 •uhncts aool 262J.r2 hosts.

c. 62 •ubnct~ aod 1022 h<ll!ls.

d. 64 ~ubncts and J 024 Ji(Jst•.

The mcs.<agc 1100 II){) I ;, to " " lrunsmillod using lbc CRC" pnlynomial x' 1 1 to proteer it from <:rrOtl!. 'nre mes1ngc that. should be lran•11•itred is:

a, IIOOIOOI OOil

b. 1101\100 1011

c. 11001{)10

d. l iOOJOOLOOll

'flr< di>t•ncc betwc~n two stotlonli- M and N is l J kilometres. All llruncs arc K bi ts long. The propagation de~1y per kj lo metre i~ l seconds. Ldt R bil< se<x•nd l>c Ote obanncl copocity. Ass uming Utat proe<:s8ing delay is negligible. the minimum numher of blt.S for the lli:(JUcmce numb<;r t3old in a frame for masimum utilizatior~ wht:ll the •lidi11g window Jll"'h)cnl i~ us~:d, i.!l~

rl 2LLR 2Kl •~ og, K

b ll 2/.rR j og, K

(;, [~(ll!J u~T "l [

2LIR Kl d. log 1 2K

Match tile Jbllowing: P, SM'f'P Q. HGP

R.TC'P S. PPP I. Attp1ic•liOII layeo

2 Transport layer 3. DM:r link l~yer 4. Nelworl. layer

5. l'hysicallayer

a. 1'-2. Q-1 , R-3, S-3 b. 1>-1, (.1•4, R-1, S-3

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om

c. P- 1. Q-1, R-2. S -S

d. P-2. (,)-I, R- 1. S -3

Conmum Uara Questions

Comm on llala for Quoslion.• 71, 72, 73:

Consider the following pmgrnm sogmcr\1. llcrc R I . JU nod IU are the gen¢ral purpose •egJslers - - - ........ _

.., u.c-. IJ ... ._,.... 2 1..01»1.: ...,. .a.GD> a.--., 1

N:/0 Q, &I 1:1 ~&I HD. I .., A..D t.O:Q ... e 1 M:: U ID~D+I I 18: l.l aJ.-1.1- 1 '

.. J.A:a' ~--- J """' ... 1

Asswne lhaJ tho otm h:Hl o f UJt iUOI')' location 3000 i< J 0 ond U.e content of tile t'ljgister R3 Is 2000. TI1e .:onrent of each ol tl1o memo!) looauons from 20<10 tu 2010 is 100. The pmgrurn is loaded lronl tl1c memory localiou lOOO. All Llle numbers are uJ deci ntul.

71

72

73.

A:;suuto thlil the memory is wo1·d uddressubk The numi:>;>r of memOI) references for accc:ssi11g the data iu "-'ocutjug th" program completdy is • . 10

b. II c. 20 d. 21 Assume that lho memory is word addr<>ssable. Afler thu execution uf this progl':lJn, Ute: ountt nt of lll\!mory ltx."atiou 2010t$ •. 100 b. 101 c. 102 d 110

A~sum" that the mentor)' i$ hy te o.ldNS$0bl~ and the word siza is 32 bitS. If nn interrupt nccurs dnrrns the execution of d1e instrue-tinn "INC JU"~ what rc.nam oddross will 1>c rushed"" to U•c stack'! a 1005 b. 1()2()

c. 1()24

d. 104u

C:onun on Dutll for Questions 7-l, 75:

Cl>ll$id"r the following Finit~ State 1\UUllltatun:

74

75.

IU ull I

The lrulgnnge ~ccepted by tllis "'"'.'"'"'" " is given by tltc regular txpr<:ssiQn

u. b'ub'nb'ob'

b. (u + b)' c. b'n(n + b) '

d. b' ub' ub'

The minimum ~tote automaton cquivulcnl t" the abuvc FSA has th~ following nnmhcr or stoles

a. b. 2 ~. 3 d. 4

Llnkt'll \n_~wt••· Qn<'l!lion~: Q. 7r. to Q. 85 <.·ar•y 11\'U lUUJ'ks \ '.itCh .

Stmement len· Lluked Answer Questiuns 76 & 77:

Suppos.! the lettors lL b. c, d. "- f b.we .1.. I I 1 I 1 1 . I

pmbnb11hes - .-.-,-.-.-. respechi 'O v. 2 -1 8 J6 32 32 .

7(>

77.

Which oJ the tollo","ll is u.~ li uffinan code lor tl1<> Lettors a b. c. d. e. J'l o. O.IO.IlOJIIOJIIJO.Illtl b. J LI O.O I 1,0 10.001 ,000 c. I L1 0.01,()()1 ,0001.0000

d. 110.100.010.000.001.1 I l What Is the a1euge length vf th~ co~c1 answer to Q.76'1 •. J

b. 2.1875 c. 2.25

d. I.!H75

St .. tem• m J'ot· LinJ.I'd ·\ n!<Wcr Questions 78 & 79 Consider the CFG 1\ttlt (S. A.. Bl ns the non­tenninul ulphubet, {a. bf a~ th10 1~nninul ulphab.!t, S 1lS the stan S)'!ltbol ond the fOllowing SCI nr producti<lli rul"s:

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD

www.exam

race.c

om78.

79.

....... .... , ... ... , A-+•

. ... a.J A-.. r ....... .c ... ..., Winch of the following generated by the grrunmrn1 a. aaaabb b. nabbbll c. aabbab cL abbbba

strings ls

For the correct answer siring to Q.78, how mruty deli varion sees. are there? a. l

b. 2

c. 3

cL 4

Statement ror Linked Answer Questlons 80 & 81 :

c ,,nsider " ma¢hlne with " byte nddressahle mfilil memNy of216 bytes. Assume 1h11l: adiredmapped data cscll" coriSis'ting of32 liraes of 64 U}1E!l> ~acla i.s Wled i11 the system, A 50 x 50 lwll-dimern.ional array of bytes is stored in Ute main memory starting ITorn memory location IJOO.H. As~amae Lhat the dala cache lS willally emf>ly, The complete array is iJCcessed twic.e. Asswne that tlte conte.lls <Jf Oae daLo ca~he do nol ch:mge ua between the two accesses.

SO liow many data cache mi.•ses will occur ua total'/ a. 48 b. 50

c. 56

d. 59' 8 1. Which of the following lilles of the data

c.ach.e wifl be replaced by new blocks iii accessing the arrny for the seoond time? a. line 4 to line lJ b. tine 4 lo Une 12

c. line 0 to li11e 7 d. line 0 to line 8

S laleaqen( ror Linked Answer Queslioi1s Sl & 83:

A process ltas been allowted 3 page frames. Assume that none of the pages of the process are available. in the memO!)' initially. Tiae process makes tlte following- sequence of page references (reference stnng): I, 2, 1, 3, 7, ,1, 5. 6. 3, 1

82. If optimal page replacement policy is used, !tow many page faults oc.cm· for the above reference siring? a. 7 b. 8

c. 9 d. 10

83. Least Recently Used (LRU) page replacement policy is a practical approximation lo Qptimal page re.plllcement. For the abovo reference string; how many more page firult;; occur "ith LRU tlmn with the opfuual page replacement poticy'l a. 0 b. c, 2 cl. 3

Statement for Linked Answer Questions 84 & 85:

Suppose Uaal a roiJol is placed 0 11 the Carte;ian plane. AI each step it w allowed to move either one unit up or one •mil rigb.l., t,e., if 11 is at (~ j) then it can move to eliJter (1 + 1, j) "r (a., j + J).

84. How mnny df~linct pnl hs are 11lere for the robot to reach the point (l 0, I 0) srorti:n& from the initial position (0, 0)?

a . G~) b. 22()

c~ 210

d. Nom! of tlJe above 85. Suppose that tb.e robot JS Jlot· allowed to

ll'llvers'l- t:he line segment from (~.4) to (5,11). Widt Otis consll'llin~ how many distinct paths are tltere for dte robot tv reaclt (l O,IO) slru1ing from (0,0)? a. z? b. 2'"

All JNTU WORLD http://www.alljntuworld.in http://www.expresscoupons.in

ALL JNTU WORLD