News for hackers. Stuff that matters.
Re:Longest Lines of Sight on Earth by kovek on Wednesday July 26, 2017 @09:59PM (#14862070)
I had this question worded differently asked to me when I interviewed to do an undergrad at Cambridge. If you have a rope that is wrapped around earth and you lift it off the ground as much as possible, and you see that it is 10km above the ground, then how long is the rope?

I was not able to answer that question right away, and their hint to draw it helped a lot. I did not end up getting accepted.

Re:Longest Lines of Sight on Earth by seanmcdirmid on Wednesday July 26, 2017 @10:27PM (#14862221)
It seems like one of those stupid brain teasers tech companies used to ask that are not very correlated with success but act as arbitrary filters.
Re:Longest Lines of Sight on Earth by anyfoo on Wednesday July 26, 2017 @11:57PM (#14862589)
In this case the "arbitrary filter" was filtering applicants to a university for very basic math knowledge, so I think assuming that it's correlated with success at that university is not very far fetched.
Re:Longest Lines of Sight on Earth by seanmcdirmid on Thursday July 27, 2017 @12:05AM (#14862618)
Euclidean geometry games are hardly what people do in the real world, but if it floats your boat:

https://www.euclidea.xyz

I don't think after playing 20 or so levels I was much smarter for it. It turned out to be a bunch of rules that were extremely limited. You do begin to appreciate trig much more.

If you are being given a geometry subject test and are prepared for it, this is fair game. If the question is just given out of the blue as a brain teaser, then no, the university is not mining useful signals at all.

Re:Longest Lines of Sight on Earth by rishabhsagar on Thursday July 27, 2017 @06:01AM (#14863899)
Thank you. Here goes the 2 or so hours of me doodling away.. :)
Re:Longest Lines of Sight on Earth by BurningFrog on Thursday July 27, 2017 @01:06AM (#14862843)
Sure, but it also filters for people like me, who have seen this problem at least a dozen times.
Re:Longest Lines of Sight on Earth by pm215 on Thursday July 27, 2017 @05:44AM (#14863815)
When I did my university entrance interview (for maths, at Cambridge) the interviewers were clear that they expected that some subset of candidates would have seen the problem before, and some wouldn't -- for those in the first set they'd get them to quickly go through the problem and move onto the later parts which would be new to them; for those in the second set they'd provide sufficient guidance to let the candidate walk through the problem. The point was to get any particular candidate to a point in the problem sequence where this was something new to them, and then see how they tackled things. The idea that some applicants (usually from public schools) would have been very highly prepped for interview and others (usually from state schools) would not was clearly something they were well aware of and setting their interview design up to handle.
Re:Longest Lines of Sight on Earth by erispoe on Thursday July 27, 2017 @08:25AM (#14864588)
But how do you know it's a new problem? You can always fake a little struggle and thinking your way to the solution for a problem that you know the answer already.
Re:Longest Lines of Sight on Earth by seanmcdirmid on Thursday July 27, 2017 @01:47AM (#14862946)
Ya, these also can totally be gamed with the right amount of prep.
Re:Longest Lines of Sight on Earth by chrisseaton on Thursday July 27, 2017 @09:28AM (#14865008)
So why doesn't everyone pass the interview?

Either they can't be gamed, or they select for people who can at least be bothered to do the work to game them.

Re:Longest Lines of Sight on Earth by seanmcdirmid on Thursday July 27, 2017 @10:19AM (#14865484)
Depends on your resources for prep. Poor kids have less resources for that than rich kids, so they ultimately select for richer candidates.
Re:Longest Lines of Sight on Earth by coldtea on Thursday July 27, 2017 @01:44AM (#14862936)
Yes, because they don't want to measure "success" but knowledge of basic math.

Which is par for the course for an educational institution (and a business one could argue).

Re:Longest Lines of Sight on Earth by Dove on Thursday July 27, 2017 @04:53PM (#14869396)
I don't see anything tricky about that problem. It requires some junior high geometry and high school trig, and yes, I suppose you need to know the radius of the earth offhand. Still. That strikes me a lot more as a math fizzbuzz than as a brain teaser. A college applicant can be reasonably expected to know this stuff.
Re:Longest Lines of Sight on Earth by PhantomGremlin on Friday July 28, 2017 @04:41AM (#14872865)
I suppose you need to know the radius of the earth offhand.

Or you can easily derive the radius if you remember that a meter was initially defined as 1/10,000,000 of the distance from the equator to the North Pole. So you can easily calculate the Earth's circumference, and from there the radius: 10,000,000 * 4 / 1000 / 3.1416 / 2 = 6366 km.

Wikipedia gives 6371 km as the mean radius.

Re:Longest Lines of Sight on Earth by logfromblammo on Thursday July 27, 2017 @10:51AM (#14865826)
It also seems to be a less coherent version of the chicken from Minsk puzzle.

Perhaps it's multiple choice.

  A.  Dreadfully sorry, but I'm afraid I haven't memorized the circumference of Earth.
  B.  What do you mean?  Over the poles or 'round the equator?
  C.  Is that 10 km above at all points on the rope, or just one?
  D.  What's the rope made of?  Jute?  Sisal?  Nylon?  How far apart are the supports?  Young's modulus...
  E.  I don't know about that, but I have inherited a rather large quantity of string in 3-inch lengths...
Re:Longest Lines of Sight on Earth by SamReidHughes on Thursday July 27, 2017 @03:39PM (#14868682)
That's a very straightforward math problem.
Re:Longest Lines of Sight on Earth by seanmcdirmid on Thursday July 27, 2017 @07:37PM (#14870735)
There is a lot more than the Pythagorean theorem in that question. It would require remember a lot of middle school theorems from a long time ago; frankly calculus would be better.
Re:Longest Lines of Sight on Earth by SamReidHughes on Saturday July 29, 2017 @11:50PM (#14884362)
No. You just need to know circumference = pi times diameter.
Re:Longest Lines of Sight on Earth by SamReidHughes on Sunday July 30, 2017 @04:37PM (#14887678)
Or no, I misunderstood the problem. Either way it's a simple problem that entering math majors should be able to solve.
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.
Re:Longest Lines of Sight on Earth by jnbiche on Thursday July 27, 2017 @08:23AM (#14864578)
To be clear, they gave you the radius of the earth here, if you didn't already know it by heart? Otherwise, I'm not getting how you could solve this problem (assuming they didn't give you the angle that the arch formed, for example).
Re:Longest Lines of Sight on Earth by ivanbakel on Thursday July 27, 2017 @10:36AM (#14865674)
You don't need to know the radius of the earth unless you're asked for a numeric answer. The rope is 2 * pi * 10km longer than the Earth's circumference, since its radius is 10km more.
Re:Longest Lines of Sight on Earth by jamesmaniscalco on Thursday July 27, 2017 @01:38PM (#14867581)
I think this is the wrong interpretation; your answer would be correct if the rope were hovering at a height of 10 km along the full length.

My interpretation is that the rope is pulled taut to a height of 10 km at a single point, so that it runs in a straight line to the horizon in either direction and lays on the ground the rest of the way; this is also relevant to the question of longest line of sight from a given height.

Re:Longest Lines of Sight on Earth by jnbiche on Thursday July 27, 2017 @03:34PM (#14868623)
Actually, it's a different question. Check out the second diagram linked to below: https://news.ycombinator.com/item?id=14863949

So yes, you could supply the answer in terms of r radius, but you do need to know the radius unless I'm missing something obvious.

Re:Longest Lines of Sight on Earth by ivanbakel on Thursday July 27, 2017 @03:43PM (#14868720)
That diagram wasn't posted by the GP.
Re:Longest Lines of Sight on Earth by jnbiche on Thursday July 27, 2017 @08:15PM (#14870940)
Yes, but I only posted that so you'd see which problem the GP is referring to: the second one. Unless somehow the rope is some special kind of non-flexible rope that always assumes the shape of a circle.
Re:Longest Lines of Sight on Earth by ivanbakel on Thursday July 27, 2017 @08:20PM (#14870963)
What makes you think that's the problem the GP was referring to? They haven't posted at all again in this thread to confirm exactly what was meant.