Functions. How is this definition written in symbolic logic notation?

Similar documents
Functions. Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A.

Functions 2/1/2017. Exercises. Exercises. Exercises. and the following mathematical appetizer is about. Functions. Functions

3. Determine whether f is a function from the set of all bit strings to the set of integers if

2.3: FUNCTIONS. abs( x)

2. Functions, sets, countability and uncountability. Let A, B be sets (often, in this module, subsets of R).

Functions and Sequences Rosen, Secs. 2.3, 2.4

Notes on metric spaces and topology. Math 309: Topics in geometry. Dale Rolfsen. University of British Columbia

Lecture 17: Continuous Functions

CPSC 121: Models of Computation PART 1 REVIEW OF TEXT READING

Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS

Let A(x) be x is an element of A, and B(x) be x is an element of B.

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

Comparing sizes of sets

MATH 22 MORE ABOUT FUNCTIONS. Lecture M: 10/14/2003. Form follows function. Louis Henri Sullivan

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

Cardinality Lectures

EDAA40 At home exercises 1

M3P1/M4P1 (2005) Dr M Ruzhansky Metric and Topological Spaces Summary of the course: definitions, examples, statements.

Announcements. Problem Set 3 due Friday, October 21. Alternate Midterm Times. Drop by office hours! Ask questions at

T. Background material: Topology

Math 205B - Topology. Dr. Baez. February 23, Christopher Walker

MA651 Topology. Lecture 4. Topological spaces 2

MATHEMATICS 191, FALL 2004 MATHEMATICAL PROBABILITY Outline #1 (Countability and Uncountability)

2. Metric and Topological Spaces

2/18/14. Uses for Discrete Math in Computer Science. What is discrete? Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.

Functions. Prof. Susan Older. 20 October (CIS 375) Functions 20 Oct / 14

CHAPTER 7. Copyright Cengage Learning. All rights reserved.

The Language of Sets and Functions

Func%ons (Math) Func%on Defini%ons. Func%ons (Computer Sciences) Func%on = mappings or transforma%ons Math examples:

1KOd17RMoURxjn2 CSE 20 DISCRETE MATH Fall

Functions. Jason Filippou UMCP. Jason Filippou UMCP) Functions / 19

Continuous functions and homeomorphisms

Figure 1.1: This is an illustration of a generic set and its elements.

4 Mathematical Data Types

SET DEFINITION 1 elements members

Point-Set Topology II

Cardinality of Sets. Washington University Math Circle 10/30/2016

INTRODUCTION TO TOPOLOGY

CSC Discrete Math I, Spring Sets

1.3 Functions and Equivalence Relations 1.4 Languages

Functions (4A) Young Won Lim 5/8/17

4. Definition: topological space, open set, topology, trivial topology, discrete topology.

Topology notes. Basic Definitions and Properties.

Elementary Topology. Note: This problem list was written primarily by Phil Bowers and John Bryant. It has been edited by a few others along the way.

2 A topological interlude

4&5 Binary Operations and Relations. The Integers. (part I)

Lecture IV - Further preliminaries from general topology:

Functions (4A) Young Won Lim 3/16/18

Generell Topologi. Richard Williamson. May 6, 2013

Answers to specimen paper questions. Most of the answers below go into rather more detail than is really needed. Please let me know of any mistakes.

Review of Sets. Review. Philippe B. Laval. Current Semester. Kennesaw State University. Philippe B. Laval (KSU) Sets Current Semester 1 / 16

Lecture : Topological Space

MATH 271 Summer 2016 Assignment 4 solutions

MATH 54 - LECTURE 10

Counting. Andreas Klappenecker

9.5 Equivalence Relations

MATH 139 W12 Review 1 Checklist 1. Exam Checklist. 1. Introduction to Predicates and Quantified Statements (chapters ).

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

Sets. De Morgan s laws. Mappings. Definition. Definition

However, this is not always true! For example, this fails if both A and B are closed and unbounded (find an example).

2. Sets. 2.1&2.2: Sets and Subsets. Combining Sets. c Dr Oksana Shatalov, Fall

Notes on point set topology, Fall 2010

W13:Homework:H07. CS40 Foundations of Computer Science W13. From 40wiki

Lecture 7: the quotient topology

.Math 0450 Honors intro to analysis Spring, 2009 Notes #4 corrected (as of Monday evening, 1/12) some changes on page 6, as in .

Math 443/543 Graph Theory Notes

Notes on categories, the subspace topology and the product topology

Slides for Faculty Oxford University Press All rights reserved.

Johns Hopkins Math Tournament Proof Round: Point Set Topology

The Chinese remainder theorem

Lecture notes for Topology MMA100

Mathematics for Computer Science Exercises from Week 4

January 30, 2019 LECTURE 2: FUNCTIONS OF SEVERAL VARIABLES.

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth

On Soft Topological Linear Spaces

Bootcamp. Christoph Thiele. Summer Axioms of set theory. The naive idea of sets is that they colelct objects together. collection of objects

Topology. Min Yan. May 17, 2002

ECS 20 Lecture 9 Fall Oct 2013 Phil Rogaway

CSE 20 DISCRETE MATH. Winter

Module 11. Directed Graphs. Contents

Introduction to Graph Theory

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

Section 1.7 Sequences, Summations Cardinality of Infinite Sets

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Math 443/543 Graph Theory Notes

CSE 20 DISCRETE MATH. Fall

A graph is finite if its vertex set and edge set are finite. We call a graph with just one vertex trivial and all other graphs nontrivial.

13 th Annual Johns Hopkins Math Tournament Saturday, February 19, 2011 Automata Theory EUR solutions

CHAPTER 3 FUZZY RELATION and COMPOSITION

W13:Homework:H08. CS40 Foundations of Computer Science W13. From 40wiki

Section 2.4 Sequences and Summations

Lecture 25 : Counting DRAFT

CHAPTER 3 FUZZY RELATION and COMPOSITION

A metric space is a set S with a given distance (or metric) function d(x, y) which satisfies the conditions

Test Reminder. CSE21: Lecture 7 1

Math 395: Topology. Bret Benesh (College of Saint Benedict/Saint John s University)

5 Graph Theory Basics

= [ U 1 \ U 2 = B \ [ B \ B.

CS388C: Combinatorics and Graph Theory

Basic Properties The Definition of Catalan Numbers

Transcription:

functions 1 Functions Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f(a) = b if b is the unique element of B assigned by the function f to the element a of A. If f is a function from A to B, we write f:a B. How is this definition written in symbolic logic notation? Example 1: True or False: f is a function from the set A={1, 2, 3,4, 5} to the set B={3, 4, 5, 6} if the assignment rule is f(1) = 3, f(2) = 3, f(3) = 1, f(3) = 2, f(4) = 5. True or False: f is a function from the set A={1, 2, 3,4, 5} to the set B={3, 4, 5, 6} if the assignment rule is f(1) = 3, f(2) = 3, f(3) = 4, f(4) = 5. True or False: f is a function from the set A={1, 2, 3,4, 5} to the set B={3, 4, 5, 6} if the assignment rule is f(1) = 3, f(2) = 3, f(3) = 4, f(3) = 2, f(4) = 5, f(5) = 6. Definition: A bit string is a sequence of 0 s and or 1 s. Let us assume that the first bit is the rightmost bit. The length of a bit string is the number of bits in the string. Example 2: Determine whether f is a function from the set of all finite length bit strings to the set of integers if a) f(s) is the position of a 1 bit in the bit string S. b) f(s) is the smallest integer i such that the i th bit of S is 1. c) f(s) is the smallest integer i such that the i th bit of S is 1 and f(s) = 0 whenever S is the empty string or the constant 0 s string. Example3: Determine whether f is a function from the set of real numbers to the set of real numbers if a) f ( a) = a b) f ( a) = a 2 1

functions 2 Definitions. If f is a function from A to B, we say that A is the domain of f and B is the codomain of f. If f(a) = b, we say that b is the image of a and a is a pre-image of b. The range of f is the set of all images of elements of A. Also, if f is a function from A to B, we say that f maps A to B. Example 4: Let R be the set of real numbers. Define f:r R by f(x) = x + 1. In this example we see that: 1. The domain is. 2. The codomain is. 3. Since f(3) = 4, the number 4 is the image of the number 3, and 3 is the preimage of 4. 4. The range is R. Example 5: Let Z be the set of integers, and Z + be the set of nonnegative integers. Define f:z Z by f(x) = x. In this example we see that: 1. The domain is 2. The codomain is 3. Since f(-2) = 2, the number 2 is the of the number -2, and -2 is a of 2. 4. The range is Z +. (Note that the codomain is not the same as the range). Example 6: The floor function assigns to the real number x is the largest integer that is less than or equal to x. The value of the floor function at x is denoted by x. 1. What is the domain of this function? 2. What is the range of this function? 3. What is the image of 1.99? 4. What is "a" pre-image of 4? Definition: The ceiling function assigns to the real number x is the smallest integer that is greater than or equal to x. The value of the ceiling function at x is denoted by x. 2

functions 3 Definition. Let f be a function from the set A to the set to the set B and let S be a subset of A. The image of a set S is the subset of B that consists of the images of the elements of S. We denote the image of S by f(s), so that f ( S) = { f ( s) s S}. Example 7: i) Let f:r R be defined by f ( x) = 2 x and S = {x 0 < x < 3}. Find f(s) = ii) Let f:r R be defined by f(x) = x 2 +1 and let S = {0, 1, 2}. Find f(s) = iii) Let f:r R be defined by f(x) = 3x +1 and let S = {0, 1, 2}. Find f(s) = Theorem Let f be a function from the set A to the set B. Let S and T be subsets of A. Then f(s T) = f(s) f(t). Definition. A function f is said to be one-to-one, or injective, if and only if f(x) = f(y) implies that x = y for all x and y in the domain of f. A function is said to be an injection if it is one-to-one. Example 8: True or False: The function f from {a, b, c, d} to {1, 2, 3, 4, 5} with f(a) = 4, f(b) = 5, f(c) = 1, and f(d) = 3 is one-to-one. True or False: The function f from {a, b, c, d} to {1, 2, 3, 4, 5} with f(a) = 4, f(b) = 4, f(c) = 1, and f(d) = 3 is one-to-one. True or False: The function f(x) = x 2 from the set of integers to the set of integers is one-to-one. 3

functions 4 Example 9: Let S be a bit string of length n. Define f(s) as the smallest integer i such that the i th bit of S is 1 and f(s) = 0 when S is the zero string or the empty string. Is this function one-to-one? Example 10: Prove that the real valued function f(x) = x + 1 is one-to-one. Definition: A function f whose domain and codomain are subsets of the set of real numbers is called strictly increasing if f(x) < f(y) whenever x < y and x and y are in the domain of f. Similarly, f is called strictly decreasing if f(x) > f(y) whenever x < y and x and y are in the domain of f. Axiom of the Real Numbers (tricotomy) : For any two real numbers one of the following properties holds x = y, x < y, or x > y. Theorem. Let f be a real valued function. If f is strictly increasing (or strictly decreasing), then f is one-to-one. Proof. 4

functions 5 Definition. A function f is said to be onto, or surjective, if and only if for every element b B there is an element a A with f(a) = b. A function is called a surjection if it is onto. Example: Let f be the function from {a, b, c, d} to {1, 2, 3} defined by f(a) = 3, f(b) =2, f(c) = 1, and f(d) = 3. Is f onto {1, 2, 3} function? Example 11: Determine whether the real valued function f(x) = x + 1 is onto. Example 12: Determine whether the function f(x) = x 2 from the set of integers to the set of integers is onto. Definition. The function f is called a one-to-one correspondence, or a bijection if it is both one-to-one and onto. Definition. Let f be a bijection from the set A to the set B. The inverse function of f is the function that assigns to an element b belonging to B the unique element a in A such that f(a) = b. The inverse function of f is denoted by f -1. Hence, f -1 (b) = a when f(a) = b. Terminology: A one-to-one correspondence is also called invertible. Example 13: Let f be the function from {a, b, c} to {1, 2, 3} defined by f(a) = 3, f(b) =2, f(c) = 1. Is f an invertible function? If so describe the inverse function. 5

functions 6 Example 14: Let f : Z Z defined by f(x) = x + 1. Is f invertible? If so describe the inverse function. Example 15: Let f : Z Z defined by f(x) = x 2. Is f invertible? If so describe the inverse function. Definition. Let g be a function from the set A to the set B and let f be a function from the set B to the set C. The composition of the functions f and g, denoted by f o g, is defined by ( f o g)( x) = f ( g( x)). Example 16: Let f : Z Z and g : Z Z defined by f(x) = 2x + 3 and g(x) = 3x + 2. What is the composition of f and g? What is the composition of g and f? Definition: Let A be a set. The identity function on A is the function : A A where i A ( x) = x. i A Fact: Let f ( f 1 o f )( a) = a and 1 ( f o f )( b) = b. : A B be an invertible function. If f(a) = b, then 6

Graphs of Functions functions 7 Definition. Let f : A B. The graph of the function f is the set of ordered pairs {( a, b) a A and f ( a) = b} (A graph is a subset of the Cartesian product A B ) Example: Let f : Z Z be defined by f(n) = 2n + 1. Display the graph of f. Example: Let f : R Z be defined by f ( x) = x. Display the graph of f. Exercise : Let S be a subset of a universal set U. The characteristic function f S of S is the function from U to the set {0, 1} (i.e. f S : U {0,1 }) such that f S ( x) = 1 if x belongs to S and f S ( x) = 0 if x does not belong to S. Let A and B be sets. Show that for all x a) f A B ( x) = f A( x) f B ( x) Proof: You give the reasons. f A B ( x) = 1 x A B x A x B f A ( x) = 1 f B ( x) = 1 f ( x) f ( x) = 1 A B 7