S1: Prove that: Venn Diagram “Proof” Direct Proof A  (A  B) = A

Slides:



Advertisements
Similar presentations
Countability. The cardinality of the set A is equal to the cardinality of a set B if there exists a bijection from A to B cardinality? bijection? injection.
Advertisements

Functions, Pigeonhole Principle Lecture 14: Nov 4 A B f( ) =
Terminology Domain: set which holds the values to which we apply the function Co-domain: set which holds the possible values (results) of the function.
Discrete Mathematics Lecture 7 Alexander Bukharovich New York University.
Terminology Domain: set which holds the values to which we apply the function Co-domain: set which holds the possible values (results) of the function.
Functions f( ) = A B Lecture 15: Nov 4.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 12 Number theory Mathematical induction Proof by induction Examples.
Functions Goals Introduce the concept of function Introduce injective, surjective, & bijective functions.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Rosen 1.6. Approaches to Proofs Membership tables (similar to truth tables) Convert to a problem in propositional logic, prove, then convert back Use.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
1 CMSC 250 Chapter 7, Functions. 2 CMSC 250 Function terminology l A relationship between elements of two sets such that no element of the first set is.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Cardinality of Sets Section 2.5.
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
Functions. Copyright © Peter Cappello2 Definition Let D and C be nonempty sets. A function f from D to C, for each element d  D, assigns exactly 1 element.
ICS 253: Discrete Structures I
Groups Definition A group  G,  is a set G, closed under a binary operation , such that the following axioms are satisfied: 1)Associativity of  :
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Example Prove that: “IF 3n + 2 is odd, then n is odd” Proof by Contradiction: -p = 3n + 2 is odd, q = n is odd. -Assume that ~(p  q) is true OR -(p 
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.1 and 7.2.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
COMPSCI 102 Introduction to Discrete Mathematics.
Sets. Definitions (I) Collection of elements such that: There are no duplicates There is no order Special sets Universe (U or E): all elements under consideration.
Discrete Structures Li Tak Sing ( 李德成 ) Lectures
Basic Structures: Sets, Functions, Sequences, and Sums.
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.
Review 2 Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by lower.
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
CSci 2011 Discrete Mathematics Lecture 9, 10
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
CS 285- Discrete Mathematics
1 Functions CS 202 Epp section ??? Aaron Bloomfield.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Functions CSRU1400 Spring 2008Ellen Zhang 1 CISC1400, Fall 2010 Ellen Zhang.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
FUNCTIONS.
Discrete Mathematics Functions
Sequences Lecture 11. L62 Sequences Sequences are a way of ordering lists of objects. Java arrays are a type of sequence of finite size. Usually, mathematical.
ICS 253: Discrete Structures I
Sets (2.1) A set is a collection or group of objects or elements or members. (Cantor 1895) A set is said to contain its elements. There must be an underlying.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Functions 1.
CS 2210:0001 Discrete Structures Sets and Functions
Applied Discrete Mathematics Week 2: Functions and Sequences
CSE 20 – Discrete Mathematics
Functions.
Relation and function.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
2.4 Sequences and Summations
Cardinality of Sets Section 2.5.
Sets Set Identities Sets and propositional logic have some similar properties In fact both are forms of boolean algebra Compare Set Identities table (p.
Functions Section 2.3.
Review 2.
CSE15 Discrete Mathematics 02/27/17
Functions CS 202 Epp section 7.1.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Functions.
ICS 253: Discrete Structures I
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Chapter 1 Introduction to the Theory of Computation
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Presentation transcript:

S1: Prove that: Venn Diagram “Proof” Direct Proof A  (A  B) = A = (A  )  (A  B) identity law = A  (  B) distributivity law = A   domination law = A identity law A B

S2: Prove that: Venn Diagram “Proof” Direct Proof ~(A  B) = ~A  ~B ~(A  B) = {x | xE and x(A  B)} definition = {x | xE and (xA or xB)} definition = {x | (xE and xA) or (xE and xB)} distributivity = {x | xE and xA}  {x | xE and xB} definition = ~A  ~B

S3: Prove that: Direct Proof If R is a subset of S and S is a subset of T, then R is a subset of T Direct Proof Let xR Since R⊆S, then xS (by definition) Now, we know that xS Since S⊆T, then xT (by definition) Now we have that xT So, if xR then xT, in other words, R⊆T

F1: If A={a,b,c,d}, are the following functions from A to A injective, surjective or bijective? {(d, a), (b, c), (c, b), (a, c)} {(a, b), (b, c), (c, d), (d, a)} First function: injective, not surjective (hence, not bijective) Second function: injective, surjective (hence, bijective)

F2: If f(x)=2x+3 and g(x)=x-3, what is g∘f? g∘f(x) = g ( f(x) )

F3: Prove that: Assume NOT (known as proof by contradiction) if f: A → B is a bijection then |A|=|B| Assume NOT (known as proof by contradiction) Assume |A|>|B| Then there must be 2 elements of A that hit the same element of B, so f is not injective, and hence cannot be a bijection Assume |B|>|A| Then there must be 1 element in B that is not hit by any element of A, so f is not surjective, and hence cannot be a bijection So, it must be that |A|=|B|

F4: Which is the largest: the set of even numbers or the set of odd numbers? Let E be the set of even numbers and O the set of odd numbers Consider f:E->O, such that f(x)=x+1 Is f injective? Assume f(x1)=f(x2), then x1+1=x2+1, and it follows that x1=x2. Hence, each element is hit at most once and f is injective Is f surjective? Any odd number y in O is hit by the even number y-1 in E. Hence, each element is hit at least once and f is surjective It follows that f is a bijection and |E|=|O|

F5: Which is the largest: the set of natural numbers or the set of integers? Let N be the set of natural numbers and Z the set of integers Consider the following functions f:N->Z and g:Z->N Let y be negative, fog(y)=f(-2y-1)=((-2y-1)+1/-2)=-2y/-2=y Let y be positive, fog(y)=f(2y)=2y/2=y So g is the inverse of f, and f is a bijection; hence |N|=|Z| f(x) = x odd: (x+1)/−2 x even: x/2 y negative: −2y−1 y positive: 2y g(y) = { x y 0 0 1 −1 2 1 3 −2 4 2

F6: Which is largest: the set of natural numbers or [0,1]? Assume that |N|=|[0,1]| Then there must exist a bijection N->[0,1]. Assume 1 -> 0.34234… 2 -> 0.34987… 3 -> 0.00040… … Consider the number y=0.(not 3)(not 4)(not 0)… Clearly y is in [0,1], but no x in N hits y; hence, the function is not surjective and not a bijection, so |N|≠|[0,1]| In fact, [0,1] is (much) bigger than N Not all infinities are created equal!

PS1-4: Power sets: { a, 1, x, 2 } -> { , {a}, {1}, {x}, {2}, {a,1}, {a,x}, {a,2}, {1,x}, {1,2}, {x,2}, {a,1,x}, {a,1,2}, {a,x,2}, {1,x,2}, {a,1,x,2} }  -> {  } {  } -> { , {} } { a, {} } -> { , {a}, {{}}, {a, {}} }

RE1: Valid usernames are any sequence of letters or digits, but they must start with a letter. L (L|D)* Valid passwords are any sequence of letters, digits or special characters (=, !, ?, $, &), but they must contain at least one digit, and at least one special character. L* ( (D(L|D)*S) | (S(L|S)*D) ) (L|S|D)*

RE2: In C++, a line comment consists of two '/' followed by any string of characters (letters, numbers and spaces). // (L|D|S)*

FSM1: Design one finite state machine to accept only valid usernames and one to accept only valid passwords. Username: L (L|D)* Password: L* ( (D(L|D)*S) | (S(L|S)*D) ) (L|S|D)* L|D L L|D L D S L|S|D D S L|S

FSM2-3: Finite state machine that recognizes/accepts any string that contains at least three A’s. Finite state machine with two accept states, one that is chosen if the input string is even, the other if it is odd B B B A|B A A A 1 1 1

FST1: Line comment vs. block comment vs. undefined comment. ch<>EOF and #, nil EOF, UNDEF ch<>’#’, nil #, nil EOF, UNDEF ch<>’#’, nil |, BC #, nil |, nil #, nil ch<>EOL and EOF and |, nil ch<>|, nil EOL or EOF, LC ch<>EOL and EOF, nil EOL or EOF, LC