Upcoming SlideShare
×

# Section3 1

673 views

Published on

1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
673
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
13
0
Likes
1
Embeds 0
No embeds

No notes for slide

### Section3 1

1. 1. Lecture 8 Set June 17 th , 2003
2. 2. Review <ul><li>Survey results. </li></ul><ul><li>Quiz results. </li></ul><ul><li>Answer will be posted on the website. </li></ul><ul><li>Assignment 2 answer will also be posted on the website. </li></ul><ul><li>First midterm is postponed to next monday. </li></ul><ul><li>Last day for dropping with w is Next Friday. </li></ul>
3. 3. Sets in real world <ul><li>Some database language is based on set theory, for example, sql. </li></ul><ul><li>select x </li></ul><ul><li>from A, B </li></ul><ul><li>where A.a=B.a </li></ul>
4. 4. Sets <ul><li>Notation: Membership in a set-- </li></ul><ul><li>Not a membership in a set ? </li></ul><ul><li>Set properties </li></ul><ul><ul><li>No ordering </li></ul></ul><ul><ul><li>Each element is listed once. </li></ul></ul><ul><li>Equal </li></ul><ul><ul><li>A=B means (  x) (x є A  x є B) </li></ul></ul><ul><li>Finite set VS infinite set. </li></ul>
5. 5. Set (cont.) <ul><li>How to describe a set </li></ul><ul><ul><li>List (or partial list ) its element </li></ul></ul><ul><ul><li>Use recursion to describe how to generate the set elements. </li></ul></ul><ul><ul><li>Describe a property P that characterizes the set elements. </li></ul></ul><ul><ul><li>The 3 rd method is the best choice. </li></ul></ul><ul><li>Examples- Practice in P164. </li></ul>
6. 6. Some conventions <ul><li> = set of nonnegative integers, including 0 </li></ul><ul><li>Z = set of all integers </li></ul><ul><li>Q = set of all rational numbers </li></ul><ul><li>R = set of all real numbers </li></ul><ul><li>C = set of all complex numbers </li></ul><ul><li>Ø = empty set (null set) </li></ul>
7. 7. Relationship between sets <ul><li>A is a subset of B </li></ul><ul><li>A is a proper subset of B </li></ul><ul><li>A=B  </li></ul>
8. 8. Power Set <ul><li>Sets of Sets S (power sets, P(S) ), its element is all the subset of S. </li></ul><ul><li>Example, A={1,2,3}, what is the power set of A? </li></ul><ul><li>S has n elements then how many elements P(S) has? </li></ul>
9. 9. Operation <ul><li>Union U: S U T = {x | x S or x T} </li></ul><ul><li>Intersection ^: S ^ T = {x | x S and x T} </li></ul><ul><li>Difference -: S - T = {x | x S and not x T} </li></ul><ul><li>Examples: S={a,b,c,d,e,f} T={b,c,e,g,h,j} S U T = {a,b,c,d,e,f,g,h,I} , S ^ T = {b,c,e} , S - T = {a,d,f} </li></ul>
10. 10. Operation (cont.) <ul><li>Cartesian Product </li></ul>What is the power sets of A in cartesian product ? P(A)=A X A
11. 11. Venn Diagrams <ul><li>Region 1 - Elements in neither S nor T. </li></ul><ul><li>Region 2 - S - T </li></ul><ul><li>Region 3 - S ^ T </li></ul><ul><li>Region 4 - T - S </li></ul><ul><li>Regions 2 & 3 combined - S </li></ul><ul><li>Regions 3 & 4 combined - T </li></ul><ul><li>Regions 2 & 3 & 4 combined - S U T </li></ul><ul><li>Region 1 is not a set or (Region 1 U S U T) would be the universal set which Russell's paradox won't allow. </li></ul>
12. 12. Set Identities <ul><li>Commutative Properties </li></ul><ul><ul><li>A  B = B  A </li></ul></ul><ul><ul><li>A  B = B  A </li></ul></ul><ul><li>Associative Properties </li></ul><ul><ul><li>(A  B)  C = A  (B  C) </li></ul></ul><ul><ul><li>(A  B)  C = A  (B  C) </li></ul></ul><ul><li>Distributive Properties </li></ul><ul><ul><li>A  (B  C) = (A  B)  (A  C) </li></ul></ul><ul><ul><li>A  (B  C) = (A  B)  (A  C) </li></ul></ul><ul><li>Identity Properties </li></ul><ul><ul><li>A  = A </li></ul></ul><ul><ul><li>A  S = A </li></ul></ul><ul><li>Complement Properties </li></ul><ul><ul><li>A  A’ = S </li></ul></ul><ul><ul><li>A  A’ =  </li></ul></ul><ul><li>De Morgan’s Laws </li></ul><ul><ul><li>(A  B)’ = A’  B’ </li></ul></ul><ul><ul><li>(A  B)’ = A’  B’ </li></ul></ul>
13. 13. Countable and Uncountable sets <ul><li>The number of elements in a finite set is the cardinality of the set. </li></ul><ul><li>Denumerable Sets </li></ul><ul><ul><li>Infinite sets in which we’re able to create a list where we can select a first element s 1 , second element s 2 , … until every element of the set will eventually appear in the list. </li></ul></ul><ul><li>Countable Sets </li></ul><ul><ul><li>Sets that either finite or denumerable. (we can count, or enumerate all their elements) </li></ul></ul>
14. 14. Countable and Uncountable sets <ul><li>Uncountable Sets </li></ul><ul><ul><li>Infinite sets that are so big that there is no way to count out the elements and get the whole set in the process. </li></ul></ul><ul><ul><li>To prove denumerability, we need only exhibit a counting scheme. </li></ul></ul>
15. 15. Cantor’s Set Theory <ul><li>We can determined if two infinite sets are the same “size” (equinumerous) by seeking to find a one-to-one match-up between the elements of each set. </li></ul><ul><li>A set is infinite if we can remove some of its elements without reducing its size. </li></ul>
16. 16. Examples <ul><li>Set of positive integers is denumerable. </li></ul><ul><li>Set of all integers Z is denumerable. </li></ul><ul><li>Set of rational numbers is denumerable. </li></ul><ul><li>Set Z X Z is denumerable. </li></ul><ul><li>Practice– Set of positive rational numbers is denumerable. </li></ul>
17. 17. Exercise <ul><li>Exercise 3.1 ---22, 39, 50, 75, 76. </li></ul><ul><li>You do not have to turn it in. But you might see this question patterns in test or quiz. </li></ul>
18. 18. Introduction of counting <ul><li>A customer is ordering a computer. The choice are 17”, 19” or 21”; 1.5G, 1.7G and 2.0 GHz CPU, 20x, 40x, 48x CD drive. </li></ul><ul><li>Q: how many different machine configurations are possible? </li></ul><ul><li>How many different machines can be ordered with 1.7G CPU? </li></ul>