Thread: Suitable function H(H(x))=H(x)

1. Suitable function H(H(x))=H(x)

Hi just a question from the book I'm a bit puzzled with, probably fairly basic but I am very tired and can't make any sense of it :/

Find a suitable function $H$ such that $H(H(x))=H(x)$, and $H(1)=36, H(2)=\frac{\pi}{3}, H(13)=47, H(36)=36, H(\frac{\pi}{3})=\frac{\pi}{3}, H(47)=47$

Hint: Don't try to solve for $H(H(x))=H(x)$, the further conditions are to guide you to a suitable $H$

I understand how they go together as in:

$H(H(1))=H(1)$
$H(H(2))=H(2)$
$H(H(13)=H(13)$

But I'm not sure of the form the function $H$ will take??

Thank you!

2. The important values of $x$ are the ones where $H(x) = x$. For such an $x$, if $y$ is such that $H(y) = x$ then clearly $H(H(y)) = H(y)$. Think along the lines of partitioning the reals.