EECS 20 Lecture 3 (January 22, 2001) Tom Henzinger Sets, Tuples, Functions.

Slides:



Advertisements
Similar presentations
The Logic of Quantified Statements
Advertisements

Week 1 Chapter 1 + Appendix A Signals carry information Signals are represented by functions Systems transform signals Systems are represented by functions,
EECS 20 Lecture 7 (January 31, 2001) Tom Henzinger Reactive Systems.
EECS 20 Lecture 2 (January 19, 2001) Tom Henzinger Mathematical Language.
Week 1 1.websitewebsite 2.takehome examtakehome 3.Chapter Appendix A.
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
Let A = {1,2,3,4} and B = {a,b,c}. Define the relation f from A to B by f = {(1,b), (2,a), (3,c), (4,b)}. Is f a function? (1) Yes (2) No.
EECS 20 Lecture 4 (January 24, 2001) Tom Henzinger Block Diagrams.
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,
RELATIONS AND FUNCTIONS
2.1 Functions and their Graphs p. 67. Assignment Pp #5-48 all.
Function: Definition A function is a correspondence from a first set, called the domain, to a second set, called the range, such that each element in the.
Exponential Functions Section 1. Exponential Function f(x) = a x, a > 0, a ≠ 1 The base is a constant and the exponent is a variable, unlike a power function.
Graphing Linear Equations
12.2 Functions and Graphs F(X) = x+4 where the domain is {-2,-1,0,1,2,3}
MAPPINGS and FUNCTIONS
Graphing Piecewise Functions
A function from a set A to a set B is a relation that assigns to each element x in the set A exactly one element y in the set B. The set A is called the.
Temperature Readings The equation to convert the temperature from degrees Fahrenheit to degrees Celsius is: c(x) = (x - 32) The equation to convert the.
Functions and their Graphs. Relations A relation is a mapping of input values with output values. The set of x-values (input values) is called the domain.
4.4 Equations as Relations
Definition of a Function A function is a set of ordered pairs in which no two ordered pairs of the form (x, y) have the same x-value with different y-values.
Functions Relation such that each element x in a set A maps to EXACTLY ONE element y in a set B  Set A: Domain = set of all numbers for which the formula.
Mathematical preliminaries Episode 2 0 Sets Sequences Functions Relations Strings.
Standard: M8A3 c. Distinguish between relations that are functions and those that are not functions. Relations and Functions.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
7-9: Square Root Functions and Inequalities. What You Will Learn  Graph and analyze square root functions.  Graph square root inequalities.
MATH 224 – Discrete Mathematics
Sets Goal: Introduce the basic terminology of set theory.
Domain & Range Domain & Range Algebra 1 By: A. C. Rivera.
2.1 Functions.
Section 2.1 Notes: Relations and Functions
Algebra 1cc Functions 3 Determine the domain and range of a function from its graph Recall: the domain of a function is its independent or x values. The.
Temperature Readings The equation to convert the temperature from degrees Fahrenheit to degrees Celsius is: c(x) = (x - 32) The equation to convert the.
Inverse functions: if f is one-to-one function with domain X and range Y and g is function with domain Y and range X then g is the inverse function of.
3.1 Solving Systems By Graphing Or Substitution. * A system of equations is a collection of equations in the same variable. *A solution to a system is.
2.1 Functions and their Graphs Standard: Students will understand that when a element in the domain is mapped to a unique element in the range, the relation.
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.
2-1 Relations & Functions. Important Terms Function: a relation in which each element in the domain is paired with exactly one element in the range Domain:
Relations and Functions Objective: To use tables and graphs to represent relations and functions.
Sets.
EQUATION IN TWO VARIABLES:
2.1 Functions and their Graphs
FUNCTION DEFINITION: A RELATION IN WHICH EACH ELEMENT OF THE DOMAIN IS PAIRED WITH EXACTLY ONE ELEMENT OF THE RANGE. IN OUR OWN WORDS THIS MEANS ALL X-VALUES.
Functions FUNCTIONS AND THEIR GRAPHS Essential Questions:
Objective 1A f(x) = 2x + 3 What is the Range of the function
Functions Introduction.
Mathematics for Computer Science MIT 6.042J/18.062J
Relations.
Algebra 1 Section 5.2.
Relations and Functions
Bellwork Solve by graphing y < x + 2 y > -1/2x + 5.
Aim: What is the function notation?
State Machines EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger.
Relations for functions.
Graphs of Functions FUNCTIONS AND THEIR GRAPHS Essential Questions:
FUNCTIONS.
Objectives The student will be able to:
Lesson 1.4 Page 25 Ordered Pairs and Relations.
Lecture Sets 2.2 Set Operations.
Make a table and a graph of the function y = 2x + 4
By: Gilberto Rodriguez
5.1 Functions and their Graphs
Function Notation and Evaluating Functions
Objectives The student will be able to:
Objectives The student will be able to:
Mathematical Language
1.2 Functions fguilbert orrhs.
Terminology and Symbols
Presentation transcript:

EECS 20 Lecture 3 (January 22, 2001) Tom Henzinger Sets, Tuples, Functions

1 Sets (unordered collections) 2 Tuples (ordered collections) 3 Functions Important Mathematical Objects

SETS

Let Evens = { x  Nats |  y  Nats, x = 2· y }. Let Evens be the set of all x  Nats such that x = 2· y for some y  Nats.

Let Evens = { x  Nats |  y  Nats, x = 2· y }. Let Evens be the set of all x  Nats such that x = 2· y for some y  Nats. Constants Variables Operators Quantifiers Definition

SETS Set constants : e.g. {1, 2, 3} Set operator :  Set quantifier : { x | … } Additional constants can be defined: e.g. Nats

Additional operators on sets set  set Result: set set  set set set \ set set set  set truth value set = set truth value P ( set ) set

Meaning of additional operators can be defined  set x,  set y, let x  y = { z | z  X  z  Y }.  set x,  set y, let x  y = { z | z  x  z  y }.  set x,  set y, let x \ y = { z | z  x  z  y }.  set x,  set y, let x  y  (  z | z  x  z  y ).  set x,  set y, let x = y  x  y  y  x.  set x, let P ( x ) = { y | y  x }.

TUPLES

Tuple constants ( 2, 7 ) 2-tuple (or “pair”) ( 2, 7, 1 ) 3-tuple (or “triple”) ( b, e, r, k, e, l, e, y ) 8-tuple Note: { 2, 7 } = { 7, 2 } ( 2, 7 )  ( 7, 2 )

Tuple operators ( anything, anything ) Result: pair ( any, any, any ) triple tuple number any Examples: ( 2, 7, 1 ) 2 = 7  pair x, x = ( x 1, x 2 )

Additional operators on tuples pair = pair Result: truth value triple = triple truth value  pair x,  pair y, let x = y  x 1 = y 1  x 2 = y 2.  triple x,  triple y, let x = y   x 1 = y 1  x 2 = y 2  x 3 = y 3.

Additional operators on sets set  set Result: set of pairs set  set  set set of triples  set x, y, let x  y = { u |  v,  w, u = (v,w)  v  x  w  y } = { (v,w) | v  x  w  y }.  set x, y, z, let x  y  z = { (u,v,w) | u  x  v  y  w  z }.

FUNCTIONS

Each function has three things: 1 the domain ( a set ) 2 the range ( a set ) 3 the graph ( for every domain element, a range element )

Function constants sin, cos 1 Domain : Reals. 2 Range : [-1,1] = { x  Reals | -1  x  1 }. 3 Graph : for each real x, the real sin (x)  [-1,1].

Formally, the graph of a function can be thought of as a set of pairs : { (x,y)  ( Reals  [-1,1] ) | y = sin ( x ) } = { …, (0,0), …, (  /2, 1), …, ( ,0), …, (3  /2,-1), … }. 1 0

All operators are really function constants ! Domain : Nats. Range: Nats. Graph: { ( x, y )  Nats  Nats | y = x! } = { (1,1), (2,2), (3,6), (4, 24), … }.

+ Domain : Nats 2 = Nats  Nats. Range: Nats. Graph: { ( (x,y), z )  Nats 2  Nats | z = x + y } = { ( (1,1), 2 ), ( (1,2), 3 ), …, ( (7,5), 12), … }. All operators are really function constants

 Domain : Bools 2. Range: Bools. Graph: { ( (true, true), true ), ( (true, false), false), ( (false, true), false), ( (false, false), false) }. All operators are really function constants

If domain and range of a function are finite, then the graph can be given by a table : true true true true false false false true false false false false x y f(x,y)

Operators on functions domain ( function ) Result: set range ( function ) set graph ( function ) set of pairs function ( domain element ) range element Examples: domain ( sin ) = Reals range ( sin ) = [-1,1] sin (  ) = 0

Function definition Let f : Domain  Range such that  x  Domain, f ( x ) = …

Let double : Nats  Nats such that  x  Nats, double ( x ) = 2· x. domain ( double ) = Nats range ( double ) = Nats graph ( double ) = { (1,2), (2,4), (3,6), (4,8), … }

Let exp : Nats 2  Nats such that  x, y  Nats, exp ( x, y ) = x y. domain ( exp ) = Nats 2 range ( exp ) = Nats graph ( exp ) = { ( (1,1), 1 ), …, ( (2,3), 8 ), … }

Additional operators on functions [ set  set ] Result: set of functions function  function function one-to-one ( function ) truth value onto ( function ) truth value

Meaning of additional operators  set x, y, let [ x  y ] = { f | domain ( f ) = x  range ( f ) = y }.  set x, y, z,  f  [ x  y ],  g  [ y  z ], let g  f : x  z such that  u  x, ( g  f ) ( u ) = g ( f ( u ) ).

Meaning of additional operators  function f, let one-to-one ( f )   x, y  domain(f), if x  y then f(x)  f(y).  function f, let onto ( f )   x  range(f),  y  domain(f), x = f(y).