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?
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.
Interesting question!
01100 isn't considered a binary number, so perhaps you should phrase it as "binary string" instead?
For completeness, you should explicitly state what those numbers are.
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 , then its mirror image is e d c b a .
It is required that a b c d e is twice the value of e d c b a . This further implies a b c d e is divisible by 2 (or 1 0 ) and hence e = 0 .
Giving, a b c d e = a b c d 0 and 0 d c b a = a b c d . (Dividing a b c d e by 2.)
Now it is clear to see that the conditions are a = d , b = c . There are a total of 4 possibilities. However, one of them would correspond to a = b = c = d = 0 , which is not needed. Hence, there are a total of 3 such numbers.
Problem Loading...
Note Loading...
Set Loading...
Let's express our initial binary number as ( a , b , c , d , e ) , where each letter represents either 1 or 0. The value of this number is therefore 1 6 a + 8 b + 4 c + 2 d + 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 1 6 e + 8 d + 4 c + 2 b + a . Since this number is half of the original number, we can write 1 6 a + 8 b + 4 c + 2 d + e = 2 ( 1 6 e + 8 d + 4 c + 2 b + a ) . Multiplying out the bracket, subtracting one side from the other and tidying things up gives us 3 1 e + 1 4 d + 4 c = 4 b + 1 4 a . Remembering that each letter represents either 1 or 0, we can see that e must be 0, since (among other other reasons) if e were 1, 3 1 e would be odd, and 1 4 d + 4 c and 4 b + 1 4 a can only ever be even, so the sides cannot be equal. Removing this gives the rather symmetrical 1 4 d + 4 c = 4 b + 1 4 a . 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 1 4 + 4 = 4 + 1 4 , 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 .