For More Question Papers Visit - www.pediawikiblog.com 14SC323
USN
2016
g. co m
Second Semester
Time: 3 hrs.
Max. Vlarks: 100
It{ote: Answer O Q
$n7t
FIVE
full
qwestiorxs.
a.
Define and explain the various asymptotic notations with related graphs and examptres"
b.
Solve the fbllowing recurrence relation to give a tight upper bound using substitution
'
() L
method.
T(n)
0)
o 3-
/n\
- 4Tl\2) - l+ n1
lo
(h
Illustrate the aggregate analysis of amortized analysis on the operation INCREN{ENT in a (06 Marks) binary
2 a.
Use a recursion tree to determine a good asymptotic upper bound on the recurrence
ib
counter.
dlJ
o2 .ra
H
od
c.
ci
}E !tr=
!(g ,O =w (t-
3 a.
\3/
(o6M8rks)
Write the Johnson's algorithm to solve all-pairs shortest path problem for sparse graphs. (05 Marks)
Using Bellman-Ford algorithm, find the shortest path from the source vertex 'S' to the
(a).
w
botro0 0r=
/
3s? =o)L
w
V
(r<
(10 Marks)
w
i6 -a .=
Il*n
\.3
remaining vertices in the graph shown in the Fig. Q3
;e (); ?.= 6: C,E
/__\
Ttn)=Srl
ii) r(n)=r[4.).r
()()
(09 Marks)
State the Master theorem and solve the following recurrence relations using Master theorem.
i)
Ct
ik
b.
(.) c {)
Erd
n
w
C,J
.p ed
Y
/\
Trnl =2rl 1]+ t, t
ia
,,
(06 Marks)
c.
Eg 7.r) o0 ioo .g c\ 63 tf,
(08 Marks)
b.
Fig. Q3 (a) Find the shortest path from the source vertex 'S' to the nemaining vertices in the DAG of Fig. Q3 (b). Use DAG shortest path algorithrn. (10 Marks)
-N ()
z I(s F
o
c-
Fig. Q3 (b)
For More Question Papers Visit - www.pediawikiblog.com
For More Question Papers Visit - www.pediawikiblog.com 14SC523 Starling froin the flow network shown in the Fig. Qa (a), find the maximum flow using the basic Ford-Fulkerson algorithm. (05 Marks)
g. co m
a.
tt{tQ
b" c.
Fig Q4 (a)
(07 N{arks) Explain the point-value representation of a polynomial lvith examptres. Give the pseudocode for computing GCD of two numbers using extended form of Euclid's algorithm. Also, frnd GCD (899, 493) and show the computational steps at each level of
recursion.
Define the DF'T of a vector and also compute the DFT of the vector (0, i ,2,3). (05 Marks) Define a grou,p and give its properties, Also, rvrite the group table fbr the muitiplicative group modulo 15(ri, ,. i 5). (07 Marks)
ib
b.
lo
)4.
(08 Marks)
Write the Chinese remainder theorem. Aiso. find ail integers that leave remainders
I h
(08 Marks)
Write the procedr-rral steps of the llSA public-key cryptosystem. Also, consider an RSA key set with P:61, q:53 and e: 17. What vaiue of 'd'should be used in the secret key? What is the encryption of tire rnessage N{ : 65? (10 Marks) Write and explain the Rabin-Karp string matching algorithm. Working modrrlo q - 1 1, how
w
a-
theorem.
ik
when divided by 9, 8, 7 respectively using Chinese remainder
l, 2. 3
358
3 when looking
forthepattern
P:26?
(t0Marks)
Explain string matching with finite automaton. Also, write the state transition diagrarn and the transition ftlrrction 6 for the string matching automaton that accepts all the strings
.p ed
a.
919
ia
manyspurioushitsdoestheRabin-tr(arpmatcherencounterforthetextT=314159265
containingthepattern'ababaca'andillustrateitsoperationonthetextstring'ababab
b.
acaba'.
(08Marks)
abb abbabb ab abbabb'inthe alphabet I= {u,b} fbr the Knuth-Morris-Pratt algorithm. (05 Marks) c. Apply Boyer-Moore algorithm to search for the pattern'BAOBAB'in the text 'BESS_KNEW_ABOUT_BAOBABS'. (07 Marks)
w
Computetheprefix functionn forthepatten:I'ab
w
w
Explain the randomizing deterntinistic algorithms by taking linear search
b.
Explain Monte Carlo and Las Vegas algonthms with suitable exampies.
as an
example. (10 Marks) (10 Marks)
,{***{<
For More Question Papers Visit - www.pediawikiblog.com