0% found this document useful (0 votes)
157 views3 pages

Important Questions

This document provides important questions from 6 units of a Data Structures and Algorithms course. The questions cover topics like time and space complexity analysis, asymptotic notations, sorting algorithms like merge sort and quicksort, greedy algorithms applied to knapsack problems, minimum spanning trees, dynamic programming approaches to knapsack, shortest paths, optimal binary search trees and more. The document also includes questions on backtracking applied to problems like n-queens and graph coloring, as well as branch and bound techniques.

Uploaded by

Ashenafi Abera
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)
157 views3 pages

Important Questions

This document provides important questions from 6 units of a Data Structures and Algorithms course. The questions cover topics like time and space complexity analysis, asymptotic notations, sorting algorithms like merge sort and quicksort, greedy algorithms applied to knapsack problems, minimum spanning trees, dynamic programming approaches to knapsack, shortest paths, optimal binary search trees and more. The document also includes questions on backtracking applied to problems like n-queens and graph coloring, as well as branch and bound techniques.

Uploaded by

Ashenafi Abera
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/ 3

DAA ASSIGNMENT & UNIT WISE IMPORTANT QUESTIONS

UNIT-I

1) a) Define and explain the terms “Time complexity” and “Space complexity” of algorithms.
b) Explain about Amortized Analysis.

2) Explain in brief about Asymptotic Notations with examples

3) (a) Explain about Amortized analysis


(b) Prove 3n3+ 2n2= O(n)3 ; 3n !=O(2n )
4) Describe about Order of Growth with time function.

5) How the performance can be analyzed ? Explain with the example.

UNIT-II

1) a) Write and explain the control abstraction for Divide and Conquer.
b) Briefly explain Merge Sort Algorithm with suitable example and derive its Time Complexity.
2) Show how the Quick sorts the following sequences of keys in ascending order
22, 55, 33, 11, 99, 77, 55, 66, 54, 21, 33)

3) Write and explain Divide and conquer algorithm for computing the no of levels in a binary
tree.

4) Apply Quick sort to sort the list. E, X, A, M, P, L, E, in alphabetical order . Draw the tree of
recursive calls made.
UNIT-III

1) a) Define Greedy Method. Explain about Knapsack Problem with an example.


b) Consider the following instance of Knapsack problem N=3, M=20, (p1,p2,p3)=(25,24,15),
(w1,w2,w3)=(18,15,10). Calculate Maximum profit, Minimum weight and Maximum profit per
unit weight.
2) (a) Write an algorithm of prim’s minimum spanning tree.
(b) Find the optimal solution of the Knapsack instance n= 7, M=15, (p1,p2,….p7) =
(10,5,15,7,6,18,3) and (w1,w2,…..w7)=(2,3,5,7,1,4,1)
3) (a) Write a pseudo code of a simpler version of Dijkstra’s algorithm that finds only the
distances from a given vertex to all other vertices of a graph represented by its weight matrix.
(b) Write the procedure for GREEDY KNAPSACK (P, W, M, X, N) where P and W contains
profits and weights, M is Knapsack size and X is the solution vector.
4) (a) What do you mean by minimum spanning tree? Write and explain algorithm for minimal
spanning tree with an example.
(b) Differentiate between Divide and Conquer algorithm & greedy Algorithm

5) (a) If objects are selected in order of increasing vi/wi then prove that the algorithm
knapsack finds an optimal solution.
(b) Write an algorithm for Single source shortest path. Explain with an example
UNIT-IV

1) a) Solve the following 0/1 Knapsack problem using dynamic programming P= (11, 21, 31,
33), W= (2, 11, 22, 15), C=40, n=4.
b) Consider three stages of a system with r1=0.3, r2=0.5, r3=0.2 and c1=30, c2=20, c3=30
Where the total cost of the system is C=80 and u1=2, u2=3, u3=2 find the reliability design.
2) (a) Define merging and purging rules in o/1 Knapsack problem.
(b) Write an algorithm for all pairs shortest path. Explain with an example

3) Consider 4 elements a1 < a2 < a3 < a4 with q0=0.25 , q1=3/16 , q2=q3=q4=1/16. p1=1/4 ,
p2=1/8 p3=p4=1/16.
(i) Construct the optimal binary search tree as a minimal cost tree.
(ii) Construct the table of values Wij, Cij, Vij computed by the algorithm to compute the
roots of optimal subtrees

4) (a) Dynamic Programming vs. Divide and Conquer


(b) Dynamic Programming vs. Greedy method

5) (a) Find the shortest tour of TSP for the following graph using dynamic Programming

(b) What is the best method between greedy method and dynamic programming to solve single
source shortest path problem? Justify your answer with example.

UNIT-V

1) a) Briefly explain n-queen problem using Backtracking. Explain its applications.


b) Briefly explain Hamiltonian cycles using backtracking.

2) What is Graph coloring? Write an algorithm for it and explain with an example.

3) Write an algorithm for how Eight Queen’s problem can be solved using back tracking and
explain with an example
4) Consider a set S= {5, 10, 12, 13, 15, 18} and d= 30. Solve it for obtaining sum of subset
UNIT-VI

1) a) Define the terms Branch and Bound. Explain the principles of:
i. Control Abstraction for LC-search, ii. FIFO Branch & Bound.
b) Solve 0/1 knapsack problem using Branch and Bound.
2) What is bounding? Explain the following with an example.
(a) Job Sequencing with Deadlines
(b) FIFO Branch and Bound
(c) LC Branch and Bound
3) (a) Draw the portion of state space tree generated by LCKNAP for the Knapsack instances:
n=5, (P1,P2,…..P5) = (10, 15, 6, 8, 4) , (W1,W2,….W5) = (4, 6, 3, 4, 2) and M = 12.
(b) Write about Row Minimization in TSP
4) Find the shortest tour of TSP for the following graph using Branch and Bound technique

You might also like