Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Part - A
1. What do you mean by algorithm? (May’13)
2. Define algorithm design techniques.
3. List out the ways of representing an algorithm.
4. How to estimate the running time(T(n) of a problem?
5. Define Big-Oh notation. (May’13)
6. Define little Oh and Omega notations.(Nov’13)
7. Why is an algorithm important in problem solving? (Nov’12)
8. State algorithm efficiency. (Nov’12)
9. List out the basic asymptotic efficiency classes.
10. Establish the relationship between O and Ω (Dec2013)
11. What do you mean by linear search?
12. List the properties of big – O notation
13. Differentiate Time Complexity and Space Complexity
14. What is a recurrence equation? List the ways to solve a recurrence equation
15. What is called Substitution method?
16. Using the step count method analyse the time complexity when 2 m × n matrices are added
17. Solve the recurrence T(n)=2T(n-1) + 1 ; T(1) = 0
18. Write an algorithm to multiply 2 matrices of order N × N each.
19. o(g(n)) ∩ ώ(g(n)) = _____________
20. Define recurrence. What are the 3 ways in which recurrence is implemented?
Part - B
1 n=2
0 n=1
9. You are given two sets of distinct integers S1 and S2 of length m and n respectively. Write an algorithm that
runs in O(m+n) time to check if all the numbers in S1 are less than all the elements in S2.
10. Write a recursive and non-recursive algorithm to calculate the factorial of a given number N. Calculate the
time complexity for each of your algorithm.
11. Write a recursive and non-recursive algorithm to calculate the Nth Fibonacci number for a given positive
number N. Calculate the time complexity for each of your algorithm.
12. Define Recurrence equation and explain how recurrence equations are solved.
14. Write an algorithm to perform binary search on a sorted list of elements. Analyze the algorithm for the best
case, average case and worst case.(AM2011,ND2012)
16. Explain in detail the sequence of steps needed for algorithmic problem solving.
UNIT -II Question Bank
1. With an example, explain how the exhaustive search technique is used to solve 0/1 knapsack problem.
2. Explain how exhaustive search is applied to solve traveling salesperson problem.
3. Explain how exhaustive search is applied to solve assignment problem.
4. Using exhaustive search, find the optimal solution to a knapsack problem for the knapsack instance n = 7
m = 15, (p1, p2. ... p7) = (10,5,15,7,6,18,3) and (w1, w2,...,w7) = (2,3,5,7,1,4,1).
5. Explain how exhaustive search is applied to solve closest pair and convex hull problem.
6. Explain how exhaustive search is applied to solve sequential search and string matching problem and
state its complexity.
7. Explain how exhaustive search is applied to solve selection sort and bubble sort and state its complexity.
8. Explain Merge Sort Problem using divide and conquer technique. Give an example. (AM 2010)
9. Using the divide and conquer approach to find the maximum and minimum in a set of ‘n’ elements. Also
find the recurrence relation for the number of elements compared and solve the same.
(AM2011,AM2010)
10. Distinguish between quick sort and merge sort and arrange the following numbers in increasing order
using merge sort(18,29,68,32,43,37,87,24,47,50) (AM2013)
11. What is divide and conquer strategy and explain the binary search with suitable example problem.
(ND2011)
12. Write an algorithm that multiplies two nxn matrices using O(n3) operations. Determine the precise
number of multiplications ,additions and array element access.
13. Briefly discuss the procedure used in strassen multiplication and analyze its efficiency.Use Strassen’s
algorithm to compute the matrix product
a.i.1.
14. Discuss how divide and conquer technique can be applied to convex hull problem with suitable algorithm.
15. Discuss how divide and conquer technique can be applied to closed pair problem with suitable algorithm.
CS6402 DESIGN AND ANALYSIS OF ALGORITHM
Part - A
Unit III
4 Compare Divide and Conquer with Dynamic Programming and Dynamic Programming
with Greedy approach.
6. State 0/1 knapsack problem. How it varies from fractional knapsack problem.
8. Devise a greedy algorithm to make a change of 1655 from the following coins {1000,
500, 100, 50, 20, 10, 5}
9. Write an algorithm to find the shortest path from every node to every other node in a
graph G. What is the strategy you followed?
4. Write the algorithm to compute the 0/1 knapsack problem using dynamic
programming and explain it.Solve the following instance of the0/1 knapsack
problem given the knapsack capacity is W=5
a.i.
5. Write and explain warshall's algorithm.Apply warshall’s algorithm to find the
transitive closure of the digraph defined by the following adjacency matrix
A B C D
A 0 1 0 0
B 0 0 0 1
C 0 0 0 0
D 1 0 1 0
6. Obtain optimal binary search tree for the following problem instance
Key A B C D
7. Explain how Floyd’s algorithm is used in finding the shortest path. Give example.
8. Write algorithm’s for Prim’s algorithm and kruskal’s algorithm and apply to the
graph to obtain minimum spanning tree.Do these algorithms generate same
output-justify.
9. Write short notes on memory functions.
10. Expalin in detail the Huffmann coding algorithm with example.
UNIT - IV
2 MARK QUESTIONS:
16 MARK QUESTIONS
1. Describe in detail about the simplex method with an example.
4. Explain the maximum flow problem algorithm and prove the max Flow min cut
theorem.
5.Apply the shortest augmenting path algorithm to find a maximum flow and minimum
cut in the following network
6. Write the algorithm for maximum matching in Bipartite Graphs and prove the theorem
with example.
8. Explain the algorithm for stable marriage problem and prove the theorem with
Example.
9. Consider an instance of the stable marriage problem given by the ranking matrix. For
each of its marriage matching’s, indicate whether it is stable or not
10. Illustrate pictorially the Ford –Fulkerson method by showing the flow augmenting
paths in bold for the given flow network.
CS6402 DESIGN AND ANALYSIS OF ALGORITHM
Unit V
2 Marks
1. Solve the travelling salesman problem using branch and bound technique.
2. Draw complete state space tree of the backtracking algorithm applied to the
following instance of sum of subsets and mark the solution node.S={3,5,6,7} and
d=15.
3. Explain how backtracking can be applied to solve 8-queen’s problem.
4. Discuss approximation algorithm NP hard for travelling salesman problem.
5. Discuss class P,NP,NP hard and NP complete problems with examples.
6. Develop an algorithm for solving the assignment problem by the branch and
bound technique.
7. What stratergy is used to find the minimum assignment and how?
8. Design a polynomial time algorithm for a 2 coloring problem .Determine whether
vertices of a given graph can be coloured in no more than 2 colors.
9. What is backtracking?Explain why backtracking is defined as a default procedure
of last resort for solving problems.
10. Explain Hamiltonian circuit problem algorithm with a suitable example.
11. Write a non deterministic knapsack algorithm.
12. Consider the below matrix for assignment problem involving persons and
jobs.Explain in detail how branch and bound technique is useful in solving
assignment problems.
9 2 7 8
6 4 3 7
5 8 1 8
7 6 9 4
13. Explain in detail about subset sum problem using backtracking technique.