Sparse-shift bijection between nonnegative and positive integers

ID: sparse-shift-bijection-between-nonnegative-and-positive-integers

Take , the nonnegative integers, and , the positive integers. Choose the injections
Here is an inclusion map, while reaches only the positive even integers. In particular, is not a bijection: it misses every positive odd integer. Simply using the inverse function of on its image misses input zero.
The remedy is to follow the alternating injections starting at the missing input zero:
The subscripts distinguish an input in from an output in , even when their numerical values agree. The resulting subset of is . Its sequence of members satisfies and , giving by mathematical induction. Define the function
Figure 1.
A bijection moves only the sequence
. The upper row alternates the original injections and . Solid blue arrows are the chosen bijection on ; dashed gray arrows only continue the chain. Below, examples outside use and keep their numerical values. Every displayed number belongs to the explicitly constructed example. Details.
The image covers all the positive members of exactly once. The other inputs cover exactly once by staying fixed. These output sets are disjoint and their union is , proving that is a bijection. In particular, , , , while and .
For completeness, its inverse function is
The familiar bijection also works, but this example shows something more specific: the two chosen injections can repair the missing zero by moving only a sparse sequence of inputs. The repair never has to shift the entire set.

New to topics? Read the docs here!