There's So Many Selection!

You're in a stationary shop where a pen cost 50p and a pencil cost 15p. You want to buy a collection of pens and pencils and you have £25 (£1 is equivalent to 100p) to spend.

In how many ways can you spend exactly £25 pounds on buying those pens and pencils?

Details and Assumptions :

  • One way of spending exactly £25 pounds in that shop is buying only pens, that this spending £25 pounds on buying 50 pens. It is up to your personal choice on how many pens and how many pencils you want to buy, but before making a decision, you need to consider all possible combinations of set of pens and pencils you can buy, exactly in your budget.

  • You have no restriction on the minimum number of pens or pencils you should buy.

  • Another example of spending exactly £25 pounds on stationary collection is buying 20 pens and 100 pencils.

1 2 15 16 17 18 20 25

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Stuti Malik
May 25, 2016

Let X = number of pencils, Y= number of pens

We need to find integer solutions for:

15X + 50Y = 2500

One integer solution is X=0 and Y= 50

To find all integer solutions, we use Linear Diophantine equations which says:

The general solution for ax + by = d, where d is the multiple of gcd(a,b) is:

X= x + k(b/g), Y= y - k(a/g),

where g = gcd(a,b), (gcd= greatest common divisor) and x, y is one of the integer solutions to the equation:
aX + bY= d.

gcd(15,50) = 5, x = 0, y = 50

So all integer solutions to the equation is given by:

X= k(50/5), Y= 50 -k(15/5)

X= 10k, Y= 50-3k, where k is an integer

To find the range of values of k, we have the condition that X>=0 and Y>=0 as number of pens or pencils cannot be negative.

It follows that:

10k >= 0, 50-3k >= 0

0 =< k =< 50/3

50/3= 16.66666667

Therefore, counting the number of values k can take from 0 to 16 (as k should be an integer) gives 17 solutions for k. The values k can take are: 0, 1, 2, 3, ........, 16.

The general solution is X = 10k, Y= 50- 3k and it has 17 integer solutions for X and Y which satisfy
15X + 50Y = 2500.

So, there are 17 possible combinations of number of those pens and pencils you can get in exactly £25.

One example:

At k= 5,

X= 10(5), Y= 50- 3(5)

X= 50, Y= 35

This combination is 50 pencils and 35 pens :)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...