Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. (a) Define an algorithm. What are the different criteria that satisfy the algorithm?
(b) Explain the different areas of research where the algorithms can be applied.
2. Given 3 sets {1, 3, 5, 7 } , {2, 4, 8 } and { 6 } in which n=8 with external names 1, 2,
& 3 respectively with the corresponding internal names 2, 3 & 1. Write the data structure
for UNION - FIND algorithm using linked list. Then write the data structure after UNION
instruction.
5. (a) Apply dynamic programming technique for finding an optimal order of multiplying in
matrices.
(b) Write an algorithm to construct the optimal binary search tree T given the roots R(i, j),
0 ≤ i ≤ j ≤ n. Show that this can be done in time O(n3 ).
7. Use the LC approach to solve the Knapsack problem with n=3,m=20, (P1 ,P2 ,P3 ) = (25,24,15)
and (W1 ,W2 ,W3 ) = (18,15,10).
?????
Code No: R7310506 2
III B.Tech I Semester(R07) Regular & Supplementary Examinations, November 2010
DESIGN AND ANALYSIS OF ALGORITHMS
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE questions
All questions carry equal marks
?????
2. (a) Write a pseudo code for the implementation of UNION instruction using linked list. Ex-
plain the working of the implementation.
(b) Explain the usefulness of the following fundamental operations in sets.
i). MIN ii) DELETE iii) FIND iv) INSERT.
3. (a) Search for an element -2 from the below set by using Binary Search
A = { -15, -6, 0, 7, 9, 23, 54, 82, 101, 112 }
(b) Draw the binary decision tree for the above.
5. (a) What are the differences between greedy and dynamic programming method of problem
solving techniques?
(b) Explain the concept of dynamic programming through this approach, discuss the solutions
for O/1 knapsack problem.
6. (a) Compare and contrast between fixed Vs variable tuple size formulation.
(b) Give the state space tree for 3-coloring problem.
7. (a) What do you mean by bounding? Explain how these bounds are useful in branch and
bound method?
(b) Explain FIFO branch and bound.
?????
Code No: R7310506 3
III B.Tech I Semester(R07) Regular & Supplementary Examinations, November 2010
DESIGN AND ANALYSIS OF ALGORITHMS
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE questions
All questions carry equal marks
?????
3. (a) Present an algorithm for binary search using one comparison per cycle.
(b) Explain the method for searching the element 94 from the following set of elements by
using binary search
{ 10, 12, 14, 16, 18, 20, 25, 30, 35, 38, 40, 45, 50, 55, 60, 70, 80, 90}
4. (a) Find optimal solution for the following knapsack problem: n = 3, m = 20, (P1 ,P2 ,P3 ) =
(25,24,15) and (W1 ,W2 ,W3 ) = (18,15,10)
(b) Define the following terms.
i. Feasible Solution.
ii. Optimal Solution.
iii. Object Function.
5. (a) Find the optimal solution for the knapsack instance when
m=165, n=6, (P1 , .P6 )=(W1 ,., W6 )=(100, 50, 20, 10, 7, 3).
(b) What is the principal difference between dynamic programming and divide and conquer
technique?
6. (a) Obtain a knapsack instance for which nodes are generated by backtracking algorithm using
a static tree than using a dynamic tree.
(b) Define the following terms:
Problem state, solution state, state space tree, answer states.
7. (a) Write an algorithm of LC branch and bound to find minimum cost answer node algorithm.
(b) Explain the solution to the traveling sales person problem by using LC branch and bound.
8. Give that the Hamiltonian cycle problem is NP-complete for undirected graph, Prove that;
?????
Code No: R7310506 4
III B.Tech I Semester(R07) Regular & Supplementary Examinations, November 2010
DESIGN AND ANALYSIS OF ALGORITHMS
(Computer Science & Engineering)
Time: 3 hours Max Marks: 80
Answer any FIVE questions
All questions carry equal marks
?????
3. (a) Present an algorithm for binary search using one comparison per cycle.
(b) A sorting method is said to be stable if at the end of the method, identical elements occur
in the same order as in the original unsorted set. Is merge sort a stable sorting method?
Prove it.
5. (a) Device an algorithm m to find the optimal order of multiplying n matrices using dynamic
programming technique.
(b) Explain the time efficiency of an algorithm OBST is cubic
6. (a) Compare and contrast between Brute force approach Vs Back tracking.
(b) Suggest a solution for 8 queens problem.
7. (a) Compare FIFO branch and bound and LC branch and bound.
(b) Explain the method of reduction to solve TSP problem using branch and bound.
?????