BCS401 2nd IA Question Paper
BCS401 2nd IA Question Paper
c d
1
B) Obtain the optimal solution for the knapsack problem M = 10, n = 4
weights (W1, W2, W3, W4) = (7, 3, 4, 5) and 6M
profits (P1, P2, P3, P4)=(42, 12, 40, 25)
OR
Q. 4] A) Apply Warshall’s algorithm to compute transitive closure for the graph
shown below
a b
6.5 M
c d
2
a b
7
5 8 3
c d
1
** Best of Luck **
BCS401
Shanti Vardhak Education Society’s
c
B) Construct a heap for the list 1, 8, 6, 5, 3, 7, 4 by successive insertion using
6M
top – down approach.
OR
Q. 4] A) Apply Warshall’s algorithm to compute transitive closure for the graph
shown below
x y
6.5 M
w z
B) Solve the following TSP which is represented as undirected graph. 6M
2
a b
7
5 8 3
c d
1
** Best of Luck **