Eeny, meeny, miny, moe

An integer n n is chosen uniformly at random from the set { 512 , 513 , , 1023 } . \{512,513, \ldots, 1023\}. We take N , N, the binary expansion of n n and choose 2 of the digits at random. We change each of these digits, either from 0 0 to 1 1 or from 1 1 to 0 , 0, to create a new binary expansion M , M, which is the binary expansion for a number m . m. The probability that m > n m > n can be expressed as a b , \frac{a}{b}, where a a and b b are coprime positive integers. What is the value of a + b ? a+b?


The answer is 7.

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.

6 solutions

Sumit Goel
Oct 6, 2013

The binary expansion of the given numbers has 10 digits so

The sample space is 512 ( 10 2 ) 512*\dbinom{10}{2}

Consider any arbitrary number 1011110001=x assuming we are allowed to choose any 2 digits except the 1st digit we get ( 9 2 ) \dbinom{9}{2} different 10 bit numbers some of which are greater while some are smaller.

As our list contains all these 10 bit numbers we will have a case for each of the numbers obtained above by which we can go back to x.

eg. if we choose the last 2 bits in x we get the number 1011110010=y which is greater than x. now again if we chosse the last 2 digits for y we get x which is smaller than y.

So for every case in 512 ( 9 2 ) 512*\dbinom{9}{2} we have a complementary case in 512 ( 9 2 ) 512*\dbinom{9}{2}

And if we choose the 1st digit as one of the two digits then the probablity of getting a bigger no is zero since the number obtained will be a 9 digit number.

so final probablity = 1 / 2 512 ( 9 2 ) 512 ( 10 2 ) = 2 / 5 1/2*\frac{512*\dbinom{9}{2}}{512*\dbinom{10}{2}}=2/5

Another way to set up the complementary cases when we don't select the first bit, is to take the complement :) (i.e. invert all the bits, except the first bit).

Matt McNabb - 7 years, 8 months ago

Where are the rules about this formatting given ? They were very limited in the formatting guide shown during writing solution!

Vidhu Chauhan - 7 years, 8 months ago

Log in to reply

http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Commands

Sumit Goel - 7 years, 8 months ago

That complementary business I don't understand. Exactly why do you divide by 2 in the end?

Shubhangi Atre - 7 years, 8 months ago

Log in to reply

complementary means for every case in the sample space where we get a number greater than the original number there is another unique case in the sample space where we get a smaller number..therefore the probability of getting a bigger number for 512*(9C2) sample space is 1/2

Sumit Goel - 7 years, 8 months ago

Log in to reply

Well.. I think wording for this problem doesn't make sense then.. Because I solved this problem much more efficiently with the assumption that if there is 1 1 then make it 0 0 and vice a versa for each of the two digits. Then I get 4 5 \frac{4}{5} . Challenge master should make me clear what is wrong with my interpretation. Edit: And why do you worry about the case where you are performing same operation on y?

Shubhangi Atre - 7 years, 8 months ago

Log in to reply

@Shubhangi Atre

Because I solved this problem much more efficiently with the assumption that if there is 1 then make it 0 and vice a versa for each of the two digits.

@Shubhangi A., How is your interpretation different from the interpretation used by Sumit G, Michael T, etc?

Peter Byers - 7 years, 8 months ago
Michael Tong
Oct 7, 2013

Every element is a 10-digit binary number whose first digit is 1 1 , and the set contains every 10-digit binary number. Additionally, m > n m > n iff the left digit swapped in n n is 0 0 .

Instead of considering the questions by numbers, consider it by the digits. There are ( 10 2 ) = 45 {10 \choose 2} = 45 ways to choose two digits. If one of the digits is the first, then the left digit is 1 1 , so n > m n > m .

For the other 36 36 combinations, there is an equal 1 2 \frac{1}{2} chance that the left most digit is a 0 0 or 1 1 .

Then the probability is ( 36 ) ( 1 2 ) 45 = 2 5 \frac{(36)(\frac{1}{2})}{45} = \frac {2}{5} .

Moderator note:

Great! This is similar to my approach.

Avi Eisenberg
Oct 11, 2013

Each number in the problem set is composed of 10 binary digits. Now divide the selection of the two digits into 2 cases:

  1. The highest value digit is one of the ones chosen (with probability 9/45=1/5)
  2. The highest value digit is not one of the ones chosen (with probability 36/45=4/5)

Now in case 1, the first digit is always a one, so it will be changed into a 0, and the statement will be false. So we are only concerned with case 2, and it's easy to see that the probability of the statement being true given case 2 is 1/2. Multiply that by the probability of case 2 which is 4/5, and you get 2/5. So the answer is 2+5= 7 .

Lutfar Milu
Oct 9, 2013

(9C2/2)/(9C2+9) = a/b => 2/5 = a/b

512 in binary is 1 followed by 9 zeros. 1023 is 1 followed by 9 ones. When choosing a single number from 512 to 1023, the probability of the first binary digit being 1 is 1 and the probability of it being zero is 0. For the rest of the 9 binary digits, there is equal probability of it being a zero or a 1 (so probability of it being zero is 1/2 and probability of it being a 1 is 1/2). In the second stage, we choose two of the 10 digits. If we choose the first digit and one of the other 9 digits, then m > n with probability 0 (since that never happens). If both digits are chosen from the rest of the 9 digits (excluding the most significant digit), then the probability of m > n is 1/2. The probability of choosing both digits from the 9 least significant digits is 9C2/10C2 = 8/10. So the overall probability of m > n is 8/10 * 1/2 = 2/5.

Mark Hennings
Oct 9, 2013

The probability that m > n m > n is the probability that the more significant of the two digits chosen in N N is equal to 0 0 . Let X X be the position of the more significant of the two digits (so that X = 1 X=1 when the more significant digit chosen is the most significant digit in N N , and X = 9 X=9 when the more significant digit chosen is the penultimate digit and the two digits chosen are the last two). Then P [ X = j ] = 1 45 ( 10 j ) 1 j 10 \mathbb{P}[X=j] \; = \; \tfrac{1}{45}(10-j) \qquad 1 \le j \le 10 We have conditional probabilities P [ m > n X = j ] = { 0 j = 1 1 2 2 j 9 \mathbb{P}[m>n | X=j ] \; = \; \left\{ \begin{array}{ll} 0 & j = 1 \\ \tfrac12 & 2 \le j \le 9 \end{array} \right. and hence P [ m > n ] = 1 2 j = 2 9 1 45 ( 10 j ) = 1 90 j = 1 8 j = 1 90 × 36 = 2 5 \begin{array}{rcl} \mathbb{P}[m>n] & = & \tfrac12\sum_{j=2}^9 \tfrac{1} {45}(10-j) \; = \; \tfrac{1}{90}\sum_{j=1}^8 j \\ & = & \tfrac{1}{90}\times36 \; = \; \tfrac25 \end{array} so that a + b = 7 a+b=7 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...