Countability of binary Strings

  • #1
Mr X
26
3
TL;DR Summary
If we consider the set of all strings made up of 0s and 1s, will that set be countable or uncountable? How to prove it?
Looking at the countability of the set A, made up of all sequences whose elements are the digits 0 and 1, I've run into multiple interpretations/answers.
One says the set is countable, because each natural number can be written as as a binary number. This allows for one one matching between the set of seqences and set of naturals, which makes it countable.
Another way, if we assume the set is countable, we can use something similiar to the cantor's digonaolization argument, to show that there exists infinitely many more sequences that has not been included.

The third is something that I've seen in a guide for NET exam, and the fact that the set is countable is added as a note. I do not fully understand the things said above clearly, but it kind of goes like this.
when the series a/2+ b/2^2 + c/2^3.... converges to x with a,b,c.. as binary digits then the binary expression of x is given by x=0.abc....
and after this explanation, the countability is added as a note with no furhter explanation. I'm not even sure these two things are directly connected or the explanation is used in the deduction, but adding it in here Just in case.

So my question is, is the set countable or uncountable? Is there someting wrong with one of these proofs, which is the correct proof?
 
Physics news on Phys.org
  • #2
Mr X said:
TL;DR Summary: If we consider the set of all strings made up of 0s and 1s, will that set be countable or uncountable? How to prove it?
The set of all finite binary strings of arbitrary length is countable.

The set of all infinite binary strings is uncountable.
Mr X said:
Looking at the countability of the set A, made up of all sequences whose elements are the digits 0 and 1, I've run into multiple interpretations/answers.
If this is all infinite sequences, then the set is uncountable.
Mr X said:
One says the set is countable, because each natural number can be written as as a binary number. This allows for one one matching between the set of seqences and set of naturals, which makes it countable.
The natural numbers map to the set of finite strings of arbitrary length. This is countable. None of the strings is infinite (although you can pad out a finite string with an infinite sequence of zeroes, but that doesn't change the countability).
Mr X said:
Another way, if we assume the set is countable, we can use something similiar to the cantor's digonaolization argument, to show that there exists infinitely many more sequences that has not been included.
That's correct. As long as we are dealing with all infinite binary strings.
Mr X said:
The third is something that I've seen in a guide for NET exam, and the fact that the set is countable is added as a note. I do not fully understand the things said above clearly, but it kind of goes like this.
when the series a/2+ b/2^2 + c/2^3.... converges to x with a,b,c.. as binary digits then the binary expression of x is given by x=0.abc....
and after this explanation, the countability is added as a note with no furhter explanation. I'm not even sure these two things are directly connected or the explanation is used in the deduction, but adding it in here Just in case.
I'm not sure I understand what that's saying.
Mr X said:
So my question is, is the set countable or uncountable? Is there someting wrong with one of these proofs, which is the correct proof?
As above, the set is uncountable, but you have to be careful not to confuse "of infinite length" with "of finite but arbitrary length".
 
  • Like
Likes jbriggs444 and Mr X
  • #3
PeroK said:
The set of all finite binary strings of arbitrary length is countable.

The set of all infinite binary strings is uncountable.

If this is all infinite sequences, then the set is uncountable.

The natural numbers map to the set of finite strings of arbitrary length. This is countable. None of the strings is infinite (although you can pad out a finite string with an infinite sequence of zeroes, but that doesn't change the countability).

That's correct. As long as we are dealing with all infinite binary strings.

I'm not sure I understand what that's saying.

As above, the set is uncountable, but you have to be careful not to confuse "of infinite length" with "of finite but arbitrary length".
Understood. Thankyou for the explanation.
 
Back
Top