Presentation is loading. Please wait.

Presentation is loading. Please wait.

Intro to Set Theory. Sets and Their Elements A set A is a collection of elements. If x is an element of A, we write x  A; if not: x  A. Say: “x is a.

Similar presentations


Presentation on theme: "Intro to Set Theory. Sets and Their Elements A set A is a collection of elements. If x is an element of A, we write x  A; if not: x  A. Say: “x is a."— Presentation transcript:

1 Intro to Set Theory

2 Sets and Their Elements A set A is a collection of elements. If x is an element of A, we write x  A; if not: x  A. Say: “x is a member of A”, or “x is in A”, or “x belongs to A” We use lowercase letters for elements, and capitals for sets. Notation: use set braces “{“,”}” around the elements. For example: A = {0,1,2,3,4} Hence 2  A = {0,1,2,3,4} and 6  A = {0,1,2,3,4} Another way to write it: A = {x | x is an integer between 0 and 4}.

3 Some Sets The set A = {a, b, c, d} has 4 elements. The set A = {2, 4, 6, 8, …, 40} has 20 elements. The ellipsis, “ … ”, is used to mean we fill in the missing elements in the obvious manner or pattern, as there are too many to actually list out on paper. The set of natural numbers: N = {0,1,2,…} The set of integers: Z = {…,–2,–1,0,1,2,…} The set of positive integers: Z + = {1,2,3,…}

4 (Proper) Subsets A set A is a subset of B, if and only if all elements of A are also elements of B: Notation: A  B or B  A. If A is not a subset of B, we write A  B or B  A. If A  B and B contains an element that is not in A, then we say “A is a proper subset of B”: A  B or B  A. For all sets: A  A.

5 Special Sets, Cardinality The sets A and B are equal (A=B) if and only if each element of A is an element of B and vice versa. The empty set, denoted by  or { }, is the set without elements. The universal set, denoted by Ω, is the set of all elements currently under consideration. The size or cardinality of a finite set A, denoted with |A|, is the number of (distinct) elements. Example: |  |=0 |{2,4,8,16}| = 4

6 How to Think of Sets The elements of a set do not have an ordering, hence {a,b,c} = {b,c,a} The elements of a set do not have multitudes, hence {a,a,a} = {a,a} = {a} The size of A is thus the number of different elements

7 Intersection, Union The intersection of two sets A and B, is the set A  B of elements x such that both x  A and x  B. Notation: A  B = { x | x  A and x  B} The union of two sets A and B, is the set A  B of elements x such that x  A or x  B. Notation: A  B = { x | x  A or x  B} Sets A and B are (mutually) disjoint if A  B= 

8 Complements The complement of a set A, denoted with Ā (or A' or A c ), are the elements that are not elements of A. Therefore, A  Ā = 

9 Set Manipulations

10 Venn Diagrams Venn diagrams are used to depict the unions, subsets, complements, intersections etc. of sets: A _A_A B _B_B ABAB C

11 Set Difference A – B The set difference “A minus B” is the set of elements that are in A, with those that are in B subtracted out. Another way of putting it is, it is the set of elements that are in A, and not in B. _ Therefore, A – B = A  B

12 Examples

13 Propositional Logic, Logical Operators Logical operators include: conjunction (and), disjunction (or), negation (not), and conditional (implies, if-then). The Common Logical Operators –Conjunction (and): The conjunction of propositions p and q is the compound proposition “p and q”. We denote it with p ^ q. This means p and q together. It is true if p and q are both true and false otherwise. –For instance the compound proposition “2+2=4 (p) and Sunday is the first day of the week (q)” is true, but “3+3=7 (p) and the freezing point of water is 32 degrees (q)” is false.

14 Logical Operators –Disjunction (or): of propositions p and q is the compound proposition “p or q”. We denote it with p v q. It is true if p is true or q is true or both. –For instance the compound proposition “2+2=4 (p) or Sunday is the first day of the week (q)” is true, and “3+3=7 (p) or the freezing point of water is 32 degrees (q)” is also true.

15 Logical Operators –Negation (not): The negation of a proposition p is “not p”. We denote it with ~p (or ¬p). It is true if p is false and vice versa. –Sometimes there are several ways of expressing a negation in English. For instance if p is the proposition “2<5”, then reasonable statements of ~p are “it is not the case that 2<5” and “2 is not less than 5”.

16 Logical Operators –An implication is a compound proposition of the form “if p then q” or “p implies q”. We denote it with p  q. –In English this phrase carries several meanings. Sometimes it means that p causes q as in “if you eat too much you will gain weight.” Sometimes it means that p guarantees q and vice versa as in “if you write a book report, I will give you five points extra credit” (tacitly assuring you that if you do not write it, I certainly will not give you extra credit). Sometimes it takes a very weak sense, simply asserting that the truth of p guarantees the truth of q as in “if you resign the chess game, you will lose” (but of course if you play on in a bad position, you will probably lose anyway — continued play does not guarantee winning).

17 Sets and Logic Logic and set theory go very well together. The previous definitions can be re-written as follows: x  A if and only if  (x  A) A  B if and only if (x  A  x  B) is True x  (A  B) if and only if (x  A  x  B) x  (A  B) if and only if (x  A  x  B) x  A–B if and only if (x  A  x  B) x  Ā if and only if  (x  A)


Download ppt "Intro to Set Theory. Sets and Their Elements A set A is a collection of elements. If x is an element of A, we write x  A; if not: x  A. Say: “x is a."

Similar presentations


Ads by Google