A wants some pencils and pens spending an amount of 115. Price of a pencil and pen are 4 and 7 . How many combinations are possible?

135 Views Asked by At

My approach is as follow: let a = number of pencils , b = number of pens So, 4a + 7b = 115 Since 115 is a multiple of 5, L.H.S also has to be a multiple of 5. b can be (5,10,15) By substituting these values i found that only b= 5 is valid, giving me just "1 way" as answer. But the correct answer is 4 ways.

2

There are 2 best solutions below

1
On BEST ANSWER

Don't forget that the fact "L.H.S. is a multiple if 5" doesn't yield that all the addendums are multiples of 5. Typically these equations are solved in such a way.

  1. Look for a particular solution, e.g. $(a_0, b_0) = (20, 5)$. Then $4 a_0 + 7 b_0 = 115$.
  2. Subtract: $4(a - a_0) + 7 (b - b_0) = 0$. GCD(4, 7) = 1, so $a-a_0$ is a multiplier of 7 and $b-b_0$ is a multiplier of 4.
  3. Let $a-a_0 = 7k$ for $k \in \mathbb{Z}$ then $b - b_0 = -4k$.
  4. Thus we yield $a = 20 + 7k$ and $b = 5 - 4k$. You just need to find all positive solutions. Good luck!
0
On

First, you are abusing notation a bit, confusing b with B, but I assume you mean the same. The LHS must be indeed a multiple of 5, but it does not mean, that the elements of the sum $4a+7b$ must be a multiple of 5. Note that 1+4=5, is a multiple of 5, but none of the numbers 1 or 4 share this property.

A way to solve this problem is to notice a few things:

(1) 4a is for sure even.

(2) Thus, to make 115 (odd), 7b must be odd. This means b must be odd.

(3) What is more, b must be of the form $b=4k+1$. The other odd possibility, which is b=4k+3 would give you $4(7k+a)=94$ and $94$ is not a multiple of $4$ (as LHS is).

When you notice (3), the exercise becomes easy, because all you need to solve is: $$7k+a=27$$ in natural numbers, which is possible only if $k\in\{0,1,2,3\}$.