4 ms·
The version I got, in a tech company interview, was how much longer would you need to make the rope to allow a cat to go under it. They were basically just loo
by YZF 9y ago
The version I got, in a tech company interview, was how much longer would you need to make the rope to allow a cat to go under it. They were basically just look for 2 x Pi x Cat in this case.
- kijin 9y agoThat question is ambiguous. If you only need a single cat to go under the rope at some point, you just add a small arch for the cat to walk through. This requires a length of rope somewhat less than twice the height of the cat. 2 x Pi x Cat would levitate the rope by the height of the cat along the entire circumference of the Earth, allowing a billion cats to go under it simultaneously. You could even make do with no additional rope if you're allowed to take advantage of terrain.
- liuhenry 9y agoThe answer to the first interpretation is considerably less than twice the height of the cat, and I think it's an interesting result as well: Assuming a 0.3 meter high cat, you only need ~0.12mm of extra rope (about the width of two sheets of paper) to be able to pull it up at a point and let the cat through.
- davidmanescu 9y agoFollow-up question - after extending the rope by 0.12mm and pulling it up to allow the cat to pass under it, how far away are each of the two points where the rope lifts off the ground?
- mamon 9y agoHaven't done any calculations but I would guess half of the Earth circumference? because if you want to minimize the length of the rope then you have to maximize distance between those two points.
- tromp 9y agoAs the article explains, these points are about sqrt(2Rh) = sqrt(2 x 6400km x 0.3m) = sqrt(3840000m^2) ~ 1.96km away from the cat.
- davidmanescu 9y agoDid a back of the envelope trigonometry calculation as an approximation, seems to check out :)
- mannykannot 9y agoThat would be the same as the 'how far away is the horizon' calculation at the top of this thread, right? (assuming weightless rope.)
- jwilk 9y agoHere's the calculation: https://upload.wikimedia.org/wikipedia/commons/2/21/GeometricDistanceToHorizon.png https://upload.wikimedia.org/wikipedia/commons/2/21/Geometri... R ≈ 6.4E6 h = 0.3 d = √(2Rh + h²) ≈ 2.0E3 γ ≈ sin γ = d/(R + h) ≈ 3.1E-4 extra rope length = 2 × (d − γR) = 2R × (tan γ − γ) ≈ 2R × γ³/3 ≈ 0.13E-3
- codesnik 9y agoI'm not sure if I understood you, but 2pi(height of the cat) would allow to make two additional round loops, each sufficient for a very cylindrical cat to go through.
- Nition 9y agoI think that's a bit different. I tried to draw a diagram: http://i.imgur.com/XT3uGdM.png http://i.imgur.com/XT3uGdM.png If kovek's question was like the first image there, it'd be a simple radius/circumference calculation (2 * pi * 5km). But it sounds like the second image to me - which makes it into more of a horizon line problem.
- YZF 9y agoYeah, I know that. I'm just trying to add to the history of rope/earth/cat interview questions here. This was ~15 years ago by the way and to be clear we're talking about cats being able to pass anywhere, not the line of sight problem, which I agree makes it a little more interesting..,
- madcaptenor 9y agoThe "multiply by 2pi" version of this problem is the one where you have to lift the rope by a cat's height all around the entire earth. So if you have an army of southern-hemisphere cats and they need to get to the northern hemisphere, but you have cunningly put a rope around the equator because you don't want dogs to invade, how much extra rope do you need to lift it to just let in the cats but not the dogs? (I'm assuming all cats are shorter than all dogs.)
- logfromblammo 9y agoYou don't need more rope; you need a shovel.