
The moving sofa problem - franzb
https://en.wikipedia.org/wiki/Moving_sofa_problem
======
lb1lf
Recycled anecdote from the last time this was discussed on HN:

While a student, I looked after the apartment of a friend of mine, who was
overseas.

When he moved there, we were _just_ able to eke his sofa around the last
corner from the stairwell and through the door to his apartment. Just. After
much cursing and several failed attempts.

So, what does a good (cough) friend do while the owner is overseas?

Get some hardwood mouldings/trimmings/whatever you call those long, thin
pieces of wood typically put where wall transitions to ceiling or floor and
nail them to the exterior doorframes, making both door openings perhaps 3/8"
or so narrower, paint them in the color of the doorframe, sit back and wait.

Then, years later, as he is about to leave town, moving company comes along
and everything runs smoothly until one item remains. The sofa. Obviously, it
got in - so it'll (as obviously) come out. Only it doesn't.

We (everybody except the owner and the moving guys were in on the joke)
managed to keep a straight face for several minutes.

The moving guys even laughed as they (eventually) left, mollified by a bottle
filled with a Scottish export product which we'd kept on hand to ensure no
feelings were hurt afterwards.

~~~
te_platt
That especially hurt me too read as just this morning I helped a friend move a
couch. We had had to turn it pretty much every way possible and the only
reason we kept trying was because we knew somehow she got it moved in. It's
interesting that in so many different areas knowing there is a solution makes
finding the solution easier.

In a related story my dad remodeled his house and put in a new wall blocking
in a couch. When it came time to move it (years later) I thought it was going
to be a permanent feature of that room. My dad came up with the solution of
getting a saw and cutting the couch into pieces.

~~~
fcbrooklyn
This is such a common issue in NYC that we have a business (the couch doctor)
that does nothing but take apart furniture and reassemble it in place. Friend
of mine used them and they were apparently really impressive (he told them
what sofa he had, the dimensions of his door, and they knew right away it
wouldn't be a problem)

~~~
ghaff
A number of years back I bought a couch from my brother. I promptly took off
on a trip on which I managed to badly break my foot so he ended up dumping the
thing at my house and it sat in my garage for months.

Once I was mobile again, I realized it was a tight fit and the sofa wasn't
actually symmetrical. Fortunately, it was asymmetrical in the right way for
the room but I had a momentary panic.

>we have a business (the couch doctor)

I also have to say that I just love how businesses get created to deal with
especially largely localized problems and do a really good job at it. Even at
a national level, I met with a specialist company yesterday to do something in
my house and it was very refreshing.

------
willvarfar
If anyone hasn't read or has forgotten Douglas Adams 'Dirk Gently's Holistic
Detective Agency' then I warmly recommend it. It includes, iirc, The Sofa
Problem and the solution is classic Adams and all HNers will love it! :)

~~~
noir_lord
Wondered if anyone would mention this, also if you haven't tried it the
Netflix version of Dirk Gently is wonderful, departs from the books without
departing from the characters.

~~~
bostik
The first season is delicious, the second one (unfortunately) veers too far
off into the odd mix of fantasy, conspiracy theories and mysticism. I'm
curious what the third one brings.

Casting-wise, I am not sure Elijah Wood was the best choice. Big name for
impact maybe, but the role just feels ill-fitting.

~~~
scrooched_moose
Unfortunately nothing, it's been cancelled.

[https://www.google.com/amp/s/deadline.com/2018/03/dirk-
gentl...](https://www.google.com/amp/s/deadline.com/2018/03/dirk-gentlys-
holistic-detective-agency-will-not-have-a-season-3-producer-1202335666/amp/)

------
mkl
Gibbs's computational approach is really interesting [1]. Keep the sofa still
and move the corridor, and the optimal sofa shape is the intersection of all
(well n, since it's a numerical approximation) the corridor shapes as they
sweep around.

[1]
[https://www.researchgate.net/publication/311900489_A_Computa...](https://www.researchgate.net/publication/311900489_A_Computational_Study_of_Sofas_and_Cars)

~~~
cheerlessbog
That link does not work for me, but this may be better :
[https://www.math.ucdavis.edu/~romik/movingsofa/](https://www.math.ucdavis.edu/~romik/movingsofa/)

~~~
mkl
That is a different article. My link to Gibbs's article came from Wikipedia,
but your link points to another copy:
[http://vixra.org/pdf/1411.0038v2.pdf](http://vixra.org/pdf/1411.0038v2.pdf)

Maybe that one will work for you.

------
vinchuco
Kudos to the animation illustrator [0]. See also [1]. I'm collecting these for
reasons.

[0]
[https://en.m.wikipedia.org/wiki/User:Rocchini](https://en.m.wikipedia.org/wiki/User:Rocchini)

[1]
[https://news.ycombinator.com/item?id=15549197](https://news.ycombinator.com/item?id=15549197)

~~~
mar77i
That particular guy appears to have a knack for geometry, 4-dimensionality and
hyperbolic spaces. Topics that I feel like I have a foot in from watching my
favorite Parker square videos...

------
enriquto
This problem seems tame and uninteresting compared to the real-life 3D case.

Last christmas, I was moving a sofa on my mother-in-law's home, and it was
stuck in the corridor. She told me "i seem to recall that you have to raise
this side a bit". I replied something to the effect "no way, i am a
mathematician and there's no way that this can possibly make a difference".

Of course she was right. I could only move the sofa by rotating it in 3D _just
so_ , so that the slightly protruding arm and leg could pass one after the
other.

So the real question, not dealth with in the wikipedia page, is: what is the
largest sofa that we can move through a unit corner, allowing it to rotate in
3D ?

~~~
OscarCunningham
I guess the answer might be to take the largest 2D sofa and just extrude it
upwards 1, so that it fills the height of the corridor.

~~~
enriquto
It will depend on how you define the "largest" sofa: total volume? surface
area of the ground covered by it?

If it is the largest volume, you need to limit the height of the corridor (to
be the same as the width? a multiple of it?). Otherwise, you can pass an
arbitrarily long L that you turn side-wise on the corner.

~~~
OscarCunningham
I was thinking of maximising the volume of the sofa in a corridor as tall as
it is wide.

------
vignesh_m
Somewhat related, but more counterintuitive and "solved":
[https://en.wikipedia.org/wiki/Kakeya_set](https://en.wikipedia.org/wiki/Kakeya_set)

------
tambourine_man
Nice numberphile vídeo on the subject:

[https://youtube.com/watch?v=rXfKWIZQIo4](https://youtube.com/watch?v=rXfKWIZQIo4)

------
SOLAR_FIELDS
Would proving this advance our knowledge in some related field such as
mathematical topology? Since the values have already been brute forced (but
unproven) there really isn’t any direct practical application for knowing the
solution

~~~
mabbo
> there really isn’t any direct practical application for knowing the solution

Oh, but math always seems that way. And often, it is. But sometimes, very
rarely, your solution to the sofa problem explains a key detail to P vs NP, or
allows a breakthrough in transistor design, or improves the airflow
calculations allowing for faster jets, etc.

Math's true beauty is that it's never done playing games with us as we realize
all the strange connections.

------
thomasfedb
Kickstarter idea: Gerver's sofa in Italian leather.

~~~
mkl
It doesn't seem very practical as furniture - there's a big hole in the
middle. Actual sofas can be moved in three dimensions, so can be more usefully
shaped.

~~~
mattkrause
It might not be awful if it came with a matching coffee table for the middle
section.

~~~
berbec
Even better - a detachable ottoman. It fills the hole when you want a sofa,
and becomes a footrest when you don't.

------
chdefrene
Numberphile did a great video on this topic
[https://youtu.be/rXfKWIZQIo4](https://youtu.be/rXfKWIZQIo4)

------
kyberias
Pivot!

~~~
ezequiel-garzon
Yes! [https://youtu.be/Tam7KO4qhUI](https://youtu.be/Tam7KO4qhUI)

------
Biba89
It would be great to someone create a game where you should calculate and
create sofa in order to move sofa through the building passages

------
flingo
Can someone just put this in an ISO standard already, so I know how wide to
make my hallways?

------
ourmandave
var numberOfMovers = (! hideABed) ? 3 : 0;

