
Cylinders in Spheres - stansmith
http://www.datagenetics.com/blog/july22014/index.html
======
carlob
One of those cases where using integrals rather than geometry is much simpler.

    
    
        \pi \int_-3^3 (R^2 - x^2) dx = \pi (6 R^2 - 18)
    

is the volume of the rotational solid without removing the cylinder. While the
volume of the cylinder is given by:

    
    
        \pi \int_-3^3 (R^2 - 3^2) dx = \pi 6 (R^2 - 9)
    

As you can see the difference between the two volumes is 36 \pi.

You can actually show the solution does not depend on \pi without evaluating
the integral, and then compute the 'cheat' case, which would not be a cheat
once you've made this observation.

~~~
stephencanon
Nit: the solution doesn’t depend on “R” (as you note, this is clear from
looking at the structure of the two integrals); it _does_ depend on \pi.

~~~
carlob
typo! And I'm out of the edit window.

------
svantana
Nice, I especially appreciate the "cheat answer" to the Gardner Puzzle at the
bottom of the page. I have found that kind of meta-reasoning about questions
quite useful, on exams and in games like Trivial Pursuit, for example.

~~~
bkcooper
Looking at the other comments, it seems like most people really like the
cheat. I admit it's very cute, and you're absolutely right that this sort of
thinking can be helpful in artificial situations like exams and games --- I've
used it myself.

That artificiality is why I don't really like that approach, though. It's a
brand of thinking that generally works only on artificial problems, because
the key component ("you wouldn't be asking me this if it didn't have a well-
defined answer") doesn't exist on most problems. Proving that it's constant
and then using the r -> 0 trick to calculate the constant is much more
satisfactory to me.

~~~
vorg
> that approach is a brand of thinking that generally works only on artificial
> problems, because the key component ("you wouldn't be asking me this if it
> didn't have a well-defined answer") doesn't exist on most problems

Perhaps changing the footnote hint "no more information is _given_ " to an
integral part of the problem spec, and saying "no more information is
_required_ ", would make the problem less artificial. There would then be a
self-referencial component in the problem definition, self-referentiality
being fairly common in nature and engineering.

------
scotty79
I once encountered question that had cheat answer. It was about trapezoid and
it seemed that it had some data missing.

I was amazed that just assuming that the question had one answer allowed to
reduce the problem to trivially calculable one by consistently manipulating
the variables that were not given.

I was also pretty proud of myself for finding this solution.

------
drcode
In the early eighties there was a TV show on German network television and I
remember them presenting this puzzle, and I figured out the "cheat solution"
as a kid.

It was this awesome TV game show that consisted entirely of Martin Gardner-
style puzzles and other fiendish physics/biology puzzles, and contestants who
were all scientists. Does anyone by any chance remember the name of this
German TV show? I would really like to look up more information about it! It
deserves to be remembered.

~~~
Someone
Likely Kopfball
([http://de.wikipedia.org/wiki/Kopfball_(Show)](http://de.wikipedia.org/wiki/Kopfball_\(Show\))),
although that is late eighties (and the precursor late seventies)

~~~
drcode
I found it through some extra searching starting from your link- "Kopf um
Kopf" ... Is that the precursor you were thinking of?

Here is a video on youtube that shows the awesomeness of this show (don't need
to know German to appreciate it- On the start of the show, putting your finger
under the device makes it spin in the opposite direction... why? The audience
member with the right answer would get a reward.)
[https://www.youtube.com/watch?v=1ObdE9n3UF4](https://www.youtube.com/watch?v=1ObdE9n3UF4)

Take a quick peek at a few other random spots of the show in the video and
marvel at the awesome scientific experiments on live TV: I think that was one
of the most bad ass shows ever, especially since it didn't have that
pejorative "science shows are only for kids" thing happening.

~~~
Someone
I'm not sure. Wikipedia claims that he precursor also was called Kopfball, and
has some overlap in the times when the series ran.

I just googled the "kopf" that I remembered in combination with "wissenschaft"
(science) and "fernsehen" (television), and that popped up, and I thought
"that must be it".

I should have been more cautious, though. German TV at the time had quite a
few interesting programs about science (in a broad sense) I remember programs
where they taught differentiation and integration, live chess (or at least, it
seemed like that; if a player takes ten minutes to think about a move, the
commenters would explain what the players might be thinking about) by such
players as Karpov, Timman, and Anand
([http://en.m.wikipedia.org/wiki/Chess_of_the_Grandmasters](http://en.m.wikipedia.org/wiki/Chess_of_the_Grandmasters)),
Hobbythek
([http://de.m.wikipedia.org/wiki/Hobbythek](http://de.m.wikipedia.org/wiki/Hobbythek))
about DIY, (with subjects such as "we build a hot air balloon", "book
binding", and "stereo photography"), and that program about personal computing
whose name I don't remember.

~~~
drcode
Yeah, Hobbythek was awesome, too... I remember at maybe 8 years old trying to
rebind one of my own broken books after probably seeing that exact episode you
mention...

It's really easy to get into this mode where you think "If it's not new and
American it's crap" because the US in recent years has been so prodigious in
creating such a large range of media of many different types, and because the
US is not shy in "Americanizing" things from other countries and improving on
them. However, there are definitely corners of brilliance lying in the past
and in other countries that have been forgotten, and will be rediscovered in
future years.

------
chton
The cheat is absolutely brilliant reasoning.

~~~
jerf
Ehh, sort of. It's logically flawed as phrased, in that the first bit is
false: "If the problem is being posed, it must have a constant solution" is
false; it could just as well be a niftily-simple symbolic solution too.

(I say "as phrased" because as other commenters observe, there are
mathematically valid ways to arrive at the result.)

This reminds me of one of my favorite joke proofs from when I was in school.
(It's so simple I'm sure it has other originations but AFAIK I independently
recreated it.)

"The problem begins with the phrase 'Show that...' or similar. All previous
problems that began with that phrase have been provable. Therefore, by
induction, the claim I am being asked to prove must be correct. QED."

Unfortunately, this proof line hit a snag about halfway through my graph
theory class in which we were assigned a problem out of the book that turned
out to ask you to prove a false statement. (Well, a snag above and beyond the
fact that that is an invalid inductive proof in general, _ahem_.) It was a
typo and clearly accidental, but it was enough to break my proof forevermore.
May you have better luck with it.

~~~
colanderman
My favorite "cheat" was on an exam in an algorithm-analysis class (lots of
discrete math, infinite sums, and proofs). We were asked to prove or find a
counterexample to some conjecture or other. Looking at the conjecture, and
looking at the clock, I decided the only thing I could complete in time was to
find a counterexample. Indeed within a few minutes I found one and wrote it
down.

I was the last to finish my exam and handed in my booklet; the prof looked it
over and noted I was the only one (out of 5) in the class to get that
particular question correct. I explained to him my "reasoning". He said, "yes,
that is how you're supposed to do it!"

~~~
millstone
In a linear algebra class, we were asked to prove that a theorem is true if
and only if X. (I think X may have been that a matrix had a nonzero
determinant.) I had no idea how to do it, but I noticed the theorem was
trivially true in the case of a 1x1 zero matrix. Since this matrix has a zero
determinant, it spoiled the "only if" part. I wrote it as a counter-example,
showing that "if AND only-if" was false, and didn't prove the "if." Full
credit!

------
eps
There is a simpler puzzle that's similar to Gardner's, but as unintuitive.

Take an orange and wrap a string around its diameter. Now extend the string by
1 inch and redistribute it around the orange so that it floats an even
distance from it. Do the same with the Earth, i.e. wrap, extend by 1 inch and
even out into a circle. The gap betwen the string and the orange/Earth - which
one is bigger?

~~~
nemetroid
Spoiler below!

The relationship between radius and circumference is linear (C = 2pi * r).
When the circumference is increased by 1, the radius increases by 1/2pi.
Therefore, the gap has the same size.

Let g be the gap. Then

    
    
              C + 1 = 2pi * (r + g)
        2pi * r + 1 = 2pi * (r + g)
        r + 1 / 2pi = r + g
            1 / 2pi = g

------
davtbaum
It wasn't (initially) clear to me that the cylindrical hole must enter and
exit the sphere.

With that knowledge the solution seems pretty intuitive.

~~~
fleitz
How can one drill a 6" long hole through a sphere of more than 6 inches in
diameter?

What I mean is if you drill 6 inches into the earth, you haven't passed
through the other side...

edit: I think they mean drill a 6 inch hole of maximum width, which of course
would just leave a very thin ring of the earth 6 inches tall.

~~~
dotrob
In the puzzle statement, "A six inch high cylindrical hole is drilled through
the center of a sphere," __through __is the keyword, rather than __into __.

I made the same initial mistake of misreading through as into.

~~~
delluminatus
In that case, the statement from the article "We could have a sphere as large
as a planet, bore a hole 6" in length through it..." seems inconsistent.
Either the cylinder is not 6" long, or it does not go through the sphere.

~~~
galvan
I thought that at first, but the length of the hole is dependent on the width
of the hole. The wider the hole, the shorter, because wider holes remove
bigger caps.

With a sufficiently wide hole, you could indeed drill a 6" hole through a
spherical Earth, it'd just look more like a thin ring the diameter of the
Earth than a sphere.

~~~
theophrastus
i still get a confused language impression from that. for me it's the
combination of "drill" and "through" (probably was forced to take too much
'wood shop')

i think it would be more clear to phrase it starting along the lines of:
position a cylinder concentric and inscribed within a sphere ...

------
tempestn
I'm just pleased that I finally found a math puzzle on HN that I was able to
solve without looking ahead! (Although I called the radius of the cylinder
r/a, where r is the radius of the sphere, which ended up making my math a bit
messy...)

Regardless, deserves an upvote just for the cheat answer at the end. I like
that kind of reasoning!

------
jbaskette
I remember reading and solving this the problem as the end of the article (“A
six inch high cylindrical hole is drilled through the center of a sphere. How
much volume is left in the sphere?”) as a kid. I did it the hard way using the
formula's, but the whole point of the puzzle was what this article called the
"cheat" answer. It reduces the solution to utter simplicity by application of
some elegant logic. It's not something of a cheat -- it's the whole point of
the puzzle.

I really was a kid. I was taken in by Gardner's April 1st column that claimed
among other things that a proven solution for "Chess" indicated that white
would always win and that the opening move was P-KR4 (h4 in modern notation).

~~~
sparky_z
It only wouldn't be a cheat if the question were framed as "Surprisingly, the
volume of the ring is constant, regardless of the radii of the sphere and
circle. What is that constant volume?" Otherwise, you don't really know your
answer is correct. Maybe, they wanted the answer in terms of R1 and R2. And if
you are able to trick them into confirming it, then you're essentially using
social engineering to leverage somebody else's work (the person who discovered
the surprising result) in formulating your answer. There's no way that the
original discoverer could have used that method. That's what makes it a cheat.

Back in middle school geometry, I came up with my own strategy for proving
theorems. "You wouldn't ask me to prove it if it weren't true, therefore it
must be true. Q.E.D." It didn't go over well.

~~~
eru
That's why in Uni they usually asked: prove this statement right or wrong (or
undecidable).

------
cousin_it
I solved the puzzle in my head before getting to the second paragraph in the
article. Here's the reasoning:

1) The area of a circle has a fixed ratio to the area of a square inscribed in
that circle.

2) Therefore the volume of a cylinder has a fixed ratio to the volume of a
square box of the same height, which sits inside that cylinder.

3) Therefore the biggest cylinder corresponds to the biggest box that can fit
inside the sphere.

4) That box is obviously a cube, because what else could it be?

5) If a cube is inscribed in a unit sphere centered at the origin, the corners
have coordinates ±1/√3, ±1/√3, ±1/√3.

6) Now you can calculate the volume of the cylinder in your head. Do it!

~~~
logicallee
Congrats! But I hope all that is a humblebrag, not a reflection of your
standards as a technical interviewer ;-)

~~~
cousin_it
Yeah, that was definitely a brag, nothing humble about it :-)

When I was a bit younger, I was in fact the typical asshole interviewer who
would ask lambda calculus questions. Now I mostly stay away from interviewing,
because I can emphasize much more with the pressure that candidates feel.

------
throwaway283719
It reminds me of two other neat problems -

1\. Imagine a band stretched taught around the diameter of the earth (which,
for the purposes of this question, is a smooth sphere). Now imagine that the
band is raised one metre from the ground at every single point along its
length. How much longer is it?

2\. Imagine perfectly parallel lines painted on the floor, exactly one foot
apart, and a rigid needle of length one foot. If you throw the needle to the
floor at random, what is the probability that it crosses one of the lines?
(This one has a nice 'cheat' solution just like the OP article).

~~~
KRuchan
Maybe I am missing something here, but why is 1 a neat problem? You are
increasing the radius by 1 meter so the length of the band is now 2 _pi_ (r_e
+ 1) making the increment 2*pi meters. Is the surprisingly low increment the
point of the problem?

~~~
Jun8
Most people when faced with 1 and knowing the huge circumference of the Earth
estimate (using Sytem 1 type thinking,
[http://en.wikipedia.org/wiki/Dual_process_theory#System_1](http://en.wikipedia.org/wiki/Dual_process_theory#System_1))
it would be longer by kilometers.

------
hammock
The author never pays off the answer to the initial question- is it a fat
cylinder or a skinny one? We know it has height ~1.15R (where R is sphere's
radius), but this is not easy to visualize.

~~~
Chinjut
The cylinder is sqrt(2) (~= 1.41) times as wide as it is high. So... a little
fat? (I don't know the healthy baseline for cylinders...)

------
quarterwave
To estimate an answer for the first problem: consider two cylinders with zero
volume, the one equatorial (r=R) and the other polar (r=0). Both correspond to
zero volume. Hence the maximum volume occurs (hand wave) for a height
somewhere between 0 and 2R. Not knowing better, the initial estimate for h is
to bisect this interval, to give h_est = R (compare 1 with 2/sqrt(3) ~= 1.15).

It would be nice to construct a first order correction term. Any ideas?

------
drjoe047
Regarding the Napkin Ring part of the problem.

Had the author simplified the formula for "Vanswer" rather than plugging in
values for h & c, he would have gotten:

Vanswer = (Pi/6) * h^3

From which is it easy to see that the answer in this particular case is 36 *
Pi but it also makes clear that the answer does not depend on R.

------
e3pi
...and its Archimedean inverse(his favorite!): a Wilson(tm)* soccer ball
enjoys 2/3 the volume and 2/3 the surface content of its minimal cylindrical
official Wilson(tm) shipping clear plastic blister pack.

*citation: Tom Hanks in "Castaway"

