What is an example of a function from the set of non-negative integers (0, 1, 2, 3..) to the set of integers? The function has to be bijective.
2026-04-11 10:50:06.1775904606
Bijection function from non-negative integers to integers
1k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
$$ f(n) = \begin{cases} n/2 & \mbox{even } n \\ -(n+1)/2 & \mbox{odd } n \\ \end{cases} $$ $$ f^{-1}(n) = \begin{cases} 2n & \mbox{if } n \geq 0 \\ -2n-1 & \mbox{if } n < 0 \\ \end{cases}$$ $$ f: \{0,1,2,3,4,5,6,...\} \rightarrow \{0,-1,1,-2,2,-3,3,...\} $$ $$ f^{-1}: \{...,-3,-2,-1,0,1,2,3,...\} \rightarrow \{...,5,3,1,0,2,4,6,...\} $$ The function $f$ is bijective