document.write( "Question 1204708: In the USA, ZIP codes are used as an alternative to the postcode system
\n" ); document.write( "used in the UK. A ZIP code is a five-digit number which may start with a
\n" ); document.write( "zero - so there are, in total, 100 000 possible ZIP codes, from 00000 to
\n" ); document.write( "99999.
\n" ); document.write( "Some ZIP codes are ambiguous, meaning that, when shown on a digital
\n" ); document.write( "display, they would show a different code if read the wrong way up.
\n" ); document.write( "For example, 10118 (which happens to be the ZIP code for the Empire
\n" ); document.write( "State building in New York), if read upside-down, would be 81101 (the
\n" ); document.write( "ZIP code for Alamosa, a town in Colorado), so both 10118 and 81101 are
\n" ); document.write( "ambiguous ZIP codes.
\n" ); document.write( "Given that the figures used on a digital display are the ones shown
\n" ); document.write( "below (0 1 2 3 4 5 6 7 8 9), determine the total number of non-ambiguous ZIP codes.
\n" ); document.write( "

Algebra.Com's Answer #841166 by ikleyn(52788)\"\" \"About 
You can put this solution on YOUR website!
.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "        My understanding is different, and therefore my solution and my answer are different.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "        As I understand from the problem's description, we should look in each 5-digit number (ZIP-code)\r
\n" ); document.write( "\n" ); document.write( "        and compare it with another ZIP-code, as if we look \"upside-down\".\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "        \"Upside-down\" means that every digit is rotated 180 degrees about its center \"highlight%28highlight%28AND%29%29\" the order of digits \r
\n" ); document.write( "\n" ); document.write( "        is opposed to the original order (reversed).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "        Non-ambiguous codes are those that look the same when we look at them as they are written
\n" ); document.write( "        and as we look at them \"upside-down\".\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "I consider two categories of digits.\r\n" );
document.write( "\r\n" );
document.write( "First category are those digits, that transform to themselves (with no change)\r\n" );
document.write( "under the rotation 180 degrees about their center.\r\n" );
document.write( "\r\n" );
document.write( "This set of digits is T = { 0, 1, 5, 8 }.         (T originates from word \"Themselves\").\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Second set are those digits, that transform to some (other or the same) digit \r\n" );
document.write( "under the rotation 180 degrees about their center.\r\n" );
document.write( "\r\n" );
document.write( "This set of digits is D = { 0, 1, 5, 6, 8, 9 }.   (D originates from word \"Digits\").\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Notice that set D contains set T as a sub-set.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Now, non-ambiguous numbers are the numbers of the form\r\n" );
document.write( "\r\n" );
document.write( "    \"d%5B1%5D\" \"d%5B2%5D\" \"t\" \"%28d%5B2%5D%29%5Et\" \"%28d%5B1%5D%29%5Et\"\r\n" );
document.write( "\r\n" );
document.write( "where a digit \"%28d%5Bi%5D%29%5Et\" designates the image  of a digit \"d%5Bi%5D\" from the set D\r\n" );
document.write( "\r\n" );
document.write( "under rotation 180 degrees about their center; \"t\" is from set T.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "In the first  (leftmost) position,                    we       have 6 possible digits from set D.\r\n" );
document.write( "\r\n" );
document.write( "In the next,  second position from leftmost position, we again have 6 possible digits from set D.\r\n" );
document.write( "\r\n" );
document.write( "In the next,  third position from leftmost position,  we       have 4 possible digits from set T.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "These 6*6*4 = 144 digits are our \"independent variables\".\r\n" );
document.write( "\r\n" );
document.write( "In the 4-th and 5-th position, we have \"derivative\" digits, so they are not \"independent variables\".\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "Thus, the total number of all possible 5-digit zip-codes is 10,000.\r\n" );
document.write( "\r\n" );
document.write( "Of them,  6*6*4 = 144  codes are non-ambiguous: they remain the same when we look at them upside-down.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "ANSWER.  The number of non-ambiguous zip-codes is 144.\r\n" );
document.write( "
\r
\n" ); document.write( "\n" ); document.write( "Solved.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );