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

Slides:



Advertisements
Similar presentations
Functions Reading: Epp Chp 7.1, 7.2, 7.4
Advertisements

Discrete Mathematics I Lectures Chapter 6
Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Discrete Structures & Algorithms Basics of Set Theory EECE 320 — UBC.
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Section 1.6: Sets Sets are the most basic of discrete structures and also the most general. Several of the discrete structures we will study are built.
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
Denoting the beginning
Sets Definition of a Set: NAME = {list of elements or description of elements} i.e. B = {1,2,3} or C = {x  Z + | -4 < x < 4} Axiom of Extension: A set.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
EE1J2 – Discrete Maths Lecture 7
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/10/11 Ming-Hsuan Yang UC Merced 1.
Sets 1.
Sets.
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
CS355 - Theory of Computation Lecture 2: Mathematical Preliminaries.
2.1 – Sets. Examples: Set-Builder Notation Using Set-Builder Notation to Make Domains Explicit Examples.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Sets Defined A set is an object defined as a collection of other distinct objects, known as elements of the set The elements of a set can be anything:
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
1 ENM 503 Block 1 Algebraic Systems Lesson 2 – The Algebra of Sets The Essence of Sets What are they?
Discrete Structure Sets. 2 Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element.
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
CS201: Data Structures and Discrete Mathematics I
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
CompSci 102 Discrete Math for Computer Science
Copyright © Cengage Learning. All rights reserved.
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
ELEMENTARY SET THEORY.
Sets 2/10/121. What is a Set? Informally, a collection of objects, determined by its members, treated as a single mathematical object Not a real definition:
Chapter 2 With Question/Answer Animations. Section 2.1.
Rosen 1.6, 1.7. Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by.
Introduction to Set theory. Ways of Describing Sets.
Discrete Mathematics SETS. What is a set? ^A set is a unordered collection of “objects”  People in a class: {A yşe, B arış, C anan }  Cities in Turkey.
(CSC 102) Lecture 13 Discrete Structures. Previous Lectures Summary  Direct Proof  Indirect Proof  Proof by Contradiction  Proof by Contra positive.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Discrete Mathematics Set.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
Discrete Mathematics Lecture # 10 Venn Diagram. Union  Let A and B be subsets of a universal set U. The union of sets A and B is the set of all elements.
Fr: Discrete Mathematics by Washburn, Marlowe, and Ryan.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
Section 2.1. Sets A set is an unordered collection of objects. the students in this class the chairs in this room The objects in a set are called the.
Thinking Mathematically Venn Diagrams and Set Operations.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Discrete Mathematics Lecture # 13 Applications of Venn Diagram.
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
Sets, Permutations, and Combinations. Lecture 4-1: Sets Sets: Powerful tool in computer science to solve real world problems. A set is a collection of.
Set. Outline Universal Set Venn Diagram Operations on Sets.
Applied Discrete Mathematics Week 1: Logic and Sets
Set Definition: A set is unordered collection of objects.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
The Language of Sets If S is a set, then
Set, Combinatorics, Probability & Number Theory
Sets Section 2.1.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
… and now for something completely different…
Exercises Show that (P  Q)  (P)  (Q)
CS100: Discrete structures
2.1 Sets Dr. Halimah Alshehri.
Applied Discrete Mathematics Week 2: Proofs
Discrete Mathematics CS 2610
… and now for something completely different…
Presentation transcript:

1 Introduction (Pengenalan) n About the Lecturer: –Nama lengkap: Heru Suhartanto, Ph.D –Kantor: Ruang 1214, Gedung A, Fakultas Ilmu Komputer UI, Depok – –Pendidikan formal: –Sarjana Matematika UI, 1986 –Master of Science, Computer Science, University of Toronto, Canada, –Philosiphy Doctor (Ph.D), Parallel Computing, University of Queensland, Australia, 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:

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

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.

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 ‘  ’

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

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.

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).

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,…}

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}

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.

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

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:

13 3. Predicates:  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}

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

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.

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

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

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

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

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!!!

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

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)

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  

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

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

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.

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

Proofs involving  and U Theorem: For any set A,   A.

Proofs involving  and U 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).

Proofs involving  and U 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.

Proofs involving  and U 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.

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

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

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

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}}}}

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

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)

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!

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.

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)

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)}

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)}

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)}

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: {}

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)}

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)

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

Disjoint Unions Partitioning a set

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.

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: …

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