1 / 22

Functions: Compositions, one-to-one , b ijections , pigeonhole principle and permutations

Functions: Compositions, one-to-one , b ijections , pigeonhole principle and permutations. Autumn Van Gogh. Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois. Administrative. Exam on Tuesday Review materials available online

heath
Download Presentation

Functions: Compositions, one-to-one , b ijections , pigeonhole principle and permutations

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Functions: Compositions, one-to-one, bijections, pigeonhole principle and permutations AutumnVan Gogh Discrete Structures (CS 173) Madhusudan Parthasarathy, University of Illinois

  2. Administrative • Exam on Tuesday • Review materials available online • Read them and prepare questions for discussion section tomorrow • Henry Lin: review session 6-8 pm on Saturday at  2406 Siebel • See Piazza post about office hours next week (all on Monday!)

  3. Administrative • Grading of HW3: • TAs and graders are working to get these graded by Monday. • But look at the solutions posted before that!

  4. Feedback from TAs • READ THE SOLUTIONS!! • The homework proofs were graded very leniently. But things will get harder soon. • So please look at the solutions. That’s what we really expect in homeworks and exams.

  5. Last class: functions • A function must have a type signature and a mapping • A functionmust have exactly one output for each input (any number of inputs can be assigned the same output) • For two functions to be equal, both the type signature and the assignment must be the same • A function is ontoiffevery output element is assigned at least once. co-domain domain

  6. Today’s class: more with functions • Composing functions • When is a function “one-to-one” or “bijective”? • What is the inverse of a function? • The Pigeonhole principle • Permutations and their applications

  7. Composition What is wrong with ”

  8. Proof with composition Claim: For sets , if are onto, then is also onto. Definition: is onto iff

  9. One-to-one is a preimageof if . One-to-one: no two inputs map to the same output (no output has more than one preimage) contrapositive? overhead

  10. Proof of one-to-one Claim: is one-to-one. Definition: is one-to-one iff overhead

  11. Proof that one-to-one is compositional Claim: For any sets and functions , if and are one-to-one, then is also one-to-one. Definition: is one-to-one iff

  12. Bijection and inversion A function is bijectiveif it is onto and one-to-one. Inverse function if , then. is also a bijection. overhead

  13. Pigeonhole principle Pigeonhole principle: if you put n objects into r holes, and r<n, then at least one hole must contain at least two objects! This class has ~400 students. Is every day someone’s birthday? Do two students have the same birthday? Claim: The first 50 powers of 13 include at least two numbers whose difference is a multiple of 47. Claim: Suppose people are at a party and everyone has at least one admirer. At least two people will have the same number of admirers.

  14. Proof with bijective Claim: If A is finite and is bijective, then Definition: is one-to-oneiff every output is assigned at most once Definition: is ontoiffevery output is assigned at least once

  15. Proof with one-to-one Let A, B be subsets of reals. Claim: Any strictly increasing function from A to B is one-to-one. Definition: is one-to-oneiff Definition: is strictly increasingiff overhead

  16. Permutations Ordered selection Suppose I have 6 gems, and you get to choose 1. How many different combinations of gems can you choose? Suppose I have gems and want to put them in a row from left to right. How many different ways can I arrange them? Suppose I have 6 gems and want to put three of them in a row from left to right. How many different ways can I arrange them? Unordered selection Suppose I have 6 gems, and you get to choose 2. How many different combinations of gems can you choose? Suppose I have gems, and you choose . How many combinations?

  17. Permutations Suppose with and . How many different one-to-one functions can I create? How many ways can I rearrange the letters in “nan”? How many ways can I rearrange the letters in “yellowbelly”?

  18. Things to remember • One-to-one: no two inputs are assigned to the same output • Bijection: one-to-one and onto • Pigeonhole principle: if you have more objects than labels, some objects must get the same label

  19. See you Tuesday • Good luck on exam!

More Related