We are given that:
- You pick an ( r )-element subset ( S \subset {1,2,\dots,n} ).
- Independently, a lottery draws an ( r )-element subset ( L \subset {1,2,\dots,n} ) uniformly at random (each ( r )-subset being equally likely).
In what follows, the total number of ( r )-element subsets of ({1,\dots,n}) is
[
{n \choose r}.
]
So any probability will be a ratio of the number of favorable subsets over ({n \choose r}).
Below we explain one acceptable solution for each part.
(a) The probability that ( L ) includes no consecutive integers
A well‐known combinatorial result is that the number of ways to choose ( r ) numbers from ({1,2,\dots,n}) with no two consecutive is
[
{n - r + 1 \choose r}.
]
Thus, the probability is
[
P(a)=\frac{{n - r + 1 \choose r}}{{n \choose r}}.
]
(b) The probability that ( L ) includes exactly one pair of consecutive integers
We require that among the ( r ) numbers written in increasing order
[
a_1 < a_2 < \cdots < a_r,
]
there is exactly one index ( i ) (with ( 1\le i\le r-1 )) for which
[
a_{i+1}=a_i+1,
]
and for every other neighboring pair the gap is at least 2. (Notice that if a block of three consecutive numbers appears then you would have two consecutive pairs.)
A good way to count these is by using the “gaps” method. First, recall that one may write any ( r )-subset in the form
[
d_1 = a_1-1,\quad d_i = a_i - a_{i-1} - 1\quad (2\le i\le r),\quad d_{r+1}= n - a_r.
]
Then we have
[
d_1 + d_2 + \cdots + d_{r+1} = n - r.
]
For a subset with no consecutive numbers the conditions are ( d_1\ge0,; d_{r+1}\ge0 ) and ( d_i\ge1 ) for (2\le i\le r). Now, in order to have exactly one pair of consecutive integers we want that exactly for one index ( j ) in ( {2,3,\dots,r} ) the gap is zero (i.e. ( d_j=0 )) while for all the other indices ( i\in{2,\dots,r}\setminus{j} ) we require ( d_i\ge1). (There is no restriction on ( d_1 ) or ( d_{r+1} ) except that they be nonnegative.)
For a fixed choice of the index ( j ) (of which there are ( r-1 ) possibilities), define new variables for the ( r-1 ) gaps that are forced to be at least 0 by “subtracting 1” from each ( d_i ) for ( i\neq j ) (and leaving ( d_1 ) and ( d_{r+1} ) unchanged since these are already (\ge0) ):
- For ( i=2,\dots,r ) with ( i\neq j ), let ( d'_i = d_i - 1 ) (so that ( d'_i\ge0 )).
- Keep ( d_1 ) and ( d_{r+1}) as is.
Then the total sum becomes
[
d_1 + d_{r+1} + \sum_{\substack{i=2\ i\neq j}}^r (d_i-1) + d_j = n - r.
]
Since there are ((r-1)-1 = r-2) indices (besides (j)) in the group (i=2,\dots,r), we have subtracted a total of ( r-2 ) from the sum. Therefore, the new equation is
[
d_1 + d_{r+1} + \sum_{\substack{i=2\ i\neq j}}^r d'i = n - r - (r-2) = n - 2r + 2.
]
There are a total of ( (r-2) + 2 = r ) nonnegative integers (namely ( d_1, d{r+1}) and the ( r-2 ) values ( d'_i )). The number of nonnegative integer solutions of
[
x_1+x_2+\cdots+x_r = n-2r+2
]
is
[
{(n-2r+2)+r-1\choose r-1} = {n - r + 1 \choose r-1}.
]
Since there are (r-1) choices for which gap is zero, the total number of “good” subsets is
[
(r-1) {n - r + 1 \choose r-1}.
]
Thus, the probability is
[
P(b)=\frac{(r-1) {n - r + 1 \choose r-1}}{{n \choose r}}.
]
(c) The probability that the numbers in ( L ) are drawn in increasing order
If the lottery draws the ( r ) numbers one at a time (i.e. it produces an ordered ( r )-tuple which is then “interpreted” as the set ( L )), then every ordering of the ( r ) numbers is equally likely. Since there are ( r! ) orders and only one of them is in ascending order, the probability is
[
P(c)=\frac{1}{r!}.
]
(d) The probability that your choice of numbers is the same as ( L )
Since you pick one particular ( r )-subset and the lottery chooses uniformly at random from ( {n \choose r} ) possible ( r )-subsets, the probability that your set equals ( L ) is
[
P(d)=\frac{1}{{n \choose r}}.
]
(e) The probability that there are exactly ( k ) numbers common to your set and ( L )
Your set and the lottery’s set are both of size ( r ). We want the intersection ( |S\cap L|=k ). To count the number of lottery choices that have exactly ( k ) numbers in common with your set ( S ):
- Choose which ( k ) numbers from your ( r ) numbers will be in ( L ). There are
[
{r \choose k}
]
ways to do this.
- The remaining ( r-k ) numbers in ( L ) must come from the ( n-r ) numbers you did not choose. There are
[
{n-r \choose r-k}
]
ways to do this.
Thus, the number of lottery sets meeting the criteria is
[
{r \choose k}{n-r \choose r-k}.
]
Dividing by the total number of ( r )-subsets ( {n \choose r} ) gives the probability
[
P(e)=\frac{{r \choose k}{n-r \choose r-k}}{{n \choose r}}.
]
Summary of Answers
- (a) ( \displaystyle P(a)=\frac{{n - r + 1 \choose r}}{{n \choose r}}. )
- (b) ( \displaystyle P(b)=\frac{(r-1){n - r + 1 \choose r-1}}{{n \choose r}}. )
- (c) ( \displaystyle P(c)=\frac{1}{r!}. )
- (d) ( \displaystyle P(d)=\frac{1}{{n \choose r}}. )
- (e) ( \displaystyle P(e)=\frac{{r \choose k}{n-r \choose r-k}}{{n \choose r}}. )
Any answer equivalent to the ones above is correct.