i am stuck in this problem. i need to find two right-inverse functions of this function:

$h: \Bbb N_0\times \Bbb N \to \Bbb N, (m,n)\mapsto m+n$.

i know that the function h' is a right inverse of a function h if and only if:

$h \circ h' = m+n$.

how can i say this in mathematical way and as for the h function given above? i did this:

$h': \Bbb N->\Bbb N_0\times\Bbb N, m+n\mapsto (m,n)$. $h \circ h' = h(h'(m+n))=m+n$

but now from here, i dont know how to finish the proof and how to show another right-inverse function of h

thanks for help in advance

  • $\begingroup$ For some basic information about writing math at this site see e.g. here, here, here and here. $\endgroup$ Nov 11, 2012 at 11:33
  • 1
    $\begingroup$ Note that just writing $h'(m+n)=(m,n)$ doesn't make it a well-defined function (and that is why you struggle to find another one). Say, what is $h'(5)$? $\endgroup$ Nov 11, 2012 at 11:40

3 Answers 3


As you point out, $h^{-1}$ maps naturals to pairs $(m, n)$. If you think about what $h^{-1}$ is doing, you'll see that you need to find a pair $(m, n)$, $m \in \mathbb{N}_0$, $n \in \mathbb{N}$ such that $m+n$ is the function $h^{-1}$'s input. That is, if $h^{-1}(k) = (m, n)$, then $m + n = k$. An easy approach is to fix some $m$ first, then let $n = k - m$. This will work provided $k > m$. We can then handle the remaning cases separately. This gives $h^{-1}(n) = (0, n)$ as a simple example, since $(0, n) \in \mathbb{N}_0 \times \mathbb{N}$. So that gives one right inverse. Another can be given by, for example,

$$h^{-1}(n) = \begin{cases}(1, n-1), & \mbox{if } n > 1\\(0, 1), & \mbox{if } n = 1\end{cases}$$

Can you devise a suitable function for $m = 2$? For $m = 3$?

  • $\begingroup$ wow, thanks, now i understand. yeah, for $m=2$, $n$ will remain as free choice, so that i can say: $h^-1(2+n)->(2,n)$, right? $\endgroup$
    – doniyor
    Nov 11, 2012 at 11:58
  • $\begingroup$ Yes, but you still need to define it for inputs less than or equal to 2. $\endgroup$ Nov 11, 2012 at 12:04

The notation for $h\circ h'$ as '$m+n$' is not correct mathematically. Though, I think I understand what you were thinking about.

You need the following, $h':\Bbb N\to \Bbb N_0\times\Bbb N$, this maps any natural number to a pair of natural numbers (if I understand it right, the first element of this pair can also be zero). And what is needed, is,

if for an $s\in\Bbb N$, we have $h'(s)=(u,v)$, then $u+v=s$ holds.

  • $\begingroup$ yes, you are right about what i am thinking about. i think, there are more than 2 right-inverse function, right? $\endgroup$
    – doniyor
    Nov 11, 2012 at 11:48
  • $\begingroup$ Well, mike4ty4 already gave you infinitely many right inverses (one for each $m$).. $\endgroup$
    – Berci
    Nov 11, 2012 at 11:52

Just to give a little more clarity. For each $m\in \mathbb{N}$, define $g_{m}:\mathbb{N}\rightarrow \mathbb{N}_{0}\times \mathbb{N}$ as \begin{eqnarray*} g_{m}(n)=\left \{ \begin{array}{cc} (m,n-m)&\text{ if } n\geq m\\ (0,n)&\text{ if } n<m \end{array}\right. \end{eqnarray*}

Then each $g_{m}$ is a right inverse of $h$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.