DAA QUESTIONS recourse 2023
DAA QUESTIONS recourse 2023
DAA QUESTIONS recourse 2023
Enrolment No:
Instructions:
Q2
i) How can we solve the single-source-shortest-path problem with the help
of a greedy algorithm? Write the algorithm and analyze its time 6+4= CO3 &
complexity.
10 L3
ii) In context of the above algorithm, explain all the characteristics of a
greedy algorithm.
Q3
With a suitable example explain how to find the Hamiltonian-cycle from
a given graph with the help of a backtracking algorithm. Draw the state-
space tree and mark the solution path for the example problem. CO2 &
10
[Hint: Define a Hamiltonian cycle of a graph with example. Then explain the L3
backtracking approach clearly stating what are the constraints to be checked
during traversal of the graph. Mark the dead-ends and non-promising nodes etc.]
Q4 CO3 &
Let X be a NP-Complete problem. “If we find a polynomial-time algorithm
10
to solve X, then it would suggest that P=NP.” - Justify the statement. L4