Practice Sheet-4
Practice Sheet-4
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
10 M
12 M
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
19 H
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)
(Course in Charge)