computer science and information science 4th semester (2012-december) question
Post on 20-Jun-2015
255 Views
Preview:
TRANSCRIPT
USN
Time: 3 hrs.
la.
2a.
3a.
4a.
b.
c.
1OMAT4l
(06 Marks)
(07 Marks)
Fourth Semester B.E. Degree Examination, December 2012
Engineering Mathematics - l\/
b.
c.
b.
oo(f
g
0)
()!(jXbo-
d97nooltroo.= c.l
giloEFO
-P
APoc)GO
50i
.G
LO
o-A
9.Y
otE
LO
>.:bo-cao6=oBtr>=oo
t<: c.i
ooZ
o
Note: Answer FIYE full questions, selectingat least TWO questions from each part.
PART _ A
Using the Taylor's series method, solve the initial value probf.- $ = *')dx
the point x: 0.1 (06 Marks)
Employ the fourth order Runge-Kutta method to solve Ol =", '"'r, y(0) : I atthe points
x: O.2and x : O.4.Take h :0.2. Y" +x'
(07 Marks)
dy i_Given a = xv + v-, y(0) : 1, y(0.1) :1.1169,y(0.2): 1.2773, y(0.3) : 1.5049. Find y(0.4)
dxusing the Milne's predictor-corrector method. Apply the corrector formula twice. (07 Marks)
Employing the Picard's method, obtain the second order approximate solution of thefollowing problem at x : 0.2.
dv dzZ=x*yz, 11-y+zx) y(0):1, z(0):-1.dx dx
Using the Runge-Kutta method, find the solution at x : 0.1 of the differential equation
d'v , dv+- x'-' -2xy =1 underthe conditions y(0): 1, y'(0):0. Take step lengthh:0.1.dx' dx
(07 Marks)
Using the Milne's method, obtain an approximate solution at the point x : 0.4 of the
problem q*:*9 -6y=0, y(0) : 1, y'(0) : 0.1. GiVen that y(0.1) : 1.03995,' dx' dxy(0.2): 1.138036, y(0.3) : 1.29865, y'(0.1) : 0.6955, y'(0.2): 1.258, y'(0.3) : ,.tli*".u,
If (z) : u * iv is an anatyric tunction, then prove *" (* I r(r) l) -r
[* | r(r) l) = ['1,;l' .
(06 Marks)
b. Findananalyicfunctionwhoseimaginarypartis v=€*{(*'-y')cosy-2xysiny}.
c. If (z) : u(r, 0) + iv(r, 0) is an analytic function, show that u and va2rAta2o(D to(D I oo
------..1- -r -----l- f
-------.1- = ll
or tor r oo
(07 Marks)
satisfy the equation
Find the bilinear transformation that maps the points 1, i, -1 onto the points i, 0, -irespectively. (06 Marks)
Discuss the transformation W: e'. (07 Marks)
Evaluate lstn 'TZ' ] cosgiz
, where c is the circle lzl:3. (07 Marks)! tr-t\')(z-2)
/st4,/.'.
\
5 a. Express the polynomial 2x3 -x' -3x+2 in terms of Legendre polynomials. (06 Marks)
b. Obtain the series solution ofBessel's differential equation r' #*.t+ (x' -r')y = 0 in
PART _ B
the form y: AJ,(x) + BJ-,(x).
c. Derive Rodrique's formula P,(x) = j- *fx' -1)'.' 2nnl dxn '
6 a. State the axioms of probability. For any two events A and B, prove thatP(A u B) = P(A) + P(B) - P(A n B) .
1OMAT4l
(07 Marks)
(07 Marks)
(06 Marks)
b. A bag contains 10 white balls and 3 red balls while another bag contains 3 white balls and
5 red balls. Two balls are drawn at ransom from the fust bag and put in the second bag and
then a ball is drawn at random from the second bag. What is the probability that it is a whiteball? (07 Marks)
c' In a bolt factory there are four machines ,A, B, C, D manufacturing respectlely 20o/o, \5oh,25% 40% of the total production. Out of these 50 , 4yo, 3Yo and 2%o respectively are
defective. A bolt is drawn at random from the production and is found to be defective. Findthe probability that it was manufactured by A or D. (07 Marks)
7 a. The probabilit distributi f a finite random variable X is given by the following table:
Determine the value of k and find the mean, variance and standard deviation. (06 Marks)
b. The probability that a pen manufactured by a company will be defective is 0.1. If i2 suchpens are selected, furd the probability that (i) exactly 2 will be defective, (ii) at least 2 willbe defective, (iii) none will be defective. (07 Marks)
c. In a normal distribution,3loh of the items are under 45 and 8o/o are over 64. Find the mean
and standard deviation, given that A(0.5):0.19 and A(1 .4):0.42, where A(z) is the area
under the standard normal curve from 0 to z>0. (07 Marks)
8 a. A biased coin is tossed 500 times and head turns up 120 times. Find the 95Yo confrdence
limits for the proportion of heads turning up in infinitely many tosses. (Given that z": 1.96)(06 Marks)
b. A certain stimulus administered to each of 12 patients resulted in the following change inblood pressure:
5, 2, 8, -1, 3, 0, 6, -2, l, 5, 0, 4 (in appropriate unit)Can it be concluded that, on the whole, the stimulus will change the blood pressure. Use
to os(1 l):2.201. (07 Marks)
c. A die is thrown 60 times and the frequency distribution for the number appearing on the face
x is given the followine table:x I 2 a
-) 4 5 6
Frequencv 15 6 4 7 11 t7Test the hypothesis that the die is unbiased.
(Given that yf,o,(5) = 11.07 and X3o,(5) = 15.09)
lon oI a nnlte raXi
.\-1 0 1 2 a
J
p(xi) 0.1 k 0.2 2k 0.3 k
rl<{<{<xx
(07 Marks)
iUSN 10cs42
Fourth Semester B.E. Degree Examination, Decemb er 2Ol2Graph Theory and Gombinatorics
Time: 3 hrs. Max. Marks:100Note: Answer any FIVEfull questions selecting ut least two questionsfrom each part.
PART _ AI a. Define connected graph. Prove that a connected graph with n vertices has at least (n - 1)
edges. (06 Marks)b. Define isomorphism of two graphs. Determine
(Fig. Q. 1 (b)(ii)) are isomorphic.whether the two graphs (Fig.Q.1(b)(i)) and
(Joog
C)
oL
a)X
d9
;,troo.=Ncn <f,
:1 0l)Y().)tr-.ca)
a=
oO(d0
o0e(nd
,6
E6raooi=
:9
"c;o6=A,i,!o5.v>' (ts
i50o=gotr>XoVLo
U<<N
o'7
Fie.Q.1(bxi)c. Define a complete graph. In the
) 3, showthat there ur. ('-t)
2
complete graph with n vertices, where n
edge disjoint Hamilton cycles. (07 Marks)
2 a. Design a regular graph with an example. Show that the Peterson graph is a non planar graph.(07 Marks)
Prove that a graph is 2-chromatic if and only if it is a null bipartite graph. (06 Marks)Define Hamiltonian and Eulerian graphs. Prove the complete graph K3,3 is Hamiltonian butnot Eulerian. (07 Marks)
Define a tree. Prove that a connected graph is a tree if it is minimally connected. (06 Marks)Define a spanning tree. Find all the spanning trees of the graph given below. (Fig.Q.3(b)).
(07 Marks)
Fig.Q.3(b)
b.
c.
c.
4a.
b.
Construct a optimal prefix code for the symbols a, o, g, u, y, zthat occur with frequencies20,28, 4, 17, 12,7 respectively. (07 Marks)
Define matching edge connectivity and vertex connectivity. Give one example for each.
Using Prim's algorithm, find a minimal spanning tree for the weighted graph rn"ffiTlT]following Fig.Q.a@). (07 Marks)
Vs
Fig.Q.a(b)
c. Three boys b1, bz, b: and four girls Et, Ez, Et, gt are such that
br is a cousin of gt, Ez and g+
bz is a cousin of gz and g+
b3 is a cousin of gz and g:.
If a boy must marry a cousin girl, find possible sets of such couples.
10cs42
(07 Marks)
(06 Marks)(07 Marks)
(07 Marks)positive integer
(06 Marks)(07 Marks)
(07 Marks)
(07 Marks)
(06 Marks)
5A.
b.
c.
6a.
b.
c.
PART - BFind the number of ways of giving 10 identical gift boxes to six pelsons A, B, C, D, E, F in
such a way that the total number of boxes given to A and B together does not exceed 4.(06 Marks)
Define Catalan numbers. In how many ways can one travel in the xy plane from (0, 0) to
(3, 3) using the moves R: (x + 1, y) and U: (x, y + 1) if the path taken may touch but never(07 Marks)
(07 Marks)
How many integers between 1 and 300 (inclusive) are
i) divisible by 5, 6, 8?
ii) divisible by none of 5, 6, 8? (07 Marks)
In how many ways can the integer s 1,2,3 . . ... 10 be arranged in a line so that no even integer
rise above the line y: x? Draw two such paths in the xy plane.
Determine the coefficient ofi) xyz' inthe expansion of (2x - Y - z\4
ii) a'bl.'dt in the expansion of (a + 2b - 3c + 2d + 5)'o.
7a.
b.
c.
8a.
b.
c.
is in it natural place?
Find the rook polynomial for the followin
Find the coefficient of xr8 in the following products:
i) (x*x2 +x3 +*o+*t) 1x2 +x3 +xa**',+....)tiil (x * x3 + x5 + *' + *') 1x3 + 2xa + 3xs +.....;1.
using the generating function find the number of i) non negative and
solutions of the equation x1 * x2 a x: + x4: 25.Find all the partitions of x7.
Solve the Fibonacci relationFn+z : Fn+r fFn for n 2 0 given Fo : 0, Ft : 1.
Solve the recurrence relationAn-2 dn- I * an . 2: 5n.
Find a generating function for the recumence relation
iL * 5o.-r + 6ar-z:3r2,r) 2.
*{<*{<+
a^f^
ig.Q.6(c)).
Fig.Q.6(c)
I
/
USN 10cs43
Fourth Semester B.E. Degree Examination, Decemb er 2012Design and Analysis of Algorithm
Time: 3 hrs. Max. Marks:100Note: Answer FIVE full questions, selecting atleast TWO questions from each part.
PART _ A1a.
b.
Define asymptotic notations.Algorithm X(int N)
{intP;fori<-ltoN
{printf ("\n % d\ t * \tYo d: Yod", N, i, P);P:P+N;
ltJI
i) What does this algorithm compute?ii) What is the basic operation?iii) How many times the basic operation is executed?iv) What is the efficiency class of this algorithm?
c. Solve the following recurence relations.
. [f(n-l)+n n>0t(n) = {
|. 0 n=0x(n): 3x(n - 1) for n > 1, x(1):4x(n): x(n l2)+n for n > 1, x(l) : I n:2k.
comparisons for successful search and unsuccessful search.d. Derive the time complexity for defective chess board.
(03 Marks)
Marks)
(08 Marks)
(04 Marks)(03 Marks
do()
a.
E
oI
3e
6v-.oooltrca.= .-.1(d+
9ilotr-oEP
o>EE
oO
ooc
a6
!d
o;
o- 5.o(e(.) ..;6@=ao6tE
!o=-Eo.r>'Hc50o=AEF>VLo
U<-6tooz
Loo.
d. Sortthe list E XAM P L E bybubble sort, Isthere anypossibilitythat bubble sort canbestopped earlier? (05 Marks)
a. Discuss how quick sort works to sort an affay. Trace quick sort algorithm for the followingdata set 65,70,75,80,85,60, 55,50,45. Also derive the worst case complexity of quicksort. (09 Marks)
b. Write the recursive algorithm for merge sort. (04 Marks)c. Consider the following set of 14 elements in anaffay list, -15, -6,0,7,9,23,54,82, 101,
112,I25, 13L,I42,151 when binary search is applied on these elements, find the elementswhich required maximum number of comparisons. Also determine average number of key
3 a. Solve the following instance of knapsack problem,Item 1 2 -) 4
Weight 4 7 5 J
Profit 40 42 25 l2Knapsack weight M: 10. (05 Marks)
How Knapsack and Prim's algorithms guarantee the elimination of cycles? (07 Marks)c. In the above graph Fig. Q3(C), determine the shortest distances from source vertex 5 to all
algorithm
the remaining vertices, using Dijikstra's algorithm. (08 Marks)
6a.
b.
5a.
b.
c.
7a.
b.
c.
8a.
b.
c.
c. Three boys b1, b2, b3 and four girls Er, Ez, gz, Eq are such thatbr is a cousin of gr, gz and ga
bz is a cousin of gz and g+
b: is a cousin of gz and gl.If a boy must marry a cousin girl, find possible sets of such couples.
rise above the line y: x? Draw two such paths in the xy plane.
Determine the coefficient ofi) xyzz inthe expansion of (2x - y - z)4
ii) ib3"'dt in the expansion of (a + 2b'- 3c + 2d + 5116.
How many integers between 1 and 300 (inclusive) are
D divisible by 5, 6, 8?ii) divisible by none of 5, 6, 8?
In how many ways canthe integers 1,2,3.....10 be arranged in a line so thatis in it natural place?
PART _ BFind the number of ways of giving 10 identical gift boxes to six persons A, B, C, D, E, F insuch a way that the total number of boxes given to A and B together does not exceed 4.
(06 Marks)Define Catalan numbers. In how many ways can one travel in the xy plane from (0, 0) to(3, 3) using the moves R: (x + 1, y) and U: (x, y + 1) if the path taken may touch but never
10cs42
(07 Marks)
(07 Marks)
(07 Marks)
(07 Marks)no even integer
(06 Marks)(07 Marks)c. Find the rook polynomial for the followin
Fig.Q.6(c)
Find the coefficient of xr8 in the following products:i) (x+ x2 +x3 +xo + xs;1x2 + x3 + xa +rt +....)'ii) (x + x3 + x5 + x7 + xe; 7x3 + 2x4 + 3x5 +.....13.
Using the generating function find the number of i) nonsolutions of the equation X1 -f x2 1 x: + x4: 25.Find all the partitions of x7.
Solve the Fibonacci relationFn+2 : Fn+r tFn for n > 0 given Fo : 0, Fr : 1.
Solve the recurrence relationdn-2 Zn-t-l &n' Z: 5n.
Find a generating function for the recurrence relationa, * 5ar-t 'l 6ar-z: 3r2, r ) 2.
negative and(07 Marks)
ii) positive integer(06 Marks)(07 Marks)
(07 Marks)
(07 Marks)
(06 Marks)
***rf*
a ^0a
Fig.Q.6(c)).
/
USN l0cs43
Fourth Semester B.E. Degree Examination, December 2012Design and Analysis of Algorithm
Time: 3 hrs. Max. Marks:100Note: Answer FIVE full questions, selecting utleast TWO questions from each part.
PART _ Ala.
b.
Define asymptotic notations.Algorithm X(int N)
{intP;fori<-ltoN
{printf ("\n % d\ t x \t % d : o/od", N, i, P);P:P+N;
lltt
D What does this algorithm compute?ii) What is the basic operation?iii) How many times the basic operation is executed?iv) What is the efficiency class of this algorithm?
(03 Marks)
Marks)
(04 Marks)(03 Marks
cioo
a
()=o!
C,X
J'
=h-*ltroo
.= .-.1(B+
YooslaO
-!
o=
o()
o0i(g(s-o-6
]?ooi=
:eo."oj
o=}U6tE
!oJE>. (!bootr50o=o. iiF>:o5L^-lr<- c.l
Ooz
c. Solve the following recwrence relations.
[r(r-l)+n n>of(n) = {
|. 0 n=0x(n): 3x(n - 1) for n > l, x(l):4x(n) : x(n | 2)+n for n > l, x(1) : I n:2k. (08 Marks)
d. Sort the list E X A M P L E by bubble sort, Is there anypossibilitythat bubble sort canbestopped earlier? (05 Marks)
a. Discuss how quick soft works to sort an affay. Trace quick sort algorithm for the followingdata set 65, 70, 75, 80, 85, 60, 55, 50, 45. Also derive the worst case complexity of quicksort. (09 Marks)
b. Write the recursive algorithm for merge sort. (04 Marks)c. Consider the following set of 14 elements in anarray list, -15, -6,0,7,9,23,54,82, l0l,
712,125,131, 142,151 when binary search is applied on these elements, find the elementswhich required maximum number of comparisons. Also determine average number of keycomparisons for successful search and unsuccessful search.
d. Derive the time complexity for defective chess board.
3 a- Solve the following instance o sack problem, usItem 2 J 4
Weight 4 7 5 J
Profit 40 42 25 t2
Knapsack weight M: 10. (05 Marks)
How Knapsack and Prim's algorithms guarantee the elimination of cycles? (07 Marks)In the above graph Fig. Q3(C), determine the shortest distances from source vertex 5 to all
algorithm
iffi.
the remaining vertices, using Dijikstra's algorithm. (08 Marks)
\
4a. Solve the following tra
[: TTilllo 13 o r2t
L* 8 e ol
veling sales person problem, using dynamic programming
10cs43
(10 Marks)
(03 Marks)(07 Marks)
b.
c.
starting city 1
Write Warshall- Floyd algorithm.
Generate the transitive closure of the
o-#->orlIJIo<-e
Fig. Qa(c)
graph given below.
Fig. Qs(c)
PART _ B
a. Match the pattern BAOBAB in the text BESS - KNEW - ABOUT - BAOBAS, using
i) Horspool's algorithmii) Boyer Moore algorithm. (08 Marks)
b. Write a BFS algorithm to check the connectivity of a given graph. (05 Marks)
c. Apply source elimination based algorithm to represent vertices in topological ordering for
the digraph given in Fig. Q5(c). (04 Marks)
d. eppty aiitribution counting algorithm to sort the elements b, c, ,d c, b, a, a,b' (03 Marks)
6 a. What are decision trees? Explain with example, how decision trees are used in sorting
algorithms. (lo Marks)
b. Explain the concepts of P, NP, and NP - complete problems. (10 Marks)
Draw the state - space tree to generate solutions to 4 - Queen's problem. (04 Marks)
Apply backtracking method to solve subset sum problem for the instance n: 6, d : 30.
s j {5, 10,12,13, 15, 18} (06 Marks)
What is branch - and - bound algorithm? How it is different from backtracking? (05 Marks)
Write the steps and apply nearest neighbour approximation algorithm on the TSP problem
with the starting vertex a, and calculate the accuracy ratio of approximation' (05 Marks)
Fig.7(d)
8 a. What are the different computation models? Discuss in detail. (10 Marks)
b. Let the input to the prefix computation problem be 5, 12,8,6,3,9,11, 12, 5, 6,7, 10, 4,3, 5
and let CI stand for addition. Solve the problem using work optimal algorithm. (10 Marks)
c.d.
* :t ,.< *< {<
a ^f .)
/I
USN
Time: 3 hrs.
command cannot be an external command.c. Illustrate with a diagram typical LINIX file system
supported in IINIX.
10cs44
Max. Marks:100
(06 Marks)and explain different types of tiles
(07 Marks)
(06 Marks)
(06 Marks)commands in each
(08 Marks)
command(06 Marks)
(06 Marks)
(04 Marks)
(04 Marks)
(06 Marks)
Fourth semester B.E. Degree Examination, Decemb er 2ol2
UNIX and Shell Programming
Note: Answer FIVE full questions, selectingat least Tl,yO questionsfrom each part.oo
oI
o()
Bq
3oo ll
troo.=N(B+tuoY(J(.) g-OEE
?,a
a:
o()-!
aocd03
,6
-?o'CaOE
o-Ao(v
a=
4tE
!o=EY,
-^ocooo=soE>^qI
U<*C..l
OoZ
oo.
PART _ A1 a. Explain salient features of TINIX operating system. (07 Marks)
b. Compare internal and external commands in TINIX with suitable example. Explain why cd
2 a. Explain the basic file attributes displayed by ls - I command.b' Discuss relative and absolute methods for changing file permissions.c' Explain with a diagram the different modes of Vi editor and list the
mode.
3a.
b.
4a.b.
5a.b.
c.d.
Explain with an example use of single quote, double quote and back quote in aline.Explain the following commands:i) cp?????progsiii) wc -l < user.txtExplain the mechanism of process creation using system calls in UNIX.Explain the following environment variables:D PATH ii) HISTSIZE iii) PS2 iv) SHELL
Discuss with example hard link and soft link applicable to UNIX files.Explain the following commands:i) umask 022ii) find/ ! -name "*.C"-Printiii) tr -d':l' < emp.txtiv) touch - m 0303 10 30 r,tu.txtExplain the following filters with options:i) Paginate - Prii) Sort - Sort
ii) kill-s KILL 121 t22iv)ps-e I
c.d.
c.(08 Marks)
(06 Marks)
(06 Marks)sed.
(04 Marks)(06 Marks)
(04 Marks)
PART _ BExplain with example basic regular expressions.Locate lines longer than 100 and smaller than 150 characters using (i) grep, (ii)
Discuss stream editor - sed with options.How do these expressions differ:i) [0-e]*and [0-9] [0-9]*ii) ^[^ ^]and^^^
4 a. Solve the following traveling sales person problem, using dynamic programming
[o 10 15 2oflr o e 1oI
lu 13 o 0lttL8 8 9 o -l starring city I
b. Write Warshall- Floyd algorithm.c. Generate the transitive closure of the graph given below.
rrl-OTYTd.;oFig. Qs(c)
a. Matchthe pattern BAOBABi) Horspool'salgorithmii) Boyer Moore algorithm.
b. Write a BFS algorithm to check the connectivity of a given graph.
c. Apply source elimination based algorithm to represent vertices in topologicalthe digraph given in Fig. Q5(c).
d. Apply distribution counting algorithm to sort the elements b, c, ,d c, b, a, a,b.
PART _ B
in the text BESS - KNEW - ABOUT - BAOBAS, using
6 a. What are decision trees? Explain with example, how decision trees are used in sortingalgorithms. (10 Marks)
b. Explain the concepts of P, NP, and NP - complete problems. (10 Marks)
7 a. Draw the state - space tree to generate solutions to 4 - Queen's problem. (04 Marks)
b. Apply backtracking method to solve subset sum problem for tho instance n : 6, d : 30.
S : {5, 10,12,13, 15, 18} (06 Marks)
What is branch - and - bound algorithm? How it is different from backtracking? (05 Marks)
Write the steps and apply nearest neighbour approximation algorithm on the TSP problemwith the starting vertex a, and calculate the accuracy ratio of approximation. (05 Marks)
Fig. 7(d)
What are the different computation models? Discuss in detail. (10 Marks)
Let the input to the prefix computation problem be 5, 12,8, 6,3,9, ll, 12, 5, 6,7, 10, 4,3, 5
and let @ stand for addition. Solve the problem using work optimal algorithm. (10 Marks)
**{<rf{.a ^ra
O----*->OIJO+OFig. Qa(c)
l0cs43
(10 Marks)
(03 Marks)(07 Marks)
(08 Marks)(05 Marks)
ordering for(04 Marks)(03 Marks)
c.d.
8
/
USN
3a.
b.
4a.b.
5a.b.
c.d.
l0cs44
Max. Marks:100
a command(06 Marks)
(06 Marks)
(04 Marks)
(04 Marks)
(06 Marks)
(08 Marks)
(06 Marks)
(06 Marks)sed.
(04 Marks)(06 Marks)
(04 Marks)
Fourth Semester B.E. Degree Examination, December 2Ol2
(J(.)
o
()EC)!
oX
:n-oo ll
troo.= r\lcdt
9iloEaO
o>
#:!oOdoooi
-6
E(n,oOE
o6-o."oj
a=<oi, tE
!o
>'!co0o=o- :jtr>VL9-
lr<+ C.l
0)
Z
o
Time: 3 hrs.
c.
2a.b.
c.
PART _ AExplain salient features of UNIX operating system. (07 Marks)
Compare internal and extemal commands in UNIX with suitable example. Explain why cdcommand cannot be an external command. (06 Marks)Illustrate with a diagram typical TINIX file system and explain different types of files
(07 Marks)supported in LINIX.
Explain the basic file attributes displayed by ls - I command. (06 Marks)
Discuss relative and absolute methods for changing file permissions. (06 Marks)Explain with a diagram the different modes of Vi editor and list the commands in eachmode. (08 Marks)
Explain with an example use of single quote, double quote and back quote inline.Explain the following commands:i) cp ????? prossiii) wc -l < user.txt
Explain the mechanism of process creation using system calls in UNIX.Explain the following environment variables:i) PATH i0 HTSTSTZE iii) PS2 iv) SHELL
Discuss with example hard link and soft link applicable to UNIX files.Explain the following commands:i) umask 022ii) find/ ! -name "*.C"-Printiii) tr -d':l' < emp.txtiv) touch - m 0303 10 30 r,tu.txtExplain the following filters with options:i) Paginate - Prii) Sort - Sort
PART _ BExplain with example basic regular expressions.Locate lines longer than 100 and smaller than 150 characters using (i) grep, (ii)
Discuss stream editor - sed with options.How do these expressions differ:i) [0-9]*and [0-9] [0-9]*ii) ^[^ ^]and^^^
UNIX and Shell Programming
Note: Answer FIVEfull questions, selectingat least TWO questionsfrom each part.
ii) kill-s KrLL 121 122iv)ps-e I
c.d.
c. -rssT{q<o*oo*
c. Discuss use of trap statement for interrupting a program in UNIX.d. Explain with an example while and for loop in shell programming.
7 a. Write a note on awk and explain built in variables in awk.b. Explain with example the following awk function:
i) split o ii) Substr o iii) length o iv) index oc. i) Write an awk statement to print odd numbered lines in a file.
ii) Write an awk statement to delete blank lines from a file.
a. Explain string handling function in perl.b. Using command line arguments, write a perl program to find whether a given
year.c. Write a perl program to convert a given decimal number to binary equivalent.
10cs44
a. What is shell programming? Write a shell program to create a menu and execute a givenoption based on users choice. Options include (i) list of users, (ii) list of processes,(iii) list of files. (06 Marks)
b. Explain with example set and shift commands in UNIX to manipulate positional parameters.(04 Marks)(04 Marks)(06 Marks)
(08 Marks)
(08 Marks)
(04 Marks)
(06 Marks)year is a leap
(07 Marks)(07 Marks)
,f****
a ^ca
/
USN
2a.
b.
10cs4s
(06 Marks)(07 Marks)
(08 Marks)
(06 Marks)
(06 Marks)
(07 Marks)
(04 Marks)(06 Marks)
Fourth Semester B.E. Degree Examination, Decemb er 2Ol2
0.)oC)
!a
(.)2(.)
()X
=hf^rtroo
.=N
gdogl-o
*,a
a=
o()
c6O
botr
-€-od
'Caor=?oso-
o _:'
o=AELO
v,^:bo-tro0o=90
=o5:rJ<-Noo
oa
Time: 3 hrs. Max. Marks:100
Note: Answer FIYEfull questions, selectingat least TWO questionsfrom eoch part.
PART _ A
I a. What is microprocessor? Explain how data, address and control buses interconnect various
called and returned.d. Explain m/c control instructions with examples.
Microprocessors
b.
c. What is conventional memory? Explain segments and offsets. List default segment andoffset register pairs. (07 Marks)
system components.Explain the program model visible register organization of 8086 pp.
registers within 80286 pp.Explain with examples the following addressing modes:i) Scaled - indexed addressing modeii) RIP relative addressing modeiit) Relative prog memory addressing mode.
Explain the descriptors of 80286 and 80386 microprocessors. Also explain prog invisible
c. What is stack? What is the use of stack memory? Explain the execution of push and popinstructions.
3 a. Write bubble sort program using 8086 assembly instructing.b. Explain the following instructions with an example for each:
i) LEAii) xcHGiii) XLATir) DIVv) AAA.
c. What do you mean by segment override prefix? Explain the following assembler directives:i) ASSUMEii) SMALLiii) PRociv) EQUv) LOCAL.
4 a. With format explain rotate instructions. Give examples to rotate right by 1-bit and rotate leftby 5-bits. (06 Marks)Discuss with examples unconditional and conditional branching instructions. (04 Nlarks)What is a procedure? Explain the sequence of operation that takes place when a procedure is
b.
c.
&flit{Tfr'lc-LB&i#"irii'd
1 of2
10cs4s
PART _ B
Distinguish between the 16-bit and 32-bit versions of C/C ** when using the inlineassembler. (06 Marks)
Write a mixed language program that converts binary to ASCII. (07 Marks)
Write a mixed language module to realize macro to read a character from keyboard.(07 Marks)
5a.
b.c.
6a.
8a.
b.
c.
b.
Explain the functions of following pins of 8086 microprocessor.i) RESETii) READYiii) ALEiv) LOCK.With diagram, explain RESET section of 8284 clock generator. Also indicate
RESET are connected to 8088 pp.
Using timing diagram, explain the I/O write bus cycle in 8086 micro processor.
Bring out the differences between 8086 and 8088 microprocessors.
a. Explain how 74LS138 decodes 2732EPROMS for 32Kx 8 section of memory.starting address is 40000H. Give the detailed memory map.
b. What is flash memory? Explain how a flash memory is interfaced to 8086 pp.c. Explain 74138 decoder configurations to enable ports at address E 8 H to EFH.
c.d.
(04 Marks)how clk and
(06 Marks)(06 Marks)(04 Marks)
Assume the(06 Marks)
(06 Marks)(08 Marks)
Write an 8086 ALP to read a byte of data from port A and port B. Add the data and save the
result in a memory location. (05 Marks)
Explain command word format of 82C55 in mode-0. Write the control word format toinitialize to set PC3 and reset PC7. (07 Marks)
With internal block diagram, explain 8254 PIT. Give any two applications of the 8254.(08 Marks)
{<***{<
2 of2
/
USN
2a.
b.
c.
3a.b.
c.
4a.b.
c.
5a.
10cs46
(10 Marks)(05 Marks)
(06 Marks)(06 Marks)(08 Marks)
M/
(Joo
(.)
(.)
3q
:nbJl I
troo.= a.t
96'ogleO
E*a:
o(.)(d0
ooi(B(3-o:a6
<s-? d)'Caor=
o-A
r.9a=t- ri,Ntr!o5.v>'hbo-coo0)=o;i:oo-
\J<-..lo
z
o
Fourth Semester B.E. Degree Examination, Decemb er 2Ol2Gomputer Organization
Time: 3 hrs. Max. Marks:100Note: Answer FIVEfull questions, selecting
atleast TWO questions from each part.
PART _ A
a. Explain the different functional units of a digital computer. (05 Marks)
b. Draw and explain the connection between memory and processor with the respectiveregisters. (05 Marks)
c. Explain clearly SPEC rating and its significance. Assuming that the reference computer is
ultra SPARCIO work station with 300 MHz ultra SPARC processor. A company has topurchase 1000 new computers hence ordered testing of new computer with SPEC 2000.
Following observation were made.
Ioi
The company system manger will place the order for purchasing new computers only ifoverall SPEC rating is atleast 12. After the said test will the system manger place order forpurchase of new computer. (10 Marks)
What is little endian and big endian memory? Represent the number 64243848H in 32 bitsbig endian and little endian memory. (06 Marks)
What is addressing mode? Explain immediate, direct and indiiect addressing mode by an
example. (06 Marks)
Explain logical shift and rotate instructions, with examples. (08 Marks)
Define memory mapped I/O and IO mapped I/O, with examples. (05 Marks)Explain how interrupt requests flom several lO devices can be communicated to a processor
through a single INTR line.What are the different methods of DMA? Explain them in brief.
With a block diagram, explain how the keyboard is connected to processor.Explain the serial port and serial interface.Explain architecture and protocols, with respect to USB.
b.
c.
PART _ B
Draw a diagram and explain the working of 16 Mega bits DRAM chip configured as
2M x 8. Also explain as at how it can be made to work in fast page mode. (10 Marks)Briefly explain any four non-voltile memory concepts. (05 Marks)With figure analyse the memory hierarchy interms of speed cost and size. (05 Marks)
Runtime on reference co Runtime in new computer.;
50 minutes 5 Minutes75 Minutes 4 Minutes60 Minutes 6 Minutes30 Minutes 3 Minutes
- l\\
6a.b.
10cs46
Explain the design of a four bits carry - look ahead adder circuit. (10 Marks)Gives Booth's algorithm to multiply two binary numbers. Explain the working of algorithmby taking an example. (10 Marks)
7 a. Write and explain the control sequence for execution of an unconditional
b. Draw and explain multiple bus organization. Explain its advantages.
8 a. Write short note on power wallb. What you mean by shared memory multiprocessors.c. Explain the different approaches used in multithreading.
{<**{<*
branch instruction.(10 Marks)(10 Marks)
(06 Marks)(06 Marks)(08 Marks)
top related