You are on page 1of 4

EID305: Design and Analysis of Algorithms

Question Bank
Module 4:
Basic search and traversing techniques
1. Write a Recursive algorithm of In-order, Pre-order and post-order
traversal of a tree and also analyze its time complexity OR Explain in
detail about tree traversal techniques with an example.
2. Define traversal. Explain in detail about graph traversal techniques OR
Explain in detail about BFS algorithm and DFS algorithm with an
example.
3. Write an algorithm of Biconnected components and analyze its time
complexity.
4. Define articulation point and Bi-connected graph with an example.
5. Find the articulation point, and draw biconnected components and
biconnected graph for the below graph.

6. Write a non-recursive algorithm of In-order traversal of a tree and also


analyze its time complexity.
7. Write the in-order pre-order and post-order traversal for the below
binary tree.
8. Write the BFS and DFS traversal for the below graph.

Backtracking
9. Write an algorithm for generation of next color in M-coloring problem.
10. How does backtracking work on the 8 Queens problem with suitable
example?
11. What is Hamiltonian problem? Explain with an example using
backtracking.
12. Write an algorithm for N-queens problem.
13. How does backtracking work on the 4 Queens problem with suitable
example?
12. Write a general control abstraction for Backtracking using iterative and
recursive method.
14. Write an algorithm for sum of subsets.
15. Generate a state space tree for sum of subsets for n=6, m=30 and w
[1:6]={5,10,12,13,15,18}.
16. Let w= {5,7,10,12,15,18,20} and m=35. Find all possible subsets of w
that sum to m. Do this using sum of subsets. Draw the portion of state space
tree that is generated.
17. Define m-coloring decision problem and m-coloring optimization
problem.
18. Generate a state space tree for the below graph using Graph coloring
algorithm where m=3 (Number of colors).
19. Write an algorithm of m-coloring problem.

20. Generate a state space tree for the below graph using Hamiltonian
algorithm and find out all the possible Hamiltonian cycle in the graph.

1 2

5 4

Module 5:
Branch and Bound
1. What is Branch and Bound? Explain its control abstraction.
2. Explain about LC branch and bound for knapsack problem.
3. What is travelling salesman problem? Solve the following salesman
problems instance using Branch and Bound
4. With an example, explain how the branch-and-bound technique is used
to solve Travelling salesman problem
5. Draw the portion of state space tree generated by LC branch and bound
for the following instances. N=4, m=15, (p1,p2,p3, p4)=(10,10,12,18)
(w1,w2,w3,w4)=(2,4,6,9).
Algebraic Problems
1. What is Horner’s rule? Write an algorithm and explain.
2. Explain the Lagrange interpolation algorithm.
3. Explain Newtonian interpolation algorithm.

You might also like