Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

CADA Important Questions

Unit 1

1. Explain the Asymptotic Notations O and Ώ with suitable examples


2. Define an algorithm? What are the different criteria that satisfy the algorithm?
3. Show the following equalities are correct.

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.

Extra topics to refer

1. Binary Search
2. Merge Sort
3. Quick Sort
4. Convex hull problem
5. DFS
6. BFS

Unit 3

1. State the Job sequencing deadline problem.


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).
3. Write the Prim’s algorithms and apply it to find a minimum spanning tree for the following graph.
4. Explain Kruskal’s algorithm
5. Construct a Huffman code for the following data

6. Write Dijkstra’s algorithm for single source shortest path


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

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

1. Write a control abstraction of LC – Branch & Bound technique.


2. Write the required algorithms to find the solution of n-queen problem.
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}.
4. Solve given Travelling Sales Men Problem.

5. Non-deterministic algorithms
6. NP hard,NP complete problems
CADA Unit 1 Important Answers Key

Questions

1. Explain the Asymptotic Notations O and Ώ with suitable examples


2. Define an algorithm? What are the different criteria that satisfy the algorithm?
3. Show the following equalities are correct.

4.
5. Write the recursive algorithm for Tower of Hanoi problem.

1.Explain the Asymptotic Notations O and Ώ with suitable examples

Answer : 

Asymptotic Notations

Types of Asymptotic notations

a)Big O Notation

Theory/Explanation
Example of Big O Notation

Example 1 :

Example 2
b)Big Omega Notation

Theory/Explanation

Example of Big Omega Notation

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

3.Show the following equalities are correct.

1.

2.

3.

Answer : 

a)
b)

b)

4.

Answer :

a)
b)

5.Write the recursive algorithm for Tower of Hanoi problem.

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.

a)Recursive Algorithm for Max-Min using Divide and Conquer Method

b)Deriving Time Complexity of the recursive algorithm fir Max Min problem

3.Define articulation point. Write an algorithm to find articulation point.

Answer : 

Definition

Biconnected Components
Importance of Articulation Points

Algorithm to find Articulation Point

For safe side also refer below topics

Extra topics to refer

1. Binary Search
2. Merge Sort
3. Quick Sort
4. Convex hull problem
5. DFS
6. BFS
CADA Unit 3 Important Answers Key

Questions

1. State the Job sequencing deadline problem.


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).
3. Write the Prim’s algorithms and apply it to find a minimum spanning tree for the following graph.

4. Explain Kruskal’s algorithm


5. Construct a Huffman code for the following data

6. Write Dijkstra’s algorithm for single source shortest path


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

1.State the Job sequencing deadline problem. (5 marks)

Answer : 

Job sequencing with deadline problem

for extra matter use below reference link if needed


https://www.youtube.com/watch?v=zPtI8q9gvX8

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 : 

a) Prim's Minimal Spanning Tree Algorithm


Algorithm

b)Solution to the problem

NOTE : 

1. Prim's cannot be applied for directed graph.


2. There is a mistake in the question.
3. So  the arrows are removed and the question is solved below
Reference ->https://www.youtube.com/watch?v=4ZlRH0eK-qQ

4.Explain Kruskal’s algorithm

Answer : 

Kruskal's Minimal Spanning Tree Algorithm

Algorithm
5.Construct a Huffman code for the following data

Answer :
 

6.Write Dijkstra’s algorithm for single source shortest path

Answer : 

Single source shortest path(Dijkstra’s algorithm)

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 : 

In question the size of knapsack is not given so it is not possible to solve.


For the method of how to solve this problem if knapsack size given refer to below link
Reference -> https://www.youtube.com/watch?v=nLmhmB6NzcM
While writing answer write table and below it write how we got each value using the formula

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

1. Write a control abstraction of LC – Branch & Bound technique.


2. Write the required algorithms to find the solution of n-queen problem.
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}.
4. Solve given Travelling Sales Men Problem.

5. Non-deterministic algorithms
6. NP hard,NP complete problems

1.Write a control abstraction of LC – Branch & Bound technique.

Answer : 

DID NOT GET ANSWER

2.Write the required algorithms to find the solution of n-queen problem.

Answer :

N Queens Problem and Solution


Algorithm

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

4.Solve given Travelling Sales Men Problem.

Answer :

Solve this problem in same way as in the below video


Reference ->https://www.youtube.com/watch?v=1FEP_sNb62k

5.Non-deterministic algorithms

Answer : 
6.NP hard,NP complete problems

Answer : 
ADD MORE INFO FROM ANY SOURCE

You might also like