Q.
Let $Q$ be the set of all rational numbers in $[0,1]$ and $f:[0,1] \rightarrow[0,1]$ be defined by
$f(x)=\begin{cases}x & \text { for } x \in Q \\ 1-x & \text { for } x \notin Q\end{cases}$
Then, the set $S=\{x \in[0,21]:(f \circ f)(x)\}$ is equal to
EAMCETEAMCET 2014
Solution: