0% found this document useful (0 votes)
40 views8 pages

DAA Previous

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views8 pages

DAA Previous

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Core Code K«ETA R20

PRAGATIENGINEERING COLLEGE: SURAMPALEM


(AUTONOMOUS)
II B.TecbI Semester Supplkmentary Examinations, May -2023
DESIGNAND ANALYSIS OF ALGORITHMS
(Common to CSE &IT)
Tie: 3 bours Max. Marks: 70 M

Answer ONE Question from each Unit


AlQuestions Carry EqualMarks
BTL CO Marks
Questions
UNTT -I
a) algorihm to add two mxn matrices. Determine
the time complexity of the algorithm in terms of program K2 CO1 TM
seps by using the sep count approach.
b) Wha is an aigorithm? Describe the criteria that an algorithm must CO1 TM
KI
sztisfy. Explain with an example.
OR
2 a) Write in detail about amortized analysís wih suitable K4 CO1 TM
example.
b) Give the recursive algorithm to calculate POWER(a,b) of K3 COI TM
two munbers?
UNIT-II
3. a) What is meant by Searching? Explain the method for Ki C02 TM
searching an element with time conmplexity O(nlogn)
b) Determine the running time of Quick Sort for
ijSorted Input K4 C02 7M
(i)Reverse Ordered Input
(ii)Random Input
OR
4. Explaáin in brief about the cotrol abstraction for Greedy
Method and various associated applications using thís KI CO2 TM
approach.
b) Find oqpsimal solution to the knapsack problem instance n-6,
m=15, C02 TM
(pl...p6) =(10,5,15,7,6,18), (wl...wó) =(2,3,5,7,1,4)
UNIT- III
5. aj Give allpossible bínary scarch trees for the identifier set (al,
a2, a3) - (do, if, while). Find the cost of all possible trees CO3 TM
K4
with equal probabilities pli) = gi) = 1/7 for all i. What could
be a possible drawback with this approach? Explain in brief.
b Define Feasible solution and Optimal solution. Desuribe CO3 TM
K3
each by means of appropriate examples.
Page 1 of 2
OR

a) Bricfly espluin the steps involved to solve a problen in


dynamic programming K2
b) Solve the following instance of Travelling Sales person
problem using Dynanic Programnming.
12 3 4
1 04 1 3 K3
4 0 2 1
3 1 2 0 5
|3 1 5 0
UNITIV
7 a) Describe graph coloring problem. Give an example.
b) Draw the state space trec for 4 QueensProblem. K2 C0
K3 Co
OR
8. a) Draw the portion of the state space tree generatcd by LC
Branch and Bound for the following knapsack
N=4, instances:
and m=15.(pl,p2,p3,p4)=(10,10,12,18),(wl,w2, w3, w4)=(2,4,6,9), K3

b) Give examples for implicit and explicit


threc problems related to Branch and constraints for any K3
Bound.
9. UNIT V
a) Why is fractional knapsack
problem? Explain. problem classified into NP
b) K2 CO
What is the relation between P and
with an examplc. NP problems? Explain
K2 co'
10. a) OR
Explain the following
(i) Non
Deterministic Algorithms.
(ii) NP Complete
State Cook's theorem. Problem
K2 CO
b)
KI CO
whjcct Code:19CSST20 R19

PRAGATI ENGINEERING COLLEGE:SURAMPALEM


(AUTONOMOUS)
III B.Tech ISemester Regular Examinations, February, 2022
DESIGN AND ANALYSIS OF ALGORITHMS
T) Max. Marks: 70
Time:3 hours
Answer ONE Question from each Unit
All Questions Carry Equal Marks CO Marks
Questions BTL
Q. No.
UNIT -I
K2
Contrast and compare between iterative and recursive CO1 TM
process with an example?
.

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

PRAGATIENGINEERING COLLEGE: SURAMPALEM


(AUTONOMOUS)
IIIB.Tech ISemester Regular
Exaninations, Deccmber - 2022
DESIGN AND ANALYSIS OF ALGORITHMS
(Common to CSE & IT)
Time: 3 hours Max. Marks: 70 M

Answer ONE Question from each Unit


AllQuestions Carry Equal Marks
Q. No. Questions BTL Co Marks
UNIT - I
1. a) Explain the various algorithm design methodologies to solve K2 CO1 7M
aproblem.
b) Write about asymptotic notation and give its properties. KI CO1 7M
OR
2. a Explain the working of a disjoint -set data structure and K2 CO1 7M
efficiently implement it.
b) Measure the space complexity for the Sum function in K2 CO1 7M
different scenarios
UNIT - II
3. a) Construct the various tracing steps of merge sort and Quick
K3 CO2 7M
Sort and analyze the time complexity for the following data:
33,44, 2, 10, 25, 79, 86, 47, 14, 36.
b) State control abstraction of greedy method and explain how K2 CO2 7M
it is useful for real time problems.
OR
4. a) Outline Knapsack problem with an example. K2 CO2 7M

b) Illustrate Kruskal's Algorithm with a suitable example.


UNIT -III
K2
8
CO2 7M

5. a) Briefly explain the dynamic programming approach and K2 CO3 7M


principle of optimality
b) With ¥ suitable example, write a single source shortest path K3 CO3 7M
algorithm
OR

a) Compute the shortest path in the following Multistage Graph

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

PRAGATIENGINEERING COLLEGE: SURAMPALEM


(AUTONOMOUS)
I B.Tech ISemester Regular/Supplementary Examinations, November- 2023
DESIGN AND ANALYSIS OF ALGORITHMS
(Common to CSE & IT)
Time: 3 hours Max. Marks: 70

Answer ONE Question from each Unit


All Qucstions Carry Equal Marks
Q. No. Questions BTL CO Marks
UNIT-I
1. a) Give the algorithm for addition of two matrices and determine the K3 COI 7M
time complexity of this algorithm by frequency - count method.
b) Discuss the Pseudo code conventions for expressing algorithms. K2 CO1 7M
OR
2 a) What isspace complexity? IIlustrate with an example for fixed and K2 COI 7M
variable part in space complexity.
b) Discuss randomized techniques for primality testing with examples. K2 CO1
UNIT -II
3 a) Build the Optimal merge sequence for the following files- 8, 2, 9, 1,
12, 10, 18, 15, 14, 17. K3 CO2 7M

b) Analyze the worst-case time complexity of Quicksort and employee K3 CO2 7M


a method to avoid the worst case.
OR
4 a) Illustrate diferent steps involved in solving defective chessboard K2 CO2 7M
problem with suitable example.
b) Device the general method of Divide and Conquer Technique. K2 CO2 7M
UNIT-II
Briefly discuss all Pairs shortest path problems along with its
algorithm and solve the following problem.

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

b Write an algorithm to solve 0/1 Knapsack problem using Dynamjc


|programing
UNIT -IV K2CO3
7 |ldentify Hamiltonian cycles for the given graph.
1)

3
K3Co4

Briefly discuss about graph coloring problem with suitable


Cxample. K2 CO4
OR
a) Solve sum of subsets problem for the
S= {3,5,6,7} ,d= 15 Construct a state following example K3 CO4
b)
space tree.
Discuss the 4 - queen's problem. Draw the portion of the
space tree for n =4 queens using backtracking algorithm. state K2 C04

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

You might also like