DAA Marking Scheme

download DAA Marking Scheme

of 4

Transcript of DAA Marking Scheme

  • 8/2/2019 DAA Marking Scheme

    1/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 Date: 16 /04/12

    Subject: DAA Max Marks: 50

    Time: 9.00 am to 10.30 am

    Que1)a) State and explain graph coloring problem. Solve the same using backtracking

    algorithm. 12

    Ans.

    Explaination of Backtracking technique: 02

    Define Graph coloring problem 01

    Figure 01

    Algorithm for graph coloring 06

    Explaination of algorithm. 02

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

    Ans.

    Define 4-queens problem

    Explicit and implicit constraints 01

    State space tree 02

    Final chess board configuration

    OR

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

    Ans:

    Explaination of suitable technique.(Backtracking technique/ Branch and bound ) 01

    Define Sum of subset problem 01

    Figure state space tree 01

    variable and fixed size tuple formulation trees, 06

    Answer nodes, solution nodes 01

  • 8/2/2019 DAA Marking Scheme

    2/4

    b) Explain the following along with the examples: 06

    1. Breadth first search

    2. Depth first search

    3. D-search

    Ans. For each of the above, One mark for each definition and example.

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

    Ans.

    Define Branch and bound 01

    Define LC branch and bound technique 02

    Define FIFO Branch and bound technique 02

    State 0/1 knapsack problem , 01

    Solution using LC BB technique. 05

    Solution using FIFOBB technique 05

    OR

    Que4) Solve the following Travelling salesperson problem using branch and bound

    technique. For n=5(Vertices Starting vertex=1)

    Cost matrix= 0 20 30 10 11

    15 0 16 04 02

    03 05 0 02 04

    19 06 18 0 03

    16 04 07 16 0

    Ans.

    Define Branch and bound 01

    Define LC branch and bound technique 02

    Define FIFO Branch and bound technique 02

    State Travelling salesperson problem ,

    Steps to solve travelling sales personal problem 01

    Solution using LC BB technique.

    Reduced cost matrix 01

    Table for each node 01*09=09 09

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

  • 8/2/2019 DAA Marking Scheme

    3/4

    a) Deterministic v/s Non deterministic algorithm

    Ans.

    Definition of both deterministic algorithm and nondeterministic algorithm 02

    Non deterministic algorithm functions: Choice(), failure(), Success(). 03

    Eg.Nondeterministic search algorithm ( deterministic and nondeterministic

    time complexity of search algorithm) 01

    b) The classes of NP-hard and NP-Complete

    Ans.

    Definition of NP-hard and NP-complete problem 02

    Examples 02

    Fig. Showing relationship among P, NP, NP-hard, NP- complete relationship

    02

    c) Satisfiability problem

    Ans.

    Problem definition 02

    Algorithm for Non deterministic satisfiability 02

    Explanation 02

    d) Vertex Cover Problem

    Ans.

    Problem definition 01

    Define Vertex cover optimization and decision problem 01

    Example fig. 01

    Proof of CDP reduces to NCDP 03

    OR

    Que6) a) Explain the nondeterministic algorithm to sort n elements and for searching

    of an element from given array. 10Ans.

    Define nondeterministic algorithm 01

    Explanation of Choice(), failure(), Success() 02

    Non-deterministic Algorithm for searching 02

    Non-deterministic Algorithm for sorting 03

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

    Ans.

  • 8/2/2019 DAA Marking Scheme

    4/4

    Steps to prove that a problem is NP-Hard 04

    Proof of CDP is reducable to satisfiability problem 04