Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
17857166 r05220502 Design and Analysis of Algorithms

17857166 r05220502 Design and Analysis of Algorithms

Ratings: (0)|Views: 263 |Likes:
Published by sai_2990
DAA previous papers...
DAA previous papers...

More info:

Published by: sai_2990 on Aug 18, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/24/2010

pdf

text

original

 
Code No: R05220502
Set No. 1
II B.Tech Supplimentary Examinations, Aug/Sep 2008DESIGN AND ANALYSIS OF ALGORITHMS(Computer Science & Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) Show that f(n)+g(n)=O (
n
2
) where
(
n
) = 3
n
2
n
+ 4 and g(n)=nlogn+5(b) Explain how time complexity of an algorithm is computed. [8+8]2. (a) Write and explain the control abstraction for Divide and conquer.(b) Suggest renements to mergesort to make it in-place. [8+8]3. (a) Write Greedy algorithm to generate shortest path.(b) If 
p
1
/w
1
p
2
/w
2
.........
p
n
/w
n
prove that knapsack generates an optimalsolution to the given instance of the knapsack problem. [8+8]4. (a) Solve the following 0/1 Knapsack problem using dynamic programmingm=6, n=3, (
w
1
,w
2
,w
3
)=(2,3,3), (
 p
1
,p
2
,p
3
)=(1,2,4)(b) Write an algorithm of all pairs shortest path problem. [8+8]5. (a) A directed graph G=(V,E) is singly connected if 
u
v
implies that there isatmost one simple path from u to v for all vertices u, v
V. Give an efficientalgorithm to determine whether or not a directed graph is singly connected.(b) Dierentiate between BFS and DFS. [10+6]6. (a) Draw and explain the portion of the tree for 4-queens problem that is generatedduring backtracking.(b) Explain the applications of Backtracking. [10+6]7. (a) Write an algorithm of LCBB to find the minimum cost answer node.(b) Describe explicit constraints and implicit constraints. [10+6]8. (a) Explain the satisfiability problem and write the algorithm for the same.(b) Dierentiate between NP-complete and NP-Hard. [10+6]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1
 
Code No: R05220502
Set No. 2
II B.Tech Supplimentary Examinations, Aug/Sep 2008DESIGN AND ANALYSIS OF ALGORITHMS(Computer Science & Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) Define time complexity. Describe different notations used to represent therecomplexities.(b) Derive the function f(n)= 12
n
2
+6n is 0(
n
3
) and w(n). [10+6]2. (a) Write and explain the control abstraction for Divide and conquer.(b) Suggest renements to mergesort to make it in-place. [8+8]3. Show that prim’s algorithm can like Kruskal’s algorithm be implemented usingheaps. Show that it then takes a time in
θ
(alogn). [16]4. (a) Solve the all-pairs shortest path problem for the digraph with the weightmatrix
0 2
1 86 0 3 2
0 4
2 0 33
0
(b) What is Travelling sales person problem and what are its applications. [10+6]5. (a) Explain the BFS algorithm with an example.(b) The Preorder and Postorder sequences of a binary tree do not uniquely definethe binary tree. Justify the answer. [8+8]6. (a) Let
w
=
{
5
,
7
,
10
,
12
,
15
,
18
,
20
}
and m=35. Find all possible subsets of w thatsum to m. Draw the portion of the state space tree that is generated.(b) Compare and Contrast Brute force approach and Backtracking. [10+6]7. (a) Explain the method of reduction to solve TSP problem using Branch andBound.(b) Explain the principles of FIFO Branch and Bound. [8+8]8. (a) Explain the Clique problem and write the algorithm for the same.(b) Dierentiate between NP-complete and NP-Hard. [10+6]
⋆ ⋆ ⋆ ⋆ ⋆
1 of 1
 
Code No: R05220502
Set No. 3
II B.Tech Supplimentary Examinations, Aug/Sep 2008DESIGN AND ANALYSIS OF ALGORITHMS(Computer Science & Engineering)Time: 3 hours Max Marks: 80Answer any FIVE QuestionsAll Questions carry equal marks
⋆ ⋆ ⋆ ⋆ ⋆
1. (a) Write the non recursive algorithm for finding the Fibonacci sequence andderive its time complexity.(b) Show that
n
3
logn
is
w
(
n
3
). [10+6]2. (a) Write and explain the control abstraction for Divide and conquer.(b) Suggest renements to mergesort to make it in-place. [8+8]3. (a) What is spanning tree? What is the importance of finding minimal spanningtree.(b) Find the shortest path for the given graph ( Figure 3b) by using single sourceshortest path.[6+10]Figure 3b4. Write a pseudocode of the dynamic programming algorithm for solving OptimalBinary search tree and determine its time and space eciencies. [16]5. (a) Find a necessary and sufficient condition for the root of a depth first searchfor a connected graph to be an articulation point. Prove it.(b) Show that the inorder and postorder sequences of a binary tree uniquely definethe binary tree. [8+8]6. (a) Let
w
=
{
15
,
7
,
20
,
5
,
18
,
10
,
12
}
and m=35. Find all possible subsets of w thatsum to m. Draw the portion of the state space tree that is generated.(b) Write the control abstraction of backtracking. [10+6]7. (a) Describe problem state, solution state and answer state with an example.(b) Explain the general method of Branch and Bound. [8+8]8. (a) Explain the satisfiability problem and write the algorithm for the same.1 of 2

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
srinivas4246 liked this
Sridhar Sri liked this
Sridhar Sri liked this
Sridhar Sri liked this
varshirams liked this
hanif1 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->