January - 2018
January - 2018
6.a) What is the total cost of executing n of the stack operations PUSH, POP and
M
MULTIPOP, assuming that the stack begins with s0 objects and finishes with sn objects?
b) Explain in detail how Dynamic Programming is used for Optimal Rod cutting. [5+5]
OR
7. What are Huffman Codes? Explain the process of constructing a Huffman code with an
example. [10]
8.a) Explain the implementation of Breadth-First algorithm with a neat example.
b) Let G = (V, E) be a bipartite graph with vertex partition V = L U R, and let G' be its
JN
corresponding flow network. Give a good upper bound on the length of any augmenting
path found in G' during the execution of FORD-FULKERSON. [5+5]
OR
Explain the implementation of Kruskal’s and Prim’s algorithm with same example.[10]
TU
9.
10. Explain in detail about the subset sum problem with an example. [10]
OR
11. Explain in detail about
H
a) 3-CNF satisfiability
b) Formula satisfiability. [5+5]
U
SE
---ooOoo---
D
04
-0
1-
20
1 8A
M