You have two nails in the wall and a painting with a string on its back, which can easily be rested on the nails to hang the painting. If you remove one nail, the painting will still hang on the other. But mathematicians said, “We can make it worse.” In 1997 A. Spivak posed the following riddle: Is there a way to hang the painting so that removing either nail will cause the painting to fall? Since then, mathematicians have expanded this concept into an intriguing family of picture-hanging problems. Retired computer scientist Tom Verhoeff first explored such problems in a workshop for a grade school math camp, where the campers investigated with actual string and carabiners but also translated the problem into symbols. On supporting science journalism If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today. In 2012 mathematicians posted a preprint proving that solutions exist for any k-out-of-n picture-hanging problem, where n is the number of nails and removing any k of the nails, but no fewer, will cause the painting to fall. Known solutions, however, can involve very elaborate string wrappings. At the workshop Verhoeff and the participants tackled the 2-out-of-4 problem, in which a painting will fall if any two of four nails are removed. They reduced the length of the shortest known solution from 80 to 58 wraps around the nails. Later, Verhoeff worked it all the way down to 18—and, with the help of then Ph.D. student Jens Heuseveldt and a computer program to check all smaller hangings, down to the absolute minimum of 16. Initially Verhoeff showed Heuseveldt a computer program to solve the problem in about two hours. “I then told him my program could solve it in two seconds,” Heuseveldt says. “And now his program is even faster than mine.” Verhoeff posted the results along with the...