document.write( "Question 1163188: Hello:\r
\n" ); document.write( "\n" ); document.write( "Can you help setup and solve this question:\r
\n" ); document.write( "\n" ); document.write( "Mary went shopping and bought some pencils $1 each, notebooks $2 each and pens $3 each. If she spent a total of $12, how many of each item did she purchase?\r
\n" ); document.write( "\n" ); document.write( "The answer stated is 4 pencils, 1 notebook and 2 pens. I don't understand how they arrived at that answer.\r
\n" ); document.write( "\n" ); document.write( "Thanks in advance.
\n" ); document.write( "

Algebra.Com's Answer #787189 by ikleyn(52781)\"\" \"About 
You can put this solution on YOUR website!
.
\n" ); document.write( "
\r\n" );
document.write( "\r\n" );
document.write( "From the condition, we have one equation for total money\r\n" );
document.write( "\r\n" );
document.write( "    x + 2y + 3z = 12  dollars   (1)\r\n" );
document.write( "\r\n" );
document.write( "which should be solved in positive integer numbers x (the number of pensils), y (the number of notebooks)  \r\n" );
document.write( "and z (the number of pens).\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "    At this point, the setup is just completed.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Under given conditions, the problem has several solutions (more than one).\r\n" );
document.write( "\r\n" );
document.write( "The solution you mention is only one possible of several.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "The full list of the solutions is in the Table below\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "     T  A  B  L  E  \r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "     x     y     z\r\n" );
document.write( "---------------------------\r\n" );
document.write( "\r\n" );
document.write( "     1     1     3\r\n" );
document.write( "\r\n" );
document.write( "     2     2     2\r\n" );
document.write( "     4     1     2\r\n" );
document.write( "\r\n" );
document.write( "     1     4     1\r\n" );
document.write( "     3     3     1\r\n" );
document.write( "     5     2     1\r\n" );
document.write( "     7     1     1\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "So, the given answer is only one possibility,\r\n" );
document.write( "\r\n" );
document.write( "and actually, 6 other are possible, giving the full number of solution as 7.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "    The way to find all these solutions is well organized \"trials and errors\" method.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "    To get the idea of this method, look in the table and see how I go down from the highest possible values of z;\r\n" );
document.write( "    then see how I go down from the highest possible values of y, at given fixed value of z.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "    It is a kind of a \"descend method\" with the use of lexicographic (~ alphabetic) ordering of unknowns. \r\n" );
document.write( "
\r
\n" ); document.write( "\n" ); document.write( "-----------\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Solved, explained and completed.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );