CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

Slides:



Advertisements
Similar presentations
1.6 Functions. Chapter 1, section 6 Functions notation: f: A B x in A, y in B, f(x) = y. concepts: –domain of f, –codomain of f, –range of f, –f maps.
Advertisements

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.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
Basic Properties of Relations
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 8 Equivalence relations on sets Function between sets Types of function.
Discrete Math for CS Chapter 5: Functions. Discrete Math for CS New Relation Operations: Given R, a relation on A x B, we define the inverse relation,
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
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,
CSE 20 DISCRETE MATH Prof. Shachar Lovett Clicker frequency: CA.
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.
Sets Set Operations Functions. 1. Sets 1.1 Introduction and Notation 1.2 Cardinality 1.3 Power Set 1.4 Cartesian Products.
FUNCTION Discrete Mathematics Asst. Prof. Dr. Choopan Rattanapoka.
 Let A and B be any sets A binary relation R from A to B is a subset of AxB Given an ordered pair (x, y), x is related to y by R iff (x, y) is in R. This.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Discrete Math for CS Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
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 
CSE 2353 – October 1 st 2003 Functions. For Real Numbers F: R->R –f(x) = 7x + 5 –f(x) = sin(x)
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Basic Structures: Sets, Functions, Sequences, and Sums.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
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
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
CMSC250 S ECTIONS 0303 & 0304 M IDTERM R EVIEW Sri Kankanahalli Discussion 10: 9 March 2016 Office Hrs: Mon. and Wed. 4-6PM AVW 1112.
CSE 20 – Discrete Mathematics Dr. Cynthia Bailey Lee Dr. Shachar Lovett Peer Instruction in Discrete Mathematics by Cynthia Leeis licensed under a Creative.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
FUNCTIONS.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation is a relation on.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Discrete Mathematics Lecture 6
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Properties of Functions
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Reflexivity, Symmetry, and Transitivity
CSE 20 – Discrete Mathematics
CSE 321 Review Session Dave Bacon.
S1: Prove that: Venn Diagram “Proof” Direct Proof A  (A  B) = A
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
MATH 15A – Discrete Mathematics
Use mathematical induction to prove that the formula is true for all natural numbers m. {image} Choose the first step of the proof from the following:
CS201: Data Structures and Discrete Mathematics I
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Discrete Structures for Computer Science
CSE15 Discrete Mathematics 02/27/17
Discrete Math & Fixed points
Functions.
Section 2.1 Proof Techniques Introduce proof techniques:   o        Exhaustive Proof: to prove all possible cases, Only if it is about a.
Introduction to Relations and Functions
Ch 5 Functions Chapter 5: Functions
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
Lecture # 18 Types of Functions
Functions Section 2.3.
REVISION Relation. REVISION Relation Introduction to Relations and Functions.
Copyright © Zeph Grunschlag,
Chapter 8 (Part 2): Relations
Presentation transcript:

CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett

Review problems Midterm 2

Material Everything we studied (excluding 1st midterm) Graphs, sets, functions, relations Proofs: direct, contrapositive, by contradiction, induction, strong induction

Question 1 Let f:NN be defined as f(x)=(x+1)2. Is f: Injective Surjective Bijective None

Question 2 Write the set “all elements which are equal to 1 modulo 3” in set builder notation {𝑥∈𝑍:∃𝑦∈𝑍, 𝑥=3𝑦+1} 𝑥∈𝑍:∃𝑦∈𝑍, 𝑦=3𝑥+1 {𝑥∈𝑍:∀𝑦∈𝑍, 𝑥=3𝑦+1} {𝑥∈𝑍:∀𝑦∈𝑍,𝑦=3𝑥+1}

Question 3 Let X,Y be finite sets. f:XY be a function such that f is injective but not surjective. Prove that |X|<|Y|. Proof (direct proof): Let A={f(x): x X}. Note that AY. Since f is injective, all the elements f(x) are unique, hence |A|=|X|. Since f is not surjective, there are elements in Y not attainable as images of f. Hence AY. As AY and AY, A is a strict subset of Y. Hence |A|<|Y|. Thus, |X|<|Y|. QED.

Question 4a Let X=“all formulas  on n inputs x1,…,xn, using the connectives AND,OR,NOT”. Define a relation R for ,X as “ is a tautology”. Is R symmetric: Yes No

Question 4b Let X=“all formulas  on n inputs x1,…,xn, using the connectives AND,OR,NOT”. Define a relation R for ,X as “ is a tautology”. Is R reflexive: Yes No

Question 4c Let X=“all formulas  on n inputs x1,…,xn, using the connectives AND,OR,NOT”. Define a relation R for ,X as “ is a tautology”. Is R transitive: Yes No