Professional Documents
Culture Documents
Page 1 of 4
i) Define Feasible Solution and Optimal Solution.
j) Convert the below matrix to reduced cost matrix form.
∞ 20 30 10 11
15 ∞ 16 4 2
3 5 ∞ 2 4
19 6 18 ∞ 3
16 4 7 16 ∞
Section-B
Answer the following: (58=40)
UNIT-I
2. Write an algorithm to find the maximum and minimum elements from
a given list of n elements using divide and conquer strategy.
OR
3. Sort {33,24,45,8,9,62,17} by using mergesort technique.
UNIT-II
4. Write an algorithm to find solution for the knapsack problem making
use of greedy approach. Consider n=7, size of knapsack m=15,
(w1, w2, w3, w4, w5, w6, w7) = (2,3,5,7,1,4,1), and the corresponding
profits are (10,5,15,7,6,18,3).
OR
5. Consider a job sequencing with deadlines problem instance with n=5,
Page 2 of 4
profits (p1,p2,p3,p4,p5) =(100,19,27,25,15) and deadlines
(d1,d2,d3,d4,d5)=(2,4,3,1,2). Find the maximum profit that can be
obtained by following deadlines.
UNIT-III
6. Explain travelling salesperson problem and find the optimal closed tour
path for the following graph with four vertices represented in cost
adjacency matrix form.
0 9 8 20
1 0 6 4
15 7 0 8
8 2 3 0
OR
7. Given the following digraph, find a matrix A such that, A(i,j) is the
length of a shortest path from i to j using dynamic programming. Also
present the formula used for solving this problem.
UNIT-IV
8. Write an algorithm to find all possibilities of coloring the vertices of a
graph of n vertices using at most m colors so that adjacent vertices are
not of the same color.
OR
Page 3 of 4
9. Write an algorithm/procedure to find the articulation points in a graph.
Find the articulation points in the below graph. Explain.
UNIT-V
10. Describe a suitable data structure to store a sparse polynomial and write
an algorithm to evaluate the below polynomial at 0, 1, and 2 using
Horner’s Method.
3x7-2x3+4x+2
OR
11. Consider the below cost matrix and find the minimum cost in travelling
sales person problem using branch and bound method.
∞ 19 28 9 10
14 ∞ 15 3 2
3 4 ∞ 2 3
20 6 17 ∞ 2
17 3 7 15 ∞
[8/V S/122]
Page 4 of 4