News for hackers. Stuff that matters.
Re:Longest Lines of Sight on Earth by YZF on Wednesday July 26, 2017 @11:05PM (#14862381)
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.
Re:Longest Lines of Sight on Earth by kijin on Thursday July 27, 2017 @02:58AM (#14863203)
That 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.

Re:Longest Lines of Sight on Earth by liuhenry on Thursday July 27, 2017 @04:13AM (#14863494)
The 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.

Re:Longest Lines of Sight on Earth by jwilk on Thursday July 27, 2017 @04:41PM (#14869260)
Here's the calculation:

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

Re:Longest Lines of Sight on Earth by davidmanescu on Thursday July 27, 2017 @05:41AM (#14863806)
Follow-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?
Re:Longest Lines of Sight on Earth by tromp on Thursday July 27, 2017 @06:17AM (#14863973)
As 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.
Re:Longest Lines of Sight on Earth by davidmanescu on Thursday July 27, 2017 @06:30AM (#14864023)
Did a back of the envelope trigonometry calculation as an approximation, seems to check out :)
Re:Longest Lines of Sight on Earth by mamon on Thursday July 27, 2017 @06:01AM (#14863897)
Haven'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.
Re:Longest Lines of Sight on Earth by mannykannot on Thursday July 27, 2017 @09:53AM (#14865230)
That would be the same as the 'how far away is the horizon' calculation at the top of this thread, right? (assuming weightless rope.)
Re:Longest Lines of Sight on Earth by Nition on Thursday July 27, 2017 @06:11AM (#14863949)
I think that's a bit different. I tried to draw a diagram: 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.

Re:Longest Lines of Sight on Earth by YZF on Thursday July 27, 2017 @05:46PM (#14869914)
Yeah, 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..,
Re:Longest Lines of Sight on Earth by codesnik on Thursday July 27, 2017 @03:03AM (#14863222)
I'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.
Re:Longest Lines of Sight on Earth by madcaptenor on Thursday July 27, 2017 @09:18AM (#14864937)
The "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.)

Re:Longest Lines of Sight on Earth by logfromblammo on Thursday July 27, 2017 @10:53AM (#14865852)
You don't need more rope; you need a shovel.