Section 4.2 Functions. Announcement Exam #3 has been rescheduled –Monday, April 4 th –Chapters 3 and 4 –Practice sheet for Chapter 3 now posted.

Slides:



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

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.
Discrete Structures Chapter 5 Relations and Functions Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 02/16/12 Ming-Hsuan Yang UC Merced 1.
Copyright © Cengage Learning. All rights reserved.
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,
CSC 2300 Data Structures & Algorithms January 16, 2007 Chapter 1. Introduction.
RMIT University; Taylor's College
Functions.
Functions. Let A and B be sets A function is a mapping from elements of A to elements of B and is a subset of AxB i.e. can be defined by a set of tuples!
Functions, Sequences, and Sums
Section 1.8: Functions A function is a mapping from one set to another that satisfies certain properties. We will first introduce the notion of a mapping.
Functions.
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (2)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Fall 2002CMSC Discrete Structures1 … and the following mathematical appetizer is about… Functions.
10/26/20151 … and the following mathematical appetizer is about… Functions.
MSU/CSE 260 Fall Functions Read Section 1.8.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
1 Section 2.1 Functions: Definitions and Examples A function ƒ from A to B associates each element of A with exactly one element of B. Write ƒ : A  B.
Functions1 Elementary Discrete Mathematics Jim Skon.
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl Module #4.
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: Functions Muhammad Arief download dari
CompSci 102 Discrete Math for Computer Science January 31, 2012 Prof. Rodger Slides modified from Rosen AB a b c d x y z.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Language: Set of Strings
Functions. L62 Agenda Section 1.8: Functions Domain, co-domain, range Image, pre-image One-to-one, onto, bijective, inverse Functional composition and.
11 DISCRETE STRUCTURES DISCRETE STRUCTURES UNIT 5 SSK3003 DR. ALI MAMAT 1.
Basic Structures: Sets, Functions, Sequences, and Sums.
1 Functions CS 202 Epp section ??? Aaron Bloomfield.
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
August 2003 CIS102/LECTURE 9/FKS 1 Mathematics for Computing Lecture 9 LOGIC Chapter 3.
Section 2.3. Section Summary  Definition of a Function. o Domain, Cdomain o Image, Preimage  One-to-one (Injection), onto (Surjection), Bijection 
Chapter 2 1. Chapter Summary Sets The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions and sequences.
FUNCTIONS.
Discrete Mathematics Lecture # 17 Function. Relations and Functions  A function F from a set X to a set Y is a relation from X to Y that satisfies the.
Functions Section 2.3.
Functions Defined on General Sets
Functions Section 2.3.
Discrete Math (2) Haiming Chen Associate Professor, PhD
CSE15 Discrete Mathematics 02/27/17
Objectives The student will be able to:
CS100: Discrete structures
Functions CS 202 Epp section 7.1.
Objectives The student will be able to:
Relations.
CS 220: Discrete Structures and their Applications
Learning Target 4.3 I can identify domain and range of relations and functions SOL: A.7bf Designed by Skip Tyler, Varina High School.
Copyright © Cengage Learning. All rights reserved.
ICS 253: Discrete Structures I
Objectives The student will be able to:
Functions Rosen 6th ed., §2.3.
Relations for functions.
Objectives The student will be able to:
Objectives The student will be able to:
Objectives The student will be able to:
Functions Section 2.3.
Objectives The student will be able to:
Objectives The student will be able to:
Copyright © Zeph Grunschlag,
Objectives The student will be able to:
Equations With Two Variables pages
Section 3.2 More set operations.
Presentation transcript:

Section 4.2 Functions

Announcement Exam #3 has been rescheduled –Monday, April 4 th –Chapters 3 and 4 –Practice sheet for Chapter 3 now posted.

Activity 1 Let f: X → Y as shown by : What is the domain of f? What is the target of f? What is the range of f? What is f(a)? f(b)? f(c)?

Review What is a function?

Definition of a function A function f from a set X to a set Y, denote f: X → Y, is a relation from X, the domain to Y, the target (or co-domain) that satisfies two properties: 1.Every element in X is related to some element in Y 2.No element in X is related to more than one element in Y

Consider the following Let N = {Adams, Epp, Stevens, Rosen, Smedley} L = {A, B, C, D, F} g : N → L such that the mapping indicates the student’s grade in the class. Is g a function?

Non-functions What kind of situations would need to occur for this to not be a valid function.

We sometimes write functions as a set of ordered pairs. g = {(Adams, A), (Epp, C), (Stevens, B), (Rosen, A), (Smedley, F)}

Activity #2 Represent f as a set of ordered pairs.

Activity 3 Consider: L = {1,2,3,4,5} R = {A,B,C,D,F} Which of the following are functions from L to R? 1.{(1,A),(2,B),(3,C),(4,D),(5,F)} 2.{(2,A),(2,B),(3,C),(4,D),(5,F)} 3.{(1,A),(2,A),(3,B),(4,B),(5,B)} 4.{(1,5),(2,4),(3,3),(4,2),(5,1)} 5.{(2,A),(3,B),(4,B),(5,B)}

Activity 4 Find all of the functions from X = {a,b} to Y={u,v} Find all of the functions from X = {a,b} to Y={u} How many functions would exist from X = {a,b,c,d} to Y={u,v,x} How does this relate back to Cartesian products of sets?

Common Functions in CS Floor function floor: R → Z floor(x) = the largest integer y such that y≤x

Common Functions in CS Ceiling function ceiling: R → Z ceiling(x) = the smallest integer y such that x≤y

Common Functions in CS Encoding and Decoding functions E: bitString → bitString D: bitString → bitString

Common Functions in CS Encoding and Decoding functions E(s) = the string obtained from s by replacing each bit of s by the same bit written three times D(t) = the string obtained from t by replacing each consecutive triple of three bits by a single copy of that bit

Common Functions in CS Encoding and Decoding functions E(s) = the string obtained from s by replacing each bit of s by the same bit written three times D(t) = the string obtained from t by replacing each consecutive triple of three bits by whichever bit is most frequent.

Common Functions in CS The Hamming Distance H: bitString,bitString → Z H(s,t) = the count of the number of positions in which s,t have different values