In a asymmetric difference, the difference element come only from the first set.
The asymmetric difference | ||||||
---|---|---|---|---|---|---|
of | 1 | 2 | 3 | 4 | ||
and | 3 | 4 | 5 | 6 | ||
is | 1 | 2 |
Implementation:
The symmetric difference is the union of the two asymmetric difference
The symmetric difference | ||||||
---|---|---|---|---|---|---|
of | 1 | 2 | 3 | 4 | ||
and | 3 | 4 | 5 | 6 | ||
is | 1 | 2 | 5 | 6 |