Algorithm Analysis & Design Lab Report
Class: 2nd Year 1st Semester
1. Longest Common Subsequence (LCS)
The LCS problem finds the longest sequence present in both strings in the same order. It uses
dynamic programming to build a 2D table storing the lengths of common subsequences.
2. 0/1 Knapsack Problem
This optimization problem aims to select items with given weights and values to maximize total value
without exceeding a weight limit. It applies dynamic programming to store optimal solutions for
subproblems.
3. Coin Collecting by Robot
In a grid with coins, a robot can move only right or down. The goal is to collect the maximum coins
from the top-left to bottom-right cell using dynamic programming.
4. Merge Sort
A divide-and-conquer sorting algorithm that recursively splits arrays and merges them in a sorted
manner. It ensures O(n log n) time complexity.
5. Quick Sort
A recursive sorting algorithm that selects a pivot and partitions the array into subarrays with
elements less or greater than the pivot. It is efficient in practice with average O(n log n) time.
6. Change Making Problem
This problem finds the minimum number of coins needed to make a certain amount from a given set
of denominations. Dynamic programming is used to solve this.
7. Prim's Minimum Spanning Tree (MST)
Prim's algorithm builds the MST by continuously adding the smallest edge that connects a visited
node to an unvisited one. It uses a priority queue for efficiency.
8. Kruskal's Minimum Spanning Tree (MST)
Kruskal's algorithm sorts all edges and adds the smallest one that doesn't form a cycle, using the
Union-Find data structure to manage sets.
9. Dijkstra's Shortest Path Algorithm
This algorithm finds the shortest path from a source to all vertices in a graph with non-negative
weights using a greedy approach and priority queue.
Submitted by: [Your Name]
Roll No: [Your Roll No]
Date: [Insert Date]