An Algebra on Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing Spring, 2018 Alice E. Fischer... 1/37
An Algebra on 1 Definitions and Notation Venn Diagrams 2 An Algebra on 3 Alice E. Fischer... 2/37
An Algebra on Definitions and Notation Venn Diagrams Definitions and Notation Venn Diagrams Alice E. Fischer... 3/37
An Algebra on Definitions and Notation Venn Diagrams are basic to this course and to much of modern mathematics. A set is a collection of discrete objects. A set can be empty. It can contain one object or many objects. It might be finite or infinite. The objects in a set are called its elements. The objects in a particular set all come from some collection such as Students, or Polygons, or Integers. That collection is called the universe of the set. Letters (upper case) are used to name sets. Alice E. Fischer... 4/37
Notation for An Algebra on Definitions and Notation Venn Diagrams In the next several slides, integers are the universe of interest. There are three ways to denote a set: Some sets have standard names. Z is the set of all integers. Sometimes, we define a set by listing its elements individually. A = {2, 3, 5, 7} A is the set of one-digit primes. Sometimes we define a set by describing it: B = {x Z x > 1} B is the set of all x contained in Z such that x > 1. More simply, A is the set of all integers > 1. Alice E. Fischer... 5/37
An Algebra on Notation for Subsets or Supersets Definitions and Notation Venn Diagrams These examples refer to the sets defined on the previous slide. A B A is a subset of B because every element of A is also an element of B. A B Actually, A is a proper subset of B because there are elements of B that are NOT in A. B A B is a NOT a subset of A because there are elements of B that are NOT in A. We can also talk about supersets: B A, B A, and A B Alice E. Fischer... 6/37
The Empty Set An Algebra on Definitions and Notation Venn Diagrams The empty set is called. By definition, every set, that is, is a proper subset of every set. Alice E. Fischer... 7/37
The Universal Set An Algebra on Definitions and Notation Venn Diagrams Any time a mathematician uses sets, the elements of those sets are some particular kind of object: books or people or numbers or anything else. If we are talking about sets of books, then Books is the domain of concern. The universal set is the set of all objects in the current domain of concern. The universal set is called U. U is a superset of every set. Alice E. Fischer... 8/37
Venn Diagrams An Algebra on Definitions and Notation Venn Diagrams Venn diagrams are often used to represent sets and relationships among sets. Circles are used to represent sets. The area inside the circle represents all of the elements of the set. A dot inside the circle represents a particular element. If two circles overlap, the overlapping area represents elements that are in both sets. If B is a subset of A, then B s circle is entirely within A s circle Alice E. Fischer... 9/37
An Algebra on Relationships Between two Definitions and Notation Venn Diagrams Disjoint Subset A B B A A B A=B Overlapping Same Alice E. Fischer... 10/37
An Algebra on Definitions and Notation Venn Diagrams Example: Reals, Rationals, and Integers Z Q R The integers (Z) are a subset of the rational numbers (Q) and the rationals are a subset of the reals (R). U = All numbers R Q Z Alice E. Fischer... 11/37
An Algebra on Practice: Venn Diagrams Definitions and Notation Venn Diagrams 1. Diagram the Universal set, a set named M, and a proper subset of M named P. 2. Suppose A = {1, 2, 3}. Define D = any superset of A. 3. Diagram the sets A = {1,2,3}, B = {1,2,4,8}, U, and Z. Show the elements of sets A and B, above, as points in the diagram. 4. Define two small, non-empty, disjoint sets named F and G. Choose any elements you want for these sets. Then diagram them and the Universal set. Show all the set elements in your diagram. Alice E. Fischer... 12/37
An Algebra on The Algebra of Set Identities Rules for set calculations are given in the following slides. These are analogs of the laws for algebra. They are easily proved using Venn diagrams. Alice E. Fischer... 13/37
The Algebra of. An Algebra on The algebra of sets defines the properties and laws of sets, the set operations or, and, and complement, and the relations of set equality and set inclusion. It provides systematic procedures for evaluating expressions and performing calculations involving these operations and relations. Alice E. Fischer... 14/37
An Algebra on Set algebra is analogous to the algebra of numbers. Addition + is associative and commutative, so is (union). Multiplication is associative and commutative, so is (intersection). The relation is reflexive, antisymmetric and transitive, and so is the relation. Alice E. Fischer... 15/37
Set Algebra An Algebra on Set algebra is based on: The operations (union), (intersection), (set difference), and complement. The relations (contained in), (subset), and (proper subset). A list of algebraic identities that can be easily proved from the definitions using Venn diagrams. Two special sets that have been given names: The empty set is The universal set is U. Alice E. Fischer... 16/37
Complement An Algebra on The complement of a set B (B c ) is a set containing all elements of the universe that are not in B. In this diagram, B c is gray. B Universe Alice E. Fischer... 17/37
Union An Algebra on The union of two sets is a set containing all elements of both. Below, A B (the union of A and B) is the areas colored pink, lavender, and blue, but not the area colored gray. Universe A B Theorem For all sets A and B, A (A B) and B (A B) Proof by the diagram: All points in A and in B are in the union (the non-gray area). Alice E. Fischer... 18/37
Intersection An Algebra on The intersection of two sets contains only the elements that occur in both. In the diagram, the intersection, A B is the purple area. Universe A B Theorem For all sets A and B, A B A and A B B Proof by the diagram: All points in the intersection (purple) are in both A and B. Alice E. Fischer... 19/37
Difference An Algebra on The difference of two sets is a set containing all the remaining elements of the first, after all elements of the second set have been removed. In the diagram, A B is just the pink area B A is just the blue area. Universe A B Alice E. Fischer... 20/37
An Algebra on The Transitive Property of Subsets C B For all sets A, B, and C: if A B and B C then A C A Use the Venn diagram to prove this relationship. Alice E. Fischer... 21/37
1. Commutative Laws An Algebra on Both intersection and union are commutative. That is, the left and right sides can be reversed without changing the meaning of the expression. A B B A A B B A U A U U A B B Alice E. Fischer... 22/37
2. Associative Laws An Algebra on Both intersection and union are associative. That is, if the same operator occurs twice in a row in an expression, you may parenthesize the expression either way without changing its meaning. (P Q) R P (Q R) (P Q) R P (Q R) U U U P P I I R I R Q Q Q Alice E. Fischer... 23/37
3. Distributive Laws An Algebra on Either intersection or union can be distributed over the other. P (Q R) (P Q) (P R) P (Q R) (P Q) (P R) P P * R R Q Q P P P * R R Q Q Alice E. Fischer... 24/37
An Algebra on 4. Identity, 5. Complement, and 6. Double Complement These laws are based on the definitions of complement,,. Remember: is the empty set and U is the universal set. 4. Set identity. 5. Set complement. 6. Set double-complement. A A A U A A A c U A A c (A c ) c A Alice E. Fischer... 25/37
7. Idempotent Law An Algebra on Intuition: able to produce the same thing repeatedly. A binary operation is idempotent if, whenever it is applied to two equal sets, it gives that same set as the result. Law: intersection and union are idempotent, meaning that the trivial computations have no effect and can be repeated without changing the meaning of the expression. A A A A A A Alice E. Fischer... 26/37
An Algebra on 8. Universal Bounds Law Intuition: The universal set is as large as you can get. Law: The universal set is the result of any with U. A U U Intuition: The empty set is as small as you can get. Law: The empty set is the result of any with. A Alice E. Fischer... 27/37
An Algebra on 9a. DeMorgan s Law for When you distribute complement over, the changes to. (A B) c A c B c Proof by diagram: By definition, A B is the pink and purple and blue areas taken together. Let V = A B. Then V c is the gray area. A c = the combo of gray and blue areas. B c = the combo of gray and pink areas. A c B c is only the gray area. A c B c V c (A B) c. U A B Alice E. Fischer... 28/37
An Algebra on 9b. DeMorgan s Law for When you distribute complement over, the changes to. (A B) c A c B c The proof is left for the student. It is analogous to the proof on the prior slide. Alice E. Fischer... 29/37
An Algebra on 10. Absorption Laws and 11. Complements of U and Absorption Laws: For all sets A and B, A (A B) A A (A B) A U A B The complement of the Universe is empty, and vice versa. U c c U Alice E. Fischer... 30/37
An Algebra on 12. Set Difference Law. Theorem For all sets A and B, A B A B c Proof by diagram: A B is the pink area, by definition. B c is everything in the universe except the elements of B. B c is the area that is gray or pink. B c excludes the purple and blue parts. A B c is the pink part excluding the lavender part. A B c is the same as A B. U A B Alice E. Fischer... 31/37
An Algebra on Practice: Using the Laws of Set Theory For each exercise, give the answer and the name of the laws or definitions that are used to answer the question. 5. If A B and B C, What can you say about A and C? 6. Assume A B C. What can you say about A and C? 7. Let A = {1, 2, 3, 4} and B = {1, 2}. Then A (A B) =? 8. Let Z be the universal set and let E = {even numbers}. List five elements of E c. 9. Use a diagram argument to prove A (A B) A. You will need 3 diagrams. Alice E. Fischer... 32/37
An Algebra on Alice E. Fischer... 33/37
An Algebra on 1 A set is a collection of discrete objects drawn from a specified universe. 2 are a basic concept on which much of modern math and databases are based. 3 A finite set can be literally listed, by writing its elements enclosed in curly braces. 4 A set can be denoted by giving a way to compute the set. 5 A set can be denoted by a name. Alice E. Fischer... 34/37
Set Notation An Algebra on subset set union proper subset set intersection is an element of set difference universal set U complement of a set A c the empty set Alice E. Fischer... 35/37
Laws of Set Algebra -1 An Algebra on 1. Commutative Laws A B B A A B B A 2. Associative Laws (P Q) R P (Q R) (P Q) R P (Q R) 3. Distributive Laws P (Q R) (P Q) (P R) P (Q R) (P Q) (P R) 4. Identity Laws A A A U A 5. Complement Laws A A c U A A c 6. Double Complement Law (A c ) c A Alice E. Fischer... 36/37
Laws of Set Algebra -2 An Algebra on 7. Idempotent Laws A A A A A A 8. Universal Bounds A A U U 9. DeMorgan s Laws (A B) c A c B c (A B) c A c B c 10. Absorption Laws A (A B) A A (A B) A 11. Complement Laws U c c U 12. Set Difference Law A B A B c Alice E. Fischer... 37/37