Assume that $P(z)$, $Q(z)$ are complex polynomials such that $P(S)=Q(S)$, where $S=\{z\colon |z|=1\}$ (equality is understood in the sense of sets, but I do not know the answer even for multisets). Does it follow that there exist polynomial $f(z)$, positive integers $m,n$ and complex number $w\in S$ such that $P(z)=f(z^n)$, $Q(z)=f(wz^m)$?


It is motivated by [this](https://mathoverflow.net/questions/215501/an-equivalent-relation-on-the-space-of-polynomials-in-one-complex-variable) question (and if above claim is true, it actually implies much more than asked therein.) I started a new question with algebraic geometry tag, since it looks reasonable and may pay attention of right people rather than comments to an old post.



Polynomials with the same values set on the unit circle
This is a special case of the main theorem in the paper by
I. N. Baker, J. A. Deddens, and J. L. Ullman,
A theorem on entire functions with applications to Toeplitz operators,
Duke Math. J.
Volume 41, Number 4 (1974), 739-745.


They proved a similar statement for arbitrary entire functions.


