Let $K\subset \Bbb{C}$ be a compact subset of the complex plane, and let $C(K)$ be the space of all complex continuous functions on $K$.
We say that $f\in C(K)$ is a generator of $C(K)$ when the set $\{p(f) \mid p\ \style{font-family:inherit;}{\text{is a polynomial}}\}$ is dense in $C(K)$.
If $K$ is any set consisting of finite points, it is easy to check that $C(K)$ has a generator.
If $K=[0,1]$, then we know that $f(x)=x$ is a generator of $C[0,1]$ by Stone-Weierstrass theorem. It follows that $C(\gamma)$ has a generator whenever $\gamma$ is a not a closed simple curve.
Now if $K=S^1$, the unit circle on the plane, then it has been proved that $C(K)$ does not have a generator. It follows that $C(\gamma)$ does not have a generator for any $\gamma$ that is a simple connected curve.
If $K=\overline{\mathbb{D}}$, the unit disk, then by using invariance of domain, a similar method as in the case $K=S^1$ can be given to prove that $C(\overline{\Bbb{D}})$ does NOT have a generator. Similarly, It can be proved that $C(K)$ does NOT have a generator if $K$ has an interior point in $\Bbb{C}$.
How to solve this problem if $K$ does not have an interior point?