Creating a Lebesgue measurable set with peculiar property. [duplicate]

On an exam I took recently, I was challenged with the following problem but couldn't come up with an answer. I couldn't find the answer by searching the forum either so I hope it hasn't been asked before. Any help on how to answer, and if possible how to think when challenged with this kind of problem, is much appreciated:

Problem Create a Lebesgue measurable set $E\subseteq [0,1]$ such that $0<m(E \cap I)<m(I)$ for all intervals $I=(a,b)$, where $0\leq a<b\leq 1$ and m is the Lebesgue measure.

• Construct a fat Cantor set in $[0,1]$. In each of the "removed intervals", insert fat Cantor sets. In each of the removed intervals of the fat Cantor sets inserted in the second step, insert fat Cantor sets. Continue... Commented Jan 17, 2014 at 10:06
• @DavidMitra While taking care that the union of those "fat Cantor sets" does not have measure one.
– bof
Commented Jan 17, 2014 at 10:15
• You can find a detailed discussion of such sets in this Math StackExchange question from 13 August 2011: Construction of a Borel set with positive but not full measure in each interval. (Identical comment I gave here, if this rings a bell for anyone.) Commented Jan 17, 2014 at 15:03
• @DaveL.Renfro, thanks, that clears it up!
– KOE
Commented Jan 18, 2014 at 7:32

Let $\{I_n:n\lt\omega\}$ be the set of all open intervals $\{q,r\}$ where $q,r$ are rational numbers and $0\le q\lt r\le1$. Recursively construct a sequence of pairwise disjoint fat Cantor sets $A_1,B_1,A_2,B_2,\dots,A_n,B_n,\dots$ with $A_n,B_n\subseteq I_n$. The set $E=\bigcup_{n=1}^\infty A_n$ has the desired properties.
• Thanks @bof, I think I get the idea, also conveyed by David Mitra's comment. However I'm not perfectly clear on the details. Let me check if I got it right: if $n$ indexes the rational intervals and for every $n$, we construct two disjoint fat cantor sets, minus all points already in previously constructed sets, denoted $A_n,B_n$ inside the corresponding interval and then $\cup_n A_n$ has the desired property? I don't get the notation ${I_n:n<\omega}$, but that's what I understood from the text. I just have to convince myself it works.