# SafeCracker #1 - Look who's talking

## The Plot

You work for a tech company in Tampa, FL. Recently there was a break-in, and the company's trade secrets were stolen.

Company PI have tracked the briefcase containing the secrets to the building you are in now. They are in three different places.

Decypher Keycode and open first safe.

Safe 1 Instructions

Unless you know the combo, you need to use their backdoor. That involves answering a challenge question... Question: Your college professor thinks of two consecutive numbers between 1 and 10. There are two students nearby, and he has promised automatic A++ for their final exam to whomever guesses correctly.

The first student knows one number and the second student knows the second number. The following exchange takes place:

First Student: I do not know your number.

Second Student: Neither do I know your number.

First Student: Now I know.

There are 4 possible solutions. Append the 4 solutions to make one number from largest to smallest. This will be the safe combination.

Time running out...

WHAT IS THE COMBO?

When the correct combination is entered, the second in this series will be posted.

Good Luck!

Welcome to my SafeCracker series. I used to write similar programs in Assembly for others to try to "crack" back in the day. I thought it fun to re-visit. And please try solving yourself before Googling, as of course, this question similarly will be posted somewhere on the net. Try first! :)

• Is the second number the greater one, or can it be either way? May 1, 2019 at 23:23
• Well, since the numbers will be consecutive, it doesn't matter. But when you find all 4 numbers, you must arrange them largest to smallest to obtain the safe combination. Good Luck, May 1, 2019 at 23:43

9887

because

The first student's number (x) cannot be 10, because they would know that the second student's number (y) is 9. However, x=9 and y=8 works. In the same way, x=8 and y=7 works. Since you said that there were four numbers, I don't need to continue!

## EDIT

x=3 and y=2 could also work as well as x=4 and y=3, but the four largest are above...

• great work. Thank you for posting your workflow you used, so others can see how you came to the solution. Nice work. Thanks for participating.. May 2, 2019 at 1:17
• @JohnS. Thanks! When's the next part? May 2, 2019 at 1:20
• since you found the first of the three "cases" , then I suppose it's time to head on over to SafeCracker #2. This house has much better security, lol. See you tomorrow! May 2, 2019 at 1:24
• Wonderful! I can't wait! May 2, 2019 at 1:25

Is the code

9832?

I'm going to call the students A and B, and their numbers a and b.

* a is not 10. Otherwise the first statement is false.
* a can be 9. If b is 8, then the conversation makes sense.
* a can be 8. If b were 9, then B could deduce that a is not 10 from the first statement, and know A's number. However, B doesn't know it, which is why A knows b can not be 9, and therefore knows that b must be 7.
* a is not 4,5,6 or 7. The first two statements wouldn't give A enough information to deduce B's number.
* a can be 3. This is exactly symmetrical with the possibility of a=8.
* a can be 2. Symmetrical with a=9.
* a is not 1. Symmetrical with a=10.

• I am new here, so I am unsure how to answer that. Do I post the answer as a "Hint" like you did, or can I respond via private message? In short, however, no unfortunately that is not correct. May 1, 2019 at 23:47
• @JohnS. there are no private messages on Stack Exchange. The usual method is to wait for the correct answer, possibly giving hints in the comments, or if no-one answers, at about 24h intervals in the question itself. Once someone posts an acceptable answer, you click on the "accept" checkmark on the left side of that answer. (Also, I fixed my off-by-one error :-)
– Bass
May 1, 2019 at 23:51
• !> You got the first two May 1, 2019 at 23:58
• @JohnS. and not the symmetrical cases? I must be missing something very silly then.
– Bass
May 2, 2019 at 0:03