Описание тега symmetric-difference

The symmetric difference of two sets consists of those elements that are present in either set, but not in both.

"Symmetric difference" is a mathematical operation defined upon sets.
The symmetric difference between two sets is defined as the set of those elements that belong to either one of those sets, but not both.

For example, let A = { 1, 2, 3, 4 } and B = { 2, 4, 6, 8 }.

  • Elements in A that are not in B are 1 and 3.
  • Elements that are in B but not in A are 6 and 8.
  • Hence, the symmetric difference is { 1, 3, 6, 8 }.

Symmetric difference can also be defined on more than two sets. In this case, the symmetric difference is defined as the set of elements which are in an odd number of sets.

Wikipedia link: https://en.wikipedia.org/wiki/Symmetric_difference