Discrete Math - Finding a specific function composition

209 Views Asked by At

I have been given this task: Find an example of $2$ functions. $g,f: \mathbb N \to\mathbb N$

such that for every $x$ that belongs to $\mathbb N$ this happens: $g(f(x)) = x + 2016$. We also know that $g$ is not onto and is not $1-1$ and that $f$ is not onto.

I'm having problems understanding how I'd describe $g$ in particular. I tried looking for examples but I can't find any. Would you help?

Thanks

1

There are 1 best solutions below

1
On BEST ANSWER

If $f(x) = x+2016$, then it is not onto the natural numbers (there is, for instance, no $n$ for which $f(n) = 15$). If $$ g(x) = \cases{1 & if $x\leq 2000$\\x & otherwise} $$ then it's neither one-to-one nor onto (we have $g(10) = g(158)$, which disproves one-to-one, and no $n$ such that $g(n) = 1793$, which disproves onto).

However, $g(f(x)) = x+2016$ because $f(x) >2000$ for all $x$, so $g$ doesn't do anything to it.

Note that since $g(f(x))$ is a one-to-one function, $f$ must be one-to-one. If we have $a, b$ such that $f(a) = f(b)$, then $g(f(a)) = g(f(b))$, which means $a+2016 = b+2016$, which implies $a = b$.

Similarily, if we wanted the composition to be some onto function instead of $x+2016$, we would have to have $g$ onto.