Show that Mergelyan's theorem cannot extend to the case in which $S^2-K$ has infinitely many components. This is an exercise in W. Rudin's Real and Complex Analysis.  

For $n=1,2,\ldots$, let $D_n=D(\alpha_n;r_n)$ be disjoint open discs in (the unit open disk) $U$ whose union $V$ is dense in $U$, such that $\sum_nr_n<\infty$. Put $K=\bar U-V$. Let $\Gamma$ and $\gamma_n$ be the paths
  $$\Gamma(t)=e^{it},\quad \gamma_n(t)=\alpha_n+r_ne^{it},\quad 0\le t\le2\pi,$$
  and define 
  $$L(f)=\int_\Gamma f(z)\mathrm{d}z-\sum_{n=1}^\infty \int_{\gamma_n}f(z)\mathrm{d}z.\quad(f\in C(K))$$
  Prove that (a) $L$ is a bounded linear functional on $C(K)$; (b) $L(R)=0$ for every rational function $R$ whose poles are outside $K$; (c) there exists an $f\in C(K)$ for which $L(f)\ne0$.  

My first question is: Why does these disks $D_n$ exist? Suppose they do exist. I can prove (a) and (b). But how can I prove part (c)?  
I'm really confused. Should I construct the disks $D_n$ / the function $f$ explicitly or just show the existence?  
Can anyone give some advice? Thanks in advance.
 A: 
Should I construct the disks $D_n$ / the function $f$ explicitly or just show the existence?

Showing the existence of $f$ suffices. But often the easiest way to show existence is giving an explicit example. As for the sequence of disks, I think an explicit construction is way beyond the scope of the exercise (if at all possible), but one can show that such a sequence exists.
Take your favourite countable dense subset of the open unit disk - for example the set of points with rational real and imaginary part - and enumerate it $\{ p_k : k \in \mathbb{N}\setminus \{0\}\}$. Let $K_0 = \varnothing$ and $m_0 = 0$. For every $k \in \mathbb{N}\setminus \{0\}$, if $p_k \in K_{k-1}$, set $K_k = K_{k-1}$ and $m_k = m_{k-1}$. Otherwise choose a radius $0 < r < \frac{1}{2k^2}$ such that $\overline{D(p_k;r)} \subset U\setminus K_{k-1}$ and set $m_k = m_{k-1}+1$, $\alpha_{m_k} = p_k$, $r_{m_k} = r$ and $K_k = K_{k-1} \cup \overline{D(p_k;r)}$.
By construction, each $K_k$ is a compact subset of $U$, so there are $m > k$ with $p_m \notin K_k$, hence you get an infinite sequence of disjoint disks. Since for each $k$ we have $p_k \in K_k$, and hence $p_k \in \overline{D(\alpha_j;r_j)}$ for some $j \leqslant k$, the closure of the union $V$ of the open disks contains a dense subset of $U$, hence $V$ is dense in $U$. The upper bound on the chosen radii forces $\sum r_n < +\infty$.
Having shown the existence of such disks, we note that by the standard estimate we have
$$\biggl\lvert\int_{\lvert z-a \rvert = r} f(z)\,dz\biggr\rvert \leqslant 2\pi r\cdot \lVert f\rVert_\infty$$
and hence
$$\lvert L(f)\rvert \leqslant 2\pi \Biggl(1 + \sum_{n = 1}^\infty r_n\Biggr)\cdot \lVert f\rVert_\infty,$$
so $L$ is continuous.
If $R$ is a rational function whose poles lie outside $K$, then each pole of $R$ lies either outside the closed unit disk or in exactly one of the disks $D_n$. The poles outside the closed unit disk don't contribute to $L(R)$ since neither $\Gamma$ nor any $\gamma_n$ winds around these poles, and for the poles in $D_m$, only $\gamma_m$ and $\Gamma$ wind around these poles, both with winding number $1$, so the integrals cancel for the principal part of $R$ in these poles. The partial fraction decomposition of $R$ thus shows $L(R) = 0$.
For the last part, a simple continuous function whose integral over circles doesn't vanish is the conjugation. We have
$$\int_{\lvert z-a\rvert = r} \overline{z}\,dz = 2\pi ir^2,$$
so
$$L(z \mapsto \overline{z}) = 2\pi i \Biggl(1 - \sum_{n = 1}^\infty r_n^2\Biggr).$$
In the construction above, it is easily seen that $\sum r_n^2 < 1$, so $f(z) = \overline{z}$ works.
If it were possible to choose the radii such that $\sum r_n^2 = 1$(1), then $K$ would be a null set, and by the Hartogs-Rosenthal theorem (thanks to A.G. for pointing it out), every continuous function on $K$ would be a uniform limit of rational functions, so then $L(f) = 0$ for all $f\in C(K)$. But - thanks again to A.G. for digging up the reference - if one has a sequence of disjoint disks in $U$ such that $\sum r_n^2 = 1$, then it follows that $\sum r_n = +\infty$, so under the constraints of the exercise we have $\sum r_n^2 < 1$. A proof of this using approximation theory for holomorphic functions is contained in Mergelyan's 1952 paper(2), and an elementary proof of a generalisation is in Oscar Wesler's 1960 paper.

(1) We have $\sum r_n^2 \leqslant 1$ since $V$ has measure $\pi \sum r_n^2$ as a disjoint union of disks, and since $V \subset U$, that measure is bounded by $\pi$.
(2) S. N. Mergelyan, Uniform approximations to functions of a complex variable, Uspehi Mat. Nauk. vol. 7 (1952) pp. 31-122; Amer. Math. Soc. Transi, no. 101 (1954) p. 21.
