0% found this document useful (0 votes)
77 views4 pages

Question Bank DAA-MTE

The document contains 3 units that discuss algorithms and data structures. Unit 1 contains questions about analyzing time complexities using asymptotic notations such as Big-O, and examples of recursive algorithms like merge sort. Unit 2 focuses on divide and conquer, greedy algorithms, and dynamic programming problems like job scheduling, knapsack, and activity selection. Unit 3 expands on dynamic programming, including questions about the 0/1 knapsack problem, optimal binary search trees, binomial coefficients, and shortest paths.

Uploaded by

kumarasu356
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)
77 views4 pages

Question Bank DAA-MTE

The document contains 3 units that discuss algorithms and data structures. Unit 1 contains questions about analyzing time complexities using asymptotic notations such as Big-O, and examples of recursive algorithms like merge sort. Unit 2 focuses on divide and conquer, greedy algorithms, and dynamic programming problems like job scheduling, knapsack, and activity selection. Unit 3 expands on dynamic programming, including questions about the 0/1 knapsack problem, optimal binary search trees, binomial coefficients, and shortest paths.

Uploaded by

kumarasu356
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/ 4

Question Bank DAA

Unit I
1 Examine whether 3n 3 + 2n+2 = O (n 3 ). Justify in detail.

2 Explain the various methods used for amortized analysis


3 Analyze the Best, average and worst case efficiency.With an example.
a) Explain the Asymptotic notations with examples.
b) Prove 3n3 + 2n2 = O(n)3 ; 3n !=O(2n)

4 Apply the Divide – And – Conquer for a recursive Merge sort algorithm and derive the
time complexity of this algorithm

5 Analyze the best, average and worst case efficiency with an example.

6 Differentiate between O(1) and O(n)? Is algorithm performance dependent on input size
(True/False) Justify your answer with a suitable example?

7 Analyze the various P, NP, NP-Hard problems with examples.

8 write about an Amortized analysis. Find Amortized cost with respect to stack operations

9 State whether the following functions are CORRECT or INCORRECT and justify your
answer.

(i) 3n+2=O(n)
(ii) 100n+6=O(n)
(iii) 10n2 +4n+2=O(n2)

Unit II
1 Apply divide and conquer algorithm to find max and min for given a list 22,
2 13, -5, -8, 15, 60, 17, 31, 47
3 Determine the solution for job sequencing with deadlines using greedy method where
number of jobs=5
4 Jobs J1 J2 J3 J4 J5
Profits 20 15 10 5 1
Deadlines 2 2 1 3 3

5 Define Knapsack problem. Solve the following 0/1 Knapsack problem using dynamic
programming Let n=3 , p={1,2,5), w=(2,3,4) and m=6

6 Given 10 activities with their start and finish time as


S=(A 1 ,A 2 ,A 3 ,A 4 ,A 5 ,A 6 ,A 7 ,A 8 ,A 9 ,A 10 )
S i =(1,2,3,4,7,8,9,9,11,12)
F i =(3,5,4,7,10,9,11,13,12,14)
Compute a schedule where the largest number of activities takes place.

7 Apply the greedy algorithm strategy for sum of subset problem on given data
{3, 34, 4, 12, 5, 2}, sum = 9.

8 Illustrate Bellman ford algorithm with an example. Apply Bellman ford algorithm for
following example

9 Determine the minimum cost of single source shortest path for below graph
Unit III
1 Illustrate the 0/1 knapsack algorithm using dynamic programming with an example.
Justify the time complexity.

2 Define Knapsack problem. Solve the following 0/1 Knapsack problem using dynamic
programming Let n=3 , p={1,2,5), w=(2,3,4) and m=6

3 Define dynamic programming? Explain briefly the optimal substructure property of a


dynamic programming problem.

4 Write the difference between divide conquer and dynamic programming

5 Write the difference between greedy and dynamic programming

6 Determine the optimal binary search tree using dynamic programming for below given
data. values:{12,17,29,30,35} and frequency:{2,2,1,4,5}

7 Write and explain binomial coefficient algorithm with example

8 Write and explain the multistage graph algorithm. Justify the time complexity

9 Examine the optimal binary search problem by using dynamic programming? Explain
with an example.

10 Illustrate Floyd Warshall’s algorithm with an example.

11 Apply dynamic programming for the following multistage graph to find the minimum
cost path from vertex 1 to vertex 12.

You might also like