Skip to content
Previous Year Question Paper

AL-402 - Analysis & Design of Algorithms (ADA)

December 2024AIMLSEMESTER-4
December 2024
Max Marks:
Duration:
Q.1
a)

Solve the following recurrence relation T(n) = 7T(n/2) + cn^2.

b)

Show how quick sort sorts the following sequence of keys 65, 70, 75, 80, 85, 60, 55, 50, 45. Solve the recurrence relation of quick sort using substitution method.

Q.2
a)

Explain merge sort algorithm and find the complexity of the algorithm.

b)

Write an algorithm for single source shortest path and apply it for the following graph. (graph image with vertices A-H)

Q.3
a)

How the Optimal Merge Pattern algorithm works? Explain with a suitable example.

b)

Apply Kruskal's algorithm to find the minimum spanning tree of a graph with weighted edges. (graph image with vertices 0-8)

Q.4
a)

What is multistage graph problem? Discuss its solution based on dynamic programming approach. Also give a suitable algorithm and find its computing time?

b)

Compute the optimal solution for knapsack problem using greedy method N = 5, M = 10, (p1, p2, p3, p4, p5) = (10, 15, 10, 12, 8), (w1, w2, w3, w4, w5) = (3, 3, 2, 5, 1).

Q.5
a)

Design a three stage system with device types D1, D2 and D3. The costs are , and respectively. The Cost of the system is to be no more than . The reliability of each device is 0.9, 0.8 and 0.5 respectively.

b)

Briefly explain the Hamiltonian cycle using backtracking with a example.

Q.6

Solve the following instance of travelling sales person problem using Branch Bound. inf 20 30 10 11 15 inf 16 4 2 3 5 inf 2 4 19 6 18 inf 3 16 4 7 16 inf

Q.7
a)

Explain the P, NP-Hard and NP-complete classes? Give the relation between them.

b)

Explain the purpose of design and complexity of parallel algorithms in detail.

Q.8

Write short notes on any two of the following: a) Logic Optimization b) Optimal merge patterns c) Data Transfer Optimization d) 8 queen's problem using backtracking