A probability problem by Muhammad Alif

Let S S be the set of integers of the form 2 a + 2 b + 2 c 2^a+2^b+2^c , where a , b , c a, b, c are pairwise distinct non-negative integers. Determine the 100th smallest element of S S .


The answer is 577.

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

Zico Quintina
Jul 12, 2018

WLOG, let a < b < c a < b < c . Suppose c = n , n N , n 2 c = n, n \in \mathbb{N}, n \ge 2 . Then the largest integer that we can form will be 2 n 2 + 2 n 1 + 2 n = 7 2 n 2 < 2 n + 1 2^{n-2} + 2^{n - 1} + 2^n = 7 \cdot 2^{n - 2} < 2^{n + 1} . This means that every integer we can form with c = n c = n will be less than any integer we can form with c = n + 1 c = n + 1 . By similar reasoning, for a fixed value of c c , every integer we can form with b = k , k N , k 1 b = k, k \in \mathbb{N}, k \ge 1 will be less than any integer we can form with b = k + 1 b = k + 1 .

Therefore, we can order the integers in S S first in increasing order of c c , then in increasing order of b b , and finally in increasing order of a a . Specifically,

( 2 0 + 2 1 + 2 2 ) < ( 2 0 + 2 1 + 2 3 ) < ( 2 0 + 2 2 + 2 3 ) < ( 2 1 + 2 2 + 2 3 ) < ( 2 0 + 2 1 + 2 4 ) < < ( 2 n 2 + 2 n 1 + 2 n ) < ( 2 0 + 2 1 + 2 n + 1 ) < + (2^0 + 2^1 + 2^2) < (2^0 + 2^1 + 2^3) < (2^0 + 2^2 + 2^3) < (2^1 + 2^2 + 2^3) < (2^0 + 2^1 + 2^4) < \ldots < (2^{n - 2} + 2^{n - 1} + 2^n) < (2^0 + 2^1 + 2^{n + 1}) < + \ldots

For any c c , a a and b b can take on any two values from { 0 , 1 , 2 , , c 1 } \{0, 1, 2, \ldots, c - 1\} , so there are ( c 2 ) \dbinom{c}{2} possible sets of values for a a and b b . Then the total number of integers with c n c \le n will be c = 2 n ( c 2 ) \displaystyle \sum_{c = 2}^n \dbinom{c}{2} ; we look for the largest n n such that c = 2 n ( c 2 ) 100 \displaystyle \sum_{c = 2}^n \dbinom{c}{2} \le 100 . A little trial and error gives us n = 8 n = 8 , for which c = 2 8 ( c 2 ) = 84 \displaystyle \sum_{c = 2}^8 \dbinom{c}{2} = 84 .

filler {\color{#FFFFFF} \text{filler}}

We need sixteen more numbers, all of which will have c = 9 c = 9 . Now for any b b , a a can take on any value from { 0 , 1 , 2 , , b 1 } \{0, 1, 2, \ldots, b - 1\} , so there are b b possible values for a a . Then the total number of integers with c = 9 c = 9 and b = k b = k will be b = 1 k b \displaystyle \sum_{b = 1}^k b ; we look for the largest k k such that b = 1 k b 16 \displaystyle \sum_{b = 1}^k b \le 16 , and we quickly find k = 5 k = 5 , for which b = 1 5 b = 15 \displaystyle \sum_{b = 1}^5 b = 15 .

filler {\color{#FFFFFF} \text{filler}}

This gives a total of 99 99 integers, the last of which is 2 4 + 2 5 + 2 9 2^4 + 2^5 + 2^9 . Therefore the 100 100 th integer will be the first one with c = 9 c = 9 and b = 6 b = 6 , i.e. 2 0 + 2 6 + 2 9 = 577 2^0 + 2^6 + 2^9 = \boxed{577}

There is a one-to-one correspondence between the elements of S S and the set of binary strings consisting of three 1 1 's with 0 0 's in the remaining bits.

Now since ( 9 3 ) = 84 \dbinom{9}{3} = 84 and ( 10 3 ) = 120 \dbinom{10}{3} = 120 we know that the 100th smallest element will have a 1 1 in the 10th bit from the right, i.e., in the 2 9 2^{9} bit. Next, since ( 6 2 ) = 15 \dbinom{6}{2} = 15 we know that the 85th to 99th smallest elements of S S will have the second 1 1 in the 6th bit from the right, and thus the 100th smallest element will have the second 1 1 in the 7th bit from the right and the third 1 1 in the rightmost bit, resulting in the 100th smallest element of S S being 2 9 + 2 6 + 2 0 = 512 + 64 + 1 = 577 2^{9} + 2^{6} + 2^{0} = 512 + 64 + 1 = \boxed{577} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...