Professional Documents
Culture Documents
CADA Long Answers
CADA Long Answers
Unit 1
4.
5. Write the recursive algorithm for Tower of Hanoi problem.
Unit 2
1. Find Articulation point for the graph using the algorithm dfn()
2. Write the recursive algorithm for Max-Min problem and derive the time complexity of the algorithm
3. Define articulation point. Write an algorithm to find articulation point.
1. Binary Search
2. Merge Sort
3. Quick Sort
4. Convex hull problem
5. DFS
6. BFS
Unit 3
Unit 4
1. Find maximum profit when (w1,w2,w3,w4)=(10,15,6,9) and (P1,P2,P3,P4) =(2,5,8,1) for the Knapsack problem using
Dynamic programming.
2. Consider nn=5 and a1,a2,a3,a4,a5 identifiers , the values of p’s and q’s are given as p(1:5)=(0.15,0.10,0.05,0.10,0.20),
q(0:4)=(0.05,0.10,0.05,0.05,0.05,0.10). Construct the Optimal Binary Search Tree(OBST).
3. Reliability Design
Unit 5
5. Non-deterministic algorithms
6. NP hard,NP complete problems
CADA Unit 1 Important Answers Key
Questions
4.
5. Write the recursive algorithm for Tower of Hanoi problem.
Answer :
Asymptotic Notations
a)Big O Notation
Theory/Explanation
Example of Big O Notation
Example 1 :
Example 2
b)Big Omega Notation
Theory/Explanation
Example 1 :
Example 2 :
2.Define an algorithm? What are the different criteria that satisfy the algorithm?
Answer :
An algorithm is a finite sequence of unambiguous instructions for solving a particular problem. It must satisfy the
specific characteristics.
An Algorithm must satisfy the following criteria
1.
2.
3.
Answer :
a)
b)
b)
4.
Answer :
a)
b)
Answer :
Tower of Hanoi, is a mathematical puzzle which consists of three towers (pegs) and more than one rings is as
depicted
Rules
The mission is to move all the disks to some another tower without violating the sequence of arrangement. A
few rules to be followed for Tower of Hanoi are
1. Only one disk can be moved among the towers at any given time.
2. Only the "top" disk can be removed.
3. No large disk can sit over a small disk.
Recursive Algorithm for Tower of Hanoi
CADA Unit 2 Important Answers Key
Questions
1. Find Articulation point for the graph using the algorithm dfn()
2. Write the recursive algorithm for Max-Min problem and derive the time complexity of the algorithm
3. Define articulation point. Write an algorithm to find articulation point.
1.Find Articulation point for the graph using the algorithm dfn()
Answer :
Definition
Solution
2.Write the recursive algorithm for Max-Min problem and derive the time complexity of the algorithm
Answer :
Problem: Analyze the algorithm to find the maximum and minimum element from an array.
b)Deriving Time Complexity of the recursive algorithm fir Max Min problem
Answer :
Definition
Biconnected Components
Importance of Articulation Points
1. Binary Search
2. Merge Sort
3. Quick Sort
4. Convex hull problem
5. DFS
6. BFS
CADA Unit 3 Important Answers Key
Questions
Answer :
2.Find an optimal sequence to the n=5 jobs where profits (P1,P2,P3,P4,P5) = (20,15,10,5,1) and deadlines
(d1,d2,d3,d4,d5) =( 2,2,1,3,3).
Answer :
Reference ->https://www.youtube.com/watch?v=zPtI8q9gvX8
3.Write the Prim’s algorithms and apply it to find a minimum spanning tree for the following graph.
Answer :
NOTE :
Answer :
Algorithm
5.Construct a Huffman code for the following data
Answer :
Answer :
Algorithm
Reference ->https://www.youtube.com/watch?v=XB4MIexjvY0
7.Find an optimal solution to the Knapsack instance n=7 objects and the capacity of knapsack m=15. The profits and
weights of the objects are (P1,P2,P3, P4, P5, P6, P7)= (10, 5,15,7,6,18,3) (W1,W2,W3,W4,W5,W6,W7)=
(2,3,5,7,1,4,1).
Answer :
Reference ->https://www.youtube.com/watch?v=oTTzNMHM05I
8.Give the application of Greedy method. explain job sequencing problem with deadlines. Let n = 4 (p1,p2,p3,p4) =
(100,10,15,27) and (d1,d2,d3,d4) = (2,1,2,1). Solve it.
Answer :
a)Greedy Approach
Applications of Greedy Method
b)explain job sequencing problem with deadlines -> Check Question 1(above) of this unit
c)Numerical
CADA Unit 4 Important Answers Key
Questions
1. Find maximum profit when (w1,w2,w3,w4)=(10,15,6,9) and (P1,P2,P3,P4) =(2,5,8,1) for the Knapsack problem using
Dynamic programming.
2. Consider nn=5 and a1,a2,a3,a4,a5 identifiers , the values of p’s and q’s are given as p(1:5)=(0.15,0.10,0.05,0.10,0.20),
q(0:4)=(0.05,0.10,0.05,0.05,0.05,0.10). Construct the Optimal Binary Search Tree(OBST).
3. Reliability Design
1.Find maximum profit when (w1,w2,w3,w4)=(10,15,6,9) and (P1,P2,P3,P4) =(2,5,8,1) for the Knapsack problem
using Dynamic programming.
Answer :
2.Consider nn=5 and a1,a2,a3,a4,a5 identifiers , the values of p’s and q’s are given as p(1:5)=
(0.15,0.10,0.05,0.10,0.20), q(0:4)=(0.05,0.10,0.05,0.05,0.05,0.10). Construct the Optimal Binary Search Tree(OBST).
Answer :
Given
Formula
Solution
Reference ->
1. https://www.youtube.com/watch?v=JtdedZ8z3uk
2. https://www.youtube.com/watch?v=i4c4UgHjLys
3.Reliability Design
Answer :
Reference ->https://www.youtube.com/watch?v=uJOmqBwENB8
CADA Unit 5 Important Answers Key
Questions
5. Non-deterministic algorithms
6. NP hard,NP complete problems
Answer :
Answer :
1. Place
2. N Queens
3.Write a sum of sub sets algorithm and construct a space tree for given sum of sub sets problem. n=6, m=30 and
w[1:6] = {5, 10, 12, 13, 15, 18}.
Answer :
Reference ->https://www.youtube.com/watch?v=kyLxTdsT8ws
Answer :
5.Non-deterministic algorithms
Answer :
6.NP hard,NP complete problems
Answer :
ADD MORE INFO FROM ANY SOURCE