Given the numbers 1 to 1,000, what is the minimum number of guesses needed to find a specific number, if you are given the hint 'higher' or 'lower' for each guess you make?
"How do you weigh an elephant without using a scale?"
Displacement of the zoo environment's pool.
"If you had 5,623 participants in a tournament, how many games would need to be played to determine the winner?"
Let d = Log_2 N. Sum 2^(d-k) for k = 0 ... d
""You have three boxes. One contains only apples, one contains only oranges, and one contains both apples and oranges. The boxes have been incorrectly labeled so that no label accurately identifies the contents of any of the boxes. Opening just one box, and without looking inside, you take out one piece of fruit. By looking at the fruit, how can you immediately label all of the boxes correctly?"
The fact that no label is correct reduces the degrees of freedom by one, making the problem solvable.
"How many ..."
The packing efficiency of randomly organized spheres is .64. Know this number. Fear it.
Not to be too much of a smartass, but I'd be tempted to say "1" for the "minimum number of guesses" question. After all, you could be correct right off the bat and 1 is a technically correct answer to the ? as stated.
If we're going to be a smartass about it, the question never specifies that we're only looking at integers, so I'm forced to assume we're looking at reals.
Thus the probability of you correctly guessing the correct number within any finite number of guesses is zero.
Seems to me like they're asking for integers, but suppose they mean reals. Depending on the distribution, you can still guess the right number with positive probability. It could be dominated by 500!
that says "much of our effort in this book is to find a packing, in arbitrary spaces, that is as efficient as the simple tetrahedral packing is in R^3".
"If you had 5,623 participants in a tournament, how many games would need to be played to determine the winner?"
Let d = Log_2 N. Sum 2^(d-k) for k = 0 ... d
The a-ha solution to this puzzle is to realize that every participant but one has to lose exactly once. Each game has only one loser, so you need 5622 games.
Your method overestimates the number of games needed because you start counting at 0. (Think about the simple case where N=2.) Even if you started counting at 1, your method wouldn't in general give an exact answer (and would typically under- or over-estimate depending on whether you started counting at 1 or 0, respectively), but if you had a nice power of two (say, 2^d on the nose), then the sum from 1 to d of 2^(d-k) would give you exactly 2^d -1, which agrees with the a-ha answer.
Nobody, but it was implicit in the solution proffered by the post I replied to. If the game they are playing has 5623 participants with one winner and 5622 losers, you only need a single game!
The a-ha answer still works, but the orignal answer given has you sum 2^(d-k) from k =0 to d, so in this example would be 2^1 + 2^0, suggesting that you would need 3 games to determine the winner.
Actually that's the maximum number of guesses needed (assuming you're aware of the binary search concept), not the minimum. The minimum is 1. This is a trick question and you have failed the first interview question and have been shown the door... Good illustration of why the questions are, in fact, ridiculous unless they are just used as a "jumping off" point for discussion (which is rarely what happens, IME).
I call bullshit. The minimum number of questions is this context implies the minimum number you need to ask to be guaranteed to find a solution. Any other interpretation is meaningless.
But of course, the safe answer would be to explain it in the verbose way and not just shout out "TEN".
I considered this, but rejected it. If you interpret the problem in this way the answer is dependent on an undefined parameter. The clearest interpretation of the problem, the most useful interpretation of the problem, and also a nontrivial interpretation, is "what is the lowest upper bound on the number of guesses".
If you want to solve the oblate sphereoid packing problem in an interview... I will hire you to do anything you find amusing and patent the results. :)
The worst type of interview question is the "you either know it or you don't" type. There's some special trick to solving it, and it's so overused that half the people being interviewed have heard it before. The "blender" one here is an example -- I've heard it a couple of times before, but I've never thought of a good solution... I guess I'm not sufficiently familiar with blender design. Is it a good move just to wrap myself around the blade shaft?
"Using a scale of 1 to 10, rate yourself on how weird you are.": You could tell a lot about a person (especially a person straight out of college) by their answer to this one. Not sure what I'd give myself. Maybe a 2 pi.
"Explain to me what has happened in this country during the last 10 years." -- sounds like a silly question, but wow you're going to be able to find out a lot about a person's world view by the way they answer that.
"If you could be any superhero, which one would you be?" -- this I don't like. It makes me feel like I'm being interviewed by a nine-year-old. Also, is it too obvious to say Batman? Probably.
"What is your fastball?" -- What? Is this a baseball thing?
I interviewed with Epic Systems last week, saw the question about flowers, and answered it correctly. If all but 2 are roses, all but 2 are daisies and all but 2 are tulips, you have three flowers (one of each).
Contrary to the article, though, Epic asked this on a written assessment test, so they were not so interested in thought process.
Seems it would, but there might be an issue with having a bouquet of two flowers. Still, I like your answer better... predicating on the empty set is fun.
If anyone is interested in answering such questions, or are interviewing for positions that would require them to answer such questions, they should read the following book:
In my past life, I used to work in private equity, and as such before landing that job has a lot of interviews which posed such questions for trading, banking, quant hedge funds etc.
The ridiculousness of these questions amazes me; most companies spit out the same 1000 questions or so across multiple candidates, and eventually people just learn the answers to such questions and memorize them.
I think case interviews, where you actually have to solve problems are much more effective, and can be used towards different positions.
As much as I love logic puzzles, the real question is "How can you convince someone with hiring authority in the company that you would be an asset to them personally?"
This does not typically involve resumes or dredging up old math team tricks on command.
Assuming that it was an interview for an electrical engineering position, the Intel question "Explain quantum electrodynamics in two minutes, starting now" doesn't seem at all ridiculous. If you don't understand the topic well enough to give a brief overview of the concepts, you're not qualified to work an engineering job in the semiconductor industry.
I didn't say that I was qualified to work an electrical engineering job at Intel. (I'm not.) However, I know enough (from watching Feynman's University of Auckland lectures - see http://vega.org.uk/video/subseries/8) to understand that QED theory is absolutely fundamental to Intel's business, both in chip design and in manufacturing processes.
Are you sure you're not getting quantum electrodynamics confused with quantum mechanics? Because QED barely matters in semiconductors at all. Pretty much anything you could possibly care about in semiconductors can be done with the plain ol' Schroedinger equation.
Reminds me of the Saki character who was asked a young woman how many chickens she could keep in a pen of certain dimensions. His reply "Whole crowds, as long as you keep the door closed." satisfied her, or at least closed of further questions.
Maybe I'm getting old, picky, arrogant, or some other malady, but I am simply uninterested in working at a company that asks these types of riddles. There are many more practical ways to gauge people's thought processes, and I'd like to think that my PhD and patents are superior evidence of abstract thought than answering questions that are common enough to have books published about them.
41 comments
[ 3.0 ms ] story [ 89.9 ms ] threadLog_2 1000.
"How many balloons would fit in this room?"
.64 * length * width * height (distance measurements roughly in feet).
"How do you weigh an elephant without using a scale?"
Displacement of the zoo environment's pool.
"If you had 5,623 participants in a tournament, how many games would need to be played to determine the winner?"
Let d = Log_2 N. Sum 2^(d-k) for k = 0 ... d
""You have three boxes. One contains only apples, one contains only oranges, and one contains both apples and oranges. The boxes have been incorrectly labeled so that no label accurately identifies the contents of any of the boxes. Opening just one box, and without looking inside, you take out one piece of fruit. By looking at the fruit, how can you immediately label all of the boxes correctly?"
The fact that no label is correct reduces the degrees of freedom by one, making the problem solvable.
"How many ..."
The packing efficiency of randomly organized spheres is .64. Know this number. Fear it.
Thus the probability of you correctly guessing the correct number within any finite number of guesses is zero.
Seems to me like they're asking for integers, but suppose they mean reals. Depending on the distribution, you can still guess the right number with positive probability. It could be dominated by 500!
But if the answer is binary then the question is "is it larger than 500" and then no, you can't ever be right in one guess.
http://en.wikipedia.org/wiki/Random_close_pack#For_spheres
IIRC, there's a passage in Conway and Sloane's comprehensive review of sphere-packing (the same Sloane as EIS, http://oeis.org/)
http://www.amazon.com/gp/product/0387985859/ref=dp_proddesc_...
that says "much of our effort in this book is to find a packing, in arbitrary spaces, that is as efficient as the simple tetrahedral packing is in R^3".
The a-ha solution to this puzzle is to realize that every participant but one has to lose exactly once. Each game has only one loser, so you need 5622 games.
Your method overestimates the number of games needed because you start counting at 0. (Think about the simple case where N=2.) Even if you started counting at 1, your method wouldn't in general give an exact answer (and would typically under- or over-estimate depending on whether you started counting at 1 or 0, respectively), but if you had a nice power of two (say, 2^d on the nose), then the sum from 1 to d of 2^(d-k) would give you exactly 2^d -1, which agrees with the a-ha answer.
Actually that's the maximum number of guesses needed (assuming you're aware of the binary search concept), not the minimum. The minimum is 1. This is a trick question and you have failed the first interview question and have been shown the door... Good illustration of why the questions are, in fact, ridiculous unless they are just used as a "jumping off" point for discussion (which is rarely what happens, IME).
But of course, the safe answer would be to explain it in the verbose way and not just shout out "TEN".
Ah, but who said anything about the balloons being full?
That gives you the elephant's volume. What's the density of an elephant?
The worst type of interview question is the "you either know it or you don't" type. There's some special trick to solving it, and it's so overused that half the people being interviewed have heard it before. The "blender" one here is an example -- I've heard it a couple of times before, but I've never thought of a good solution... I guess I'm not sufficiently familiar with blender design. Is it a good move just to wrap myself around the blade shaft?
"Using a scale of 1 to 10, rate yourself on how weird you are.": You could tell a lot about a person (especially a person straight out of college) by their answer to this one. Not sure what I'd give myself. Maybe a 2 pi.
"Explain to me what has happened in this country during the last 10 years." -- sounds like a silly question, but wow you're going to be able to find out a lot about a person's world view by the way they answer that.
"If you could be any superhero, which one would you be?" -- this I don't like. It makes me feel like I'm being interviewed by a nine-year-old. Also, is it too obvious to say Batman? Probably.
"What is your fastball?" -- What? Is this a baseball thing?
Contrary to the article, though, Epic asked this on a written assessment test, so they were not so interested in thought process.
http://www.amazon.com/Would-Move-Mount-Microsofts-Puzzle/dp/...
In my past life, I used to work in private equity, and as such before landing that job has a lot of interviews which posed such questions for trading, banking, quant hedge funds etc.
The ridiculousness of these questions amazes me; most companies spit out the same 1000 questions or so across multiple candidates, and eventually people just learn the answers to such questions and memorize them.
I think case interviews, where you actually have to solve problems are much more effective, and can be used towards different positions.
This does not typically involve resumes or dredging up old math team tricks on command.