\r\n" );
document.write( "Mary is now M years old\r\n" );
document.write( "Ann is now A years old\r\n" );
document.write( "x = the first mentioned number of years in the past\r\n" );
document.write( "y = the mentioned number of years in the future\r\n" );
document.write( "z = the second mentioned number of years in the past\r\n" );
document.write( "\r\n" );
document.write( "Mary is twice as old as Ann was (x years ago)\r\n" );
document.write( "\r\n" );
document.write( "M = 2(A-x)\r\n" );
document.write( "\r\n" );
document.write( "(x years ago) was when Mary was half as old as Ann will be (y years from now)\r\n" );
document.write( "\r\n" );
document.write( "M-x =
(A+y)\r\n" );
document.write( "\r\n" );
document.write( "(y years from now is) when she (Ann) is three times as old as Mary was \r\n" );
document.write( "(z years ago) \r\n" );
document.write( "\r\n" );
document.write( "A+y = 3(M-z)\r\n" );
document.write( "\r\n" );
document.write( "when she was three times as old as Ann (was z years ago)\r\n" );
document.write( "\r\n" );
document.write( "M-z = 3(A-z)\r\n" );
document.write( "\r\n" );
document.write( "M = 2(A-x)\r\n" );
document.write( "M-x =
(A+y)\r\n" );
document.write( "A+y = 3(M-z)\r\n" );
document.write( "M-z=3(A-z)\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "That's 4 equations in 5 unknowns, so there probably are\r\n" );
document.write( "more than one answer\r\n" );
document.write( "\r\n" );
document.write( " M - 2A + x = 0\r\n" );
document.write( " 2M - A - y - 2x = 0\r\n" );
document.write( "-3M + A + y + 3z = 0\r\n" );
document.write( " M - 3A + 2z = 0\r\n" );
document.write( "\r\n" );
document.write( "Solving that by matrices gives:\r\n" );
document.write( "\r\n" );
document.write( "(M,A,y,z) = (6x,10x,12x,4x)\r\n" );
document.write( "\r\n" );
document.write( "The youngest they could be is when x=1 year ago, y=12 years from now,\r\n" );
document.write( "and z=4 years ago: Mary is now 6, Ann is now 10.\r\n" );
document.write( "\r\n" );
document.write( "The next youngest they could be is when x=2 year ago, y=24 years from now,\r\n" );
document.write( "and z=8 years ago: Mary is now 12, Ann is now 20.\r\n" );
document.write( "\r\n" );
document.write( "The next youngest they could be is when x=3 year ago, y=36 years from now,\r\n" );
document.write( "and z=12 years ago: Mary is now 18, Ann is now 30.\r\n" );
document.write( "\r\n" );
document.write( "etc. etc.\r\n" );
document.write( "\r\n" );
document.write( "Edwin
\r
\n" );
document.write( "\n" );
document.write( " \r
\n" );
document.write( "
\n" );
document.write( "\n" );
document.write( " \n" );
document.write( "