Proving that every non-negative integer can be expressed in binary

In summary, the conversation discusses the proof that every even number can be written as positive powers of 2 and the claim that any non-negative integer can be expressed in binary in less than i+1 digits. The conversation also touches on the use of mathematical induction to prove these claims and the concept of base systems.
  • #1
Jamin2112
986
12
I'm assuming this is a simple proof? I started thinking about it.

It suffices to show that every even number can be written as positive powers of 2 (since every odd number is simply an even number plus 20). So let n = 2k for some non-negative integer k; we need to show that 2k = 2c1 + 4c2 + 8c3 + ... where each of c1, c2, c3 ... is 0 or 1.

(Where do I go from here? Some sort of iterative scheme?)
 
Mathematics news on Phys.org
  • #2
Claim: Any non-negative integer i can be expressed in binary in no more than i+1 digits.

Can you prove this claim with mathematical induction?
 
  • #3
jbriggs444 said:
Claim: Any non-negative integer i can be expressed in binary in no more than i+1 digits.

Can you prove this claim with mathematical induction?

Wow. I almost forgot about induction. I've been out of school for too long already lol.

But is there any way to finish it the way I've started?
 
  • #4
Jamin2112 said:
But is there any way to finish it the way I've started?

I think that what you are currently agonizing over is a way to prove a piece of the result:

"If (c1, c2, c3, c4, ... cn) is the binary expansion of k then (c1, c2, c3, c4, ..., cn, 0 ) is the binary expansion of 2k"

You could work at that and invoke the definition of a binary expansion, the distributive property of multiplication over addition and mathematical induction on the number of terms in the expansion and laboriously demonstrate that the result holds. Normally, though, that's the sort of thing that is obvious enough to be accepted without proof.

Now, if you had a proof of the above claim (or are willing to accept it as obvious), can you come up with a similar claim that holds for odd numbers?

If so, those are the two key pieces for the inductive proof that I have in mind.
 
Last edited:
  • #5
Jamin2112 said:
It suffices to show that every even number can be written as positive powers of 2 ...
That should be positive multiples of 2.

I'm not sure this is needed though, but I'm also not sure what constitutes "proof", without accepting some basic principles of math in any base, such as adding 1 to a number, in which case you could start with 0 and then repeatedly add 1 in base 2 to get any integer value.
 
  • #6
I would proceed by induction. It holds for 1, so assume it holds for all integers less than r and try to prove it for r. find n such that 2^(n+1) > r ≥ 2^n. then r = 2^n + an error term less than 2^n which by inductive hypothesis can be expressed as a sum of powers of 2, with exponents less than n. done.this is just the principle of "grouping" used to teach kids arithmetic. I.e. you have a sequence of cardboard boxes, each twice the size of the previous one. You have a collection of bottles you need to box up. You just fill the largest box you can. Then with what is left over you again fill the largest box you can, which is smaller. continue...
 
  • #7
jbriggs444 said:
Claim: Any non-negative integer i can be expressed in binary in no more than i+1 digits.
Is this what you meant to say? A nonnegative integer i can be expressed in way less than i+1 digits. For example, 9 can be expressed in only four binary digits as 1001.
 
  • #8
Mark44 said:
Is this what you meant to say? A nonnegative integer i can be expressed in way less than i+1 digits. For example, 9 can be expressed in only four binary digits as 1001.

As long as "non-negative" was intended, it has to be phrased that way - zero requires one digit. (Of course that also loses the asymptotic logarithmic behavior, so I find the proposition somewhat uninteresting except as an exercise in proof by induction)
 
  • #9
Mark44 said:
Is this what you meant to say? A nonnegative integer i can be expressed in way less than i+1 digits. For example, 9 can be expressed in only four binary digits as 1001.

Yes, that is what I meant to say. It is not a tight upper bound, but all we need is an upper bound.
 
  • #10
You can express it in i digits in base 1, and any other base will require less digits.
In fact, you can express it in less than n digits in base b, where n satisfies ##i \le b^n##, i.e. ##n \ge \log_b(i)##.
In particular, log29 ≈ 3.2 so 4 digits suffice.
 
  • #11
Let [itex]X= \{ n \in \mathbb Z_+: \enspace n \text{ can be expressed in binary}\}[/itex]. You want to show [itex]X=\mathbb Z_+[/itex]

Try to prove the following lemma: If [itex]m,n\in X,[/itex] then [itex]m+n\in X[/itex]. Mathwonk's suggestion should give you a method of proof for the lemma.

This may make your induction easier.

(I'm not adding new content really... I'm just suggesting a way to organize your thoughts on this.)
 
  • #12
CompuChip said:
You can express it in i digits in base 1
I don't believe that there is such a thing as base-1, but I get what you're saying. I.e., counting by tick-marks, where 4 = llll, and so on.

In base-n, where n is a positive integer, there are n digits: 0, 1, ..., n-1. This means that in base-2, the digits are 0 and 1. If we follow the same pattern, base-1 would have only 1 digit, which would be 0.

I had a long conversation with someone many (> 20) years ago on CompuServe, and he steadfastly maintained his belief in a base-1 system.
CompuChip said:
, and any other base will require less digits.
In fact, you can express it in less than n digits in base b, where n satisfies ##i \le b^n##, i.e. ##n \ge \log_b(i)##.
In particular, log29 ≈ 3.2 so 4 digits suffice.
 
  • #13
mathwonk said:
I would proceed by induction. It holds for 1, so assume it holds for all integers less than r and try to prove it for r. find n such that 2^(n+1) > r ≥ 2^n. then r = 2^n + an error term less than 2^n which by inductive hypothesis can be expressed as a sum of powers of 2, with exponents less than n. done.

Wow.
 
Last edited:
  • #14
economicsnerd said:
Let [itex]X= \{ n \in \mathbb Z_+: \enspace n \text{ can be expressed in binary}\}[/itex]. You want to show [itex]X=\mathbb Z_+[/itex]

Try to prove the following lemma: If [itex]m,n\in X,[/itex] then [itex]m+n\in X[/itex]. Mathwonk's suggestion should give you a method of proof for the lemma.

I see.
 
  • #15
Ok, guys ... I'm starting to write out a formal proof but I'm having trouble finishing it off in an elegant way. It looks like it's going to get messy trying to show that m + n equals a sum of powers of 2. Or am I missing some obvious, simple recipe?


ekuSySe.png
 
  • #16
Jamin2112 said:
Or am I missing some obvious, simple recipe?

Instead of working with ##m+n##, you might try working with ##m+1##. If ##m## can be expressed in ##m## bits, how many bits worst case are required to express ##m+1##?
 
  • #17
Nugatory said:
Instead of working with ##m+n##, you might try working with ##m+1##. If ##m## can be expressed in ##m## bits, how many bits worst case are required to express ##m+1##?

m+1 worst case
 

Related to Proving that every non-negative integer can be expressed in binary

1. What is the concept of "Proving that every non-negative integer can be expressed in binary"?

The concept refers to the mathematical proof that shows every non-negative integer (including zero) can be written or represented in binary form, which uses only the digits 0 and 1. This is also known as the binary number system.

2. Why is it important to prove that every non-negative integer can be expressed in binary?

It is important because the binary number system is widely used in computer science and digital technology. By proving this concept, we can ensure that every non-negative integer can be accurately represented and manipulated in these fields.

3. How can we prove that every non-negative integer can be expressed in binary?

There are various ways to prove this concept, but one approach is to use mathematical induction. This involves showing that the statement holds for the base case (0) and then proving that if it holds for any given integer, it also holds for the next integer. By repeating this process, we can show that the statement holds for all non-negative integers.

4. Are there any exceptions to this concept?

No, there are no exceptions to this concept. Every non-negative integer, including zero, can be expressed in binary form.

5. How is this concept applied in real-world situations?

This concept is applied in various real-world situations, such as in computer programming, data storage, and information processing. For example, in computer programming, binary is used to represent and manipulate data, and in data storage, it is used to store and retrieve information from memory. Understanding this concept is essential for effectively working with binary data in these fields.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Math Proof Training and Practice
Replies
3
Views
856
  • Precalculus Mathematics Homework Help
Replies
9
Views
1K
Replies
9
Views
971
Replies
9
Views
1K
  • Precalculus Mathematics Homework Help
Replies
8
Views
1K
Replies
2
Views
5K
Back
Top