- #1

Arman777

Gold Member

- 2,165

- 185

Let's suppose there are 4 types of coin, 1p 2p 5p and 10p. The problem is, we need to find total combinations which the sum of the coins gives us the 200p.

I am trying to find a mathematical equation to solve the problem but I am stuck. First I started to think algebraically. And I have this,

$$x+2y+5z+10k=200$$

Now lets think a simple case where we need to find the number of (x,y) such that satisfies this equation.

$$x+2y=200$$

Lets rewrite this as $$y=(200-x)/2$$ which you can imagine a graph that crosses y=100 and x=200. In this case every point on the line satisfies this equation but we know that (16.5,91.75 ) cannot be counted as a solution since 16.5x1p or 91.75x2p dont make sense. Hence in this solution only the positive (x,y) integers will survive. In this case there will be 101 solutions for this problem.

Lets try to do same thing for $$x+2y+5z=200$$

in this case I am kind of stuck. I tried to think like this, This corresponds to a plane in 3D. So if we can find the number of the points on the triangle which stands between the axis then we can find the solution but it seems kind of harder. I tried to find to area of the triangle which it can be calculated using the determinant of the points where the plane crosses the axis so I have (200,0,0) (0,100,0) and (0,0,40) and the area is 10954 and then I take the coefficients and the result is (1,0,0) (0,2,0) and (0,0,5) and I have 5.67 so I said the total points in that area is 10954/5.6 put of course that doesnt worked well. The answer should be 2081 but I had 1928.

So I cannot find an answer using this I can find for a line but not for an area.

The next think I thought was something like this,

$$x/200+y/100+z/40=1$$

so we know that (x,y,z) should be positive integers but now I am again stuck. Is there any formula for this kind of things or something that I can derive ?

Or more importantly can we derive the solution one of the above approaches.

Here my main purpose is find a general solution for any type of equation such that,

$$a_0x+a_1x_1+a_2x_2...=S$$ for every given integer $$a_n$$ and a given $$S$$ how many combinations are possible ?

I am trying to find a mathematical equation to solve the problem but I am stuck. First I started to think algebraically. And I have this,

$$x+2y+5z+10k=200$$

Now lets think a simple case where we need to find the number of (x,y) such that satisfies this equation.

$$x+2y=200$$

Lets rewrite this as $$y=(200-x)/2$$ which you can imagine a graph that crosses y=100 and x=200. In this case every point on the line satisfies this equation but we know that (16.5,91.75 ) cannot be counted as a solution since 16.5x1p or 91.75x2p dont make sense. Hence in this solution only the positive (x,y) integers will survive. In this case there will be 101 solutions for this problem.

Lets try to do same thing for $$x+2y+5z=200$$

in this case I am kind of stuck. I tried to think like this, This corresponds to a plane in 3D. So if we can find the number of the points on the triangle which stands between the axis then we can find the solution but it seems kind of harder. I tried to find to area of the triangle which it can be calculated using the determinant of the points where the plane crosses the axis so I have (200,0,0) (0,100,0) and (0,0,40) and the area is 10954 and then I take the coefficients and the result is (1,0,0) (0,2,0) and (0,0,5) and I have 5.67 so I said the total points in that area is 10954/5.6 put of course that doesnt worked well. The answer should be 2081 but I had 1928.

So I cannot find an answer using this I can find for a line but not for an area.

The next think I thought was something like this,

$$x/200+y/100+z/40=1$$

so we know that (x,y,z) should be positive integers but now I am again stuck. Is there any formula for this kind of things or something that I can derive ?

Or more importantly can we derive the solution one of the above approaches.

Here my main purpose is find a general solution for any type of equation such that,

$$a_0x+a_1x_1+a_2x_2...=S$$ for every given integer $$a_n$$ and a given $$S$$ how many combinations are possible ?

Last edited: