HALVERSON – MIDWESTERN STATE UNIVERSITY CMPS 2433 Chapter 2 – Part 2 Functions & Relations.

Slides:



Advertisements
Similar presentations
Equivalence Relations
Advertisements

Copyright © Cengage Learning. All rights reserved. CHAPTER 1 SPEAKING MATHEMATICALLY SPEAKING MATHEMATICALLY.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
Discrete Structures Chapter 5 Relations and Functions Nurul Amelina Nasharuddin Multimedia Department.
CSC 2300 Data Structures & Algorithms January 16, 2007 Chapter 1. Introduction.
Introduction to Logarithmic Functions
Logarithmic Functions & Their Graphs
Logarithmic Functions Section 2. Objectives Change Exponential Expressions to Logarithmic Expressions and Logarithmic Expressions to Exponential Expressions.
Functions.
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.
Section 10.1 The Algebra of Functions. Section 10.1 Exercise #1 Chapter 10.
MAC 1105 Section 4.3 Logarithmic Functions. The Inverse of a Exponential Function 
Math 3121 Abstract Algebra I Section 0: Sets. The axiomatic approach to Mathematics The notion of definition - from the text: "It is impossible to define.
1.5 Functions and Logarithms. One-to-One Functions Inverses Finding Inverses Logarithmic Functions Properties of Logarithms Applications …and why Logarithmic.
AP CALCULUS AB Chapter 1: Prerequisites for Calculus Section 1.5: Functions and Logarithms.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Chapter 3 Functions Functions provide a means of expressing relationships between variables, which can be numbers or non-numerical objects.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Ordered Sets. Relations. Equivalence Relations 1.
Use mental math to evaluate.
Q Exponential functions f (x) = a x are one-to-one functions. Q (from section 3.7) This means they each have an inverse function. Q We denote the inverse.
Lecture 14 Relations CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Discrete Maths Objective to introduce relations, show their connection to sets, and their use in databases , Semester 2, Relations.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFunctions.
1 Copyright © 2015, 2011, 2007 Pearson Education, Inc. Chapter 9-1 Exponential and Logarithmic Functions Chapter 9.
FUNCTIONS.
7-1: Exponential Review and Logarithms Basics Unit 7: Exponents/Logarithms English Casbarro.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
Basic Structures: Functions Muhammad Arief download dari
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.
Chapter 5 – Relations and Functions. 5.1Cartesian Products and Relations Definition 5.1: For sets A, B  U, the Cartesian product, or cross product, of.
April 14, 2015Applied Discrete Mathematics Week 10: Equivalence Relations 1 Properties of Relations Definition: A relation R on a set A is called transitive.
Mathematical Notions and Terminology Lecture 2 Section 0.2 Fri, Aug 24, 2007.
Functions. L62 Agenda Section 1.8: Functions Domain, co-domain, range Image, pre-image One-to-one, onto, bijective, inverse Functional composition and.
Discrete Mathematics Relation.
MATH 224 – Discrete Mathematics
Relations and their Properties
Section 9.3 Logarithmic Functions  Graphs of Logarithmic Functions Log 2 x  Equivalent Equations  Solving Certain Logarithmic Equations 9.31.
10.2 Logarithms and Logarithmic Functions Objectives: 1.Evaluate logarithmic expressions. 2.Solve logarithmic equations and inequalities.
5.4 Logarithmic Functions. Quiz What’s the domain of f(x) = log x?
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
4 Inverse, Exponential, and Logarithmic Functions © 2008 Pearson Addison-Wesley. All rights reserved.
Lesson 1.5: Functions and Logarithms AP Calculus Mrs. Mongold.
Math 1304 Calculus I 1.6 Inverse Functions. 1.6 Inverse functions Definition: A function f is said to be one-to- one if f(x) = f(y) implies x = y. It.
1 Copyright © 2015, 2011, 2007 Pearson Education, Inc. Chapter 9-1 Exponential and Logarithmic Functions Chapter 9.
Chapter 7 – Radical Equations and Inequalities 7.2 – Inverse Functions and Relations.
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.
One-to-one and Inverse Functions. Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 2 Review: A is any set of ordered pairs. A function.
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
MAT 2720 Discrete Mathematics Section 3.3 Relations
Review Functions. Function A function is a special type of relation in which each element of the domain is paired with exactly one element of the range.
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.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Objectives: 1)Students will be able to find the inverse of a function or relation. 2)Students will be able to determine whether two functions or relations.
2.5.1 MATHPOWER TM 12, WESTERN EDITION 2.5 Chapter 2 Exponents and Logarithms.
Section 3 Chapter Copyright © 2012, 2008, 2004 Pearson Education, Inc. Objectives Logarithmic Functions Define a logarithm. Convert between.
Algebra The Natural Base, e. Review Vocabulary Exponential Function–A function of the general form f(x) = ab x Growth Factor – b in the exponential.
Citra Noviyasari, S.Si, MT
Relations, Functions, and Matrices
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.
CS201: Data Structures and Discrete Mathematics I
Exponential and Logarithmic Functions
Relations and Their Properties
8.1 Relations and Their Properties
8.1 Relations and Their Properties
Relations and their Properties
Objectives Write equivalent forms for exponential and logarithmic functions. Write, evaluate, and graph logarithmic functions.
Functions Section 2.3.
Presentation transcript:

HALVERSON – MIDWESTERN STATE UNIVERSITY CMPS 2433 Chapter 2 – Part 2 Functions & Relations

2.2 Relations A RELATION from set A to set B is any subset of the Cartesian Product A X B If R is a relation from A to B & (a, b) is an element of R, a is related to b by R Example  A = {students enrolled at MSU in fall 2014}  B = {courses offered at MSU in fall 2014}  R = {(a,b)| student a is enrolled in course b}  R = {(Smith,Math1233), (Jones, CMPS1044), etc.}

Relations (cont’d) A relation is ANY subset, so no repeated pairs but can have repeated elements in the pairs. R = {(Smith,Math1233), (Jones, Cmps1044), (Smith, Engl1013), (Jones, Math1233), (Hunt, Math1233), (Williams, Cmps1044), etc.} What is the Universal Set for R? Define a different Relation from A to B.

Relations (cont’d) Example: R is a relation on A A = {students enrolled at MSU in fall 2014} R = {(a, b)| a & b are in a course together} R = {(Smith, Jones), (Jones, Hunt), (Hunt, Wills), (Wills, Johnson), etc.} What about (Jones, Smith)? Relation from a set S to itself is call a Relation on S

Reflexive Property of Relations A Relation R on a set S is said to be Reflexive  if for each x  S, x R x is true  if for each x  S, (x, x) is in R  that is, every element is related to itself Is our previous example R a Reflexive Relation?

Reflexive Property of Relations - Examples A = {students enrolled at MSU in fall 2014} Which of the following are Reflexive? R = {(a,b): a & b are siblings} R = {(a,b): a & b are not in a course together} R = {(a,b): a & b are same classification} R = {(a,b): a & b are married} R = {(a,b): a & b are the same age} R = {(a,b): a has a higher GPA than b}

Symmetric Property of Relations A Relation R on a set S is said to be Symmetric  If x R y is true, then y R x is true  If (x, y)  R, then (y, x) is true  That is, the elements of the relation R can be reversed Is R Symmetric? R = {(a, b)| a & b are in a course together}

Symmetric Property of Relations - Examples A = {students enrolled at MSU in fall 2014} Which of the following are Symmetric? R = {(a,b): a & b are siblings} R = {(a,b): a & b are not in a course together} R = {(a,b): a & b are same classification} R = {(a,b): a & b are married} R = {(a,b): a & b are the same age} R = {(a,b): a has a higher GPA than b}

Transitive Property of Relations A Relation R on a set S is said to be Transitive  If x R y and y R z are true, then x R z is true  If (x, y)  R & (y, z)  R, then (x, z)  R Is R Transitive? R = {(a, b)| a & b are in a course together}

Transitive Property of Relations - Examples A = {students enrolled at MSU in fall 2014} Which of the following are Transitive? R = {(a,b): a & b are siblings} R = {(a,b): a & b are not in a course together} R = {(a,b): a & b are same classification} R = {(a,b): a & b are married} R = {(a,b): a & b are the same age} R = {(a,b): a has a higher GPA than b}

Equivalence Relation Any Relation that is Reflexive, Symmetric & Transitive is an Equivalence Relation If R is an Equivalence Relation on S & x  S, the set of all elements related to x is called an Equivalence Class  Denoted [x] Any 2 Equivalence Classes of a Relation are either Equal or Disjoint  The Equivalence Classes of R Partition S

Equivalence Relations - Examples A = {students enrolled at MSU in fall 2014} Which are Equivalence Relations? If so, what are the partitions? R = {(a,b): a & b are siblings} R = {(a,b): a & b are not in a course together} R = {(a,b): a & b are same classification} R = {(a,b): a & b are married} R = {(a,b): a & b are the same age} R = {(a,b): a has a higher GPA than b}

Homework on Relations - Section 2.2 Page 52 – 54 Problems 1 – 14, 19-20, 25

Section Functions A Function f from set X to set Y is a relation from X to Y in which for each element x in X there is exactly one element y in Y for which x f y Among the ordered pairs (x, y) in f, x appears only ONCE Example: is F a function? F = {(2,3), (3,2), (4,2)} F = {(2,3), (3,2), (2,4), (4,6)}

Mathematical Functions Consider mathematical FUNCTIONS Assume S = {0, 1, 2, 3, 4, 5,…} f(x) = x 2 = {(0,0), (1,1),(2,4),(3,9),(4,16),…} f(x) = x+2 = {(0,2),(1,3),(2,4),(3,5),…} For every x, there is only ONE value to which it is related, thus these are Functions!

Equivalence Relations - Examples A = {students enrolled at MSU in fall 2014} Which are Functions? R = {(a,b): a & b are siblings} R = {(a,b): a & b are not in a course together} R = {(a,b): a & b are same classification} R = {(a,b): a & b are married} R = {(a,b): a & b are the same age} R = {(a,b): a has a higher GPA than b}

Function Domain If f is a function from X to Y, denote f: X  Y Set X is called the domain of the function Set Y is called co-domain Subset of Y actually paired with elements of X under f is called the range For f(x) = y, y is the image of x under f

Domain, Co-domain, Range Examples S = {…, -3,-2,-1,0, 1, 2, 3, 4, 5,…} Define f as a function on S F(x) = x 2 Domain = S Co-domain = S Range = ???

Functions – additional terms One-to-One function  For every x, there is a unique y &  For every y, there is a unique x {(x, y)| no repeats of x or y} S = {…, -3,-2,-1,0, 1, 2, 3, 4, 5,…} f(x) = x 2 Is f one-to-one?

Exponential & Logarithmic Functions Logarithmic functions  IMPT in Computing Generally, base 2 NOTE:  2 n is exponential function, base 2  2 0 = 1 and 2 -n = 1/2 n  See page 73 for graph – Figure 2.18 Logarithmic Function base 2 is inverse of Exponential Function

Logarithmic Function - Base 2 Notation: log 2 x  Read “log base 2 of x” Defn: y = log 2 x if and only if x = 2 y Examples:  log 2 8 = 3 because 2 3 = 8  log = 10 because 2 10 = 1024  log = 8 because 2 8 = 256  log ~~ 6.65 because ~~ 100

More on Logarithmic Function - Base 2 Growth rate is small, less than linear See graph page 74 – Figure 2.19 Calculator Note:  Most calculators with LOG button is base 10  log 2 x = LOG x / LOG 2 Algorithms with O(log 2 n) complexity??

Homework – Section 2.4 Note – we omitted section on Composite & Inverse Functions Page Problems