### Brain Teasers

# Mystery Number 8

There is a ten digit mystery number (no leading 0), represented by ABCDEFGHIJ, where each numeral, 0 through 9, is used once. Given the following clues, what is the number?

1) If A > B, then C = 5 or 7, else C = 0 or 1.

2) If B > C, then D = 1 or 2, else D = 4 or 9.

3) If C > D, then E = 6 or 9, else E = 3 or 5.

4) If D > E, then F = 2 or 4, else F = 1 or 6.

5) If E > F, then G = 5 or 6, else G = 0 or 7.

6) If F > G, then H = 1 or 4, else H = 8 or 9.

7) If G > H, then I = 0 or 8, else I = 6 or 7.

8) If H > I, then J = 3 or 8, else J = 2 or 5.

9) If I > J, then A = 3 or 7, else A = 4 or 8.

10) If J > A, then B = 0 or 9, else B = 2 or 3.

1) If A > B, then C = 5 or 7, else C = 0 or 1.

2) If B > C, then D = 1 or 2, else D = 4 or 9.

3) If C > D, then E = 6 or 9, else E = 3 or 5.

4) If D > E, then F = 2 or 4, else F = 1 or 6.

5) If E > F, then G = 5 or 6, else G = 0 or 7.

6) If F > G, then H = 1 or 4, else H = 8 or 9.

7) If G > H, then I = 0 or 8, else I = 6 or 7.

8) If H > I, then J = 3 or 8, else J = 2 or 5.

9) If I > J, then A = 3 or 7, else A = 4 or 8.

10) If J > A, then B = 0 or 9, else B = 2 or 3.

### Answer

8274965103A = 8, B = 2, C = 7, D = 4, E = 9, F = 6, G = 5, H = 1, I = 0, J = 3

1) A = 8 (I < J)

2) B = 2 (J < A)

3) C = 7 (A > B)

4) D = 4 (B < C)

5) E = 9 (C > D)

6) F = 6 (D < E)

7) G = 5 (E > F)

8) H = 1 (F > G)

9) I = 0 (G > H)

10) J = 3 (H > I)

Brute force methods can be used to arrive at a solution. However, process of elimination does work. For example, assign 8 to H. I can not exceed H, so J would have to be 3 (8 already assigned to H). G can not exceed H, so I would have to be either 6 or 7. I would be greater than J, so A would have to be 7 (3 already assigned to J), meaning I would have to be 6. J is less than A, so B would be 2 (3 already assigned to J). A is greater than B, so C would be 5 (7 already assigned to A). The only remaining numeral for G is 0, which means F would have to be greater than G, meaning H would have to be either 1 or 4. H has already been assigned 8, rendering that assignment impossible. Continue eliminating possibilities in the order shown below.

A) H can not be 8. C can not be 1. C can not be 0. B can not be 9. D can not be 1. D can not be 2. F can not be 1.

B) H must be 1. H can not be 4. H can not be 9.

C) G can not be 0. I can not be 6. I can not be 7. B can not be 0.

D) I must be 0. I can not be 8.

E) J can not be 2. J can not be 5. J can not be 8.

F) J must be 3. A can not be 3. B can not be 3. E can not be 3.

G) B must be 2. F can not be 2.

H) A must be 8. A can not be 4. A can not be 7.

I) D can not be 9.

J) E must be 9. E can not be 5. E can not be 6.

K) D must be 4. F can not be 4.

L) F must be 6. G can not be 6.

M) G must be 5. C can not be 5. G can not be 5.

N) C must be 7.

Hide Answer Show Answer

## What Next?

**Solve a Similar Brain Teaser...**

Or, get a random brain teaser.

If you become a registered user you can vote on this brain teaser, keep track of

which ones you have seen, and even make your own.

## Comments

I just did 0123456789, which is that number just not in that order....can that work?

It's been a while since I took Computer Science, but is it just me or is this teaser written in Java code?

Nice challenging teaser, with lots of possibilities to explore. Not sure if I follow your chain of possibilities to eliminate. I did it as follows:

1) Assume H=8, as you did. Leads to a contradiction, H can not be 8.

2) Assume H=9. This then implies FB, C>D, E=6, I=7, DF, G=5, and a contradiction, as that does not leave any legal values for C. So H can not be 9.

3) Therefore, F>G. G can not be 6 or 7. Assume that G=0 (the easiest way to get F>G). Then G F. E must be 9 to be > F. We must have C>D to have E be 9, so C must be 7, since it can not be 5. This implies A>B, and we know B

1) Assume H=8, as you did. Leads to a contradiction, H can not be 8.

2) Assume H=9. This then implies FB, C>D, E=6, I=7, DF, G=5, and a contradiction, as that does not leave any legal values for C. So H can not be 9.

3) Therefore, F>G. G can not be 6 or 7. Assume that G=0 (the easiest way to get F>G). Then G F. E must be 9 to be > F. We must have C>D to have E be 9, so C must be 7, since it can not be 5. This implies A>B, and we know B

Lost a bunch of the analysis in the posting there. Anyhow, the next bit was showing that either B or D must be 9 under the G=0 hypothesis, and both of them lead to contradictions. So F=6 and G=5. Now I must be 0 or 8, 8 leads to contradictions, so I=0, and we get to the given solutions.

Hard enough but solvable

The really simple scip model that I used to solve this teaser can be found at

https://pastebin.com/GPk2xpLC

https://pastebin.com/GPk2xpLC

## Follow Braingle!