0% found this document useful (0 votes)
6 views2 pages

CS3401 ALGORITHMS LAB SET

Uploaded by

sathishkumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
6 views2 pages

CS3401 ALGORITHMS LAB SET

Uploaded by

sathishkumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

B.E / B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, NOVEMBER/DECEMBER 2024


Fourth Semester

CS3401 ALGORITHMS

(Regulations 2021)

Time : 3 Hours Answer any one Question Max. Marks 100

Aim & Procedure Program Results Viva-Voce Record Total


20 40 20 10 10 100

1. Implement Linear Search. Determine the time required to search for an element. 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. Implement recursive Binary Search. Determine the time required to search an element. 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.

3. Given a text txt [0...n-1] and a pattern pat [0...m-1], write a function search (char pat [ ], char txt [ ])
that prints all occurrences of pat [ ] in txt [ ]. You may assume that n > m.

4 Sort a given set of elements using the Insertion sort and Heap sort methods 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.

5 Develop a program to implement graph traversal using Breadth First Search

6 . Develop a program to implement graph traversal using Depth First Search

7. From a given vertex in a weighted connected graph, develop a program to find the shortest paths to
other vertices using Dijkstra’s algorithm

8 Find the minimum cost spanning tree of a given undirected graph using Prim’s algorithm.

9. Implement Floyd’s algorithm for the All-Pairs- Shortest-Paths problem.

10 Compute the transitive closure of a given directed graph using Warshall's algorithm.

Page 1 of 2
11 Develop a program to find out the maximum and minimum numbers in a given list of n numbers
using the divide and conquer technique.

12 Implement Merge sort and Quick sort methods to sort an array of elements and determine the time
required to sort. 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.

13 Implement N Queens problem using Backtracking.

14 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

15 Implement randomized algorithms for finding the kth smallest number. The programs can be
implemented in C/C++/JAVA/ Python.

Internal Examiner External Examiner

Page 2 of 2

You might also like