## Those really good logic puzzles

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Those really good logic puzzles

There are five puzzles that really stood out for me.

1. The "three cannibals and three explorers have to cross a river" puzzle with the variation that only one cannibal can manage the boat. This was the first logic puzzle I found. http://en.wikipedia.org/wiki/Jealous_husbands_problem
2. The Sliding Door Maze puzzle: http://www.logicmazes.com/sliding.html
3. The Harbour puzzle: http://www.creatievepuzzels.com/spel/speel1/oscar/haven2.htm
4. The Blue Eyes puzzle: http://xkcd.com/blue_eyes.html
5. The Hardest Logic Puzzle Ever: http://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever

Belial wrote:I'm just being a dick. It happens.

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

77 views but not a single voiced opinion?
I did put this in Logic Puzzles didn't I?
Belial wrote:I'm just being a dick. It happens.

jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

### Re: Those really good logic puzzles

I suppose I prefer the ones that have really satisfying, simple solutions. For instance, three princesses has a really beautiful and direct solution, but its a lot easier than the "hardest logic puzzles EVAR" or whatever people call the three incomprehensible gods problem.

Another example of something like that is the devil's quarter game.

You clearly prefer the really hard ones with byzantine answers. There was one that someone on the forums here made that was like that,

viewtopic.php?f=3&t=3517&p=70847

ameretrifle wrote:Magic space feudalism is therefore a viable idea.

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

jestingrabbit wrote:I suppose I prefer the ones that have really satisfying, simple solutions. For instance, three princesses has a really beautiful and direct solution, but its a lot easier than the "hardest logic puzzles EVAR" or whatever people call the three incomprehensible gods problem.

Another example of something like that is the devil's quarter game.

You clearly prefer the really hard ones with byzantine answers.

I know it's not intentional but I find this offensive.

I thought all except the gods one had interesting, non-byzantine solutions...
I like both of the linked problems quite a lot.
Did you check out the Sliding Maze one?
Belial wrote:I'm just being a dick. It happens.

jestingrabbit
Factoids are just Datas that haven't grown up yet
Posts: 5967
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

### Re: Those really good logic puzzles

I did have a look at the maze one, just noodling around though, not really working it. For that, I'd have to draw a simplification of the maze so that I didn't get confused by the squiggly lines. I also briefly looked at the docks one and realised a few things about how the solution would have to come about. I suspect they both need a little more thought than virtually none though
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

LLCoolDave
Posts: 165
Joined: Wed Apr 11, 2007 10:17 am UTC

### Re: Those really good logic puzzles

The Sliding Door Maze appeared to be fairly simple just tracing the necessary steps backwards as most of the options are almost immediately rendered wrong/non-useful. It's not a bad puzzle by any means, but it's one that took me 3 minutes, wasn't all that original and didn't require any surprising train of thought. All in all a pretty forgettable Puzzle, although enjoyable. If there was a collection of mazes I'd probably play through them, though.

As for favorite logic puzzles, that's a hard one. I've encountered so many good puzzles that I don't even remember most of them anymore. One I'm particularly fond of is the 100 Prisoners and a light switch. Not particularly because of the puzzle but rather because of the fact that in this very limited setting the prisoners are still capable of transmitting arbitary messages to everybody else, and even can do so if they have no knowledge of time. Immensly impressing (though not a particularly useful channel for communication.)

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

LLCoolDave wrote:It's not a bad puzzle by any means, but it's one that took me 3 minutes, wasn't all that original and didn't require any surprising train of thought

Strange... I've never found a puzzle like it. Do you know where I could find another one?
Belial wrote:I'm just being a dick. It happens.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: Those really good logic puzzles

jestingrabbit wrote:You clearly prefer the really hard ones with byzantine answers. There was one that someone on the forums here made that was like that,

viewtopic.php?f=3&t=3517&p=70847

Thanks for pointing that out, I fixed the link.

For what it's worth, I prefer hard ones with simple answers, the best of both worlds: three sisters is also one of my favorites. By this I mean that the answer is hard for most people to come to, but easy to grasp once it's revealed. For this reason, I'm not that fond of blue eyes.

Most mazes, however, I don't really consider to be logic puzzles. What would it mean for a maze like mine to have a non-byzantine answer? I once asked on rec.puzzles what qualifies a puzzle as a maze, and one good response said it was this confusing, labyrinthine quality that makes a maze a maze.

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

Cosmologicon wrote:Most mazes, however, I don't really consider to be logic puzzles. What would it mean for a maze like mine to have a non-byzantine answer? I once asked on rec.puzzles what qualifies a puzzle as a maze, and one good response said it was this confusing, labyrinthine quality that makes a maze a maze.

True. In fact the Sliding Door Maze is a maze in name and look only.
Belial wrote:I'm just being a dick. It happens.

LLCoolDave
Posts: 165
Joined: Wed Apr 11, 2007 10:17 am UTC

### Re: Those really good logic puzzles

Well, I have never before played a maze like it, but the concept of a shapeshifting maze is not new, and the effects this one has are pretty small. Mazes in this style can be found in plenty of videogames of all sorts. Let me illustrate what I meant by original with the example of another popular puzzle: Sudoku.

There are plenty of versions of it out there (and somehow, to some people replacing the numbers with letters or colors is enough to make it seem like an entirely new puzzle. Especially true for people publishing them), though all of them are pretty similar in design. The Sliding Door maze is to me like a Sudoku variation that had certain areas of differing size and shape marked which required the numbers inside to sum up to a certain number, in addition to the usual requirements. There are some additional thoughts to be made that are not part of a regular sudoku, but they are very much like the usual considerations. It's an interesting spinoff, but not a particularly, well, original concept.

Besides that, the ACTUAL sliding door maze was pretty forgetable in its shape and solution.

I'm not saying it's a bad puzzle, it just doesn't strike me as something I will still remember at the end of the week.

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

Well, I have never before played a maze like it, but the concept of a shapeshifting maze is not new, and the effects this one has are pretty small.

When you say "the effects are small" do you mean it differs little from a similar sized normal maze?

Shapeshifting mazes come in many shapes and forms. I don't think you can generalize here...
For instance compare this one to the Alice Maze:http://www.logicmazes.com/alice.html
Belial wrote:I'm just being a dick. It happens.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: Those really good logic puzzles

GoC wrote:
Cosmologicon wrote:Most mazes, however, I don't really consider to be logic puzzles. What would it mean for a maze like mine to have a non-byzantine answer? I once asked on rec.puzzles what qualifies a puzzle as a maze, and one good response said it was this confusing, labyrinthine quality that makes a maze a maze.

True. In fact the Sliding Door Maze is a maze in name and look only.

Somewhat of a tangent at this point, but I disagree. To me, the Sliding Door Maze is a veritable maze. Slightly more of a gray area is one I made called Twistile (link is temporary; PM me if you find this post in a year and it doesn't work). But I would still definitely call this a maze. Even more of a gray area I would say is the Rubik's cube. Mathematically, it's like a maze in a lot of ways, but it doesn't feel like a maze, so I would say that it's not.

This is not a value judgment: I like mazes. But I think they're in a separate category from more riddle-like puzzles such as blue eyes, devil's quarters, and hat puzzles. The solution to mazes is a sequence of moves that's in no way simple or elegant, but they can still be satisfying to solve. I guess I would also add things like crossnumber puzzles, hitori, kakuro, hashiwokakero, etc. The solutions to these are not at all elegant or interesting: it's just a grid of numbers. But they're still fun.

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

Cosmologicon wrote:Somewhat of a tangent at this point, but I disagree. To me, the Sliding Door Maze is a veritable maze. Slightly more of a gray area is one I made called Twistile (link is temporary; PM me if you find this post in a year and it doesn't work).

Yeah it is kinda tangental but there seems to be no actual discussion of the topic (presenting your favorite logic puzzles).
Anyway, I'd say if it needs a sequence of answers in order to solve then it's a maze else it's a puzzle. The Sliding Door Maze requires one main deduction and the rest is a rather simple matter of fiddling around with doors. When I present this puzzle to people they normaly spend 20 minutes screwing around before they finally "get it" and then it's solved a few minutes later. I'd say that makes it more of a puzzle than a maze.
Belial wrote:I'm just being a dick. It happens.

Blatm
Posts: 638
Joined: Mon Jun 04, 2007 1:43 am UTC

### Re: Those really good logic puzzles

I've always liked the Self-Referential Aptitude Test.

Cosmologicon
Posts: 1806
Joined: Sat Nov 25, 2006 9:47 am UTC
Location: Cambridge MA USA
Contact:

### Re: Those really good logic puzzles

GoC wrote:The Sliding Door Maze requires one main deduction and the rest is a rather simple matter of fiddling around with doors. When I present this puzzle to people they normaly spend 20 minutes screwing around before they finally "get it" and then it's solved a few minutes later. I'd say that makes it more of a puzzle than a maze.

Okay, I did it. I really enjoyed it, but I don't know what you're talking about. One main deduction and the rest is rather simple? I found it more or less straightforward from start to finish. I solved it the way I solve 90% of multi-state mazes (which is what Ed Pegg calls them): (1) coming up with a way to represent the maze's state, and (2) working backward.

Having done it, I now know that the solution is quite a bit shorter than I expected. On a maze like this I would have expected having to visit the same path 10 times. I realize now that I probably could have done it all in my head, and my notes were overkill. Still, even if I'd worked like that, I can't imagine getting an epiphany like you describe.

Sorry if I'm over-analyzing this. I really like multi-state mazes; maybe that should be a separate thread....

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

Well maybe the fact that everyone else I showed it too had never done a multistate maze before helped... Silly of me to expect anything less from this board.
Cosmologicon wrote:Sorry if I'm over-analyzing this. I really like multi-state mazes; maybe that should be a separate thread....

Belial wrote:I'm just being a dick. It happens.

Strilanc
Posts: 646
Joined: Fri Dec 08, 2006 7:18 am UTC

### Re: Those really good logic puzzles

I actually spent time simplifying the sliding door puzzle's maze before really trying it, which made it sortof easy in the end. The hardest part was translating the solution back to the needlessly-curvy maze.
Attachments
sliding_door_simple.PNG (2.41 KiB) Viewed 12207 times
Don't pay attention to this signature, it's contradictory.

Moonbeam
Posts: 292
Joined: Sat Dec 08, 2007 5:28 pm UTC
Location: UK

### Re: Those really good logic puzzles

Completed this in 127 moves. Anyone know if this is optimal or not

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

Moonbeam wrote:Completed this in 127 moves. Anyone know if this is optimal or not

I've solved it several times but have never managed to remember how I did it.
Belial wrote:I'm just being a dick. It happens.

Moonbeam
Posts: 292
Joined: Sat Dec 08, 2007 5:28 pm UTC
Location: UK

### Re: Those really good logic puzzles

GoC wrote:
Moonbeam wrote:Completed this in 127 moves. Anyone know if this is optimal or not

I've solved it several times but have never managed to remember how I did it.

Took me a few attempts to grasp what the trick was - nice lil' puzzle in my opinion .

I'm struggling with the sliding doors puzzle at the mo - just not seeing the trick yet ......... oh well, more of my precious time gonna be wasted away .

quintopia
Posts: 2906
Joined: Fri Nov 17, 2006 2:53 am UTC
Location: atlanta, ga

### Re: Those really good logic puzzles

Moonbeam wrote:

Completed this in 127 moves. Anyone know if this is optimal or not

I believe the optimal solution is 19 moves, so you did pretty well.

Moonbeam
Posts: 292
Joined: Sat Dec 08, 2007 5:28 pm UTC
Location: UK

### Re: Those really good logic puzzles

quintopia wrote:
Moonbeam wrote:

Completed this in 127 moves. Anyone know if this is optimal or not

I believe the optimal solution is 19 moves, so you did pretty well.

I take it you mean 119 ??

Nix
Posts: 93
Joined: Mon Mar 09, 2009 8:14 am UTC

### Re: Those really good logic puzzles

quintopia wrote:I believe the optimal solution is 19 moves, so you did pretty well.

19 is correct. Or if you count each single step in either direction as a move, the optimal solution takes 181 moves (solved programmatically). There's an interesting property, which will also help (a lot!) in solving:
Spoiler:
Actually, in one optimal solution all the moves take one of the cranes as far as it will go in one direction. When considering only these kinds of moves, there are only 30 reachable states, including the initial and final state.
Last edited by Nix on Fri Apr 03, 2009 2:21 pm UTC, edited 1 time in total.

Moonbeam
Posts: 292
Joined: Sat Dec 08, 2007 5:28 pm UTC
Location: UK

### Re: Those really good logic puzzles

Oh dear ............. I don't believe I did that.

I was moving the blocks - leaving only a 1-block gap (if you catch my drift) so I was going backward and forward waaaaaaay too many times .

Just re-tried it and did it in 19 moves.

Gojoe
Posts: 3218
Joined: Wed Apr 30, 2008 12:45 pm UTC
Location: New Zealand!!!

### Re: Those really good logic puzzles

I... I do not understand that puzzle at all.... can someone explain to me how it works?
michaelandjimi wrote:Oh Mr Gojoe
I won't make fun of your mojo.
Though in this fora I serenade you
I really only do it to aid you.
That continue on into infinity*

Feeble accompanying guitar.

quintopia
Posts: 2906
Joined: Fri Nov 17, 2006 2:53 am UTC
Location: atlanta, ga

### Re: Those really good logic puzzles

Moonbeam wrote:Oh dear ............. I don't believe I did that.

I was moving the blocks - leaving only a 1-block gap (if you catch my drift) so I was going backward and forward waaaaaaay too many times .

Just re-tried it and did it in 19 moves.

Oh, I thought you meant you did it in 127 moves including the time spent playing around with it, figuring out what did what, and starting over etc. I probably played with it for at least twice that before figuring out the shortest solution.

GoC
Posts: 336
Joined: Mon Nov 24, 2008 10:35 pm UTC

### Re: Those really good logic puzzles

quintopia wrote:Oh, I thought you meant you did it in 127 moves including the time spent playing around with it, figuring out what did what, and starting over etc. I probably played with it for at least twice that before figuring out the shortest solution.

How could this be generalized into a puzzle involving n number of cranes, each of different height?
Belial wrote:I'm just being a dick. It happens.

Nix
Posts: 93
Joined: Mon Mar 09, 2009 8:14 am UTC

### Re: Those really good logic puzzles

GoC wrote:How could this be generalized into a puzzle involving n number of cranes, each of different height?

It's a rather obvious extension if you look at the original puzzle. The lowest level (without a crane) can be removed from the puzzle with no change in the state space. Also, new levels without cranes could be added freely, just think of them as an extension of the cranes/containers above. This leaves levels of 1, 3 and 7 items with a crane in the middle spot. That's obviously a sequence of 2n–1. For example, the 4-crane version has a new level of 15 items (7 containers, a crane, and another 7 containers) added below the 3-crane version with the container-only level removed. For symmetry, add a new bottom level of 15 containers.

I went through the 4-crane variant once, but admit to having trouble visualizing what actually happens and why this generalization works. I already had some trouble with the 3-crane one.

Spoiler:
One way of looking at it, is that each higher level is sized just appropriately to sit on container-only piles – on either side of the crane below.

(edited to spoilerize a note that may help in solving the puzzle)
Last edited by Nix on Tue Mar 10, 2009 7:26 pm UTC, edited 1 time in total.

bogglesteinsky
Posts: 59
Joined: Tue Oct 24, 2006 8:58 am UTC

### Re: Those really good logic puzzles

For example, the 4-crane version has a new level of 15 items (7 containers, a crane, and another 7 containers) added below the 3-crane version with the container-only level removed. For symmetry, add a new bottom level of 15 containers.

Something like this?
4Cranes.JPG (19.71 KiB) Viewed 10719 times

Nix
Posts: 93
Joined: Mon Mar 09, 2009 8:14 am UTC

### Re: Those really good logic puzzles

bogglesteinsky wrote:Something like this?

Exactly. Except I'm not sure if the new crane is the right color.

Now, I've been thinking some more about the structure of the solution. This is a huge spoiler for all sizes of the puzzle.

Spoiler:
Like hinted by my last note about level sizes before, the solution 'on each level' breaks down to four parts:

1. Move the whole higher level to the ship (apply the same process to it recursively). This automatically moves the level containers on the right side of the crane too.
2. Move the higher level back to the quay while leaving the right side level containers on the ship (using the level crane to help).
3. Move the crane to the ship.
4. Move the higher level to the ship again. This automatically moves the level containers on the left side of the crane too.

The level crane only moves in steps 2 and 3. In step 2 it is used to avoid moving the level containers in either direction.

This is a clean recursive process, explaining nicely why the puzzle generalizes to arbitrary size. It almost seems obvious after seeing it, but I can't say it was easy to see.

Tass
Posts: 1909
Joined: Tue Nov 11, 2008 2:21 pm UTC
Location: Niels Bohr Institute, Copenhagen.

### Re: Those really good logic puzzles

Nix wrote:
quintopia wrote:I believe the optimal solution is 19 moves, so you did pretty well.

19 is correct. Or if you count each single step in either direction as a move, the optimal solution takes 181 moves (solved programmatically). There's an interesting property, which will also help in solving:
Spoiler:
Actually, in one optimal solution all the moves take one of the cranes as far as it will go in one direction. When considering only these kinds of moves, there are only 30 reachable states, including the initial and final state.

Great, I try and try, then I read that little tip and goes right out and does it in 19 moves.

Nix
Posts: 93
Joined: Mon Mar 09, 2009 8:14 am UTC

### Re: Those really good logic puzzles

Hope that didn't take all the fun out of it. I now edited that post to indicate that the spoiler is significant. You may still find yourself well challenged by the 4 crane version even with that spoiler (if you didn't read my later major spoiler), but AFAIK there's no computerized implementation of it online.

Tass
Posts: 1909
Joined: Tue Nov 11, 2008 2:21 pm UTC
Location: Niels Bohr Institute, Copenhagen.

### Re: Those really good logic puzzles

Nix wrote:Hope that didn't take all the fun out of it. I now edited that post to indicate that the spoiler is significant. You may still find yourself well challenged by the 4 crane version even with that spoiler (if you didn't read my later major spoiler), but AFAIK there's no computerized implementation of it online.

Ha ha, no problem. I did read the rest and sort of understood it (its kind of Towers of Hanoi like) but i didn't understand it so completely that it keapt me from messing up the third time I tried the three crane version

crzftx
Posts: 371
Joined: Tue Jul 29, 2008 4:49 am UTC
Location: Rockford, IL

### Re: Those really good logic puzzles

Nix wrote:
quintopia wrote:I believe the optimal solution is 19 moves, so you did pretty well.

19 is correct. Or if you count each single step in either direction as a move, the optimal solution takes 181 moves (solved programmatically). There's an interesting property, which will also help (a lot!) in solving:
Spoiler:
Actually, in one optimal solution all the moves take one of the cranes as far as it will go in one direction. When considering only these kinds of moves, there are only 30 reachable states, including the initial and final state.

Haha, I still can't figure it out. If
Spoiler:
one crane always move all the way in one direction, I can label the moves as Yellow, Pink, and Orange
This is as far as I could get (got here before your hint, went searching, still stuck): YPYPYOYOPOPY. 12 moves, 2 boxes remaining.

Anyone willing to post the solution.

On a related note, I thought the door puzzle was a lot of fun and still remember how to do it

Nix
Posts: 93
Joined: Mon Mar 09, 2009 8:14 am UTC

### Re: Those really good logic puzzles

Hint (kind of obvious):
Spoiler:
If you use only those moves, there aren't very many places where there are any alternatives: just one move forward and one back to the last state. For example, the first 7 moves are forced. You can also work backwards from the (single) solved state, and think how to meet in the middle. There aren't too many options that don't lead to dead-ends anyway.

Extra hint:
Spoiler:
The solution is a palindrome.

One full solution, in steps:
Spoiler:
after the forced YPYPYOY, O
Spoiler:
P
Spoiler:
Y
Spoiler:
P
Spoiler:
O
Spoiler:
Y, and the forced OYPYPY

crzftx
Posts: 371
Joined: Tue Jul 29, 2008 4:49 am UTC
Location: Rockford, IL

### Re: Those really good logic puzzles

Nix wrote:spoilered hints

Thanks. I see the step I messed up on...

Ercasse
Posts: 1
Joined: Wed Apr 08, 2009 1:30 pm UTC

### Re: Those really good logic puzzles

Solution to the Self Referential Aptitude Test (http://www.dougb.com/srat.html)
Spoiler:
D A D B E D D E D A B A D B A D B A E B

Haven't gone through to see if thats the only answer yet.

ErraticRoop
Posts: 19
Joined: Sun Feb 21, 2010 8:54 pm UTC
Location: CT, USA
Contact:

### Re: Those really good logic puzzles

These are also some interesting links... though the puzzles are not very challenging, it's a good time-pass:

http://www.braingle.com/Logic-Grid.html

Enjoy!

rabuf
Posts: 15
Joined: Thu Mar 20, 2008 2:30 pm UTC

### Re: Those really good logic puzzles

Ercasse wrote:Solution to the Self Referential Aptitude Test (http://www.dougb.com/srat.html)
Spoiler:
D A D B E D D E D A B A D B A D B A E B

Haven't gone through to see if thats the only answer yet.

I too enjoyed this puzzle back when I was first introduced to it. Here's an interactive version of it that checks your answers against the constraints and other answers you select as you go along http://www.drunkmenworkhere.org/170.php?.

Note: This means that selecting each possible answer for a question won't reveal the correct answer, only that it complies with your other answers.
Spoiler:
First, we seem to disagree on the answers to the last two questions. I suppose the drunkmenworkhere one could be different than the dougb one, though they look the same to me.

Second, since I'd already solved it by hand once I decided to let the computer do it this time. I entered the questions and their possible answers into Alloy as constraints (in the process of learning it). Unless I entered the constraints in incorrectly there is only one solution.

Edit: I should really start checking the dates on posts before I reply to them.