Question 1208422: if i had 1 $2, 1 $1, 4 50c, 5 20c and 5 10c coins what are the different ways I can make $2.00
Found 2 solutions by greenestamps, Edwin McCravy: Answer by greenestamps(13200) (Show Source):
You can put this solution on YOUR website!
Make an organized list using a "greedy" algorithm, in which you start your list with the largest possible numbers of the largest value coins.
(1) If you have the $2 coin, you are done -- you can't have any more coins.
(2) If you don't have the $2 coin, then you can have 2, 1, or 0 $1 coins.
(3) If you don't have the $2 or $1 coin, you can have 4, 3, 2, 1, or 0 50-cent coins.
(4) if you don't have any of the $2, $1, or 50-cent coins, you don't have enough other coins to make $2.
Make your list using that outline. I will do part of the work for you; you don't learn anything by having me do the whole problem for you.
$2 $1 50c 20c 10c case # from above
---------------------------------------------
1 0 0 0 0 (1)
0 2 0 0 0 (2)
0 1 2 0 0
0 1 1 2 1
0 1 1 1 3
0 1 1 0 5
0 1 0 5 0
0 1 0 4 2
0 1 0 3 4
0 0 4 0 0 (3)
0 0 3 ....... (3) (there are 3 solutions here)
0 0 2 ....... (3) (there are 3 solutions here)
0 0 1 ....... (3) (there is 1 solution here)
So there is a total of 17 solutions....
Answer by Edwin McCravy(20055) (Show Source):
You can put this solution on YOUR website!
Use Excel or whatever computer program you have access to:
$2 $1 $0.50 $0.20 $0.10
1 0 0 0 0
0 1 2 0 0
0 1 1 2 1
0 1 1 1 3
0 1 1 0 5
0 1 0 5 0
0 1 0 4 2
0 1 0 3 4
0 0 4 0 0
0 0 3 2 1
0 0 3 1 3
0 0 3 0 5
0 0 2 5 0
0 0 2 4 2
0 0 2 3 4
0 0 1 5 5
Edwin
|
|
|