The Pigeonhole Principle & Functions

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

Functions, High-School Edition

Functions, High-School Edition

Functions, High-School Edition

Functions, High-School Edition

A graph is a mathematical structure for representing relationships.

Functions, High-School Edition

Comparing sizes of sets

Graph Theory Part Two

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

f(x) = x4 5x2 + 4 source:

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

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

Extra Practice Problems 2

Cardinality Lectures

Outline for Today. The Pigeonhole Principle. Graph Theory Party Tricks. The Hadwiger-Nelson Problem. Results that are too big to fail.

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

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

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

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.

It is important that you show your work. There are 134 points available on this test.

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

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

1.5 Part - 2 Inverse Relations and Inverse Functions

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

The Language of Sets and Functions

COMPUTABILITY THEORY AND RECURSIVELY ENUMERABLE SETS

Ma/CS 6b Class 26: Art Galleries and Politicians

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

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

Math.3336: Discrete Mathematics. Chapter 10 Graph Theory

EDAA40 At home exercises 1

Combinatorial Gems. Po-Shen Loh. June 2009

Using Arithmetic of Real Numbers to Explore Limits and Continuity

Chapter 4. Relations & Graphs. 4.1 Relations. Exercises For each of the relations specified below:

Lecture 5: The Halting Problem. Michael Beeson

function at the given point. Thus, for our previous example we would find that lim f(x) = 0

Lecture 17: Continuous Functions

Section 1.1. Inductive Reasoning. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

Graph Theory Part Two

MITOCW watch?v=4dj1oguwtem

Figure 1: From Left to Right, General Venn Diagrams for One, Two, and Three Sets

Treewidth and graph minors

Technische Universität München Zentrum Mathematik

1.6 objective: Quiz on Friday

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

MA651 Topology. Lecture 4. Topological spaces 2

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

Material from Recitation 1

Section 1.1. Inductive Reasoning. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

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

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

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

THE FUNDAMENTAL GROUP AND THE BROUWER FIXED POINT THEOREM

Functions and Sequences Rosen, Secs. 2.3, 2.4

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

CONNECTED SPACES AND HOW TO USE THEM

Cantor s Diagonal Argument for Different Levels of Infinity

A B. bijection. injection. Section 2.4: Countability. a b c d e g

1 Counting triangles and cliques

Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS

5 Graphs

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

Technische Universität München Zentrum Mathematik

Infinity and Uncountability. Countable Countably infinite. Enumeration

Announcements Wednesday, August 23

Some announcements. Game reflections deadline extended to Monday (4/4)

9.5 Equivalence Relations

Lecture 7: the quotient topology

Algorithms (III) Yu Yu. Shanghai Jiaotong University

2.3: FUNCTIONS. abs( x)

The Size of the Cantor Set

Introduction to Sets and Logic (MATH 1190)

Skill 3 Relations and Functions

0.1 Welcome. 0.2 Insertion sort. Jessica Su (some portions copied from CLRS)

Fundamental Graph Algorithms Part Four

Algorithms (III) Yijia Chen Shanghai Jiaotong University

CS 2530 INTERMEDIATE COMPUTING

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

Announcements Wednesday, August 23

Computation, Computers, and Programs. Administrivia. Resources. Course texts: Kozen: Introduction to Computability Hickey: Introduction to OCaml

Outline for Today. Planar Graphs. Graph Coloring. The Pigeonhole Principle. Ramsey Theory. The Hadwiger-Nelson Problem (ITA)

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

1 Some Solution of Homework

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

Math 5801 General Topology and Knot Theory

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions.

Lecture 8: The Traveling Salesman Problem

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

Generell Topologi. Richard Williamson. May 27, 2013

arxiv: v1 [math.co] 17 Jan 2014

Lecture 11 COVERING SPACES

STORING IMAGES WITH FRACTAL IMAGE COMPRESSION

Math 443/543 Graph Theory Notes

Reductions and Satisfiability

Discrete mathematics , Fall Instructor: prof. János Pach

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

Transformations and Isometries

Finite Automata Part Three

Transcription:

The Pigeonhole Principle & Functions Problem Problem Set Set Two Two due due in in the the box box up up front. front.

The pigeonhole principle is the following: If m objects are placed into n bins, where m > n, then some bin contains at least two objects. (We sketched a proof in Lecture #02)

Why This Matters The pigeonhole principle can be used to show results must be true because they are too big to fail. Given a large enough number of objects with a bounded number of properties, eventually at least two of them will share a property. Can be used to prove some surprising results.

Using the Pigeonhole Principle To use the pigeonhole principle: Find the m objects to distribute. Find the n < m buckets into which to distribute them. Conclude by the pigeonhole principle that there must be two objects in some bucket. The details of how to proceeds from there are specific to the particular proof you're doing.

A Surprising Application Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color. Proof: Consider any equilateral triangle whose side Thought: There two here, lengths are d. Put thisare triangle anywhere inwe the Thought: There are two colors colors here, so so ifif we picking we'll them plane. By start the because startpigeonhole picking points, points,principle, we'll be be dropping dropping themthere into of (red blue). are three vertices, of buckets the vertices into one onetwo of two two buckets (red or ormust blue).have the same color. These vertices are at distance d from How many do How many points points do we we need need to to pick pick to to each other, as required. guarantee guarantee that that we we get get two two of of the the same same color? color?

A Surprising Application Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color. Proof: Consider any equilateral triangle whose side lengths are d.points Put this triangle anywhere in the Any pair of these Any pair of these points plane. By dthe pigeonhole principle, because there isis at distance from one at distance d from one are three vertices, two of the vertices must have the another. Since two must another. Since two must d are dat distance d from same color. These vertices be be the the same same color, color, there there each other, as required. d is a pair of points of the is a pair of points of the same same color color at at distance distance d! d!

A Surprising Application Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color. Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required.

The Hadwiger-Nelson Problem No matter how you color the points of the plane, there will always be two points at distance 1 that are the same color. Relation to graph coloring: Every point in the real plane is a node. There's an edge between two points that are at distance exactly one. Question: What is the chromatic number of this graph? (That is, how many colors do you need to ensure no points at distance 1 are the same color?) This is the Hadwiger-Nelson problem. It's known that the number is between 4 and 7, but no one knows for sure!

Theorem: For any nonzero natural number n, there is a nonzero multiple of n whose digits are all 0s and 1s.

Theorem: For any nonzero natural number n, there is a nonzero multiple of n whose digits are all 0s and 1s. 111111111 1111111111 1111111111-1111111111 1111111110 1 11 111 1111 11111 111111 1111111 11111111 0 1 2 3 4 5 6 7 8

Proof Idea Generate the numbers 1, 11, 111, until n + 1 numbers are generated. There are n possible remainders modulo n, so two of these numbers have the same remainder. Their difference is a multiple of n. Their difference consists of 1s and 0s.

Theorem: Every positive natural number has a nonzero multiple whose digits are all 0s and 1s. Proof: Let n be an arbitrary positive natural number. For every natural number k in the range 0 k n, define Xₖ as k Xₖ = i 10. i=0 Now, consider the remainders of the Xₖ's modulo n. Since there are n + 1 Xₖ's and n remainders modulo n, by the pigeonhole principle there must be at least two Xₖ's that leave the same remainder modulo n. Let Xₛ and Xₜ be two of these numbers and let r be that remainder. Without loss of generality, let s > t. Since Xₛ ₙ r, there exists a qₛ ℤ such that Xₛ = nqₛ + r. Since Xₜ ₙ r, there exists a qₜ ℤ such that Xₜ = nqₜ + r. Therefore, Xₛ Xₜ = (nqₛ + r) (nqₜ + r) = nqₛ nqₜ = n(qₛ qₜ). Therefore, Xₛ Xₜ is a multiple of n. Moreover, we have s i t i Xₛ Xₜ= 10 10 = i=0 i=0 s i 10. i=t +1 So Xₛ Xₜ is a sum of distinct powers of ten, so its digits are 0s and 1s. Therefore Xₛ Xₜ is a nonzero multiple of n whose digits are all 0s and 1s.

Announcements!

Friday Four Square! Today at 4:15PM, in front of Gates

Problem Set Three Problem Set Two due at the start of today's lecture, or Monday with a late period. Problem Set Three out. Checkpoint due next Monday at the start of lecture. Rest of the problem set due Friday. Play around with graphs, relations, and the pigeonhole principle!

Your Questions

How do you decide whether a statement needs to be proved with a lemma or is counted as logical reasoning?

Can we email you or TAs questions we have about homework? Yes! Yes! Please! Please!

Functions

A function is a means of associating each object in one set with an object in some other set.

Dikdik Nubian Ibex Sloth

Black and White

Terminology A function f is a mapping such that every element of A is associated with a single element of B. For each a A, there is some b B with f(a) = b. If f(a) = b0 and f(a) = b1, then b0 = b1. If f is a function from A to B, we say that f is a mapping from A to B. We call A the domain of f. We call B the codomain of f. We denote that f is a function from A to B by writing f:a B

Defining Functions Typically, we specify a function by describing a rule that maps every element of the domain to some element of the codomain. Examples: f(n) = n + 1, where f : ℤ ℤ f(x) = sin x, where f : ℝ ℝ f(x) = x, where f : ℝ ℤ Notice that we're giving both a rule and the domain/codomain.

Is this a function from A to B? B A Each Each object object inin the the domain domain has has to to be be associated associated with with exactly exactly one one object object inin the the codomain! codomain!

Is this a function from A to B? California Dover New York Sacramento Delaware Albany Washington DC A Each Each object object inin the the domain domain has has to to be be associated associated with with exactly exactly one one object object inin the the codomain! codomain! B

Is this a function from A to B? Wish Funshine A It's It's fine fine that that nothing nothing isis associated associated with with Friend; Friend; functions functions do do not not need need to to use use the the entire entire codomain. codomain. B Love-a-Lot Tenderheart Friend

Piecewise Functions Functions may be specified piecewise, with different rules applying to different elements. Example: { n/2 if n is even f (n)= (n+1)/2 otherwise When defining a function piecewise, it's up to you to confirm that it defines a legal function!

Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune

Injective Functions A function f : A B is called injective (or one-to-one) if each element of the codomain has at most one element of the domain that maps to it. A function with this property is called an injection. Formally, f : A B is an injection iff For any x0, x1 A: if f(x0) = f(x1), then x0 = x1 An intuition: injective functions label the objects from A using names from B.

Front Door Balcony Window Bedroom Window

Surjective Functions A function f : A B is called surjective (or onto) if each element of the codomain has at least one element of the domain that maps to it. A function with this property is called a surjection. Formally, f : A B is a surjection iff For every b B, there exists at least one a A such that f(a) = b. Intuition: surjective functions cover every element of B with at least one element of A.

Injections and Surjections An injective function associates at most one element of the domain with each element of the codomain. A surjective function associates at least one element of the domain with each element of the codomain. What about functions that associate exactly one element of the domain with each element of the codomain?

Katniss Everdeen Merida Hermione Granger

Bijections A function that associates each element of the codomain with a unique element of the domain is called bijective. Such a function is a bijection. Formally, a bijection is a function that is both injective and surjective. Bijections are sometimes called one-to-one correspondences. Not to be confused with one-to-one functions.

Compositions

www.microsoft.com www.apple.com www.google.com

Function Composition Let f : A B and g : B C. The composition of f and g (denoted g f) is the function g f : A C defined as (g f)(x) = g(f(x)) Note that f is applied first, but f is on the right side! Function composition is associative: h (g f) = (h g) f

Function Composition Suppose f : A A and g : A A. Then both g f and f g are defined. Does g f always equal f g? In general, no: Let f(x) = 2x Let g(x) = x + 1 (g f)(x) = g(f(x)) = g(2x) = 2x + 1 (f g)(x) = f(g(x)) = f(x + 1) = 2x + 2

Next Time Cardinality Formalizing infinite cardinalities Diagonalization ℕ ℝ Formalizing Cantor's Theorem