SOLVING TELEPHONE CODES
- It takes a computer or a 2nd. player to play this game:
One to provide the secret code and the other to solve it!
- Each guess is recorded with the no. of digits in the
correct position "R" and the no. of digits in the
wrong position "W".
- The winner is determined by the fewest no. of guesses
with the same no. of turns.
- The easiest way to solve codes is to split it into two
halves and giving guesses like
1112222
2R 1W , for a 7 digit code.
This way when you guess the reverse you will get
222
1111
1R 2W with
reverse values.
This is great for combinations from different lines.
The result 222
3333
1R 0W
means that the
1st 3 digits have been uncovered
(ie. 211....
OR
121....
OR
112....
3R 0W
)
- voila,
what can be easier than that!
NOTE:
Usually, with this method, the code can be correctly solved within
2x its code length in no. of guesses.
SOLUTIONS OF TELEPHONE CODES
- SECRET CODE: 9214653
"R" "W"
--------------------
- 000 | 1111 | 0 | 1
- 222 | 3333 | 2 | 0
- 444 | 5555 | 1 | 1
- 666 | 7777 | 0 | 1
- 888 | 9999 | 0 | 1
--------------------
TOTAL 3 + 4 = 7 => all digits found
--------------------
- 111 | 2222 | 1 | 1 => expect "R"-"W"
000 | 3333 | 1 | 0 => gives the same result
--------------------
12. | 3... | ? | ? => 1 of 0/1 and 2 of 2/3
--------------------
- 666 | 8888 | 0 | 1 => expect "W"-"R"
999 | 7777 | 1 | 0 => gives the same result
--------------------
129 | 36.. | ? | ? => 1 of 7/6 and 1 of 8/9
--------------------=> add 45 for luck; work
from right end to left
- 129 | 3645 | 2 | 5 => switch 4/5
- 129 | 3654 | 3 | 4 => assume 4 correct;
switch 56
- 129 | 3564 | 1 | 6 => oops 65 correct;
switch 3/4
- 129 | 4653 | 5 | 2 => assume last 4 correct;
switch 2/9 standard
- 192 | 4653 | 4 | 3 => all wrong;
rotate left standard
- 921 | 4653 | 7 | 0 CODE HAS BEEN SOLVED
- SECRET CODE: 110055710
"R" "W"
----------------------
- 0000 | 11111 | 3 | 3
- 2222 | 33333 | 0 | 0
- 4444 | 55555 | 2 | 0
- 6666 | 77777 | 1 | 0
----------------------
TOTAL 6 + 3 = 9 => all digits found
----------------------
- 1111 | ..... | 2 | 1
0000 | ..... | 2 | 1 => gives the same result
----------------------
1100 | 10... | ? | ? => left side of code done
add a 7 and 44 for luck
----------------------
- 1100 | 10744 | 5 | 2 =>oops no 4s
- .... | 10755 | 1 | 4 => for sure the 5s are
wrong and the left
side is correct keep 7
as correct.
- 1100 | 55710 | 9 | 0 CODE HAS BEEN SOLVED
- SECRET CODE: 00550055555
"R" "W"
------------------------
- 00000 | 111111 | 3 | 1
- 22222 | 333333 | 0 | 0
- 44444 | 555555 | 5 | 1
- 66666 | 777777 | 0 | 0
- 88888 | 999999 | 0 | 0
------------------------
TOTAL 8 + 2 = 8 => all digits found
the extra digit can
only be a 5
------------------------
- 00000 | ...... | 3 | 1 =>no 3s
- 00055 | 055555 | 9 | 2 => chances are good
that a 0 & 5 left
are out of order
the right side is done?
or add 5 more tries!
assume 3 & 2 or 3-2=1
for left side
keep 5 "1R"
rotate right the rest
----------------------
- 00505 | ...... | 3 | 2 => no change:
rotate left again
- 05005 | ...... | 1 | 4 => oops "50" was
correct and our 5 is
not in 1st place so
rotate this 5 left
- 00550 | 055555 | 11 | 0 CODE HAS BEEN SOLVED
- SECRET CODE: 238610688
"R" "W"
----------------------
- 0000 | 11111 | 1 | 1
- 2222 | 33333 | 1 | 1
- 4444 | 55555 | 0 | 0
- 6666 | 77777 | 1 | 1
- 8888 | 99999 | 1 | 2
----------------------
TOTAL 4 + 5 = 9 => all digits found
multiple 1/1s are the
most difficult to
solve
----------------------
- 8888 | ..... | 1 | 2 => =3 total
8... | 88... | ? | ? => deduced only "8"s
----------------------
- 0000 | ..... | 0 | 1 => =2 total"
8... | 8801. | ? | ? => deduced "01"
----------------------
- 2222 | ..... | 1 | 0 => =2 total
823. | 8801. | ? | ? => deduced "23"
----------------------
- 8236 | 88016 | 1 | 8 =>always keep repeated
digits to left
- .... | 88016 | 0 | 5 => 1st 2 digits is not
"88" move it over 2
- .... | 01886 | 1 | 4 => odds are one "8" is
"R" assume 1-1=0 correct
for double
rotate "6" left
- .... | 01868 | 1 | 4 => nochange keep rotating
- .... | 01688 | 3 | 2 => "68" is correct keep
"688" rotate left
- .... | 10688 | 5 | 0 => left must be 1R 3W
so keep "6" and
rotate left
----------------------
- 2386 | 10688 | 9 | 0 CODE HAS BEEN SOLVED
- SECRET CODE: 517816302
"R" "W"
----------------------
- 0000 | 11111 | 1 | 2
- 2222 | 33333 | 1 | 1
- 4444 | 55555 | 0 | 1
- 6666 | 77777 | 0 | 2
----------------------
TOTAL 2 + 6 = 8 => 8/9 still missing
----------------------
- 0000 | ..... | 0 | 1 <<==3 total
1... | 10... | ? | ? => ...
----------------------
- 5555 | 77777 | 1 | 1 <<==3 total
157. | 106.. | ? | ? => left side of code done
----------------------
- 2222 | ..... | 0 | 1 <<==3 total try "8"
since right side is
done
- 1578 | 10623 | 3 | 6 => "8" is correct
- .... | 10623 | 1 | 4 => keep "3" rotate left
- .... | 06213 | 1 | 4 => keep "3" rotate left
- .... | 62103 | 1 | 4 => all wrong: rotate left
- .... | 21036 | 1 | 4 => all wrong: rotate left
- .... | 10362 | 2 | 3 => "62" right: rotate left
- .... | 03162 | 1 | 3 => "2" right: rotate left
- .... | 31602 | 2 | 3 => "02" right: rotate left
- .... | 16302 | 5 | 0 => left is 2R 2W
- 5178 | 16302 | 9 | 0 CODE HAS BEEN SOLVED
|