Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Introduction (Pengenalan) n About the Lecturer: –Nama lengkap: Heru Suhartanto, Ph.D –Kantor: Ruang 1214, Gedung A, Fakultas Ilmu Komputer UI, Depok.

Similar presentations


Presentation on theme: "1 Introduction (Pengenalan) n About the Lecturer: –Nama lengkap: Heru Suhartanto, Ph.D –Kantor: Ruang 1214, Gedung A, Fakultas Ilmu Komputer UI, Depok."— Presentation transcript:

1

2 1 Introduction (Pengenalan) n About the Lecturer: –Nama lengkap: Heru Suhartanto, Ph.D –Kantor: Ruang 1214, Gedung A, Fakultas Ilmu Komputer UI, Depok –E-mail: heru@cs.ui.ac.id –Pendidikan formal: –Sarjana Matematika UI, 1986 –Master of Science, Computer Science, University of Toronto, Canada, 1990. –Philosiphy Doctor (Ph.D), Parallel Computing, University of Queensland, Australia, 1998. n Other lecturers –Achmad Nizar Hidayanto –Ade Azurat –Kasiyah M. Yunus –Dina Cahyati –Siti Aminah n Materi Matrikulasi Matematika – pengenalan (lihat Outline), sebagian diberikan dalam text bahasa Inggris. n Materi: http://telaga.cs.ui.ac.id/WebKuliah/Matrikulasi/math/

3 2 Lecture 1 Set Theory Reading: Chp 5 Susanna S. Epp, Discrete Mathematics with Application 2-nd Ed, Brooks/Cole, 1995

4 3 1. Sets 1.1 (Definition: Set) A SET is an unordered collection of unique elements. Notation: It is written as: {x 1,…,x n } where n  0 and x 1,…,x n are the elements of the set.

5 4 1. Sets 1.2 Examples of sets –{ 1, 24, 32 } –{apple, car, pencil} –{ , ,,  } –{ 1, apple, } –{{ 1,2 }, apple, { {  },{ , 3 }}} –{} is a set with no elements. It is known as the empty set and is also denoted as ‘  ’

6 5 1. Sets 1.3 Remarks a.Ordering does not matter. {1,2,3} = {1,3,2} = {2,1,3} b.Repetitions are ignored. {1,1,2,3} = {1,2,3} c.Elements in the set need not be of the ‘same type’. {1, apple,  } is a set

7 6 1. Sets 1.3 Remarks (cont’d) d.A set can contain other sets as elements {{1,2}, apple, {{  },{ ,3}}} is a set with 3 elements: {1,2} apple {{  },{ ,3}} e.A set can be finite or infinite.

8 7 1. Sets 1.4 Predefined Sets –The set of Natural numbers N = {0, 1, 2, 3,…} –The set of Integers Z = {…,-2,-1,0,1,2,…} –The set of Rational numbers Q = { a/b | a  Z  b  Z  b  0} –The set of Real numbers: R Real numbers comprise all rational (eg. 1/2 ) and all irrational numbers (eg.  2 ). (Note: There are numbers which are not real numbers, these are not covered in this course).

9 8 1. Sets 1.4 Predefined Sets (cont’d) –The superscript ‘+’ to Z, Q or R indicates positive numbers (> 0) –The superscript ‘–’ to Z, Q or R indicates negative numbers (< 0) –The superscript ‘nonneg’ to Z, Q or R indicates positive numbers including 0. –Therefore, given that Z = {…,-2,-1,0,1,2,…}, Z + = {1,2,3,…} Z - = {-1,-2,-3,…} Z nonneg = {0,1,2,3,…}

10 9 1. Sets 1.5 Defining a Set –A set may be defined directly by listing every element: S = {2, 4, 6, 8, 10} –Or it may be defined indirectly by defining it in terms of other sets: S = {x | x  Z, 1  x  10} S = {x  Z | 1  x  10} Note: Read the symbol ‘|’ as ‘such that’ –In general, S = {element | element  Another set, list of conditions} S = {element  Another set | list of conditions}

11 10 2. Visualization tool: Venn Diagram A Venn Diagram is used to visualize relationships between sets. 1.Draw Sets as Circles. –Spatial relationship between circles is used to depict set relationships 2.Draw Elements as Dots.

12 11 Outline n Sets –Defn & Notation –Examples –Remarks –Predefined Sets –Defining a set n Venn Diagrams n Predicates –Membership (  ) –Subset (  ) –Equality (  ) –Proper Subset (  ) n Functors –Union (  ) –Intersection (  ) –Difference (  ) –Complement ( c ) n Proofs n Special sets –Empty Set –Universal Set –Proofs n Set Equivalences n More operations on sets –Power Set –Cartesian product –Disjoint Unions

13 12 3. Predicates:  3.1 Definition: Set Membership (  ) –If x is an element of a set A, we write x  Ax  A We say “ x is in A ”, “ x is a member of A ”, or “ x is an element of A ” –If x is NOT an element of a set A, we write x  Ax  A which is actually an abbreviation of (x  A)(x  A) A 21 1  A, 2  A Venn Diagram:

14 13 3. Predicates:  3.1.1 Examples of ‘  ’: 1  {1, 2, 3} 1  {{1,2}, {4}, 5} {1}  {{1,2}, {4}, 5} {1,2}  {{1,2}, {4}, 5} {1,2}  {1, 2, 3, 4, 5}

15 14 3. Predicates:  3.2 Definition: Subset (  ). Given 2 sets A and B, A  B iff  x, x  A  x  B A A  B B

16 15 3. Predicates:  n Examples 3.2 Definition: Subset (  ). Given 2 sets A and B, A  B iff  x, x  A  x  B {1,2}  {{1,2}} {1,2} not  {1,{2}} {1,2}  {1,2,3} {1,2}  Z {}  {1,2} Is 2  {1,2,3} ? Is {2}  {1,2,3} ? Is {2}  {2,{2}} ? Is 2  {1,2,3} ? Is {2}  {1,2,3} ? Is {2}  {2,{2}} ? Note the difference between ‘  ’ and ‘  ’. No. Yes. No. Yes.

17 16 3. Predicates:  3.3 Definition: Set Equality (  ). Given 2 sets A, B, A  B iff A  B  B  A

18 17 3. Predicates:  3.4 Definition: Proper Subset (  ). Given 2 sets A and B, A  B iff A  B  A  B A A  B B

19 18 3. Predicates:  3.4 Definition: Proper Subset (  ). Given 2 sets A and B, A  B iff A  B  A  B n Example: –{1,2}  {1,2} –{1,2}  {1,2,3} –Z +  Z –Z  Q –Q  R

20 19 Outline n Sets –Defn & Notation –Examples –Remarks –Predefined Sets –Defining a set n Venn Diagrams n Predicates –Membership (  ) –Subset (  ) –Equality (  ) –Proper Subset (  ) n Functors (Operation) –Union (  ) –Intersection (  ) –Difference (  ) –Complement ( c ) n Proofs n Special sets –Empty Set –Universal Set –Proofs n Set Equivalences n More operations on sets –Power Set –Cartesian product –Disjoint Unions

21 20 4. Operations (Functors) on sets n If A and B are sets, then (a)A  B (set union) (b)A  B(set intersection) (c)A  B(set difference) (d)A c (set complement) are sets that obey the following axiomatic definitions: –  x, x  (A  B) iff x  A  x  B –  x, x  (A  B) iff x  A  x  B –  x, x  (A  B) iff x  A  x  B –  x, x  A c iff x  A Daffy-nitions Don’t leave home without them!!!

22 21 4. Operations (Functors) on sets A B A  B BA A  B BA A  B A Ac Ac

23 22 5. Proofs 5.2 Prove that A  (B  C)  (A  B)  (A  C) Proof: Assume e  A  (B  C)  e  A  e  (B  C)  e  A  (e  B  e  C) A  (B  C)  (A  B)  (A  C)    (e  A  e  B)  (e  A  e  C)  (e  A  B)  (e  A  C)  e  (A  B)  (A  C)   (A  B)  (A  C)  A  (B  C) Therefore A  (B  C)  (A  B)  (A  C)

24 23 5. Proofs 5.3 Prove that (A  B) c  A c  B c Proof: Assume e  (A  B) c  e  (A  B) (A  B) c  A c  B c    ~(e  (A  B))  ~(e  A  e  B)  e  A  e  B   A c  B c  (A  B) c Therefore (A  B) c  A c  B c  e  A c  e  B c  e  A c  B c  

25 24 5. Proofs 5.4 Prove that if A  B then A  B  B Proof:  e  A  e  B Case 1: e  A  e  B ( Since A  B ) Case 2: e  B  e  A  e  B Assume e  A  B Therefore, if A  B then A  B  B  e  B Assume e  B  e  A  B

26 25 Outline n Sets –Defn & Notation –Examples –Remarks –Predefined Sets –Defining a set n Venn Diagrams n Predicates –Membership (  ) –Subset (  ) –Equality (  ) –Proper Subset (  ) n Functors –Union (  ) –Intersection (  ) –Difference (  ) –Complement ( c ) n Proofs n Special sets –Empty Set –Universal Set –Proofs n Set Equivalences n More operations on sets –Power Set –Cartesian product –Disjoint Unions

27 26 6.1 The Empty Set Definition: The Empty Set (  ) –{} is a set with NO elements. –It is known as the empty set and is also denoted as  –It obeys the following axiom:  x, x  {} or, worded in another way: (  x, x  A)  A = {} n Misconceptions About the Empty Set: –{} is an empty set –{{}} is NOT an empty set. {{}} has one element: {} Always look at the outer brackets –{{},{{}}} is NOT an empty set.

28 27 6.2 The Universal Set n Definition: The Universal Set (U) –U is a set with ALL elements. –It is known as the universal set –It obeys the following axiom:  x, x  U or, worded in another way: (  x, x  A)  A = U

29 28 6.3 Proofs involving  and U 6.3.1 Theorem: For any set A,   A.

30 29 6.3 Proofs involving  and U 6.3.2 Show that there is only one empty set. n Q: How do we express the idea of ‘only one’? A: Express it indirectly: ‘there cannot be two’  x,  y, If P(x) and P(y), then x = y Proof: if  1 and  2 be 2 empty sets, then  1  2. –Let  1 and  2 be 2 empty sets. –By previous theorem,  1  2 (Since the empty set  1 must be the subset of any set) –Also by previous theorem,  2  1 (Since the empty set  2 must be the subset of any set) –Therefore  1  2, (by definition of set equality).

31 30 6.3 Proofs involving  and U 6.3.3 Show that A    A (Identity Law) Proof: Assume e  A    e  A  e   e  ( since axiom of empty set:  x, x   )  e  A Assume e  A  e  A  e   e  A   Note that you can’t go backwards. As long as there is one reason used in the forward direction which is not an IFF reason, the way back is broken.

32 31 6.3 Proofs involving  and U 6.3.4 Show that A     (Universal Bound Law) Proof: e  A    e  A  e   BUT e   (Since  x, x   ) We just need to show that A   has no elements. Remember the axiom: (  x, x  ???)  ??? = {}  e   (By contradiction): Assume A   has some element e. Contradiction! Therefore e  A  . Therefore A   has no elements.

33 32 6.3 Proofs involving  and U 6.3.5 Show that A  A c  U (Complementation Law) Proof: e  U  e  A  e  A  e  A  e  A c  e  A  A c   

34 33 7. Set Equivalences n Set Equivalences are very similar to Logical Equivalences –Intersection similar to  –Union similar to  –Complement similar to ~ –Universal set similar to T –Empty set (  ) similar to  n List of identities in p247 and p260 of textbook

35 34 Outline n Sets –Defn & Notation –Examples –Remarks –Predefined Sets –Defining a set n Venn Diagrams n Predicates –Membership (  ) –Subset (  ) –Equality (  ) –Proper Subset (  ) n Functors –Union (  ) –Intersection (  ) –Difference (  ) –Complement ( c ) n Proofs n Special sets –Empty Set –Universal Set –Proofs n Set Equivalences n More operations on sets –Power Set –Cartesian product –Disjoint Unions

36 35 8 Power Set 8.1 Definition (Power Set): –Given a set A, the power set of A, denoted as P(A) is the set of all subsets of A. –It obeys the following axiom:  S, (S  A)  (S  P(A)) n Examples: –A = {1,2}, P(A) = {{},{1},{2},{1,2}} –A = {1,2,3}, P(A)={{},{1},{2},{3},{1,2},{1,3},{2,3},{1,2,3}} –A = {{1},{{2}}} P(A)={{},{{1}},{{{2}}},{{1},{{2}}}}

37 36 8 Power Set, exercises 8.2 Show that for all sets: if A  B, then P(A)  P(B)

38 37 8 Power Set n Theorem: If A has n elements, then P(A) has 2 n elements. n Proof in recommended text (p264,p265)

39 38 9 Ordered n-tuple 9.1 Definition: (Ordered n-tuple) Let n be a positive integer and x 1,…,x n be (not necessarily unique) elements. An ordered n-tuple is a collection of n objects denoted as: (x 1,…,x n ) with x 1 as the first element, x 2 as the second element…x n as the nth element. n NOTE: Ordering of elements is important!

40 39 9 Ordered n-tuple 9.2 Examples: –(1,4,2,5,2) is an ordered 5-tuple –(4,3,3,4) is an ordered 4-tuple –(1,3,1) is an ordered 3-tuple, also known as an ordered triplet. –(5,3) is an ordered 2-tuple, also known as an ordered pair. –(3) is an ordered 1-tuple, also known as an singleton.

41 40 9 Ordered tuples 9.3 Definition (Equality of ordered tuples) (x 1,…,x n ) = (y 1,…,y m ) iff n=m and x 1 = y 1 and x 2 =y 2 and … and x n =y n 9.4 Examples: –(1,a)  (1,a,c) –(1,a,c)  (1,c,a) –(1,a,c)  (1,a,c) –(2,4,3)  (1+1,2 2,5-2)

42 41 10. Cartesian Product 10.1 Definition (Cartesian Product) –Given 2 Sets A and B, the cartesian product of A and B is denoted as A x B. –It obeys the following axiom: (x,y)  A  B iff x  A  y  B –We can also write: A  B = { (x,y) | x  A  y  B} n Examples: –{1,2} x {2,3} = {(1,2),(1,3),(2,2),(2,3)}

43 42 10. Cartesian Product 10.1 Definition (Cartesian Product) –Given 2 Sets A and B, the cartesian product of A and B is denoted as A x B. –It obeys the following axiom: (x,y)  A  B iff x  A  y  B –We can also write: A  B = { (x,y) | x  A  y  B} n Examples: –{1,2,3} x {a,b} = {(1,a),(2,a),(3,a), (1,b),(2,b),(3,b)}

44 43 10. Cartesian Product 10.1 Definition (Cartesian Product) –Given 2 Sets A and B, the cartesian product of A and B is denoted as A x B. –It obeys the following axiom: (x,y)  A  B iff x  A  y  B –We can also write: A  B = { (x,y) | x  A  y  B} n Examples: –{{1},2,{3,4}} x {a,b} = { ({1},a), (2,a), ({3,4},a), ({1},b), (2,b), ({3,4},b)}

45 44 10. Cartesian Product 10.1 Definition (Cartesian Product) –Given 2 Sets A and B, the cartesian product of A and B is denoted as A x B. –It obeys the following axiom: (x,y)  A  B iff x  A  y  B –We can also write: A  B = { (x,y) | x  A  y  B} n Q: {1,2} x {} = ? n A: {}

46 45 10. Cartesian Product 10.2 Definition (Generalised definition of cartesian product): Given sets A 1,…,A n, A 1  A 2  …  A n is the set of all ordered n-tuples (x 1,…,x n ) where x 1  A 1  x 2  A 2  …  x n  A n n Examples: {1,2} x {2,3} x {a,b} = {(1,2,a), (1,2,b), (1,3,a), (1,3,b), (2,2,a), (2,2,b), (2,3,a), (2,3,b)}

47 46 10. Cartesian Product (Proofs) 10.3 Show that A x (B  C)  (A x B)  (A x C) Proof: Assume (m,n)  A x (B  C)  m  A  n  (B  C)  m  A  (n  B  n  C)     (m  A  n  B)  (m  A  n  C)  ((m,n)  A x B)  ((m,n)  A x C)  (m,n)  (A x B)  (A x C)   Therefore A x (B  C)  (A x B)  (A x C)

48 47 11. Disjoint Unions 11.1 Definition: a.Two sets A and B are disjoint iff they have no elements in common. In other words, A and B are disjoint A  B =  b.A 1,A 2,…,A n are mutually disjoint iff  i, j, A i  A j =  c.{A 1,A 2,…,A n } is a partition of A iff i.A = A 1  A 2  …  A n ii.A 1,A 2,…,A n are mutually disjoint

49 48 11. Disjoint Unions Partitioning a set

50 49 11. Disjoint Unions n 11.2 Example: Let Z be the set of all integers. –Let A = {n  Z | n = 3k for some integer k} –Let B = {n  Z | n = 3k+1 for some integer k} –Let C = {n  Z | n = 3k+2 for some integer k} n A = {…,-6,-3,0,3,6,…} n B = {…,-5,-2,1,4,7,…} n C = {…,-4,-1,2,5,8,…} A  B =  A  C =  B  C =  Z = A  B  C n Therefore {A, B, C} form a partition of Z.

51 50 12. Summary: Axiomatic Definitions Subset:A  B iff  x, x  A  x  B Set Equality:A  B iff A  B  B  A Strict Subset:A  B iff A  B  A  B Union:  x, x  (A  B) iff x  A  x  B Intersection:  x, x  (A  B) iff x  A  x  B Difference:  x, x  (A  B) iff x  A  x  B Complement:  x, x  A c iff x  A Empty Set:(  x, x  {}) …or…(  x, x  A)  A = {} Universal Set:(  x, x  U) …or …(  x, x  A)  A = U Power Set:  S, (S  A)  (S  P(A)) n Tuple Equality:(x 1,…,x n ) = (y 1,…,y m ) iff n=m  x 1 = y 1  x 2 =y 2  …  x n =y n Cartesian Prod:(x,y)  A  B iff x  A  y  B n Disjoint Union: …

52 51 n Power sets, disjoint unions, ordered pairs and Cartesian Products are used in the lectures on Relations. n End of lecture


Download ppt "1 Introduction (Pengenalan) n About the Lecturer: –Nama lengkap: Heru Suhartanto, Ph.D –Kantor: Ruang 1214, Gedung A, Fakultas Ilmu Komputer UI, Depok."

Similar presentations


Ads by Google