6

Theorem: If $A$ and $B$ are both countable sets, then their union $A\cup B$ is also countable.

I am trying to prove this theorem in the following manner:

Since $A$ is a countable set, there exists a bijective function such that $f:\mathbb{N}\to A$. Similarly, there exists a bijective function $g:\mathbb{N}\to B$. Now define $h:\mathbb{N}\to A\cup B$ such that: $$h(n)=\begin{cases} f(\frac{n+1}{2})&\text{, n is odd}\\ g(n/2) & \text{, n is even} \\ \end{cases}$$ So in essence, $h(1)=f(1)$, $h(2)=g(1)$, $h(3)=f(2)$ and so on. Now we have to show that h is a bijection.

h(n) is one-one:

Proof: If $h(n_1)=h(n_2)$ then, if $n_1$ and $n_2$ are both either odd or even, we get $n_1=n_2$. But if, suppose $n_1$ is odd and $n_2$ is even, this implies that: $$f\left(\frac{n_1+1}{2}\right)=g\left(\frac{n_2}{2}\right)$$ How can one deduce from this equality that $n_1=n_2$?

I tried to think about this and realized that if $A\cap B=\phi$ then this case is impossible as it would imply that there is a common element in both sets. On the other hand, if we assume that $A\cap B\neq \phi$, then either $f\left(\frac{n_1+1}{2}\right)\in A\cup B$ or $g\left(\frac{n_2}{2}\right)\in A\cup B$....Beyond this I'm clueless.

Edit: Solution by the author-

enter image description here

Student
  • 9,196
  • 8
  • 35
  • 81
  • 1
    If $A$ and $B$ are disjoint sets then your mapping $h$ is bijective, because in that case $n_1$ and $n_2$ can be both either even or odd only. If these sets are not disjoint then the mapping $h$ can not be injective. – Prince Khan Nov 07 '17 at 04:37

4 Answers4

5

A set $S$ is countable iff its elements can be enumerated.

Since $A$ is countable, you can enumerate $A=\{a_1,a_2,a_3,...\}$.

Since $B$ is countable you can enumerate $B=\{b_1,b_2,...\}$

Enumerate the elements of $A\cup B$ as $\{a_1,b_1,a_2,b_2,...\}$ and thus $A\cup B$ is countable.

Landon Carter
  • 12,906
  • 4
  • 32
  • 79
2

Your proof: we can take an example: $A=\{2n : n\in \mathbb{N}\}$ and $B=\{3n: n\in \mathbb{N}\}$. We can take $f(n) = 2n$ and $g(n) = 3n$. Then, you have, for example, $h(5) = f(3) = 6$ and $h(6) = g(3) = 6$, then $h$ is not injective.

For the proof, you can see this question.

GAVD
  • 7,296
  • 1
  • 16
  • 30
1

Let $f_1 : \mathbb{N}\to A$ and $f_2 : \mathbb{N}\to B$ be two bijections.

Let $g_1 : \mathbb{N}\to 2\mathbb{N}$ such that $g_1(n)=2n$ and $g_2 : \mathbb{N}\to 2\mathbb{N}+1$ such that $g_2(n)=2n+1$.

Then $h : \mathbb{N} \to A\cup B$ such that $h(n)\begin{cases} f_1\circ g_1^{-1} \text{ if }n\text{ is even}\\ f_2\circ g_2^{-1} \text{ if }n\text{ is odd} \end{cases}$ is the surjection you are looking for.

phong
  • 19
1

We are going with countable being synonymous with countably infinite.

While trying out to define a bijection from $\mathbb{N}$ to $A \cup B$ and their peice-wise cousins, I saw five possibilies, which preserve the cardinality of $A$ and $B$:

Note: C means countable and F is for finite. $$\begin{array} {| c | c | c |} \hline A \backslash B & A \cap B & B \backslash A \\ \hline C & F & C \\ \hline F & C & F \\ \hline C & C & C \\ \hline C & C & F \\ \hline F & C & C \\ \hline \end{array} $$

If one observes carefully, we can group these five into two. Taking the existence of one set fully and the other set exists after the elimination of the commonality, which got adjoined to the first set.

Thus,

$A$ and $B\backslash A$

    or 

$B$ and $A\backslash B$

Proceeding to the result under consideration:

Theorem: If $A$ and $B$ are both countable sets, then their union $A \cup B$ is countable.

Proof:

Let $A$ and $B$ be any two countable sets.

Now, $A \cup B = A \cup (B \backslash A)$

Either $|B\backslash A| < \aleph_{0}$ OR $|B\backslash A| = \aleph_{0}$

$\underline{\text{Case 1}}$:

If $|B\backslash A| < \aleph_{0}$, then let $|B\backslash A|=n$, for some $n \in \mathbb{N}$

Let $f:J_n \rightarrow (B \backslash A)$ and $g:(\mathbb{N} \backslash J_n) \rightarrow A$ be bijections.

(Note: The set $J_u$:= The set of first u natural numbers.)

Let $h:\mathbb{N} \rightarrow A \cup B$ be a function such that

$$\begin{align} h(x)&:= \begin{cases} f(x),& \text{ if } x \in J_n \\ g(x),& \text{ otherwise } \end{cases} \end{align}$$

$\because (B\backslash A) \cap A = \varnothing \implies f(\theta) \neq g(\mu), \forall \theta \in J_n, \forall \mu \in (\mathbb{N} \backslash J_n)$

Let for some $\alpha$, $\beta$ $\in \mathbb{N}$, $h(\alpha)=h(\beta)$

$\implies \ f(\alpha)=f(\beta)$ OR $g(\alpha)=g(\beta)$

$\implies \alpha = \beta$ OR $\alpha = \beta$ ($\because f$ and $g$ are one-one.)

$\implies h$ is one-one

Let $\eta \in A \cup B \implies \eta \in A$ OR $\eta \in B\backslash A$

$\implies \eta=f(\omega)$, for some $\omega \in J_n$ OR $\eta=g(\lambda)$, for some $\lambda \in \mathbb{N}\backslash J_n$ ($\because f$ and $g$ are onto.)

$\implies \eta=h(\omega)$, for some $\omega \in J_n \subset \mathbb{N}$ OR $\eta=h(\lambda)$, for some $\lambda \in \mathbb{N}$ such that $\lambda > n$

$\implies h$ is onto.

Thus, $h$ is bijective $$\begin{align}\implies A \cup B \sim \mathbb{N}\tag{1}\end{align}$$

$\underline{\text{Case 2}}$:

We have $B\backslash A$ as countable.

Let $y:\mathbb{N} \rightarrow A$ and $z:\mathbb{N} \rightarrow (B\backslash A)$ be bijections.

Let $k:\mathbb{N} \rightarrow A \cup B$ be a function such that

$$\begin{align} k(w)&:= \begin{cases} f(\frac{w+1}{2}),& \text{ if } w \text{ is odd } \\ g(\frac{w}{2}),& \text{ otherwise } \end{cases} \end{align}$$

Then $k$ is bijective (by a reasoning similar to $h$ being bijective, given in $\underline{\text{Case 1}}$)

$$\begin{align}\implies A \cup B \sim \mathbb{N}\tag{2}\end{align}$$

Thus, $(1),(2)\implies$ If $A$ and $B$ are countable, then their union $A \cup B$ is countable.