Survey

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Survey

Document related concepts

Transcript

BASIC SET THEORY A set can be thought of as "something that holds things" More specifically, for every "object" in the universe, a set S either contains it or it doesn't. If S contains x we write xS ("x is in S" or "x is a member of S " ), otherwise we write x S. Many sets can be given by listing their elements. We write out a set given like this by putting the list inside curly braces. { JOHN, PAUL, RINGO, GEORGE} Sometimes we just show enough to set the pattern , but this is informal (sometimes even sloppy) notation: {1,2,4,8,…,1024} (an 11-element set) {1,2,4,… } (an infinite set) Many more sets can be given by a rule for determining whether something is a member. NOBODY UNDER 5 FEET TALL PERMITTED ON THE ROLLER COASTER We write out a set given like this by giving a "dummy" element, a colon, and the test such an element has to satisfy: {x: x is at least 5 feet tall} {x: x is divisible by 2} these are the {y: y is divisible by 2} same set! The variables x and y above are known as “dummy variables”; they have no meaning outside the expression. That’s why we can change the name. The question of exactly how a set can be defined is a very deep one. There is no one right answer; it's a "choice of rules of play" like figure skating vs ice dancing or Canadian football vs American football. We can leave this one to the mathematicians. NOTE: An object is either in a set or not in it. Nothing can be "half in" , "in twice", etc. {A,B,C} and {A,A,B,C} are the same set. If set A and set B have the same elements, then by definition they are two names for the SAME SET. If either has an element the other doesn't, they are DIFFERENT SETS. This is called the "extensive property" of sets and it is very important. In particular, the order does not matter. {A,B,C} and {C,B,A} are the same set. A set may have no elements. This is called an empty set. THEOREM: There is only one empty set (or, equivalently, all empty sets are the same.) Proof: if A is an empty set and B is an empty set, then they both have no elements, so they are the same set. So the set of unicorns and the set of Sasquatches are (probably) the same set! We often call this set , pronounced "the empty set" rather than "phi". A set may have one element. To every object x there corresponds a set {x } called the singleton set containing x . THEOREM: {x } = {y } if and only if x = y . Proof: If {x } = {y }, then: Any member of {y } is also a member of {x }. Any member of {x } is equal to x itself. So any member of {y } is equal to x itself. So {y } is the singleton set {x }. The first several weeks of a course in set theory are filled with annoying theorems like this that prove very obvious things: S=S ("reflexivity") if S=T then T=S ("symmetry") if R=S and S=T then R=T ("transitivity") We shall skip most of this! Sets can be finite or infinite. (A rigorous definition of "finite set" will have to wait, but our intuition should be adequate here.) Every finite set has a cardinality or size. This is often written as |S| or #(S). For finite sets this is just the number of elements. THEOREM: Two finite sets have the same size if there is a 1-1 pairing between their elements. Fire Water Earth Air John Paul (order here is Ringo arbitrary!!) George For infinite sets we adopt this as a definition of cardinality. The resulting math is very hard, very interesting, and not part of this course. SUBSETS: A set A is a subset of another set B if every member of A is also a member of B. On a Venn diagram: B We write AB. (If we know that some element(s) of B are NOT in A, we can write AB.) A We can interpret “AB” as saying: “IF x A, THEN x B ”. THEOREM: If AB and BC then AC. If AB and BC then AC. If AB and BC then AC. INTERSECTION The intersection of two sets consists of all the elements that are common to both. AB = {x: xA and xB} The membership rule for the set AB is: The element must satisfy BOTH the rule for membership of A AND the rule for membership of B. EXAMPLES: {1,2,3} {2,3,4,5} = {2,3} {1,3,5,7,9,…} {1,2,3,…,10} = {1,3,5,7,9} {1,2,3} {4,5,6} = {Bill, Mary} {Mary, Jim, Jane} = {Mary} {A,B,C,D,E} {D,N,T,O} = {D} There are lots of obvious, easy, and annoying theorems about intersection. Many of them look a lot like addition or multiplication facts. AA = A A = AB = BA (AB)C = A(BC) These can all be proved by going back to the definition of intersection. We can visualize "intersection" using a Venn diagram: UNION Another widely used set operation is union. The union of two sets consists of all the elements that are in one set, or the other, or both. AB = {x: xA or xB} The membership rule for the set AB is: The element must satisfy EITHER the rule for membership of A OR the rule for membership of B. Remember, even if an element appears in both sets, it appears only once in the union. EXAMPLES: {1,2,3} {2,3,4,5} = {1,2,3,4,5} {1,3,5} {2,4,6} = {1,2,3,4,5,6} {1,2,3} {2} = {1,2,3} {oats, peas,beans} {beans, weiners} =? Unions can be visualized with Venn diagrams. There are lots of easy theorems about unions, too: (AB) C = A(B C) AB = BA A = A AA = A And we also have two distributive laws, so you don’t have to remember which way it goes: (AB)C = (AC) (BC) (AB)C = (AB) (AC) A B A C (fill them in!) B C COMPLEMENTS If we have a well-defined “universe” U , then every set A has a complement A containing everything that is NOT in A. The membership rule for the set A is The element must NOT satisfy the rule for membership of A. Venn diagram: U A A {January, February, March} = {April,May,...,December} {1,3,5,...} = ? (U = natural numbers) {2,4,6,...} Rules for complements A=A U= =U AB=AB AB=AB “De Morgan’s laws” “not (A and B) = (not A) or (not B) “ “not (A or B) = (not A) and (not B)” Don’t drink and drive! Either don’t drink, or don’t drive. DIFFERENCE OF SETS We define the difference of two sets, A-B, to be the set of all elements that are in A and not in B. B does not have to be a subset of A. A-B = A B. EXAMPLES: {a,b,c} – {a,c} = {b} {1,2,3,4,5} - {4,5,6,7} = {1,2,3} THEOREMS: A-A = A- = A A-B A (A-B) B = PRODUCTS The product AxB of two sets is the set of ordered pairs (a,b) with aA, bB. Note that the elements of the product are NOT elements of the original sets! {1,2} x {A,B,C} = {(1,A),(2,A),(1,B),(2,B),(1,C),(2,C)} {Soup, salad} x {meat,fish,chicken} = {(soup,meat),(soup,fish),(soup,chicken), (salad,meat),(salad,fish),(salad,chicken)} (It’s often good to think about products as “meals from a menu” where you can take one choice for each course.) The membership rule for AxB: “This is an ordered pair, AND the first element is in A, AND the second element is in B.” We can think of the elements of the product as arranged in a rectangle: {a,b,c} x {c,d,e} = (a,c) (b,c) (c,c) (a,d) (b,d) (c,d) (a,e) (b,e) (c,e) NOTE: the repeated element can be used twice! If this doesn’t make sense, don’t use a product. Pick a committee of two out of {Ann, Bill, Cathy}. As (Ann,Ann) is not a valid committee, we are not taking a product. [In fact it’s what we call a “combination”.] Pick a committee with one man and one woman out of {Ann, Betty, Cathy},{Paul,Quentin,Rob}. This is a product; we have 3x3 = 9 choices. (Ann,Paul) (Betty,Paul) (Cathy,Paul) (Ann,Quentin) (Betty,Quentin) (Cathy,Quentin) Coordinates (x,y) in the plane consist of one choice of x and one choice of y. Thus the Cartesian plane is RxR, where R is the real numbers. (Ann,Rob) (Betty,Rob) (Cathy,Rob)