50

Edward's "revenge" on Bob the mute house servant

Edward had enough! This was it! During the yearly sorcerer meet in a hidden cellar in Léon, Edward discovered a red stain on his precious robe. First he thought that it was just blood - but no, it was red wine! If another sorcerer would've noticed the stain he'ld have been the laughing stock of the whole meet! He didn't even drink wine!

No, it was Bob's fault. What did he think? Just because he's a measly house-servant he's allowed to do any mistakes?! He had to pay - but Edward only had a few hours before his own Master would return.

After tricking the mute Bob down into the cellar, Edward trapped Bob's mind with a maze spell. This spell would throw Bob into a featureless labyrinth and force him to attempt and escape. And the best part? While inside the maze, every minute in the real world would feel like an eternity!

But as Edward was just about to start his evil laugh, Bob woke up. He escaped the maze! Edward went back into his room upstairs to draw a new one.

It was perfect. A piece of beauty. This time, Bob would pay for not properly dedusting the wall behind his bookshelf! After trapping Bob in another maze, he confidently left the cellar - just to come back 10 minutes later with Bob already gone! Impossible! And he only had enough astral power left for one more maze spell!

Edward's Maze I


Edward had to figure out what strategy Bob used to escape his mazes, to create one that was inescapable.

When mazed, a person has to decide for one simple rule/strategy on how to deal with every crossing paths. The rule shouldn't be more complex than one if/else statement and be easy to memorize! Only actual crossings are relevant, corners and underbridges are unimportant.

Rules:

  • The victim can only turn left or right. Going straight ahead in an "X-crossing" is not an option!
  • If the victim runs into a dead end (Entrance) it simply turns around and walks back. Otherwise, the victim is never allowed to walk back.

Due to the confusing nature of the maze, the victim also can only count on two informations only:

  • How many crossings the victim already passed (starting with 0)
  • The last decision made (left or right)

The victim has no sense of orientation, does not know how long the tunnels are or how many corners they had and cannot leave behind any marks. Everyting is featureless and looks exactly the same!

Example rules:

  • "Always turn left." (the classic)
  • "Alternate between left and right. Start with left."
  • "If the [number of crossings passed > 15] turn left, otherwise turn right."
  • "If the [(number of crossings passed + 1) % 3 == 0] turn left, otherwise right."

How to handle "Underbridges" and "T-Sections"

There is no "going straight ahead". It's always "left" or "right"!

enter image description here

How to handle "X-crossings". Always go either "left" or "right", never "straight ahead"!

enter image description here


Analysis

Luckily, Edward is able to analyze Bob's path through another spell. The red line marks the way Bob took but doesn't display how many times he passed through the same tunnel, so the information is of limited use.

Edward's Maze I - the first

While analyzing the second labyrinth, Edward was able to analyze how many times Bob went through a certain crossing (depicted by the number).

enter image description here


1. What simple rule/strategy is Bob using to get through Edwards labyrinths? Bob uses the same strategy for every maze! It does not change between mazes!

2. Is it possible for Edward to create a 2 dimensional, finite labyrinth to stop Bob from escaping a third time?

(I hope I could make everything clear - I'm sadly not a native english speaker and yet have to practice explaining riddle-rules. Let me know if something is confusing and I'll try to clear it up!)

Katai
  • 1,163
  • 7
  • 12
  • 3
    Very interesting and original puzzle. Does going through the horizontal bar of a T junction counts as turning? (Example: middle right in the first maze) If not, you may also need a "walk ahead/through" instruction. – Stephane Dec 20 '15 at 20:35
  • 2
    This is a really cool idea for a puzzle! – Deusovi Dec 20 '15 at 20:39
  • @Stephane It actually does! Imagine it like this: The victim doesn't see the junctions like we do: For them, it's always a path left, a path right, and a path where they came from. So, "walk ahead/through" counts as either left or right turn, depending on where the other passage is. I wasn't sure how to elaborate on that, but I'll try to add another picture for clarification - give me a few minutes ;) And thanks ~ – Katai Dec 20 '15 at 20:47
  • @Stephane Added an image explaining "T-Sections" properly, now. – Katai Dec 20 '15 at 21:09
  • 1
    Thanks :) So, if I understand correctly, there's no way Bob can walk through an X junction either, is there? – Stephane Dec 20 '15 at 22:24
  • 1
    @Stephane Not by going straight through it, no. If he reachess an X junction, he has to go either the left, or the right way. Just walking through the middle way is not possible! (mainly done to keep the 'solving rules' simpler) – Katai Dec 20 '15 at 22:33
  • Understood. You might want to make sure that this is clear in the text above. And now my brain can start hurting properly :) – Stephane Dec 20 '15 at 22:40
  • The decisions he makes should be the same for each turn number, assuming he reaches that number, shouldn't they? I've been working on solving the common path and unless I missed something (which is very possible), there isn't a common solution to the two mazes. – Josh Dec 20 '15 at 22:45
  • @Josh I'm not quite sure what you mean, but generally, he has to apply the same if/else statement on every "X" or "T" crossing! The numbers on the second image indicate how many times he walked into that specific crossing. Since it's kind of hard to explain the details for me, it's possible that I didn't clarify something properly (or left it ambiguous) so maybe you missed something, but then it's my fault! Keep in mind: The red line doesn't show the direction Bob traveled, or how many times! If it's still unclear, let me know ;) – Katai Dec 20 '15 at 22:54
  • What I mean is, since he's following the same rule each time, if he turns first left and then right in the first maze, he should turn first left and then right in every maze, correct? If I know he turns left at crossing 103 in one maze, if he reaches crossing 103 in any other maze he must turn left there also? It seems to me this is necessarily true but as I try to solve it I'm running into contradictions. I could have missed something when I plotted route possibilities though. I'm going to try again. – Josh Dec 20 '15 at 23:01
  • @Josh I'll add that to the info section: Bob uses the exact same strategy in every maze! I'll check both images again to make sure I didn't oversee a mistake, but I'm already sure that I haven't (checked them like 5 times before posting the riddle). One tricky thing is: Try to not "oversee" "T" sections! That happened to me a lot, not realizing that I passed a "T" crossing, causing a mistake! Slow and steady is the best way to do it ;) – Katai Dec 20 '15 at 23:06
  • I keep coming to the same conclusion. There's a common path for the first 14 crossings (LRLRLLRRRRLLRL), but for the 15th, Bob must turn right for the first maze and left for the second. – Josh Dec 20 '15 at 23:40
  • @Josh Nice job so far to come up with that path! But the reason it doesn't work probably is because it's not the correct one yet ;) There are other solutions for the first 14 crossings! Just to be safe I tested my solutions again (can't hurt) and it works. So, you found an alternate path for the first 14 crossings, but sadly not the correct one! That's probably why it doesn't work on both mazes :D Sorry if it's a bit frustrating, I actually was afraid this riddle would end up being too easy! – Katai Dec 20 '15 at 23:58
  • Basically in the if else you can put a huge table, like "if have crossed 1,3,6,7,8,10,...,98 times, turn left, else turn right", right? – justhalf Dec 21 '15 at 08:44
  • @justhalf it should be a SIMPLE rule (see examples) one, max 2 if/else statements. The sentence or rule should be easy to keep in mind - hes confused in there, after all! – Katai Dec 21 '15 at 09:03
  • @Katai: I posted my answer, which I believe is what you're looking for. Although I think I can still "force" some loopholes... =p – justhalf Dec 21 '15 at 09:40
  • I think one of the crossing counts is missing from the second maze. I think it's supposed to be a "1". There should be a crossing count number at the T junction you come to first if you go left from the dead center of the maze. If you look, you see Bob passed through that T and chose to go left, but there's no number there to indicate how many times he went through. – Todd Wilcox Jan 11 '16 at 18:54
  • @ToddWilcox: Yeah, I already mentioned that in the chat (http://chat.stackexchange.com/transcript/message/26393583#26393583) but it seems that OP is quite busy recently =) – justhalf Jan 12 '16 at 03:21
  • 1
    @justhalf I could finally fix it and get back to this - the last 2 month's have kept me extremly busy so I couldn't really get to any of this at all! But now I could finally catch up with it - sorry for the wait! – Katai Feb 14 '16 at 16:10
  • @Katai: That's nice! Hope we can see the second puzzle sometime =) – justhalf Feb 15 '16 at 01:47

1 Answers1

26

A very well-written puzzle! And very good visualization! This site needs more good puzzle-writer like you =D

Guess it must be very troublesome to fit all those mazes and turns using the simple rule. Good job!

1. What simple rule/strategy is Bob using to get through Edwards labyrinths?

From the question, I believe the simple rule is:

If [(number of crossings passed + 1) is prime] turn right; otherwise turn left
which results in:
LRRLRLRLLLRLRLLLRLRLLLRLLLLLRLRLLLLLRLLL

Let's see how that works in each maze.

The moves Bob took in Maze 1:

LRRLRLRaLLLRLbRLLLcRLRLLLR

aescape lower left loop, just went through T-junction going upper half

bjust enter upper-middle structure, Bob just turned left at the T-junction going inside the structure from the right, going into the loop

cwent into the loop two times

In maze 2:

LRRLRLRaLLLRbLRcLLLRLRLLLRLdLLLLRLe, then three options, either to loop the lower left 0, 1, or 2 times before going the outer loop:
1) LLLRLLLLLR (directly go to outer loop)
2) RLLRLLRLLR (loop lower-left once)
3) RLLLLLRLLL (loop lower-left twice)
But to adhere to the "simple rule", only the third one is valid.

aBob just loop through the outer loop clockwise, then bounce back from entrance, now facing the X-junction from below

bBob just escaped lower loop, now facing the second middle loop

cBob just escaped the second loop, now facing the big maze in the middle

dBob just escape the middle maze, now on the middle-left T-junction

eBob just arrived at the last loop

Explanation

By maze 1, we need to start with LR. If the next one is L on maze 2, the next would need to be RL, resulting in LRLRL. Then we need to complete the middle loop in clockwise manner (counter-clockwise will need to repeat the 1 junction on the right), resulting in LRLRLLLRL, which doesn't work in Maze 1. So the first three moves are LRR.

Using maze 1, the next two moves are LR. Using similar reasoning in maze 2 as in previous case, the next two moves are again LR (so far LRRLRLR), which from maze 1 we get the next moves as LLLRL. Then from maze 2, we have the next moves as: RLLLRLRLLLRLLLLLRL. And then we can complete the maze using the pattern we found thus far.

2. Is it possible for Edward to create a 2 dimensional, finite labyrinth to stop Bob from escaping a third time?

Yes.
Bob-trapping maze
The entrance is below, the exit is on the right.

Explanation

After some careful thought, Edward finally realized Bob's strategy, and after a few hours (just before his Master came back!), he found out a pattern in Bob's strategy:

Starting from the third turn (the first two are LR), Bob either takes RL or LL (since the even-numbered moves will always be L).

So Edward devices a maze where taking RL or LL will always bring you back to the same point, that is, the center of the maze (the green tile)
Edward did the evil laugh, until he realized that to enter this trap, Bob needs to take a right turn on one even move, so that Bob will be on his odd-numbered turn when he reach the green tile.

Edward was utterly disappointed ("But primes are odd!" Edward yelled in frustration) and was about to give up when, fortunately, Willy reminded him that on the second move, Bob does a right turn ("Sometimes you can be useful, Willy," Edward said).

With that final revelation, Edward finally established the Ultimate Bob-trapping MazeTM, to the horror of Bob, who we never hear from ever again (anyway, he is mute)...

Fun stuff

I believe (before OP last edit) the "if ... else ..." rule also allows Bob to create a very long list of predefined moves like:

"If the [number of crossings passed == 1 OR number of crossings passed == 3 OR ... OR number of crossings passed == 125] turn left, otherwise turn right."

That is still one "if ... else ...", with a huge disjunction =D

Also, the current "simple rule" is actually very hard to determine once Bob has passed many many crossings...

Zerris found the smallest of such maze, and the simplicity is beautiful: Beautiful Bob-trapping maze

justhalf
  • 6,014
  • 2
  • 31
  • 49
  • For discussion on this answer, join us at http://chat.stackexchange.com/rooms/33277/edwards-revenge – justhalf Dec 23 '15 at 14:51