BHARAT INSTITUTE OF ENGINEERING & TECHNOLOGY

B.Tech II year II SEM – MID-II EXAMINATION
BRANCH: II CSE A
SUBJECT: Design and analysis of Algorithms
Date: .4.2015 FN
Answer any two
Max. Marks: 10 Set-1
(a)Explain the P, NP, NP-Hard and NP- complete classes with suitable examples.
(b)Draw the portion of state space tree generated by LCBB for the knapsack
instances: n = 4; (P1; P2;P3 ; P4) = (10; 10; 12; 18); (w1w2;w3;w4) = (2;4; 6; 9 )
and M = 15
(c)I) Let w = {6; 15; 20; 10; 11; 18; 29} and m=35. Find all possible subsets of w
that sum to m. Draw the portion of the state space tree that is generated. (II)
Differentiate between Live node and E-node.
(d)Construct an optimal binary search tree for the following data: n=4,
(a1,a2,a3,a4)= ( do, if, int, while), p(1:4)= ( 3,3,1,1) and q(0:4)= ( 2,3,1,1,1).
(e)Find an optimal solution to the 0/1 knapsack instance, given n=3, weights and
profits as (w1,w2,w3)=(2,3,4) , p1,p2,p3)= (1,2,5) and knapsack capacity =6
generate the sets Si using dynamic programming.

BHARAT INSTITUTE OF ENGINEERING & TECHNOLOGY
B.Tech II year II SEM – MID-II EXAMINATION
BRANCH: II CSE A
SUBJECT: Design and analysis of Algorithms
Date: .4.2015 FN
Answer any two
Max. Marks: 10
Set-2
(a)Explain Branch and bound.
(b)Draw the portion of state space tree generated by LCBB for the knapsack
instances: n = 4; (P1; P2;P3 ; P4) = (10; 10; 12; 18); (w1w2;w3;w4) = (2;4; 6; 9 )
and M = 15
(c)I) Let w = {6; 15; 20; 10; 11; 18; 29} and m=35. Find all possible subsets of w
that sum to m. Draw the portion of the state space tree that is generated. (II)
Differentiate between Live node and E-node.
(d)Construct an optimal binary search tree for the following data: n=4,
(a1,a2,a3,a4)= ( do, if, int, while), p(1:4)= ( 3,3,1,1) and q(0:4)= ( 2,3,1,1,1).
(e)Find an optimal solution to the 0/1 knapsack instance, given n=3, weights and
profits as (w1,w2,w3)=(2,3,4) , p1,p2,p3)= (1,2,5) and knapsack capacity =6
generate the sets Si using dynamic programming.

w3)=(2.3. int. p1. 9 ) and M = 15 (c)I) Let w = {6.w2. if.1).3.5) and knapsack capacity =6 generate the sets Si using dynamic programming. BHARAT INSTITUTE OF ENGINEERING & TECHNOLOGY B.1. 18.p2.a2. 10. .p3)= (1. 6. (g)Draw the portion of state space tree generated by LCBB for the knapsack instances: n = 4.1. 29} and m=35.2015 FN Answer any two Max.3. 12.a4)= ( do. 10.BHARAT INSTITUTE OF ENGINEERING & TECHNOLOGY B. 20.a2. (a1. 15. (a1. P4) = (10. if.2. 9 ) and M = 15 (h)I) Let w = {6. (e)Explain N-Queens Problem. p(1:4)= ( 3.1. 11. (II) Differentiate between Live node and E-node.3.w4) = (2. (i)Find an optimal solution to the 0/1 knapsack instance. weights and profits as (w1. (w1w2.a4)= ( do. (P1. given n=3.1.2.w2.4. 12. 18. Find all possible subsets of w that sum to m. P2. weights and profits as (w1. 18). while). (II) Differentiate between Live node and E-node.1) and q(0:4)= ( 2. P4) = (10.2015 FN Answer any two Max.5) and knapsack capacity =6 generate the sets Si using dynamic programming. Marks: 10 Set-3 (a)Construct an optimal binary search tree for the following data: n=4.4) . 18).p3)= (1. (d)Find an optimal solution to the 0/1 knapsack instance. Draw the portion of the state space tree that is generated.1) and q(0:4)= ( 2.a3.4. 29} and m=35.P3 . 10. Marks: 10 Set-4 (f)Construct an optimal binary search tree for the following data: n=4.1).a3.w3. while). (w1w2. Draw the portion of the state space tree that is generated.4. 10.P3 . p1. (j)E0. int. 15.Tech II year II SEM – MID-II EXAMINATION BRANCH: II CSE A SUBJECT: Design and analysis of Algorithms Date: .1. 6. P2.w4) = (2.w3)=(2.p2. p(1:4)= ( 3. 11.3. Find all possible subsets of w that sum to m. 20.3.0xplain N-Queens Problem. (b)Draw the portion of state space tree generated by LCBB for the knapsack instances: n = 4.Tech II year II SEM – MID-II EXAMINATION BRANCH: II CSE A SUBJECT: Design and analysis of Algorithms Date: .1.4.w3.4) . given n=3. (P1.

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.