10
$\begingroup$

I don't know how to evaluate this expression: $A-B\cap C$

Is it true that:

$A-(B\cap C)=(A-B)\cap C$

or, in other words, that the associative property applies to these operations?

  • 0
    Ok, it's not true I just drawn the Venn Diagram. $B$ut the question remains. I which order should I take these operations?2012-12-28

3 Answers 3

11

Given $\;\;A-B\cap C\;\;$ parentheses are needed to disambiguate, since in general, we have that $A-(B\cap C)\ne(A-B)\cap C.$

Exercise: find Sets $A, B, C$ which provide a counterexample to $A-(B\cap C)=(A-B)\cap C$.

Using parentheses is the only option that leaves nothing uncertain, as you can't rely on everyone to be as familiar with "order of set operations" as they are with, operations on numbers; indeed, there is little in the way of priority/precedence in set operations.

See these notes on compound operations on sets:

Sometimes we want to combine more than two sets and more than one operation to create a more compound expression. But in order to do this we have to establish some set of rules so that we know in what order to do each operation. Just like with numbers, we use parentheses if we want an operation to be done first.

  1. Just like with numbers, we always do anything in parentheses first. If there is more than one set of parentheses, we work from the inside out.

  2. Then we do complements.

  3. Union , intersection, and difference operations (set minus) are all equal in the order [of precedence]. So if we have more than one of these at a time, we have to use parentheses to indicate which of these operations should be done first.

For example, the expression $A\cup B - C$ doesn’t make any sense because we don’t know which operation we should do first: should we take the union first, and then the difference, or should we take the difference first and then the union? In order to make this clear, we need to either write $(A \cup B) - C$ or $A \cup (B - C)$.

  • 0
    Does this help at all, Victor? Check your text first, to see if there is some clearly marked designation with respect to operation precedence. Most argue as above, in my post, when it comes to set difference vs. union, vs. intersection, they are equal in precedence*, so if you MUST choose which to do first, proceed from *left to right*, performing the first set operation (say, in your case: $A - B$), and then the next: $(A-B) \cap C$. But in any case, when YOU write answers, and such, make sure to use parentheses so there is no ambiguity for the reader.2012-12-28
4

The expressions are not equal.

Take $A=\{0,1\}$, $B=\varnothing$, $C=\{0\}$.

$A-(B\cap C)=A-\varnothing=A\\(A-B)\cap C=A\cap C=\{0\}$

0

I was also doubtful about this, so I browsed about, and found this PDF with De Morgan's laws: $A\setminus(B\cup C)=(A\setminus B)\cap(A\setminus C)$ $A\setminus(B\cap C)=(A\setminus B)\cup(A\setminus C)$ So, I guess by simply applying them, the problem of order can be cleared…