Picture-Hanging Puzzles
Picture-Hanging Puzzles
Written by Mike James   
Tuesday, 20 March 2012

Here's a puzzle that is just asking to be turned into a popular browser-based game. Is it the next twist on Cut the Rope?


Computer scientists, mathematicians and programmers often share a love of puzzles and delight in inventing new ones. A recent research paper by a bunch of well known people including Erik and Martin Demaine and Ronald Rivest explores the not so well known Picture-Hanging Puzzle and a few of its variants. Given the current interest in games such as Cut the Rope, this could be source of more than one new computer game.

The basic puzzle is easy to state - all you have to do is hang a picture using n nails and wrap the string round the nails so that the picture falls when any k nails are removed. 

The original version of the puzzle was posed in 1997 by A Spivak and involved just two nails. Remove either nail and the picture falls. You can see the solution below as illustrated in the paper:


The idea is obvious to see - make loops around the nails  so that removing one of the nails unloops the string.

The most general version of the puzzle asks that the picture falls when particular subsets of nails are removed. The new research shows that this generalized puzzle always has a solution. The only problem is that the proof involves an exponentially increasing number of twists around the nails. However, if we restrict our attention to the k out of n version of the puzzle, then the twists only grow at a polynomial rate as the number of nails increases.

The theory is related to generalizations of the well-known Borromean rings which are linked together but fall apart when one ring is removed:



The three ring arrangement above provides the solution to the two nail problem. Generalizations provide solutions to the k=1 n nail problem. You can see the three nail solution below




The research makes connections between the picture hanging puzzle and group theory and monotone Boolean functions - so there probably is a serious application in there somewhere. And as you have probably guessed, there is something about complexity theory in there as well. In particular, we have the result:

For a given picture hanging on n nails trying to decide if there are k nails that whose removal makes the picture fall is NP-Complete.

The paper is fun to read and there are ten picture-hanging puzzles for you to try with solutions. There are also some open theoretical questions if you really want to dig deeper.

So can you convert this fun mathematics into a playable game?

I can already hear the sound of falling pictures.

More Information

Picture-Hanging Puzzles

Erik D. Demaine, Martin L. Demaine, Yair N. Minsky, Joseph S. B. Mitchell, Ronald L. Rivest, Mihai Patrascu arXiv:1203.3602v1

Related Articles

NP-Complete - Why So Hard?

No 16-Clue Sudoku!

Pancake flipping is hard - NP hard

Generalized Towers of Hanoi - Optimal Algorithm


blog comments powered by Disqus


To be informed about new articles on I Programmer, subscribe to the RSS feed, follow us on Google+, Twitter, Linkedin or Facebook or sign up for our weekly newsletter.


Fear And Loathing In the App Store 13 - Apple Rejects F.lux And It Isn't Even In The App Store!

I thought we had seen all the possibilities for troubles in the App Store, but this one reaches a new level of silliness. The app concerned wasn't even in the App Store, but Apple still managed to get [ ... ]

Babel 6 More Than A JavaScript Modernizer

Babel 6 is a JavaScript compiler that targets JavaScript 5 so that you can run the latest version in old browsers. In its latest version it also aims to be a framework for developing JavaScript tools. [ ... ]

More News


Last Updated ( Tuesday, 20 March 2012 )

RSS feed of news items only
I Programmer News
Copyright © 2015 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.