Prove the even integers are countable (by explicitly giving a bijection $\mathbb{N} \to E$)

7.7k Views Asked by At

I've come to this: $$f: \mathbb{N} \to \{\ldots, -6,-4,-2,0,2,4,6, \ldots\},\qquad f(n) = \begin{cases} 2n & \text{ if } n \text{ is odd} \\ -n & \text{ if } n \text{ is even} \end{cases}$$

I don't know what to do with this though. I never know how to format a proof correctly.

2

There are 2 best solutions below

2
On BEST ANSWER

As I pointed out in the comments, the function that you described is not surjective because $4$ (or any multiple of $4$) has no inverse image.

Assuming you define the set of even integers as, $\mathbb{E} = 2\mathbb{Z} = \{\dots, -6, -4, -2, 0, 2, 4, 6, \dots\}$

and the set of naturals as, $\mathbb{N} = \{0, 1, 2, \dots\}$.

Define $f: \mathbb{N} \to \mathbb{E}$ as $f(n) = \begin{cases} -n, & \text{if $n$ is even} \\ n+1, & \text{if $n$ is odd} \end{cases}$

You need to show that it is one-one and onto. Note that, if, $f(n_1) = f(n_2)$, then either, $n_1+1 = n_2+1$ or $-n_1 = -n_2$, and in both the cases, we get, $n_1 = n_2$. Thus, $f$ is one-one.

To prove its onto-ness, take any element $n$ from the codomain $\mathbb{E}$. Then note that if $n \leq 0$, then $f(-n) = n$ and if $n > 0$, then, $f(n-1) = n$. Since, every element in the codomain has an inverse image, $f$ is onto.

So, we conclude that $\mathbb{E}$ is countable.

Note that, to prove countability of a set $S$, it suffices to prove existence of a one-one map from $S$ to $\mathbb{N}$ (or any other countable set), or an onto map from $\mathbb{N}$ (or any other countable set) to $S$. Bijections are not necessarily required.

5
On

Well, you've found your bijection. So the next step is to prove it is a bijection..... which you can't because it is not.

First prove it is surjective: that for any $e\in E$ that there is an $n\in \mathbb N$ so that $f(n) = e$.

Failure of pf: let $e=2k $. In $k\le 0$ then $f(-e) = e$. If $k>0$ and $k $ is odd then $f (k)=2k=e $. If $k>0$ and $k $ is even... well, you're hosed. $f (even)\le 0$. And $f (odd)=2*odd) $ but nothing gives you a positive $2*even $. It can't be done.

Next prove it is injective. That if $f(n) = f(m)$ then $n = m$. Or if $n \ne m$ then $f(n) \ne f(m)$.

Failure of a pf: Let $m \ne n$. Case 1: $n, m$ are both odd. Then $f(n)=2n$ and $f(m) = 2m$ but $2m\ne 2n$. so far so good. Case 2: $n, m$ are both odd. Then $f(n) = -n$ and $f(m) -m$ but $-n \ne -m$. So far so good.

Case 3: $n = 2k$ is even and $m = 2j + 1$ is odd. Then $f(n) = -2k$. And $f(m) = 4j + 2$. Now if $-2k = 4j + 2$ then $k = -2j - 1$. That is certainly possible. $f(-2j - 1) = -4j -2 = f(4j+2)$ but $-2j-1 \ne 4j+2$. So it is not injective.

===

My advice would be when it comes to guessing the bijection $f: \mathbb N \to \{...-6, -4, -2, 0 , 2, 4, 6,....\}$ it be easier to try to find

$f^{-1}= g: \{...-6, -4, -2, 0 , 2, 4, 6,....\}\to \mathbb N$ to get a better idea of a strategy.

Here we have to figure out what to do with the negative and the positive integers. We need to send the negatives to one half of the integers and to send the positives (and 0) to the other.

So we have to send the negative values to the odd or evens and the positive (and 0) to the evens or odds.

Since $0$ isn't natural (unless it is) and we don't want zero we should send $0$ and then negatives to the odds.

If $2k \le 0; g(2k) = - (2k + 1)$

And we can send the positive evens to ... the positive evens.

If $2k > 0$ then $g(2k) = 2k$.

Now if $g: \{...-6, -4, -2, 0 , 2, 4, 6,....\}\to \mathbb N$ is a bijection then $f = g^{-1}: \mathbb N\to \{...-6, -4, -2, 0 , 2, 4, 6,....\}$ will be too.

We don't actually have to express $f(x)$ but... well,....

$f:\mathbb N \to \{...-6, -4, -2, 0 , 2, 4, 6,....\}\to \mathbb N$. If $n= 2k+1$ is odd, $f(n) = -2k$. If $n=2k$ is even, $f(n) = n=2k$.

Now we must prove $f$ or $g$ is a bijection. I'll do $f$ because... well, it's harder.

1) Show $f$ is surjective. If $e = 2k \in E$ show there is an $n \in \mathbb N$ so that $f(n) = e$.

If $e > 0$ then $f(e) = e$. If $e =2k \le 0$ then $f(-2k + 1) = 2k = e$.

So $f$ is surjective.

2) Show $f$ is injective. If $f(n) = f(m) = 2k$ prove that if $n\ne m$ then $f(n) \ne f(m)$.

Case 1: $n,m$ both odd. $n=2k + 1; m = 2j + 1; k\ne j$. Then $f(2k+1) = -2k$ and $f(2j+1) = -2j$ and $-2k \ne -2j$.

Case 2: $n = 2k ; m=2j$ are both even $k \ne j$. Then $f(2k) =2k$ and $f(2j) = 2j$ and $2k\ne 2j$.

Case 3: $n = 2k +1$ is odd and $m = 2j$ is even. Then $f(n)= -2k \le 0 < 2j = f(m)$. So $f(n) \ne f(m)$.

Case 4: $n$ even and $m$ odd would be exactly the same as case 3: