3
$\begingroup$

I'm having trouble with this question involving surjective functions.

If $h(x)=2x+1$ and $h$ maps from the integers to the integers, does there exist a function $g$ that maps from the integers to the integers so that $(g \circ h)(x)$ is onto?

If this is true, can someone provide an example of such a $g$?

  • 0
    Nothing really. I'm kinda stuck on how to go. I'm assuming the answer is somewhat obvious.2012-08-02

1 Answers 1

4

For example, let $g(n)=\frac{n-1}{2}$ if $n$ is odd, and let $g(n)=n$ (or more spectacularly, $0$) if $n$ is even. If one wants a "formula," one can concoct one using trigonometric functions, but a definition by cases is clearer.

  • 0
    is that second case necessary? If h(x)=2x+1 then its inverse is (x-1)/2. If I apply both of these, i'll get back whatever x I put into h won't I? Also, note that the output of h(x) will always be an odd integer.2012-08-02
  • 1
    The *value* of $g$ at even integers doesn't matter, as the post may have indicated. But if we want $g$ to be **defined** at every integer, as the question asks, we do need to specify what $g$ does, for example, at $8$, or $-20$.2012-08-02
  • 0
    Maybe $g(n)=[(n-1)/2]$ (where $[x]$ is the integer part of $x$) gives a formula without trig functions and without (explicit) cases.2012-08-02