21
1 Lecture 1b Review of Discrete Structures + The Pigeonhole Principle

3 Lec 1b Review of Discr Str + Pigeonhole

Embed Size (px)

DESCRIPTION

3 Lec 1b Review of Discr Str + Pigeonhole

Citation preview

  • 1

    Lecture 1b

    Review of Discrete Structures +

    The Pigeonhole Principle

  • Recall some Discrete Structures

    Relation

    Homogeneous relation (relation on)

    Function, partial function

    Injection, surjection, bijection

    Injection = one-to-one function

    Surjection = onto function

    Bijection = one-to-one correspondence

    2

  • Recall some Discrete Structures

    3

    a b f(a) f(b) contrapositive

  • A surjective function is a function whose image is equal to its codomain. Equivalently, a function f with domain X and codomain Y is surjective if for every y in Y there exists at least one x in X with .

    4

  • 5

  • The term surjective and the related terms injective and bijective were introduced by Nicolas Bourbaki, the pseudonym for a group of mainly French 20th-century mathematicians who wrote a series of books presenting an exposition of modern advanced mathematics, beginning in 1935.

    6

  • Partial Functions

    f: X Y is a partial function iff

    xX: |f(x)| 1

    Sometimes also denoted f: X Y using an arrow with vertical stroke.

    Another definition

    A partial function f: X Y is a function f: X' Y, where X' X.

    7

  • Partial functions

    It generalizes the concept of a function f: X Y by not forcing f to map every element of X to an element of Y.

    If X' = X, then f is called a total function and is equivalent to a function.

    Partial functions are often used when the exact domain, X' , is not known (e.g. many functions in computability theory).

    Specifically, we will say that for any x X, either: f(x) = y Y (it is defined as a single element in Y) or

    f(x) is undefined.

    8

  • Partial functions

    9

    For example we can consider the square root function restricted to the integers Thus g(n) is only defined for n that are perfect squares (i.e. 0, 1, 4, 9, 16, ...). So, g(25) = 5, but g(26) is undefined.

  • Partial functions

    There are two distinct meanings in current mathematical usage for the notion of the domain of a partial function.

    Most mathematicians, including recursion theorists, use the term "domain of f" for the set of all values x such that f(x) is defined (X' above).

    But some, particularly category theorists, consider the domain of a partial function f:XY to be X, and refer to X' as the domain of definition.

    10

  • Partial functions

    Similarly, the term range can refer to either the codomain Y or the image f(X) = {yY: xX: y=f(x)} of a function. In other words, the range of f is the set of all values that the function assigns to its arguments.

    11

  • Partial functions

    A partial function is said to be injective or surjective when the total function given by the restriction of the partial function to its domain of definition is.

    A partial function may be both injective and surjective, but the term bijection generally only applies to total functions.

    12

  • A useful rule often used without thinking

    13

    The Pigeonhole Principle

  • Colloquial version: If n pigeons fly into m < n pigeonholes, then at least one pigeonhole will have more than one pigeons

    14

    The Pigeonhole Principle

  • Illustration

    15

  • Illustration

    16

    10 pigeons 9 holes

  • Pigeonhole principle

    In more formal terms: if A and B are finite sets and |A| > |B| then no function A B is an injection.

    This is not true for infinite sets!

    17

  • Can be proved formally, e.g., Epp 4th ed. 561, Gopalakrishnan 85

    18

  • Examples of usage

    19

  • Examples of usage

    20

    Length n means n arrows which is n+1 nodes

  • Resources

    Hein 111

    Epp 4t ed. 554

    Gopalakrishnan 85

    Sipser 3rd 78

    21