Combinatorial probability

We all know from the simplest Venn diagram that given two sets, we can compute the size of their union as For three sets , , and , the size of their union is More generally, given sets , we have This is called the inclusion-exclusion principle. It also applicable to the probability of the union of events in which case

Given sets , let us denote its complement by . Given two sets , we can compute the union and intersection of their complements as follows. More generally, given sets , we have These equalities are referred to as De Morgan's laws.

Finding a coprime

If you choose a number between 1 and 100, what is the probability it is not coprime to 12? What about getting a number that is not coprime to 30?

The heart of this problem is the inclusion-exclusion principle. It's much better if we see this naturally, so let's start by breaking down the statement. Being not coprime to , means being either divisible by or by . Let denote the sets of numbers divisible by and respectively. We are now ready to apply the simplest form of the inclusion-exclusion principle: The statement reduces to computing the sizes of , , and which consists of all numbers divisible by . It is easy to see that (More generally, there are exactly numbers between and divisible by .) We are now ready to compute

To answer the second part of the question, we let be the set of numbers divisible by from to . We can then compute

Catching the curious counterfeiter

The minter of a kingdom produces boxes with 100 coins in each. He replaces one coin by a false one in each box. The king received intelligence about the counterfeit operation, and draws one coin from each of 100 boxes. What is the probability that the minter's side business will remain undetected? What is the answer if both 100s are replaced by ?

Let's start by studying a single box of coins which contains a single counterfeit. The probability of drawing the false coin is , so the probability of remaining undetected is . Next, if there are boxes in total, we need to draw a true coin from each of the boxes. Since all draws are independent, the probability is More generally when both s are replaced by an arbitrary positive integer , the answer is This expression is reminiscent of the following limit (typically taught in pre-calculus): More generally, we have In the particular case we are interested , so We can computationally verify that value of is closer to which is only about from the earlier approximation.

In fact the function approaches the limit quite fast. For example, is the smallest value for which the approximation error is less than . The graph of (1+1/n)^n

This is a good place to mention that there is a simple heuristic argument which demonstrates that approaches as . Recall the Taylor expansion of around : Let's expand : The first two terms agree with the expansion of on the nose. Since , it follows that the third term converges to as . Similarly, the next term converges to , and so on. Needless to say, this is not a rigorous proof, but it can actually be strengthened to become one. More importantly, manipulating series in this fashion is a good way to build intuition and form conjectures.

Catching the greedy counterfeiter

Suppose the minter has expanded his operation and each box of he produced contains doctored coins. What is the probability that the king will find exactly false coins if he draws one from each of boxes?

Using analogous reasoning to the previous problem, the chance of drawing a doctored coin from a single box is . Since we are drawing from distinct boxes independently, there are ways of distributing the false coins. Putting everything together, the probability of drawing exactly false coins is Note this is the -th term in the binomial expansion of

To extend the argument and potentially arrive at a useful approximation, let us try to study the behavior of our answer as becomes large. The key here is to rewrite the expression we obtained, and try to analyze it piece by piece. Some parts will be independent of , while others won't and require a bit more effort. The first part consists of fractions of the form , all of which converge to ; the second is independent of . As we already saw in the previous problem, the third part converges to , and finally the last part converges to . In conclusion, we have shown that For small and , this is a computationally feasible approximation of the original answer we arrived at.

As varies the probabilities of false coins add up to . Intuitively, the approximations we obtained should also add up to :

Identical birthdays

How many people should be in the same room so that the probability of two having the same birthday is at least 1/2? How many people should be in the room so the probability of at least one of them having the same birthday as you is 1/2?

Two decks

We take an ordered deck of cards and form a line from its cards by taking them one by one in the order that the appear. Next, we take a well-shuffled deck and place its cards in a line directly below the first one.

(a) What is the average number of pairs of matching cards which lie directly above each other?

(b) What is the answer if we do this experiment with two independently shuffled decks?

(c) If each deck consists of cards, what is the probability that no matches occur?

(d) If each deck consists of cards, what is the probability that there are exactly matches?