Analyze five clues each a 4 digit code with hints on right digit and right place in the code to find the 4 digit code that will open the number lock.

#### The number lock riddle

Go through the five clues on four digit codes of a number lock and find the code to unlock the number lock:

**Clue 1: Code 8 9 5 1 :** Two digits right but both are at wrong positions.

**Clue 2: Code 2 1 6 9 :** One digit right and in the right place. Another digit right but in wrong place.

**Clue 3: Code 3 6 9 4 :** One digit right and in the right place. Another digit right but in wrong place.

**Clue 4: Code 4 7 2 1 :** One digit right and in the right place. Another digit right but in wrong place.

**Clue 5: Code 1 2 3 7 :** Three digits are right but all are at wrong place.

**Time to solve:** 20 minutes.

### Solution to 4 digit number lock riddle: Can you crack the code?: Key pattern identification and analysis

After examining the five codes, the pattern that stands out,

The pair of digits 1-2 occur together in three of the five codes and the pair 6-9 appear in two of the five codes.

**These significant patterns should be the key to discovering right and wrong digits.**

This is because, we can conclude both 6 and 9 to be wrong when in rule 2 (code 2 1 6 9) both 1 and 2 are right. Next, we can analyze the consequence of both 6 and 9 to be wrong in clue 3 (code 3 6 9 4). **Consequence analysis in a linked series of possibilities should give us the first breakthrough.**

*As digits 1 and 2 occur together in three codes, we will analyze it first.*

#### Consequences of both of the digits 1 and 2 to be right

In clue 2 (code 2 1 6 9), both 6 and 9 are wrong. It follows, from clue 3 (code 3 6 9 4), as both 6 and 9 are wrong, both 3 and 4 are right.

So by clue 4 (code 4 7 2 1), three digits 1, 2 and 4 become right. **It is violation of allowed states by clue 4 ** (only two digits can be right):

Conclusion 1:Both 1 and 2 can’t be right at the same time.

Again, from clue 5 (code 1 2 3 7) conclude,

Conclusion 2:As three of the four digits are right, both 1 and 2 cannot be wrong.

So,

Conclusion 3:Either 1 or 2 is right.

Conclusion 4:From clue 5 (1 2 3 7) with three digits right,both 3 and 7 must be right.

Conclusion 5:From clue 4 (code 4 7 2 1) with two right digits, as one of 1 or 2 is right and 7 is right,digit 4 must be wrong.

Conclusion 6:From clue 3 on code (3 6 9 4), as digit 3 is right and digit 4 is wrongone of the two digits 6 or 9 must be right.

*This forms the fourth right digit.*

The four right digits are:

(Either digit 1 or digit 2), digit 3, digit 7, (either digit 6 or digit 9).

Conclude from clue 1 on code (8 9 5 1) with two right digits,

Conclusion 7:New digits 8 or 5cannot be right,both must be wrong.

It follows,

Conclusion 8from same clue 1,digit 1 and digit 9 both must be right.

It is confirmed then,

Conclusion 9:The right digits are 1, 3, 7 and 9.

#### To find the Positions of the right digits

Examine **clue 1 on code (8 9 5 1)** with positions of two right digits wrong.

Conclusion 10:Position 1 from right is wrong for digit 1.

Now take up **clue 4 on (4 7 2 1)** with position of one right digit right and second right digit wrong and conclude,

Conclusion 11:As position 1 from right is wrong for first right digit 1, the 3rd from right position for 7 must be right for second right digit 7.Code is of form: (? 7 ? ?).

Examine now **clue 2 on code (2 1 6 9)** with position of one right digit right and second right digit wrong and conclude,

Conclusion 12:As 3rd from right position is taken up already by digit 7, digit 1 in the code (2 1 6 9) is in wrong position. So,digit 9 must be in its right position of first from right.Code is of the form, (? 7 ? 9).

Examine **clue 3 on code (3 6 9 4)** with position of one right digit right and second right digit wrong and conclude,

Conclusion 13:As position of digit 9 is wrong,4th from right position of the second right digit 3 must be right.Code is in the form of (3 7 ? 9).

*Digit 1 being the last remaining right digit,* **it must take up the remaining position.**

The code is: (3 7 1 9).

Check all five given codes to verify the correctness of the solution.

Solution is by key pattern identification and step by step reasoning to eliminate invalid values and identify valid ones.

You may try to solve the not so easy puzzle in fewer steps.

### Know how to solve difficult problems easily without wasting time on random attempts

*Our ebook on puzzle solutions by innovative methods will show you just that.*

#### Puzzles for Adults: 50 Brain Teasers with Step-by-Step Solutions: Boost Your Power of Problem Solving

**BUY** the *eBook* **Amazon** **Kindle version*** here*, from

**Google Play**

*and*

**here****Paperback**

*.*

**here**### Puzzles you may enjoy

#### Easy to hard brain teasers with systematic solutions

**Challenging brain teasers with solutions: Long list.**

This will always be the **most up-to-date full list** with the brain teasers **classified into categories** that can be browsed separately.

You may also click on the **category term link below** to enjoy the brain teasers that are classified in the present category.

For example, if the category term link shown below is "Riddle", click on it to go through all the Riddles.