cs 173 discrete mathematical structures l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
CS 173: Discrete Mathematical Structures PowerPoint Presentation
Download Presentation
CS 173: Discrete Mathematical Structures

Loading in 2 Seconds...

play fullscreen
1 / 22

CS 173: Discrete Mathematical Structures - PowerPoint PPT Presentation


  • 278 Views
  • Uploaded on

CS 173: Discrete Mathematical Structures Cinda Heeren heeren@cs.uiuc.edu Rm 2213 Siebel Center Office Hours: M 11a-12p CS 173 Announcements Homework 3 returned in section this week. Homework 4 available. Due 09/24, 8a. f(x) = -(1/2)x - 25 domain co-domain CS 173 Functions

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'CS 173: Discrete Mathematical Structures' - adamdaniel


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
cs 173 discrete mathematical structures

CS 173:Discrete Mathematical Structures

Cinda Heeren

heeren@cs.uiuc.edu

Rm 2213 Siebel Center

Office Hours: M 11a-12p

cs 173 announcements
CS 173 Announcements
  • Homework 3 returned in section this week.
  • Homework 4 available. Due 09/24, 8a.

Cs173 - Spring 2004

cs 173 functions

f(x) = -(1/2)x - 25

domain

co-domain

CS 173 Functions

Suppose we have:

And I ask you to describe the yellow function.

What’s a function?

Notation: f: RR, f(x) = -(1/2)x - 25

Cs173 - Spring 2004

cs 173 functions4
CS 173 Functions

Definition: a function f : A  B is a subset of AxB where  a  A, ! b  B and <a,b>  f.

Cs173 - Spring 2004

cs 173 functions5

B

A

A point!

A collection of points!

CS 173 Functions

Definition: a function f : A  B is a subset of AxB where  a  A, ! b  B and <a,b>  f.

B

A

Cs173 - Spring 2004

cs 173 functions6

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

CS 173 Functions

A = {Michael, Tito, Janet, Cindy, Bobby}

B = {Katherine Scruse, Carol Brady, Mother Teresa}

Let f: A  B be defined as f(a) = mother(a).

Cs173 - Spring 2004

cs 173 functions image preimage

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

What about the range?

Some say it means codomain, others say, image. Since it’s ambiguous, we don’t use it at all.

f(S) = image(S)

CS 173 Functions - image & preimage

For any set S  A, image(S) = {b : a  S, f(a) = b}

So, image({Michael, Tito}) = {Katherine Scruse} image(A) = B - {Mother Teresa}

Cs173 - Spring 2004

cs 173 functions image preimage8

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

preimage(S) = f-1(S)

CS 173 Functions - image & preimage

For any S  B, preimage(S) = {a: b  S, f(a) = b}

So, preimage({Carol Brady}) = {Cindy, Bobby} preimage(B) = A

Cs173 - Spring 2004

cs 173 functions image preimage9

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

 S

CS 173 Functions - image & preimage

What is image(preimage(S))?

  • S
  • { }
  • subset of S
  • superset of S
  • who knows?

Cs173 - Spring 2004

cs 173 functions image preimage10

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

Suppose S is {Janet, Cindy}

preimage(image(S)) = A

CS 173 Functions - image & preimage

What is preimage(image(S))?

Cs173 - Spring 2004

cs 173 functions misc properties

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

CS 173 Functions - misc. properties
  • f() = 
  • f({a}) = {f(a)} (this is a definition, actually)
  • f(A U B) = f(A) U f(B)
  • f(A  B)  f(A)  f(B)

Cs173 - Spring 2004

cs 173 functions misc properties12
CS 173 Functions - misc. properties

f(A  B)  f(A)  f(B)?

Choose an arbitrary c  f(A  B), and show that it must also be an element of f(A)  f(B).

f(A  B) = {x : a  (A  B), f(a) = x}

So, a (A  B) such that f(a) = c.

Since a  A, f(a) = c  f(A).

Since a  B, f(a) = c  f(B).

c  f(A), and c  f(B), so c  f(A)  f(B).

Cs173 - Spring 2004

cs 173 functions misc properties13

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

CS 173 Functions - misc. properties
  • f-1() = 
  • f-1(A U B) = f-1(A) U f-1(B)
  • f-1(A  B) = f-1(A)  f-1(B)

Cs173 - Spring 2004

cs 173 functions injection

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

Not one-to-one

Every b  B has at most 1 preimage.

CS 173 Functions - injection

A function f: A  B is one-to-one (injective, an injection) if a,b,c, (f(a) = b  f(c) = b)  a = c

Cs173 - Spring 2004

cs 173 functions surjection

Michael Tito Janet Cindy Bobby

Katherine Scruse

Carol Brady

Mother Teresa

Not onto

Every b  B has at least 1 preimage.

CS 173 Functions - surjection

A function f: A  B is onto (surjective, a surjection) if b  B, a  A f(a) = b

Cs173 - Spring 2004

cs 173 functions bijection

Isaak Bri Lynette Aidan Evan

Isaak Bri Lynette Aidan Evan

Cinda Dee Deb Katrina Dawn

Cinda Dee Deb Katrina Dawn

Every b  B has exactly 1 preimage.

An important implication of this characteristic:

The preimage (f-1) is a function!

CS 173 Functions - bijection

A function f: A  B is bijective if it is one-to-one and onto.

Cs173 - Spring 2004

cs 173 functions examples

yes

yes

yes

CS 173 Functions - examples

Suppose f: R+  R+, f(x) = x2.

Is f one-to-one?

Is f onto?

Is f bijective?

Cs173 - Spring 2004

cs 173 functions examples18

no

yes

no

CS 173 Functions - examples

Suppose f: R  R+, f(x) = x2.

Is f one-to-one?

Is f onto?

Is f bijective?

Cs173 - Spring 2004

cs 173 functions examples19

no

no

no

CS 173 Functions - examples

Suppose f: R  R, f(x) = x2.

Is f one-to-one?

Is f onto?

Is f bijective?

Cs173 - Spring 2004

cs 173 functions composition
CS 173 Functions - composition

Let f:AB, and g:BC be functions. Then the composition of f and g is:

(g o f)(x) = g(f(x))

Cs173 - Spring 2004

cs 173 functions a little problem
CS 173 Functions - a little problem

Let f:AB, and g:BC be functions.

Prove that if f and g are one to one, then g o f :AC is one to one.

Recall defn of one to one: f:A->B is 1to1 if f(a)=b and f(c)=b --> a=c.

Suppose g(f(x)) = y and g(f(w)) = y. Show that x=w.

f(x) = f(w) since g is 1 to 1.

Then x = w since f is 1 to 1.

Cs173 - Spring 2004

cs 173 functions another
CS 173 Functions - another

Let f:AB, and g:BC be functions.

Prove that if f and g are onto, then g o f :AC is onto.

Cs173 - Spring 2004