0

Consider a problem, there are three types of products X ,Y ,Z costing 532,504 and 486 bucks respectivel.A person buys A, B and C number of X, Y and Z respectively such that A+B+C is 37 and the average cost per product of the final mixture is 506.We have to find 'A'.

In the solution, they have found out the ratios, A:B=1:13 and A:C=10:13(I can understand till this part).Then, they have added the 'A' parts together(1+10) and arrived at A:B:C=11:13:13 .I can't understand the method by which they have combined the ratios(usually L.C.M. of the no. of parts of the common component will be used).Please explain.

Mohan
  • 75
  • 8
  • The correct answer is $A=11,B=13,C=13.$ I don't understand what $A:B=1:13$ is supposed to mean. I would have thought it meant $B=13A$, but that's not true. Can you explain? – saulspatz Sep 28 '19 at 17:46
  • @saulspatz Could you please explain the solution.Please – Mohan Sep 29 '19 at 05:29

1 Answers1

1

I'm assuming you know the basics of modular arithmetic. If you have trouble following any of this, please comment and I'll explain further. We have $$\begin{align}A+B+C&=37\tag{1}\\ {532A+504B+486C\over37}&=506\end{align}$$ Substituting the first equation in the second gives $$\begin{align} 532A+504B+486(37-A-B)&=506\cdot37\\ (532-486)A+(504-486)B&=(506-486)\cdot36\\ 46A+18B&=20\cdot37\\ 23A+9B&=370\tag{2} \end{align}$$

We have only one equation for two unknowns, but we haven't yet used the fact that $A$ and $B$ must be nonnegative integers.

Reducing equation $(2)$ modulo $23$ gives $$9B\equiv2\pmod{23}$$ and we find by trial that $$B\equiv13\pmod{23}$$ Since we know frm $(1)$ that $0\leq B\leq37$, the only choices for $B$ are $13$ and $36$. Substituting $B=36$ in $(2)$ gives $A=2$ and then $(1)$ gives $C=-1$, which is impossible, so we try $B=13$. Then $(2)$ gives $A=11$ and $(1)$ gives $C=13$.

saulspatz
  • 53,131
  • Thank you for explaining. Nice answer. I understood most of it but why non negative integers specifically means the remainder method can be applied. Why shouldn't we use it when A,B can be real numbers? – Mohan Sep 29 '19 at 14:41
  • 1
    @Mohan When we reduce $23A+9B=370$ modulo $23$, we are using the fact that the remainder of $23A$ on division by $23$ is $0$. This wouldn't make sense if we didn't know that $A$ is an integer. To get to $9B\equiv2\pmod{23}$ we only use that $A,B$ are integers. When we say the only possibilities for $B$ are $13$ and $36$ we use $0\leq B \leq 37$. So I probably shouldn't have said "non-negative integers", but just "integers." – saulspatz Sep 29 '19 at 14:53