If $K$ is compact and $(f_k)\subseteq C(K)$ is dense, then $x_n\to x$ in $K$ iff $f_k(x_n)\to f_k(x)$ for each $k$ Let $(K,d)$ be a compact metric space and $(f_k)_{k\in\mathbb N}\subseteq C(K)$ be dense (wrt the supremum norm).

Let $(x_n)_{n\in\mathbb N}\subseteq E$ and $x\in E$. How can we show that $d(x_n,x)\xrightarrow{n\to\infty}0$ iff $f_k(x_n)\xrightarrow{n\to\infty}f_k(x)$ for each $k\in\mathbb N$?

The "only if" part is trivial, but how can we show the converse? Moreover, I would like to conclude that if $(a_n)_{n\in\mathbb N}\subseteq(0,\infty)$ with $\sum_{n\in\mathbb N}a_n<\infty$, then $$\rho(x,y):=\sum_{k\in\mathbb N}a_n(|f_k(x)-f_k(y)|\wedge1)\;\;\;\text{for }x,y\in E$$ is a metric on $K$ equivalent to $d$? (And I read that since the identity mapping is uniformly continuous with respect to $d$ and $\rho$, we may assume that $d=\rho$ ... I don't get that.)
 A: Assume that $(x_n)$ does not converg to $x$. Since $K$ is compact then $(x_n)$ has a subsequence say $(a_n)\subseteq(x_n)$ convergent to $a\neq x$. By continuity of any $f_k$ we have $f_k(a_n)\to f_k(a)$. So all we need now is to find $f_k$ such that $f_k(a)\neq f_k(x)$ to obtain a contradiction with uniqueness of the limit (among subsequences).
So assume that $f_k(a)=f_k(x)$ for all $k$. By the Tietze extension theorem there is continuous $g:K\to\mathbb{R}$ such that $g(a)=0$ and $g(x)=1$. The point is that $g(a)\neq g(x)$. And therefore it cannot be a limit of $f_k$ contradicting them being dense.
A: Hints: first show that $f(x_n) \to f(x)$ for all $x$. Then note that $f(y)=\frac {d(y,B(x,2\epsilon)^{c})} {d(y,B(x,2\epsilon)^{c})+ d(y,D(x,\epsilon))}$ defines an element of $C(K)$ where $D(x,r)$ denotes the closed ball with center $x$ and radius $r$. Note that $f$ is continuous, $0 \leq f \leq 1$, $f=1$ on $D(x,\epsilon)$ and $f=0$ on $B(x,2\epsilon)^{c}$. Now it should be easy to conclude (using the fact that $f(x_n) \to f(x)$) that $x_n \in B(x,2\epsilon)$ for $n$ sufficiently large. Hence $x_n \to x$.
To prove that $\rho$ is equivalent to $d$ use that fact that $\sum_{k=N}^{\infty} a_n (|f_k(x)-f_k(y)|\wedge 1) \leq \sum_{k=N}^{\infty} a_n$ can be made small independently of $x$ and $y$ by choosing $N$ large enough. From this you can see that a $\rho(x_n,x) \to 0$ iff $d(x_n,x) \to 0$.
A: For every $0<c<1/2$, let $C$ be the closed ball $\bar B(x,c/2)$ and $D$ the complementary of the open ball $B(x,c)$. Let $f_c$ the continuous function defined on $C\cup D$ such that the restriction of $f_c$ to $C$ is $1$ and its restriction to $D$ is $0$. By Tietze Uryshon you can extend $f_c$ to $g_c$ on $X$.
Since $f_k$ is dense, there exists $k_0>0$ such that $\|f_c-f_k\|<c/4$ for $k>k_0$, $|f_c(x)-f_c(x_n)|<|f_c(x)-f_k(x)|+|f_k(x)-f_k(x_n)|<\|f_c-f_k|+|f_k(x)-f_k(x_n)|$,
There exists $N$ such that $n>N$ implies that $|f_k(x)-f_k(x_n)|<c/4$, this implies that for $n>N,k>k_0$, $|f_c(x)-f_c(x_n)|=|1-f_c(x_n)|<c/4+c/4<c<1$ implies  that $f_c(x_n)\neq 0$ and $x_n\in B(x,c)$.
A: Let me try to write an answer based Kavi Rama Murthy's hints hints:
Once $d(x_n,x)\xrightarrow{n\to\infty}0$ iff $f_k(x_n)\xrightarrow{n\to\infty}f_k(x)$ for each $k\in\mathbb N$ is established, we are able to prove the equivalence between $d$ and $\rho$ in the following way.
If $\rho(x_n,x)\xrightarrow{n\to\infty}0$, then clearly $f_k(x_n)\xrightarrow{n\to\infty}f_k(x)$ for each $k\in\mathbb N$ and hence $d(x_n,x)\xrightarrow{n\to\infty}0$.
For the other direction assume $d(x_n,x)\xrightarrow{n\to\infty}0$ and let $\varepsilon>0$. Since $\sum_{n\in\mathbb N}a_n<\infty$, there is a $K\in\mathbb N$ with $$\sum_{k>K}a_k<\frac\varepsilon2.\tag1$$ By the former result, there is a $N\in\mathbb N$ with $$|f_k(x_n)-f_k(x)|<\frac\varepsilon{2\sum_{k=1}^Ka_k}\;\;\;\text{for all }n\ge N\text{ and }k\in\left\{1,\ldots,k\right\}\tag2$$ and hence $\rho(x_n,x)<\varepsilon.$
