Live data from Hacker News

Cylinders in Spheres

datagenetics.com

51–60 of 60 posts

Re: Cylinders in Spheres

#51

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…

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 some…

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

Re: Cylinders in Spheres

#52
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?

Re: Cylinders in Spheres

#53
...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"

Re: Cylinders in Spheres

#54
post #47
post #26

Earlier quoted context omitted.

#2 is 3/Pi. It's a good puzzle and it helps to know the answer :)

Maybe it's just me, but that one could use better wording. Because of the "exactly one foot apart" phrase, I interpreted it to mean that there are only two parallel lines, which obviously makes it a poorly defined problem. I probably would have understood it if the phrase was replaced by "at one foot intervals."

I fell for this too. My initial answer, suspect of course, was thereby zero. :-)

Re: Cylinders in Spheres

#55

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.

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…

> 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.

Re: Cylinders in Spheres

#56
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!

Re: Cylinders in Spheres

#57
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!

Re: Cylinders in Spheres

#58

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 ins…

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

Re: Cylinders in Spheres

#59

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 ins…

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

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.

Re: Cylinders in Spheres

#60

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 ins…

Step 4 seems a bit glib... :)

It would follow straightforwardly if we knew that the largest rectangle in a circle is a square.

The easiest way I can think of right now to see this is by Lagrange optimization (which we could also apply just as well directly to the 3d problem): the area of a rectangle of width and height has a gradient of , which can only be normal to the circle (which has normal vector ) when x = y.

Another way is to think of as proportional to ; the area is then cos(t) * sin(t), which is proportional to sin(2t), and thus clearly maximized when x = y.

Post reply on HN