1

Let $\mathbb{P}_{ 2}(\mathbb{N})=\{A\subset \mathbb{N}:|A|= 2\}$, is there any explicit injective function $f:\mathbb{P}_{2}(\mathbb{N})\longrightarrow \mathbb{N}$, such that $f$ is a polynomial in two variables?

I have tried with $f(\{x,y\})= xy+y+x$, however this function is not injective:

$f(\{x,y\})=x+y+xy=f(\{0,x+y+xy\})$

Asaf Karagila
  • 405,794
  • 1
    It is not quite clear what you intend to do about the ambiguity that ${x,y}={y,x}$. If you want to allow both representations, then one is essentially forced to have a symmetric polynomial in $x,y$ (lest the map be ill defined). If you are allowed to cater for only one representation, then see my answer. – Marc van Leeuwen Aug 02 '22 at 20:28
  • See also this more clearly formulated question. Try to avoid asking the same question in two forms, unless you can make it clear that you are asking for different things each time. Also you could link between the two questions so people can easily navigate between them,which is what this comment tries to achieve. – Marc van Leeuwen Aug 03 '22 at 04:29

3 Answers3

5

The problem seems to be discussed in the beginning of this post:

Is There An Injective Cubic Polynomial $\mathbb Z^2 \rightarrow \mathbb Z$?

In particular, the function:

$f(x,y) = (x+y)^2 + y$

Is given as an example, along with some discussion of the same problem over integers.

conor
  • 61
2

If you are allowed to assume that $\{x,y\}$ is represented with $x<y$, then $\{x,y\}\mapsto x+\frac{y(y-1)}2$ is a bijection $\def\N{{\Bbb N}}\binom{\Bbb N}2\to\N$, where $\binom\N2$ is the set you denote as $\Bbb P_2(\Bbb N)$. This can be extended to $\{x_1,\ldots,x_n\}\mapsto\sum_{k=1}^n\binom{x_k}k$ which similarly gives a bijection $\binom\N n\to\N$ called the combinatorial number system.

2

The function

$$f(x, y) = (x + y)^3 + xy$$

is symmetric and injective on $\mathbb P_2(\mathbb N)$, because from $(x + y)^3 ≤ f(x, y) < (x + y + 1)^3$ we see that one can uniquely recover $x + y = \lfloor \sqrt[3]{f(x, y)}\rfloor$ and $xy = f(x, y) - \lfloor \sqrt[3]{f(x,y)}\rfloor^3$.