Hi, say I have a bunch of 5c, 10c, 20c and 50c coins and I'm trying to make up $1. How do I map out all the possible combinations visually?
this is not a troll question btw, i said VISUALLY, like a graph. if i just plot 0.5x, 0.2x, 0.1x and 0.05x or something like that it doesnt account for all possible combinations, for example
um...0.5w+0.2x+0.1y+0.05z...which..how do you represent on a graph. Or there's something erroneous about this thinking
>>9169143
Lets say you have just $0.05 and $0.25 coins.
You want all solutions to the equation
x*0.05+y*0.25 = 1
where x and y are non-negative integers.
That equation simplifies down to
y=4-0.2x
As you can see by the graph, the non-negative integer solutions are
(0,4),(5,3),(10,2), (15,1), (20,0)
Lets say you want to work with 4 different types of coins. That's more difficult because now instead of working with a 2D solution set(the plane), you are working with a 4D solution set which is impossible to properly visualize.
However, it's easy to model:
w*0.05 + 0.1*x + 0.2*y + 0.5*z = 1
All solutions to this equation that uses non-negative integers are valid (since you can'thage a negative or partial coin)