13MCA46 Algorithms Lab syllabus for MCA


Unit-1 Implement the following using C/C++ Language 42 hours

1. Implement Recursive Binary search and Linear search and determine the time requiredto search an element. Repeat the experiment for different values of n, the number of elementsin the list to be searched and plot a graph of the time taken versus n.

2. Sort a given set of elements using the Heapsort method and determine the time required tosort the elements. Repeat the experiment for different values of n, the number of elements inthe list to be sorted and plot a graph of the time taken versus n.

3. Sort a given set of elements using Merge sort method and determine the time required tosort the elements. Repeat the experiment for different values of n, the number of elements inthe list to be sorted and plot a graph of the time taken versus n.

4. Obtain the Topological ordering of vertices in a givenigraph.

5. Implement 0/1 Knapsack problem using dynamic programming.

6. From a given vertex in a weighted connected graph, find shortest paths to other verticesusing Dijkstra\'s algorithm.

7. Sort a given set of elements using Quick sort method and determine the time required sortthe elements. Repeat the experiment for different values of n, the number of elements in thelist to be sorted and plot a graph of the time taken versus n.

8. Find Minimum Cost Spanning Tree of a given undirected graph using Kruskal\'salgorithm.

9. Print all the nodes reachable from a given starting node in a digraph using BFS method.

10. Check whether a given graph is connected or not using DFS method.

11. Find a subset of a given set S = {sl,s2,.....,sn} of n positive integers whose sum is equalto a given positive integer d. For example, if S= {1, 2, 5, 6, 8} and d = 9 thereare two solutions{1,2,6}and{1,8}.A suitable message is to be displayed if the givenproblem instance doesn\'t have a solution.

12.
a. Implement Horspool algorithm for String Matching.
b. Find the Binomial Co-efficient using Dynamic Programming.

13. Find Minimum Cost Spanning Tree of a given undirected graph using Prim’s algorithm.

14.
a. Implement Floyd’s algorithm for the All-Pairs- Shortest-Paths Problem.
b. Compute the transitive closure of a given directed graph using Warshall\'s algorithm.

15. Implement N Queen\'s problem using Back Tracking.

Note: In the examination questions must be given based on above lots.

Last Updated: Tuesday, January 24, 2023