20
$\begingroup$

A party is being held at a local mansion. The host is very rich and his success is because of one thing ~ his famous recipe for spaghetti!

The spaghetti recipe is kept in a secret room inside the mansion, which is only accessible from the kitchen, which can be only reached from the party lounge, which is separated from the security lobby by a floor where elephants have been reported to occasionally trample fishy guests.

The mansion has two entrances to the security lobby, and all adjacent rooms are connected by two doors.

Your task is to enter the mansion, sneak into the secret room, steal the spaghetti recipe and get out again. Here is a plan of the mansion.

Spaghetti Mansion

In this puzzle, you start as the number 1 outside the mansion and each time you pass a door, an operation indicated on the door will change your number. After leaving the mansion with the recipe, you must be again number 1 as when you came in.

You can pass all doors multiple times in both directions, but the less, the better, otherwise the security may become suspicious and you don't want them to release the elephants :) The shortest solution wins.

$\endgroup$
7
  • $\begingroup$ What happens at root(5) or 3/2? $\endgroup$
    – Mohit Jain
    Commented Nov 14, 2014 at 8:31
  • $\begingroup$ root 5? There's no root five in this puzzle nor you can get one. It multiple by root two. 5 times root 2 is 5 root(2)? CMIIW. $\endgroup$
    – Realdeo
    Commented Nov 14, 2014 at 8:33
  • $\begingroup$ And what about 3/2? Is it 1.5? $\endgroup$
    – Mohit Jain
    Commented Nov 14, 2014 at 8:33
  • $\begingroup$ @Realdeo Yes, there's no rounding :) $\endgroup$
    – GOTO 0
    Commented Nov 14, 2014 at 8:34
  • 5
    $\begingroup$ +1 for a Security to the Party puzzle that is concrete enough that there is a provably correct solution. $\endgroup$
    – Kevin
    Commented Nov 14, 2014 at 18:54

3 Answers 3

16
$\begingroup$

12 doors. Total number of steps must be even. And problem can not be solved in 10 doors or fewer.

Step 1 : 1 + 11 = 12 Security
Step 2 : - 7 = 5 Elephant
Step 3 : + 4 = 9 Party
Step 4 : - 1 = 8 Kitchen
Step 5 : - 6 = 2 Secret
Step 6 : - 6 = -4 Kitchen
Step 7 : - 1 = -5 Party
Step 8 : * √2 = -5√2 Kitchen
Step 9 : * √2 = -10 Party
Step 10: / 2 = -5 Elephant
Step 11: * 2 = -10 Security
Step 12: + 11 = 1

$\endgroup$
1
  • 3
    $\begingroup$ That was quick, congrats! You're the spaghetti man ;) $\endgroup$
    – GOTO 0
    Commented Nov 14, 2014 at 9:24
8
$\begingroup$

1 + 11 * 2 / 2 - 1 - 6 - 6 - 1 - 1 - 1 - 1 - 1 / 2 - 7 + 11 = 1
14 doors, but sort of achieved with a quick and dirty program and some thinking (that also proved that there is no 10-door-possibility, so Jan's answer is the optimum.)
http://pastebin.com/VraSrJ9R contains a neat little list of all 1024 "10-door-possibilities", 0 being the left option, 1 being the right option.

Another 12-door-solution I like a lot:

1 + 11 - 7 + 4 - 1 - 6 - 6 - 1 - 1 - 1 + 4 - 7 + 11 = 1
Essentially only take addition/substraction and go through the -1 door twice (three times, you know what I mean).

$\endgroup$
0
2
$\begingroup$

If we are not allowed to temporarily exit and re-enter the lobby, then there are

28 distinct shortest (12 step) solutions,

illustrated in this diagram:

Diagram showing all solutions

The diagram was created with the assistance of a computer program.

Each column represents a distinct combination of room, whether we have the recipe, and whether we have backtracked once yet. Every step moves from left to right by either one column or two. The gray boxes contain the number at that point in the path, where R = √2. Red lines correspond to going through the left door and green lines correspond to going right. Thick lines denote backtracking.

The purple boxes indicate the number of paths from that point forward for some points, usually near choice points. (There is some inconsistency in their placement for diagram layout reasons.)

If we are allowed to temporarily exit and re-enter the lobby (just after starting or just before finishing) despite the number not being 1, then

there are even more 12 step solutions; I have not tried to count them all.

One example path that leaves the lobby near the start is:

1, 12, 4 (here we are outside), 15, 30, 34, 33, 27, 21, 20, 10, 3, 1.

One example path that leaves the lobby near the end is:

1, 12, 5, 9, 8, 2, -4, -5, -1, -2, 9 (here we are outside), 3, 1.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.