Ada Assignment2
Ada Assignment2
Assignment-2
Course Title Analysis & Design of Algorithms Course Code BCS401
Course Coordinator Shadaksharaiah C Semester 4th sem
I. A. component Assignment 2 Max. Marks 10
Date 15-07-2024
Course Outcome Statements: After the successful completion of the course, the students will be able to
CO1 Apply asymptotic notational method to analyze the performance of the algorithms in terms of
time complexity.
CO2 Demonstrate divide-and-conquer approaches and decrease & conquer approaches to solve
computational problems.
CO3 Make use of transform & conquer and dynamic programming design approaches to solve the
given real world or complex computational problems.
CO4 Apply greedy and input enhancement methods to solve graph & string based computational
problems.
CO5 Analyse various classes (P,NP and NP Complete) of problems
2.Define the spanning tree/ apply the prim’s algorithm for finding the minimum spanning tree for the
following graph
4. Write Horspools algorithm for string matching and apply the same to the following problem.
1
Text: JIM_SAW_ME_IN_A_BARBER_SHOP
Pattern: BARBER
5..Define Heap. Sort the given list of Elements using heap sort: 2, 9, 7, 6, 5, 8
6. Apply Floyd’s algorithm to find all pairs shortest paths for the given graph
9. What is the central principle of backtracking? Apply backtracking to solve the below instance of the sum
of subset problem S = {5, 10, 12, 13, 15, 18} d = 30.
10. explain the coin row problem using input enhancement technique with an example.