Interview Question: Shuffling Cards

Sample Question #263 (mathematical statistics)
 
You’re given B blue cards and R red cards. How many ways are there in total to shuffle these cards?
 
In other words, how many combinations of the blue and red cards are there?
 
[Source: a real interview question given at a hedge fund interview]
Advertisements
This entry was posted in Sample Qs. Bookmark the permalink.

2 Responses to Interview Question: Shuffling Cards

  1. Brett says:

    ANSWER
     
    This question is the same as asking, given B+R slots, how many ways can we arrange the B blue cards into the slots? Or equivalent, arranging the R red cards into the slots. Once cards of one color are arranged, cards of the other color can only fall into the unfilled slots.
     
    Once you recognize this transformation of the question, you’ll see it’s a combinatorial problem. The answer is C(B+R, B) which is the same as C(B+R, R), where C() is the combination function. Finally, a "formal" solution can be written as C(B+R, min(B,R)).
     

  2. Yanis Ps. says:

    Quant Career:you do NOT need the "min" in your "formal" solution. Either B or R would do just as well. Q.E.D. -Yanis

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s