Finding the difference between a set and a union of sets?

I'm having trouble figuring out how to compute the difference of a set and union/intersection of sets. For example:

$$[0,1] \setminus \bigcap_{i = 3}^\infty \left[\frac{1}{n+1}, 1-\frac{1}{n+1}\right]$$

For this, I get $$[0,1] \setminus \left[\frac{1}{4}, \frac{3}{4}\right]$$. From here, logic dictates that the answer would just simply be $$[0,1]$$ because the elements of B don't exist at all in A, but that can't possibly be correct, right? It would have to be $$\left[0,\frac{1}{4}) \cup (\frac{3}{4},1\right]$$?

Similarly,

$$\bigcap_{i \in ℕ} \left([0,1] \setminus \left[\frac{1}{n+1}, 1-\frac{1}{n+1}\right]\right)$$

confuses me.

Thank you.

• For the first formula, you're right. For the second, consider independently the intersection of the left intervals and and the intersection of the right intervals. Mar 1 '19 at 22:58

I think you might be confused by notation $$[a, b]$$. Remember that $$[a, b] = \{x\in \mathbb{R} : a\leq x \leq b\}$$.

Your first answer is good up to $$[0,1] \setminus \left[\frac{1}{4}, \frac{3}{4}\right]$$. In this case we wouldn't have $$[0,1] \setminus \left[\frac{1}{4}, \frac{3}{4}\right] = [0, 1]$$ since $$\left[\frac{1}{4}, \frac{3}{4}\right]$$ is in $$[0, 1]$$ ($$\frac{1}{4}>0$$ and $$\frac{1}{4}<1$$, $$\frac{3}{4}>0$$ and $$\frac{3}{4}<1$$ means $$[\frac{1}{4}, \frac{3}{4}]$$ is contained in $$[0,1]$$).

It helps to imagine $$[0,1]$$ and $$\left[\frac{1}{4}, \frac{3}{4}\right]$$ on the number line: the parts contained in $$[0,1] \setminus \left[\frac{1}{4}, \frac{3}{4}\right]$$ are the parts of $$[0, 1]$$ that don't overlap with $$\left[\frac{1}{4}, \frac{3}{4}\right]$$

The actual answer is $$[0,1] \setminus \left[\frac{1}{4}, \frac{3}{4}\right] = [0, \frac{1}{4}) \cup (\frac{3}{4}, 1]$$

For $$\bigcap_{n\in \mathbb{N}}[0,1]\setminus [\frac{1}{n+1}, 1 - \frac{1}{n+1}]$$ we have the following:

\begin{align} \bigcap_{n\in \mathbb{N}}[0,1]\setminus [\frac{1}{n+1}, 1 - \frac{1}{n+1}] &= \bigcap_{n\in \mathbb{N}}[0, \frac{1}{n+1}) \cup (1 - \frac{1}{n+1}, 1] \\ &= \{0, 1\} \end{align}

• Okay, good. I was thinking the "right" way then in doing the number line method. I was second-guessing myself since online calculators assumed it was just doing set difference, which is where the $[0,1]$ was coming from. On the second, I'm still confused as to what happened in the intermediary step. Did you "swap" the segments? On a number line, $[\frac{1}{n+1}, 1-\frac{1}{n+1] quickly "puckers". Is that why? Mar 1 '19 at 23:36 • First I took the set difference between$[0, 1]$and$[\frac{1}{n+1}, 1- \frac{1}{n+1}]$to get$[0,1]\setminus [\frac{1}{n+1}, 1 - \frac{1}{n+1}] = [0, \frac{1}{n+1}) \cup (1 - \frac{1}{n+1}, 1]$. Then you take the intersection of all$[0, \frac{1}{n+1}) \cup (1 - \frac{1}{n+1}, 1]$to get$\{0, 1\}$. To see that$\{0, 1\}$is the right answer, note that$[0, \frac{1}{n+1}) \cup (1 - \frac{1}{n+1}, 1]$gets closer to$\{0, 1\}$as$n\$ gets larger, so if you drew some line segments for n = 1 through n = 10, you can see that the overlapping portions will eventually only contain 0 and 1.
– user648059
Mar 1 '19 at 23:41

Let $$A_n$$ denote the interval $$A_n:=\left[\frac{1}{n+1}, 1-\frac{1}{n+1}\right]$$, then $$A_n \subset A_{n+1}$$ for all $$n \in \mathbb N$$. Therefore, $$\bigcap_{n = 3}^\infty A_n = A_3 \text{ and therefore } [0,1] \setminus \bigcap_{n=3}^\infty A_n = [0,1] \setminus A_3$$

For the other set, from $$A_n \subset A_{n+1}$$ it follows that $$[0,1] \setminus A_{n+1} \subset [0,1] \setminus A_n$$, so the intersections get smaller when $$n$$ increases: $$\bigcap_{n = 1}^m \left([0,1] \setminus A_n \right) = [0,1] \setminus A_m$$ As $$A_n$$ can get arbitrary close to $$]0, 1[$$ (for any $$\epsilon > 0$$ we can find an $$m \in \mathbb N$$ such that $$\frac{1}{n+1} < \epsilon$$ for all $$n>m$$) but never will reach $$[0,1]$$, we have $$\bigcap_{n \in \mathbb N} \left([0,1] \setminus A_n \right) = [0,1] \,\setminus \,]0,1[ = \{0, 1\}$$