Functions Defined on General Sets

Slides:



Advertisements
Similar presentations
COUNTING AND PROBABILITY
Advertisements

Copyright © Cengage Learning. All rights reserved. CHAPTER 1 SPEAKING MATHEMATICALLY SPEAKING MATHEMATICALLY.
Discrete Structures Chapter 5 Relations and Functions Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 02/22/11 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 02/21/12
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,
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.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Mathematics. Session Set, Relation & Function Session - 3.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Chapter 3 Functions Functions provide a means of expressing relationships between variables, which can be numbers or non-numerical objects.
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 
Functions Reading: Chapter 6 (94 – 107) from the text book 1.
Basic Structures: Functions Muhammad Arief download dari
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Copyright © Cengage Learning. All rights reserved.
Basic Structures: Sets, Functions, Sequences, and Sums.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 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.
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.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
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.
CPCS 222 Discrete Structures I
The Relation Induced by a Partition
Functions Section 2.3.
The Language of Sets If S is a set, then
Relations and Functions
Unit-III Algebraic Structures
DIFFERENTIATION RULES
Reflexivity, Symmetry, and Transitivity
Copyright © Cengage Learning. All rights reserved.
Chapter 2 Sets and Functions.
Relation and function.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CALCULUS AND ANALYTIC GEOMETRY CS 001 LECTURE 02.
Functions Section 2.3.
Chapter 5: Inverse, Exponential, and Logarithmic Functions
Discrete Structure II: Introduction
CSE15 Discrete Mathematics 02/27/17
CS100: Discrete structures
5 Logarithmic, Exponential, and Other Transcendental Functions
Copyright © Cengage Learning. All rights reserved.
2.1 Sets Dr. Halimah Alshehri.
Copyright © Cengage Learning. All rights reserved.
COUNTING AND PROBABILITY
4.1 Inverse Functions.
Sets. EXAMPLE 1 The set O of odd positive integers less than 10 can be expressed by O = { l, 3, 5, 7, 9}. * This way of describing a set is known as.
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
FUNCTION NOTATION AND EVALUATING FUNCTIONS
The aim of education is to teach students how to think rather than what to think. Sets The set is the fundamental discrete structure on which all other.
Ch 5 Functions Chapter 5: Functions
Copyright © Cengage Learning. All rights reserved.
Chapter 5: Exponential and Logarithmic Functions
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Exercise Give the domain and range of the following relation.
Unit 30 Functions Presentation 1 Functions, Mappings and Domains 1
Copyright © Cengage Learning. All rights reserved.
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.
3.6 - Inverse Functions Notation: Say: “f-inverse of x”…
Copyright © Cengage Learning. All rights reserved.
Functions Section 2.3.
Lesson 5.3 What is a Function?
Chapter 5: Exponential and Logarithmic Functions
Presentation transcript:

Functions Defined on General Sets Recall the definition of a function: Definition: A function f from X to Y, denoted f: X  Y, is a relation (i.e., a subset of X × Y) in which each element of X is related to exactly one element in Y. Terminology: X is the domain Y is the co-domain The range of f is the set {y  Y | x  X : y = f(x)}. If f(x) = y, then y is the image of x under f, or the value of f at x, and x is a preimage of y or an inverse image of y, The inverse image of y = {x  X | f(x) = y}.

Arrow Diagrams If X and Y are finite sets, you can define a function f from X to Y by drawing an arrow diagram. You make a list of elements in X and a list of elements in Y, and draw an arrow from each element in X to the corresponding element in Y.

Arrow Diagrams This arrow diagram does define a function because 1. Every element of X has an arrow coming out of it. 2. No element of X has two arrows coming out of it that point to two different elements of Y.

Example 2 – A Function Defined by an Arrow Diagram Let X = {a, b, c} and Y = {1, 2, 3, 4}. Define a function f from X to Y by the arrow diagram below. Write the domain and co-domain of f. Domain is {a, b, c}. Co-domain is {1, 2, 3, 4}.

Example 2 – A Function Defined by an Arrow Diagram Let X = {a, b, c} and Y = {1, 2, 3, 4}. Define a function f from X to Y by the arrow diagram below. Find f (a), f (b), and f (c). f(a) = 2 f(b) = 4 f(c) = 2

Example 2 – A Function Defined by an Arrow Diagram Let X = {a, b, c} and Y = {1, 2, 3, 4}. Define a function f from X to Y by the arrow diagram below. What is the range of f ? Range is {2, 4}.

Example 2 – A Function Defined by an Arrow Diagram Let X = {a, b, c} and Y = {1, 2, 3, 4}. Define a function f from X to Y by the arrow diagram below. Is c an inverse image of 2? Is b an inverse image of 3? Yes, c is an inverse image of 2. No, b is not an inverse image of 3.

Example 2 – A Function Defined by an Arrow Diagram Let X = {a, b, c} and Y = {1, 2, 3, 4}. Define a function f from X to Y by the arrow diagram below. Find the inverse images of 2, 4, and 1. Inverse image of 2 is {a, c}. Inverse image of 4 is {b}. Inverse image of 1 is .

Example 2 – A Function Defined by an Arrow Diagram Let X = {a, b, c} and Y = {1, 2, 3, 4}. Define a function f from X to Y by the arrow diagram below. Represent f as a set of ordered pairs. f = { (a, 2), (b, 4), (c, 2) }

Example 3 – Equality of Functions Let J3 = {0, 1, 2}, and define functions f and g from J3 to J3 as follows: For all x in J3, Does f = g? Yes, the table of values shows that f (x) = g(x) for all x in J3.

Example 3 – Equality of Functions Let F: R → R and G: R → R be functions. Define new functions F + G: R → R and G + F: R → R as follows: For all x  R, Does F + G = G + F? Again the answer is yes. For all real numbers x, Hence F + G = G + F.

Examples of Functions: The Identity Function Given a set X, define a function IX from X to X by for all x in X. The function IX is called the identity function on X because it sends each element of X to the element that is identical to it.

Examples of Functions: Logarithms 2 since 32 = 9 log2 ½ = 1 since 21 = ½ log10 1 = 0 since 100 = 1 2log2 m = m

Examples of Functions If S is a nonempty, finite set of characters, then a string over S is a finite sequence of elements of S. The number of characters in a string is called the length of the string. Sl denotes the set of all strings over S of length l. The null string over S is the “string” with no characters. It is usually denoted “” and is said to have length 0.

Example 9 – Encoding and Decoding Functions Digital messages consist of finite sequences of 0’s and 1’s. When they are communicated across a transmission channel, they are frequently coded in special ways to reduce the possibility that they will be garbled by interfering noise in the transmission lines. For example, suppose a message consists of a sequence of 0’s and 1’s. A simple way to encode the message is to write each bit three times. Thus the message would be encoded as

Example 9 – Encoding and Decoding Functions cont’d The encoding function El is the function from {0,1} l to {0,1}3l defined as follows: For each string s  {0,1}l, El(s) = the string obtained from s by replacing each bit of s by the same bit written three times. The decoding function Dl is defined as follows: For each string t  {0,1}3l, Dl (t) = the string obtained from t by replacing each consecutive triple of three bits of t by their majority bit.

Example 9 – Encoding and Decoding Functions cont’d The advantage of this particular coding scheme is that it makes it possible to do a certain amount of error correction when interference in the transmission channels has introduced occasional errors into the stream of bits.

Boolean Functions

Example 11 – A Boolean Function Consider the three-place Boolean function defined from the set of all 3-tuples of 0’s and 1’s to {0, 1} as follows: For each triple (x1, x2, x3) of 0’s and 1’s, Describe f using an input/output table. Solution:

Example 11 – Solution cont’d The rest of the values of f can be calculated similarly to obtain the following table.

Checking Whether a Function Is Well Defined It can sometimes happen that what appears to be a function defined by a rule is not really a function at all. To give an example, suppose we wrote, “Define a function f : R → R by specifying that for all real numbers x, This does not define a function, since for almost all values of x, either there is no y that satisfies the given equation or there are two different values of y that satisfy the equation.

Checking Whether a Function Is Well Defined For instance, when x = 2, there is no real number y such that 22 + y2 = 1, and when x = 0, both y = –1 and y = 1 satisfy the equation 02 + y2 = 1. In general, we say that a “function” is not well defined if it fails to satisfy the requirements for being a function.

Example 12 – A Function That Is Not Well Defined We know that Q represents the set of all rational numbers. Suppose you read that a function f : Q → Z is to be defined by the formula for all integers m and n with n  0. That is, the integer associated by f to the number is m. Is f well defined? Why?

Example 12 – Solution The function f is not well defined. The reason is that fractions have more than one representation as quotients of integers. For instance, Now if f were a function, then the definition of a function would imply that since

Example 12 – Solution But applying the formula for f, you find that cont’d But applying the formula for f, you find that and so This contradiction shows that f is not well defined and, therefore, is not a function.

Checking Whether a Function Is Well Defined Note that the phrase well-defined function is actually redundant; for a function to be well defined really means that it is worthy of being called a function.

Functions Acting on Sets Given a function from a set X to a set Y, you can consider the set of images in Y of all the elements in a subset of X and the set of inverse images in X of all the elements in a subset of Y.

Example 13 – The Action of a Function on Subsets of a Set Let X = {1, 2, 3, 4} and Y = {a, b, c, d, e}, and define F : X → Y by the following arrow diagram: Let A = {1, 4}, C = {a, b}, and D = {c, e}. Find F(A), F(X), F−1(C), and F−1(D).