# Mr. Jones and the logical conundrum

After successfully finding the treasure in The treasure hunt of Mr. Jones, it turned out that the treasure was not so magnificent after all and barely covered the cost of the guides.

Mr. Jones had no choice but to go on his next treasure hunt.

Here we are now in front of a new maze of rooms hiding a new treasure to be found!

According to some information collected beforehand, it would seems that the rooms are connected as such :

1 -> 2,4
2 -> 1,3,5
3 -> 2,6
4 -> 1,5,7
5 -> 2,4,6,8
6 -> 3,5,9
7 -> 4,8
8 -> 5,7,9,10
9 -> 6,8
10 -> 8

And the treasure should be in room number 10.

In the entrance, in front of the maze, a big stone table with a red button in the middle can be seen. After further investigation, the following scribbles from previous treasure hunters were found carved on the table :

X
E  F
B  C  D
9  A
6  7  8
4  5
1  2  3

1 = 2!&3
2 = 1|3
3 = 1!&2
4 = 1
5 = 3
6 = 1X!|3
7 = 2&9&A
8 = 6X|B
9 = BX|D
A = 9X|B
B = !D
C = B&D
D = 4!|5
E = 3X!|B
F = 6X!|8
X = E!|F

Behind the table, the doors leading to room 1,2 and 3 could be accessed.
Mr. Jones then proceeded to open the door to the room 2, but it was locked.
Perplexed, he then tried to open the door to the room 3 and it was unlocked!
He then entered the room number 3 and proceeded to open the door in front of him, but it was locked.
Frustrated, Mr Jones went back outside and tried to open the door to room 2 again. "HaHa!" he exclaimed as the door opened. After entering room 2, he tried to open the door in front of him but it was locked.
The now fulminating Mr Jones went back outside and smashed the red button on the table. To his surprise, all the doors were automatically closed.

Can you help Mr. Jones find the treasure?

HINT

After regaining his calm, Mr. Jones decided to try one more time. He went into the room 1 without problem, but the door in front of him was locked, he went back out and into the room 2 again without problem. He went back out and tried to go into room 3 but the door would not open. Back into room 2, he was able to open the doors to his left but then could not progress any further. Back to the reset button!

• I didn't even try to solve it yet, but I can make sense of most of it. There are only a couple things bothering me that require some clarifications in my opinion : A door has three states : locked (closed), unlocked (closed) and opened, right? The "mechanisms" on each door are active as long as the door is open, correct? And then come problems of comprehension of the tablet : for example, is "3X!|B" the same as "3 & X! | B" or does it mean "3! & X! | B"? – Dorian Fusco Jan 25 '17 at 9:11
• @DorianFusco Once a door is opened, it stays open as long as you don't hit the reset button. As for the scribbles, it is part of the mystery that must be solved. I am sorry but that is all I am willing to say for now. – stack reader Jan 25 '17 at 9:18
• I'm really not sure we have enough informations to break the "Treasure Hunter code". The problem being that, assuming "|" means "OR", "&" means "AND" and "!" means "NOT" (although it should be placed before a statement, not after one, or, as I suspect, before an operator), no door could be unlocked at the beginning, so the only conclusion I can have is that I'm misinterpreting (some of) the operators, but I can't guess their meaning with that few information, I'd need Mr Jones to try more doors to figure it out. As of now, I can only make sense out of "a = b|c" thanks to the 2nd door he opened – Dorian Fusco Jan 25 '17 at 15:45
• Unless "a = b !& c" actually means "a = !b | !c" and "a = b !| c" means "a = !b & !c", but, again, I can't make sure of that because of the lack of information... – Dorian Fusco Jan 25 '17 at 15:55
• @DorianFusco: I think it might be more than just boolean operators, since the door to room 5 (the door he tried inside room 2) should have been unlocked if that's the case (since I assume 5=3 means if 3 is unlocked 5 is unlocked as well). – justhalf Jan 25 '17 at 16:04

The rooms look like (10 is 0):

|123|
|456|
|789|
| 0 |

The doors look like this (T is treasure, R for room):

|1 2 3|
|- - -|
|R|4|R|5|R|
|- - -|
|6 7 8|
|- - -|
|R|9|R|A|R|
|- - -|
|B C D|
|- - -|
|R|E|R|F|R|
| - |
| X |
| - |
| T |

Here is my interpretation of the symbols:

! is n
X is x except for the last clue

So:

1 = 2 nand 3
2 = 1 or 3
3 = 1 nand 2
4 = 1
5 = 3
6 = 1 xnor 3
7 = 2 and 9 and A
8 = 6 xor B
9 = B xor D
A = 9 xor B
B = not D
C = B and D
D = 4 nor 5
E = 3 xnor B
F = 6 xnor 8
X = E nor F

Then:

A door is represented as high if and only if the door is open (and unlocked). Furthermore, if the right-hand-side of the 'equation' is high, the door on the left is unlocked, otherwise it is either already open or locked.

A way to get to the treasure and to open every door:

1, 3, 2, 6, 8, B, A, 9, D, 4, 5, 7, C, X, E, F

• Mr. Jones is very grateful for your help! – stack reader Jan 26 '17 at 1:13
• @stackreader Was it necessary to open all the doors or were E and F just in there as a distraction? – boboquack Jan 26 '17 at 2:21
• If they were opened at any point before the treasure room, the door would be forever locked. There was no need to open them. But there was a need to not open them. – stack reader Jan 26 '17 at 2:26
• @stackreader , in your hint, how could Mr Jones open door 4 and 5? Room 3 was locked – Dorian Fusco Jan 26 '17 at 7:54
• @DorianFusco Seems like I made a slight mistake about door 5. Must have written the hint too quickly. Thanks for noticing. – stack reader Jan 26 '17 at 8:08