Sei sulla pagina 1di 20

QUESTION BANK

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


YEAR/SEM

: II YEAR/IV SEM

NAME OF THE SUBJECT

: DESIGN AND ANALYSIS OF ALGORITHM

NAME OF THE FACULTY

: Mrs. A.CHITRA, M. REVATHI & M.AZHAGIRI

UNIT I
INTRODUCTION
SYLLABUS
(X)* Notion of an Algorithm Fundamentals of Algorithmic Problem Solving
Important Problem Types Fundamentals of the Analysis of Algorithm Efficiency
(Y)*

Analysis Framework Asymptotic Notations and its properties Mathematical

analysis for Recursive and Non-recursive algorithms.

PART A
I X1. What is time and space complexity?
I X2. What is an Algorithm?
I X3. Define program proving and program verification.
I X4. Define algorithm validation.
I X5. Write an algorithm to find the number of binary digits in the binary representation of a positive
decimal integer.
I X6. Give the notation of an algorithm.
I X7. Design a Euclids algorithm for finding GCD of two given numbers.
I X8. What are Sequential Algorithms?
I X9. What are Parallel Algorithms?
I X10. Write the process for design and analysis the algorithm.
I X11. What are the fundamentals steps for design and analysis an algorithm?
I X12. What is Exact and Approximation algorithm?
I X13. What is Algorithm Design Technique?
I X14. Define Pseudo code.

I X15. Define Flowchart.


I X16. Prove the correctness of an algorithms.
I X17. What is validation and program verification?.
I X18. Write the characteristics of an algorithm.
I X19. What is Efficiency of algorithm?
I X20. What is algorithms Optimality?
I X21. What is generality of an algorithm?
I Y 1. Define Big oh notation.
I Y 2. How will you measure input size of algorithms?
I Y 3. What is the average case complexity of linear search algorithm?
I Y 4. Define the Average-case efficiency of an algorithm?
I Y 5. What is the properties of big-Oh notation.
I Y 6. Define little Oh and Omega notations.
I Y 7. What are the properties of asymptotic notations?
I Y 8. What is meant by linear search?
I Y 9. What is recurrence equation?
I Y 10. Write the recursive Fibonacci algorithm and its recurrence relation.
I Y 11. The (log n)th smallest number of n unsorted numbers can be determined in O(n) average-case
time.
I Y 12. What do you mean by sorting problem?
I Y 13. What do you mean by Searching problem?
I Y 14. What are combinatorial problems?
I Y 15. Define a graph and its type.
I Y 16. Define tree with its properties.
I Y 17. Define performance analysis
I Y 18. What do you mean by Worst case-Efficiency of an algorithm?
I Y 19. What do you mean by Best case-Efficiency of an algorithm?
I Y 20. What do you mean by Amortized efficiency?
I Y 21. How to analyze an algorithm framework?
I Y 22. How to measure the algorithms efficiency?
I Y 23. What is called the basic operation of an algorithm?
I Y 24. How to measure an algorithms running time?
I Y 25. Define order of growth.
I Y 26. Define notation
I Y 27. Define notation
I Y 28. What is the use of Asymptotic Notations?
I Y 29. Mention the general plan for analyzing time efficiency of Non recursive algorithms.

I Y 30. Define recursive and non recursive algorithm.


I Y 31. Give the time complexity 1+3+5+7+.+999
I Y 32. Consider the following algorithm
S=0
for i=1 to n do S=S+i
return i
What does this algorithm compute? How many times is the basic operation executed?
I Y 33. Design an algorithm to compute the area and Circumference of a circle
PART B

I X1. Describe the steps in analyzing & coding an algorithm.(16)


I X2. Explain some of the problem types used in the design of algorithm.(16)
I Y 1. Explain the various asymptotic notations used in algorithm design. (16)
I Y 2. Define recurrence equation and explain how solving recurrence equations are done.
I Y 3. Prove that for any two functions f(n) and g(n), we have
f(n) = (g(n)) if and only if f(n) = O (g(n)) and f(n) = (g(n)). (16)
I Y 4. Define asymptotic notations. Distinguish between Asymptotic notation and conditional
asymptotic notation. (16)
I Y 5. With a suitable example, explain the method of solving recurrence equations. Discuss the
fundamentals of analysis framework.(16)
I Y 6. Write the Insertion sort algorithm and estimate its running time. (8).
I Y 7. Suppose W satisfies the following recurrence equation and base case (where c is a constant):
W (n) =c.n+W (n/2) and W (1) =1. What is the asymptotic order of W (n)? (8)
I Y 8. Discuss the properties of asymptotic notations.(8)
I Y 9. Explain the general framework for analyzing the efficiency of algorithm.(16)
I Y 10. Discuss about recursive and non-recursive algorithms with example.(16)
I Y 11. Explain the best, worst and average case and discuss it with some examples. (8)
I Y 12. Compare the order of the growth of the following. (12)
i)(1/2) n(n-1) and n2
ii)log2n and n
iii)n! and 2n
I Y 13. Give the non recursive algorithm for finding the value of the largest element in a list of n
numbers.(8)
I Y 14. Prove the time complexity of the matrix multiplication is O(n3) (8)
I Y 15. What is the general plan for time efficiency of recursive algorithm? Give an example. (12)
I Y 16. Solve the following recurrence relations. (16)
i)x(n)=x(n-1)+n for n>0,x(0)=0

ii)x(n)=x(n/2)+n for n>1, x(1)=1 (solve for n=2k)


iii)x(n)=3x(n-1) for n>1,x(1)=4
I Y 17. Consider the following recursion algorithm Min1(A[0 -------n-1]) (16)
If n=1 return A[0]
Else temp = Min1(A[0.n-2])
If temp <= A[n-1] return temp
Else
Return A[n-1]
a. What does this algorithm compute?
b. Setup a recurrence relation for the algorithms basic operation count and solve it

UNIT II

BRUTE FORCE AND DIVIDE-AND-CONQUER

SYLLABUS

(X)* Brute Force - Closest-Pair and Convex-Hull Problems-Exhaustive Search - Traveling


Salesman Problem - Knapsack Problem - Assignment problem.
(Y)*

Divide and conquer methodology Merge sort Quick sort Binary search

Multiplication of Large Integers Strassens Matrix Multiplication-Closest-Pair and ConvexHull Problems.

PART A
II X 1. Give the mathematical notation to determine if a convex direction is towards left or right and write
the algorithm.
II X 2. Design a brute force algorithm for computing the value of a polynomial
p(x) = anxn + an-1xn-1 +.......+ a1x......a0 at a given point x0 and determine its worst case efficiency
class.
II X 3. Define Brute force strategy.
II X 4. Define closest pair problem.
II X 5. Mention the time complexity of closest pair problem using brute force strategy. Define Convex
hull problem.
II X 6. Determine the sets which are convex.
a.Star b.Cone c. Pentagone d. Semi Circle e. Arc.
II X 7. What is the time complexity of the algorithm which can solve the convex-hull problem using the
brute force method?
II X 8. What is meant by exhaustive search?
II X 9. Give an example for exhaustive search algorithm.
II Y 1. Derive the complexity of Binary Search algorithm.
II Y 2. Define divide and conquer strategy.
II Y 3. Give the recurrence relation for divide and conquer.
II Y 4. Define Master Theorem.
II Y 5. Find the order of growth for the following recurrence.
T(n)=4T(n/2)+n2, T(1)=1
II Y 6. Give some examples for divide and conquer method.
II Y 7. Write the control abstraction for divide and conquer technique.

II Y 8. What is the best case, worst case and average case complexity of Quicksort?
II Y 9. Solve the average case recurrence for quick sort.
II Y 10. How to search an element using binary search?
II Y 11. What are the merits of binary search?
II Y 12. What are the merits of divide and conquer technique?
II Y 13. What are the demerits of binary search?
II Y 14. What is the best case, worst case and average case complexity of binary Search?
II Y 15. Compute 2101*1130 by applying the divide and conquer algorithm.
II Y 16. Prove the equality alogbc = clogba .
II Y 17. What is the time complexity of closest pair and quick hull problem?
II Y 18. Solve the average case recurrence for quick sort.
II Y 19. How the operations performed in Strassens Matrix multiplication

PART-B
II X 1. Find the optimal solution to the fractional knapsack problem with given data: (16)
Item

Weight

Benefit

60

75

90

II X 2. Write an efficient and exhaustive search algorithm for the travelling salesmen problem. (16)
II X 3. Find the optimal solution using exhaustive search method for the assignment problem given
Below. (16)

II X 4. Explain the Closest-Pair and Convex-Hull Problems by Brute Force. (16)


II X 5. Explain the convex hull problem and the solution involved behind it. (8)
II X 6. Solve the following using Brute-Force algorithm: (8)
Find whether the given string follows the specified pattern and return 0 and 1 accordingly.

Examples:
1. Pattern: abba, input: redblueredblue should return 1
2. Pattern: aaaa, input: asdasdasdasd should return 1
3. Pattern: aabb, input: xyzabcxzyabc should return 0
II Y 1. Explain the merge sort algorithm with example.(16)
II Y 2. Explain about Quick sort algorithm. (16)
II Y 3. Write down the algorithm to construct a convex hull based on didvide and conquer strategy. (16)
II Y 4. Write the algorithm to perform Binary Search and compute its run time complexity. (16)
II Y 5. What do you mean by divide and conquer strategy? Explain with example.(12)
II Y 6. Compare the stabilities and the time complexities of quicksort and mergesort algorithms.(8)
II Y 7. Explain the binary search algorithm and time complexity of binary search algorithm.(16)
II Y 8. Write a pseudo code for obtaining the product of two matrices using the Strassens matrix
Multiplication algorithm. (8)
II Y 9. Explain the upper and lower hulls in the convex-hull problem, with an example. (8)
II Y 10. What is the best-case efficiency of quickhull? (4)
II Y 11. Give a specific example of inputs that make the quickhull algorithm run in quadratic time.(12)
II Y 12. Write a pseudo code for the quickhull algorithm.(4)
II Y 13. Write short notes on the following (16)
i.Strassens Matrix Multiplication
ii.Multiplication of largest integer.

UNIT III

DYNAMIC PROGRAMMING AND GREEDY TECHNIQUE


SYLLABUS

(X)* Computing a Binomial Coefficient Warshalls and Floyd algorithm Optimal Binary
Search Trees Knapsack Problem and Memory functions.
(Y)*Greedy Technique Prims algorithm- Kruskal's Algorithm-Dijkstra's Algorithm-Huffman
Trees.
PART A
III X 1. Differentiate between greedy method and dynamic programming.
III X 2. Explain principle of optimality?
III X 3. Differentiate between divide and conquer and dynamic programming.
III X 4. Define optimal binary search tree.
III X 5. Write an algorithm to find the shortest path between all pairs of nodes.
III X 6. List out memory functions used under dynamic programming.
III X 7. State how Binomial Coefficient is computed?
III X 8. Write down the optimization technique used for Warshalls algorithm. State the rules and
assumptions which are implied behind that.
III X 9. Define dynamic programming.
III X 10. What is meant by all pairs shortest path problem?
III X 11. Write the running time of 0/1 knapsack problem.
III X 12. Give an application of dynamic programming algorithm.
III X 13. Give the running time of the optimal BST algorithm.
III X 14. What is meant by bottom up dynamic programming?
III X 15. Define Floyds algorithm
III X 16. What is the running time of dynamic programming TSP?
III X 17. What is the formula used used in floyds algorithm?
III X 18. What is the formula used for cost of binary search tree?
III X 19. Write recurrence relation for 0/1 knapsack problem.
III Y 1. What is meant by 0/1 knapsack problem?

III Y 2. Define travelling sales person problem.


III Y 3. Mention the drawback of greedy algorithm.
III Y 4. Define greedy algorithm.
III Y 5. Define Prims algorithm.
III Y 6. Define Dijkstra's Algorithm
III Y 7. Define Huffman tree and Huffman code
III Y 8. What is single-source shortest-paths problem?
III Y 9. What is the running time of Prims algorithm?
III Y 10. What is the running time of Kruskal's Algorithm?
III Y 11. Define Kruskal's Algorithm.
III Y 12. What is the best algorithm suited to identify the topography for a graph. Mention its efficiency
factors.
PART-B
III X 1. Explain all pair shortest path problem with Floyds algorithm in detail with example. (16)
III X 2. Find an optimal solution to the knapsack instance n=7, m=15, (p1,p2,p3.p7) =
(10,5,15,7,6,18,3) and (w1,w2,w3.,w7)=(2,3,5,7,1,4,1). (16)
III X 3. Write and explain the algorithm to compute the all pairs source shortest path using dynamic
programming and prove that it is optimal. (16)
III X 4. How is dynamic programming applied to solve the travelling salesperson problem? Explain in
detail with an example. (16)
III X 5. Write an algorithm to construct the optimal binary search tree given the roots
r(i,j), 0<=i<=j<=n. Also prove that this could be performed in time O(n). (16)
III X 6. Describe the travelling salesman poblem and discuss how to solve it using dynamic
programming? (16)
III X 7. Solve the all pairs shortest path problem for the diagraph with the weight matrix given below.(16)
a

III X 8. Generate the sets Si , 0<=i<=4 ,when (w1,w2,w3,w4)=(10,15,6,9) and (p1,p2,p3,p4)=(2,5,8,1)


Develop an algorithm corresponding to the dynamic programming solution of the travelling

sales person. (16)


III X 9. Using function OBST to compute w(I,j),r(I,j) and c(I,j) ,0<=i<j<=4, for the identifier set
(a1,a2,a3,a4)=(cout,float,if,while) with p(1)=1/20, p(2)=1/5,p(3)=1/10, p(4)=1/20, q(0)=1/5,
q(1)=1/10, q(2)=1/5,q(3)=1/20 and q(4)=1/20.Using the r(i,j) construct optimal binary search
tree. (16)
III X 10. Write the algorithm to compute the 0/1 knapsack problem using dynamic programming and
explain it. (16)
III X 11. Solve the following instance of the 0/1, knapsack problem given the knapsack capacity is
W= 5. (16)
Items

Weight

Value

12

10

20

15

III X 12. Using OBST algorithm compute wi,rij,cij where j=0 to 4 for the identifier set (a1, a2,a3
,a4) = (end,goto,print,stop) with P1= 1/20,P2= 1/5,P3=1/10,P4=1/20

q0=1/5, q1=1/10,

q2=1/5 ,q3=1/20, q4 =1/20 using r ij construct optimal binary search tree. (16)
III X 13. Describe binary search tree with three traversal patterns? Give suitable example with neat
diagram for all three traversal of binary search.(16)
III X 14. Find the solution for the knapsack problem with the following instances Weights ={2,1,3,2},
Profits = {12,10,20,15} and capacity =5. (16)
III X 15. Explain about Knapsack Problem and memory functions with example. (16)
III X 16. Illustrate Floyds Algorithm for the All-Pairs Shortest-Paths Problem. (16)
III X 17. Write an algorithm for binomial coefficient computation and analyze the efficiency of
algorithm.(8)
III X 18. Apply the bottom up dynamic programming algorithm to the following instance of Knapsack
Problem. (16)
Item

Weight

Value

$42

$12

$40

$25

Capacity W=10

III Y 1. Write the kruskals algorithms apply it to find a minimum spanning tree for the following

graph.(16)

III Y 2. Explain Kruskals algorithm for constructing minimum cost spanning tree. (16)
III Y 3. Let A={l/119, m/96, c/247, g/283, h/72, f/77, k/92, j/19} be the letters and its frequency of
distribution in a text file. Compute a suitable Huffman coding to compress the data effectively. (16)
III Y 4. Write and analyze the Prims Algorithm. (16)
III Y 5. The binary string below is the title of a song encoded using Huffman codes. (12)
0011000101111101100111011101100000100111010010101.
Given the letter frequencies listed in the table below, build Huffman codes and use
them to decode the title. In cases where there are multiple greedy choices, the codes
are assembled by combining the first letters (or groups of letters) from left to right, in
the order given in the table. Also, the codes are assigned by labelling the left and right
branches of the prefix/code tree with 0 and 1, respectively.
Letter

Frequency

III Y 6. Write the procedure to compute Huffman code. (8)


III Y 7. Construct a minimum spanning tree using Kruskals algorithm with your own
example.(16)
III Y 8. Explain Dijikstra algorithm with an suitable example.(16)
III Y 9. Define Spanning tree. Discuss design steps in Prims algorithm to construct minimum spanning
tree with an example. (16)
III Y 10. Discuss briefly about -Huffman Trees with an example. (12)
III Y 11. Explain Prims algorithm using greedy method with your own example. (16)
III Y 12. Write the Huffmans Algorithm. Construct the Huffmans tree for the following Data and obtain
its Huffmans Code (16)
Character

probability

0.5

0.35

0.5

0.1

0.4

0.2

UNIT IV
ITERATIVE IMPROVEMENT
SYLLABUS
(X)* The Simplex Method-The Maximum-Flow Problem
(Y)* Maximm Matching in Bipartite Graphs- The Stable marriage Problem.
PART A
IV X 1. Define Network Flow and Cut.
IV X 2. Define Flow Cut.
IV X 3. Determine the Dual linear program for the following LP,
Maximize 3a + 2b+c
Subject to,
2a + b + c <=3
a +b + c <=4
3a +3b +6c <=6
a, b, c>=0
IV X 1. Define optimal solution.
IV X 2. Define feasible solution.
IV X 3. Define Maximum flow time complexity.
IV X 4. Define Maximum flow Problem.
IV X 5. What is a cut?
IV X 6. How will you find minimum cut?
IV X 7. Define simplex method.
IV X 8. What are the steps involved in simplex method?
IV X 9. Define forward and backward edges
IV X 10. What is the capacity of a cut?
IV X 11. Define iterative improvement technique.
IV X 12. How maximum flow and minimum cut related to each other?
IV X 13. Define augmenting path
IV X 14. Define flow conservation requirements.

IV X 15. Define flow network


IV X 16. Define altering path
IV X 17. Difference between maximum flow and minimum cut.\
IV X 18. What do you mean by residual network
IV X 19. Define Extreme point theorem
IV X 20. Define Halls theorem
IV X 21. Differentiate Feasible and optimal solution
IV X 22. Solve the linear programming problem geometrically Maximize 3x+y
Subject to x+y<= 1
2x + y < =4
X >= 0 y > =0
IV Y 1. What do you mean by perfect match in bipartite graph.
IV Y 2. List the properties of flow network
IV Y 3. List the standard form requirements of linear programming problem in simplex method.
IV Y 4. What is the running time of Ford-Fulkerson?
IV Y 5. Define Matching.
IV Y 6. Define a bipartite graph.
IV Y 7. How will you check the stability
IV Y 8. What is stable marriage problem?
IV Y 9. Define the term stable pair
IV Y 10. Explain bipartite perfect matching polytope.
IV Y 11. Define Maximum bipartite Matching.
IV Y 12. State the minimum weight perfect matching problem.
PART-B
IV X 1. Explain the maximum flow problem algorithm and prove the max Flow min cut theorem. (16)
IV X 2. Write the procedure to initialize simplex which determines if a linear program is
feasible or not.(16)
IV X 3. Write short notes on simplex method. (16)
IV X 4. Explain briefly on Fold-Fulkerson algorithm (16)

IV X 5. Maximize

IV X 6. Trace the simplex method on the following problems (16)


Maximize p= 2x-3y=4z
Subject to 4x-3y+z<=3
x+y+z <=10
2x+y- z<=10 where x, y and z are non negative
IV X 7. Write short notes on maximum flow problem. (8)
IV X 8. Explain the maximum flow algorithm.(8)
IV X 9. Prove the maximum flow and minimum cut theorem. (8)
IV X 10. Apply the shortest augmenting path algorithm to find a maximum flow and minimum
cut in the following network. (16)

IV X 11. Illustrate pictorially the Ford Fulkerson method by showing the flow augmenting
paths in bold for the given flow network. (16)

IV Y 1. Explain briefly on stable marriage problem. (16)

IV Y 2. Write down the optimality condition and algorithmic implementation for finding M- augmenting
paths in bipartite graphs.(16)
IV Y 3. Explain briefly on bipartite graph. (8)
IV Y 4. Write an algorithm for stable marriage problem with example.(12)
IV Y 5. Explain briefly on reducing bipartite graph to net flow. (8)
IV Y 6. Explain briefly on minimum weight perfect matching algorithm.(8)
IV Y 7. Explain the algorithm: (16)
i. Blocking pair
ii Stable marriage problem
iii Man optimal
iv Women optimal
IV Y 8. Write the algorithm for maximum matching in Bipartite Graphs and prove the theorem
With example (16)
IV Y 9. Apply the maximum matching algorithm to the following bipartite graphs (16)

IV Y 10. Explain the algorithm for stable marriage problem and prove the theorem with Example.(16)
IV Y 11. Consider an instance of the stable marriage problem given by the ranking matrix(16)
A

1,3

3,1 1,3 2, 2

2,2 3, 1

2,2 3,1 1, 3

For each of its marriage matchings, indicate whether it is stable or not.

UNIT V

COPING WITH THE LIMITATIONS OF ALGORITHM POWER

SYLLABUS

(X)* Limitations of Algorithm Power-Lower-Bound Arguments-Decision Trees-P, NP and NPComplete Problems--Coping with the Limitations - Backtracking n-Queens problem
Hamiltonian Circuit Problem Subset Sum Problem
(Y)*

Branch and Bound Assignment problem Knapsack Problem Traveling Salesman

Problem- Approximation Algorithms for NP Hard Problems Traveling Salesman problem


Knapsack problem.

PART A
V X 1.

What is backtracking?

V X 2.

What is Hamiltonian circuit problem?

V X 3.

Define the Hamiltonian circuit.

V X 4.

What is the subset-sum problem?

V X 5.

Define NP hard and NP completeness.

V X 6.

Compare NP hard and NP completeness

V X 7.

How NP Hard problems are different from NP Complete.

V X 8.

State the property of NP complete problem.

V X 9.

An NP hard problem can be solved in deterministic polynomial time, how?

V X 10. Define decision tree with example


V X 11. What is a state space tree?
V X 12. What is a promising node in the state-space tree?
V X 13. What is a non-promising node in the state-space tree?
V X 14. What do leaves in the state space tree represent?
V X 15. What is the manner in which the state-space tree for a backtracking algorithm is constructed?
V X 16. What is n-queens problem?
V X 17. When can a node be terminated in the subset-sum problem?

V X 18. How can the output of a backtracking algorithm be thought of?


V X 19. Give a template for a generic backtracking algorithm.
V X 20. What are the tricks used to reduce the size of the state-space tree?
V X 21. What is the method used to find the solution in n-queen problem by symmetry?
V X 22. Define N queens problem.
V X 23. Draw the Hamiltonian circuit for the given graph

V X 24. Write the formula for decision tree for searching a sorted array.
V X 25. List the lower bounds for sorting, searching and multiplication.
V X 26. Define adversary method.
V X 27. What is information theoretic lower bound?
V X 28. Define local search heuristics
V X 29. Define the class P and NP problem.
V X 30. What is meant by tractable and intractable problem?
V X 31. Whether class P solves a problem in polynomial time? Justify.
V X 32. Give examples for NP Complete problems
V X 33. Define adversary method.
V X 34. Compare polynomial and non deterministic polynomial and give two examples for each.
V Y 1.

Define branch and bound problem and its methods.

V Y 2.

Compare backtracking and branch-and-bound.

V Y 3.

When can a search path be terminated in a branch-and-bound algorithm?

V Y 4.

What are the additional features required in branch-and-bound when compared to backtracking?

V Y 5.

What is a feasible solution and what is an optimal solution?

V Y 6.

What is the assignment problem?

V Y 7.

What is best-first branch-and-bound?

V Y 8.

What is knapsack problem?

V Y 9.

Give the formula used to find the upper bound for knapsack problem.

V Y 10. What is the travelling salesman problem?


V Y 11. What are the strengths of backtracking and branch-and-bound?
V Y 12. Define lower bound.
V Y 13. What type of output yields trivial lower bound?
V Y 14. What is information theoretic lower bound?
V Y 15. Define complexity theory.
V Y 16. What is halting problem.
V Y 17. What is CNFs satisfiablity problem?
V Y 18. What are the additional items required for branch and bound compared to backtracking technique?
V Y 19. State the reason for terminating search path at the current node in branch bound algorithm.
V Y 20. Write nearest neighbourhood algorithm.
PART-B
V X 1.

Write down and explain the procedure for tackling the 8 queens problem using a
backtracking approach. (16)

V X 2.

Write short notes on NP hard and NP completeness. (16)

V X 3.

How does backtracking works on 8 queens problem with suitable example. (16)

V X 4.

Write backtracking algorithm for (16)


ii) a. The n-queens problem
iii) b. Hamiltonian problem
iv) c. The subset-Sum problem

V X 5.

Write an algorithm to determine Hamiltonian cycle in a given graph using back tracking. For the

following graph determine the Hamiltonian cycle. (16)

V X 6.

Implement an algorithm for Knapsack problem using NP-Hard approach. (12)

V X 7.
V X 8.

Using an example prove that, satisfiability of Boolean formula in 3- Conjunctive Normal Form
is NP complete. (12)
State the relationships among the complexity class algorithms with the help of neat diagrams. (8)

V X 9.

The knight is placed on the first block of an empty board and, moving according to the rules of
chess, must visit each square exactly once. Solve the above problem using backtracking
procedure. (8)

V X 10. Draw the decision tree for sorting algorithm and explain briefly. (8)
V X 11. Draw the decision tree for searching an element from the sorted array and explain it briefly.(8)
V X 12. Compare polynomial and non deterministic polynomial and give two examples for each.(16)
V X 13. Explain lower bound Arguments in detail.(8)
V X 14. Illustrate the limitations of algorithm.(16)
V X 15. Draw the Decision Tree and Find the number of Key Comparison in the worst and average
case for: (16)
1. The four Element Binary search
2.

Three-element basic insertion sort.

V X 17. Explain
i)Describe in detail about P and NP Problems
ii)Write short notes on NP Complete Problem (16)
V Y 1. Show that the Hamiltonian path problem reduces to the Hamiltonian Circuit Problem and vice
versa. (16)
V Y 2. Explain how job assignment problem could be solved, given n tasks and n agents where each agent
has a cost to complete each task, using Branch and Bound technique. (16)
V Y 3. Suggest an approximation algorithm for TSP. Assume that the cost function satisfies the triangle
inequality. (16)
V Y 4. What is an approximation algorithm? Give example. (16)
V Y 5.

Explain the Assignment problem in Branch and bound with Example. (16)

V Y 6.

Solve the following instance of Knapsack problem by Branch and bound Algorithm (16)

V Y 7.

Apply the branch and bound algorithm to solve the traveling salesman problem for the following
Graph(16)

V Y 8.

Write short notes on the following using approximation Algorithm (16)


i) Nearest neighbor algorithm with example
ii)Multi fragment heuristic algorithm with example

V Y 9.

Describe in detail about Twice around the tree algorithm with example(8)

V Y 10. Explain local search heuristic with example. (8)


V Y 11. Explain the knapsack problem using approximation algorithm with example. (12)
V Y 12. Explain Approximation Algorithms for the Travelling Salesman Problem.(16)

Potrebbero piacerti anche