Automatically extracted historical question data. Academic accuracy and examination rules require verification.
Section marks require review. Marks charts are withheld.
Part UNKNOWN — 1
Prove that n° + 300 n—512 is © (n°). .
2. Write the algorithm MAX that finds the maximum in a given list of
numbers.
3. List the basic steps involved while solving any problem using the Divide-
and-Conquer strategy.
4. Give an example of a problem that can be solved using Dynamic
Programming design technique.
5. What is a Greedy algorithm?
6. Output the stations used in the assembly-line scheduling problem given
the following | table and [*- 1.
j 2; 3 4 5 6)
hO]) 2 1 2 1 2
|2]]] 1 2 2 1 1
7. Compare the two techniques, backtracking and branch-and-bound.
8. What data structure would be used to keep track of live nodes in a depth-
first branch-and-bound algorithm?
9. Define class P, NP problems.
10. State a classical NPComplete problem.
DerivationSource quality review required
Part B — 11
| Write the Binary-Search algorithm that searches for an element in a
sorted list. Use a list of 8 elements and illustrate its working. Compute
its worst case running time. (16) ©
Other Or UnclassifiedSource quality review required
Part B — 12a
(a) Write the complete Merge-sort algorithm including any algorithm it
uses. Assume two sorted sub lists with 4 and 3 elements respectively
and explain its working. Do a worst case analysis of it. ; (16)
Other Or UnclassifiedSource quality review required
Part B — 12b
(b) Explain the Activity-selection problem. Write an algorithm to solve it.
What is its worst-case running time? Solve the following problem
where, for each activity the start and the finish times are given: .
Activity 1 (3, 5), Activity 2 (6, 7 ), Activity 3 (3, 6 ), Activity 4 (8, 10),
Activity 5 (0, 2). (16)
ExplanationSource quality review required
Part B — 13a
(a) Find an optimal parenthesization of a matrix-chain product whose
sequence of dimensions is (4, 10, 5, 3, 5 ). How many scalar
multiplications are done in that case? Show the m table and s table
generated by the MATRIX- CHAIN ORDER algorithm. (16)
NumericalSource quality review required
Part B — 13b
(b) Write an iterative algorithm to find a Longest Common
Subsequence (LCS) of two given sequences. Compute its worst-
case running time. Determine aLCS of <1, 0,0, 1,0, 1> -
and <0, 1,0, 1, 0,0, 1>. . (16)
Other Or UnclassifiedSource quality review required
Part B — 14a
(a) State the n-queens problem. Write down an algorithm that solves the
n-queens problem using the backtracking technique. Draw the
portion of the state space tree that is generated while finding a
solution to the 4-queens problem. (16)
Short DescriptionSource quality review required
Part B — 14b
(b) Solve the following instance of the assignment problem by the
branch- and-bound technique. Show the state space tree that is
generated. Indicate the order in which the nodes are generated by
~ numbering them.
job 1 |job2 | job 3] job4
person a 4 8 3° 7
person b |7 6 5 3
person ௦ 3 6 17 8
person 0 9 |5 9 15
(16)
NumericalSource quality review required
Part B — 15
{a) List the sequence of steps that are carried out to prove a problem is
NPComplete. Assume any NPC problem of your choice and show that
itis NPC. (16)
. (OR)
(b) (i) Let T be defined for all powers of 2 and given as :
T(n) = 4T(n/2) +n and T(1)=0
Find the closed form for T. {8)
(0) What is optimal Huffman code for the following set of frequencies,
9:30, 0:15, 0:25, -d:9, e:5, 1:20, g:10, h:40 ? (8)
Other Or UnclassifiedSource quality review required