HOST - CTD - Brainteasers2 Flashcards
A + B + C + D = 20
B + C + D + E + F = 20
D + E + F + G + H = 20
F + G + H + I = 20
A to I are nine integers from 1 to 9. What values are taken by each A to I?
- Arrange:
- A + B + C + D = 20
- B + C + D + E + F = 20
- D + E + F + G + H = 20
- F + G + H + I = 20
- Observe:
- A + B + C + D = 20 and F + G + H + I = 20
- sum of all nine integers is = 45
- E must be 5
- A = F + 5 and D + 5 = I
- F and D must be in [1 to 4]
- A and I must be in [6 to 9]
- What is B, C , G , I
- Subtract 2 from 3 and we get:
- B + C = G + H
- Subtract 2 from 3 and we get:
- There are four choices for B, once B is chosen, we can figure out the rest of them .
- If F = 3, A = 8, D = 4, I = 9
- B = 2, C = 6, G = 1, H = 7
N rooms and N guests. They all go to a banquet hall, gets drunk. At end of the night, they don’t remember their room # so each guests end up spending the night in a random room. What is the probability at least one person ends up in his/her assigned room?
- Simplify the problem: let’s say there is a very large number of people (almost infinite)
- Compared to 100 people, each person is first in line to be allocated a key because the previous finite number of people are negligible (compared to 100)
- Each person has a probability of 1/N of being allocated his/her key
- Let X be the number of people sleeing in their room:
- P (X >= 1) = 1 - P(X =0)
- = 1 - (1 - 1/N)N
- = 1 - (e-1)
- = (e - 1)/ e
- e = 2.71 (this is close to 3/4)
- P (X >= 1) = 1 - P(X =0)
A stranger will visit and announce if the men is cheating on his wife or not. Woman must kick him out at 10 AM the if the husband is not faithful to her. Each wife knows whose husband is cheating (except her own husband) and she can’t reveal that information.
Next day at 10, some unfaithful men are kicked out into the street for the first time, how many of them are there?
- Induction argument
- If exactly one cheat: Mr C1
- All women know that there is one cheat however Mrs C1 doesn’t know of any
- Wise man says there is a cheat
- Mrs C1 doesn’t see anyone on the street. She asks herself, she never saw a cheat, who it can be. Aha! It has to be my husband Mr. C1
- If exactly one cheat: Mr C1 and Mr C2
- Mrs C1 and Mrs C2 know of one cheat only. But they do not know abou their husbands cheating
- On 2nd morning after the announcement, she still sees no husband on the street. And dedude - Mrs C1 has seen another cheat and thinks Mr C2 is a cheat. Mrs C2 thinks Mr C1 is a cheat. Only possible answer is my own man. Both are kicked out
- There are exatly three cheats:
- Mr C1, Mr C2 and Mr C3
- Mrs C1, C2 and C3 believe there are 2 cheats
- First two mornings, they don’t see anyone on the street but they know that there are at least 2 cheats
- They deduce that there has to be more than 2 cheats (they have already seen), it must be their husband.
- All three gets kicked out
- Mr C1, Mr C2 and Mr C3
There are three poles. One pole is stacked with 64 rings (one ounce to 64 ounces). Your task is to move all 64 rings to one of the other two pole so that they end up in the same order.
Constraints: (1) Move only one ring at a time
(2) You cannot place a heavier ring on top of the lighter one
(3) you can move a ring from one pole to another (not on the side).
- 1 ring takes 1 try
- 2 ring takes 3 try
- 3 ring takes 7 try
- See the pattern:
- 2N -1
- 2^64 -1 (huge number)
Assume random variables X and Y are normally distributed X - N (Mu_x, Sig^2_x) and similar for the Y. The correlation between X and Y is p. How can you choose a and b. s.t we minimize the variance of the random variable S = aX + bY under the constraint a + b = 1, 0 < = a < =1 and similar for b?
- Application: Proportion of potfolio invested in risky assets
- apply: b = 1 -a
- Variance of the sum:
- V(S) = a2 σx2 + 2ab*p*σx*σy + b2*σy2
- First order conditon dV(s)/ da = 0
- Solve for the partial derivate. this would be the optimal a*
- Check the second order condition for > 0, to confirm that itit is a minimum and not maximum
There is 20 x 20 chessboard and very large box of identical cubes. Each squre on the chessboard is the same size as the face of any cube. Arrange piles of cubes on the chessboard in a special pattern. Add one more cube as you go from north to south and west to east. How many cubes are there on the chess board?
- Try to imagine a picture on your head
- Cut the stacks (horizontally) at 20th mark
- This leaves left side with 1, 2,..3..upto 20, and right side with 1 to 20 and 20 to 39 as well.
- Flip the right side (up side down) and imagine the the cube formed
- Cube’s volume formula = n^3
- 20^3 = 8000 cubes
You are standing at the center of a circular field R. The field has low wire fence around it. Attached to the wire is a dog. You can run at speed v. The dog can run at speed of 4v. The dog will do his best to catch me if i try to escape. What is my running strategy?
- Naive strategy will kill you:
- If you make the straight run - you have to travel R/v
- Dog can get there in 3.14R/4V = Which is less then the above
- Make a run till you get to R/4. Now run around in circuits, it takes (Pi*R)/4v units of time to run half-way around this circle. The dog can run the same distance in the same time. Both of you are matched.
- Step slightly closer to center: R/4 - error. I have a slight advantage over the dog in running aroudn the circle. Keep running till i am completely on the opposite side. Time to make a run
- R - (R/4 - error) = 3/4 R + error. The dog has to travel 3.14R to meet you. You can outrun him now.
- Bounds: 0 < error < [(Pi -3)*R / 4]
Mary finds out that John’s sister has three kids. Product of their age is 36. Not enough information - John points at the sum of their age. Mary thinks there is still not enough information. John says - the oldest son is dyslexic. What is their age?
- 1,1,36 = 38
- 1, 2,18 = 21
- 1, 3,12 = 16
- 1 ,4, 9 = 14
- 1, 6, 6 = 13
- 2, 2, 9 = 13
- 2, 3, 6 = 11
- 3, 3, 4 = 10
Since the sum doesn’t help solve the problem, it is either 1,6,6 or 2,2,9. Since the oldest son is dyslexic -it must be that three kids are 2, 2, 9
You have eight balls. One is heavier than the rest. How do you find the heavy ball if a scale is given?
- You need only 2 weighing
- Split the ball in group of 3
What is sum of k2for 1 to n
- [n*(n+1)*(2n+1)] / 6
You have 52 playing cards (26R, 26B). You draw card one by one. A red card pays dollar, black card fines a dollar. Cards are not returned back to the deck. What is the optimal stopping rule in terms of maximizing expected payoff? What is expected payoff this optimal rule?
- Optimal strategy is anaologous to locating an optimal stock price boundray for an American Style option
- Work backwards - like on a decision tree
- For 2 cards: Expected payoff 1/2
- For 4 cards: Expected payff $2/3
- For 6 cards: Expected payoff $17/20
- For 8 Cards: Expected payoff $1
- R = # of Red cards, B = # of Black Bards
- r = # of red cards left in the deck
- b = # of black cards left in the deck
- Accumalted score: (R - r) - (B - b)
- V(r,b) = expected value of the game (from the deck) + accumulated score
- V(r,b) = (R - r) - (B - b) + E(r,b)
- E(r,b) = 0 if r = 0
- E(r,b) = r if b = 0
- max (0, (r/r+b)*(1 + E(r-1,b)) + (b/r+b)*(-1+E(r,b-1)]
- Remember: we always have the safety net of zero. Never quit the game at the black card.
- if additional remaining value in the game E(r,b) = 0, you are indifferent and you should quit the game.
Put quarters on the table and win. I win if I put the last quarter. What is the shape of the table and what is the strategy?
- Necessary condition: Let table be radically symmetric
- there must exist a centre point on the table
- S.t line drawn upon the table passing thru this central point is evenly bisected
- Place the first coin on the center of the table
- Mock the strategy of the other guy on the oppostie side. You cannot lose
- If the opposite question is asked - there is annulus - disc type table. Only strategy you should change is that you should let the other guy go first
You have a 8x8 chessboard. Put a “X” on the coordinate (1,1) and (8,8). I have big box of 2x1 dominos. Is it possible to cover the remaining 62 squares using the dominoes without any of them sticking out over the edge?
- No.
- A domino will cover one white and one black squre
- If we remove (1,1) and (8,8), they both are of the same color (let’s say Black).
- Hence we can’t cover ALL 62 squres without actually going over board
You are bidding B for a firm whose unknown true value is uniformly distributed between 0 and 1. I do not know the true value of the firm S. As soon as I bid, the firm value will double to 2S. My bid will only be accepted if the it it is as large as the original value of the firm. How do you bid s.t you maximize your payoff?
- Density function of S - true value of the firm
- 0 <= S <= 1 or zero otherwise
- Payoff function P
- = 2S - B if B>= S
- = 0 if B < S
- Maximium post-bid firm value is 2. Never bid more than $2
- Maximize E[P(S)] w.r.t. choice of B in the interval [0,2]
- E[P(S)] = Integrate from 0 to 1
- P(S)*1*dS
- integrate from 0 to min(B,1)
- (2S - B)*dS
- S2- BS
- Analyze payoff if B>1, 1-B
- Payoff if B<=1, 0
- E[P(S)] = Integrate from 0 to 1
- We should bid less than or equal to 1 (and expect to break-even)
How many places are there on the Earth where you can walk one mile south, one mile east and one mile north so you end up exactly where you started? Assume is a perfect sphere.
- When the explorer is standing oh the North Pole, then ,as measured from that point, every direction is south,..
- & if the explorer wants to go East,after walking South for 1 mile..He needs to turn left, 90 degrees & walk in circular path, keeping the “Pole” exactly 1 mile off to his left,
- & so, that, by making another 90 turn to his left, after walking East, for 1 mile he would be facing North again, & the Pole would be exactly, 1 mile away,.. &,.. Taking this one step further