Presentation is loading. Please wait.

Presentation is loading. Please wait.

Making Change Consider the coin system 1 2 5 7 10 We want to know the minimal number of coins required We could compute such a table in an iterative fashion:

Similar presentations


Presentation on theme: "Making Change Consider the coin system 1 2 5 7 10 We want to know the minimal number of coins required We could compute such a table in an iterative fashion:"— Presentation transcript:

1 Making Change Consider the coin system 1 2 5 7 10 We want to know the minimal number of coins required We could compute such a table in an iterative fashion: cell[i][j]: using coins i or less, how many coins to reach j? 12345678910 1 2 5 7

2 Consider the coins: 1 4 7 11 12 Compute the array to answer the question, “How many coins will I need”: 12345678910111213 1 4 7 11 12

3 Sequence Comparisons -Edit Distance Three types of edit steps: –insert –delete –replace Example: abbc  babb –abbc  bbc  bbb  babb (3 steps – delete, replace, insert) –abbc  babbc  babb (2 steps – insert, delete)

4 Try to Change mane to mean *mean *I0  I1  I2  I3  I4 m  D1  M0 a  D2 n  D3 e  D4


Download ppt "Making Change Consider the coin system 1 2 5 7 10 We want to know the minimal number of coins required We could compute such a table in an iterative fashion:"

Similar presentations


Ads by Google