ADA Lab Programs
1. Write a program to implement linear search algorithm, repeat the experiment for different values of n,
the number of elements in the list to be searched and plot a graph of the time taken versus n.
2. Write a program to solve tower of honai problem and execute it for different number of disks
3. Write a program to find the value of an (where a and n are integers) using both brute-force based
algorithm and divide and conquer based algorithm
4. Write a Program to Sort a given set of elements using quick sort algorithm. Repeat the experiment for
different values of n, the number of elements in the list to be sorted and plot a graph of the time token
versus n
5. Write a Program to find the binomial co-efficient C(n, k), [where in and k are integers and n> k] using
brute force based algorithm and also dynamic programming based algorithm
6. Write a Program to implement Floyd's algorithm and find the lengths of the shortest paths from every
pairs of vertices in a given weighted graph
7. Write a Program to solve the string matching problem using Boyer Moore approach
8. Write a Program to solve the string matching problem using KMP algorithm
9 - A. Write a Program to obtain the topological ordering of vertices in a given digraph.
9 - B. Write a program to compute the transitive closure of a given directed graph using Warshall's
algorithm.
10. Write a Program to Find a subset of a given set 5 = (11,12, n) of in poctive integers whove sum is equal
to a given positive integer d. For example, if 5= (1, 2, 5, 6, 8) and d9 there are two solutions (1,2,6) and (1.8)
入 suitable message is to be displayed if the given problem instance docun't have a solution