A minor question about the Cantor Set I'm self teaching analysis and the second chapter is about some basic topology.
According to the book "Principles of Mathematical Analysis (3rd)" from Walter Rudin,
the Cantor Set is constructed as follows, from what I know.
Let $E_0$ be the interval $[0,1] \subset \mathbb {R}$.
Dividing this set in three equal parts and removing the inner segment $({1\over{3}},{2\over3})$, let $E_1$ be the union of intervals $[0,{1\over3}]\text{ and }[{2\over3},1]$.
Next we will take the inner segment of each intervals in $E_1$ and so on...
The infinite set $P = \cap_{i=1}^{\infty} E_i $ is called the Cantor Set.
I understand that $E_1 \supset E_2 \supset E_3 ...$ and $E_i$ is the union of $2^i$ intervals each with length $3^{-i}$. 
And I also understood why it will be a perfect set.

However, this is the part that I couldn't quite understand from the book.
intuitively thinking I can see that P doesn't contain any segment $(a,b)$.
The book says, "No segment of the form" $$({3k+1\over 3^m},{3k+2\over 3^m})$$ "where k and m are positive integers, has a point in common with P. Since every segment $(a,b)$ contains a segment of this form, if $$3^{-m} < {b-a \over 6}$$ P contains no segment."

How did it come up with the number 6 ? Is it not enough to find a "large enough value of m" such that $3^{-m} < b-a$ ?  It would be most helpful if someone could explain it with some diagram.  Or if you are confident enough that you can help me out with just words, I am open to that, too.
 A: This is definitely much simpler than what is in Rudin's text:

The Cantor set $P$ contains no segment $(\alpha,\beta)$ with $\alpha < \beta$. 

Proof: By definition, $E_n$ does not contain any segments of length greater than $3^{-n}$. For some $m > 0$, the segment $(\alpha,\beta)$  satisfies $\beta - \alpha > 3^{-m}$ and so $(\alpha,\beta) \not\subset E_m$ and therefore, $(\alpha,\beta) \not\subset \bigcap_{n=1}^{\infty} E_n = P$. $_\Box$
A: I think you could get away with 4 rather than 6. The interval is being split into segments of length $3^{-m}$ (a standard segment, say), but you want to pick out a standard segment where the numerator at each endpoint is not a multiple of three. That is every third standard segment. Any segment of length greater than four standard segments contains three consecutive standard segments, and must therefore contain one of the form required.
Because you are picking out every third standard segment as special, you have to make sure you have included one in your interval, so you need the interval to be long enough (relative to $m$) to make sure you have covered it.
We could use 2 instead if the proof did not specify including the whole standard segment. Any segment of length $(2+\epsilon)3^{-m}$  $(\epsilon \lt 1)$ contains an overlap (or perhaps two) with one of the forbidden segments and one of those overlaps has length at least $\cfrac {\epsilon}{2\times3^m}$. And that is enough to show a contradiction.
So the proof is not quite tight as it could be, but it does work.
A: One important idea here is the proof looses nothing by making $m$ bigger than it needs to be, so even if the statement holds for every $m$ with $3^{-m} < (b-a)$ I can still choose $3^{-m} < \frac{b-a}6$. It might just save the reader a couple of minutes thinking about the borderline case.
As for your suggestion suppose I set
$a = \frac {3k + 1+\epsilon}{3^m}$, $b = \frac{3k + 5 -\varepsilon}6$
then $b-a = \frac{4-2\varepsilon}{3^m} > 3^{-m}$ but $(a,b)$ doesn't contain any interval in the form $\left(\frac {3k + 1}{3^m},\frac {3k + 2}{3^m}\right)$.
Mark Bennet's excellent answer has just popped up suggesting that $3^m < \frac{b-a}4$ is good enough. Which is true, and as this case shows is the smallest $m$ for which the statement holds.
The point about choosing $6$ is that an interval of length $ 6\cdot 3^{-m}$
defiantly contains at least four consecutive intervals in the form $\left(\frac{i}{3^m}, \frac{i+1}{3^m}\right)$, possibly always five but I don't want to have to think too hard about the end points. Then because I can do this for four consecutive $i$ I can choose $i = 3k+1$ for at least one of them.  Maybe I only need three to do this, but I don't care, it's really obvious for four and I've saved myself a scintilla of mental exertion.  On with the proof: with the minimum of intellectual effort expended on my choice of $m$.
