Brainstorming !! I send a famer to buy 100 animals with
$100.00 dollars,how many off each he can buy? Ducks $10
each, pigs $3.00 each, chicks .50¢ each?? 2 possible
answers.
This is a number theory problem, three unknowns but only
2 equations with the stipulation that all 3 variables can
only be non-negative integers.
D + P + C = 100
$10.00D + $3.00P + $0.5C = $100.00
Multiply the second equation by 10 and remove the dollar signs:
100D + 30P + 5C = 1000
Divide it through by 5
1) 20D + 6P + C = 200
Solve the first equation for D = 100 - P - C
Substitute that into
20D + 6P + C = 200
20(100 - P - C) + 6P + C = 200
2000 - 20P - 20C + 6P + C = 200
2000 - 14P - 19C = 200
1800 = 14P + 19C
2) 14P + 19C = 1800
The smallest coefficient in absolute value is 14,
so we write 19 and 1800 in terms of their nearest
multiple of 14. [We divide 1800/14 = and get
approximately 128.6, so the nearest multiple of
14 to 1800 is 128*14 = 1792, so 1800 = 1792 + 8
14P + (14 + 5)C = 1792 + 8
14P + 14C + 5C = 1792 + 8
We divide each term by 14
P + C + 5C/14 = 128 + 8/14
Get the fractions on the left and the other terms
on the right:
5C/14 -8/14 = 128 - P - C
Since the right side is an integer, so is the left side.
Let that integer by A, Then
3) 5C/14 - 8/14 = A
4) 128 - P - C = A
Clear 3) of fractions
5C - 8 = 14A
5) 5C - 14A = 8
The smallest coefficient in absolute value is 5,
so we write 14 and 8 in terms of their nearest
multiple of 5.
5C - (15-1)A = 10-2
5C - 15A + A = 10-2
Divide through by 5:
C - 3A + A/5 = 2-2/5
Get the fractions on the left and the other terms
on the right:
A/5 + 2/5 = 3A - C + 2
Since the right side is an integer, so is the left side.
Let that integer by B, Then
6) A/5 + 2/5 = B
7) 3A - C + 2 = B
Clear 6) of fractions:
A + 2 = 5B
A = 5B-2
Substitute 5B-2 for A in 7)
3(5B-2) - C + 2 = B
15B - 6 - C + 2 = B
15B - 4 - C = B
14B - 4 - C = 0
14B - 4 = C
C = 14B - 4
Substitute 12B - 4 for C and 5B-2 for A in 4)
128 - P - C = A
128 - P - (14B-4) = 5B - 2
128 - P - 14B + 4 = 5B - 2
132 - P - 14B = 5B - 2
134 - 19B = P
P = 134 - 19B
Substitute 134-19B for P, 14B-4 for C, and 5B-2 for A in 1)
1) 20D + 6P + C = 200
20D + 6(134-19B) + 14B-4 = 200
20D + 804 - 114B + 14B - 4 = 200
20D + 800 - 100B = 200
20D = 100B - 600
D = 5B - 30
So
D = 5B - 30
P = 134 - 19B
C = 14B - 4
Each of those must be non-negative integers, so
5B - 30 >= 0 134 - 19B >= 0 14B - 4 >= 0
5B >= 30 -19B >= -134 14B >= 4
B >= 6 B <= 7.0526 B >= 2/7
B <= 7
Therefore B is 6 or 7
If B=6, then
First answer:
D = 5B - 30 = 5(6)-30 = 30 - 30 = 0 ducks
P = 134 - 19B = 134-19(6) = 134 - 114 = 20 pigs
C = 14B - 4 = 14(6)-4 = 84-4 = 80 chickens
If B=7, then
Second answer:
D = 5B - 30 = 5(7)-30 = 35 - 30 = 5 ducks
P = 134 - 19B = 134-19(7) = 134 - 133 = 1 pigs
C = 14B - 4 = 14(7)-4 = 98-4 = 94 chickens
Edwin