Sei sulla pagina 1di 4

Code No: R7310506 1

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
?????

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.

3. (a) Give a Control Abstraction for divide and conquer.


(b) Write the Iterative algorithm for Searching an element by using Binary Search.

4. (a) Give the control abstraction for greedy method.


(b) What is greedy method? Explain with example.

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 ).

6. (a) Explain in detail about back tracking.


(b) Explain the Graph coloring with an example.

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).

8. (a) Explain about non deterministic algorithm.


(b) Discuss NP-hard and NP-complete problems.

?????
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
?????

1. (a) What are the different techniques to represent an algorithm? Explain.


(b) Give an algorithm to solve the towers of Hanoi problem.

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.

4. (a) Write an algorithm for greedy knapsack.


(b) Prove that if P1 /W1 ≥ P2 /W2 ≥........ ≥ Pn /Wn , then greedy knapsack generates an
optimal solution to the given instance of knapsack problem.

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.

8. Explain about decision and optimization problems with examples.

?????
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
?????

1. Explain pseudo code conventions for writing an algorithm.

2. (a) Explain the set representation using trees.


(b) Develop the algorithms for the following.
i). UNION ii) FIND iii) WEIGHTED UNION.

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;

(a) Hamiltonian cycle problem for directed graphs is NP complete.


(b) Un weighted simple longest-path problem for directed graphs is NP-complete.

?????
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
?????

1. (a) Present an algorithm for finding Fibonacci sequence of a given number.


(b) Discuss about space complexity in detail.

2. (a) Explain the different set operations with suitable examples.


(b) Give brief description about the array representation of sets.

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.

4. (a) Write a detailed note on greedy knapsack.


(b) Give brief description on general method of greedy.

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.

8. Explain about decision and optimization problems with examples.

?????

Potrebbero piacerti anche