0% found this document useful (0 votes)
0 views

DAA Assignment questions (1)

The document outlines various algorithms and concepts related to graph theory, dynamic programming, and optimization problems, including transitive closure, Floyd's algorithm, multistage graphs, and the knapsack problem. It also discusses NP-hard and NP-complete classes, backtracking, and branch and bound techniques, providing examples and algorithms for each topic. Additionally, it includes specific problem instances for practical application of these algorithms.

Uploaded by

Priyanka G.N
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)
0 views

DAA Assignment questions (1)

The document outlines various algorithms and concepts related to graph theory, dynamic programming, and optimization problems, including transitive closure, Floyd's algorithm, multistage graphs, and the knapsack problem. It also discusses NP-hard and NP-complete classes, backtracking, and branch and bound techniques, providing examples and algorithms for each topic. Additionally, it includes specific problem instances for practical application of these algorithms.

Uploaded by

Priyanka G.N
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/ 5

Module 4:

1. Define transitive closure. Write Warshall's algorithm to compute transitive closure.


Mention its time efficiency.
2. Apply Floyd's algorithm to find all pair shortest path for the graph given below.

3. Explain the concept of negative weight cycle in a directed graph.


4. Explain multistage graph with example. Write multistage graph algorithm to forward
approach.
5. For the given graph, obtain optimal tour cost using dynamic programming.

6. Explain the advantages of optimal binary search tree.


7. Explain the general procedure to solve a multistage graph problem using backward
approach with an example.
8. Construct an optimal binary search tree for the following.(repeat)
Items: A B C D
Probabilities: 0.1 0.2 0.4 0.3

9. Design floyd’s algorithm to find shortest distance from all nodes to all other nodes.
10. Apply Warshell’s algorithm to compute transitive closure for the graph given below.
(repeat)

11. Explain multistage graph with an example.write backward multistage graph


algorithm.(repeat)
12. Apply flody’s algorithm to solve all pairs shortest path for the given graph.

13. Design an algorithm to find all pairs of shortest paths given a weighted connected path
using dynamic programming technique. Apply the same algorithm to compute all pairs of
shortest path for the following weighted connected graph.

14. Design an algorithm to solve knapsack problem using dynamic programming. Apply the
same to solve the following knapsack problem where W = 50.
Items weight Value
1 10 60
2 20 100
3 30 120

15. Define transitive closure of a directed graph. Write Warshall's algorithm to find transitive
closure. Apply the same find the transitive closure of the digraph given below.

16. Define a multistage graph. Give an example. Explain the technique of finding the
minimum cost path in a multistage graph.
17. Define transitive closure of a directed graph. Find the transitive closure matrix for the
graph whose adjacency matrix is given below.

1 0 0 1 0
0 1 0 0 0
[0 0 0 1 1]
1 0 0 0 0
0 1 0 0 1

18. Apply dynamic programming method to solve the following instance of the knapsack
problem knapsack capacity w=10.
Items weight value
1 6 42
2 4 15
3 2 20
4 5 30
19.Apply flody’s algorithm to the graph given below .show that all necessary steps derive its
time efficiency.

MODULE 5
1. Solve the given instance of sum of subset problem s={3,5,6,7} and d=15. Construct a
state space tree.
2. With the help of a state space tree. Solve the Travelling Salesman Problem for the
following graph using branch and bound concept.

3. Write the difference between backtracking and branch and bound.


4. Explain the class of NP- Hard and NP-Complete.
5. Explain LC branch and bound concept for knapsack problem.
6. Solve assignment problem for the following job assignment and obtain optimal solution.
(REPEAT)

JOB1 JOB2 JOB3 JOB4


A 9 2 7 8
B 6 4 3 7
C 5 8 1 8
D 7 6 9 4
7. What is Hamiltonian circuit problem? What is the procedure to find Hamiltonian circuit
of a graph.
8. Explain the classes of NP-Hard and NP-complete.
9. Apply the branch and bound algorithm to solve the travelling salesman problem for the

graph below.
10. Apply best first Branch and bound algorithm to solve the instance of the given job
assignment problem.(repeat)
JOB1 JOB2 JOB3 JOB4
A 9 2 7 8
B 6 4 3 7
C 5 8 1 8
D 7 6 9 4
11. Apply Back Tracking method to solve sum of subset problem for the instance d = 30 S
={5, 10, 12, 13, 15, 18} Give all possible solution with state space for construction.
12. Apply Branch and bound method for knapsack problem. C=10(repeat)
Items 1 2 3 4
Weights 4 7 5 3
values $40 $42 $25 $12
13. Write short note on the following:
i. P
ii. NP
iii. NP-complete
iv. NP-hard class problems
14. What isbacktracking? List out two advantages of backtracking strategy. Considering 4-
Queens problem,provide two possible solutions to this problem using backtracking
technique.
15. Find the Hamiltonian circuit for the following graph using backtracking technique.

16. Explain the following concepts:


i. Tracking and intractable problems
ii. Pproblems
iii. Non deterministic algorithm
iv. NP problem
v. NP complete problems
17. Construct state space tree for solving 4 Queen”s problem using backtracking.
18. Apply backtracking technique to solve the below instance of the sum of subset problem
S={1,3,4,6},d=7.
19. Discuss graph coloring problem .find different solutions for 4 nodes and all possible 3
coloring problems.
20. Define Hamilton cycle.check wheather the Hamilton cycle exists.

You might also like