DAA Previous
DAA Previous
what is TM
b) How do we analyze algorithms? Explain K2 CO1
meant by space and time complexity?
OR
its KI 8M
Write the algorithm to merge them and analyze
CO2
.
a)
Time Complexity. CO1 6M
Examples. Ki
b) Explain various Asymptotic Notation with
UNIT-II
strategy? Explain the CO3 8M
What is the greedy method
K2
concept ofoptimal solution?
instances ofknapsack
b) Using Greedy approach for the having Profit (P1, CO3 6M
,m-20 and K2
of item ,n-3 &capacity weight (WI, W2, W3) = (18,
P2, P3) 25, 24, 15) & Solution.
Optimal
15, 10). Find out the OR
KI CO3 8M
Feasible Solution
a) Define the following ) Knapsack Problem
(ii) Optimal Solution (iii)
Compute a minimum cost
b) Define spanning tree. figure using prim's
spanning tree for the graph of
algorithm. 28
14 16 K3 CO3 6M
10
24 18
12
25
22
UNIT -III
in Dynamic
Explain the concept of controlabstraction KI CO4 TM
a) memorization table.
Programming. What is the use of CO4 7M
Consider the chain matrix A1, Az, A3,A4 and As with
K3
b)
Page 1 of 2
dinensions given bclow. Givc the optimal parcnthcscs
x
x I0, 10
lo get thc product. The Matrices have size 4
3, 3x 12, 12 x 20, 20 x7.
OR
6. KI CO4
a)Describe Rcliability Design Problem? 4M
b) Construct asystem with multiple devices comected
parallcl in thrcc stagcs, The costs of the devices are
25, 10and 15 respectively. The cost of the system is to
K3 CO4
De no more than 100. The reliability of cach device
10M
type is 0.8, 0.7 and 0.4 respectively.
UNIT V
7. a) K3
Discuss about n-quecn probBem. |COS 7M
b) |Use Backtracking algorithm to find all solutions to the
4-queens problem and represent the solution space in K3 COS
state space tree. 7M
OR
8. |Discuss Sum of subset problem. K2
b) Write the backtracking algorithm for the sum of
COS 4M
subsets problem using the state space tree K3 COS
CoTesponding to m=35, w-(20,18,15,12,10,7,5). 10M
UNIT- V
9 a)Describe about Control Abstractions for LC-search. KI COs
b) Generate LC branch and bound solution for the given K3
4M
knapsack problem. m= 15, n =4. (P1:4) =(10, 10, 10M
12, 18)(wl:4)) =(2,4, 6,9)
OR
10. a) Apply the LC brarnch and bound algorithm to solve K3
traveling sales person problem for the following cost
matrix
20 30 10 11
15 16 4 2 COS 14M
G= 3 5 00 2 4
19 6 18 0 3
16 44 77 16 00
Course Code: 20CSSTO9 R20
K3 CO3 7M
11
Page 1 of2
10.
9.
8.
b) 7.
a) b) a)
b) a) b)
heorem.
Explain
Cooks
functions)
Matching Write a)
examples.
Show with
Differentiate b)
m-8,UsingExplain
4
Outline Discuss
Knuth- the solve
nodes
5 GIve
P= valuesknapsack
relation backtracking
backtracking
{2, N-Queens andgraph the the
deterministic 5, 12,10.
following
Morris-Pratt all problem
necessary
between 6,
10}, possible
coloring 20.
Solve problem
WF and I5 using
instance
P and and recurrencc
and 0/1 its 3
problem.
algorithm {2,3,4,5} general using coloring
non-deterministic
NP UNIT-V Knapsack weights dynamic
OR and
UNIT IV
-
OR
backtracking
problem. Find show
method are rclation
(both problem
programming.
different 2, the
1,
results
3, used
Prefix problems 2
solutions
respectively. to
n-4,for n
Apply
and =4, solve
for m it
K2 K2 = to 01
KI K2 K3 K2 K2 K2
K3
COS COS COS COS CO4 CO4 CO4 CO4
CO:
Course Code: 20CSSTO9 R20
8 K3 CO3 7M
b) Construct an OBST for the keys al, a2, a3, a4 = (10, 15, 20, 25)
having pl, p2, p3, p4 -(3, 3, 1, 1)andq0, q1, q2, q4 -2, 3, 1, 1, 1) 7M
respectively. K4 CO3
Page 1 of2
R20
Course Code: 20CSSTO9
OR
Bricfy explain Travelling sales person problem and solve tha
6. a)
following example.
20
12
15
6 8 10
K3 COS
12
3
K3Co4
9
UNIT- V
Outline the concept of Reduction with suitable K2 COS
b) Briefly explain NP Hard and NP completeness examples.
with suitable K2 COS
examples.
10. OR
Show how reduction can be used to prove K2COs
complete Satisfiability IS Nr
b) Explain Rabin Karp algor1thm with K2 |CU
example.
Page 2 of 2