Tuesday, 13 October 2015

visual - Lights in the Dungeon: Five by Five


This is the third in a series Lights in the Dungeon puzzles.


previous (2nd) <-- | --> next (4th)





You are practically skipping as you leave the four by four dungeon. This has been pretty easy so far. Perhaps you can survive long enough that his Lordship will tire of the games and simply let you go. Just then, you spot your captor watching you and are reminded that he might grow tired and eat you instead. Perhaps you shouldn't be so flippant in your victory.


Lord Hooty McOwlface glances at Fakky Jim for confirmation of your victory. The grand vizier returns a sorrowful "Mreow" and the Lord seethes beneath his cloak.


"Very well!" he barks at you. "Since the first two were so easy, I'm going to take some time to make it a little bit harder for you. Guards! Escort him to his cell."


A few days pass and then you are brought back to the royal chamber. The despot looks fairly pleased with himself but, based on the first two puzzles, you aren't really that worried.


"I've thrown you a curveball this time, peasant! There are a few new room designs you haven't seen before. Turning off every light is impossible! Now, it would be no fun if we knew you were going to lose so you aren't actually required to turn off all the lights. You've saved me enough on electricity so far that I was able to afford a small helicopter for Fakky Jim. He'll be heading in after you to turn off any lights you can't get. Of course, this introduces some new rules. Fakky will fill you in."


Once again, you retrieve a scroll from the cat and unfurl it to find the rules.(Revisions from the previous challenge are in bold.)




  1. You will enter a dungeon in which there are many rooms. Each room has a single light in the middle. You must turn off every light.

  2. The lights are easily turned off by a short chain hanging from the fixture.


  3. As soon as you exit a room, the floor will collapse to reveal the thousand-foot chasm below. You may not re-enter a room and, therefore, you must turn off each light by passing through each room exactly once.

  4. The map below shows the current design of the dungeon with each room bordered by red and labeled with a alphabetic character.

  5. You may rearrange the rooms however you like before you enter but you cannot change the overall dimensions of the dungeon. In this case, that means the dungeon must be five rooms wide and five rooms tall.

  6. You cannot rotate or flip rooms. You may only translate them.

  7. You may only enter the dungeon once and exit once. As soon as you exit the dungeon, any remaining floors will collapse.

  8. If there are any rooms not visited and, therefore, any lights left on, you lose. If all lights are turned off when you exit the dungeon, then you win.

  9. If you create a dungeon map that you cannot enter or cannot exit, you shall lose.

  10. Fakky is easily confused. There can be only two entrances to the dungeon. (One entrance, one exit)

  11. Fakky is easily annoyed. If he has to turn off too many lights, he'll quit. You must extinguish at least 70% of the lights on your way through.

  12. The helicopter can fly but cannot pass through walls. Every room must be accessible even though you can't visit them all.




How can you rearrange the dungeon rooms so that you can win the game?


There are probably multiple solutions. The first valid answer will be accepted.


Open-Ended Bonus: Can maximize the number of rooms whose lights you turn off on your pass-through?


There are three dead-ends so the absolute max is 22/25 rooms (88%)


Maze 5x5



AABCC
DDEEE

FGGHH
HJKKM
MNNNO



For reference, here are the 16 possible rooms. (Note that this is all possible rooms. For this puzzle, you must use exactly the rooms shown in the map above.)


ABCDEFGHIJKLMNOP



Answer



After some trial and error I found an optimal solution:




JGGKK
EDAOH
FCBEH
MHENC
MANND



Or as an image:



enter image description here




I reached the maximum of 22 rooms, so Fakky Jim will have to turn off the lights in the 3 rooms with a dead end.


No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...