All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
Secret Code (Posted on 2005-03-10) Difficulty: 2 of 5
An intellingence agency wants to have codes. For this it uses two digit natural numbers such that the two digits are different. Each of these codes are written on different sheets of paper so as to be used. However, the director of the agency soon realizes that many codes are not uniquely recognisable.
For example, 61 and 19 is one such pair because when the sheet of paper is read upside down, a different number may be read. However, 01 is invalid (no leading zeroes).

How many useful codes are there that the agency can use?
Note: The only digits that make sense when inverted are 0,1,6,8 and 9.

See The Solution Submitted by Sandeep    
Rating: 2.3333 (9 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 32 of 33 |

There are 76 two-digit numbers the intelligence agency can use.

Of the 90 non-leading zero two-digit numbers, nine numbers share duplicate digits (i.e., 11, 22, 33, 44, 55, 66, 77, 88, 99). Thus, there are 81 non-leading zero, different two-digit numbers. Of these, there are 15 numbers that when viewed upside-down display a recognizable number.

60, 80 and 90 when viewed upside-down are 09, 08 and 06, but as the latter three are invalid, the former three can remain as valid codes without any confusion with other valid codes when turned upside down.

Two of the numbers, 69 and 96, when viewed upside-down remain as 69 and 96, thus each may remain as valid codes for the agency's use.

Of the remaining ten, when viewed upside down, half will be the upside-down version of the other half:

  • 16 <=> 91
  • 18 <=> 81
  • 19 <=> 61
  • 68 <=> 89
  • 86 <=> 98
Of these ten, the agency could identify half for use and invalidate the other half, thus when viewed upside-down, the codes upside down would not be confused as valid codes.

Thus, the agency's codes may be comprised of the following 76 two-digit numbers:

10, 12, 13, 14, 15, 17, 20, 21, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 45, 46,
47, 48, 49, 50, 51, 52, 53, 54, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 67, 69,
70, 71, 72, 73, 74, 75, 76, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 89, 90, 91,
92, 93, 94, 95, 96, 97

(In the example of codes above, the agency has chosen to use the higher numbered digit pair, invalidating the the lower digit pair, when the number viewed upside-down appears as a different two-digit number).

Edited on July 6, 2008, 11:09 pm
  Posted by Dej Mar on 2008-07-06 21:17:01

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information