惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
WordPress大学
WordPress大学
博客园 - 司徒正美
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
爱范儿
爱范儿
月光博客
月光博客
The GitHub Blog
The GitHub Blog
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
B
Blog
T
Tailwind CSS Blog
美团技术团队
D
Docker
V
Visual Studio Blog
Martin Fowler
Martin Fowler
博客园 - 聂微东
The Cloudflare Blog

The Guardian

Rory McIlroy surges into six-shot Masters lead with stunning second-round flourish ‘That’ll be the end’: actor Sam Neill joins fight to stop controversial goldmine near his New Zealand vineyard Roberto De Zerbi targets ‘Ange-ball’ revival to save Spurs from relegation Bath hit back to reach semi-final after stunning Northampton in 11-try epic Secret Garden to Outcome: the week in rave reviews Zebras, wealth and power: Hungary’s election tests Orbán’s grip on power ‘TikTok effect’ brings sellout crowds and younger fans to Grand National meeting The war over Omagh’s gold: the £21bn mine plan tearing a community apart Britain’s shadow workforce is paid as little as 65p an hour. Who cares for the carers? From You, Me & Tuscany to Euphoria: your complete entertainment guide to the week ahead Six great reads: the man who let snakes bite him, masked heavy metal and the brutal reality for foreign students in the UK American Classic review – I defy you not to fall in love with Kevin Kline and Laura Linney’s tender comedy Cuba’s doctors were a lifeline for the world. Now the Caribbean is shamefully complicit in the US drive to expel them An environmental disaster in Moldova has Russia’s fingerprints all over it RMIT drops misconduct case against student who accused university of being ‘complicit in Gaza genocide’ Ichiro Suzuki statue unveiling goes awry as bronze bat snaps during ceremony Survivors of Epstein’s abuse accuse Melania Trump of ‘shifting burden’ on to victims European football: Real Madrid held at home by Girona to extend winless run Arne Slot insists he is ‘aligned’ with Liverpool board and fans as squad is rebuilt Kamala Harris ‘thinking about’ running for president again in 2028 JD Vance warns Iran against trying to ‘play’ the US in peace talks West Ham double up twice to thrash Wolves and put Spurs in relegation zone Trump administration releases new renderings of so-called ‘Arc de Trump’ Crispin Odey drops £79m libel claim against FT over sexual misconduct allegations Bafta apologises for events surrounding John Davidson’s Tourette’s outburst Cocktail of the week: Bar Shrimp’s la rosita – recipe New drug may extend survival in aggressive ovarian cancer, trial shows One dead and 27 injured after bus with British passengers crashes in Canary Islands Pope adds to Smith’s mass of Surrey runs with England woes a world away OpenAI CEO Sam Altman’s home targeted with molotov cocktail
Did you solve it? Are you as s-s-smart as a snake?
Alex Bellos · 2026-04-28 · via The Guardian

Earlier today I asked you this slippery question. Here it is again with the solution.

Snakes in a cage

Two snakes of equal width are in a cage. One is long and the other is short.

Design two escape passages, A and B, that lead from the bottom of the cage such that

The short snake can escape down A, but the long snake can’t.

The long snake can escape down B, but the short snake can’t.

The passages must have no moving parts, trapdoors or levers. Assume that the snakes have circular cross-sections, and the diameter is the same at all points along their bodies. The snakes can wriggle but they can’t squeeze through passages that are narrower than they are wide.

Solution

Passage A must have some kind of a loop, where the loop is longer than the small snake but shorter than the long one. Here’s a sketch of an escape route that works.

snakes puzzle

The passage is a tube that has the same diameter as the snake. The snakes will follow the arrows. When the long snake doubles back and reaches the place where the tube meets itself, it cannot get through because its body is blocking the way. The short snake does not have that problem and can pass.

Note that a snake cannot turn “right” at the join. This is because the gap from the top to the bottom tube is not wide enough. To show this I have drawn the cross section at the join. It has the outline of two overlapping circles. When the snake is in the top tube, it cannot squeeze into the bottom tube, so it must follow the arrows and go into the loop. When the long snake goes round the loop and meets itself again, its body in the top tube will cut off part of the lower tube, so it will not be able to get through.

Passage B is simpler. You just need the passage to pass though some kind of hole in the floor that the short one will not be able to move over without falling in, but that will not pose a problem for the long one. (We need to assume non-zero rigidity in the snake.)

Thanks for all the herpetological jokes below the line in the original post. Not all of them were as painful as a snake bite!

I’ll be back in two weeks.

Source: Kvantik Magazine 2014.

I’ve been setting a puzzle here on alternate Mondays since 2015. I’m always on the look-out for great puzzles. If you would like to suggest one, email me.