Mirror Image

How many non-zero 5-digit binary strings, when held up to a mirror, are equal to twice the value of the binary number you see?


The answer is 3.

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.

3 solutions

Fin Moorhouse
Dec 11, 2015

Let's express our initial binary number as ( a , b , c , d , e ) (a,b,c,d,e) , where each letter represents either 1 or 0. The value of this number is therefore 16 a + 8 b + 4 c + 2 d + e 16a+8b+4c+2d+e . The number as it appears in the mirror is this number flipped, so we reverse the letters and get the value of this new number as 16 e + 8 d + 4 c + 2 b + a 16e+8d+4c+2b+a . Since this number is half of the original number, we can write 16 a + 8 b + 4 c + 2 d + e = 2 ( 16 e + 8 d + 4 c + 2 b + a ) 16a+8b+4c+2d+e=2(16e+8d+4c+2b+a) . Multiplying out the bracket, subtracting one side from the other and tidying things up gives us 31 e + 14 d + 4 c = 4 b + 14 a 31e+14d+4c=4b+14a . Remembering that each letter represents either 1 or 0, we can see that e e must be 0, since (among other other reasons) if e e were 1, 31 e 31e would be odd, and 14 d + 4 c 14d+4c and 4 b + 14 a 4b+14a can only ever be even, so the sides cannot be equal. Removing this gives the rather symmetrical 14 d + 4 c = 4 b + 14 a 14d+4c=4b+14a . We can ignore the letters and focus on the numbers by removing the number if its accompanying letter represents a 0, and keeping it if the letter is 1. The question becomes: how many ways can we safely remove numbers from 14 + 4 = 4 + 14 14+4=4+14 , keeping the equation correct? Clearly, we could remove the fours, the fourteens, or no numbers at all- giving us 11110, 10010 and 01100. Thus, the answer is 3 \boxed{3} .

Interesting question!

01100 isn't considered a binary number, so perhaps you should phrase it as "binary string" instead?

Calvin Lin Staff - 5 years, 6 months ago

Log in to reply

Thanks for the advice, I have updated it.

Fin Moorhouse - 5 years, 6 months ago

For completeness, you should explicitly state what those numbers are.

Pi Han Goh - 5 years, 6 months ago

Log in to reply

Duly noted.

Fin Moorhouse - 5 years, 6 months ago

Let the binary string be ABCDE , on reflection it will be EDCBA . Now we are given that the mirror image is half of the original number, hence if we right shift original number by 1 i.e 0ABCD is what should be the mirror image. This gives us the condition 0ABCD = EDCBA i.e E= 0, A=E, B=C , On trying out all combinations, there are only 3 non-zero solutions, hence answer is 3.

Let the binary string be a b c d e \overline{abcde} , then its mirror image is e d c b a \overline{edcba} .

It is required that a b c d e \overline{abcde} is twice the value of e d c b a \overline{edcba} . This further implies a b c d e \overline{abcde} is divisible by 2 (or 10 10 ) and hence e = 0 e=0 .

Giving, a b c d e = a b c d 0 \overline{abcde}=\overline{abcd0} and 0 d c b a = a b c d \overline{0dcba}=\overline{abcd} . (Dividing a b c d e \overline{abcde} by 2.)

Now it is clear to see that the conditions are a = d , b = c a=d,b=c . There are a total of 4 possibilities. However, one of them would correspond to a = b = c = d = 0 a=b=c=d=0 , which is not needed. Hence, there are a total of 3 \boxed{3} such numbers.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...