# Codes with no confusion

1. Oct 31, 2014

### Robert Houdart

1. The problem statement, all variables and given/known data

An intelligence agency forms a code of two distinct digits selected from 0, 1 , 2…, 9, such that the first digit of the code is nonzero. The code, handwritten on a slip, can, however, potentially create confusion when read upside down - for example; the code 91 may appear as 16. How many codes are there for which no such confusion can arise?

2. The attempt at a solution
This is the methodology I used:
Since the first digit cannot be zero, therefore it can be chosen in 9 ways while no restriction occurs on the second number, therefore it can be chosen in 10 ways.Thus, the total number of ways is 10*9=90...

Since 1,6,8,9 can create confusion, therefore there exist 12 such numbers which will create confusion. However the pair 69 and 96 do not come under this category.

2. Oct 31, 2014

### Simon Bridge

Mod note: This post was a response in a separate cross-posted thread.
... there are not nine possible choices for the 1st digit. Which other digits are excluded?
... there you go ... so how many digits may be chosen from for the 1st number and how many for the second number?
... good thinking - these are numbers that are the same upside down ... are there others? i.e. what about 11?

Last edited by a moderator: Oct 31, 2014
3. Oct 31, 2014

### Robert Houdart

Mod note: This post was a response in a separate cross-posted thread.Ok, I think I got it. Since they are distinct numbers, the first digit can be chosen in 9 ways (except 0) while the second can also be chosen in 9 ways, making it 81 numbers instead of 90.. So am I right this time?

Last edited by a moderator: Oct 31, 2014
4. Oct 31, 2014

### haruspex

Are you sure it's only 12? Spell out your logic.

5. Oct 31, 2014

### Robert Houdart

well , considering 69 and 96 total number pertains to 10

6. Oct 31, 2014

### haruspex

No, I mean I think you missed a few before discounting those two. I think it will help if you write out in detail your reasoning for the count of 12.

7. Oct 31, 2014

### Robert Houdart

(16,61) (18,81) (19,91) (68 ,86) (89, 98) i think these are all (actually total number of numbers were 81 instead of 90 (digits must be distinct)

8. Oct 31, 2014

### haruspex

Ah, that explains it. I missed that condition.