CEMC Banner

Problem of the Month
Solution to Problem 1: A bit of binary

October 2024

    1. 279=[100010111]2 since 279=28+24+22+21+20.

    2. The binary expansion of 2k1 is simply a string of k 1’s. That is, 2k1=[111k]2. Let’s prove this. First note that 2k1=2k1+(2k12k1). Some simplifying gives 2k12k1=2k11. Therefore, our procedure for computing the binary expansion of 2k1 looks like this: 2k1=2k1+(2k11)2k11=2k2+(2k21)221=21+(211)211=20 Therefore 2k1=2k1+2k2++21+20 so 2k1=[111k]2.

    3. We could just solve this problem by letting our calculator deal with the decimal approximation of 3, but we can't really be sure it wouldn't make some rounding errors. Let’s compute this, proving we have the correct binary digits along the way.

      First, since 22>3>12, we know 21>3>20. Therefore, our first step in computing the binary expansion is 3=20+(31) and a0=1. To decide whether a1=0 or a1=1, we need to decide whether 31<21 or 31>21. We have (1+21)2=94<3 so 1+21<3 and 21<31. Therefore a1=1. For the next binary digit we need to compare 3112 with 14. Similar to the previous computation we have (1+21+22)2=4916>3. We then conclude 32021<22 and a2=0. To compute a3 we need to compare 32021 to 23. We have (1+21+23)2=16964<3 so 32021>23 and a3=1. Once more, to compute a4 we have (1+21+23+24)2=729256<3 so 3202123>24 and a4=1. Therefore a0=1,a1=1,a2=0,a3=1, and a4=1 and 3=[1.1011]2.

    1. k=3 and n=1 works since 2317=87=17+1. There are infinitely many other correct answers (k=6 and n=9 is another example), but we will use k=3 and n=1 going forward.

    2. Adding 1 to the number [0.a1a2]2 changes the expansion to [1.a1a2]2. Just like how multiplying by 103 moves the decimal point three places to the right, multiplying by 23 moves the point in a binary expansion three places to the right (convince yourself this is true!). Therefore, 2317=[a1a2a3.a4a5]2 and 17+1=[1.a1a2a3]2.

    3. From the previous part we have two different binary expressions for the same number: [a1a2a3.a4a5]2=2317=17+1=[1.a1a2a3]2. Since binary expansions are unique (see Fact 2 from above the statement of the problem on the problem sheet), these two binary expansions must be exactly the same! Comparing the bits (remember, bits are the binary digits) of these two expansions gives a1=a2=0,a3=1, and ak=ak+3 for all natural numbers k. Therefore 17=[0.001]2.

    4. We will follow the same procedure as we did for computing the binary expansion of 17 in the first three parts of this question.

      First, we wish to find integers k and n so that 2k311=311+n. At this point, we don’t even know if such integers exist, but let’s start looking anyway. If such a k and n exist, we would have 32k11=3+11n11 so 32k=3+11n. We can now search through values of k, hoping that 32k3 is a multiple of 11. Let’s do exactly this.

      k 32k3 multiple of 11?
      1 3 no
      2 9 no
      3 21 no
      4 45 no
      5 93 no
      6 189 no
      7 381 no
      8 765 no
      9 1533 no
      10 3069 YES!

      Great! So 210311=311+306911=311+279. Now let 311=[0.a1a2a3]2 (note that since 311<1, the only binary digit to the left of the point is 0). By the solution to 1(a) above we have 311+279=[100010111.a1a2a3]2. Since multiplying by 210 shifts the point 10 places to the right we have 210311=[a1a2a3a4a5a6a7a8a9a10.a11a12a13]2. Comparing these two expansions gives us a1=0a2=1a3=0a4=0a5=0a6=1a7=0a8=1a9=1a10=1, andat=at+10 for all integers t1. Therefore 311=[0.0100010111]2.

  1. The key observation here is that p is not rational. Let p=[anan1a1a0.a1a2a3]2. Suppose there are only finitely many 1’s. Then there is some k so that ak is the very last 1 that appears. Then p=an2n+an12n1++a12+a0+a12+a222++ak2k which is a rational number, contradicting the fact that p is irrational. Therefore, the binary expansion of p must have infinitely many 1’s.

    Now suppose that there are only finitely many 0’s. If there are only finitely many 1’s, then the above argument shows p is rational, so we must have infinitely many 1’s. Then the binary expansion must take the form p=[anan1a1a0.a1a2ak01]2 that is, the binary expansion eventually becomes just a string of 1’s. However (by Fact 1 at the beginning of the questions in the problem document), we know such a binary expansion is equal to the binary expansion p=[anan1a1a0.a1a2ak1]2 and we again have only finitely many 0’s (by assumption) and finitely many 1’s (as we have just shown), contradicting the fact p is irrational. Alas, we are forced to conclude that the binary expansion of p has infinitely many 0’s and infinitely many 1’s.

  2. Let 2=[1.a1a2a3]2. Choose k so that ak=1 (such a k exists since there are infinitely many 1’s in the binary expansion of 2 by Question 3). Then 2k12=[1a1a2ak1.1ak+1ak+2]2 so 2k12=[1a1a2ak1]2 and 2k122k12=[0.1ak+1ak+2]2. Since there are infinitely many 1’s in the binary expansion of 2, [0.0ak+1ak+2]2>0. Therefore, 2k122k12=[0.1]2+[0.0ak+1ak+2]2>[0.1]2=12. By the definition of the floor function, 1>2k122k12. Combining the two inequalities gives 1>2k122k12>12. Some manipulation of the inequalities gives 2k121<2k12<2k1212. Multiplying all sides of the inequalities by 2 and then adding 2 gives 2k<(2k12+1)2<2k+22. Let m=2k12+1, which is a positive integer. Since 22<1 we have 2k<m2<2k+1 and therefore m2=2k. Since there are infinitely many k so that ak=1, there are infinitely many elements of the sequence 2,22,32,42,52, that are powers of 2.