0% found this document useful (0 votes)
79 views12 pages

Ad3351 Daa Question Bank

Uploaded by

AMSALEKA R
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)
79 views12 pages

Ad3351 Daa Question Bank

Uploaded by

AMSALEKA R
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/ 12

VIVEKANANDHA COLLEGE OF TECHNOLOGY FOR WOMEN

Approved by AICTE, New Delhi & Affiliated to Anna University, Chennai


Elayampalayam, Tiruchengode Tk – 637 205, Namakkal Dt.

DEPARTMENT OF COMPUTER SCIENCE AND BUSINESS SYSTEMS

QUESTION BANK
SUBJECT CODE : AD3351 YEAR / SEM : II/III
SUBJECT NAME : Design and Analysis of Algorithms ACADEMIC YEAR : 2024-25

NAME OF THE FACULTY : R.Amsaleka, AP/CSE


Q.No Questions

1. What is the need for studying algorithms?


2. What is empirical analysis of an algorithm? How it is done? (Dec 22)
3. For the algorithm to compute then! indicate (a) the natural size metric for its inputs and (b) its basic
operation. (dec 22)
4. What is the asymptotic best-case and worst-case running time of selection sort?
5. What is an algorithm? (Dec 23)
6. Give the diagrammatic representation of Notion of algorithm.
7. What is the formula used in Euclid’s algorithm for finding the greatest common divisor of two
numbers?
8. List the three different algorithms used to find the gcd of two numbers.
9. Show the fundamental steps involved in algorithmic problem solving.
10. What is an algorithm design technique?
11. What is pseudocode?
12. List the types of algorithm efficiencies.
13. List some of the important problem types.
14. What are the classical geometric problems?
15. List the steps involved in the analysis framework?
16. What do you mean by worst case efficiency of an algorithm?
17. Define O-notation, Ω-notation, θ notations.
18. Mention the useful property, which can be applied to the asymptotic notations and its use?
19. What is average case efficiency?
20. What is amortized efficiency?
21. What are the basic asymptotic efficiency classes?
22. What is algorithm visualization?
23. List the reasons for choosing an approximate algorithm
24. Distinguish sequential and parallel algorithms. (Dec 23)
25. What is abstraction? Why do we need Abstract Data Type? (Apr 2024)
PART B
1. Explain in detail about notion of algorithm with suitable example.
2. Explain in detail about Fundamentals of Algorithmic Problem Solving.
3. Discuss the important problem types in Algorithmic Analysis.
4. Discuss Fundamental analysis of algorithm efficiency elaborately.
5. Explain the importance of asymptotic analysis for running time of an algorithm with an example.
6. Solve : T(n) = 2T(n/2) + n3
7. Explain Asymptotic Notations in detail
8. Explain in detail about Mathematical Analysis of non- recursive Algorithms and recursive algorithms.
9. Write and explain recursive algorithm to find the factorial of any given number n > = 0. Find the time
complexity
10. Consider the following recursive algorithm. ALGORITHM Riddle (A[0..n-'])
Input: An array A/0.. n-1] of real numbers if n=1 return A[0]
else temp Riddle(A/0..n-1) if temps A/n-/return temp else return A/n]
Riddle(A/0..n])
if temps Afn return temp else return A[n]
(i) What does this algorithm compute?
(ii) Set up a recurrence relation for the algorithm's basic operation count and solve it.
11. Write a pseudocode for a divide-and-conquer algorithm for the exponentiation problem of
computing a where a>0 and n is a positive integer, using recursion.
(i) Set up and solve a recurrence relation for the number of multiplications made by this
algorithm
(ii) How does this algorithm compare with the brute- force algorithm for this problem? of
complete pairs remaining. Thus, you are left with 4 complete pairs in the best-case scenario and
with 3 complete pairs in the worst case. Assuming that the probability of disappearance for each
of the 10 socks is the same, find the probability of the best-case scenario; the probability of the
worst-case scenario; the number of pairs you should expect in the average 13case.
12. Write a pseudocode for a divide-and-conquer algorithm for the exponentiation problem of
computing a where a>0 and n is a positive integer, using recursion.
(iii) Set up and solve a recurrence relation for the number of multiplications made by this
algorithm
How does this algorithm compare with the brute- force algorithm for this problem?
PART C
1. Describe in detail about linear search.
2. Explain in detail about Tower of Hanoi.
3. Write a pseudocode for a divide-and-conquer algorithm for the exponentiation problem of
computing a where a>0 and n is a positive integer, using recursion.
(i) Set up and solve a recurrence relation for the number of multiplications made by this algorithm
(ii) How does this algorithm compare with the brute-
force algorithm for this problem?
4. Write and explain recursive algorithm to find the
factorial of any given number n > = 0. Find the time complexity
5. Spotify, a digital music service platform employs algorithms to present you with music choices that
will peak your interest and keep you on the platform. The general rule of thumb for determining if
you like a song or not all depends on the first 30 seconds. If a user skips an unsaved song before the
30-second mark, Spotify counts that as a thumbs down. Identify the Finiteness, Definiteness,
Generality and Effectiveness characteristics of an algorithm for this scenario. (7)

Obtain the time complexity of following recurrence relation in big-oh (O) notation T(n)=2T (n/2)+n
with T(1)=1.(8).
UNIT II
6. What is brute force algorithm? (Nov 23)
7. Write an example problem that cannot be solved by brute-force algorithm. Justify your
answer. List the strength and weakness of Brute
Force Algorithm.
8. Define exhaustive search.
9. Give the general plan of exhaustive search Method.
10. If there are other points of a given set on the straight line through Pi and Pj. which of all these points
need to be preserved for further processing
in a line segment of the convex hull's boundary?
11. Give the general plan for divide-and-conquer algorithms.
12. List the advantages of Divide and Conquer Algorithm.
13. Define Hamiltonian circuit.
14. State the Master theorem and its use.
15. What is the general divide-and-conquer recurrence relation?
16. Define merge sort.
17. List the Steps in Merge Sort.
18. List out Disadvantages of Divide and Conquer Algorithm
19. Define Quick Sort.
20. List out the Advantages in Quick Sort.
21. What are Quick Sort Features?
22. What is the difference between quicksort and merge sort?
23. What is binary search?
24. List out the 4 steps in Strassen’s Method.
25. Define Travelling Salesman Problem.
26. What is asymptotic best-case and worst-case running time of selection sort? (Nov 22)
27. If there are other points of a given set on the straight line through Pi and Pj, which of all these points
need to be preserved for further processing in a line segment of the convex hull's boundary? (Nov
22)
28. List the major variations of decrease-and-conquer technique.
29. How different is the travelling salesman problem from the problem of finding a Hamiltonian circuit?
(Apr 23)
30. For a digraph with n vertices, what is the largest number of distinct solutions, the topological sorting
problem can have? (Apr 24)
PART B
1. Explain Divide and Conquer Method in detail.
2. Discuss Quick Sort algorithm with suitable example.
3. Explain Binary Search in detail with suitable example
4. (i) Write an algorithm using divide and conquer to search an element in a list of numbers. If the
number is not present, the algorithm returns the closest number of the searches number.
(ii) Explain how exhaustive search can be applied to the sorting problem and determine the
efficiency class of such an algorithm
5. What is Strassen’s matrix multiplication and explain how it is solves the problem using divide and
conquer technique
6. (i) Write the DFS algorithm
(ii) Apply the DFS-based algorithm to solve the topological sorting problem for the following
digraph: (Nov 22)

7. Solve the Quick sort recursive function. (Nov 22)

)T(k) + T (n-k-1)+n-1

yield a non-recursive form when k = 1. Give an "O" estimate of this form. Assume that T(0) T(1) =
0 and T(2) = 2. You may = assume that n is even. (5)

) Give the result of partitioning the array with standard Quick sort partitioning (taking the N at the left
as the partitioning element
8. What is pattern searching? Outline the steps in the Rabin-K algorithm for pattern searching with an
example
PART – C
1. Explain in detail about Travelling Salesman Problem using exhaustive search.
2. Explain in detail about Knapsack problem with example.
3. Explain in detail about closest pair problem.
4. (i) Write a pseudocode for a divide-and-conquer algorithm for the exponentiation problem of
computing a where a>0 and n is a positive integer, using recursion.
(ii) Set up and solve a recurrence relation for the number of multiplications made by this
algorithm

(iii) How does this algorithm compare with the brute-force algorithm for this problem?
5. Solve the all-pairs shortest-path problem for the digraph with the following weight matrix:

UNIT III
6. Define dynamic programming.
7. What are the features of dynamic programming?
8. What is the principal difference between dynamic programming and divide- and-conquer
techniques?
9. What are the drawbacks of dynamic programming?
10. Write the general procedure of dynamic programming.
11. Define principle of optimality. (Apr 23)
12. Can we use Prim's algorithm to find a spanning tree of a connected graph with no weights on its
edges?
13. What is control abstraction of greedy method?
14. List the steps required to develop a greedy algorithm.
15. What are the labels in Prim’s algorithm used for? B
16. How are the vertices not in the tree are split into? B
17. What are the operations to be done after identifying a vertex u* to be added to the tree?
18. What are the use of Dijkstra’s algorithm. (Apr 23)
19. What is meant by optimal substructure property of a dynamic programming problem?
20. What is minimum spanning tree?
21. What does a Floyd algorithm do?
22. What is closest pair problem?
23. What is optimal merge pattern?
24. What is Huffman tree?
25. Why the time efficiency class of Warshall's algorithm is inferior to that of the traversal-based
algorithm for sparse graphs represented by their adjacency lists? (Apr 24)
26. Write the pseudo code of Floyd’s algorithm. (Nov 23)
PART – B
1. Explain Dijkstra’s shortest path algorithm.
2. Explain Kruskal's algorithm in detail with appropriate example.
3. Discuss Prim's Algorithm in detail with suitable example.

4. Explain Greedy Method in detail with suitable example.


5. Explain Huffman tree code?
6. Apply the above algorithm to solve the all-pairs shortest path problem for the
digraph with the following weight matrix:

0 2 ∞ 1 8

6 0 3 2 ∞

∞ ∞ 0 4 ∞

∞ ∞ 2 0 3
3 ∞ ∞ ∞ 0

(ii) Write the all pairs shortest path algorithm

7. Discuss Warshall’s Algorithm with suitable diagrams.


8. Explain Floyd’s Algorithm in detail with example.
9. (i) Several coins are placed in cells of an n x m board, no more than
one coin per cell. A robot, located in the upper left cell of the board, needs to collect as many of the
coins as possible and bring them to the bottom right cell. On each step, the robot can move either
one cell to the right or one cell down from its current location. When the robot visits a cell with a
coin, it always picks up that coin. Design an algorithm to find the maximum number of coins the
robot can collect and a path it needs to follow to do this. (7)
(ii) Apply Warshall's algorithm to find the transitive closure of the digraph defined by the following
adjacency matrix. (6)

(Apr 23)
10.

(Dec 22)
PART – C
1. Compare and contrast dynamic programming and greedy method.
2. Write the algorithm for optimal binary search tree and solve the following problem instance to
construct the optimal binary search tree. Keys are a, b, c, d and the probabilities are 0.1, 0.2, 0.4 and
0.3
3. What is multistage graph ? List any three applications of multistage graph.
4. Explain Memory Function algorithm for the Knapsack problem.
5.

UNIT IV

1. What do you mean by optimal solution?


2. What is feasible solution?
3. Compare feasible and optimal solution.
4. Recall LPP.
5. Define Marriage matching problem. And state what is called as stable or unstable in it?
6. What is Simplex Method?
7. What are the requirements to represent the simplex method to a linear programming problem in the
standard form?
8. Write the steps to solve LPP problems by Simplex Method / Procedure for Simplex Method.
9. Mention the time complexity of the Simplex Method.
10. Write the Standard form of LP problem.
11. Give the possible outcomes in solving an LP problem.
12. Solve the LPP by algebraic geometry technique.
13. How will you calculate new pivot row and remaining rows in new iteration of simplex method?
14. Convert the given primal problem into dual problem.
15. What are the requirements to represent the simplex method to a linear programming problem in a
standard form? (Nov 22)
(OR) List the requirements of standard form. (Nov 23)
16. Infer when a pair(m,w) is said to be a blocking pair? (Nov 23)
17. What is meant by iterative improvement technique
18. What are the essential properties of a flow graph?
19. What is bipartite graph?
20. What is Maximum Flow Problem?
21. What is state space tree?
22.

(Apr 23)

23. How can you solve a maximum flow problem of a flow network with multiples sources and or
multiple sinks?
24. Why do we need slack and surplus variables in LPP for solving using simplex method? (Apr 24)
25. State the mathematical formulation of maximum flow problem. (Apr 24)
PART - B
1. Describe stable marriage problem with example.
2. Explain Simplex method with example.
3. Explain Maximum Flow Problem in detail.
4. Explain in detail about Maximum Matching Bipartite graph
5. (a) Starting from the following flow (printed above or to the right of the capacities), perform one
iteration of the Ford-Fulkerson algorithm. Choose a shortest augmenting path, ie, the path with the
fewest number of arcs.
(i)Write down your shortest augmenting path.
ii) Perform the augmentation. What is the value of the resulting flow?
(iii) Is the resulting flow optimal? If so, give a min cut whose capacity is equal to the value of the
flow. If not, give a shortest augmenting path?
6. Solve the following linear programming problems geometrically.

(13)

maximize 3x+y subject to -x+ysl 2x+y≤4

x20, y20
7. Solve the following instance of the knapsack problem by the branch- and bound algorithm: (Nov
22)
Item weight value
1 10 rs.100
2 7 rs.63
3 8 rs.56
4 4 rs.12 W=16

8.
(
Nov 22)
9.

(
Apr 24)
10.

(
Nov 22)
11.

(Apr 24)
UNIT V
1. Analyze the limitations of algorithm power.
2. What are lower-bound arguments? Or
Write information-theoretic lower bound. (Nov 23)
3. Define Trivial Lower Bounds.
4. Define Information-Theoretic Arguments.
5. Discuss Problem Reduction
6. Define decision trees.
7. Define tractable and intractable. (Nov 22)
8. Give the importance of Hamiltonian circuit problem.
9. Define Traveling salesman problem.
10. What is the use of Knapsack problem?
11. Write about Partition problem.
12. Define Graph-coloring problem.
13. What is LC search and how it is efficient from other search methods in branch and bound algorithms
?
14. Mention the use of deterministic and nondeterministic algorithm.
15. Define Class P
16. Define Class NP?
17. State the use of Class NP-Hard. / List out the properties of NP-Hard Problems
18. Define NP-complete.
19. What are tractable and intractable problems?
20. Explain How can you get the second solution from the first one by exploiting a symmetry of the
board? (Nov 22)
21. What is meant by N-Queen problem? (Apr 23)
22. How does a branch and bound algorithm work? (Apr 23)
23. State Heuristic with an example. (Nov 23)
24. What do you mean by polynomial time approximation algorithm? (Apr 24)
PART - B
1. Describe Briefly about Np-hard and Np-Completeness
2. Describe about Assignment Problem and extend how job assignment problems could be solved.
3. Discuss the 8-Queens problem & discuss the possible solutions.
4. Explain about travelling salesman problem?
5. Explain about LIFO and FIFO search?
6. Solve the following instance of the knapsack problem by the branch-and bound algorithm: (Nov 22)
Item weight value
1 10 rs.100
2 7 rs.63
3 8 rs.56
4 4 rs.12 W=16

7. Apply the nearest-neighbor algorithm to the instance defined by the intercity distance matrix below.
Start the algorithm at the first city, assuming that the cities are numbered from 1 to 5 and Compute
the accuracy ratio of this approximate solution. (Nov 22)
PART C
1. Describe in detail about Branch and Bound Problem
2. Illustrate about Hamiltonian Circuit Problem
3. (i) Illustrate the algorithm for the instance n = 6, M = 30 and W = (5, 10, 12, 13, 15, 18). Draw
possible state space tree.
(ii) Prove that TSP problem is NP complete, assuming that Hamiltonian problem is NP complete
4. Suppose you are given an array A of size 'n' that either contains all zeros or 2n/3 zeros and n/3 ones in
some arbitrary order. Your problem is to determine whether contains any ones?
(i) Give an exact lower bound in terms of 'n' (not using asymptotic notation) on the worst-case
running time of any deterministic algorithm that solves this problem. Give a randomized algorithm
that runs in O(1) time and gives the right answer with probability at least 1/3.
(ii) Give a randomized algorithm that runs in O(1) time and gives the right answer with probability
at least 5/9.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy