Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Set Theory – Introduction and Notation
Set:
A set is a collection of distinct items.
The items in a set are called members or elements.
The number of elements does not need to be finite (see Set E).
Examples of sets:
A = {1,6,7,11}
B = {3,5,7,9,11,13}
C = {3,5}
D = {red, yellow, green, blue}
E = {integers}
Null Set or Empty Set: A set with no elements is called the null set or the empty set, and is
noted as {} or .
Union: An operator that indicates the set of all members of both sets combined.
Example: A B = {1,3,5,6,7,9,11,13}
Intersection: An operator that indicates the set of elements the sets have in common.
Element of: 1 A, means 1 is an element of set A.
x A means x is not an element of A.
Subset: This notation indicates that a set is a subset of another set. Meaning, every
element of the first is in the second. ( indicates that a set is not a suset of the other).
Examples:
{1,7} A
CB
BB
{} A
Proper Subset: A proper subset is a subset that does not include all elements of the
original set. So B is a subset of B (B B), but B is not a proper subset of B.
Supersets: This is the exact same idea of subsets with the subset listed second.
If C is a subset of B (C B), then B is a superset of C (B C).
Set Builder Notation: Not likely needed for competition…
{ x x > 6 } This is read, the set of all numbers, x, such that x is greater than 6.
Universal Set: At times there will be a universal set of all the elements from which other sets
can be created.
Complement: Those elements in the universal set that are not in the given set.
Example:
U = {1,2,3,4,5,6}
K= {4,5}
K complement = {1,2,3,6}
notation: Kc or K
Properties of Union and Intersection
Union is:
Associative (grouping doesn’t matter) A (B C) = (A B) C
Commutative (order doesn’t matter) A B C = C B A (or any order)
Intersection is:
Associative (grouping doesn’t matter) A (B C) = (A B) C
Commutative (order doesn’t matter) A B C = C B A (or any order)
Distributive Properties:
Union is Distributive over Intersection: A (B C) = (A B) (A C)
Intersection is Distributive over Union: A (B C) = (A B) (A C)
Union and Intersection when taking Complements:
(A B)c = Ac Bc
(A B)c = Ac Bc
Addition and Subtraction with Sets
Addition is just Union: A + B = A B
Subtraction: A – B means take the elements from A B out of A.
A = {1,6,7,11}
B = {3,5,7,9,11,13}
A + B = {1,3,5,6,7,9,11,13}
A – B = {1,6}
Venn Diagrams
Example of a Subset C A
Example of a set and its Complement
Example of an Intersection A B
Example of a Union
Other Examples:
AB
Counting Set Elements - Example
Given a set with 6 elements, how many subsets can be made from this set? H = {A, B, C, D, E, F }
Start Counting:
1
There is one set with 0 elements: {}
6
There are 6 sets with 1 element: {A}, {B}, {C}, {D}, {E}, {F}
15
There are 15 sets with 2 elements: {AB}, {AC}, {AD}, {AE}, {AF}, {BC}, {BD}, …,{EF}
20
There are 20 sets with 3 elements.
15
There are 15 sets with 2 elements.
6
There are 6 sets with 1 element.
1
There is one set with 0 elements.
For a total of 1+6+15+20+15+6+1 = 64 possible sets.
The list all possibilities method of finding all sets would not work in a competition. There are
two good ways to find the number of combinations.
Method 1: Combinations - The number of ways of selecting r objects from a group of n objects
is:
n
n!
r r!(n r)!
n
is read “n choose r”
r
n factorial = n! = n * (n-1) * (n-2)*… * 2 * 1 and 0! = 1
6
20
3
Example: In the list above:
6
6
6
1
6
15
0
1
2
6
15
4
6
6
5
6
6!
720
15
ex:
2 2! 4! 2 24
6
1
6
Method 2: Pascal’s Triangle contains these numbers (called binomial coefficients).
0
Row 1:
0
3 3 3 3
Row 4: , , ,
0 1 2 3
1 1
Row 2: ,
0 1
4 4 4 4 4
Row 5: , , , ,
0 1 2 3 4
2 2 2
Row 3: , ,
0 1 2
Row 6+: Continue patterns