Sei sulla pagina 1di 4

JSPMs Rajarshi Shahu College of Engineering

Tathawde, Pune 33

Department of Information Technology 2011-12 (Sem-II)


End Term Test Marking Scheme Class: T.E Subject: DAA Time: 9.00 am to 10.30 am
Que1)a) State and explain graph coloring problem. Solve the same using backtracking algorithm. Ans.

Date: 16 /04/12 Max Marks: 50

12 02 01 01 06 02 04 01 02 OR

Explaination of Backtracking technique: Define Graph coloring problem Figure Algorithm for graph coloring Explaination of algorithm.

b) Draw the state space tree for 4-queens problem using backtracking technique. Ans.

Define 4-queens problem Explicit and implicit constraints State space tree Final chess board configuration

Que2)a) Solve the following instance of Sum of subset problem using suitable algorithm design technique. n=7, (w1,w2,w3,w4, w5, w6)=(5,7,10,12,15,18,20) m=35. Show the solutions using variable and fixed size tuple formulation. Ans: Explaination of suitable technique.(Backtracking technique/ Branch and bound ) 01
Define Sum of subset problem Figure state space tree variable and fixed size tuple formulation trees, Answer nodes, solution nodes

10

01 01 06 01

b) Explain the following along with the examples: 1. Breadth first search 2. Depth first search 3. D-search Ans. For each of the above, One mark for each definition and example.

06

Que3)Solve the following instance of job sequencing with deadlines problem using LC and FIFO branch and bound solution. n=4, (p1, d1, t1)=(5, 1, 1) (p2, d2, t2)= (10, 3, 2) (p3, d3, t3)=(6, 2, 1) (p4, d4, t4)=(3, 1, 1) Ans. Define Branch and bound

16 01 02 02 01 05 05 OR

Define LC branch and bound technique Define FIFO Branch and bound technique State 0/1 knapsack problem , Solution using LC BB technique. Solution using FIFOBB technique

Que4) Solve the following Travelling salesperson problem using branch and bound technique. For n=5(Vertices Starting vertex=1) Cost matrix= 0 15 03 19 16 Ans. Define Branch and bound

20 0 05 06 04

30 16 0 18 07

10 04 02 0 16

11 02 04 03 0 01 02 02 01 01

Define LC branch and bound technique Define FIFO Branch and bound technique State Travelling salesperson problem , Steps to solve travelling sales personal problem Solution using LC BB technique. Reduced cost matrix Table for each node 01*09=09

09

Que5) Write short note on the following (any three)

18

a) Deterministic v/s Non deterministic algorithm Ans. Definition of both deterministic algorithm and nondeterministic algorithm Non deterministic algorithm functions: Choice(), failure(), Success(). Eg.Nondeterministic search algorithm ( deterministic and nondeterministic time complexity of search algorithm) b) The classes of NP-hard and NP-Complete Ans.

02 03 01

Definition of NP-hard and NP-complete problem Examples Fig. Showing relationship among P, NP, NP-hard, NP- complete relationship

02 02 02

c) Satisfiability problem Ans.


Problem definition Algorithm for Non deterministic satisfiability Explanation 02

02 02

d) Vertex Cover Problem Ans.


Problem definition Define Vertex cover optimization and decision problem Example fig. Proof of CDP reduces to NCDP OR

01 01 01 03

Que6) a) Explain the nondeterministic algorithm to sort n elements and for searching of an element from given array. Ans.

10 01 02 02 03

Define nondeterministic algorithm Explanation of Choice(), failure(), Success() Non-deterministic Algorithm for searching Non-deterministic Algorithm for sorting Deterministic and non-deterministic time complexities for above problems 02

b) Explain how to prove that a problem is NP-hard. Show that CDP is NP-Hard. Ans.

08

Steps to prove that a problem is NP-Hard Proof of CDP is reducable to satisfiability problem

04 04

Potrebbero piacerti anche