Square root interview question

Imagine some of the answers you might get to  “What is the square root of 101?” First, three answers that suggest an interviewee is not strong with math.

  • What’s a square root?
  • You gotta calculator?
  • 101 doesn’t have a square root.

And here are some other answers that might give an idea where an interviewee is coming from.

  • An irrational number. (Pure mathematician)
  • Approximately 10. (Engineer)
  • Somewhere between 10 and 11, closer to 10. (Better engineer)
  • Approximately 10.05, based on a linear Taylor approximation centered at 100 (Applied mathematician)
  • Approximately 10.05, based on one step of Newton’s method (Computer scientist)

(This is just for amusement. I don’t think quiz show-like interviews are a good way to find people you want to work with for years.)

Related posts

53 thoughts on “Square root interview question

  1. Frédéric Grosshans

    @Christopher Allen-Poole : The Engineer’s answers stay true regardless of the base ! ;-)

  2. Clearly the best response to such an interviewer is to offer up the periodic continued fraction for the square root of 101:

    sqrt 101 = [10;20,20,20,…] = 10 + 1/(20 + 1/(20 + …))

    Then they can just just read off successive optimal rational approximations that alternate between over- and under-approximation: 10, 201/20, 4030/401… or more efficiently, we can turn to linear fractional transformations and just compute the matrix [10 1; 1 0] * [20 1; 1 0]^a very large power by peasant exponentiation and look at the columns as rationals to gain accuracy faster.

    For bonus points you can talk about how its closer to the first column than the second, and dig into why by bringing up the mediant of two unreduced fractions and generally prevent the interviewer from getting a word in edgewise for the next half an hour. On the other hand, my experience is that this response elicits a glazed over look from would-be interviewers.

Comments are closed.