Set - Difference

Venn Diagram


difference is an operation between two sets.



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


  • loop over setA
  • does setB has element of setA
  • if yes, return the element


The symmetric difference is the union of the two asymmetric difference

  • asymmetric diff SetA to SetB
  • asymmetric diff SetB to SetA
The symmetric difference
of 1 2 3 4
and 3 4 5 6
is 1 2 5 6

Discover More
Javascript - Set

The Set interface represents a set data type and works only with primitive type as there is no way to define an object equality function. object Jsdoc Declaration Add/Delete Size Contains...
Relational Algebra Between Sql And Query Plan
Relational Operator - Set-Difference (Except/Minus)

in Relational Operator set-difference is a relational operator that takes all Tuples in the relation 1, but not in relation 2 It's also known as: except, or minus It returns all tuples (row)...
Venn Diagram
Set Theory - Operator (Operations)

operator in Set Theory that applies to set structure (set, bag) A data operator produce another set. All relational algebra operator are set-operator. A relationship operator produce...

Share this page:
Follow us:
Task Runner