179 lines
6.3 KiB
Org Mode
179 lines
6.3 KiB
Org Mode
![]() |
#+title: A Countable Union of Countable Sets is Countable
|
||
|
#+created: [2024-12-05 Thu]
|
||
|
#+last_modified: [2024-12-06 Fri]
|
||
|
#+author: Dibyashanu Pati
|
||
|
#+OPTIONS: tex:dvipng
|
||
|
#+OPTIONS: \n:t
|
||
|
#+OPTIONS: toc:2
|
||
|
|
||
|
* Union of Finite Countable Sets
|
||
|
It is straight forward to show that the union of two countable set is countable.
|
||
|
Let $S_0$ and $S_1$ be two countable infinite sets(in case when either is finite the proof trivial), that is,
|
||
|
|
||
|
\[\exists f_0 : S_0 \rightarrow \mathbb{N}\] and
|
||
|
|
||
|
\[\exists f_1 : S_1 \rightarrow \mathbb{N}\]
|
||
|
|
||
|
such that $f_0$ and $f_1$ are bijections,
|
||
|
|
||
|
then the set $S = S_0 \cup S_1$ is also countable meaning that
|
||
|
|
||
|
\[\exists f: S \rightarrow \mathbb{N}\] so that $f$ is a bijection.
|
||
|
|
||
|
To construct such a map $f$ all the elements in $S_0$ to all the all the even naturals and all the elements in $S_1$ to the even naturals, so
|
||
|
|
||
|
\[S_0 = \{a_0, a_1 , a_2 , \hdots\}\]
|
||
|
|
||
|
\[S_1 = \{b_0, b_1 , b_2 , \hdots\}\]
|
||
|
|
||
|
let \[f(a_n) = 2n\] and \[f(b_n) = 2n + 1\]
|
||
|
|
||
|
Such a map is surjective because we cover all cases modulo $2$ and hence all the integers, and this map is injective because $f$ is injective on all $a$'s and $b$'s separately.
|
||
|
|
||
|
Either using induction or using a similar argument with the naturals modulo $k$ for any finite $k$ we can show that the union of any $k$ countable sets is also countable
|
||
|
|
||
|
$S = S_0 \cup S_1 \cup S_2 \hdots \cup S_k$.
|
||
|
* Larger Unions?
|
||
|
We know that an arbitrary union of countable sets is not necessarily countable.
|
||
|
Consider as a counterexample the union of all singletons $\{r\}, r \in \mathbb{R}$, this is $\mathbb{R}$ itself which we know not to be countable.
|
||
|
|
||
|
It turns out that a countable union of countable sets is countable, to show this we *cannot* use a induction or a modulo $k$ argument.
|
||
|
|
||
|
The key idea in the modulo k argument is that there are $k$ equivalence classes and hence we can break the Naturals into $k$ infinite countable sequences(countable infinite sets), but can we break the naturals into infinitely many infinite sub-sequences? - Yes.
|
||
|
|
||
|
The first time I encountered this it was supposed to be justified was by observing that the Naturals can be arranged into the following two dimensional array,
|
||
|
|
||
|
\begin{matrix}
|
||
|
\, \\
|
||
|
0 & 1 & 3 & 6 & \dots \\
|
||
|
2 & 4 & 7 & \dots \\
|
||
|
5 & 8 & \dots \\
|
||
|
9 & \dots \\
|
||
|
\vdots
|
||
|
\end{matrix}
|
||
|
|
||
|
Although this is convincing, a thought process that would lead me to come up with this eluded me until now, I explain this thought process below.
|
||
|
|
||
|
* The Argument
|
||
|
In the modulo $k$ argument we have a constant gap between each consecutive element of a sequence, because of this we are limited by the gap size($k$). So the key idea is constructing such a partitioning of the Naturals is to keep increasing the gap size, but since the gap size is finite at any point we can only have elements from a finite number of the countably infinite sub-sequences at any particular, so we are forced to start subsequent sub-sequences at larger and larger points.
|
||
|
|
||
|
The most simple way to increase the gap size in this way is to keep increasing it by one after each gap.
|
||
|
|
||
|
[[pics/Countable_union_of_Countable_sets.jpg][image]]
|
||
|
|
||
|
Look at the $0^{th}$ sequence we just get the [[https://en.wikipedia.org/wiki/Triangular_number][Triangular numbers]] and zero.
|
||
|
|
||
|
For elements of the first sequence we get the fill all places immediately after all Triangular numbers starting from the first Triangular number.
|
||
|
|
||
|
For elements of the second sequence we get the fill all places one place after all Triangular numbers starting from the second triangular number.
|
||
|
|
||
|
So we come up with the function $S$ that maps the $n^{th}$ element of the $m^{th}$ sub-sequence.
|
||
|
|
||
|
$S(m,n) = m + \frac{(m+n)(m + n + 1)}{2}$
|
||
|
|
||
|
This is equivalent to the 2D array I mentioned earlier.
|
||
|
#+begin_src python :results output
|
||
|
for m in range(0,5):
|
||
|
row = f" S_{m} = "
|
||
|
for n in range(0,5):
|
||
|
s = m + n
|
||
|
row += (str(m + int(s*(s+1)/2)) + ' , ')
|
||
|
print(row + ' ... \n')
|
||
|
print('.\n.\n.\n')
|
||
|
#+end_src
|
||
|
|
||
|
#+RESULTS:
|
||
|
#+begin_example
|
||
|
S_0 = 0 , 1 , 3 , 6 , 10 , ...
|
||
|
|
||
|
S_1 = 2 , 4 , 7 , 11 , 16 , ...
|
||
|
|
||
|
S_2 = 5 , 8 , 12 , 17 , 23 , ...
|
||
|
|
||
|
S_3 = 9 , 13 , 18 , 24 , 31 , ...
|
||
|
|
||
|
S_4 = 14 , 19 , 25 , 32 , 40 , ...
|
||
|
|
||
|
.
|
||
|
.
|
||
|
.
|
||
|
|
||
|
#+end_example
|
||
|
|
||
|
|
||
|
Now we just have to show that $S: \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$ is bijective.
|
||
|
|
||
|
------
|
||
|
|
||
|
/Claim 1/: If $S(m_0, n_0) = S(m_1, n_1)$ then $m_0 + n_0 = m_1 + n_1$
|
||
|
|
||
|
This equivalent to showing that if $m_0 + n_0 \ne m_1 + n_1$ then $S(m_0, n_0) \ne S(m_1, n_1)$.
|
||
|
|
||
|
Without loss of generality let us assume $m_0 + n_0 < m_1 + n_1$.
|
||
|
|
||
|
Let $s_0 = m_0 + n_0$ and $s_1 = m_1 + n_1$ since $s_1>s_0$ the difference of there triangular numbers $T(s_1)$ and $T(s_0)$ is atleast $s_1$ because $s_0 \le s_1 - 1$.
|
||
|
|
||
|
Then
|
||
|
\[
|
||
|
S(m_1, n_1) - S(m_0, n_0) &= \frac{s_1(s_1 + 1)}{2} - \frac{s_0(s_0 - 1)}{2} + m_1 - m_0
|
||
|
\]
|
||
|
\[
|
||
|
\ge s_1 + m_1 - m_0
|
||
|
\]
|
||
|
\[ \ge s_1 - m_0
|
||
|
\]
|
||
|
\[ = m_1 + n_1 - m_0
|
||
|
\]
|
||
|
\[ > n_0
|
||
|
\]
|
||
|
\[ \ge 0
|
||
|
\]
|
||
|
|
||
|
So \[S(m_1, n_1) > S(m_0, n_0)\]
|
||
|
|
||
|
Similarly we can show that if $m_0 + n_0 > m_1 + n_1$ then $S(m_0, n_0) > S(m_1, n_1)$
|
||
|
|
||
|
------
|
||
|
|
||
|
|
||
|
Now we show injectivity using /Claim 1/
|
||
|
|
||
|
If $S(m_0, n_0) = S(m_1, n_1)$ then by /Claim 1/ $m_0 + n_0 = m_1 + n_1$
|
||
|
|
||
|
Let $s_0 = m_0 + n_0$ and $s_1 = m_1 + n_1$ in this case Let $s = s_0 = s_1$
|
||
|
|
||
|
So,
|
||
|
|
||
|
\[
|
||
|
\implies S(m_1, n_1) - S(m_0, n_0) &= \frac{s_1(s_1 + 1)}{2} - \frac{s_0(s_0 - 1)}{2} + m_1 - m_0 = 0 \]
|
||
|
\[\implies 0 = 0 + m_1 - m_0 \]
|
||
|
\[\implies m_1 = m_0 \]
|
||
|
\[\implies s - m_1 = s - m_0 \]
|
||
|
\[\implies n_1 = n_0 \
|
||
|
\]
|
||
|
|
||
|
Now we show surjectivity
|
||
|
|
||
|
Let $N \in \mathbb{N}$
|
||
|
|
||
|
let $T(s)$ be the largest triangular number less than $N$.
|
||
|
|
||
|
Let $m = N - T(n)$
|
||
|
|
||
|
Let $n = s - m$
|
||
|
|
||
|
Then
|
||
|
|
||
|
$S(m,n) = N$
|
||
|
|
||
|
Since $S: \mathbb{N} \times \mathbb{N} \rightarrow \mathbb{N}$ is both injective and surjective, it is a bijection, we are done.
|
||
|
|
||
|
* An Interesting Applications
|
||
|
*The set of finite subsets of $\mathbb{N}$ is countable.*
|
||
|
Let $A_i$ be set of all subsets of $\mathbb{N}$ containing $i$ elements, that is with cardinality $i$.
|
||
|
|
||
|
$A_1$ is just the set of all singletons of $\mathbb{N}$, there is an obvious bijection of this with $\mathbb{N}$, the identity map - hence it is countable.
|
||
|
Now we just use induction,
|
||
|
Let $A_k$ be countable, then $A_{k + 1} = \bigcup\limits_{i \in \mathbb{N}} \{S \cup i : i \notin S \land S \in A_k \}$ is a countable union of countable sets.
|
||
|
Since all all $A_i$'s are countable the set of all finite subsets $A = \bigcup A_i$ being a countable union of countables is also countable.
|