0

I want to prove that $\mathbb{Q\times Z}$ is countable. I found bijection from $\Bbb N\times \Bbb N$ to $\Bbb N$. Can I use it?

Shaun
  • 44,997
DanielG
  • 397

5 Answers5

3

We have $\Bbb Q\times \Bbb Z=\cup_{n\in\mathbb{Z}}(\Bbb Q\times \{n\}).$ But $\Bbb Q\times\{n\}$ and $\Bbb Z$ are both countable. The union of countably many countable sets is countable.

Shaun
  • 44,997
2

If $\phi:\mathbb N\times \mathbb N\to N$ is the bijection you have found.

And $\psi:\mathbb Q \to \mathbb N$ is a bijection not found yet.

And $\chi:\mathbb Z \to \mathbb N$ is a bijection not found yet then

$F:\mathbb Q \times \mathbb Z \to N$ via $F(q,n) = \phi(\psi (q), \chi(n))$ will be a bijection by the lemma that compositions of bijections are bijections.

So now all you need to do is find $\psi$ and $\chi$. Prove $Q$ and $\mathbb Z$ are countable is a very important result so it shouldn't be hard to to google an example.

.....

$\mathbb Z \to N$ is easy. Map the positive numbers to the evens, and $0$ and the negatives to the odds.

$\chi(n) = \begin{cases}2n& n>0\\-(2n-1)&n\le 0\end{cases}$.

The "picture" demonstration of $\psi$ is a little handwavey but if we consider $\gamma: \mathbb N \to \mathbb Q^{+}$ as.

$\gamma: 1\to \frac 11; \require{cancel} 2\to \frac 21; 3\to \frac 12; 4\to \frac 31;\cancel{\frac 22};5\to \frac 13; 6\to \frac 41; 7\to \frac 32; 8\to \frac 23; 9\frac 14; 10\to \frac 51,\cancel{\frac 42},\cancel{\frac 33},\cancel{\frac 24},11\to \frac 15; 12\to \frac 61; 13\to \frac 52; 14\to \frac 43; 15\to \frac 34;16\to \frac 25; 17\to \frac 16 etc.$

If it not clear what going on: If $\gamma (n) = \frac ab; \gcd(a,b) = 1$ and $a > 1$ then $\gamma(n+1) = \frac {a-1}{b+1}$ assume $\gcd(a-1,b+1) = 1$. If not... just skip it and move to the next one $\frac {a-2}{b+2}$ (assuming $a-2> 0$).

If $\gamma (n) = \frac 1b$ then $\gamma(n+1) =\frac {b+1}1$ and keep going. By induction we can do this for even $n$ and $\gamma$ is a bijection.

Then let $\delta: \mathbb Q \to \mathbb Z$ be a bijection by $\delta(q) =\begin{cases}\gamma^{-1}(q)& q > 0\\0& q= 0\\-\gamma^{-1}(|q|)& q < 0\end{cases}$

And finally $\psi: \mathbb Q \to \mathbb Z \to N$ via $\psi(q) = \chi(\delta(q))$.

There are more clever was to find a function to take the place of $\psi$.

fleablood
  • 124,253
1

Yes, but you should make sure you don't skip any important steps.

If you can prove (or already have results that show that) there is a bijection from $\mathbb{Q} \times \mathbb{Z}$ to $\mathbb{N} \times \mathbb{N}$ (let's call it $f$), and a second bijection from $\mathbb{N} \times \mathbb{N}$ to $\mathbb{N}$ (let's call it $g$), then the function $g \circ f$ will be a bijection from $\mathbb{Q} \times \mathbb{Z}$ to $\mathbb{N}$ and hence will demonstrate that it is countable. (It's also sufficient if $f$ and $g$ are injections, as long as you can prove that there is also a separate injection from $\mathbb{N}$ to $\mathbb{Q} \times \mathbb{Z}$, which should be pretty easy to do.)

I'm guessing that you've already proven that $\mathbb{Q}$ and $\mathbb{Z}$ are countable, so you should be able to create $f$ from that fact.

It's also helpful to see that you can apply this to any countable sets $A$ and $B$, as pointed out in one of the comments.

ConMan
  • 24,300
0

What you can do is find explicit bijections $\psi_\mathbb{Q}$ & $\psi_\mathbb{Z}$ between $\mathbb{N}$, $\mathbb{Q}$ and $\mathbb{N}$, $\mathbb{Z}$, respectively.

Then you can define a map $\psi : \mathbb{N} \times \mathbb{N}\rightarrow \mathbb{Q} \times \mathbb{Z}$ s.t. $(n,m)$ $\mapsto$ $(\psi_\mathbb{Q}(n), \psi_\mathbb{Z}(m))$, $\forall (n,m) \in \mathbb{N}\times\mathbb{N}$.

I think this would work. You can verify that $\psi$ is indeed a bijection. Hope this helps.

  • 1
    This $\psi$ isn't surjective, since there is no $n$ such that $\psi(n) = (\psi_{\mathbb Q}(1), \psi_{\mathbb Z}(2))$. Presumably you were thinking of $\psi: \mathbb N \times \mathbb N \to \mathbb Q \times \mathbb Z$ given by $\psi(n, m) = (\psi_{\mathbb Q}(n), \psi_{\mathbb Z}(m))$. – Izaak van Dongen Mar 09 '21 at 22:37
  • oh yes! Sorry, I made that mistake. I have made the edit now. Thanks. :) – Faqir Chand Mar 10 '21 at 04:38
0

As someone noticed, you only need an injection: indeed, an infinite subset of $\mathbb{N}$ is itself countable! It turns out that your ingredient $\psi: \mathbb{N} \times \mathbb{N} \overset{\simeq}{\to} \mathbb{N}$ is enough to cook up the desired injection.

Let's see the $\psi$ power at work: a fraction can be written in a unique way as $\pm \frac{p}{q}$, where $p,q$ are coprime. We can define an injection $r: \mathbb{Q} \to \mathbb{Z} $ as

$$r(\pm p/q) = \pm \psi(p,q) \in \mathbb{Z}$$

Note that $\mathbb{Z}$ is also countable: just send $+m $ to $2m$ and $-m$ to $2m+1$ for $m\ge 0$. Denote this bijection by $\varphi: \mathbb{Z} \to \mathbb{N}$.

We are left with the final acrobatics:

$$ \mathbb{Q} \times \mathbb{Z} \overset{(r,1)}{\hookrightarrow} \mathbb{Z} \times \mathbb{Z} \overset{(\varphi, \varphi)}{\hookrightarrow} \mathbb{N} \times \mathbb{N} \overset{\psi}{\hookrightarrow} \mathbb{N} $$

Yey! A little remark: we only used that $\psi$ is injective. A simple example of such $\psi$ is $(n,m) \mapsto 2^n 3^m$.