Good Number?

Let X X be a randomly chosen subset of { 1 , 2 , . . . , 2017 1, 2, ..., 2017 }. A positive integer n n is said to be "good" if both n n and n + X n+|X| are elements of X X (where X |X| denotes the number of elements of X X ). Find the expected value of the number of "good" integers.


The answer is 251.875.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Raymond Chan
Jun 4, 2018

Suppose n n is a good number with respect to a set X X with k k elements, and all the elements of X X are chosen randomly from the set { 1 , 2 , . . . , N } \{1, 2, ..., N\}

Then n , n + k X n, n+k\in X , and so we can subject 2 constraints to the values of k k : k 2 k\ge 2 and k N n k\le N-n

The remaining k 2 k-2 elements of X X can be chosen from the remaining N 2 N-2 elements

Thus, there are ( N 2 k 2 ) \binom{N-2}{k-2} such sets X X , and this gives us for each fixed n n , there are ( N 2 0 ) + ( N 2 1 ) + . . . + ( N 2 N 2 n ) \binom{N-2}{0}+\binom{N-2}{1}+...+\binom{N-2}{N-2-n}

sets such that n n is a good number.

Notice that n n is at most N 2 N-2 (otherwise the constraints of k k will be violated) and at least 1 1 .

Summing over all possible values of n n , we have the total number of good number is S = ( N 2 ) ( N 2 0 ) + ( N 3 ) ( N 2 1 ) + . . . + ( N 2 N 3 ) S=(N-2)\binom{N-2}{0}+(N-3)\binom{N-2}{1}+...+\binom{N-2}{N-3}

Applying the indentity ( m r ) = ( m m r ) \binom{m}{r}=\binom{m}{m-r} , we have S = ( N 2 ) ( N 2 N 2 ) + ( N 3 ) ( N 2 N 3 ) + . . . + ( N 2 1 ) S=(N-2)\binom{N-2}{N-2}+(N-3)\binom{N-2}{N-3}+...+\binom{N-2}{1}

Adding these, we obtain 2 S = ( N 2 ) [ ( N 2 0 ) + ( N 2 1 ) + . . . + ( N 2 N 2 ) ] = ( N 2 ) 2 N 2 2S=(N-2)[\binom{N-2}{0}+\binom{N-2}{1}+...+\binom{N-2}{N-2}]=(N-2)2^{N-2}

Hence, the expected value of the total number of good numbers is S 2 N = ( N 2 ) 2 N 3 2 N = N 2 8 \frac{S}{2^{N}}=\frac{(N-2)2^{N-3}}{2^N}=\frac{N-2}{8}

For this particular problem, N = 2017 N=2017 , therefore the required expected value is 2017 2 8 = 2015 8 = 251.875 \frac{2017-2}{8}=\frac{2015}{8}=\boxed{251.875}

Mark Hennings
Jun 4, 2018

Suppose that we are choosing subsets of { 1 , 2 , . . . , N } \{1,2,...,N\} randomly. Let Z Z be the number of good numbers, and let X j X_j be the random variable which is equal to 1 1 if j j is a good number, and 0 0 otherwise, for 1 j N 1 \le j \le N . Then Z = j = 1 N X j Z = \sum_{j=1}^N X_j , so that E [ Z ] = j = 1 N E [ X j ] = j = 1 N p j \mathbb{E}[Z] \;=\; \sum_{j=1}^N \mathbb{E}[X_j] \;=\; \sum_{j=1}^N p_j where p j p_j is the probability that j j is a good number.

For any 1 j N 1 \le j \le N and 0 k N 0 \le k \le N , let n k ( j ) n_k(j) be the number of subsets of { 1 , 2 , 3 , . . . , N } \{1,2,3,...,N\} of size k k for which j j is good. Then n k ( j ) = { ( N 2 k 2 ) 1 j N k 0 o . w 0 k N n_k(j) \; = \; \left\{ \begin{array}{lll} \binom{N-2}{k-2} & \hspace{1cm} & 1 \le j \le N-k \\ 0 & & \mathrm{o.w} \end{array}\right. \hspace{2cm} 0 \le k \le N (both j j and j + k j+k have to belong to X X , and we can choose the other k 2 k-2 elements freely). Thus p j = 1 2 N k = 0 N n k ( j ) = 1 2 N k = 2 N j ( N 2 k 2 ) = 1 2 N k = 0 N 2 j ( N 2 k ) 1 j N 2 p_j \; = \; \frac{1}{2^N}\sum_{k=0}^N n_k(j) \; = \; \frac{1}{2^N} \sum_{k=2}^{N-j} \binom{N-2}{k-2} \; = \; \frac{1}{2^N}\sum_{k=0}^{N-2-j}\binom{N-2}{k} \hspace{2cm} 1 \le j \le N-2 with p N 1 = p N = 0 p_{N-1} = p_N = 0 , and hence E [ Z ] = j = 1 N p j = 1 2 N j = 1 N 2 k = 0 N 2 j ( N 2 k ) = 1 2 N [ j = 0 N 2 k = 0 N 2 j ( N 2 k ) 2 N 2 ] = 1 2 N [ 0 j , k N 2 j + k N 2 ( N 2 k ) 2 N 2 ] = 1 2 N [ k = 0 N 2 ( N 1 k ) ( N 2 k ) 2 N 2 ] = 1 2 N k = 0 N 2 ( N 2 k ) ( N 2 k ) = 1 2 N k = 0 N 3 ( N 2 k ) ( N 2 k ) = 1 2 N k = 0 N 3 ( N 2 ) ( N 3 k ) = 1 2 N × ( N 2 ) 2 N 3 = 1 8 ( N 2 ) \begin{aligned} \mathbb{E}[Z] & = \; \sum_{j=1}^N p_j \; = \; \frac{1}{2^N} \sum_{j=1}^{N-2}\sum_{k=0}^{N-2-j}\binom{N-2}{k} \; = \; \frac{1}{2^N} \Big[\sum_{j=0}^{N-2} \sum_{k=0}^{N-2-j}\binom{N-2}{k} - 2^{N-2}\Big] \\ & = \; \frac{1}{2^N}\Big[\sum_{{0 \le j,k \le N-2} \atop {j+k \le N-2}} \binom{N-2}{k} - 2^{N-2}\Big] \; = \; \frac{1}{2^N}\Big[\sum_{k=0}^{N-2}(N-1-k)\binom{N-2}{k} - 2^{N-2}\Big] \; = \; \frac{1}{2^N}\sum_{k=0}^{N-2}(N-2-k)\binom{N-2}{k} \\ & = \; \frac{1}{2^N}\sum_{k=0}^{N-3}(N-2-k)\binom{N-2}{k} \; = \; \frac{1}{2^N} \sum_{k=0}^{N-3} (N-2)\binom{N-3}{k} \; = \; \frac{1}{2^N} \times (N-2)2^{N-3} \\ & = \; \tfrac18(N-2) \end{aligned} With N = 2017 N = 2017 this makes the answer 2015 8 = 251.875 \tfrac{2015}{8} = \boxed{251.875} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...