# How to apply inclusion - exclusion principle

Let W, X, Y, Z be subsets of {1, 2, . . . , 100} such that W ∩X = ∅, W ∩Y = ∅ and X ∩Y = ∅. Use the inclusion-exclusion principle to write down an expression for |W ∪ X ∪ Y ∪ Z|

Based on the question, I'm puzzled on what Z is as it is not mentioned in the question. How can you write an expression for |W ∪ X ∪ Y ∪ Z| when Z is not given?

• The question you have given only asks for an expression for $\lvert W \cup X \cup Y \cup Z \rvert$, not to actually compute the cardinality. – Mattos May 7 at 11:41
• If you have an expression for $W \cup X \cup Y$ can you find an expression for $W \cup X \cup Y \cup Z$? – Jay May 7 at 11:44
• Just work out $|W\cup X\cup Y\cup Z|$ by means of inclusion/exclusion and the data in your question. – drhab May 7 at 11:45
• It is good to add a Venn diagram. – NoChance May 7 at 12:09

$$Z$$ is mentioned in the question; it is one of the subsets. It doesn’t matter that we have no extra information about it, though, because we are just asked to write an expression for $$|W \cup X \cup Y \cup Z|$$ rather than actually compute its numerical value.

The inclusion-exclusion principle states, in this case, that

$$|W \cup X \cup Y \cup Z| = |W| + |X| + |Y| + |Z| - |W \cap X| - |W \cap Y| - |W \cap Z| - |X \cap Y| - |X \cap Z| - |Y \cap Z| + |W \cap X \cap Y| + |W \cap Y \cap Z| + |X \cap Y \cap Z| + |W \cap Y \cap Z| - |W \cap X \cap Y \cap Z|$$

In this case we know that $$|W \cap X| = |W \cap Y| = |X \cap Y| = 0$$ and so we in fact have

$$|W \cup X \cup Y \cup Z| = |W| + |X| + |Y| + |Z| - |W \cap Z| - |X \cap Z| - |Y \cap Z| + |W \cap X \cap Y| + |W \cap Y \cap Z| + |X \cap Y \cap Z| + |W \cap Y \cap Z| - |W \cap X \cap Y \cap Z|$$

We can remove any of the intersections that contain these intersections to give

$$|W \cup X \cup Y \cup Z| = |W| + |X| + |Y| + |Z| - |W \cap Z| - |X \cap Z| - |Y \cap Z|$$

If there is any more data in your question, you can use then this to make this expression more precise.

• Is it correct to say that if $W \cap Y = 0 \implies W\cap Y \cap Z=0$? – NoChance May 7 at 11:55
• Yes. you are correct. Thank you. (I think you either mean the cardinalities are zero or that zero should be $\emptyset$ though) – 雨が好きな人 May 7 at 12:00

Let $$T=W\cup X\cup Y$$. Then \begin{align*} |W\cup X\cup Y\cup Z|&=|T\cup Z|\\ &=|T|+|Z|-|T\cap Z|\\ &=|W\cup X\cup Y|+|Z|-|(W\cap Z)\cup(X\cap Z)\cup(Y\cap Z)|. \end{align*} The inclusions-exclusion principle is used in going from the first line to the second line. Now, we are given $$W,X$$, and $$Y$$ are mutually disjoint. This also implies that $$W\cap Z$$, $$X\cap Z$$, and $$Y\cap Z$$ are mutually disjoint. And so: \begin{align*} |W\cup X\cup Y|&=|W|+|X|+|Y|\\ |(W\cap Z)\cup(X\cap Z)\cup(Y\cap Z)|&=|W\cap Z|+|X\cap Z|+|Y\cap Z|. \end{align*} Thus, $$|W\cup X\cup Y\cup Z|=|W|+|X|+|Y|+|Z|-|W\cap Z|-|X\cap Z|-|Y\cap Z|.$$