The Mathematics Driving License for Computer Science- CS10410 Venn Diagram, Union, Intersection, Difference, Complement, Disjoint, Subset and Power Set Nitin Naik Department of Computer Science
Venn-Euler Diagram Venn-Euler diagram or simply Venn diagram is a graphical representation of sets and relation between sets.
Venn-Euler Diagram.. In the Venn diagram, Universal set is represented by a rectangle, other sets are represented by the circles inside the rectangle. The relation between sets is represented by the way the circles are placed inside the rectangle.
Sets Representation in Venn Diagram
Sets Representation in Venn Diagram.. Let us consider a very simple example to represent sets in Venn Diagram: A = { 1, 2 } B = { 2, 3 } U = { 1, 2, 3, 4 }
Set Union (A B) The union of two sets is the set of all elements which are in either set. The union of sets A and B is the set of all elements of A together with the elements of B. (The A B is the set of all x such that x belongs to A or x belongs to B.)
Set Union.. In the previous example: A = { 1, 2 } B = { 2, 3 }
Union of Multiple Sets We can also find the union of multiple sets:
Set Intersection (A B) The intersection of two sets is the set of all elements which are in both set. The intersection of sets A and B is the set of all elements of A which are also the elements of B. (The A B is the set of all x such that x belongs to A and x belongs to B.)
Set Intersection.. In the previous example: A = { 1, 2 } B = { 2, 3 } Sometimes there will be no intersection at all. In that case we say the answer is the empty set or the null set.
Intersection of Multiple Sets We can also find the intersection of multiple sets:
Set Difference (A B or A B ) We can extend the concept of subtraction, used in the algebra, to the sets. If a set B is subtracted from set A, the resulting difference set consists of elements, which are exclusive to set A. (The A B or A B is the set of all x such that x belongs to A and x does not belong to B.)
Set Difference.. In the previous example: A = { 1, 2 } B = { 2, 3 }
Set Difference.. Similarly we can find B A or B A : (The B A or B A is the set of all x such that x belongs to B and x does not belong to A.)
Set Difference.. In the previous example: A = { 1, 2 } B = { 2, 3 }
Complement of a Set (Ā) Sometimes we want to talk about elements which lie OUTSIDE of a given set and within another set. The set of all those elements which are not contained in a given set is called complement set. The complement of set A is the set of all elements of the universe which are not in A.
Complement of a Set (Ā).. Symbolically it is represented as Ā or à or NOT A. (Ā is the set of all x such that x does not belong to A.) It can also be represented as :
Complement of a Set.. In the previous example: A = { 1, 2 }
Complement of a Set ( ) Similarly we can find the complement of set B which is the set of all elements of the universe which are not in B. (NOT B ( ) is the set of all x such that x does not belong to B.) It can also be represented as :
Complement of a Set.. In the previous example: B = { 2, 3 }
Complement of a Union Set A B Similarly we can find the complement of set A B which is the set of all elements of the universe which are not in A B. ( is the set of all x such that x does not belong to A B.) It can also be represented as:
Complement of a Set A B.. In the previous example: A = { 1, 2 } B = { 2, 3 }
Complement of a Set A B Similarly we can find the complement of set A B which is the set of all elements of the universe which are not in A B. ( is the set of all x such that x does not belong to A B.) It can also be represented as:
Complement of a Set A B.. In the previous example: A = { 1, 2 } B = { 2, 3 }
Disjoint Set Two sets are said to be disjoint if they have no element in common. It means their members do not overlap or their intersection is empty set. If the two sets A and B are disjoint sets then Example: Let us consider a new example to represent all sets U, A, and B: Set U = { 1, 2, 3, 4, 5 } Set A = { 1, 2 } Set B = { 3, 4 }
Disjoint Set.. Now the two sets A and B are the disjoint sets because no element is common between these two sets and they are represented as: Another example is:
Subset (B A or B A) Set B is a subset of set A if and only if every element of set B is also the element of set A. Symbolically it is represented by B A or B A. Example: Let us consider a new example to represent all sets U, A, and B: Set U = { 1, 2, 3, 4, 5 } Set A = { 1, 2, 3, 4 } Set B = { 3, 4 } Then B A
Subset.. Here set B is a subset of Set A because all the elements of set B {3, 4} are the elements of set A { 1, 2, 3, 4 }.
Subset.. Any set A has two default subsets: Empty Set ( A) and Set itself (A A). Every set is also a subset of its Universal Set U like A U. If the set A = { 1, 2, 3, 4 } then all possible subsets of set A are: {}, {1}, {2}, {3}, {4}, {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 3, 4}
Superset (A B or A B) The set A is a superset of set B if and only if every element of B is also an element of A. Symbolically it is represented by A B or A B. In this condition set A is a superset of set B (or set B is a subset of set A). Set U = { 1, 2, 3, 4, 5 } Set A = { 1, 2, 3, 4 } Set B = { 3, 4 } Then A B
Proper Subset (B A) A proper subset is a subset which is not the same as the original set itself. It means a proper subset contains some but not all elements of original set. The empty set is therefore a proper subset of any nonempty set. The set B is a proper subset of set A if B is a subset of A and at least one element of A is not in B. Proper subset is represented by the symbol.
It is represented as: Proper Subset.. In the previous example: Set A = { 1, 2, 3, 4 } Set B = { 3, 4 } Then B A (B is a proper subset of A) Set B is a proper subset of Set A because all the elements of set B {3, 4} are the elements of set A { 1, 2, 3, 4 } and set B is smaller than set A.
Improper Subset / Equality of Sets (B A or A B) An improper subset is a subset which is the same as the original set itself. It means an improper subset contains every element of the original set. In this case it is termed an improper subset because they are equal. The set B is an improper subset of A or vice versa if set A and set B are exactly same. Improper subset is represented by the symbol (is a proper subset or is equal to).
Improper Subset / Equality of Sets.. It is represented as:
Improper Subset / Equality of Sets.. Let us consider a new example to represent all sets U, A, and B: Set U = { 1, 2, 3, 4, 5 } Set A= {1, 2, 3, 4} Set B= {1, 2, 3, 4} Then B A or A B Then set B is an improper subset of set A and vice versa. This is also called the equality of sets.
Power set The power set of any set is the set containing all possible subsets of given set including the empty subset and set itself. If the original set has n members, then the Power Set will have 2 n members. The power set of set A includes all possible subsets of A and empty set and represented by symbol P(A).
Power set.. For example if the set A = { 1, 2, 3, 4 } Then power set (all possible subsets of set A including empty set) of set A is: P(A) = { {}, {1}, {2}, {3}, {4}, {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 3, 4} } How many sets in this Power set P(A): Thus power set P(A) has 16 subsets as mentioned above.
Cartesian Product / Product Set/ Cross Product (A B) Cartesian product of two non-empty sets, A and B, is the set of all ordered pairs (a, b) that can be constructed from two sets, A and B, such that a belongs to A and b belongs to B. The Cartesian product of a non-empty set with an empty set is equal to empty set.
Cartesian Product (A B).. Example-1: If set A= {1, 2, 3} and set B= {cat, dog} Then Cartesian product A B of these two sets A and B is:
Cartesian Product (B A).. Similarly, we can find Cartesian product B A which is different from Cartesian product A B : Example-2: In previous example the Cartesian product B A of two sets B and A is:
Cartesian Product (A A).. Similarly, we can find the Cartesian product of the set A itself A A is: Example-3: In previous example the Cartesian product A A of two sets A and A is:
Cartesian Product (B B).. Similarly, we can find the Cartesian product of the set B itself B B is: Example-4: In previous example the Cartesian product B B of two sets B and B is:
Cartesian Product of Multiple Sets We can also find the Cartesian Product of multiple sets like sets A, B and C: If you change the order then the result will be changed.
Disjoint Union of Sets (A B or A + B) The disjoint union A B or A + B of two sets A and B is a binary operator ( or +) that combines all distinct elements of a pair of given sets, while retaining the original set membership as a distinguishing characteristic of the union set.
Disjoint Union of Sets.. Let us consider an example: Set A= {1, 2, 3} and tag(a) = t A Set B= {2, 3, 4} and tag(b) = t B Now finding the value of A * and B * by getting Cartesian product of sets A and B and their corresponding tag values t A and t B.
Disjoint Union of Sets.. Finally, obtain the disjoint union A B or A + B of sets A and B as:
References http://www.onlinemathlearning.com/finite-sets.html http://plato.stanford.edu/entries/settheory/primer.html http://www.mathreference.com/set-card,cable.html http://planetmath.org/encyclopedia/uncountableset.h tml http://www.mathematicsgre.com/viewtopic.php?f=1& t=185 http://www.sccs.swarthmore.edu/users/08/ajb/tmve/ wiki100k/docs/uncountable_set.html
Thank You