Discrete Mathematics. Spring 2017

Similar documents
With Question/Answer Animations. Chapter 6

6.1 Basics of counting

Counting. Chapter 6. With Question/Answer Animations

COUNTING TECHNIQUES. Prepared by Engr. JP Timola Reference: Discrete Math by Kenneth H. Rosen

Sec 5.1 The Basics of Counting

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

Sec.on Summary. The Product Rule The Sum Rule The Subtraction Rule (Principle of Inclusion- Exclusion)

Topics to be covered

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

THE PIGEONHOLE PRINCIPLE. MARK FLANAGAN School of Electrical and Electronic Engineering University College Dublin

With Question/Answer Animations. Chapter 6

Outline. Content The basics of counting The pigeonhole principle Reading Chapter 5 IRIS H.-R. JIANG

Today s Topics. Sometimes when counting a set, we count the same item more than once

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10?

CSCI FOUNDATIONS OF COMPUTER SCIENCE

MC215: MATHEMATICAL REASONING AND DISCRETE STRUCTURES

The Pigeonhole Principle

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions)

Jong C. Park Computer Science Division, KAIST

DISCRETE STRUCTURES COUNTING

Counting: Basics. Four main concepts this week 10/12/2016. Product rule Sum rule Inclusion-exclusion principle Pigeonhole principle

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

March 5, What is the area (in square units) of the region in the first quadrant defined by 18 x + y 20?

CPCS 222 Discrete Structures I Counting

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics

Counting and Probability Math 2320

The Product Rule can be viewed as counting the number of elements in the Cartesian product of the finite sets

CSE 21 Mathematics for Algorithm and System Analysis

Math236 Discrete Maths with Applications

12. 6 jokes are minimal.

Week 6: Advance applications of the PIE. 17 and 19 of October, 2018

Discrete Structures Lecture Permutations and Combinations

Section Summary. Permutations Combinations Combinatorial Proofs

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count

Applications of Fermat s Little Theorem and Congruences

NON-OVERLAPPING PERMUTATION PATTERNS. To Doron Zeilberger, for his Sixtieth Birthday

PIGEONHOLE PRINCIPLE

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability

12th Bay Area Mathematical Olympiad

Counting integral solutions

Introductory Probability

Reading 14 : Counting

CS 3233 Discrete Mathematical Structure Midterm 2 Exam Solution Tuesday, April 17, :30 1:45 pm. Last Name: First Name: Student ID:

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

SOLUTIONS FOR PROBLEM SET 4

2. Nine points are distributed around a circle in such a way that when all ( )

MAT 115: Finite Math for Computer Science Problem Set 5

Sec$on Summary. Permutations Combinations Combinatorial Proofs

1.6 Congruence Modulo m

Non-overlapping permutation patterns

SOLUTIONS TO PROBLEM SET 5. Section 9.1

Class 8: Square Roots & Cube Roots (Lecture Notes)

Assignment 2. Due: Monday Oct. 15, :59pm

Math 127: Equivalence Relations

CMath 55 PROFESSOR KENNETH A. RIBET. Final Examination May 11, :30AM 2:30PM, 100 Lewis Hall

CLASS NOTES. A mathematical proof is an argument which convinces other people that something is true.

Power = 36² mod 99 Power = 9 5 a 5 = 0 x = 81 Power = 9² mod 99 Power = 81 6 a 6 = 1 x = 81 x 81 mod 99 x = 27 7 a 7 = 1 x = 27 x 27 mod 99 x = 36

LEVEL I. 3. In how many ways 4 identical white balls and 6 identical black balls be arranged in a row so that no two white balls are together?

Discrete Math Class 4 ( )

Taiwan International Mathematics Competition 2012 (TAIMC 2012)

Modular arithmetic Math 2320

Chapter 2. Permutations and Combinations

UCSD CSE 21, Spring 2014 [Section B00] Mathematics for Algorithm and System Analysis

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Fundamental. If one event can occur m ways and another event can occur n ways, then the number of ways both events can occur is:.

LESSON 2: THE INCLUSION-EXCLUSION PRINCIPLE

2. How many bit strings of length 10 begin with 1101? a b. 2 6 c. 2 4 d. None of the above.

Lecture 18 - Counting

IMOK Maclaurin Paper 2014

MATH 351 Fall 2009 Homework 1 Due: Wednesday, September 30

Principle of Inclusion-Exclusion Notes

MATHEMATICS ON THE CHESSBOARD

Elementary Combinatorics

Solutions to the 2004 CMO written March 31, 2004

Fermat s little theorem. RSA.

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

Solutions for the Practice Questions

Rosen, Discrete Mathematics and Its Applications, 6th edition Extra Examples

NOTES ON SEPT 13-18, 2012

Discrete probability and the laws of chance

Discrete Mathematics with Applications MATH236

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:

Number Theory - Divisibility Number Theory - Congruences. Number Theory. June 23, Number Theory

Modular Arithmetic. Kieran Cooney - February 18, 2016

Algebra II- Chapter 12- Test Review

A STUDY OF EULERIAN NUMBERS FOR PERMUTATIONS IN THE ALTERNATING GROUP

Permutation Groups. Definition and Notation

Solution: This is sampling without repetition and order matters. Therefore

Cardinality. Hebrew alphabet). We write S = ℵ 0 and say that S has cardinality aleph null.

In this section, we will learn to. 1. Use the Multiplication Principle for Events. Cheesecake Factory. Outback Steakhouse. P.F. Chang s.

CS1802 Week 3: Counting Next Week : QUIZ 1 (30 min)

Primitive Roots. Chapter Orders and Primitive Roots

N-Queens Problem. Latin Squares Duncan Prince, Tamara Gomez February

CIE 2016 Math Comp Math Fun Answer Key. Name: ID: Grade: 7 Room: Start Time: Finish Time:

A natural number is called a perfect cube if it is the cube of some. some natural number.

Combinatorial Proofs

6.2 Modular Arithmetic

Math 42, Discrete Mathematics

Student Outcomes. Classwork. Exercise 1 (3 minutes) Discussion (3 minutes)

Transcription:

Discrete Mathematics Spring 2017

Previous Lecture Binomial Coefficients Pascal s Triangle

The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon

The Pigeonhole Principle Pigeonhole Principle: If k is a positive integer and k + 1 objects are placed into k boxes, then at least one box contains two or more objects Proof: We use a proof by contraposition. Suppose none of the k boxes has more than one object. Then the total number of objects would be at most k. This contradicts the statement that we have k + 1 objects Corollary: A function f from a set with k + 1 elements to a set with k elements is not one-to-one

The Pigeonhole Principle Corollary: A function f from a set with k + 1 elements to a set with k elements is not one-to-one Proof: Use the pigeonhole principle Create a box for each element y in the codomain of f Put in the box for y all of the elements x from the domain such that f (x) = y Because there are k + 1 elements and only k boxes, at least one box has two or more elements Hence, f cannot be one-to-one

Pigeonhole Principle Example: Among any group of 367 people, there must be at least two with the same birthday, because there are only 366 possible birthdays Example: Show that for every integer n there is a multiple of n that has only 0s and 1s in its decimal expansion Solution: Let n be a positive integer. Consider the n + 1 integers 1, 11, 111,..., 11... 1 (where the last number has n + 1 1s) There are n possible remainders when an integer is divided by n. By the pigeonhole principle, when each of the n + 1 integers is divided by n, at least two must have the same remainder. Subtract the smaller from the larger and the result is a multiple of n that has only 0s and 1s in its decimal expansion

Pigeonhole Principle Example: While on a four-week vacation, Herbert will play at least one set of tennis each day, but he will not play more than 40 sets total during this time. Prove that no matter how he distributes his sets during the four weeks, there is a span of consecutive days during which he will play exactly 15 sets Solution: For 1 i 28, let x i be the total number of sets Herbert will play from the start of the vacation to the end of ith day Then 1 x 1 < x 2 < < x 28 40 and x 1 + 15 < x 2 + 15 < < x 28 + 15 55 We have the 28 distinct numbers x 1, x 2,..., x 28 and the 28 distinct numbers x 1 + 15, x 2 + 15,..., x 28 + 15

Pigeonhole Principle These 56 numbers can take only 55 different values, so at least two of them are equal If for 1 i < j 28 we have x i + 15 = x j, then from the start of day i + 1 to the end of day j, Herbert will play exactly 15 sets of tennis

The Generalized Pigeonhole Principle Principle: If N objects are placed into k boxes, then there is at least one box containing at least N/k objects Proof: We use a proof by contraposition. Suppose that none of the boxes contains more than N/k 1 objects. Then the total number of objects is at most k( N k 1) < k(( N k + 1) 1) = N, where the inequality N/k < N/k + 1 has been used. This is a contradiction because there are a total of n objects Example: Among 100 people there are at least 100/12 = 9 who were born in the same month

The Generalized Pigeonhole Principle Example: You are selecting cards from a deck of 52 cards. How many cards must be selected from a standard deck of 52 cards to guarantee that at least three cards of the same suit are chosen? How many must be selected to guarantee that at least three hearts are selected? Solution: We assume four boxes; one for each suit. Using the generalized pigeonhole principle, at least one box contains at least N/4 cards. At least three cards of one suit are selected if N/4 3. The smallest integer N such that N/4 3 is N = 2 4 + 1 = 9 A deck contains 13 hearts and 39 cards which are not hearts. So, if we select 41 cards, we may have 39 cards which are not hearts along with 2 hearts. However, when we select 42 cards, we must have at least three hearts. (Note that the generalized pigeonhole principle is not used here)

The Generalized Pigeonhole Principle Example: Suppose that a computer science laboratory has 15 workstations and 10 servers. A cable can be used to directly connect a workstation to a server. For each server, only one direct connection to that server can be active at any time. We want to guarantee that at any time any set of 10 or fewer workstations can simultaneously access different servers via direct connections Although we could do this by connecting every workstation directly to every server (using 150 connections), what is the minimum number of direct connections needed to achieve the goal?

The Generalized Pigeonhole Principle Solution: Let us label workstations W 1, W 2,..., W 15 and the servers S 1, S 2,..., S 10 Let us connect W k to S k for k = 1, 2,..., 10 and each of W 11, W 12, W 13, W 14, and W 15 to all 10 servers. We have a total of 60 direct connections Clearly any set of 10 or fewer workstations can simultaneously access different servers Now suppose that there are fewer than 60 direct connections Then some server is connected to at most 5 workstations. (If all servers were connected to at least 6 workstations, there would be at least 60 connections) This means that the remaining 9 servers are not enough to allow other 10 workstations to simultaneously access different servers

Ramsey Numbers Assume that in a group of six people, each two individuals are either friends or enemies. Show that there are either three mutual friends or three mutual enemies in the group Solution: Let A be one of the six people Of the five other people in the group, there are either three or more who are friends of A, or three or more who are enemies of A Indeed, by the generalized pigeonhole principle, when 5 objects are divided into 2 sets, one of the sets contains at least 5/2 = 3 objects In the former case, suppose that B, C, and D are friends of A If any of these 3 individuals are friends, then these two and A form a group of 3 friends Otherwise, B, C, and D form a group of 3 enemies

Ramsey Numbers The Ramsey number R(m, n), where m and n are positive integers greater than or equal to 2, denotes the minimum number of people at a party such that there are either m mutual friends or n mutual enemies, assuming that every pair of people at the party are friends or enemies In the example above we showed that R(3, 3) 6

Pigeonhole Principle: Examples An auditorium has a seating capacity of 800. How many seats must be occupied to guarantee that at least two people seated in the auditorium have the same first and last initials Let ABCD be a square with AB = 1. Show that if we select 5 points in the interior of this square, there are at least two whose distance apart is less than 1/ 2

Homework for practice (not graded) Exercises from the Book: Section 6.2: Exercises 2, 4, 6, 8, 12