0

An intermediary bought $\,x\,$ units of a commodity at a price of $\,€27\,\,$ and sold $\,y\,$ units at a price of $\,€37\,\,$ on $\,4$ April this year. In doing so, he made a profit of $\,€89\,\,$ earned.

The following task is given for this purpose: How much did he buy and sell on that day, if he buys a maximum of $\,50\,$ units every day?

Intuitively, I would say that this task can be solved with a linear Diophantine equation. $$ax+by= gcd(a,b)$$ and $$gcd(a,b)|c$$

$$27x+37y = c$$ But now I am at a loss as to which value is $\,c\,$ and how to proceed with $\,€89\,$ and $\,50$!

poetasis
  • 6,338
  • I believe your equation isn't correct - given that they bought x units for 27 C each, and sold y units for 37, that means their net profit is 37y - 27x, and since that's 89, your equation should be $37y - 27x = 89$ -> $37y = 27x + 89$ and from there you get x = 94, y = 71 i believe. – Math Man Apr 16 '23 at 15:50
  • Clarification requested: If the intermediary happened to buy 4 units and sell 3 units, then the intermediary's profit is $~(3 \times 37) - (4 \times 27) = 3.~$ However, the intermediary also has the additional profit of 1 unsold unit, that he can later sell. Is the intermediary's profit, in this situation, to be regarded as $~3~$ or is it to be regarded as $~3~$ plus the cost of the unsold unit? – user2661923 Apr 16 '23 at 15:55
  • @Math Man: At first glance, this also seems quite plausible to me. But I can't solve this question with that, can I? (How much did he buy and sell on that day, if he buys a maximum of 50 units every day?) –  Apr 16 '23 at 16:45

1 Answers1

1

Since 89 = 37y - 27x, we get two congruences with which we can compute x and y.

First $89 \equiv -27x \equiv 15 \mod 37$. Solve for x and you get $x \equiv 20 \mod 37$.

Second $89 \equiv 37y \equiv 8 \mod 27$. Solve for y to get $y \equiv 17 \mod 27$.

Now, 20 is the only solution for x that is positive and less than or equal to 50. So x = 20.

On the other hand, y can be either 17 or 44. Of course, since only 20 were bought then he can’t have subsequently sold more than that. So y = 17.

For verification: $37*17 - 27*20 = 629 - 540 = 89$