KEMBAR78
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio | DOCX
CAT-III : APRIL 2015 (SET – A)
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS
Year/Sem : II/IV Date : 08.04.2015
Class/Sectin : CSE Duration : 3 Hours
Faculty : Max.
Marks
:
100
PART - A
Answer ALL Questions
1. What is recurrence relation?
2. List out the basic efficiency classes.
3. Define minimum spanning tree.
4. Write the equation for calculating binomial co – efficient.
5. Define Divide and conquer technique.
6. Define Strassen’s multiplication.
7. State Huffman coding.
8. What is meant by bipartite graph?
9. Mention the relation between P and NP.
10. Define Non Deterministic algorithm.
PART – B
11. a. Apply Warshall’s algorithm and compute the shortest path for the given instance (10)
ii) Write the algorithm for computing binomial co-efficient and analyse the efficiency. (6)
Or
11 b) Solve the instance of the Knapsack problem using dynamic programming method
and write the algorithm for the same.
12 a) i) Write the Huffman’s algorithm and construct Huffman tree for the following
data. (10)
ii) Write short notes on Memory function techniques. (6)
Or
12 b) i) Solve the given graph using single source shortest path algorithm. (8)
ii) Use Prim’s algorithm for the given graph and obtain the shortest path (8)
13 a) i) Solve the linear programming problem using simplex method
Maximize 3x+y
Subject to –x+y <= 1
2x + y < =4
X >= 0 y > =0
ii) Using backtracking technique solve the following instance for the subset prblem
s = (1, 3, 4, 5) and d=11
or
13 b) i) Write an memory function algorithm to solve the following knapsack problem.
Knapsack capacity W= 5
ii) Solve the following instance of the single source shortest path problem with vertex a as the
source.
14 a) i) Trace maximum and minimum (using divide and conquer) algorithm for the following
sequence 20,18,15,18,8,4,41,39,-3.
ii) 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
Or
14 b) Illustrate pictorially the Ford –Fulkerson method by showing the flow augmenting paths in
bold for the given flow network
15 a) i) Describe in detail about P and NP Problems (8)
ii) Write short notes on NP Complete Problem (8)
Or
b) i) Explain lower bound Arguments in detail. (8)
ii) Write down the backtracking algorithm for n – queens problem and subset sum problem.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CAT-III : APRIL 2015 (SET – A)
CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS
Year/Sem : II/IV Date : 08.04.2015
Class/Sectin : CSE Duration : 3 Hours
Faculty :
MADHURAM R
Max.
Marks
:
100
PART - A
1. Define Asymptotic notations.
2. Define recursive equation.
3. What is brute force technique.
4. Define divide and conquer technique.
5. Define minimum spanning tree.
6. What is the difference between dynamic programming and divide and conquer
technique.
7. Define stable marriage problem.
8. Define bipartite graph.
9. Define decision tree.
10. Mention the relation between P and NP.
PART – B
11 a) Apply the branch and bound algorithm to solve the following knapsack problem and explain
in detail.
Ite
m
Weigh
t
valu
e
1 2 1
2 3 2
3 4 5
The knapsack capacity W is 6.
Or
b) Explain Hamiltonian circuit in a graph. Use backtracking to get a Hamiltonian circuit of
following the graph..
12 a) Solve the instance of the stable marriage problem given by the ranking matrix and find the
stable and unstable matching.
Ranking matrix
Or
b) Solve the followingproblemusingthe simplex method
 Maximize Z = 3X1+ 5X2
Subject to X1  4
2 X2  12
3X1 +2X2  18
X1 , X2  0
Ann Lea Sue
Bob 2,3 1,2 3,3
Jim 3,1 1,3 2,1
Tom 3,2 2,1 1,2
13 a) i) Explain the pseudo code for prim’s algorithm and apply the same to minimum spanning
tree for the following graph.
ii)
Or
b) Solve the following assignment problem using branch and bound technique. Explain in detail
how branch and bound technique is useful for solving assignment problems.
14 a) i) Explain in detail about approximation algorithms for NP hard problems. How all you
quantify the accuracy of an approximation algorithm?
ii) Explain n-queen’s problem. Draw a portion of the state space tree and perform
backtracking search for a solution to 4-queens problem
Solve the following instance of the travelling salesman problem by branch and bound method and
explain in detail.
Or
b) i) Devise an algorithm to sort the following elements using Merge sort technique
286, 45,278,368,475,389,656,788,503,126.
ii) Devise an algorithm for merge sorting. Show the intermediate steps when the numbers 310,
285, 179, 652, 351, 423, 861, 254, 450, 520 are sorted using quick sort.
15 a) Discuss the general plan for analyzing the efficiency of non recursive algorithm.
ii) Write an algorithm to find the number of binary digits in the binary representation of a
positive decimal integer and analyze its efficiency.
Or
b)i) Apply binary search algorithm to find the key value 32 in the following list of elements.
1,7,12, 16, 18,21,24,32,34
ii) Write and explain Floyd’s algorithm for the all-pairs shortest path problem. Using this find the
length of the shortest path between all pairs of vertices of the following graph.

CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS questio

  • 1.
    CAT-III : APRIL2015 (SET – A) CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS Year/Sem : II/IV Date : 08.04.2015 Class/Sectin : CSE Duration : 3 Hours Faculty : Max. Marks : 100 PART - A Answer ALL Questions 1. What is recurrence relation? 2. List out the basic efficiency classes. 3. Define minimum spanning tree. 4. Write the equation for calculating binomial co – efficient. 5. Define Divide and conquer technique. 6. Define Strassen’s multiplication. 7. State Huffman coding. 8. What is meant by bipartite graph? 9. Mention the relation between P and NP. 10. Define Non Deterministic algorithm. PART – B 11. a. Apply Warshall’s algorithm and compute the shortest path for the given instance (10) ii) Write the algorithm for computing binomial co-efficient and analyse the efficiency. (6) Or 11 b) Solve the instance of the Knapsack problem using dynamic programming method and write the algorithm for the same. 12 a) i) Write the Huffman’s algorithm and construct Huffman tree for the following data. (10)
  • 2.
    ii) Write shortnotes on Memory function techniques. (6) Or 12 b) i) Solve the given graph using single source shortest path algorithm. (8) ii) Use Prim’s algorithm for the given graph and obtain the shortest path (8) 13 a) i) Solve the linear programming problem using simplex method Maximize 3x+y Subject to –x+y <= 1 2x + y < =4 X >= 0 y > =0 ii) Using backtracking technique solve the following instance for the subset prblem s = (1, 3, 4, 5) and d=11 or 13 b) i) Write an memory function algorithm to solve the following knapsack problem. Knapsack capacity W= 5
  • 3.
    ii) Solve thefollowing instance of the single source shortest path problem with vertex a as the source. 14 a) i) Trace maximum and minimum (using divide and conquer) algorithm for the following sequence 20,18,15,18,8,4,41,39,-3. ii) 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 Or 14 b) Illustrate pictorially the Ford –Fulkerson method by showing the flow augmenting paths in bold for the given flow network 15 a) i) Describe in detail about P and NP Problems (8) ii) Write short notes on NP Complete Problem (8) Or b) i) Explain lower bound Arguments in detail. (8) ii) Write down the backtracking algorithm for n – queens problem and subset sum problem.
  • 4.
    DEPARTMENT OF COMPUTERSCIENCE AND ENGINEERING CAT-III : APRIL 2015 (SET – A) CS 6402 – DESIGN AND ANALYSIS OF ALGORITHMS Year/Sem : II/IV Date : 08.04.2015 Class/Sectin : CSE Duration : 3 Hours Faculty : MADHURAM R Max. Marks : 100 PART - A 1. Define Asymptotic notations. 2. Define recursive equation. 3. What is brute force technique. 4. Define divide and conquer technique. 5. Define minimum spanning tree. 6. What is the difference between dynamic programming and divide and conquer technique. 7. Define stable marriage problem. 8. Define bipartite graph. 9. Define decision tree. 10. Mention the relation between P and NP. PART – B 11 a) Apply the branch and bound algorithm to solve the following knapsack problem and explain in detail. Ite m Weigh t valu e
  • 5.
    1 2 1 23 2 3 4 5 The knapsack capacity W is 6. Or b) Explain Hamiltonian circuit in a graph. Use backtracking to get a Hamiltonian circuit of following the graph.. 12 a) Solve the instance of the stable marriage problem given by the ranking matrix and find the stable and unstable matching. Ranking matrix Or b) Solve the followingproblemusingthe simplex method  Maximize Z = 3X1+ 5X2 Subject to X1  4 2 X2  12 3X1 +2X2  18 X1 , X2  0 Ann Lea Sue Bob 2,3 1,2 3,3 Jim 3,1 1,3 2,1 Tom 3,2 2,1 1,2
  • 6.
    13 a) i)Explain the pseudo code for prim’s algorithm and apply the same to minimum spanning tree for the following graph. ii) Or b) Solve the following assignment problem using branch and bound technique. Explain in detail how branch and bound technique is useful for solving assignment problems. 14 a) i) Explain in detail about approximation algorithms for NP hard problems. How all you quantify the accuracy of an approximation algorithm? ii) Explain n-queen’s problem. Draw a portion of the state space tree and perform backtracking search for a solution to 4-queens problem Solve the following instance of the travelling salesman problem by branch and bound method and explain in detail.
  • 7.
    Or b) i) Devisean algorithm to sort the following elements using Merge sort technique 286, 45,278,368,475,389,656,788,503,126. ii) Devise an algorithm for merge sorting. Show the intermediate steps when the numbers 310, 285, 179, 652, 351, 423, 861, 254, 450, 520 are sorted using quick sort. 15 a) Discuss the general plan for analyzing the efficiency of non recursive algorithm. ii) Write an algorithm to find the number of binary digits in the binary representation of a positive decimal integer and analyze its efficiency. Or b)i) Apply binary search algorithm to find the key value 32 in the following list of elements. 1,7,12, 16, 18,21,24,32,34 ii) Write and explain Floyd’s algorithm for the all-pairs shortest path problem. Using this find the length of the shortest path between all pairs of vertices of the following graph.