a,b,c,d are different numbers from each other and 0. abcd is a 4 digits number. ab and cd are two digits numbers.

what should be a,b,c,d to make abcd-(ab*cd) minimum?


(Note: I'm assuming that "$ab$" refers to the two-digit number $10a+b$ and not to $a\times b$, and similarly that $abcd$ refers to the four digit number whose digits are $a,b,c,d$, since otherwise the question makes no sense.)

The answer is


so that

$abcd=1298$, $ab\times cd=1176$, $abcd-ab\times cd = 122$

and this is the minimum that's possible to achieve, because

Write the quantity we're trying to minimize as

$abcd-ab\times cd=(ab\times100+cd)-ab\times cd=ab\times(100-cd)+cd$.

This shows that the dependence on $a$ and $b$ is such that it pays to take $ab$ as small as possible, namely $a=1$, $b=2$, $ab=12$. Then, rewrite the quantity yet again as

$abcd-ab\times cd=(ab\times100+cd)-ab\times cd=ab\times100-(ab-1)\times cd$

which shows that it pays to take $cd$ as large as possible, namely $c=9$, $d=8$, $cd=98$.

  • $\begingroup$ Correct answer. $\endgroup$ – Oray Jan 17 '16 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.