# What is the cardinality of all binary sequnces (infinte and finite) that the sequnce 01 does not apper in them

As the title suggests, the question is :

What is the cardinality of all binary sequnces (infinte and finite) that the sequnce 01 does not apper in them ?

I'll tell you where im stuck, let's say f is a function that recieves a natural number and creates a sequence of just ones, i.e : f(6) = (1,1,1,1,1,1), f(2) =(1.1). Uniting this countable sets togheter will generate a countable set, so lets call the orinignal set(the one we need to find his cardinality) A, so A>= 0א because this set is a subset of A.

Also, A is a subset of all binary sqeunces (infinte and finite) and all the binary sqeunces cardinaliy is א, so A <= א.

So right now i have א0 <= A <= א, which does not help me a lot because i need to find out if its א or א0.

If $0$ appears in the sequence, then all the following terms must be $0$ so that $01$ does not appear in the sequence. So the sequences are: $$000\ldots\\ 10000\ldots\\ 11000\ldots\\$$

and so on. The sequence $111\ldots$ is also included. This is clearly a countable set.

• Don't forget the finite ones. – Clive Newstead Apr 22 '15 at 18:13
• Yes. Of course the set of all finite binary sequences is countable, hence the set of finite sequences of the given type is countable. Now the entire collection of sequences is the given type is countable. – Tim Raczkowski Apr 22 '15 at 18:16

If the sequence $01$ cannot appear, then any sequence in your set must be either an infinite sequence of $1$s, or be of the form $$\underbrace{11 \cdots 1}_{m\ \text{times}}\underbrace{00\cdots}_{n\ \text{times}}$$ where $0 \le m < \omega$ and $0 \le n \le \omega$.

Why? If a $0$ appears at any point in the string then $1$ can't appear at any point later in the string. Thus there is an evident bijection between your set and the set $$\{ (\omega, 0) \} \cup \{ (m, n) : 0 \le m < \omega,\ 0 \le n \le \omega \}$$ What is the cardinality of this set?

• I undetstand why we get m times ones, but not sure why there are n times zeros, couldn't this type of sequence be infinite just like the sequnce of ones ? – NotSure Apr 22 '15 at 18:21
• AmirH: Clive wrote that $0 \le n {\color{red}{\le}} \omega$ (not $0 \le n {\color{red}{<}} \omega$), and if $n=\omega$, the sequence is infinite. – Steve Kass Apr 22 '15 at 18:29