in Algorithms
12 views
0 votes
0 votes
The symmetric difference of sets $\text{A}=\{1,2, 3,4, 5, 6, 7, 8\}$ and $\text{B}= \{1, 3, 5, 6, 7,8,9\}$ is:
  1. $\{1, 3, 5, 6, 7,8\}$
  2. $\{2, 4, 9\}$
  3. $\{2, 4\}$
  4. $\{1, 2, 3, 4, 5, 6, 7, 8, 9\}$
in Algorithms
by
12 views

1 Answer

0 votes
0 votes
$A=\{1, 2, 3, 4, 5, 6, 7, 8\}$ and $B = \{1, 3, 5, 6, 7, 8, 9\}$

A (symmetric difference) B $\implies$ Elements which are in $A$ but not in B $\cup$ Elements which are in $B$ but not in $A$

$\implies$ (A - B) $\cup$ (B - A)

$\implies$ $\{2, 4\} \cup  \{9\} = \{2, 4, 9 \}$

Option B is correct.
by
Answer: