# Simple question about bijection from N to Z

## Main Question or Discussion Point

There is a bijection between the natural numbers (including 0) and the integers (positive, negative, 0). The bijection from N -> Z is n -> k if n = 2k OR n -> -k if n = 2k + 1.

For example, if n = 4, then k = 2 because 2(2) = 4. If n = 3, then k = -1 because 2(1) + 1 = 3.

My problem arises because if n = 1, then k = 0 and if n = 0, then k = 0. If n = 1, then 2(0) +1 = 1. If n = 0, then 2(0) = 0. If this function is inverted, then the element 0 in Z will map to both 0 and 1. That violates the assumption that the function is a bijection.

Of course, this is wrong. It implies that there are more natural numbers than integers, which cannot be since the natural numbers are a proper subset of the integers. The problem is that the 0 I derived from n = 1 should be negative, whereas the 0 from n = 0 should be positive, but these are equivalent in the case of 0. Anyone know how to resolve this?

## Answers and Replies

Related Set Theory, Logic, Probability, Statistics News on Phys.org
Well your mapping simply isn't a bijection. everything in N greater than 0 maps to a unique number in Z, but there's nothing left for 0. it isn't so hard to make room for 0 by modifying the function for either even or odd arguments.

So what you're saying is that the standard textbook presentation of the bijection between N and Z is not quite correct, right?

Are you sure that the natural numbers in your book includes the 0?? Looks like it would be fine if you excluded the zero. n = 1 maps to 0, n = 2 maps to 1, n = 3 maps to -1..and so on.