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

639401 Design and Analysis of Algorithms MAY 2024

Uploaded by

idan06788
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

639401 Design and Analysis of Algorithms MAY 2024

Uploaded by

idan06788
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Enrolment No. /Seat No.

: ______________

GUJARAT TECHNOLOGICAL UNIVERSITY


MCA– SEMESTER III- EXAMINATION –SUMMER-2024

Subject Code: 639401 Date: 14/05/2024


Subject Name: Design and Analysis of Algorithms
Time: 10:30 AM TO 01:00 PM Total Marks: 70
Instructions:

1. Attempt all questions.


2. Make Suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Use of simple calculators and non-programmable scientific calculators are permitted.

Q.1 Answer following questions. 14


1. Describe hiring problem.
2. Write elements of dynamic programming.
3. Differentiate Greedy strategy and Dynamic programming.
4. State principle of optimality.
5. Write characteristics of Best Case and worst case with example.
6. Explain common orders of growth in complexity analysis.
7. Arrange the given notations in the increasing order of their values.
Log n, n2, n log n, n, 2n, n3, n!
Q.2 (a) Define Algorithm analysis and explain asymptotic notation. 07
(b) Explain substitution method for solving recurrences with example. 07
OR
(b) State and explain Master’s theorem for solving recurrence equation with 07
example.
Q.3 (a) Explain Maximum sum subarray problem and its solution using divide and 07
conquer strategy.
(b) Find optimal solution for Rod of length 5 using dynamic programming.Price 07
of Rod for {1,2,3,4} length is {7,10,12,13,15} respectively.
OR
(a) Explain Strassen’s matrix multiplication using divide and conquer strategy. 07
(b) Find Longest common subsequence for string A=FUTUAYC and 07
B=AFFTAC using dynamic programming.

Q.4 (a) Explain Activity selection problem and its solution using greedy 07
strategy.Solve below given example of Activity Selection problem.
Activity A1 A2 A3 A4 A5 A6
Start Time 7 1 3 0 5 8
Finish Time 9 2 4 2 8 10
(b) Describe Aggregate method applied on dynamic array for amortized analysis. 07
OR
(a) Explain Huffman code problem and its solution using greedy strategy.Find 07
the Huffman codes for the following characters
Characters a b c d e f
Frequency 38 15 19 20 27 11
(b) Describe Accounting method applied on dynamic array for amortized 07
analysis.
1/2
Q.5 (a) Explain Krushkal’s algorithm and apply the same on given figure A. 07
(b) Explain Dijkshtra’s algorithm for shortest path with example. 07
OR
(a) Explain Prim’s algorithm and apply the same on figure A. 07
(b) Explain Bellman Ford algorithm for shortest path with example. 07

Figure A.

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

2/2

You might also like