All the solutions are f:N→N such that f(x)∈{x,x+1}, ∀x∈N. Note that in this case, we have ∥f(x)−x∥∗=0 so they are clearly solutions.
Now we show that these are all the solutions. In fact, if there exists an x∈N such that f(x)∈/{x,x+1}, then we have that ∥f(x)−x∥∗=0. Thus we can find a minimum s∈N such that fs(x)=x. By the minimality of s, we have s∣∥f(x)−x∥∗. Note that we also have that s is the minimum such that fs(f(x))=f(x), showing that s∣∥f(2)(x)−f(x)∥∗. By induction, we then have s∣∥f(i+1)(x)−f(i)(x)∥∗. Let ai=f(i+1)(x)−f(i)(x). Then since f(s)(x)=x, we have that a0+a1+⋯+as−1=0. We also have that ∥a0∥∗+∥a1∥∗+⋯+∥as−1∥∗ is divisible by s. However, by the definition of ∥⋅∥∗, we know that ∥x∥∗=x if x≤0, and ∥x∥∗=x−1 if x≥1. Since ∥a0∥∗=0 by assumption, we know that either a0>1 or a0<0. In the first case, we know that there exists an ai such that ai<0. In the second case, we know that there exists an ai such that ai>0. Thus, in any case, we will have ai<0 and aj>0 for some i,j. Thus, if p is the number of i∈{0,1,…,s−1} such that ai>0, then 0<p<s. As a consequence,
s∣∥a0∥∗+⋯+∥as−1∥∗=a0+a1+⋯+as−1−p=−p,
which is a contradiction. Thus we must have f(x)∈{x,x+1} for all x∈N.