Given that a*b + c = 160, where each of a, b and c are positive integers.
Determine the minimum value of a + b*c.
Extra Challenge: Solve this using only pen and paper.
The smallest c can be is 1, leaving 159=3*53 for a*b giving 56 for a+b*c, regardless of whether we choose 3 or 53 as a or b, which we might suspect would then be the minimum value.
158=2*79
157 is prime, etc.
It looks to me that nothing will better 56.
Now to verify that with a computer program:
DEFDBL A-Z
min = 99999
FOR c = 1 TO 159
ab = 160 - c
FOR a = 1 TO ab
b = ab / a
IF b = INT(b) THEN
v = a + b * c
IF v <= min THEN
PRINT a; b; c, v
min = v
END IF
END IF
NEXT
NEXT
finds a better answer: (a,b,c)= (26, 6, 4) yielding 50.
|
Posted by Charlie
on 2013-09-17 13:49:24 |