this post was submitted on 06 Aug 2025
494 points (99.2% liked)

xkcd

16883 readers
276 users here now

A community for a webcomic of romance, sarcasm, math, and language.

founded 3 years ago
MODERATORS
 

xkcd #3125: Snake-in-the-Box Problem

Title text:

Chemistry grad students have been spotted trying to lure campus squirrels into laundry hampers in the hope that it sparks inspiration.

Transcript:

Transcript will show once it’s been added to explainxkcd.com

Source: https://xkcd.com/3125/

explainxkcd for #3125

all 34 comments
sorted by: hot top controversial new old
[–] ImplyingImplications@lemmy.ca 42 points 11 months ago (2 children)

What about goats in circular pens? A goat is tied to the fence of a circular pen. How long does the rope need to be so that the goat can reach exactly half of the pen's area? What sounds like a high school math problem was eventually solved in 2020 via complex analysis.

Here's the answer:

[–] frank@sopuli.xyz 15 points 11 months ago (1 children)

What's really neat about this problem is that the 3D example, a bird in a cage, was solved sooner and is much simpler

[–] kureta@lemmy.ml 4 points 11 months ago

I thought "wtf" after reading the problem, said "wtf" out loud after reading this comment. pretty neat :)

[–] Tangent5280@lemmy.world 15 points 11 months ago (2 children)

I feel like the answer should be much simpler than that equation salad.

[–] bstix@feddit.dk 12 points 11 months ago

The difficulty is that the goat is tied to the fence.

It would be a lot easier to put a pole in the center of the circle.

The length of the rope would then be 0.5 x sqr(2) x fence radius.

[–] peoplebeproblems@midwest.social 12 points 11 months ago

Equation salad? It's elegant. Well, according to my father who was a math professor.

Deriving that monstrosity must be something out of a grad school horror novel.

[–] nialv7@lemmy.world 32 points 11 months ago (2 children)

Randall forgot psychology, which has involved a ton of putting animals in boxes...

[–] twice_hatch@midwest.social 13 points 11 months ago

In computer science, you steal the box from the psych department and put children in it so you can sell them loot crates

[–] FooBarrington@lemmy.world 6 points 11 months ago

Also zoology

[–] don@lemmy.ca 11 points 11 months ago

I guess a key thought experiment doesn’t qualify as a reason, and also we are supposed to conveniently forget about putting spherical cows in a vacuum just because.

[–] morphballganon@lemmynsfw.com 8 points 11 months ago* (last edited 11 months ago) (4 children)

Either I'm misunderstanding the problem or a length of 8 is possible.

Edit: found my mistake, far left edge has two non-consecutive segments on adjacent corners. Leaving this up in case anyone else tries for a better score.

[–] squaresinger@lemmy.world 3 points 11 months ago (1 children)

1000052407

This should do it, or am I missing something?

[–] leftzero@lemmy.dbzer0.com 7 points 11 months ago

The head would share an edge with the arse (supposing the arse is on the first bend from the tail).

[–] draycs@lemmy.world 2 points 11 months ago (1 children)

Unless your snake is an ouroboros, I don't think folks will count the head and tail as consecutive

[–] morphballganon@lemmynsfw.com 2 points 11 months ago

The head and tail aren't adjacent if you only look at my blue line and not the original. But my attempt fails due to the far left edge.

[–] RagingHungryPanda@piefed.social 2 points 11 months ago (1 children)

I'm just nodding along and hoping no one notices i don't know what's happening

[–] HeyThisIsntTheYMCA@lemmy.world 2 points 11 months ago

you mean the snake didn't know internal affairs was on to them the entire time?

[–] DosDude@retrolemmy.com 1 points 11 months ago* (last edited 11 months ago) (1 children)
[–] leftzero@lemmy.dbzer0.com 8 points 11 months ago

Your snake has two heads.

Also, one of them shares an edge with the tail.

[–] WilloftheWest@feddit.uk 7 points 11 months ago* (last edited 11 months ago)

We have one for combinatorics: Ask Fibonacci about his rabbits.

[–] ShinkanTrain@lemmy.ml 5 points 11 months ago

I'm still trying to fill that hotel with infinite monkeys

[–] BlackLaZoR@fedia.io 5 points 11 months ago (3 children)

I'd expect something around ~200 for n=9 and ~400 for n=10, but I imagine this is too big to be brute forced by raw computing

[–] elrik@lemmy.world 9 points 11 months ago (1 children)
[–] Klear@lemmy.world 1 points 11 months ago

Wow, it already lists the xkcd in the links section. I have a feeling that snake is gonna bite its tail soon.

[–] four@lemmy.zip 2 points 11 months ago (1 children)

I'd think that it's not "too much to be brute forced", but probably no one has thrown enough resources at that recently

[–] BlackLaZoR@fedia.io 1 points 11 months ago

With each additional dimension, the amount of possible combinations grows exponentially. Without serious optimization efforts, computation requirements get prohibitive very, very fast

[–] nialv7@lemmy.world 2 points 11 months ago* (last edited 11 months ago)

Some trivial bounds: F(n-1) + 1 <= F(n) <= F(n-1) * 2 + 1.

Also F(n) <= 2^(n-1)

[–] ksigley@lemmy.world 5 points 11 months ago

There really is an xkcd for everything.

[–] MarauderIIC@lemmy.zip 4 points 11 months ago

My combinatorics professor used gnomes!

[–] youCanCallMeDragon@lemmy.world 4 points 11 months ago (1 children)

In biology it’s less of a “thought” experiment

[–] Agent641@lemmy.world 2 points 11 months ago* (last edited 11 months ago)

More of a "This is how we weigh a critter that won't stay put for more than .3 seconds"