In how many ways can 45 cents be made using any combination of quarters, dimes, nickels, and pennies?
quarters dimes nickels pennies
0 0 0 45
0 0 1 40
0 0 2 35
.
.
.
0 0 9 0
Can you take it from here? (Just do the same thing, except that change the values of the quarters, dimes, nickels, and pennies)
There are:
p n d q
1 = 25 4 0 0
2 = 20 5 0 0
3 = 15 6 0 0
4 = 10 7 0 0
5 = 5 8 0 0
6 = 0 9 0 0
7 = 25 2 1 0
8 = 20 3 1 0
9 = 15 4 1 0
10 = 10 5 1 0
11 = 5 6 1 0
12 = 0 7 1 0
13 = 25 0 2 0
14 = 20 1 2 0
15 = 15 2 2 0
16 = 10 3 2 0
17 = 5 4 2 0
18 = 0 5 2 0
19 = 15 0 3 0
20 = 10 1 3 0
21 = 5 2 3 0
22 = 0 3 3 0
23 = 5 0 4 0
24 = 0 1 4 0
25 = 20 0 0 1
26 = 15 1 0 1
27 = 10 2 0 1
28 = 5 3 0 1
29 = 0 4 0 1
30 = 10 0 1 1
31 = 5 1 1 1
32 = 0 2 1 1
33 = 0 0 2 1