0% found this document useful (0 votes)
47 views

Analysis and Design of Algorithms

This document is a progress assessment for a computer engineering course on analysis and design of algorithms. It contains two questions with multiple parts. Question 1 has short answer parts on shell sort and asks to solve recurrence relations or explain amortized analysis. Question 2 asks to trace shortest paths on graphs using matrices, solve a matrix chain multiplication problem, solve an assembly line scheduling problem using dynamic programming, or solve a longest common subsequence or knapsack problem using dynamic programming.

Uploaded by

capota3822
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)
47 views

Analysis and Design of Algorithms

This document is a progress assessment for a computer engineering course on analysis and design of algorithms. It contains two questions with multiple parts. Question 1 has short answer parts on shell sort and asks to solve recurrence relations or explain amortized analysis. Question 2 asks to trace shortest paths on graphs using matrices, solve a matrix chain multiplication problem, solve an assembly line scheduling problem using dynamic programming, or solve a longest common subsequence or knapsack problem using dynamic programming.

Uploaded by

capota3822
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/ 2

Sarvajanik College of Engineering and Technology, Surat

Computer Engineering Department


B.E. III, Sem. V
PROGRESSIVE ASSESSMENT 2

Subject Code: 3150703 Date: 28/09/2020


Subject Name: Analysis and Design of Algorithms
Time: 1.00 PM to 2.00 PM Total Marks: 20
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.

Q.1 [A] Answer the following questions in brief. [2]


1. What is the worst case time complexity of shell sort?
2. Is shell sort stable sorting technique?
3. What is the auxiliary space complexity of shell sort?
4. Does shell sort perform better than insertion sort?
Q.1 [B] Attempt ANY TWO questions. [8]

1. Solve the following recurrence using recursion tree method.


T(n) = T(n/2) + 1
2. How is amortized cost calculated using accounting method? Explain
accounting method of amortized analysis using stack example.
3. Develop and explain recurrence equation of merge sort using merge sort
procedure. Solve it using master method.

Q.2 [A] For a given graph, after performing all the iterations of ALL PAIRS [2]
SHORTEST PATH algorithm, the obtained output is shown as the final
Distance Matrix D and the Parent Matrix P. Using these matrices, trace out
the shortest path along with explanation (strictly using Matrix P) for the
following pairs of vertices.
1. From vertex 5 to 1.
2. From vertex 2 to 3

1
Q.2 [B] Given a chain of six matrices A, B, C, D, E and F with P0 = 4, P1 = 1, P2 = [4]
1, P3 = 4 and P4 = 1, P5 = 1 and P6 = 3. Find m[1,6]. Also find the optimal
parenthesization of a matrix-chain product.
OR
Q.2 [B] Solve the following assembly line scheduling problem using dynamic [4]
programming :

Q.2 [C] Solve LCS problem using dynamic programming for the given strings s1 = [4]
{C, O, M, P, U, T, E, R} and s2= {A, C, M, N, O, M, W, T, U, E, O, R}.
OR
Q.2 [C] Solve the following instance of the knapsack problem using dynamic [4]
programming, n = 5, W = 11 units, (w1, w2, w3, w4, w5) = (3, 4, 5, 9, 4) and
(v1, v2, v3, v4, v5) = (3, 4, 4, 10, 4)

*************

You might also like