Bachelors Level/Third Year/Fifth Semester/Science csit/fifth semester/design and analysis of algorithms/syllabus wise questions

B.Sc Computer Science and Information Technology

Institute of Science and Technology, TU

Design and Analysis of Algorithms (CSC325)

Year Asked: 2079, syllabus wise question

Backtracking
1.
What do you mean by Backtracking? Explain the backtracking algorithm for solving knapsack problem and find the solution for the problem given below and capacity of knapsack is 10 kg

$\begin{bmatrix} \text{Items} & 1 & 2 & 3 & 4 \\ \text{Weight (w}_i\text{)} & 2 & 3 & 4 & 5 \\ \text{Profit (P}_i\text{)} & 3 & 5 & 6 & 10 \end{bmatrix}$
[10]
Divide and Conquer Algorithms
1.
Explain the divide and conquer strategy for problem solving. Describe the worst-case linear time selection algorithm and analyze its complexity. [10]
2.
Trace the quick sort algorithm for sorting the array $A[] = \{15,7,6,23,18,34,25\}$ and write its best and worst complexity. [5]
Dynamic Programming
1.
Write the dynamic programming algorithm for matrix chain multiplication. Find the optimal parenthesization for the matrix chain product $ABCD$ with size of each is given as $A_{5\times10}, B_{10\times15}, C_{15\times20}, D_{20\times30}$. [10]
2.
Find the edit distance between the string "ARTIFICIAL" and "NATURAL" Using dynamic programming. [5]
Foundation of Algorithm Analysis
1.
Write short notes on: a) Best, Worst and average case complexity b) Greedy Strategy [5]
2.
Solve the following recurrence relations using masters method.

$\text{a. } T(n) = 2T(n/4) + kn^2,\ n > 1;\ T(1) = 1$

$\text{b. } T(n) = 5T(n/4) + kn,\ n > 1;\ T(1) = 1$
[5]
Greedy Algorithms
1.
Find the MST from following graph using Kruskal's algorithm.
question image
[5]
Iterative Algorithms
1.
Explain the iterative algorithm to find the GCD of given two numbers and analyze its complexity. [5]
NP Completeness
1.
Define tractable and intractable problem. Illustrate vertex cover problem with an example. [5]
Number Theoretic Algorithms
1.
Generate the prefix code for the string "CYBER CRIME" using Huffman algorithm and find the total number of bits required. [5]
2.
Solve the following linear congruences using Chinese Remainder Theorem.$x \equiv 1 \pmod{2},\quad x \equiv 3 \pmod{5},\quad x \equiv 6 \pmod{7}$ [5]