An injective function that is neither ascending nor descending

116 Views Asked by At

Can anyone please come up with an example of an injective function that is neither ascending nor descending on the interval $[1,3]$?

2

There are 2 best solutions below

0
On BEST ANSWER

Define $f(x)=x$ if $x \in [1,2]$ and $f(x)=-x$ if $x \in (2,3]$ .

0
On

Bit string expansions are a rich source of counterexamples of this sort. Let $x=n.b_1b_2\dots$ be the ternary (base-3) expansion of $x$ (not ending in an infinite sequence of $2$s), and define $f(x)=n.\bar b_1\bar b_2\dots$ where $\bar 0=0$, $\bar 1=2$, and $\bar 2=1$. Then $f$ is injective, and it is neither increasing or decreasing on any open interval, because every open interval contains $[n.b_1\dots b_k0,n.b_1\dots b_k2]$ for some $n,b_1,\dots,b_k$, and then $$n.\bar b_1\dots \bar b_k0<n.\bar b_1\dots \bar b_k2>n.\bar b_1\dots \bar b_k1$$ $$f(n.b_1\dots b_k0)<f(n.b_1\dots b_k1)>f(n.b_1\dots b_k2).$$

Thus $f$ is neither increasing or decreasing on this interval.