SOLUTION: a farmer has to buy 100 animals using only $100. a chicken costs $0.25 a sheep costs $3.5 and a cow costs $10 how can the farmer buy 100 animals with $100 Thank you :)

Algebra ->  Customizable Word Problem Solvers  -> Misc -> SOLUTION: a farmer has to buy 100 animals using only $100. a chicken costs $0.25 a sheep costs $3.5 and a cow costs $10 how can the farmer buy 100 animals with $100 Thank you :)      Log On

Ad: Over 600 Algebra Word Problems at edhelper.com


   



Question 1190478: a farmer has to buy 100 animals using only $100.
a chicken costs $0.25
a sheep costs $3.5
and a cow costs $10
how can the farmer buy 100 animals with $100
Thank you :)

Answer by math_tutor2020(3817) About Me  (Show Source):
You can put this solution on YOUR website!

x = number of chickens
y = number of sheep
z = number of cows
x,y,z are nonnegative integers

The farmer must buy 100 animals, so,
x+y+z = 100

a chicken costs $0.25
a sheep costs $3.5
and a cow costs $10

Based on those costs, we have
0.25x = cost of the chickens only
3.50y = cost of the sheep only
10z = cost of the cows only

They sum to
0.25x+3.50y+10z
which is the total cost of all the animals.
This stated total cost is $100

0.25x+3.50y+10z = 100

Let's multiply both sides by 100 to clear out the decimals.
0.25x+3.50y+10z = 100
100*(0.25x+3.50y+10z) = 100*(100)
25x+350y+1000z = 10000

--------------------------------------------

So far we have these two equations
x+y+z = 100
25x+350y+1000z = 10000

I'll multiply everything in equation 1 by 25
x+y+z = 100
25(x+y+z) = 25(100)
25x+25y+25z = 2500

So we have these two equations now
25x+25y+25z = 2500
25x+350y+1000z = 10000

Subtract straight down. The x terms will cancel out.
25x-25x goes to 0x
25y-350y goes to -325y
25z-1000z goes to -975z
2500-10000 goes to -7500

This is the new equation we have now
-325y-975z = -7500

--------------------------------------------

To clean things up a bit, we can divide both sides by -25
-325y-975z = -7500
(-325y-975z)/(-25) = -7500/(-25)
(-325y)/(-25)-(975z)/(-25) = -7500/(-25)
13y+39z = 300

Notice how the left side expression 13y+39z factors to 13(y+3z) showing that 13 is a factor of the left hand side.
However, 13 is not a factor of 300 because 300/13 = 23.0769 approximately.

What this means is that the linear diophantine equation
13y+39z = 300
does not have any integer solutions for y & z.
Consequently, it means the original system we started with doesn't have any nonnegative integer solutions for x, y and z.

Therefore, it is impossible to buy 100 animals with $100 based on these prices.
Based on the phrasing, I'm assuming the goal is to have the farmer use up the entire $100 without any change leftover (otherwise there are many solutions possible).

Side note:
I used computer software to check, just to be sure. I made 3 nested arrays loop through from 0 to 100 (for each variable x,y,z).
That means there are 101^3 = 1,030,301 combos to check. An insane amount by hand. But to a computer, that's practically nothing.
For each iteration, the software plugged in the particular x,y,z values into the two original equations mentioned.
As expected, the program found no integer solutions.
I wasn't sure how to show this aspect, but if you're curious then I'll share the source code.

Further thoughts:
Here are some near misses.
Each (x,y,z) triple satisfies x+y+z = 100, but the second equation isn't satisfied.
The closest I could get to $100, while staying under $100, is $99.75
Each of the triples shown below produce that final cost
(x,y,z) = (77,23,0)
(x,y,z) = (79,20,1)
(x,y,z) = (81,17,2)
(x,y,z) = (83,14,3)
(x,y,z) = (85,11,4)
(x,y,z) = (87,8,5)
(x,y,z) = (89,5,6)
(x,y,z) = (91,2,7)
For example, trying the second triple mentioned gets us
x+y+z = 79+20+1 = 100
0.25x+3.5y+10z = 0.25*79+3.5*20+10*1 = 99.75