Find an injection from $\mathbb{Z_+}^n \to \mathbb{Z_+}$

228 Views Asked by At

Find an injection from $\mathbb{Z_+}^n \to \mathbb{Z_+}$

This is what I did. Define $f : \mathbb{Z_+}^n \to \mathbb{Z_+}$ such that

$$f\left(((x_i)_{i \in \mathbb{Z_+}}\right) = x_1$$

If I scrapped the notation, it would essentially be the following function $f((x_1, x_2, \ldots)) = x_1$

Would this function define an injection? Furthermore, I'm not sure if I've made correct use of notation?

Is there are better, cleaner way of finding an injective function mapping $\mathbb{Z_+}^n \to \mathbb{Z_+}$?

3

There are 3 best solutions below

2
On BEST ANSWER

Hint: Let $p_1, p_2, \dots, p_n$ be distinct primes and consider $f((x_1,x_2, \dots, x_n)) = p_1^{x_1} p_2^{x_2} \cdots p_n^{x_n}$.

2
On

I think that what you actually want is

$$f((x_1,x_2, \ldots, x_n)) = x_1.$$

This seems to be what you are trying to say, but you need to remember that elements of $\mathbb{Z}_+$ are single elemements, and elements of $\mathbb{Z}_+^n$ are vectors. (It looks like you were treating it like elements of $\mathbb{Z}_+$ were vectors, and elements of $\mathbb{Z}_+^n$ were vectors of vectors.)

0
On

If we consider on $\mathbb{Z}^n$ the lexicographic order that mean $$ x\leq_{\mathbb{Z}^n}y \qquad \iff x_1<y_1 \; \text{ Or } x_1=y_1 \; \rm{ and } \; x_2<y_2 \dots $$ we can see that this will be a total order on $\mathbb{Z}^n$, so if we put $$ f: \mathbb{Z}^n \to \mathbb{Z}\\ $$ Which associate $f(0)=0$ and to each $x$ its position for this order, this map will be injective.