any wizard of oz fans
play

Any Wizard of Oz fans? It is always best to start at the beginning - PDF document

Any Wizard of Oz fans? It is always best to start at the beginning Discrete Math Basics -- Glynda, the good witch of the North Outline Sets Sets A set is a collection of elements. Relations Finite set has finite


  1. Any Wizard of Oz fans? “It is always best to start at the beginning” Discrete Math Basics -- Glynda, the good witch of the North Outline Sets • Sets • A set is a collection of elements. • Relations – Finite set – has finite number of elements • A = { 1, 3, 5, 6, 9 } • Proofs – Infinite Set – has infinite number of elements • B = { x | x is an odd integer } – Null (Empty) set – has no elements. • ∅ Sets Set Operations • Membership • Union: – A ∪ B = set consisting of all elements in either A or B – If an element x is a member of a set A, we write: or both. • x ∈ A. – If an element x is not a member of a set A, we write: • Intersection • x ∉ A – A ∩ B = set of elements that are in both A and B • Subsets: – If A ∩ B = ∅ , A and B are disjoint. – A is a subset of B if all elements of A are also in B. • Difference – A ⊆ B if x ∈ A then x ∈ B – A – B = set of all elements of A that are not elements of – A = B is the same as saying A ⊆ B and B ⊆ A. B • Power Set • Complement (wrt a universal set U) – 2 A = Set of all subsets of A – A’ = All elements in U that are not in A – U - A

  2. Set Operations Cartesian Product of Sets • A x B = set of ordered pairs (a,b) such that • A = { 1, 3, 5, 6, 9 } – a ∈ A and b ∈ B. • B = { x | x is an odd integer } • A x B x C = set of ordered triplets (a, b, c) such that • A ∪ B = { x | x = 6 or x is an odd integer} – a ∈ A and b ∈ B and c ∈ C • A ∩ B = { 1, 3, 5, 9 } • In general: A 1 x A 2 x … x A n = the set of all • A – B = { 6 } n-tuples (a 1 , a 2 , …, a n ) such that • B’ = { x | x is an even integer } – a i ∈ A i for all i. – With respect to the Universal set of Positive integers. Relations on sets Functions • Means to relate or associate a member of • Functions are restricted relations one set with a member of another: – f: A → B – R : A → B – Relation is simply a subset of A x B – Every element of A is associated with exactly 1 • If a ∈ A is related to b ∈ B then (a, b) ∈ R element of B • Can also be written aRb • Or R(a) contains b Functions Functions • A function, f: A → B is: • f : A → B – Onto (Surjective) if every element of B is – A and B can themselves be Cartesian Products related to at least one element of A – f: A x B → C – One-to-one (Injective) if every element of B is • Elements of f are ((a,b), c) where a ∈ A, b ∈ B, c ∈ related to at most one element of A. C • f (a,b) = c – A bijection if it is both one-to-one and onto • Every element in B is related to one and only one element of A.

  3. Equivalence Relations Equivalence Relations • An equivalence relation on A (R: A → A) • If R is a relation on A (R: A → A), R is an partitions the elements of A into disjoint equivalence relation if: equivalence classes. – R is reflexive – (a, a) ∈ R for all a in A – For each class, elements in the class are related only to – R is symmetric – if (a,b) ∈ R then (b,a) ∈ R all elements in the same partition. – Example: – R is transitive – if (a, b) ∈ R and (b,c) ∈ R then • ≡ 4 : Ν → Ν : x ≡ 4 y if ( x mod 4) == (y mod 4 ) (a,c) ∈ R • [0] = { 0, 4, 8, 12, …} • [1] = { 1, 5, 9, 13, …} • [2] = { 2, 7, 10, 15, …} • [3] = { 3, 8, 11, 16, …} Functions and Relations Mathematical Proofs • Questions? • An argument that something is true – If X, then Y • Types of proofs • Next: proofs – Direct/Constructive proofs – Proof by contradiction – Proof by induction Direct Proofs Direct Proofs • If X, then Y • Example: – For integers a,b : If a and b are odd, then ab is • Assume X is true, show directly that Y is odd. true. – Given: a and b are odd integers • There exists integer x such that a= 2x +1 • There exists integer y such that b = 2y + 1 – Must prove: a times b is also odd • There exists integer z such that ab = 2z + 1

  4. Direct Proofs Proof by contradiction • Perform the multiplication directly • If X, then Y – ab = (2x + 1)(2y + 1) • With proof by contraction = 4xy + 2x + 2y + 1 – You assume that Y is false = 2(2xy + x + y) + 1 – Then derive a contradiction to a fact known to So z = 2xy + x + y be true – If we find a contradiction, then we know our Not only did you prove that a z exists, you constructed an initial assumption (I.e. Y is false) must be “algorithm” for generating this z. invalid and thus Y must be true. This is an example of a constructive proof. Proof by contradiction Proof by contradiction • If X, then Y -- Assume Y is false • Example 1. Assume that A ∩ C ≠ ∅ – A, B, and C are sets. If A ∩ B = ∅ and C ⊆ • Meaning, there is an element x which is in both A and C B, then A ∩ C = ∅ 2. Since C is a subset of B then x, being a member of C must a member of B as well. – Given: 3. However, by #1, x ∈ A. • A and B have nothing in common 4. x ∈ A and x ∈ B implies that A ∩ B ≠ ∅ • C is a subset of B 5. This contradicts X – Must show: 6. The assumption in #1 must be invalid and as such A ∩ • A and C have nothing in common C = ∅ Proof by Induction Proof by Induction • Used to prove statements involving an • Notice there are two elements to the integer that we wish to prove true for all problem to be proven: integers greater than a given integer – Statement involving an integer, P(n) – Example: – A specific integer n 0 for which we are trying to + n n ( n 1 ) ∑ show that P(n) is true for all values greater than = + + + + + = i 1 2 3 4 n L 2 or equal to. i = 1 For all n ≥ 0

  5. Proof by induction Proof by induction • How : • Steps to an inductive proof: – Let P(n) is some statement involving an 1. Basis step: integer, n. To prove that P(n) is true for Show P(n) is true when n=n 0 every integer ≥ a given integer n 0 , it is 2. Induction hypothesis sufficient to show these two things: Assume that P(n) is true for some k ≥ n 0 1. P(n 0 ) is true 3. Inductive step 2. For any k ≥ n 0 , if P(k) is true, then P(k+1) is true. Prove P(n) is true for n = k+1 using the induction hypothesis. Proof by induction Proof by Induction 2. Inductive Hypothesis: Assume true for n=k • Example: + k k ( k 1 ) – Show that for n ≥ 0 ∑ = i + n n ( n 1 ) ∑ 2 = + + + + + = i 1 2 3 4 L n i = 1 2 = i 1 3. Inductive Step: Show true for n=k +1 1. Basis step: Show true for n = 0 + + + k 1 ( k 1 )( k 2 ) ∑ = i 0 + ∑ 0 ( 0 1 ) 2 = i 0 = = i 1 0 2 = i 1 Proof by induction Proof by induction k + 1 k ∑ = ∑ + + i i ( k 1 ) • Steps to an inductive proof: = = i 1 i 1 1. Basis step: By the induction hypothesis Show P(n) is true when n=n 0 + k k ( k 1 ) ∑ so… = i 2. Induction hypothesis 2 = i 1 Assume that P(n) is true for some k ≥ n 0 + + + + k + 1 k ( k 1 ) k ( k 1 ) 2 ( k 1 ) ∑ = + + = i ( k 1 ) 3. Inductive step 2 2 = i 1 Prove P(n) is true for n = k+1 using the induction + + + + k 2 2 k 2 ( k 1 )( k 2 ) hypothesis. = = 2 2

  6. Summary Reminder • Proof • Next class… – Direct / constructive – Quiz on all this discrete math. – Proof by contradiction – Start to look at strings and languages – Proof by induction • Any questions?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend