This is from Problem $8$, Chapter II of Rudin's Real and Complex Analysis.
The problem asks for a Borel set $M \subset \mathbb{R}$ such that for any interval $I \subset \mathbb{R}$, the intersection $M \cap I$ satisfies
$$ 0 < m(M \cap I) < m(I), $$
where $m$ denotes Lebesgue measure.
I was thinking of taking the Cantor set approach: write $\mathbb{R}$ as the union of intervals $[a,b]$ with $a$ and $b$ rational, and for each such $[a,b]$, construct a Cantor-like set inside it. During the construction of each Cantor set, to ensure it has positive measure, we remove smaller and smaller open intervals at each step—namely, the total length removed becomes small and the remaining set is dense near its endpoints.
As a result, these Cantor sets are extremely “dense” near the ends of their respective intervals. If, for a given interval $I$, it intersects such a Cantor set contained in some $[a,b]$ with $b - a \gg m(I)$, we expect that $m(M \cap I)$ may be very close to $m(I)$, and hence we lose control over the upper bound in the inequality above.
Is there any way to fix this approach, or should I consider a different construction altogether?
Thank you.