+---------+-------+
| 8 9 5 1 | R R |
+---------+-------+
| 2 1 6 9 | R B |
+---------+-------+
| 3 6 9 4 | R B |
+---------+-------+
| 4 7 2 1 | R B |
+---------+-------+
| 1 2 3 7 | R R R |
+---------+-------+
Each of the rows in the table given above indicates an attempt to find
out the secret number. Each try has, in the column to the right, the
letters R and B.
Each R indicates that this number has one digit in common with the secret
number, but in a different position.
Each B indicates that this number has one digit in common with the secret
number in the same position.
Determine the secret number.
Suppose 1 is NOT in the number. Then 2,3,7 and TWO of (5,8,9) are (to satisfy the 1st and 5th lines) but that's too many digits. So 1 is part of the secret. Also, it's neither in the 1st nor 4th position since lines 1 and 5 have no B's.
Since two more of (2,3,7) and one more of (5,8,9) are in the secret (again, by lines 1 and 5) and together with 1 that makes four digits, 4 and 6 are not part of the solution. That means, by line 3, that 3 and 9 both are.
If 9 is in along with 1, then 5 and 8 are out by line 1 and 2 is out by line 2. Since 2 is out, 7 is in by line 5.
By line 4, 7 is in the 2nd position (1 can't be the B since line 1 has no B's). Since 1 can't be 1st or 4th, it must be 3rd. Line 2's B is therefore the 9 which must be in the 4th position, leaving the 3 in the 1st position.
The secret is 3719
|
Posted by Paul
on 2013-04-03 19:44:04 |