HOST - CTD - Brainteasers2 Flashcards

1
Q

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?

A
  • 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
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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?

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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).

A
  • 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)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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?

A
  • 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]
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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?

A
  • 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You have eight balls. One is heavier than the rest. How do you find the heavy ball if a scale is given?

A
  • You need only 2 weighing
  • Split the ball in group of 3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is sum of k2for 1 to n

A
  • [n*(n+1)*(2n+1)] / 6
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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?

A
  • 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
  • We should bid less than or equal to 1 (and expect to break-even)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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.

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How many conescutive zeros are there at the end of 100!

A
  • 100! = 100x99x98x..1
  • Factor each number and count how many supply a 5.
  • Combine the 5’s with all the 2’s going to spare to get the 10’s that give 0’s at the end of 100!
  • 5, 10, 15, 20 , 25 (2), 30, 35, 40, 45, 50 (2), 55, 60, 65, 70, 75(2), 80, 85, 90, 95, 100(2)
  • 24 fives
  • hence 24 zeros at the end of 100!
17
Q

A king demands a tax of 1000 gold from each of f10 regions of his nation. One tax collector is cheating and consistently giving 10% lighter gold coins than they should be. The king knows that the gold coin weighs exactly one oune - how can the King identify the cheat?

A
  • Take 1 coin from region 1, take 2 coins from region 2..etc
  • Add them up:
    • Sum should be: 55
  • However if the sum is 54 then the 1st region is cheating
  • If the sum is 53, then 2nd region is cheating
  • If the sume is 45, then 10th region is cheating
18
Q

Hire a man to work in your yard for seven days. Pay him gold. I only have a gold bar with seven parts - like a chocolate bar. Pay him one gold part per day. You can only snap the bar twice? Where do you snap the bar?

A
  • First day: snap the 1st part
  • Second day: snap 2 parts, and take back the 1st part you gave him
  • Third day: give him back the 1st part (from day 1)
  • Fourth day: Give all 4 un-snapped parts. In return- take back the three parts (1, 2 parts)
  • Fifth day: Pay him back the 1 part
  • Sixth day: Pay him 2 Parts and take back the 1st part
  • Sevent day: Pay him the 1st part.
19
Q

You have an array of 99 distinct integers from 1 to 100. How would you write a program that figures out which integer is missing?

A
  • You know the sum of 1 to 100 = 5050
  • Add all 99 integers and subtract this total from 5050 and you would know which integers is missing
20
Q

Why are images in a mirror flipped horizontally and not vertically?

A
  • the mirror seems to rotate you around your symmetrical axis rather than your asymmetrical axis.
  • The first step towards an answer is to realize that the question is flawed. The mirror doesn’t actually reverse your image either left-to-right or top-to-bottom — it reverses your image front-to-back, that is, along the axis perpendicular to the mirror.
  • That’s exactly what a mirror does: it “turns you inside out,” so that you’re facing the opposite direction without having been rotated.
  • But if the mirror is just flipping our image front to back, why does it look like we’re being flipped left to right? It’s because the left and right sides of our bodies are almost identical. So the inside-out person you see in the mirror looks a lot like what you would see if someone created a clone of your body and rotated it 180 degrees so it was facing you. That’s why you have the strong feeling that the mirror is rotating you in the horizontal plane, even though it’s actually just turning you inside out.
  • The illusion wouldn’t be nearly as strong if our bodies didn’t have left-right symmetry. Let’s say you had a tentacle in place of your right arm. Then your mirror image wouldn’t look like a 180-degree rotation of yourself, because the tentacle would be on the wrong side. The mirror’s ability to make us feel like an image has been turned around only works with a symmetrical axis.
21
Q

How can three men and one women have mutually safe heterosexual intercourse with just two condoms? Assume that no condom can break or leak and that you cannot wash a used one?

A
  • C1 and C2 - are two condoms
  • M1, M2 and M3 are three men
  • M1 wears C1 with C2 placed over it
  • M2 then uses C2 (from inside)
  • M3 wears flipped C1 and wrap C2 over it
22
Q

Consider a grid (0,0) and (5,5). You can only move one step east and one step north (never diagonally). How many paths are there?

A
  • You will take total of 10 steps
  • Five of these steps will be east and five of these will be North
  • You only need to choose which five of the ten steps are east:
    • (10 5) = 10! / [5! * (10-5)!]
    • = [10*9*8*7*6] / [5*4*3*2*1]
    • = 252
23
Q

Six friends go out for lunch. Bill is $132.67, They add 20% tip split the bill six ways evenly. What does each person pay?

A
  • Trick: If the bill is X, then total bill with the tip is 1.2X
    • 1.2/6 = 1/5 of the total bill
  • 1/5 = .2
    • So multiply the total bill by 2 and then move the decimal place over
  • 132.67 (origianl bill without the tip)
    • 132.67 x 2 = 265.34
  • Move the decimal place to the left
  • Each person’s bill was 26.534
24
Q

You walk into a pizza shop. They sell three sizes of pizzas: small, medium and large. They all are perfectly circular, have similar thickness and have the same density of toppings.

P = Price

PL = PM + PS

How do you determine which pizza to order?

A
  • Take half of each pizza (so we have the full diameter)
  • Lay the three halves on the table s.t. the diameters of these three pizzas touch each other and form a triangle.
  • If the Angle in the corner of the Small and Medium pizza is a right angle (measure it using the square pizza box).
    • L2 = M2 + S2
  • If the Angle is larger than 90 degrees, then order the Larger Pizza
  • If the Angle is below the 90 degrees, order the Small + Medium pizza
  • One can alternatively use a single slice (it’s side length being a radius)
25
Q

A rock is dropped from the top of the Empire State buidling. At what speed does it hit the ground, and how long does it take to get there?

A
  • Empire state is 100 floors
  • Each floor is about 4 meters
    • 1 meter = 3.2 feet (about 12.8 feet)
  • Distance needs to be travelled is
  • v is the final velocity. u be the initial velocity
  • D = 400 meters
    • v2 = u2 + 2*g*D
    • g = 9.8 m/s2
    • v2 = 0 + 2*10*400 = 8000
    • v = sqrt(8000) = 90 m/s
  • v = u + g*t
    • 90 = 0 + 10*t
    • t = 9 seconds
  • It takes 9seconds and it is travelling at 90 m/s
  • Convert 90m/s to mph
    • 90*60 = 5400 meters per minute
    • 5400*60 meters per hour
    • [5400*60]/1609 mph
    • about 200 mph
26
Q

Can the mean of two consecutive prime numbers ever be prime?

A
  • No.
  • Mean of any consecutive numbers cannot be prime.