**List of Programs**:

- WAP to find sum of first n natural numbers, using functions, and calculate its complexity.
- WAP to find sum of squares of first n natural numbers, using functions, and calculate its complexity.
- WAP to find sum of cubes of first n natural numbers, using functions, and calculate its complexity.
- WAP to find factorial of a natural number, using functions, and calculate its complexity.
- WAP to check whether a no is prime or not, using functions, and calculate its complexity.
- WAP to print Fibonacci Series, using functions, and calculate its complexity.
- WAP to add two matrices, using functions, and calculate its complexity.
- WAP to subtract two matrices, using functions, and calculate its complexity.
- WAP to multiply two matrices, using functions, and calculate its complexity.
- WAP to transpose a matrix, using functions, and calculate its complexity.
- WAP in C++ to search an item in an array using Linear Search, using functions, and calculate its complexity.
- WAP in C++ to search an item in an array using Binary Search, using functions, and calculate its complexity.
- WAP in C++ to find the divisors of a number, using functions, and calculate its complexity.
- WAP in C++ to sort the array using Bubble Sort, using functions, and calculate its complexity.
- WAP in C++ to sort the array using Selection Sort, using functions, and calculate its complexity.
- WAP in C++ to sort the array using Insertion Sort, using functions, and calculate its complexity.
- Sort a given set of elements using the Quick sort method and determine the time required to sort the elements. 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 taken versus n. The elements can be read from a file or can be generated using the random number generator.
- Implement a parallelized Merge Sort algorithm to sort a given set of elements and determine the time required to sort the elements. 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 taken versus n. The elements can be read from a file or can be generated using the random number generator.
- Obtain the Topological ordering of vertices in a given digraph.
- Compute the transitive closure of a given directed graph using Warshall’s algorithm.
- Implement 0/1 Knapsack problem using Dynamic Programming.
- From a given vertex in a weighted connected graph, find shortest paths to other vertices using Dijikstra’s algorithm.
- Find Minimum Cost Spanning Tree of a given undirected graph using Kruskal’s algorithm.
- Print all the nodes reachable from a given starting node in a digraph using BFS method.
- Check whether a given graph is connected or not using DFS method.
- Find a subset of a given set S = {sl,s2,…..,sn} of n positive integers whose sum is equal to a given positive integer d. For example, if S= {1, 2, 5, 6, 8} and d = 9 there are two solutions{1,2,6}and{1,8}.A suitable message is to be displayed if the given problem instance doesn’t have a solution.
- Implement any scheme to find the optimal solution for the Traveling Salesperson problem and then solve the same problem instance using any approximation algorithm and determine the error in the approximation.
- Find Minimum Cost Spanning Tree of a given undirected graph using Prim‟s algorithm.
- Implement All-Pairs Shortest Paths Problem using Floyd’s algorithm. Parallelize this algorithm, implement it using Open and determine the speed-up achieved.
- Implement N Queen’s problem using Back Tracking.

**DCRUST SYLLABUS**

**CSE 286 C (Design and Analysis of Algorithms Lab)**

**CATEGORY : ENGINEERING SCIENCE COURSE**

__Course Objectives__:

- To develop and code program for the algorithms and analyze it to determine its computational complexity.
- To identify and analyze worst-case running times of algorithms.
- To model given engineering problem using graph and trees and write the corresponding algorithm to solve the problems.
- To strengthen the ability to identify and apply the suitable algorithm for the given real world problem.

**List of Programs**:

- Sort a given set of elements using the Quick sort method and determine the time required to sort the elements. 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 taken versus n. The elements can be read from a file or can be generated using the random number generator.
- Implement a parallelized Merge Sort algorithm to sort a given set of elements and determine the time required to sort the elements. 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 taken versus n. The elements can be read from a file or can be generated using the random number generator.
- a. Obtain the Topological ordering of vertices in a given digraph.
- Implement 0/1 Knapsack problem using Dynamic Programming.
- From a given vertex in a weighted connected graph, find shortest paths to other vertices using Dijikstra’s algorithm.
- Find Minimum Cost Spanning Tree of a given undirected graph using Kruskal’s algorithm.
- a. Print all the nodes reachable from a given starting node in a digraph using BFS method.
- Find a subset of a given set S = {sl,s2,…..,sn} of n positive integers whose sum is equal to a given positive integer d. For example, if S= {1, 2, 5, 6, 8} and d = 9 there are two solutions{1,2,6}and{1,8}.A suitable message is to be displayed if the given problem instance doesn’t have a solution.
- Implement any scheme to find the optimal solution for the Traveling Salesperson problem and then solve the same problem instance using any approximation algorithm and determine the error in the approximation.
- Find Minimum Cost Spanning Tree of a given undirected graph using Prim‟s algorithm.
- Implement All-Pairs Shortest Paths Problem using Floyd’s algorithm. Parallelize this algorithm, implement it using Open and determine the speed-up achieved.
- Implement N Queen’s problem using Back Tracking.

** Course Outcomes:** Upon successful completion of the course, students will be able to:

- Develop and code program for the algorithms and analyze it to determine its computational complexity.
- Identify and analyze worst-case running times of algorithms.
- Model given engineering problem using graph and trees and write the corresponding algorithm to solve the problems.
- Identify and apply the suitable algorithm for the given real world problem.