0% found this document useful (0 votes)
10 views4 pages

Daa Important Questions

The document contains a series of important and objective questions related to algorithms in data structures and analysis, including Floyd Warshall's algorithm, job sequencing, Kruskal's and Prim's algorithms, the 0/1 knapsack problem, and the traveling salesperson problem. It also discusses complexity classes such as P, NP, NP-Hard, and NP-Complete, along with specific algorithmic techniques like branch and bound. Additionally, it includes definitions and explanations of key concepts in algorithm design and analysis.

Uploaded by

prabhasstylo2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views4 pages

Daa Important Questions

The document contains a series of important and objective questions related to algorithms in data structures and analysis, including Floyd Warshall's algorithm, job sequencing, Kruskal's and Prim's algorithms, the 0/1 knapsack problem, and the traveling salesperson problem. It also discusses complexity classes such as P, NP, NP-Hard, and NP-Complete, along with specific algorithmic techniques like branch and bound. Additionally, it includes definitions and explanations of key concepts in algorithm design and analysis.

Uploaded by

prabhasstylo2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DAA IMPORTANT QUESTIONS

1.Write Floyd Warshal’s algorithm and find all pairs shortest paths for the following
graph.

2. Write the Greedy algorithm for Job sequencing with deadlines problem and solve,
Given n=5 jobs with profits (P1,P2,P3,P4,P5)=(1,5,20,15,10) and deadlines
(d1,d2,d3,d4,d5)=(1,2,4,1,3).

3.Write Kruskal’s algorithm and find the minimum cost spanning tree for the
following graph.

4.Solve the following 0/1 knapsack problem using LC branch and bounding
N=3 m=6 (P1P2P3)=(1,2,5) (W1W2W3)=(2,3,4)?

5.Solve the single source shortest path problem ? Explain its algorithm?

6.Write the Greedy algorithm for Knapsack problem and solve the following instance.
Given n=3 objects with profits (P1,P2,P3)=(25,24,15) and weights
(w1,w2,w3)=(18,15,10) and M=20
7.Explain about P, NP, NP-Hard, and NP-Complete classes with examples.
8.Solve the following following travelling sales person problem using Dynamic
programming ?

9.Write Prim’s algorithm and find the minimum cost spanning tree for the following
graph.

10. Write the Greedy algorithm for Job sequencing with deadlines problem and solve,
Given n=5 jobs with profits (P1,P2,P3,P4,P5)=(20,15,10,5,1) and deadlines
(d1d2,d3,d4,d5)=(2,2,1,3,3).

11. Draw the state space tree generated by LCBB for the 0/1 Knapsack instance n=4
objects, Profits (P1,P2,P3,P4)=(10,10,12,18) and Weights (W1,W2,W3,W4)=(2,4,6,9)
and M=15.

12.Solve the following travelling sales person problem using Dynamic


programming ?

13.Write Dijkstra’s algorithm and find the single source shortest paths for the
following graph.
14.Write the Greedy algorithm for Knapsack problem and solve the following
instance. Given n=7 objects with profits (P1,P2,P3,P4,P5,P6,P7)=(10,5,15,7,6,18,3)
and weights (w1,w2,w3,w4,w5,w6,w7)=(2,3,5,7,1,4,1) and M=15

15.Explain about P, NP, NP-Hard, NP-Complete classes with examples.

16.Solve the following OBST problem for n=4 and (a1 a2 a3 a4)=(do,if,int,while)
p(1:4)=(3,3,1,1)and q(1:5)=(2,3,1,1,1)?

DAA OBJECTIVE QUESTIONS

1.If M=15, n=4, (P1,P2,P3,P4)=(10,10,12,18) and (W1,W2,W3,W4)=(2,4,6,9) of


0/1 knapsack problem then the maximum profit is [ ]
A) 32 B) 34 C) 36 D) 38

2. The FIFO search coupled with bounding functions is called as [ ]


A) FIFOBB B) LCBB C) Cumulative reduction function D) Column reduction

3. The following is an example of NP-Hard problem [ ]


A) Binary search B) Merge sort C) Quick sort D) Travelling sales person

4. Primary objective of OBST is [ ]


A) Generating left and right skew B) Maximum cost search
C) Minimum cost search D) Generating balanced tree

5. In branch and bound a_ is a generated node that is not to be expanded or


explored any further [ ]
A) Dead node B) Live node C) E-node D) root node

6. Data structures that are used in Branch and Bound are _____ [ ]
A) either stack or queue B) neither stack nor queue C) linked list D) trees

7. Branch-and -bound technique is applicable for only [ ]


A) minimization problems B) maximization problems
C) reliability design problem D) BFS algorithm

8. ______ problems are problems that cannot be solved by a polynomial-time


algorithm [ ]
A) Easy B) Tractable C) Simple D) Intractable
9. How many internal and external nodes will be there in a binary search tree
representing n identifiers. [ ]
A) n, n B) n+1, n+1 C) n, n+1 D) none

10. Cook’s theorem states that the Satisfiability problem is ______ [ ]


A) P B) NP C) NP-Complete D) NP-Hard

1.Define purging (dominance) rule _____________________________________


__________________________________________________________________
2. For any job i the profit Pi is earned iff the job is completed by its ___________

3. In branch and bound method the three common search strategies are
____________ , __________________ and ____________.

4. In _________________ algorithms, the result of every operation is uniquely


defined.

5. The _____________ of a device is the probability that the device will function
properly

6. _____________ and________________ algorithms are used to find minimum


cost spanning tree

7. _____________ algorithm is used to solve Single source shortest path problem.

8.Time complexity of (Floyds) all pairs shortest path algorithm is _____________

9.NP-complete,stands,for ____________________________________________

10.We start at a particular node in the graph, visiting all nodes exactly once and
come back to initial node with minimum cost is known as
______________________________ problem.

You might also like