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

Similar documents
Math 155 (Lecture 3)

Section 5.1 The Basics of Counting

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

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

Chapter 1 : Combinatorial Analysis

Injections, Surjections, and the Pigeonhole Principle

3.1 Counting Principles

CIS Spring 2018 (instructor Val Tannen)

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

Course : Algebraic Combinatorics

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

4 The Sperner property.

1 Summary: Binary and Logic

MT5821 Advanced Combinatorics

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

Bertrand s Postulate

Lecture 10: Mathematical Preliminaries

Combinatorics and Newton s theorem

REVIEW FOR CHAPTER 1

Week 5-6: The Binomial Coefficients

Summer High School 2009 Aaron Bertram

The Random Walk For Dummies

Intermediate Math Circles November 4, 2009 Counting II

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

Math 475, Problem Set #12: Answers

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

P1 Chapter 8 :: Binomial Expansion

MT5821 Advanced Combinatorics

Permutations, Combinations, and the Binomial Theorem

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

Basic Counting. Periklis A. Papakonstantinou. York University

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

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

A Combinatorial Proof of a Theorem of Katsuura

LINEAR ALGEBRAIC GROUPS: LECTURE 6

Recursive Algorithm for Generating Partitions of an Integer. 1 Preliminary

( ) GENERATING FUNCTIONS

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

The Borel hierarchy classifies subsets of the reals by their topological complexity. Another approach is to classify them by size.

Math 172 Spring 2010 Haiman Notes on ordinary generating functions

(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

Mathematical Induction

Exercises 1 Sets and functions

Square-Congruence Modulo n

0 1 sum= sum= sum= sum= sum= sum= sum=64

1 Counting and Stirling Numbers

Generating Functions. 1 Operations on generating functions

Counting Well-Formed Parenthesizations Easily

Power Series Expansions of Binomials

Topic 5: Basics of Probability

Lecture 6 April 10. We now give two identities which are useful for simplifying sums of binomial coefficients.

Infinite Sequences and Series

arxiv: v1 [math.co] 23 Mar 2016

Commutativity in Permutation Groups

Enumerative & Asymptotic Combinatorics

Combinatorially Thinking

Lecture Notes for CS 313H, Fall 2011

Is mathematics discovered or

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

Chapter 6. Advanced Counting Techniques

subcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016

SNAP Centre Workshop. Basic Algebraic Manipulation

6.4 Binomial Coefficients

The Binomial Theorem

Books Recommended for Further Reading

Solutions to Final Exam

Course : Algebraic Combinatorics

Zeros of Polynomials

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

The multiplicative structure of finite field and a construction of LRC

Some Basic Counting Techniques

2 Geometric interpretation of complex numbers

CALCULATION OF FIBONACCI VECTORS

arxiv: v1 [math.nt] 10 Dec 2014

Chapter 3. Strong convergence. 3.1 Definition of almost sure convergence

a for a 1 1 matrix. a b a b 2 2 matrix: We define det ad bc 3 3 matrix: We define a a a a a a a a a a a a a a a a a a

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

Math 4707 Spring 2018 (Darij Grinberg): homework set 4 page 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

Section 4.3. Boolean functions

1 Generating functions for balls in boxes

Chapter 0. Review of set theory. 0.1 Sets

Sequences, Series, and All That

t distribution [34] : used to test a mean against an hypothesized value (H 0 : µ = µ 0 ) or the difference

Ma 530 Infinite Series I

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

CSE 1400 Applied Discrete Mathematics Number Theory and Proofs

CS284A: Representations and Algorithms in Molecular Biology

Problem Set 2 Solutions

Frequentist Inference

Discrete Mathematics: Lectures 8 and 9 Principle of Inclusion and Exclusion Instructor: Arijit Bishnu Date: August 11 and 13, 2009

Math F215: Induction April 7, 2013

Beurling Integers: Part 2

Model Theory 2016, Exercises, Second batch, covering Weeks 5-7, with Solutions

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

ARRANGEMENTS IN A CIRCLE

Sequences of Definite Integrals, Factorials and Double Factorials

Pascal s Labeling and Path Counting. October 4, Construct Pascal s labeling of lattice points of Euclidean plane.

COMP 2804 Solutions Assignment 1

Transcription:

COMPSCI 230: Discrete Mathematics for Computer Sciece April 8, 2019 Lecturer: Debmalya Paigrahi Lecture 22 Scribe: Kevi Su 1 Overview I this lecture, we begi studyig the fudametals of coutig discrete objects. We will also give formalizatios of rules ad priciples that we ofte use whe coutig objects. 2 Permutatios ad Combiatios I this sectio, we will itroduce the foudatios of combiatorics, the brach of mathematics that deals with coutig. I particular, we will study permutatios ad combiatios, their relevat formulas, ad some basic idetities ivolvig these cocepts. Permutig items: Suppose that we wat to place distict items i a lie, that is, we wat to order or permute the items. The most fudametal priciple used i coutig is the followig: the umber of ways to permute distict items is the product of the first positive itegers, which is deoted by! ( factorial ). This ca be prove, somewhat iformally, as follows: there are choices for the first item i lie, ( 1) for the secod, ad so o, util there s oly 1 choice left for the last item i lie. Sice the choices ca be made i sequetial order, the total umber of possible permutatios (orderigs) is ( 1) 1 =!. Permutig of items: Now istead of permutig all items, suppose we oly wat to permute of them (where is a positive iteger less tha). By the same argumet above, the umber of ways to do this is ( 1) ( ( 1)). Notice that there are terms i this product, because each term correspods to selectig a item to place ext i the fial orderig of items. For coveiece, otice that a more cocise way of writig this product is the followig: ( 1) ( ( 1)) = ( 1) ( + 1) =! ( )! Choosig of items: Now istead of permutig items, suppose we oly wat to choose items. I other words, we are fidig a subset of size, rather tha a sequece of legth. We deote this value by ( ) ( choose ), ad we ofte say a subset is a combiatio. I other words, a combiatio ca be thought of as a permutatio i which order does t matter. As we just saw, there are!/( )! permutatios of legth. However, each subset of size is represeted as a permutatio! times. Therefore, we ca coclude that:! = ( )!! Alteratively, we ca reaso about these formulas as follows. Let be ay positive iteger at most. The permutig items is the same as choosig a subset of size, orderig them, ad the 22-1

orderig the remaiig elemets. This lie of reasoig results i the followig:! =! ( )! which is equivalet to the previous expressio. Remar: If = 0, the the umber of ways to order items is somewhat ambiguous. Similarly, if = 0, the the umber of ways to choose items is somewhat ambiguous. To deal with these ambiguities i a cosistet way, we have the followig covetios: 0! = 1 ad = 1. 0 2.1 Stars ad Bars The otio of combiatios is fudametal to combiatorics.to better familiarize ourselves with combiatios, we ow loo at oe applicatioow as stars ad bars. The setup is the followig: suppose there are three childre c 1, c 2, c 3, ad we must distribute 10 idetical cadies amog these three childre. Each child ca receive ay umber of cadies, icludig 0. For example, oe possible distributio is (4, 3, 3): i this case, c 1 receives 4 cadies, c 2 receives 3, ad c 3 receives 3. How may ways ca we distribute the cadies? The ey observatio is the followig: we ca distribute the cadies by arragig them i a lie, ad the placig two bars somewhere alog the lie. For example, the (4, 3, 3) described above ca be modeled by the followig: Each represets a cady, ad the two locatio of the two bars determies the distributio of the cadies. Notice that the followig distributio is also possible: The above diagram correspods to the distributio (0, 0, 10). I geeral, c 1 receives the cadies left of the first bar, c 2 receives the cadies betwee the two bars, ad c 3 receives the cadies right of the secod bar. So we ca see that distributig cadies is idetical to choosig the locatio of the two bars. However, the umber of ways to do this is ot ( 11 2 ), because this igores the possibility of placig two bars ext to each other. Istead, we should thi of the process as follows: there are 12 empty slots, pictured below. We must place bars i two of the slots, ad the remaiig 10 slots will the represet the 10 cadies to distribute. For the distributio (5, 5, 0), the diagram becomes the followig: 22-2

From this perspective, it becomes clear that the umber of distributios of 10 cadies to 3 childre is ( 12 2 ). I geeral, if there are cadies ad childre, the there are + 1 slots, ad we must place 1 bars. The remaiig cadies, iterspersed amog the bars, represet a distributio. Thus, the umber of distributios is ( + 1 1 ). 2.2 Combiatorial Idetities We ow state a couple of basic idetities ivolvig combiatios. Fact 1. Let be a positive iteger, ad be i {1,..., }. The the followig idetities hold: ( ) ( ) ( ) ( ) ( ) 1 1 = ad = +. 1 The latter is ow as Pascal s rule, amed after the mathematicia Blaise Pascal. Remar: Oe proof of these idetities is purely algebraic: if we simply use the formula =! ( )!! o every term, the a bit of algebraic maipulatio proves the idetity. However, i some sese, this proof is ot very elegat because it does ot tae advatage of the combiatorial iterpretatio of the terms. Therefore, we ow prove each idetity by givig a combiatorial iterpretatio of both sides. Uder these iterpretatios, the validity of the equalities becomes clear. Proof. Let A be a set with elemets, where is a positive iteger. As discussed above, for each equality, we will give a combiatorial iterpretatio for both the left-had side (LHS) ad the right-had side (RHS). I the first equality, the LHS couts the umber of subsets of A that cotai exactly items. Selectig items is equivalet to excludig items. The umber of ways to exclude items from S is precisely the RHS of the equality. I the secod equality, the LHS still couts the umber of subsets of A that cotai exactly items. Sice is positive, we ca fix a particular elemet of A which we deote by x. The set of subsets of size ca be partitioed ito two sets: those that cotai x, ad those that do ot. The umber of subsets of size that cotai x is ( 1 1 ). This is because oce you choose x i the subset, you are left to mae 1 choices out of the remaiig 1 elemets. O the other had, the umber of subsets of size that exclude x is ( 1 ). The logic behid this expressio is that if you exclude x from the subset, the you are still left to mae all the choices, but oly amog the remaiig 1 elemets. Summig these two values gives the umber of ways to choose ay subset of size, as desired. A pictorial represetatio of Pascal s rule (see Fact 1) is ow as Pascal s triagle. The triagle is costructed as follows: the top row, which we cosider row 0, cotais a sigle 1. Each subsequet row starts ad eds with 1, ad the iteral terms are obtaied by summig the closest two terms i the previous row. The first 7 rows are pictured below, where represets the row idex: 22-3

= 0 1 = 1 1 1 = 2 1 2 1 = 3 1 3 3 1 = 4 1 4 6 4 1 = 5 1 5 10 10 5 1 = 6 1 6 15 20 15 6 1 Now cosider the values i row. We claim that these values are precisely, i order, the followig: ( ) ( ) ( ) ( ). 0 1 1 The -th term of this row (where {0, 1,..., }) is precisely ( 1 ) the proof of this is a simple iductio argumet that follows easily from Pascal s idetity. We ow state ad prove aother well-ow idetity; this oe gives a combiatorial iterpretatio of the coefficiets of a biomial expressio. Due to this coectio, the values ( ) are ofte called the Biomial coefficiets. Theorem 2 (Biomial Theorem). For all Z + ad a, b R, (a + b) = a b. =0 I other words, for every {0, 1,..., }, the coefficiet of a b i the expasio of (a + b) is ( ). As a example, let us cosider the case whe = 4 ad = 3. The the coefficiet we see is that of a 1 b 3. There are precisely four ways to obtai a 1 b 3 by expadig (a + b) 4 : abbb, babb, bbab, ad bbba. Each of these ways correspods to choosig the locatio of 3 b s from four slots, ad the umber of ways to do this is precisely ( 4 3 ). Now we cosider the geeral case. Let {0, 1,... }, ad cosider the term a b. This term is the product of ( ) a s ad b s. Furthermore, otice that (a + b) is simply (a + b)(a + b) (a + b), which is the product of copies of (a + b). Upo expasio of this product, we obtai the sum of a + 1 terms, ad each term is the product of variables, distributed as a s ad b s. Thus, we ca thi of buildig the coefficiet of a b as selectig of the (a + b) terms i (a + b) that will cotribute a b. The umber of ways to do this is precisely ( ), as desired. Corollary 3. For all Z +, the followig equality holds: 2 = =0 I other words, the sum of the values i the -th row of Pascal s triagle is 2. Remar: The above idetity simply follows by a = b = 1 i Theorem 2. We give a alterate proof below that relates this idetity to the set of subsets of a set. 22-4

Proof. Let A be a set with elemets, ad let A deote the subset of the power set 2 A cotaiig the subsets of A of size. The the sets A 0, A 1,..., A partitio 2 A, which meas the followig equalities hold: 2 = 2 A = A 0 + A 1 + + A ( ) ( ) ( ) = + + + = 0 1 =0. I other words, every subset of A has a size i {0, 1,..., }, so to cout the umber of subsets of A, we ca cout the umber of subsets of each size over all possible sizes. 3 Cardiality Rules ad Priciples I this sectio, we will see the formalizatio of coutig strategies that we ofte tae for grated: the product rule, the sum rule, ad the pigeohole priciple. 3.1 The Product Rule Before statig this rule, we first itroduce some otatio. For ay set S ad positive iteger, we let S deote the set of -legth sequeces whose elemets are i S, i.e., S = {(s 1, s 2,..., s ) : i {1, 2,..., }. s i S}. Notice that S 2 = S S, but S 3 = (S S) S because the elemets of S 3 are of the form (a, b, c), while the elemets of (S S) S have the form ((a, b), c). However, for otatioal coveiece, we ofte remove the iteral paretheses ad write (a, b, c) istead. Usig this covetio, the set S is the Cartesia product of S with itself times. The product rule states the followig: If A ad B are fiite sets, the A B = A B. This rule allows us to cout the umber of differet ways to combie choices. For example, suppose we must create a password that cotais five letters of the alphabet (all lowercase), followed by three digits (i.e., 0-9). Let A = {a, b, c,...} deote the set of letters, ad B = {0, 1,..., 9} deote the set of digits. The to create a valid password, we must select five elemets of A (order matters), as well as three elemets of B (order matters as well). Thus, the set P of valid passwords is essetially the set A 5 B 3 : for example, apple123 is a valid password, ad (a, p, p, l, e, 1, 2, 3) is a elemet of P (with iteral paretheses removed). By the product rule, we have P = A 5 B 3 = A 5 B 3 = 26 5 10 3. Thus, there are 26 5 10 3 passwords that satisfy the give coditios. 3.2 The Priciple of Iclusio-Exclusio The priciple of iclusio-exclusio (PIE) states the followig: If A ad B are fiite sets, the A B = A + B A B. Note that if A B =, the PIE states A B = A + B ; this special case is ow as the sum rule. The ame of this priciple comes from the fact that we must exclude the elemets of A B after icludig each of them twice oce as a elemet of A, ad oce as a elemet of B. 22-5

Iclusio-exclusio allows us to cout the umber of objects that satisfy some property or aother, without over-coutig the objects that satisfy both. For example, suppose 15 studets i the class ow a cat, 20 ow a dog, ad 10 ow both. The the umber of studets that ow a cat or a dog (or both) is ot 15 + 20 = 35, but rather, 15 + 20 10 = 25 because the 10 people that ow both are icluded i both the 15 cat owers ad the 20 dog owers. 3.3 The Pigeohole Priciple A pigeohole is a small box i which a sigle pigeo ca stad. If there are pigeoholes ad over pigeos, the clearly, some pigeohole must accommodate at least 2 pigeos this idea is ow as the pigeohole priciple. More formally, the pigeohole priciple states the followig: If A ad B are fiite sets such that A > B ad f : A B is a total fuctio, the there exist a 1, a 2 A such that a 1 = a 2 ad f (a 1 ) = f (a 2 ). Thus, we ca thi of A as the set of pigeos, B as the set of pigeoholes, ad f as the fuctio that matches each pigeo with a pigeohole. If A > B the some pigeohole must accommodate at least 2 pigeos, which is precisely what the priciple states. The pigeohole priciple souds quite obvious, yet whe applied correctly, it ca be surprisigly powerful. Example 1: Cosider a subset S of {1, 2,..., 10}. We claim that if S 6, the there exist two distict elemets of S such that oe is a factor of the other. This propositio ca be verified by checig all ( 10 6 ) subsets, but we ca provide a more elegat proof usig the pigeohole priciple. Notice that every positive iteger ca be writte as 2 q(), where is a oegative iteger ad q() is odd. Now cosider writig the elemets of S i this way. There are oly 5 possible values of q() (i.e., {1, 3, 5, 7, 9}), so there exists some odd iteger q ad a, b S such that a = 2 α q ad b = 2 β q, where α, β are distict oegative itegers. If α < β the a is a factor of b, ad if α > β, the b is a factor of a. I this example, we ca thi of the odd compoet of the elemets of S as the pigeos, ad the set {1, 3, 5, 7, 9} as the pigeoholes. 4 Summary I this lecture, we studied the fudametals of combiatorics. We proved several combiatorial idetities ad saw applicatios of cardiality rules ad the pigeohole priciple. 22-6