How do I prove this function is injective and surjective:
$$h(n)=\begin{cases}f((n+1)/2),&\text{ if }n\text{ is odd}\\ g(n/2),&\text{ if }n\text{ is even}\end{cases}$$
How do I prove this function is injective and surjective:
$$h(n)=\begin{cases}f((n+1)/2),&\text{ if }n\text{ is odd}\\ g(n/2),&\text{ if }n\text{ is even}\end{cases}$$