0% found this document useful (0 votes)
41 views8 pages

Practice Sheet-4

THANK YOU !
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)
41 views8 pages

Practice Sheet-4

THANK YOU !
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/ 8

SESSION 2024-25(ODD)

PRACTICE SHEET- 4
Name of Course: - Design & Analysis of Algorithms (PCCCS503T)
Sr. Level
Practice Problems / Assignment
No. (L/M/H)
Solve using Backward multistage graph.

1 H

What is multistage graph? For the following graph find shortest path from source to
destination.

2 H

Find the minimum cost path from ''s'' to ''t'' in multistage graph shown. using forward
approach.

3 H

4 Differentiate between: L
1) Dynamic programming & Greedy strategy.
2) Dynamic programming & Divide and conquer.
5 Find the minimum number of multiplications required to multiply the matrices of given M
dimension using chained matrix multiplication. Dimension of matrices are –
A  13  5, B = 5  89, C= 89  3, D = 3  34.
Using chained matrix multiplication method find out minimum no. of operation required
to multiply. Following matrices and also find the best sequence.
A= 6  10
6 M
B =10 12
C =12 5
D = 5 8
Calculate the minimum no. of scaler multiplication for following set of matrix using
matrix chain multiplication?
7 M
A1  10  20, A2 = 20  13, A3= 13  15, A4 = 15  12.
Also write correct parenthesization?
Calculate the minimum number of scalar multiplication for following set of matrix using
8 M
matrix chain multiplication. A =4 X 5 B = 5 X 3 C = 3 X 2 D = 2 X 7
What is travelling salesman problem? Implement travelling salesman problem for the
following matrix representation of complete graph.

9 M

Implement Travelling salesman problem for following matrix

10 M

11 What is Travelling salesman problem? Implement it for the following matrix : M


What is TSP? Calculate the TSP tour for following matrix.

12 M

What is Travelling salesman problem? Implement it for the following matrix.

13 M

What is TSP? Compute optimal TSP tour for the following distance matrix using
dynamic programming approach.

14 M

Determine cost and structure of Optimal Binary Search Tree (OBST) for set of n = 7
keys with the following probabilities.

15 H

16 Compute probability matrix, evolutry & root matrix for optimal binary search H
tree. Construct the optimal binary search tree & cost of successful and
unsuccessful search

Draw optimal binary search tree for the following. Also generate matrices
required for tree construction.

17 H

For the following probability value implement optimal Binary search tree.
Reconstruct the tree.

18 H

Draw optimal Binary Search Tree for the following parameter.

19 H

Determine LCS: X={ AGGTABZ} , Y ={GXTXAYB} .Write the recurrence


21 M
equation for LCS. Also state the length of longest common subsequence.
Determine LCS of
x = (e, x, p, o, n, e, n, t, i, a, l)
22 M
y = (p, o, l, y, n, o, m, i, a, l)
by using Dynamic programming algorithm.
23 Determine LCS of. x = {a,b,a,b,a,a,b,a} and y = {a,b,a,a,b,a,b} M
What is LCS? Write an algorithm to find LCS and print LCS for following sequence. A
24 = CONDITION M
B = RECURSION
Write an algorithm to find longest common subsequence. Also find its complexity. Find
25 M
optimal solution for given sequence. X = (A,B,C,D,B,A,B) and Y = (B,C,D,A,B,A)
Write an algorithm for longest common subsequence. Determine LCS for the following
26 M
X = "HOUSE" & Y = "COMPUTER"
Write an algorithm to generate longest common subsequence (LCS). Apply the
algorithm for the following string & generate LCS with the help of LCS matrix.
27 M
X = a, a, b, a, a, b, a, b, a, a.
Y = b, a, b, a, a, b, a, b.
Find the longest common subsequence for the following and explain the implementation
of it for the strings X & Y.
28 M

Discuss Floyd-Warshall all pairs shortest path algorithm and generate the distance
matrix for:

29 H

Write an algorithm for Floyd Warshall and calculate distance and path matrix of
30 H
following.
State Floyd’s Algorithm. Solve all pairs shortest path problem for the given graph using
Floyd Algorithm.

31 H

Find out shortest distance between all pairs of vertices and write the Floyd Warshall all
pair shortest path algorithm.

32 H

33 Find all pair shortest paths using Floyd Warshall algorithm for given graph. H
For the following graph, implement Floyd – Warshall algorithm :

34 H

Write Floyd Warshall algorithm for all pairs shortest path problem? Calculate distance
matrix and path matrix for following graph.

35 H

Explain Bellman – Ford algorithm and find its complexity. Find the shortest distance
using Bellman Ford algorithm for given graph.

36 H

37 Explain the Bellman-Ford algorithm used for single source shortest path and discuss the H
advantages and disadvantages of it. Solve the following graph using this algorithm –
Find optimal solution using 0/1 Knapsack problem for given data m = 6, n =3
38 M
(w1 , w2 , w3 ) = (3,2,3) , (p1 ,p2 ,p3 )= (2,1,4)

Mrs. Sonam Chopade

(Course in Charge)

You might also like