1. 1
DEPARTMENT OF INFORMATION TECHNOLOGY
Subject Code : CS8451 Subject Name : Design & Analysis ofAlgorithms
Class/ Sem : II IT / II Sem Subject In – Charge : Dr. P. Subathra, Prof./IT
QUESTION BANK
UNIT II
BRUTE FORCE AND DIVIDE-AND-CONQUER
Brute Force – Computing an – String Matching - Closest-Pair and Convex-Hull Problems -
Exhaustive Search - Travelling Salesman Problem - Knapsack Problem - Assignment problem. Divide
and Conquer Methodology – Binary Search – Merge sort – Quick sort – Heap Sort - Multiplication of
Large Integers – Closest-Pair and Convex - Hull Problems.
Q. No Question
Marks
Knowled
geLevel
Number
of
Times
inAU
PART - A
BRUTE FORCE
1. Write the advantages of insertion sort. (R 13 NOV/ DEC 2017)
BRUTE FORCE - STRING MATCHING
2. Write the brute force algorithm to string matching. (R 17 APR/MAY2019)
BRUTE FORCE - CLOSEST-PAIRAND CONVEX-HULLPROBLEMS
3. What is the closest – pair problem? (R 13 MAY/JUN 2016)
What is closest-pair problem? (R 13 APR/MAY 2017)
What is the closest-pair problem? (R13 APR/MAY2019)
4. Write an algorithm for brute force closest- pair problem. (R 13 NOV/ DEC 2016)
EXHAUSTIVE SEARCH
5. What is an exhaustive search? (R13 APR/MAY2018)
DIVIDE AND CONQUERMETHODOLOGY
2. 2
Give the general strategy of Divide and Conquer Method. (R 13 MAY/JUN 2016)
Give the general plan of divide and conquer algorithms. (R 13 NOV/ DEC 2017)
Give the general strategy of Divide and Conquer Method. (R13 APR/MAY2019)
State Master's Theorem. (R13 APR/MAY2018)
DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH
6. Derive the complexity of Binary Search algorithm. (R 13 APR/MAY 2015)
7. What is worst case complexity of binary search? (R 13 NOV/ DEC 2016)
DIVIDE AND CONQUER METHODOLOGY - MERGE SORT
8. What is the time and space complexity of Merge sort? (R 17 APR/MAY2019)
Q. No Question
Marks
Knowled
geLevel
Number
of
Times
inAU
PART - B
BRUTE FORCE - STRING MATCHING
1. Solve the following using Brute-Force algorithm: (R 13 APR/MAY 2015) (10)
Find whether the given string follows the specific pattern and return 0 or 1
accordingly.
Examples:
a. Pattern:“abba”, input : “redblueredblue” should return 1
b. Pattern:“aaaa”,input: “asdasdasdasd” should return 1
c. Pattern:“aabb”, input: “xyzabcxyzabc” should return 0
2. Solve the following using Brute – Force algorithm: (R 13 APR/MAY 2017)
(13) Find whether the given string follows the specifid pattern and return 0 or 1
accordingly.
Examples:
Pattern:“abba”, input : “redblueredblue” should return 1
Pattern:“aaaa”,input: “asdasdasdasd” should return 1
Pattern:“aabb”, input: “xyzabcxyzabc” should return 0
BRUTE FORCE - CLOSEST-PAIRPROBLEM
3. Explain the Bruteforce method to find the two closest points in a set of n points in
k-dimensional space. (R 13 NOV/ DEC 2017) (13)
4. BRUTE FORCE - CONVEX-HULL PROBLEM
3. 3
5. What is the convex hull problem? Explain the brute force approach to solve
convex-hull with an example. derive the time complexity. (R 17 APR/MAY
2019) (2+7+4)
EXHAUSTIVE SEARCH
EXHAUSTIVE SEARCH - TRAVELLING SALESMAN PROBLEM
6. Find all the solution to the travelling salesman problem (cities and distances
shown below) by exhaustive search. Give the optimal solution. (R 13 MAY/JUN
2016) (16)
7. Find all the solution to the travelling salesman problem (cities and distances
shown below) by exhaustive search. Give the optimal solution. (R13 APR/MAY
2019) (13)
DIVIDE AND CONQUERMETHODOLOGY
Give the running time equation for divide and conquer algorithms. (R 08 APR/ MAY 2011)
Write short notes on : (R 08 APR/ MAY 2011)
d. Divide and Conquer algorithms (3)
e. Randomized algorithms (3)
What is Divide and Conquer strategy. Why recursion is most suited for divide and conquers? (R 08 NOV/ DEC
2015) (6)
DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH
4. 4
8. If you have to solve the searching problem for a list of n numbers, how can you
take advantage of the fact that the list is known to be sorted? Give separate
answers for:
Lists represented as arrays.
Lists represented as linked lists.
Compare the time complexities involved in the analysis of both the algorithms. (R
13 APR/MAY 2015) (16)
9. Write the algorithm to perform Binary Search and compute its run time
complexity. (R 13 NOV/ DEC 2015) (8)
10. What is Divide and Conquer strategy and explain the binary search with suitable
example problem. (R 13 APR/MAY 2017) (13)
11. Write the algorithm to perform Binary Search and compute run time complexity.
(R13 APR/MAY2019) (7)
DIVIDE AND CONQUER METHODOLOGY - MERGE SORT
12. Derive the worst case analysis of Merge Sort using suitable illustrations. (R 13
APR/MAY 2015) (8)
13. State and Explain the Merge Sort algorithm and Give the recurrence relation and
efficiency. (R 13 MAY/JUN 2016) (16)
14. Explain the working of Merge Sort Algorithm with an example. (R 13 NOV/ DEC
2017) (13)
15. Discuss the running time of Divide-and-Conquer merge sort algorithm. (R 08
NOV/ DEC 2010) (8)
16. Analyze merge sort for the following numbers using divide and conquer strategy
25, 3, 45, 789, 87, 56, 47, 65, 30, 59, 56, 24. (R 08 NOV/ DEC 2013) (16)
DIVIDE AND CONQUERMETHODOLOGY - QUICK SORT
17. Give the algorithm for Quicksort. With an example show that Quicksort is not a
stable sorting algorithm. (R 13 NOV/ DEC 2016) (16)
18. Write the quick sort algorithm and explain it with an example. Derive the worst
case and average case time complexity. (R 17 APR/MAY2019) (5+4+4)
DIVIDE AND CONQUERMETHODOLOGY - MULTIPLICATIONOF LARGE INTEGERS
19. Explain the method used for performing Multiplication of two large integers.
Explain how Divide and Conquer Method can be used to solve the same. (R 13
MAY/JUN 2016) (16)
20. Formulate an algorithm to multiply n-digit integers using divide and conquer
approach. (R 08 NOV/ DEC 2009) (8)
5. 5
DIVIDE AND CONQUERMETHODOLOGY - CONVEX- HULL PROBLEMS
21. Explain the convex hull problem and the solution involved behind it. (R 13
APR/MAY 2015) (6)
22. Write down the algorithm to construct a convex hull based on divide and conquer
strategy. (R 13 NOV/ DEC 2015) (8)
23. Write down the algorithm to construct a convex hull based divide and conquer
strategy. (R13 APR/MAY2019)(7 )
Q. No Question
Marks
Knowled
geLevel
Number
of
Times
inAU
PART - C
DIVIDE AND CONQUERMETHODOLOGY – BINARYSEARCH
1. Consider the problem of finding the smallest and largest elements in an array of n
numbers.
Design a presorting-based algorithm for solving this problem and determine its
efficiency class. (R13 APR/MAY2018) (7)
Compare the efficiency of the three algorithms: (R13 APR/MAY2018) (8)
The Brute Force Algorithm, This presorting-based algorithm and
The divide and conquer algorithm
DIVIDE AND CONQUER METHODOLOGY - MERGE SORT
2. Explain the Merge Sort algorithm with an example. (R13 APR/MAY2018) (13)
DIVIDE AND CONQUERMETHODOLOGY - QUICK SORT
3. Write an algorithm for quick sort and write its time complexity with example list
as: 5, 3, 1, 9, 8, 2, 4, 7. (R 13 APR/MAY 2017) (15)
4. Write the algorithm for quick sort. Provide a complete analysis of quick sort for
the given set of numbers 12, 33, 23, 43, 44, 55, 64, 77, and 76. (R13 NOV/ DEC
2018) (13)
5. Write an algorithm for Quick sort and write its time complexity with example list
are 5, 3, 1, 9, 8, 2, 4, 7. (R13 APR/MAY2019) (15)
Staff In – Charge Subject Matter Expert HoD/IT