Is set difference commutative and associative?

9.2k Views Asked by At

Given question:

The set difference of two sets $A$ and $B$ is $A \setminus B = \{x \in A \;|\; x \not\in B \}.$

Recall that we would say that set difference is commutative if $A \setminus B = B \setminus A$ for all sets $A$ and $B$, and we would say that set difference is associative if $A \setminus (B \setminus C) = (A \setminus B) \setminus C$ for all sets $A$, $B$, and $C$.

Which of the following is true?

(a) Set difference is neither commutative nor associative.

(b) Set difference is commutative but not associative.

(c) Set difference is associative but not commutative.

(d) Set difference is both commutative and associative.

My actual problem: I understand the commutative and associative properties of sets, but I don't really understand the first sentence of the question.

Can someone please explain this question to me? And can someone guide me through this question? Thank you!

2

There are 2 best solutions below

0
On BEST ANSWER

Hint: $A=\{1\}$, $B=\emptyset$ for commutativity; $A=B=C\ne\emptyset$ for associativity.

0
On

The associativity might be understood with a geometrical counter example. Consider $A$ as the disk in $\mathbb{R}^2$ of finite radius, $B$ the infinite line at $45$ degrees and $C$ the $x$-axis.

$B-C$ is $B-\lbrace 0\rbrace$. $A-(B-C) = (A-B)\cup \lbrace 0 \rbrace$ (the disk $A$ without its diagonal but with the element zero).

$A-B$ is the disk without its diagonal, and $(A-B)-C$ is the disk without its diagonal and the intersection with the $x$ axis.

Thus $A-(B-C)\neq (A-B)-C$.

It will hold only for a certain case described here.