Brainteaser
I'm a longtime reader and first time user for WSO. Last Thursday I got interviewed at a small $300 - 350 million hedge fund in San Francisco. In the interview I was asked a brainteaser that I am unsure if I got the answer to and it has been bothering me all weekend. The reason I don't know the answer is because my interviewer, one of the two PMs, just grinned when I gave the answer and moved on to the next question.
Anyways the question is:
You have a deck of cards with 50 cards.
Four of the cards are Aces.
Four of the cards are Kings.
The rest of the cards are blank. (42 cards blank)
After the cards are shuffled they are all laid out next to one another. In order to win the game an Ace needs to be next to a King. What is the probability of winning?
I was allowed to use a pen & paper, but no calculator.






Umm... 32 in 1225 or 2.6%?
Umm... 32 in 1225 or 2.6%?
"A man generally has two reasons for doing anything. One that sounds good, and the real one." - J.P. Morgan
That's a nasty interview
That's a nasty interview question. I had a question like it in an algorithms class.
This professor gives a good overview of the reasoning behind it (adapt it for 50 cards): http://recursed.blogspot.com/2010/01/neat-problem-...
Was this Grandmaster Capital? It sounds like a question they would give, given the Clarium heritage and Patrick Wolff's genius level mind.
*edit*
*edit*
Robert Clayton Dean: What is happening?
Brill: I blew up the building.
Robert Clayton Dean: Why?
Brill: Because you made a phone call.
Get some sleep. I bet the PMs
Get some sleep. I bet the PMs couldn't have gotten the answer themselves. I think they just wanted to see your thought process.
The correct answer is to grab
The correct answer is to grab a sharp pen and stab your interviewer in the jugular.
Assuming the cards are in a
Assuming the cards are in a circle instead of a line so every card will have two other cards next to them. Their are four aces, which can be taken as a given, 8 cards will be next to the aces (which could include another ace, a king, or a blank card).
I would think of it as what are the odds of it not happening. You get 8 trials, where each trial incorporates one less card to pull from, increasing (slightly) the odds that each next card is a king next to the ace.
1- ((45/49)x(44/48)x(43/47)x(42/46)x(41/45)x(40/44)x(39/43)x(38/42)) = 52.2%
Is that what you got?
Turbo leverage for capital explosion -- BD Capital
My WSO Blog
Thanks for the solution and
Thanks for the solution and the question I asked to you guys was the simplified version of the question. In the real question my interviewer asked:
Q = interviewer
D = me
Q:Pick two cards. (King, Queen, Ace...)
D: Ace and Jack
Q: You like blackjack?
D: Yea, more of a poker player, but still fun from time to time.
Q: Well, you aren't playing poker or blackjack. You are playing the probability game and here it is:
1. What is the probability I will have one of your cards if I remove two of them?
This was fairly straightforward if you have some statistical background.
It's a straightforward combination so 1 - (44C2)/(52C2) = .287
-Before he told me whether it was right or wrong he drew two cards from the deck. They weren't a Jack or Ace if you were wondering. Next he told me my calculation was correct. (Obviously I had to explain why the combination and why I got the probability of it not happening.)
Following this he asked the most difficult question:
2. What is the probability that a Ace lays next to a Jack in this deck of cards? (show me deck of cards)
I then started talking about how all the other 42 cards are irrelevant. Hence the blank cards. I think the rest of my explanation sounded alright, but who knows. After this question he then switched it up about asking me about something on my resume.
Robert Clayton Dean: What is happening?
Brill: I blew up the building.
Robert Clayton Dean: Why?
Brill: Because you made a phone call.
I was wondering why the deck
I was wondering why the deck only had 50 cards...
Turbo leverage for capital explosion -- BD Capital
My WSO Blog
SirPoopsaLot: I was wondering
I was wondering why the deck only had 50 cards...
Jokers brah
Nothing short of everything will really do.
SirPoopsaLot: I was wondering
I was wondering why the deck only had 50 cards...
To make sure the OP couldn't just recall the solution from memory
bonks: SirPoopsaLot: I was
I was wondering why the deck only had 50 cards...
Jokers brah
lol
RIP WSO Chat.
SirPoopsaLot: Assuming the
Assuming the cards are in a circle instead of a line so every card will have two other cards next to them. Their are four aces, which can be taken as a given, 8 cards will be next to the aces (which could include another ace, a king, or a blank card).
I would think of it as what are the odds of it not happening. You get 8 trials, where each trial incorporates one less card to pull from, increasing (slightly) the odds that each next card is a king next to the ace.
1- ((45/49)x(44/48)x(43/47)x(42/46)x(41/45)x(40/44)x(39/43)x(38/42)) = 52.2%
Is that what you got?
Simulating it with 1,000,000,000 trials I got 50.1%
When I started it on paper I also modeled it as a circle. I don't think your method is correct, though, because the number of places where an ace can be next to a king depends on the particular distribution of aces; i.e., given four aces placed there may be anywhere from two to five places where a king may be placed to satisfy the requirement (in the circular model) or one to five (in the linear model).
This was my approach:
1) How many ways are there to place four aces in fifty locations? (50 nCr 4)
2) How many of those have 2, 3, 4, 5 "sweet spots"?
3) What is the probability of missing all of those "sweet spots" with your four kings, for each number of sweet spots?
It basically comes down to the weighted sum of the complements of missing all of the sweet spots.
Also note that in the circular arrangement there are slightly more ways to get the win.
P (AK or KA) in slots 1 and 2
P (AK or KA) in slots 1 and 2 is 2(4/50*4/49) = 0.0130612245
probability for slots 2-3, 3-4, ... 49-50 is 49*0.0130612245 = 0.64
0.64
Gun Control Discussion
West Coast rainmaker: That's
That's a nasty interview question. I had a question like it in an algorithms class.
This professor gives a good overview of the reasoning behind it (adapt it for 50 cards): http://recursed.blogspot.com/2010/01/neat-problem-...
Was this Grandmaster Capital? It sounds like a question they would give, given the Clarium heritage and Patrick Wolff's genius level mind.
That awkward moment when you realize that professor, is your professor...
(Ian Gouldon not the other fellow)
don't know if this is right,
don't know if this is right, but i wouldve approached it using combinatorics.
So you have 8 kings and aces, and you can use PIE to try to count how many combos there are that let you win. You could then break into the event that you have at least 1 pair, then subtract event that you have at least 2, add event that you have at least 3, then subtract that you have at least 4. And then for each event multiply by the number of possible ways to arrange.
So for example the #combos that you have at least 1 pair is 4C1*4C1 * 49!. You choose a king and an ace and stick them together and view them as 1 card. Since you would then only have 49 "cards" (its 50 - 1 since you have 1 pair) to distribute, there are 49! ways to place everything. But this will double count when you have 2 pairs, you have to apply PIE and subtract out the #combos of at least 2 pairs which is 4C2*4C2*48!, then add back the 3 pairs, and then subtract the 4 pairs. Then divide that number by 50!.
so you get something like
(4C1*4C1*49! - 4C2*4C2*48! + 4C3*4C3*47! +4C4*4C4*46!)/50!
cancel stuff out and you have
16/50 - 36/(50*49) + 16/(50*49*48) -1/(50*49*48*47)~15/50 since the last 2 terms are really small
pig: don't know if this is
Agree with the above, the
Man in Black
The cards are not laid out in
Robert Clayton Dean: What is happening?
Brill: I blew up the building.
Robert Clayton Dean: Why?
Brill: Because you made a phone call.
Daedalus: You win if you
I'm not going to work this
-MBP
Given the wide range of
Capitalist
febreeze: bonks: SirPoops
Thanks for the responses. I
Robert Clayton Dean: What is happening?
Brill: I blew up the building.
Robert Clayton Dean: Why?
Brill: Because you made a phone call.