CUSAT 6th sem CS

8
B. Tech Degree VI Semesler Examination Aprit 2012 CS 60I COMPILER CONSTRUCTION (2006 Scheme) Time : 3 Hours Maximum Marks : 100 PAR.T A (Answer 2!!f questions) (8 x 5 :40) I. (a) Define tokens, patterns and lexemes and give exarnples, (b) What is the role of finite automata in compiler design? (c) Distinguish between top down and bottom up parsing. Mention the names of onetop down and boftom up pnsser. (d) What is an operator grammar? Give example. (e) Distinguish between synthesized and inherited attributes with examples. (0 What is an activation record? Explain its role. (g) Define basic block. Give an example. (h) Explain any two code optimization techniques with example. PART B (4 x 15 :60) BTS(C)-vI- 04.12- 011-J II. rtrith a neat diagram, explain the different phases of a compiler. Mention the input and output ofeach phase. OR Explain input buffering. What is the sigrrificance of lexical analysis phase in compiter design? Compute the FIRST and FOLLOW of the grammar and construct the predictive parsing table. E -+TE' E'-++TE'/ E T -+ FT, T'-+*FT'/ E F -+(E)tid ru. (a) (b) (ts) (10) (s) (l 5) (s) (10) (8) (7) ( 1s) (8) (7) (l s) ry. (a) (b) (a) (b) V. VI. OR Define closure and goto operation ofLR parser. Explain LR parsing algorithm. What are the diffqrent parameter parsing techniques? What are the data structures used for the implementation of a symbol table? Explain OR With an example explain the bottom up evaluation of S-attributed definition. What are the different types of three-address statements? What are the various methods to implement three address staternents? OR What are the issues in the design of a code generator? Explain. vII. vm. x. (a) (b)

description

Regular Question paper

Transcript of CUSAT 6th sem CS

Page 1: CUSAT 6th sem CS

B. Tech Degree VI Semesler Examination Aprit 2012

CS 60I COMPILER CONSTRUCTION(2006 Scheme)

Time : 3 Hours Maximum Marks : 100PAR.T A

(Answer 2!!f questions)(8 x 5 :40)

I. (a) Define tokens, patterns and lexemes and give exarnples,(b) What is the role of finite automata in compiler design?(c) Distinguish between top down and bottom up parsing. Mention the names of

onetop down and boftom up pnsser.(d) What is an operator grammar? Give example.(e) Distinguish between synthesized and inherited attributes with examples.(0 What is an activation record? Explain its role.(g) Define basic block. Give an example.(h) Explain any two code optimization techniques with example.

PART B(4 x 15 :60)

BTS(C)-vI- 04.12- 011-J

II. rtrith a neat diagram, explain the different phases of a compiler. Mention theinput and output ofeach phase.

ORExplain input buffering.What is the sigrrificance of lexical analysis phase in compiter design?

Compute the FIRST and FOLLOW of the grammar and construct the predictiveparsing table.E -+TE'E'-++TE'/ E

T -+ FT,

T'-+*FT'/ E

F -+(E)tid

ru. (a)(b)

(ts)

(10)(s)

(l 5)

(s)(10)

(8)

(7)

( 1s)

(8)(7)

(l s)

ry.

(a)(b)

(a)(b)

V.

VI.

ORDefine closure and goto operation ofLR parser.Explain LR parsing algorithm.

What are the diffqrent parameter parsing techniques?What are the data structures used for the implementation of a symbol table?Explain

OR

With an example explain the bottom up evaluation of S-attributed definition.

What are the different types of three-address statements?What are the various methods to implement three address staternents?

ORWhat are the issues in the design of a code generator? Explain.

vII.

vm.

x.

(a)(b)

Page 2: CUSAT 6th sem CS

BTS (C)-U -04.12- 0t2-i

B.Tech Degree W Semestet Examination April 2012

CSTEE 602 DIGITAL SIGNAL PROCESSING. (2A06 Scherc)

Time : 3 Hours Ma'ximum Marks : l0o

PART A(Answerltr+questions)

(8x5= 4o)

I. (a) Find the discrete quation r[r] for the sigrral x(r)glven below, when it is

sampled with a sample period of T = 0'003 seconds'

x (r) = 2 sot 1 t st\ + z as(zoto'+t)

O) Derermine the *- Transform of the following signal if it is digitized by an,ADC

with Period T - 0.03 seconds

x(t)=Yn cos(zsr)z(r)

(o) Given the DFS of the sequence i(r) as *(f), what is the DFS of i'(z)?Derive the result. (* represents complex conjugate)'

(d) Given the sequence x[n]=[t,&2,6f compuGthe FFTX(K) usingRadix-2 and

Radix -4 algorithms. Compare the achral number of multipiications Iquired for

each.(e) Show ttrat an FIR filter with antisymmefic impulse response has conshnt group

delay, but not constant phase delay'

(9 rmplement y(n)=x(n)+2x(n-l\$x{n-2\in Direct Form and transposed

Direct Forrn.(g) if"* it"itfr variance of the qoanti*tion noise is 52/12, where s is tlre

quantization steP size.(h) Witf, a neat tabular colum& oompare the features of fixed point and floating point

DSP Processors.

PART B(4x15=60)

il. (a) Test whether the following qyst€,ms are linear (5)

(,) y(,)=f!,t,-,)(ii) y(z)=f f'fu- *)+c, c a constant

(b) The difference equation of a simple filter is gtven by (10)

t (n) = a, 1n- | +{r(r + g +}x1"; +} x(n *r)'

Find (i) The sYstern function(ii) The impulse response

Is the above system realizable if'n' represents a ternporal variable? Is itrealizableif 'n" is aspatial variable?

*m. (a) A system is defined by the following equation, (S)

y(r) = +[r(r +1) +x(r) + x(z -r)]Find the system function, its polgs and zeros'

Hence plot the pole-zero pattem of the system(P.r.o)

Page 3: CUSAT 6th sem CS

2

O) Determine the inverse #- transform of (7)

x(*)=fu ifthe Ro'c are

(i) l-el>r (ii) l€-l<+ (iii) +<l*l.rIV. (a) Using DFT, compute the 4 point circular convolution of the (10)

sequences 4(n) =lt l,z1r , a (r) = [3, 4,s,6,1r .

(b) The DFT of a l0 point sequence is to be computed. Calculate the number of (5)

(i) complex multiplications (ii) complex additions(iii) real multiplications (rv) real additions, required to compute the DFT

ORV. Given an 8 point FFT processor, which can be used only once, compute the (15)

DFTs of the sequence.

q(")= [rroz4z3tl, xr(n)= F432s76tl

Draw the sigpal flow grap[ mark outputs at each stage.

\rI. (a) An FlRfilterhas the followingpairs of complex co4iugate zeros, (7\

nt*'=S'5'*11ei'*q=fu*JtCtreck whether this filter has got linear phase. State your leasons for theconclusion.

O) A filter is given by the system function (8)

n (*) = * +!*i*-' * io" ***' +*.' .

Implement the filter with minimurn number of multipliers. Will the filter havelinear phase characteristics?

ORVIL (a) A system is given by (10)

(t-*-')'H(*)=t'-tt t' It

- ' (r-|*")(r-|*")Implementthe system in

(t) Direct Form*II(ii) Transposed direct form =Il(iii) Cascade forrn, with subsections canonio(lv) Parallel form, with subseotions canonic

(b) What is the disadvantage of using Rectangular windowing for FIR filter design? (5)

(8)vltr. (a) Asystem is given by y(n)=0.999 y(n-t)+x(r)Caloulate the quantization noise power at the output ofthe filter if the signal isquantizedto (i) 8 bits (ii) l6bits, bothcases includingthe sign bit.

(b) Explain limit cycle oscillations. (7\OR

DL (a) With a neat tabular columrU compare the architectural features of DSP (8)processors and general purpose microprocessors

O) With a neat block diagram, describe an image compression system. (7)

Page 4: CUSAT 6th sem CS

B.Tech Degree W Semester Examination April 2012

CS/IT 603 OPERATING SYSTEMS(2006 Scheme)

Time: 3 Hours Ma"rimum Marks: 1@PARTA

(Answer ALL questions)(8x5=40)

L (a) Define operating system. List out any five services provided by operating syst€m.

(b) Differentiate between preemptive and non preernpive scheduling.

(c) Describe the memory management rrith buddy systems.

(d) Define TLB. Explain the basic operations in TLB.

(e) De{ine file attribute. List any five file attributes.

(0 Describe disk cache with a figure.

(g) Define deadlock. Explain the conditions for deadlock.

(h) Describe resource allocation graph with an example.

BTS (C) - Vr -04.12 - 013 - J

PART B

Describe semaphore and its usage.Define a process. Describe process state diagram and PCB.

ORList the five criteria for process scheduling and illustrate any threescheduling algorithm with an example.

r. (a)(b)

u.

(4 x 15 =60)

(s)(10)

process (15)

ry.

V.

(a)(b)

(a)(b)

(a)(b)

(a)(b)

(a)(b)

Differentiate between paging and segmentation.Define RAID. List and describe the RAID Levels.

ORDescribe the three methods for contiguous memory allocation.Explain the need of page replacement algorithms and describe any threc page

replacement algorithm.

Describe the need ofdevice controllers.Describe the operation of DMA with a diagram.

ORExplain any three directory structures schemes.Describe the file access and control mechanisms.

Differentiate betwsen dead lock and starvationDescrib€ the methods for deadtock detegtion and recovery.

ORIllustrate Banker's algorithm for several instance of resource type with an example.

(s)(r0)

(s)(10)

(s)(10)

(5)(10)

(5)(10)

(l s)

VI,

VII.

vm.

IX.

Page 5: CUSAT 6th sem CS

BTS (C) - Vr - 04.12 - 014 - L

B.Tech Degree W Semester Examination April 2012

Time:3 Hours

I. (a)

(b)

(c)

(d)

(e)

(0

G)(h)

cs/rr 6M ANALYTTS m3#r* oF AlcoRrrrrlr{s

Maximum lMarks : 100

PART A(Answ*ALL questions)

(8x5:40)Explain the significance of notations uOu and "Q' in the complexity analysis ofalgorithms.How do we analyse algorithms based on (i) amount of space used and(ii) optimalit5i?

Explain the heap sort procedure.

Define a Red - Black Tree.

Discuss any one method used to represent gaphs.

Explain the dpamic programming technique used in algorithm desigr.

Differentiate between NP complete and NP hard problems.

Write notes on approximation algoritlrms.

PART B(4xls=60)

What do we understand by complexity of an algorithm? E:rplain worst case (15)complexity and average case complexity with a suitable example.

ORE4plain the significance ofrecunence equation. Solve the recrrrence equation (15)

r(n)=rcr(/u)+n

Write an algorithm for insertion sorting method. Atnlyze its complexity. (15)OR

Explain binary search algorithm as an example ofdivide and conquer shatery (15)and find its average case complority.

tr.

Itr.

ry.

v.

VI.

vIL

vm. (a)(b)

(a)(b)

Write an algorithm to find the bicomponents of an undireoted graph.OR

Explain Warshall's algorithm for finding transitive closure of a binary relation.

What do you know by optimization problem? Give an example.Explain the first fit deoeasing sfrate5/ for bin packing pmblem

ORE4plain the soquantial coloring algorithm for graph coloring problem.Discuss various straGgies applied for TSP problem.

(ts)

(15)

(s)(10)

(5)(10)

DL

Page 6: CUSAT 6th sem CS

BTS (C) -Vr -04.12 - 01s - r

B.Tech Degree W Semester Examination Apfl 2012

CS/EC/EB/EI 605 CONTROL SYSTEMS ENGII\TEERING(2006 Scheme)

Time:3 Hours Maximum Marks : 100

53 +6s2 +l2s+8

Obtain the force current analory.

Derive expression for the impulse response of a 2"d order system.

Briefly explain the effects of derivative and integral conftol.

Define resonant pealg resonant frequency and bandwidth.

State md explain Nyquist stability criterion.

Explain the properties of root loci.

Draw the circuit diagram of a phass -lag network and derive the transfer function.

PART B(4 x 15:60)

Define transfer function. Find the kansfer function of the electrical network (15)shown in figure.

&r .,, R{

f, -i."' rl1 f'OR

State and explain Mason's gain formula. Find the tansfer function of thesignal flow graph shown in figure, using Masonls gain formula.

Derive.expression for the rise time, peak time and manimum peak overshoot (15)of a2"" order system subjected to unit step input.

OR(P.r.o)

PART A(Answer,{.ZZ questions)

Find the inverse Laplace tansform of F(s) =

(8x5= 40)

52 +2s+3(a)

o)(c)

(d)

(e)

(0

(e)

(h)

II.

(15)u.

ry.

Page 7: CUSAT 6th sem CS

I

V. , (a) The sverall ffisfer fimction'of a unity feedback system is given by (9)

Q=-9-. Determine the genoalized error constantso oryressionn(") s2 +6s+10' -----

for error sipal and steaOy state error for the rryu "

(r) = L+ t + t2 .

(b) Using Routh-Hurwitz criterion, find the range of 'K' to keep &e systenn to (6)

be stable. The characteristic equation is sa + 25s3 + 15s2 + 20s + K = 0 .

VI. Draw the bode plot of the rmity feedback system whose open loop fiansfer (15)

fimction is given Uy C(s)= ,-.1!. Find the gain mrgias(t+o.ss)(t+o.oss)

phase margin and check fte sbrlity ofthesystem-OR

VII. The open loop transfer fimction of a rmity feedbaok system is given by (15)

OG)=;F, . Skstch the polar plot and determine fte gain

margin and phase margin.

VItr. Sketch the root locus for a unity feedback system with open toop transfer (15)

functionasgrvenby G(' K.") =r

l.OR

D( The open loop transfer firnction of the uncompensatsd sytem is (15)

C(s) r(s)=;1;}1. Desip a suitable compensator for fie systcrn so

that the static velocity e,rror constant Kv--20, the phase mrgin is afleast 55o

and the gain margin is atleast l2dB.

Page 8: CUSAT 6th sem CS

BTS(C) - Vr- 04.12 - 016 - B

ORExplain how CSMA/CD protocol handles collision that may oocur in Ethernetnetworks.Differentiate between Go-Buck -N and Selective-Repeat sliding windowprotocols.

What are the specifications of Ethernet standard? Explain the frame structureof Ethemet.

ORDiscuss the various data encoding schemes used in Compute.r Networks.

VI.

(15)

(1 s)

VII. (a)

(b)

(7)

(8)

vm. (l s)

(1s)

B. Tech Degree W Semester Examination April 2012

CS/IT 606 COMPUTER NETWORKS(20.06 Scheme)

Time : 3 Hours Maximum Marks ; 100PART A

(Answer,{,trL questions)(8x5=40)

I. (a) What is the significance of 'layered concept' in Computer Networks?

(b) How can piggbacking improve the efficiency in datatransmission betweensender and receiver?

(c) Compare the properties of TCP and UDP connections between two nodes.

(d) Why fragmentation is required in IP packets? How fragmented IP packetsreassembled before passing to the dsstination application?

(e) Explain the process of error detection using Hamming Codes.

(0 Differentiate between broadcast networks and point-to-point networks.

G) ' Discuss the characteristics of FDDI networks.

(h) What me the major characteristics of ISDNNetworks?

PART B(4x15=60)

II. Briefly explain how HTTP communication takes place between two nodes, with (15)special emphasis on persistant and non persistant connections.

ORm. With a neat architectural diagram, explain the TCP/IP reference model. Explain (15)

the functions of each layer in the model.

ry. Draw the struoture of a TCP segment. Give the significance of the following (15)fields in the TCP segment:(i) Sequence number (ii) Receive window (iii) Internet checksum field.

ORV. Briefly describe the differences between the virtual circuit and datagram

networks.

What are the characteristics of link state routing? With the indicated link costsgiven in the following diagram compute the shortest path from 'w' to all othernodes using Dijkstra's algorithm:

IX.