Ada QP
Ada QP
Duration: 3 Hours
Analysis and Design of Algorithms
Max. Marks: 100
NOTE:PART-A: All questions are compulsory
PART-B: Answer any one question from each unit.
Q. No. Question Marks BLL CO PI
PART-A
1
UIS403C
Q. No. Question Marks BLL CO PI
PART-B
UNIT
2. a) With a neat diagram explain the algorithm design and
process. analysis (10) L2 1 13.1
b) Describe travelling salesman and
c) There are 28 gloves in a drawer: graph-coloring problems.
6 pairs of red gloves, 5 pairs of
(05) L2 1 1.3.1
yellow and 3 pairs of green. You select the gloves in the dark (05) L3 5 2.2.3
can check them only after a selection and
has been made. What is the
smallest number of gloves you need to select to have at
matching pair in the best case? In the worst case? least one
3 a)
Explain different types of asymptotic notations.
b) Consider the following algorithm: (06) L2 1 1.3.1
ALGORITHM T(n) (06) L3 14,5 2.2.3
lInput : Anon-negative integer n
S-0
forrie-l
i to n do
S-S+1
return S
i. What does this algorithm compute?
What is its basic operation?
How many times is the basic operation
iv What is the efficiency class of this executed?
gWrite algorithm to compute the n" Fibonaccialgorithm?
number recursively
and explain mathematical analysis of the (08) L2 1.4,5 1.4.1
same.
UNIT-II
4. a) Write an algorithm for bubble sort
B. A, G, A, L, K, 0, T in method. Sort the list: (09) L3 2,4,5 2.23
alphabetical order by bubble sort
algorithm. Derive an expression for time efficiency
b) Write brute force string of the same.
matching algorithm. Find
character comparisons that will be made by same the number of (06) L3 2 2.2.3
pattern ABABC in the following text: algorithm for the
c) Define master theorem. Compute the timeBAABABABCCA.
following recurrence equations using the same:
complexity for the (05) L3 4 14.1
1
T(n-4T(n2)+n, T(l=1
ii.
T(n)-4T(n/2)+n', T(1)=1
5. a) Write quick sort algorithm. Apply the
same
array in ascending order: 5, 3, 1,9, 8, 2, 4, 7. to sort the following (10) L3 1.2 2.2.3
b) Explain binary tree traversal with example.
c Apply the DFS-based algorithm to solve the (05) L3 2 1.4.1
topological sorting
problem for the following graph, starting at vertex (05) L3 2
2.2.3
a.
UIS403C
UNIT-|
6. a) Construct a 2-3 tree for the list C, 0,
b) What is problemn reduction strategy?M,P,U,
T, I, N, G. (05) L3 2 2.2.3
Explain any three examples
of algorithms based on the strategy of problem (10) L2 2 2.2.3
c) Write an algorithm for comparison counting reduction.
sort method. (05) L2 2.23
Apply Boyer-Moore algorithm to search for the pattern BAOBAB (10) L3 2 2.2.3
in the text BESS KNEW
ABOUT BAOBABS.
What is dynamic programming? Using
solve the following knapsack instance: dynamic programming. (10) L3 2 2.2.3
n-3, [Wi. W2, Wi] = [1, 2, 2], [Pi., P2, Ps] = [18, 16, 6] and W-4.
UNIT-IV
a) Write and apply Kruskal's algorithm for the
following graph: (10) L3 2 2.2.3
3
B. V.V. Sangha's
BASAVESHWAR ENGINEERING COLLEGE (AUTONOMOUS), BAGALKOT
DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING
ACADEMIC YEAR 2021-2022 (Even Semester)
I CIE TEST question paper
Course: B.E (ISE)
Semester: IV sem
Subject: Analysis and Design of Algorithms
Division: A & B
Subject Code: UIS403C
Time: 9:00am-10:30am
Date: 16.6.2022
Max. Marks: 40
Faculty: Ms. G M. Patil
5 a) Apply Quick sort algorithm to sort the input 5,4,3,2,1. (05) 3 2 2.2.3
b) Summarize how one can identify
connected
components of a graph by using
10 3 2 2.2.4
Breadth-first search
ii. Depth-first search
1
B. V. V. Sangha's
BAGALKOT
BASAVESHWAR ENGINEERING COLLEGE (AUTONOMOUS),
ENGINEERING
DEPARTMENT OF INFORMATION SCIENCE AND
ACADEMIC YEAR 2021-2022 (Even Semester)
I|CIE TEST question paper
Semester: IV sem
Course: B.E (ISE)
Subject: Analysis and Design of Algorithms Division: A & B
ii. Find GCD (15,20) using probiem reduction method. (02) 2 2 1.1.1
iv. What are different approaches used to resolve collision in
(02) 1 2 1.4.1
hashing?
V. What is P problem? (02) 1 2 1.4.1
PART -B
Q. No Questions Marks BLL CO PI
UNIT - III
(10) 3 2 2.2.3
4
2
eharacter