-
0-1 Knapsack problem(using dynamic programming)
Problem is about to find the max value you can derive out of a set of objects with certain weights and corresponding values for them...the constraint is that there is a sack which has certain max capacity .task is to choose the objects such that a max val is obtained satisfying the sack capacity.
-
Subset Sum problem
The problem is about determinig whether a particular sum is possible from a set of integers which is a subset of another set(mostly bigger in size)...
-
Towers of Hanoi
This algorithm solves the towers of hanoi problem.series of moves that be made to solve the problem are listed as output.you get immediate output for numbers upto 20 or so.
-
LCS using Dynamic Programming and LIS
Finding Longest Common Subsequence of two strings using dynamic programming and Longest Increasing Subsequence
-
Longest common subsequence problem
Longest common subsequence (LCS) problem: Find the longest subsequence common to all sequences in a set of two sequences. It is a classic computer science problem, the basis of diff (a file comparison program that outputs the differences between two files), and has applications in bioinformatics.
Example: take two strings a = 'aabbab' b = 'bbaa'
Their LCS is the string 'bba' and it's length is 3.
-
0-1 Knapsack Problem in Matlab
Simple Matlab code for the 0-1 Knapsack problem: "Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than a given limit and the total value is as large as possible"
