Section 5.1 The Basics of Counting

Similar documents
CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

Chapter 1 : Combinatorial Analysis

Permutations & Combinations. Dr Patrick Chan. Multiplication / Addition Principle Inclusion-Exclusion Principle Permutation / Combination

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) =

Permutations, Combinations, and the Binomial Theorem

Math 155 (Lecture 3)

(ii) Two-permutations of {a, b, c}. Answer. (B) P (3, 3) = 3! (C) 3! = 6, and there are 6 items in (A). ... Answer.

3.1 Counting Principles

ARRANGEMENTS IN A CIRCLE

Injections, Surjections, and the Pigeonhole Principle

CIS Spring 2018 (instructor Val Tannen)

Lecture 10: Mathematical Preliminaries

Chapter 7 COMBINATIONS AND PERMUTATIONS. where we have the specific formula for the binomial coefficients:

MAT1026 Calculus II Basic Convergence Tests for Series

( ) GENERATING FUNCTIONS

Combinatorics II. Combinatorics. Product Rule. Sum Rule II. Theorem (Product Rule) Theorem (Sum Rule)

Chapter 6. Advanced Counting Techniques

Homework 3. = k 1. Let S be a set of n elements, and let a, b, c be distinct elements of S. The number of k-subsets of S is

The Pigeonhole Principle 3.4 Binomial Coefficients

Intermediate Math Circles November 4, 2009 Counting II

COMP 2804 Solutions Assignment 1

The Random Walk For Dummies

MATH 324 Summer 2006 Elementary Number Theory Solutions to Assignment 2 Due: Thursday July 27, 2006

6.3 Testing Series With Positive Terms

P1 Chapter 8 :: Binomial Expansion

Bertrand s Postulate

Generating Functions. 1 Operations on generating functions

Let us consider the following problem to warm up towards a more general statement.

The Binomial Theorem

UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST. First Round For all Colorado Students Grades 7-12 November 3, 2007

4 The Sperner property.

MT5821 Advanced Combinatorics

Ch 3.4 Binomial Coefficients. Pascal's Identit y and Triangle. Chapter 3.2 & 3.4. South China University of Technology

Books Recommended for Further Reading

Is mathematics discovered or

Math 475, Problem Set #12: Answers

Foundations of Computer Science Lecture 13 Counting

Solutions to Final Exam

Combinatorics I Introduction. Combinatorics. Combinatorics I Motivating Example. Combinations. Product Rule. Permutations. Theorem (Product Rule)

Infinite Sequences and Series

Basic Counting. Periklis A. Papakonstantinou. York University

Putnam Training Exercise Counting, Probability, Pigeonhole Principle (Answers)

Problem 4: Evaluate ( k ) by negating (actually un-negating) its upper index. Binomial coefficient

Combinatorially Thinking

SOLUTIONS TO PRISM PROBLEMS Junior Level 2014

Properties and Tests of Zeros of Polynomial Functions

Basic Combinatorics. Math 40210, Section 01 Spring Homework 7 due Monday, March 26

Some Basic Counting Techniques

Combinatorics and Newton s theorem

Complex Numbers Solutions

3sin A 1 2sin B. 3π x is a solution. 1. If A and B are acute positive angles satisfying the equation 3sin A 2sin B 1 and 3sin 2A 2sin 2B 0, then A 2B

CALCULATION OF FIBONACCI VECTORS

CSE 21 Mathematics for

Week 5-6: The Binomial Coefficients

and each factor on the right is clearly greater than 1. which is a contradiction, so n must be prime.

SEQUENCES AND SERIES

Zeros of Polynomials

CS 336. of n 1 objects with order unimportant but repetition allowed.

1. n! = n. tion. For example, (n+1)! working with factorials. = (n+1) n (n 1) 2 1

62. Power series Definition 16. (Power series) Given a sequence {c n }, the series. c n x n = c 0 + c 1 x + c 2 x 2 + c 3 x 3 +

Lecture 23 Rearrangement Inequality

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

End-of-Year Contest. ERHS Math Club. May 5, 2009

18th Bay Area Mathematical Olympiad. Problems and Solutions. February 23, 2016

MATH 304: MIDTERM EXAM SOLUTIONS

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

Topic 5: Basics of Probability

What is Probability?

A Combinatorial Proof of a Theorem of Katsuura

INFINITE SEQUENCES AND SERIES

International Contest-Game MATH KANGAROO Canada, Grade 11 and 12

USA Mathematical Talent Search Round 3 Solutions Year 27 Academic Year

In algebra one spends much time finding common denominators and thus simplifying rational expressions. For example:

Square-Congruence Modulo n

Sequences, Mathematical Induction, and Recursion. CSE 2353 Discrete Computational Structures Spring 2018

Resolution Proofs of Generalized Pigeonhole Principles

Chapter 4. Fourier Series

Seunghee Ye Ma 8: Week 5 Oct 28

Section 7 Fundamentals of Sequences and Series

An analog of the arithmetic triangle obtained by replacing the products by the least common multiples

11. FINITE FIELDS. Example 1: The following tables define addition and multiplication for a field of order 4.

MT5821 Advanced Combinatorics

International Baccalaureate LECTURE NOTES MATHEMATICS HL FURTHER MATHEMATICS HL Christos Nikolaidis TOPIC NUMBER THEORY

Summer High School 2009 Aaron Bertram

Chapter 8: Estimating with Confidence

What is Probability?

Math 4707 Spring 2018 (Darij Grinberg): homework set 4 page 1

Introduction To Discrete Mathematics

REVIEW FOR CHAPTER 1

SOLVED EXAMPLES

Math 113 Exam 3 Practice

Random Models. Tusheng Zhang. February 14, 2013

WORKING WITH NUMBERS

CHAPTER I: Vector Spaces

MA131 - Analysis 1. Workbook 3 Sequences II

Alternating Series. 1 n 0 2 n n THEOREM 9.14 Alternating Series Test Let a n > 0. The alternating series. 1 n a n.

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

Induction: Solutions

Pairs of disjoint q-element subsets far from each other

Sequences I. Chapter Introduction

Transcription:

1 Sectio 5.1 The Basics of Coutig Combiatorics, the study of arragemets of objects, is a importat part of discrete mathematics. I this chapter, we will lear basic techiques of coutig which has a lot of applicatios, e.g. how may differet North America telephoe umbers are possible? How may ways are there to select five players from a 10-member teis team to make a trip to a match at aother school? The Product Rule Suppose that a procedure ca be broke dow ito a sequece of two tasks. If there are 1 ways to do the first task ad for each of these ways of doig the first task, there are 2 ways to do the secod task, the there are 1 2 ways to do the procedure. Example 1 The chairs of a auditorium are to be labeled with a letter followed by a positive umber ot exceedig 100. What is the largest umber of chairs that ca be labeled differetly? The product rule exteds to the case a procedure ca be broke dow ito a sequece of more tha just two tasks. Suppose that the procedure is carried out by performig the tasks T 1, T 2,, T k i sequece. If each task T i ca be doe i i ways, regardless of how the previous tasks were doe, the there are 1 2 k ways to carry out the procedure. Example 2 How may differet licese plates are available if each plate cotais a sequece of three letters followed by three digits? Example 3 Let A = {1, 2,, m} ad B = {1, 2,, }. 1. How may fuctios are there from A to B? 2. How may oe-to-oe fuctios are there from A to B? Example 4 The telephoe umbers i North America must cosist of 10 digits, which are split ito a three-digit area code, three-digit office code, ad four-digit statio code. Accordig to the regulatios of the North America Numberig Pla, each umber should be of the form NXX NXX XXXX, where N deotes a digit that ca take ay of the values 2 through 9, ad X deotes a digit that ca take ay of the values 0 through 9. How may differet North America telephoe umbers are possible?

2 We ow itroduce the sum rule. The Sum Rule If a task ca be doe either i oe of 1 ways or i oe of 2 ways, where oe of the set of 1 ways is the same as ay of the set of 2 ways, the there are 1 + 2 ways to do the task. Example 5 A studet ca choose a computer project from oe of three lists. The three lists cotai 23, 15, ad 19 possible projects, respectively. No project is o more tha oe list. How may possible projects are there to choose from? May coutig problems caot be solved usig just the product rule or just the sum rule. However, may complicated coutig problems ca be solved usig both of these rules i combiatio. Example 6 Each user o a computer system has a password, which is six to eight characters log, where each character is a uppercase letter or a digit. Each password must cotai at least oe digit. How may possible passwords are there?

3 Sectio 5.2 The Pigeohole Priciple Suppose that a flock of 20 pigeos flies ito a set of 19 pigeoholes, the we ca say for sure that at least oe of these 19 pigeoholes must have at least two pigeos i it. This illustrates a geeral priciple called Pigeohole Priciple. Pigeohole Priciple Let k be a positive iteger. If k + 1 or more objects are placed ito k boxes, the there is at least oe box cotaiig two or more of objects. Example 1 A fuctio f from a set with k + 1 or more elemets to a set with k elemets is ot oe-to-oe. Example 2 I ay group of 27 Eglish words, there must be at least two that begi with the same letter. Example 3 Assume that there were more tha 100, 000, 000 wage earers i the Uited States who eared less tha 1, 000, 000 dollars. Show that there are two who eared exactly the same amout of moey, to the pey, last year. Example 4 Let d be a positive iteger. Show that amog ay group of d + 1 (ot ecessarily cosecutive) itegers there are two with exactly the same remaider whe they are divided by d. Example 5 Show that for every iteger there is a multiple of that has oly 0s ad 1s i its decimal expasio.

4 Now we wat to geeralize Pigeohole Priciple. Suppose 21 objects are distributed ito 10 boxes, the at least oe box must have at least 3 objects. This is a special case of the followig theorem: The Geeralized Pigeohole Priciple If N objects are placed ito k boxes, the there is at least oe box cotaiig at least N k objects. Proof We use the proof by cotradictio. Suppose ot, that is, each box cotais at most objects i it. The the total umber of objects is at most. Note that N < N + 1, hece k k we have ( ) (( ) ) N N k 1 < k k k + 1 1 = N, which gives a cotradictio. Example 6 Amog 100 people there are at least 100 = 9 who were bor i the same moth. 12 Example 7 There are 38 differet time periods durig which classes at a college ca be scheduled. If there are 677 differet classes, how may differet rooms will be eeded?

5 Sectio 5.3 Permutatios ad Combiatios May coutig problems ca be solved by fidig the umber of ways to arrage a specified umber of distict elemets of a set of a particular size, where the order of these elemets matters. We begi by cosiderig a example. Example 1 I how may ways ca we select three studets from a group of five studets to stad i lie for a picture? I how may ways ca we arrage all five of these studets i a lie for a picture? Defiitio A permutatio of a set of distict objects is a ordered arragemet of these objects. A ordered arragemet of r elemets of a set is called a r-permutatio. Example 2 Let S = {1, 2, 3, 4, 5}. The ordered arragemet (4, 2, 1, 5, 3) is a permutatio of S. (3, 1, 4) is a 3-permutatio of S. Defiitio The umber of r-permutatios of a set with elemets is deoted by P (, r) or P r. We wat to compute P (, r). Example 3 Compute P (5, 2) ad P (5, 3). What is P (5, 5)? I geeral, we get I particular, P (, r) = ( 1) ( 2) ( r + 1) = }{{} r factors P (, ) = ( 1) ( 2) 2 1 =!.! ( r)!. Example 4 How may ways are there to select a first-prize wier, a secod-prize wier, ad a third-prize wier from 100 differet people who have etered a cotest? Example 5 How may permutatios of the letters ABCDEF G cotai the strig ABC?

6 We ow tur our attetio to coutig uordered selectio of objects. Example 6 How may differet committees of two studets ca be formed from a group of four studets? Example 7 I how may ways ca we choose a chair ad a vice chair from a group of four studets? How is this example differet from the previous oe? Defiitio A r-combiatio of elemets of a set is a uordered selectio of r elemets from the set. Example 8 Let S = {1, 2, 3, 4, 5}. The {1, 3, 4} is a 3-combiatio of S. Defiitio The umber of r-combiatios of a set with elemets is deoted by C(, r), C r, or ( r). Example 9 From Example 6, we see that ( 4 2) =. Example 10 Compute ( 5 2). Compute ( 5 3). I geeral, we have the followig theorem. Theorem The umber of r-combiatios of a set with elemets, where is a oegative iteger ad r is a iteger with 0 r, equals ( )! = r r!( r)!. Sketch of Proof We explai with ( 5 3). Let S = {1, 2, 3, 4, 5} ad cosider all 3-permutatios of S cosistig of {1, 2, 4}. They are: (1, 2, 4), (1, 4, 2), (2, 1, 4), (2, 4, 1), (4, 1, 2), ad (4, 2, 1).

7 O the other had, there is oly oe 3-combiatio of S cosistig of {1, 2, 4}; just {1, 2, 4}. Hece there are 6 times as may permutatios as combiatios cosistig of {1, 2, 4}. Here 6 comes from the total umber of differet permutatios of {1, 2, 4}, that is, 6 = 3!. Sice this is true for all 3-combiatios of S, we coclude that ( ) 5 P (5, 3) = 3!. 3 I other words, ( ) 5 = 1 3 3! P (5, 3) = 1 3! 5! (5 2)! = 5! 3!(5 2)!. Example 11 Compute ( 0), ( 1), ad ( ). Example 12 Prove that ( ) ( r = r). Example 13 How may ways are there to select five players from a 10-member teis team to make a trip to a match at aother school? Example 14 Suppose that there are 9 faculty members i the mathematics departmet ad 11 i the computer sciece departmet i a college. How may ways are there to select a committee to develop a discrete mathematics course at the school if the committee is to cosist of three faculty members from the mathematics departmet ad four from the computer sciece departmet?

8 Sectio 5.4 Biomial Coefficiets I this sectio we will see examples i which the umbers ( r) play a cetral role. Whe (x + y) 5 = (x + y)(x + y)(x + y)(x + y)(x + y) is expaded, all products of a term i the first sum, a term i the secod sum,..., a term i the fifth sum are added ad terms of the form x 5, x 4 y, x 3 y 2, x 2 y 3, xy 4, ad y 5 arise. To obtai a term of the form x 5, x must be chose from each of five sums ad this ca be doe i oly oe way ad this meas that the coefficiet of x 5 whe (x + y) 5 is multiplied out is 1. To obtai a term of the form x 3 y 2, x must be chose from three of the five sums (ad cosequetly y must be chose from the remaiig two sums). Sice this ca be doe i ( ) 5 3 ways, the coefficiet of x 3 y 2 whe (x + y) 5 is expaded will be ( 5 3). I geeral, we have the followig theorem. The Biomial Theorem Let x ad y be variables, ad let be a oegative iteger. The (x + y) = = ( k k=0 ( 0 ) x + Example 1 Expad (x + y) 5. ) x k y k ( ) x 1 y + 1 ( ) ( ) x 2 y 2 + + xy 1 + 2 1 ( ) y. Example 2 Fid the coefficiet of x 12 y 13 i the expasio of 1. (x + y) 25 2. (2x 3y) 25 Example 3 Determie whether we have a term of the form x 14 i the expasio of ( x 2 + 1 x) 10. If we do, what is the coefficiet?

9 Example 4 Let be a oegative iteger. Compute ( ) ( ) ( ) ( ) 1. + + + + 0 1 2 2. ( ) ( ) + 2 0 1 ( ) ( ) + 2 2 + + 2 2 ( ) ( ) ( ) 3. + ( 1) + ( 2) 0 1 2 ( ) ( ) + + 2 + 2 1 Defiitio A combiatorial proof (or combiatorial argumet) of a idetity is a proof that uses coutig to prove that both sides of the idetity cout the same object but i differet ways. Example 5 Prove the idetities i Example 4 above usig a combiatorial argumet.

10 Pascal s Idetity Let ad k be positive itegers with k. The ( ) ( ) ( ) + 1 = +. k k 1 k Proof Vadermode s Idetity Let m,, ad r be oegative itegers with r ot exceedig either m or. The ( ) m + r ( )( ) m =. r r k k Proof k=0 Example 6 Show that ( 2 ) = k=0 ( k) 2.

11 The rest of the sectio is devoted to examples where the biomial coefficiets arise. We begi with a defiitio. Defiitio A bit strig (or biary strig) is a strig that cosists of 0 or 1. A k-ary strig is a strig that cosists of 0, 1, 2,, k 1. Example 7 For example, 101010011 is a bit strig of legth ie. Example 8 How may bit strigs of legth are there? How may k-ary strigs of legth are there? How may bit strigs of legth have exactly r 1 s? Example 9 Let ad r be oegative itegers with r. Show combiatorially that ( ) + 1 = r + 1 j=r ( ) j r by coutig the umber of bit strigs of legth + 1 cotaiig r + 1 1 s. Example 10 How may differet strigs ca be made by reorderig the letters of 1. {A, A, B, B, B}? 2. {S, U, C, C, E, S, S}? 3. {D, O, R, M, I, T, O, R, Y }?

12 Example 11 How may shortest paths from A to B are there i the followig? B A Example 12 How may shortest paths from A to B pass through M i the followig? B M A Example 13 How may shortest paths from A to B are there i the followig? (slides) B A

13 Example 14 How may shortest paths from A to B do ot pass above the diagoal i the followig? (slides) B A Example 15 There are 2 people i lie to get ito a theater. Admissio is $5. Of the 2 people, have a $5 bill ad have a $10 bill. The box office rather foolishly begis with a empty cash register. I how may ways ca the people lie up so wheever a perso with a $10 bill buys a ticket, the box office has a $5 bill i order to give chage? Example 16 How may o-decreasig fuctios f : {1, 2, 3, 4, 5} {1, 2, 3, 4, 5} such that f(i) i for all i, 1 i 5, are there?

14 Example 17 How may oegative iteger solutios are there to the equatio x + y + z = 8? Example 18 How may positive iteger solutios are there to the equatio x + y + z = 8? Example 19 How may strictly icreasig fuctios are there from A = {1, 2, 3, 4} to B = {1, 2, 3, 4, 5, 6, 7}? Example 20 How may o-decreasig fuctios are there from A = {1, 2, 3, 4} to B = {1, 2, 3, 4, 5, 6, 7}?