0% found this document useful (0 votes)
383 views5 pages

Daa Assignment

This document contains 15 questions related to algorithms and data structures. The questions cover topics like the greedy method, minimum spanning trees, shortest path problems, knapsack problem, job sequencing, dynamic programming, multistage graphs, binary search trees, and optimal storage on tapes. The questions include explanations of algorithms, examples to solve problems using different algorithms, and problems to construct optimal solutions using dynamic programming approaches.

Uploaded by

rohith reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
383 views5 pages

Daa Assignment

This document contains 15 questions related to algorithms and data structures. The questions cover topics like the greedy method, minimum spanning trees, shortest path problems, knapsack problem, job sequencing, dynamic programming, multistage graphs, binary search trees, and optimal storage on tapes. The questions include explanations of algorithms, examples to solve problems using different algorithms, and problems to construct optimal solutions using dynamic programming approaches.

Uploaded by

rohith reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

EID305: Design and Analysis of Algorithms

Question Bank

Module 2: The Greedy Method


1 Write and explain the greedy method with the help of
single source shortest path problem.
2 Explain knapsack problem with an example
3 What is spanning tree? Explain in detail about Minimum
cost spanning tree with algorithm and a suitable example
4 Find the minimum spanning tree of the following graph
using Prim’s algorithm

5 Explain Greedy Method generally with Control Abstraction.


Define Feasible Solution and Optimal Solution
6 Consider the weights and profits given and find the optimal
solution where Max Capacity of Knapsack, M =15,
(p1,p2,p3,p4,p5,p6,p7) = (10,5,15,7,6,18,3) and
(w1,w2,w3,w,4,w5,w6,w7) = (2,3,5,7,1,4,1).
7 Explain Job Sequencing with deadlines in detail with an
example
8 Solve the job sequencing problem with number of jobs n =
4.Their profits are (p1,p2,p3,p4) = (100,10,15,27) and
deadlines are (d1,d2,d3,d4) = ( 2,1,2,1).
9 Explain Prim’s Algorithm in detail.
10 Explain Kruskal’s Algorithm in detail
11 For the following graph, Find the minimum cost spanning
tree using Prim’s and Kruskal’s Algorithm

12 Explain Single source Shortest path in detail


13 Find the shortest path from the node 0 to all the other
nodes using Dijikstra’s Algorithm.

14 Find an optimal placement for 13 programs on three


tapes T0,T1 and T2, where the programs are of lengths
12,5,8,32,7,5,18,26,4,3,11,10 and 6.
15 Write an algorithm for optimal storage on tapes.

Module 3: Dynamic Programming

1 Explain the multistage graph problem with an example


2 Design a three stage system with device types D1, D2, and
D3. The costs are Rs.20, Rs.35 and Rs.45 respectively. The
cost of the system is to be no more than Rs.140. The
reliability of each device type is 0.7, 0.65 and 0.8
respectively.
3 Design a three stage system with device types D1, D2, and
D3. The costs are Rs.30, Rs.15 and Rs.20 respectively. The
cost of the system is to be no more than Rs.105. The
reliability of each device type is 0.9, 0.8 and 0.5 respectively.
5 Explain reliability design in Dynamic Programming
6 Write the optimal Binary Search Tree algorithm using
Dynamic Programming.
7 Discuss the all pairs shortest path algorithm for the below
example

8 Consider n=4 and words(w1,w2,w3,w4)=(do, if, int, while).


The values for p’s are given as P(1:4)=(3,3,1,1). Construct the
optimal binary search tree.
9.Consider n=4 and Keys(k1,k2,k3,k4)=(10,20,30,40) and the
frequency of the keys is given as 4,2,6,3. Construct the
optimal binary search tree.
10. Consider n=3 and Keys(k1,k2,k3)=(25,26,27) and the
frequency of the keys is given as 4,3,2. Construct the optimal
binary search tree.
11 For the following multistage graph, find the shortest cost
path using Forward and Backward approach

You might also like