Prove this infinite sequence space is compact. Let space $S=\{1,2,3,...,N\}^{\infty}$, with $\sigma$ in S represented by $\sigma=\sigma_1\sigma_2\sigma_3...$, which is an infinite string and $\sigma_i\in\{1,2,3,...,N\}$.
Define the metric on this space as $d:S\times S\rightarrow[0,\infty)$ by $d(\sigma,\theta)=0$ if $\sigma=\theta$ and $d(\sigma,\theta)=\sup\{2^{-k}:\sigma_k \neq\theta_k\}$ if $\sigma\neq\theta$.
Now I've shown that $(S,d)$ is a complete metric space by using a diagonal argument. However, I don't know how to prove that this space is compact. I've tried to construct a convergent subsequence of an arbitrary sequence by first picking $i\in{1,...,N}$ such that there are infinite number of elements in the given sequence that contains infinite number of i. but I am stuck at this stage and couldn't figure out how to proceed. Any helps? Thanks in advance.
 A: HINT: Prove that the topology generated by $d$ is the product topology on the product of countably infinitely many copies of the discrete space $\{1,2,3,\ldots,N\}$, and appeal to the Tikhonov product theorem.
Added: That’s the slick way, but you can also show that each sequence has a convergent subsequence. Let $\langle\sigma^n:n\in\Bbb N\rangle$ be a sequence in $S$, where $\sigma^n=\langle\sigma_k^n:k\in\Bbb N\rangle$ for each $n\in\Bbb N$. There must be an $s_0\in\{1,\ldots,N\}$ such that $A_0=\{n\in\Bbb N:\sigma_0^n=s_0\}$ is infinite. Then there must be an $s_1\in\{1,\ldots,N\}$ such that $A_1=\{n\in A_0:\sigma_1^n=s_1\}$ is infinite. Continue in this fashion: given the infinite set $A_k\subseteq\Bbb N$, there must be an $s_{k+1}\in\{1,\ldots,N\}$ such that $A_{k+1}=\{n\in A_k:\sigma_{k+1}^n=s_{k+1}\}$ is infinite.
Now let $\sigma=\langle s_k:k\in\Bbb N\rangle\in S$, and choose a strictly increasing sequence $\langle n_k:k\in\Bbb N\rangle$ in $\Bbb N$ such that $n_k\in A_k$ for each $k\in\Bbb N$. Show that $\langle\sigma^{n_k}:k\in\Bbb N\rangle$ converges to $\sigma$.
