0

I want to prove that the set of all finite sequences of integers is countably infinite. I would also like to "check" the validity of my proof.

First, note that $\mathbb{Z}$ is countable as established in class. Then, note that all finite integer sequences of length $n$ will be contained in the Cartesian product $\mathbb{Z}^n$. Further, we know that $|\mathbb{Z}^n| = \aleph_0$ because \begin{align*} \mathbb{Z}^n &= \underbrace{\mathbb{Z} \times \mathbb{Z} \times \cdots \times \mathbb{Z}}_{n \text{ times}} \\ \implies |\mathbb{Z}^n| &= |\mathbb{Z} \times \mathbb{Z} \times \cdots \times \mathbb{Z}| \\ &= |\mathbb{Z}| \cdot |\mathbb{Z}| \cdots |\mathbb{Z}| \\ &= \aleph_0 \cdot \aleph_0 \cdots \aleph_0 = \aleph_0. \end{align*} Then, the set of all possible finite sequences of integers is $\bigcup_{i = 1}^\infty \mathbb{Z}^n$. Then, consider \begin{align*} \left|\bigcup_{i = 1}^\infty \mathbb{Z}^n\right| &= |\mathbb{Z} \cup \mathbb{Z}^2 \cup \mathbb{Z}^3 \cup \cdots| \\ &= |\mathbb{Z}| + |\mathbb{Z}^2| + |\mathbb{Z}^3| + \cdots \\ &= \aleph_0 + \aleph_0 + \aleph_0 + \cdots = \aleph_0. \end{align*} Therefore, this set is countably infinite.

Is this enough? I feel like my proof is a bit hand-wavy. Also, if I wanted to do this via constructing a bijection, how could I proceed?

morrowmh
  • 3,036
  • 1
    Snarky answer: Several of the $=$ signs in your calculation of the cardinality are in fact isomorphisms (bijections between different sets), and by carefully composing these bijections you will find the overall bijection that you seek. (I don't recommend this, as their are much more straightforward ways to put these sets in one-to-one correspondence.) – Sammy Black Feb 02 '24 at 04:26
  • Any hint that would lead me to the "much more straightforward ways"? I like those ways. – codeing_monkey Feb 02 '24 at 14:43

1 Answers1

0

Assuming that you're content relying on $\aleph_0 + \aleph_0 = \aleph_0$ and $\aleph_0 \cdot \aleph_0 = \aleph_0,$ then yes the proof is fine.

Regarding finding an explicit bijection, you could try the following approach - let $Seq(\mathbb{Z})$ denote the set of finite sequences of integers:

  1. Show that the function $f:Seq(\mathbb{Z}) \to \mathbb{Q}^+$ given by $f(z_1,z_2,...,z_n) = p_1^{z_1}\cdot p_2^{z_2} \cdot ... \cdot p_n^{z_n}$ where $p_i$ is the $i$th prime number is a bijection.

  2. For a bijection $g: \mathbb{Q}^+ \to \mathbb{N},$ see e.g. Produce an explicit bijection between rationals and naturals

xaphi
  • 373