document.write( "Question 7008: A farmer buys 100 animals at a cost a total of $100. He buys hens for $0.50, pigs for $2.00, and sheep for $10.00 each. How many does he buy of each.
\n" );
document.write( " We have not been able to put a formula together. We have tried mutilple unknowns etc. But nothing works. Could you possible help us with some hint at what formula that might helps us over the hump. Thank you in advance.
\n" );
document.write( " The Lost Pre-Math Children of Tigrett in Jackson,Tn.
\n" );
document.write( " \n" );
document.write( "
Algebra.Com's Answer #3842 by khwang(438)![]() ![]() ![]() You can put this solution on YOUR website! A farmer buys 100 animals at a cost a total of $100. He buys hens for $0.50, \n" ); document.write( "pigs for $2.00, and sheep for $10.00 each.\r \n" ); document.write( "\n" ); document.write( " First of all, don't feel too bad because you could not solve it.\r \n" ); document.write( "\n" ); document.write( " Sol: Let x: # of hens, y: # of pigs, z = # of sheeps \n" ); document.write( " x + y + z =100 ...(1) \n" ); document.write( " 0.5x + 2y + 10z = 100 ...Convert it to [No decimals ] \n" ); document.write( " x + 4y + 20 z = 200 ...(2) \r \n" ); document.write( "\n" ); document.write( " This is a system of linear equations in 3 variables, while only two equations \n" ); document.write( " of constraints are given. According to linear algebra, there are infinitely many solutions generally. (the solution space is a line)\r \n" ); document.write( "\n" ); document.write( " But, since x,y and z here are non-negative integers, so the possible \n" ); document.write( " solutions must be finite (or no solutions. Note: 0 <= x,y,z <= 100 from eq. (1)\r \n" ); document.write( "\n" ); document.write( " Fortunately, you don't have to try all those 101 triples of possible solutions \n" ); document.write( " and so you would not be crazy.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( " Now let's begin to look for nnenegative integer solutions for (1) and (2).\r \n" ); document.write( "\n" ); document.write( " Focus on the variable z (with the largest coefficient 10) , \n" ); document.write( " By 0 <= 10 z <= 100,we see that 0 <= z <= 9 (cannot be 10,why ?) \n" ); document.write( " \n" ); document.write( " And, from (2) -(1), we get \n" ); document.write( " 3y + 19 z = 100 \n" ); document.write( " Thus, we have 3 y = 100 - 19z ...(3) \n" ); document.write( " So, 0 <= z <=5\r \n" ); document.write( "\n" ); document.write( " Begin to try:\r \n" ); document.write( "\n" ); document.write( " Try z = 0 , 3 y = 100 \n" ); document.write( " we get y = 100/3. No,illegal\r \n" ); document.write( "\n" ); document.write( " Try z = 1, 3 y = 81 \n" ); document.write( " So, y = 27, x = 72. Positive integers, OK \r \n" ); document.write( "\n" ); document.write( " Try z = 2, 3 y = 100 - 38 = 62. No,illegal \n" ); document.write( " \n" ); document.write( " Try z = 3, 3 y = 100 - 57 = 43. No,illegal \n" ); document.write( " \n" ); document.write( " Try z = 4, 3 y = 100 - 76 = 24. \n" ); document.write( " So, y = 8, and x = 100 - y - z = 100 - 12 = 88. (OK) \n" ); document.write( " \n" ); document.write( " Try z = 5, 3 y = 100 - 95 = 5. No,illegal \r \n" ); document.write( "\n" ); document.write( " Therefore, we obtain two sets of integer solutions (72,27,1) and (88, 8, 4).\r \n" ); document.write( "\n" ); document.write( " By the way, if you could not get equation as 3y + 19 z = 100, and so the \n" ); document.write( " restriction 0 <= z <= 5. \n" ); document.write( " Then,you may have to exhaust trying all z from 0 to 9. \n" ); document.write( " Anyway,be smart to have some basic feeling about integers, then you can solve \n" ); document.write( " this question faster.\r \n" ); document.write( "\n" ); document.write( " If you have learned something related to linear algebra,then after you get \n" ); document.write( " one set of solution ,say (72, 27, 1)\r \n" ); document.write( "\n" ); document.write( " Then, use the following prametric equations concerning determinant: \n" ); document.write( " x -72 y -27 z -1 \n" ); document.write( " ------ = ----- = ----- = t, \n" ); document.write( " 16 -19 3 \r \n" ); document.write( "\n" ); document.write( " Or equivalently : \n" ); document.write( " x = 72 + 16 t, \n" ); document.write( " y = 27 - 19 t, \n" ); document.write( " z = 1 + 3 t. \n" ); document.write( " Since, 0 <= z <= 9, we have 0 <= t <= 2 \n" ); document.write( " Also,note that y = 27 - 19 t >= 0, so 0 <= t <= 1. \n" ); document.write( " Try t = 1, x = 88, y = 8, z = 4. (OK.. and no more solutions)\r \n" ); document.write( "\n" ); document.write( " Kenny \n" ); document.write( " \n" ); document.write( " \r \n" ); document.write( "\n" ); document.write( " \n" ); document.write( " \n" ); document.write( " |