document.write( "Question 974845: Cookies are sold singly or in packages of 13 or 39. With this packaging, how many ways can you buy 78 cookies? \n" ); document.write( "
Algebra.Com's Answer #596651 by Edwin McCravy(20056)\"\" \"About 
You can put this solution on YOUR website!
Cookies are sold singly or in packages of 13 or 39.
\n" ); document.write( "With this packaging, how many ways can you buy 78 cookies?\r
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "Just by trial and error you can easily get the answer\r\n" );
document.write( "\r\n" );
document.write( "1. 2 boxes of 39, \r\n" );
document.write( "2. 1 box of 39 and 2 boxes of 13, and\r\n" );
document.write( "3. 6 boxes of 13.\r\n" );
document.write( "\r\n" );
document.write( "If you're supposed to use algebra or number theory, then\r\n" );
document.write( "\r\n" );
document.write( "Let x = the number of packages of 13 cookies\r\n" );
document.write( "Let y = the number of packages of 39 cookies.\r\n" );
document.write( "\r\n" );
document.write( "That leads to the Diophantine equation:\r\n" );
document.write( "\r\n" );
document.write( "13x + 39y = 78\r\n" );
document.write( "\r\n" );
document.write( "Divide through by 13\r\n" );
document.write( "\r\n" );
document.write( "x + 3y = 6\r\n" );
document.write( "\r\n" );
document.write( "x = 6 - 3y\r\n" );
document.write( "\r\n" );
document.write( "x ≥ 0, y ≥ 0\r\n" );
document.write( "\r\n" );
document.write( "6 - 3y ≥ 0\r\n" );
document.write( "\r\n" );
document.write( "   -3y ≥ -6\r\n" );
document.write( "     \r\n" );
document.write( "     y ≤ 2\r\n" );
document.write( "\r\n" );
document.write( "Also y ≥ 0 so\r\n" );
document.write( "\r\n" );
document.write( "0 ≤ y ≤ 2\r\n" );
document.write( "\r\n" );
document.write( "Since y is an integer, y can only take on the values 0,1, and 2.\r\n" );
document.write( "\r\n" );
document.write( "So the answer is 3.\r\n" );
document.write( "\r\n" );
document.write( "They are 2 boxes of 39, \r\n" );
document.write( "1 box of 39 and 2 boxes of 13, and\r\n" );
document.write( "6 boxes of 13. \r\n" );
document.write( "\r\n" );
document.write( "Edwin
\n" ); document.write( "
\n" );