In Rudin's PMA, is exercise 2.29 correct as written? In exercise of 2.29 of Rudin's PMA, we are asked:
"Prove that every open subset of $\mathbb{R}$  is the union of an at most countable collection of open disjoint segments"
In definition 2.17, Rudin defines the segment $(a, b)$ to the set of all real numbers $x$ such that $a < x < b$.
Question: How can $\mathbb{R}$ itself be a union of at most countable collection of open disjoint segments? It seems to me that is impossible according to this definition of segment.
 A: From Walter Rudin's Principles of Mathematical Analysis (third edition, 1976):
Pages 11-12:

1.23 Definition The extended real number system consists of the real field $R$ and two symbols, $+\infty$ and $-\infty$. [...]

Page 31:

2.17 Definition By the segment $(a, b)$ we mean the set of all real numbers $x$ such that $a < x < b$.
By the interval $[a, b]$ we mean the set of all real numbers $x$ such that $a \leq x \leq b$. [...]

It is clear enough, I think, although not made explicit, that in this definition $a$ may be $-\infty$ and $b$ may be $+\infty$.
Page 33:

2.21 Examples Let us consider the following subsets of $R^2$:
  $$
\begin{array}{cc}
[\ldots] \\
(g) & \text{The segment } (a, b).
\end{array}
$$ Let us note that (d), (e), (g) can be regarded also as subsets of $R^1$. Some properties of these sets are tabulated below:
  $$
\begin{array}{ccccc}
{}  &  Closed   & Open &  Perfect  &  Bounded   \\
[\ldots] \\
(g) & \text{No} &  {}  & \text{No} & \text{Yes}
\end{array}
$$

Here it is undeniable, although again not explicit, that $a, b$ must both be real numbers, i.e. they cannot be $\pm\infty$.
So Rudin is at least a little inconsistent in his use of the term segment.
Because of this very inconsistency, it would be an overstatement to say that Exercise 2.29 is false as it stands. That would be to insist upon one of two possible interpretations of segment. The exercise is merely ambiguous; and common sense must be used to resolve the ambiguity.  Almost all indications are that "segments" may be unbounded. One of these indications, of course, is that it is the only interpretation that makes the exercise true.
For what it's worth, it seems most likely to me that 2.21 (g) was an isolated oversight, but I haven't checked the whole book to see if Rudin uses segment consistently everywhere else!
A: Please have a look at line no. 12, 13, 14 of page 12 in Rudin’s PMA.
With thsese lines in mind, we can allow $a$ and $b$ to take values $+\infty, -\infty$ (unless it’s mentioned that $a$ and $b$ are finite).
A: In Rudin's book, "closed sets" are defined as sets which contain all their limit points. "Open sets" are defined as sets all of whose points are interior points. So, in the metric space $\mathbb R$, $\mathbb R$ itself is both a closed and open set. It contains all its limits points, since any such limit points must be in the metric space, $\mathbb R$ itself. That it is an open set is clear. Either he allows $a,b$ to be extended real numbers, or otherwise I think it is also possible that when Rudin says "open" subset, he means "open and not closed" subset. This would resolve your issue.
