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

DAA QB

The document consists of a series of questions related to algorithm analysis, including concepts of time and space complexity, various sorting algorithms, recurrence relations, and optimization problems. It covers specific algorithms like Quick Sort, Merge Sort, and the Bellman-Ford Algorithm, as well as theoretical concepts such as adversary lower bounds and the principle of optimality. Additionally, it discusses various problem-solving techniques including backtracking and branch and bound methods.

Uploaded by

parveznadaf05
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)
5 views3 pages

DAA QB

The document consists of a series of questions related to algorithm analysis, including concepts of time and space complexity, various sorting algorithms, recurrence relations, and optimization problems. It covers specific algorithms like Quick Sort, Merge Sort, and the Bellman-Ford Algorithm, as well as theoretical concepts such as adversary lower bounds and the principle of optimality. Additionally, it discusses various problem-solving techniques including backtracking and branch and bound methods.

Uploaded by

parveznadaf05
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

1. Explain how space complexity is different from time complexity with a relevant example.

2. Compare and contrast the following asymptotic notations: Big O, Small o, Big Omega,
and Theta. Provide examples to illustrate their use in analyzing algorithm efficiency.
3. What do you mean by best case, average case, and worst-case complexities? Give an
example of each
4. Explain the difference between best-case, average-case, and worst-case complexities.
Analyze these complexities for the binary search algorithm.
5. Describe the relationship between time complexity and space complexity. Why is it
important to consider both when designing an algorithm? Provide an example to support
your explanation.
6. List any three sorting algorithms and their time complexities in the best, average, and
worst cases
7. Discuss the linear search and binary search algorithms. Compare their time complexities
and scenarios where each is preferred.
8. Describe the working of merge sort and quick sort. Compare their time complexities and
identify situations where each algorithm is advantageous.
9. Explain the concept of adversary lower bounds in comparison-based sorting. Prove that
any comparison-based sorting algorithm requires at least Ω(nlog⁡n) comparisons in the
worst case.
10. Define recurrence relations. How is the backward substitution method used to solve
them?
11. Define recurrence relations. How is the substitution method used to solve them?
12. Define recurrence relations. How is the forward substitution method used to solve them?
13. Solve the recurrence relation T(n)=2T(n/2)+ n using the substitution method and interpret
the result.
14. Solve the recurrence relation T(n)=T(n/2)+ n^2 using the recursion tree method. Explain
each step in detail.
15. State Master’s theorem and apply it to solve the recurrence relation T(n)=4T(n/2)+ n^2.
Discuss the conditions under which Master’s theorem is applicable.
16. Solve the following recurrence relation using Master’s Theorem T(n) = 7T (𝑛/2 ) + n3
17. Solve the following recurrence relation using Master’s Theorem T(n) = 3T (𝑛/4 ) + n2
18. Explain the Quick Sort algorithm in detail with the help of an example. Discuss its
working mechanism, including the concept of the pivot element, partitioning, and
recursion. Also, analyze its time complexity in the best case, average case, and worst
case.
19. What is Randomized Quick Sort? How does randomization improve its performance?
Provide a detailed explanation with an example.
20. Describe the Merge Sort algorithm with a suitable example. Explain the
divide-and-conquer approach used in the algorithm, including the process of dividing the
array, sorting subarrays, and merging them. Also, analyze its time complexity in the best
case, average case, and worst case..
21. What are inversions in an array? Write an algorithm to count the number of inversions in
an array using Merge Sort and analyze its time complexity.
22. Describe an efficient algorithm to find the majority element in an array, if it exists.
Analyze its time complexity and space complexity.
23. What is the Counting Inversions problem? Explain how it can be solved using a
brute-force approach with an example , and discuss its time complexity
24. Discuss in detail the container loading problem with an example.
25. What is the Closest Pair of Points problem? Explain the brute-force approach to solve it
with an example, and discuss its time complexity
26. Provide an algorithm to find the median of an unsorted array efficiently. Explain its
working and analyze the time complexity.
27. Explain Euclid's algorithm for finding the greatest common divisor (GCD) of two integers.
Prove its correctness and analyze its time complexity.
28. What is the Median of a dataset? Explain how to find the median in an unsorted array
and state its time complexity.
29. Discuss in detail the container loading problem with an example
30. Describe the problem of finding the closest pair of points in a plane. Provide an efficient
divide-and-conquer algorithm for solving it and analyze its time complexity.
31. Explore the concept of principle of optimality in detail.
32. What is the convex hull of a set of points in a plane? Describe an efficient algorithm to
compute the convex hull and analyze its time complexity.
33. Explain Graham’s scan algorithm for finding the convex hull of a set of points. Discuss its
steps and analyze its time complexity.
34. Describe the problem of finding the closest pair of points in a plane. Provide an efficient
divide-and-conquer algorithm for solving it and analyze its time complexity.
35. Explain the general strategy of backtracking and how it is applied to solve constraint
satisfaction problems.
36. Describe the N-queens problem. Provide a backtracking-based algorithm to solve it and
analyze its time complexity.
37. Explain in detail Job sequencing with deadlines with its time and space complexity.
38. Explain the graph coloring problem. Write a backtracking algorithm to determine if a
given graph can be colored using kk colors, and discuss its efficiency.
39. What is the subset sum problem? Provide a backtracking algorithm to solve it and
explain its steps.
40. Describe the 0/1 Knapsack problem. How can backtracking be used to solve it? Analyze
the time complexity of the approach.
41. What is a Hamiltonian cycle in a graph? Provide a backtracking algorithm to find a
Hamiltonian cycle in an undirected graph, if it exists.
42. Compare and contrast backtracking with dynamic programming. Discuss scenarios
where backtracking is preferred over other approaches, using examples from the
problems mentioned above.
43. Explain Prim's Algorithm for finding the Minimum Spanning Tree (MST).
44. How does the Bellman-Ford Algorithm detect negative weight cycles in a graph?
Illustrate with an example.
45. Compare Prim's Algorithm and Kruskal's Algorithm based on their approach,
implementation, and time complexities.
46. Explain Kruskal's Algorithm for finding the MST.
47. What are the limitations of Dijkstra's Algorithm? Explain with examples
48. Explain the general method of solving optimization problems using the Branch and
Bound technique. Provide an example to illustrate its working.
49. Describe in detail the coin changing problem with an example
50. Describe the constraints involved in placing queens on the N×N chessboard in the
N-Queens problem. Provide an example for N=4
51. Discuss the 0/1 Knapsack problem and how Branch and Bound can be applied to solve
it. Describe the key steps involved in the solution process.
52. Explain the LC (Least Cost) Branch and Bound solution technique. How does it differ
from other Branch an
53. Explain how the Graph Coloring problem can be solved using backtracking. Illustrate
with a simple example graph
54. Explain the working of the Bellman-Ford Algorithm with a suitable example.
55. What is the time complexity of solving the N-Queens problem using a backtracking
approach? Explain your answerd Bound methods? Provide an example to demonstrate
its application.
56. Compare the time complexity of Dijkstra’s Algorithm and Bellman-Ford Algorithm. When
is it better to use Bellman-Ford?
57. Describe the FIFO (First In, First Out) Branch and Bound solution strategy. How does it
work in practice, and in which types of problems is it most effective?
58. Explain the Travelling Salesperson Problem (TSP) and how Branch and Bound can be
used to find the optimal solution. Discuss the efficiency and challenges associated with
this approach.
59. Explain about NP hard and NP complete.
60. Explain non deterministic algorithms.
61. Write a note on Cook’s theorem.

You might also like