Exercise · ZW-COUNTABLE-SET-006 · ★★☆ Intermediate
Which of these functions is a bijection from \(\mathbb{N}\) onto \(\mathbb{Z}\)?
Choose one option.
Show answer
- A. \(f(n)=(-1)^n\lceil n/2\rceil\)
Exercise · ZW-COUNTABLE-SET-006 · ★★☆ Intermediate
Choose one option.
\(f(n)=(-1)^n\lceil n/2\rceil\) takes the values \(0,-1,1,-2,2,\dots\), covering \(\mathbb{Z}\) without repetition. \(n-1\) never reaches \(-2\), \(n\) never reaches a negative number, and \(n^2\) neither.
A set is countable if it is finite or equipotent to \(\mathbb{N}\), that is, if its elements can be listed in a sequence.