Sunday, February 22, 2009

Luck of the Draw

Job interviews can be a total crapshoot. Just be glad you did't get asked these kinds of questions...or maybe you did. I compiled a short list of twelve brain teasers representative of what my friends and I have been asked in the past month or two during job interviews. An average interview may contain 3-5 such questions. At one company I took two, 30-minute tests filled with these kinds of questions. At another, my interviewer asked me arithmetic questions for 25 minutes. Six of these questions I was asked in real job interviews while the others were asked of my friends. Oh yeah, you only get pen and paper for the last three questions. Solutions are listed in the comments. Enjoy. (number 8 is my favorite)

1) Casino Game
A casino wants to try out a new game. The 'dealer' will blindly draw a poker chip out of a hat that contains 100 chips, each numbered from $1-$100. Each number occurs only once. Before the dealer draws the number, the player makes a guess. If his guess is within 10 above, or 10 below the number drawn, then he wins the dollar amount on the chip. In order to make a profit (on average) What is the minimum amount that the casino should charge players to play this game?

2) The Five Pirates
There are 5 pirates and 100 gold coins. In turn, each will propose a plan how to divide the 100 coins amongst themselves. After each proposal they will all vote on whether or not to accept the proposal. A proposal needs a majority vote (more than 50%) to pass. If it is not passed, the proposer has to leave. The process is repeated until a consensus is reached. (Obviously, if only 1 pirate remains after 4 rounds of voting then he gets all of the coins.) If each pirate wants to get as many coins as possible, how many will each pirate get?

3) Digital Option
You are a trader at an investment bank selling a digital option. Upon sale of the option, you agree to pay the buyer $1 in the event that company A's stock's price reaches $100. If company A's stock is currently worth $75, at what price should you sell the digital option?

4) A Wise King
A king over 10 provinces requires each province pay 1,000 gold coins, each weighing 10 oz., in taxes each year. This year, the king has been told that one of the provinces cheated him, by shaving 1 oz. of gold from each coin. How can the king prove which province has cheated him using only one measurement on a scale?

5) Missing Number
At the end of the day your boss is going to give you a spreadsheet. The spreadsheet will contain 9,999 numbers that are out of order. Each number is a distinct integer falling from 1 to 10,000. What will be the fastest way to tell which number is missing? i.e. the shortest amount of time for a computer. (hint: sorting the list is too slow)

6) Area of a Parallelogram
A parallelogram is divided into 4 triangles by drawing 2 lines, one from each vertex to it's opposite vertex. What is the area of the parallelogram in terms of the area of one of the triangles?

7) Integers
There are three integers, x,y, and z. They all add up to 20. x must be bigger than 0, y must be bigger than 4, and z must be bigger than 5. A solution is a set of x,y, and z that meet all the criterion. How many solutions are there?

8) One Hundred Story Building
You have two identical dinner plates and you are curious to find out how durable they are. You are in a 100 story building and decide to drop them out of the window on each floor until you know the height that produces a shattered plate when dropped. Minimizing the number of drops (on average), how do you determine the exact height (within one story) at which the plates break when dropped? (If you start at the first floor and drop on every floor until one breaks, you would know the exact height. Since you have two plates, you should use this to your advantage)

9-11) Arithmetic
What's 798*8 ?

Tell me the square root of 200 within 2 decimal places?

You have a roulette wheel, a deck of cards, and a six-sided die. What is the probability that they all turn up on the same number?

12) Logic Puzzle
The following 4 statements are written on a note card, how many of them are true?

Exactly 1 statement on this card is false
Exactly 2 statements on this card are false
Exactly 3 statements on this card are false
Exactly 4 statements on this card are false

4 comments:

Ben said...

I read two of these questions, and then skipped to the comments because i dont want to be reminded that I can't compete with actual smart people. Good job and congratulations that you are a smart person. Miss you.

Suzie said...

Um... wow. That is about all I can say to this. But perhaps you could answer a few questions for me...
1. What was the primary ritual that took place in the early Synagogue?
2. Where did the first Jewish blood libel take place? Riddle me that Batman.
P.S. The best job interview question I was ever asked was, "Tell me about your best friend." I got the job.

Caged Wisdom said...

I’m not sure all of these are right, but here goes:

1) These problems are kind of stupid. When you first hear them it's not clear what all of the assumptions are. If you're the casino what you have to do is think about what a logical player would do. If you were a player you have an equal chance of getting each number. since each number is equally as likely, you would maximize your winnings by guessing the number 90. The casino assumes that each player will guess 90 and since there is a 20/100 chance of the player winning, the casino would break even by charging 90*0.20 = $18.

2) The answer is that #1 will get 97, #3 will get 1, and #5 will get 2. Pirate #2 and
#4 will receive 0. I can't believe my friend got asked this in an interview. Very tough if you're not used to these game theoretical questions. What you do is work backwards.

If there is only one pirate left he (#5) will get all of the coins.

If there are two pirates left, then #4 needs both votes. There's no way he will be able to sway #5 so it doesn't matter what his proposal is. Explanation: #5 will vote against #4's proposal no matter what, since a 50/50 vote will cause the 4th pirate to walk away empty handed. And from the above scenario we know that #5 will get all of the coins.

If there are three pirates left (#3, #4, and #5) the third pirate needs 2 votes. He will propose 99 for himself, 1 for #4 and zero for #5. Explanation: Pirate #4 knows he's getting nothing if #3's proposal is rejected (see the above two scenarios), so it only takes 1 coin to sway him and obtain a 2/3 majority vote.

If there are 4 pirates left, then #2 needs 3 votes. He will propose that he receive 97, #3 receive 0, #4 receive 2, and #5 recieve 1. Explanation: #4 knows he's only getting 1 coin if #2 is "voted off" and #5 knows he's receiving nothing if #2 is voted off, so it only takes 1 more coin to get the 3/4 vote needed.

If there are 5 pirates left, then #1 needs 3 votes. He will propose that he receive 97 that #2 receive 0, #3 receive 1, #4 receive 0, and #5 receive 2. Since #3 knows he's going to get nothing, and #5 knows he's going to only get 1 if pirate #1 is voted off they will vote for his proposal since it will leave them better off than if they vote against him.

3) This can be answered with stochastic calculus and the dominated convergence theorem but the key to a quicker answer is in a little word we call 'replication.' The price of the option is the price of a strategy that replicates the option's payoff. It's kind of stupid though because you have to assume one can buy a fraction of a share.

What I do is buy .01 shares of stock. That way when the price reaches $100 I can sell it for $1 and payoff the option owner. So the price of the option is one one-hundredth of a share which is 75 cents today.

Another way to think of it is buying a whole stock today ($75) and shorting .99 shares today, from which sale I get .99*75 = $74.25. (The difference of which is 75 cents) When the price reaches 100 I will sell my share, give a doller to the option owner, and close out my short position of .99 shares with the remaining $99.


4) The king should take 1 coin from the first province's payment, 2 from the second, 3 from the third,...10 from the tenth. By weighing this pile of coins he will know exactly who the cheater is. If the pile is 1 oz too light, the first province was the cheater, if the pile is 2 oz short then it was the second province, and so on. Remember, each coin is 10 oz, so the pile should weigh 1+2+..+10=55 oz.

5) This is a lot like the king and the gold coins problem. Sorting a list takes way too long because at least 10,000 comparisons have to be made. What you should do is calculate now what the sum is, of the integers from 1 to 10,000. (For the curious people it's 50,005,000) That way, when you get the report, you can add up the numbers and know exactly which one is missing by comparing the different sums. This method makes exactly 10,000 additions and one comparison, much faster than any sort algorithm.

6) The area of the parallelogram P = b*h (i.e. base*height). If you know the area of one of the triangles, T = .5(b*(h/2)), since the height of the triangle is half the height of the parallelogram. Solving for b*h in terms of T, you get b*h = 4*T. So the answer is P = 4T.

7) x has to be at least 1. A solution with x bigger than 9 doesn't exist because y and z have to be at least 5 and 6 respectively. So x can vary from 1 to 9. By the same reasoning y can vary from 5 to 13, and z from 6 to 14.


There are 9 solutions for x=1
y=5,z=14, (the lower boundary for y)
y=6,z=13,...
y=13,z=6 (lower bound for z)

There are 8 solutions for x=2
y=5,z=13, (lower boundary for y)
y=6,z=12,...
y=12,z=6 (lower boundary for z)
...
...
...
There are 2 solutions for x=8
y=5,z=7 (lower bound for y)
y=6,z=6 (lower bound for z)

There is 1 solution for x=9
y=5,z=6 (lower bound for both)

9+8+7+6+5+4+3+2+1 = 45

8) I have no idea what the answer is. Let me know if you do. I think it's something like, go up 14 stories, drop a plate, if it breaks go down and drop from floors 1 through 13 consecutively until the second plate breaks. If the first plate doesn't break at 14, go up to the 27th floor and drop, if it breaks, drop from 15-26. And so on

9) 798*8 = 800*8 - 2*8 = 6400 - 16 = 6384

10) sqrt(200) = sqrt(2*100) = 10*sqrt(2) = 10*1.414 = 14.14

11) (1/38)*(4/52)*(1/6)*5 = 5/2964 (it's easier to do 38*52 as (40-2)*(50+2) =
2000+80-100-4)

12) One statement is true. The third one, making the other three false.

D said...

You are really smart. I feel bad about myself.