Foundations of Computer Science Lecture 13 Counting

Size: px
Start display at page:

Download "Foundations of Computer Science Lecture 13 Counting"

Transcription

1 Foudatios of Computer Sciece Lecture 3 Coutig Coutig Sequeces Build-Up Coutig Coutig Oe Set by Coutig Aother: Bijectio Permutatios ad Combiatios

2 Last Time Be careful of what you read i the media: sex i America. 2 Bipartite Graphs ad Matchig (Hall s Theorem). 3 Stable Marriage. 4 Coflict Graphs ad Colorig. Every tree is 2-colorable. 5 Other Graph Problems Coected compoets, spaig tree, Euler paths, etwork flow. ([easy]) Hamiltoia paths, K-ceter, vertex cover, domiatig set. ([hard]) Creator: Malik Magdo-Ismail Coutig: 2 / 7 Today

3 Today: Coutig Coutig sequeces. 2 Build-up coutig. 3 Coutig oe set by coutig aother: bijectio. 4 Permutatios ad combiatios. Creator: Malik Magdo-Ismail Coutig: 3 / 7 Objects We Ca Cout

4 Discrete Math Is About Objects We Ca Cout Three colors of cady:,,. A goody-bag has 3 cadies. How may goody-bags? (Oly the umber of each color matters: { } ad { } are the same goody-bag.) { } { } { } { } { } { } { } { } { } { } Challege Problems. What if there are 5 cadies per goody-bag ad 0 colors of cady? 2 Goody-bags come i bulk packs of 5. How may differet bulk packs are there? There are too may to list out. We eed tools! Creator: Malik Magdo-Ismail Coutig: 4 / 7 Sum Rule

5 Sum Rule How may biary sequeces of legth 3: {000, 00, 00, 0, 00, 0, 0, }. There are two types: those edig i 0 ad those edig i, {b b 2 b 3 } = {b b 2 0} {b b 2 } Sum Rule. N objects of two types: N of type- ad N 2 of type-2. The, N = N + N 2. {b b 2 b 3 } = {b b 2 0} + {b b 2 } (sum rule) = {b b 2 } 2 = ( {b 0} + {b } ) 2 (sum rule) = {b } 2 2 = Creator: Malik Magdo-Ismail Coutig: 5 / 7 Product Rule

6 Product Rule {b b 2 b 3 } Let N be the umber of choices for a sequece x x 2 x 3 x r x r. Let N be the umber of choices for x ; Let N 2 be the umber of choices for x 2 after you choose x ; Let N 3 be the umber of choices for x 3 after you choose x x 2 ; Let N 4 be the umber of choices for x 4 after you choose x x 2 x 3 ;. Let N r be the umber of choices for x r after you choose x x 2 x 3 x r. N = N N 2 N 3 N 4 N r. Example. There are 2 biary sequeces of legth : N = N 2 = = N = 2. The sum ad product rules are the oly basic tools we eed... plus TINKERING. Creator: Malik Magdo-Ismail Coutig: 6 / 7 Examples

7 Examples Meus. breakfast {pacake, waffle, Doritos} luch {burger, Doritos} dier {salad, steak, Doritos} {BLD} = = 8. This works because: every complex object (meu) is a sequece BLD ad every sequece BLD is a uique complex object (meu). 2 NY plates. {ABC-234} = = millio. 3 Races. With 0 ruers, how may top-3 fiishes? {FST} = = Passwords. Letter (a,...,z,a,...,z) followed by 5,6 or 7 letters or digits (0,...,9). 3 types: FS S 2 S 3 S 4 S 5 (or FS 5 for short); FS 6 ; ad, FS 7. (52 choices for F ad 62 for S.) {passwords} = {FS 5 } + {FS 6 } + {FS 7 } (sum rule) = (product rule) ( millisecod to test a password 3 moths to break i usig 32,000 cores.) 5 Committees. 0 studets. How may ways to form a party plaig committee? Each studet ca be i or out of the committee: = 2 0 = 024. {committees} = {0-bit biary strigs} e.g. {s s 2 s 3 s 4 s 5 s 6 s 7 s 8 s 9 s 0 } {s, s 2, s 4, s 9 } Creator: Malik Magdo-Ismail Coutig: 7 / 7 Examples from CS

8 Examples from CS Challege Exercises: A problem from the area of atural laguage processig (NLP). Wikipedia has 40 millio articles (6 millio i Eglish). You compute a edit distace betwee every pair of articles ad store this data i a 40millio 40millio array of 64-bit double precisio umbers. Estimate how much RAM you will eed to load this matrix ito memory. Ay suggestios o feasibly performig tasks usig this edit-distace data? (aswer: 3TB) A problem i schedulig exams. RPI has about 400 courses ad 5000 studets who iduce coflicts amog these courses for exam schedulig. Are 5 exam slots eough to schedule all the exams? You realize that you eed to color a 400-ode coflict graph usiig 5 colors. You ca geerate ad test validity of a 5-colorig at a rate of 3 millio per secod. Estimate how log it would take to determie that 5 exam slots is ot eough. (aswer: years) Ay suggestios o what to do? Creator: Malik Magdo-Ismail Coutig: 8 / 7 Build-Up Coutig

9 Build-Up Coutig Number of biary sequeces of legth : 2. = umber biary sequeces of legth with exactly k s 0 k. k Legth-3 sequeces: Legth-4 sequeces: Legth-5 sequeces: ( ) k k Pascal s Triagle {-sequece with k s} = 0 {( )-sequece with k s} }{{} ( k ) {( )-sequece with (k ) s} }{{} ( k ) k = + k (sum rule) base cases: = ; =. k 0 Creator: Malik Magdo-Ismail Coutig: 9 / 7 Goody Bags

10 Build-up Coutig for Goody Bags Q(, k) = umber of goody-bags of cadies with k colors Build-up coutig: there are ( + ) types of goody-bag Q(, k ) Q(, k ) Q( 2, k ) Q( 3, k ) Q(0, k ) Q(, k) = Q(0, k ) + Q(, k ) + + Q(, k ) (sum rule) Q(, k) k Q(, ) = ; Q(0, k) = Challege problems we had earlier. (5 cadies, 0 colors) 2002 goody-bags. 2 How may 5 goody-bag bulk packs (goody-bags have 3 cadies of 3 colors)? There are 0 types of goody-bag; 5 i a bulk pack. So we eed Q(5, 0) = Creator: Malik Magdo-Ismail Coutig: 0 / 7 Bijectio

11 Coutig Oe Set By Coutig Aother: Bijectio 0 goody-bags with 3 cadies of 3 colors. Ca label those goody bags usig {, 2,..., 0}. { } { } { } { } { } { } { } { } { } { } to- correspodece betwee goody-bags ad the set {, 2,..., 0}, a bijectio. A B A B A B A B ot a fuctio -to-; ot oto (ijectio, A ij B) A B oto; ot -to- (surjectio, A sur B) A B -to- ad oto (bijectio, A bij B) A = B A bij B implies A = B. Ca cout A by coutig B. Cout meus by coutig sequeces {BLD}. Works because Every sequece specifies a distict meu (-to- mappig). Every meu correspods to a sequece (the mappig is oto). Creator: Malik Magdo-Ismail Coutig: / 7 Goody Bags

12 Goody Bags Usig Bijectio to Biary Sequeces 3 colors,,,. Cosider the goody-bag {2, 3, 2 }: red cadies delimiter blue cadies delimiter gree cadies ifer color from positio goody-bags bij 9-bit biary sequeces with two s. Examples {2, 3,,, 3 } {0, 4, 0,, 4 } cadies ad k colors (k ) delimiters. umber of goody-bags with cadies of k colors = umber of ( + k )-bit sequeces with (k ) s Q(, k) = + k. k ( k ) keeps poppig up but we do t have a formula for it. Creator: Malik Magdo-Ismail Coutig: 2 / 7 Kig-Quee Positios

13 Kig-Quee Positios o a Chessboard complex object kig-quee positio umber of positios sequece to recostruct it c3g4 umber of sequeces c K r K c Q r Q Every positio gives a sequece with r k r Q ad c K c Q Every such sequece is a uique valid positio. 0Z0Z0Z0Z 8 Z0Z0Z0Z0 7 0Z0Z0Z0Z 6 Z0Z0Z0Z0 5 0Z0Z0ZqZ 4 Z0J0Z0Z0 3 0Z0Z0Z0Z 2 Z0Z0Z0Z0 a b c d e f g h Cout sequeces with r k r Q ad c K c Q. 8 choices for c K ad r K ; after choosig c K, r K, there are oly 7 choices for c Q ad r Q. By the product rule, the umber of sequeces is = 336. By bijectio coutig, umber of Kig-Quee positios is 336. Creator: Malik Magdo-Ismail Coutig: 3 / 7 Castle-Castle Positios

14 Castle-Castle Positios o a Chessboard complex object castle-castle positio sequece to recostruct it c3g4 umber of positios umber of sequeces c r c 2 r 2 Problem. c3g4 ad g4c3 are the same positio. positio two sequeces with r r 2 ad c c 2 Twice as may sequeces as positios! 0Z0Z0Z0Z 8 Z0Z0Z0Z0 7 0Z0Z0Z0Z 6 Z0Z0Z0Z0 5 0Z0Z0ZrZ 4 Z0s0Z0Z0 3 0Z0Z0Z0Z 2 Z0Z0Z0Z0 a b c d e f g h Multiplicity Rule. If each object i A correspods to k objects i B, the B = k A. 8 choices for c ad r ; after choosig c, r, there are oly 7 choices for c 2 ad r 2. By the product rule, the umber of sequeces is = 336. By the multiplicity rule, umber of Castle-Castle positios is 336 = Creator: Malik Magdo-Ismail Coutig: 4 / 7 Permutatios ad Combiatios

15 Permutatios ad Combiatios S = {, 2, 3, 4}, the 2-orderigs are: { 2, 3, 4, 2, 2 3, 2 4, 3, 3 2, 3 4, 4, 4 2, 4 3} (permutatios) the 2-subsets are: { 2, 3, 4, 2 3, 2 4, 3 4} (combiatios) With elemets, by the product rule, the umber of k-orderigs is umber of k-orderigs = ( ) ( 2) ( (k )) = e.g. umber of top-3 fiishes i 0-perso race is = 0!/7!.! ( k)!. Pick a k-subset ( ( ) k ways) ad reorder it i k! ways to get a k-orderig. umber of k-orderigs = umber of k-subsets k! product rule = ( k ) k! bijectio to sequeces with k s umber of k-subsets =! = k k!( k)! Exercise. How may 0-bit biary sequeces with four s? Creator: Malik Magdo-Ismail Coutig: 5 / 7 Biomial Theorem

16 Biomial Theorem: (x + y) = i= i x i y i (x + y) 3 = (x + y)(x + y)(x + y) = xxx + xxy + xyx + xyy + yxx + yxy + yyx + yyy = x 3 + 3x 2 y + 3xy 2 + y 3. (All legth-3 biary sequeces b b 2 b 3 where each b i {x, y}) (x + y) = x + (?)x y+ (?)x 2 y 2 + (?)x 3 y (?)xy + y strigs with ( ) x s ( ) ( 2 strigs with strigs with strigs with ( 2) x s ( 3) x s x ) ( ( ) 3) = ( ) x + ( ) x y + ( ) 2 x 2 y 2 + ( 3 ) x 3 y ( ) xy + ( ) 0 y Example. What is the coefficiet of x 7 i the expasio of ( x + 2x) 0 Need ( x) i (2) 0 i x 7, which implies i = 6. The x 7 term is ( ) 0 6 ( x) 6 (2x) 4 Coefficiet of x 7 is ( ) = Creator: Malik Magdo-Ismail Coutig: 6 / 7 Geeral Approach to Coutig

17 Geeral Approach to Coutig Complex Objects To cout complex objects, give a sequece of istructios that ca be used to costruct a complex object. Every sequece of istructios gives a uique complex object. There is a sequece of istructios for every complex object. Cout the umber of possible sequeces of istructios, which equals the umber of complex objects. Creator: Malik Magdo-Ismail Coutig: 7 / 7

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

CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo Coutig Methods CSE 191, Class Note 05: Coutig Methods Computer Sci & Eg Dept SUNY Buffalo c Xi He (Uiversity at Buffalo CSE 191 Discrete Structures 1 / 48 Need for Coutig The problem of coutig the umber

More information

Section 5.1 The Basics of Counting

Section 5.1 The Basics of Counting 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

More information

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

Permutations & Combinations. Dr Patrick Chan. Multiplication / Addition Principle Inclusion-Exclusion Principle Permutation / Combination Discrete Mathematic Chapter 3: C outig 3. The Basics of Coutig 3.3 Permutatios & Combiatios 3.5 Geeralized Permutatios & Combiatios 3.6 Geeratig Permutatios & Combiatios Dr Patrick Cha School of Computer

More information

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

Lecture Overview. 2 Permutations and Combinations. n(n 1) (n (k 1)) = n(n 1) (n k + 1) = 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.

More information

# fixed points of g. Tree to string. Repeatedly select the leaf with the smallest label, write down the label of its neighbour and remove the leaf.

# fixed points of g. Tree to string. Repeatedly select the leaf with the smallest label, write down the label of its neighbour and remove the leaf. Combiatorics Graph Theory Coutig labelled ad ulabelled graphs There are 2 ( 2) labelled graphs of order. The ulabelled graphs of order correspod to orbits of the actio of S o the set of labelled graphs.

More information

Books Recommended for Further Reading

Books Recommended for Further Reading Books Recommeded for Further Readig by 8.5..8 o 0//8. For persoal use oly.. K. P. Bogart, Itroductory Combiatorics rd ed., S. I. Harcourt Brace College Publishers, 998.. R. A. Brualdi, Itroductory Combiatorics

More information

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

(ii) Two-permutations of {a, b, c}. Answer. (B) P (3, 3) = 3! (C) 3! = 6, and there are 6 items in (A). ... Answer. SOLUTIONS Homewor 5 Due /6/19 Exercise. (a Cosider the set {a, b, c}. For each of the followig, (A list the objects described, (B give a formula that tells you how may you should have listed, ad (C verify

More information

Injections, Surjections, and the Pigeonhole Principle

Injections, Surjections, and the Pigeonhole Principle Ijectios, Surjectios, ad the Pigeohole Priciple 1 (10 poits Here we will come up with a sloppy boud o the umber of parethesisestigs (a (5 poits Describe a ijectio from the set of possible ways to est pairs

More information

Math 155 (Lecture 3)

Math 155 (Lecture 3) Math 55 (Lecture 3) September 8, I this lecture, we ll cosider the aswer to oe of the most basic coutig problems i combiatorics Questio How may ways are there to choose a -elemet subset of the set {,,,

More information

3.1 Counting Principles

3.1 Counting Principles 3.1 Coutig Priciples Goal: Cout the umber of objects i a set. Notatio: Whe S is a set, S deotes the umber of objects i the set. This is also called S s cardiality. Additio Priciple: Whe you wat to cout

More information

1 Counting and Stirling Numbers

1 Counting and Stirling Numbers 1 Coutig ad Stirlig Numbers Natural Numbers: We let N {0, 1, 2,...} deote the set of atural umbers. []: For N we let [] {1, 2,..., }. Sym: For a set X we let Sym(X) deote the set of bijectios from X to

More information

Basic Counting. Periklis A. Papakonstantinou. York University

Basic Counting. Periklis A. Papakonstantinou. York University Basic Coutig Periklis A. Papakostatiou York Uiversity We survey elemetary coutig priciples ad related combiatorial argumets. This documet serves oly as a remider ad by o ways does it go i depth or is it

More information

Intermediate Math Circles November 4, 2009 Counting II

Intermediate Math Circles November 4, 2009 Counting II Uiversity of Waterloo Faculty of Mathematics Cetre for Educatio i Mathematics ad Computig Itermediate Math Circles November 4, 009 Coutig II Last time, after lookig at the product rule ad sum rule, we

More information

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

UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST. First Round For all Colorado Students Grades 7-12 November 3, 2007 UNIVERSITY OF NORTHERN COLORADO MATHEMATICS CONTEST First Roud For all Colorado Studets Grades 7- November, 7 The positive itegers are,,, 4, 5, 6, 7, 8, 9,,,,. The Pythagorea Theorem says that a + b =

More information

Generating Functions. 1 Operations on generating functions

Generating Functions. 1 Operations on generating functions Geeratig Fuctios The geeratig fuctio for a sequece a 0, a,..., a,... is defied to be the power series fx a x. 0 We say that a 0, a,... is the sequece geerated by fx ad a is the coefficiet of x. Example

More information

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

18th Bay Area Mathematical Olympiad. Problems and Solutions. February 23, 2016 18th Bay Area Mathematical Olympiad February 3, 016 Problems ad Solutios BAMO-8 ad BAMO-1 are each 5-questio essay-proof exams, for middle- ad high-school studets, respectively. The problems i each exam

More information

REVIEW FOR CHAPTER 1

REVIEW FOR CHAPTER 1 REVIEW FOR CHAPTER 1 A short summary: I this chapter you helped develop some basic coutig priciples. I particular, the uses of ordered pairs (The Product Priciple), fuctios, ad set partitios (The Sum Priciple)

More information

Permutations, Combinations, and the Binomial Theorem

Permutations, Combinations, and the Binomial Theorem Permutatios, ombiatios, ad the Biomial Theorem Sectio Permutatios outig methods are used to determie the umber of members of a specific set as well as outcomes of a evet. There are may differet ways to

More information

Worksheet on Generating Functions

Worksheet on Generating Functions Worksheet o Geeratig Fuctios October 26, 205 This worksheet is adapted from otes/exercises by Nat Thiem. Derivatives of Geeratig Fuctios. If the sequece a 0, a, a 2,... has ordiary geeratig fuctio A(x,

More information

CIS Spring 2018 (instructor Val Tannen)

CIS Spring 2018 (instructor Val Tannen) CIS 160 - Sprig 2018 (istructor Val Tae) Lecture 5 Thursday, Jauary 25 COUNTING We cotiue studyig how to use combiatios ad what are their properties. Example 5.1 How may 8-letter strigs ca be costructed

More information

Lecture 14: Graph Entropy

Lecture 14: Graph Entropy 15-859: Iformatio Theory ad Applicatios i TCS Sprig 2013 Lecture 14: Graph Etropy March 19, 2013 Lecturer: Mahdi Cheraghchi Scribe: Euiwoog Lee 1 Recap Bergma s boud o the permaet Shearer s Lemma Number

More information

LINEAR ALGEBRAIC GROUPS: LECTURE 6

LINEAR ALGEBRAIC GROUPS: LECTURE 6 LINEAR ALGEBRAIC GROUPS: LECTURE 6 JOHN SIMANYI Grassmaias over Fiite Fields As see i the Fao plae, fiite fields create geometries that are uite differet from our more commo R or C based geometries These

More information

Chapter 1 : Combinatorial Analysis

Chapter 1 : Combinatorial Analysis STAT/MATH 394 A - PROBABILITY I UW Autum Quarter 205 Néhémy Lim Chapter : Combiatorial Aalysis A major brach of combiatorial aalysis called eumerative combiatorics cosists of studyig methods for coutig

More information

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

Combinatorics II. Combinatorics. Product Rule. Sum Rule II. Theorem (Product Rule) Theorem (Sum Rule) Combiatorics Combiatorics I Slides by Christopher M. Bourke Istructor: Berthe Y. Choueiry Fall 27 Computer Sciece & Egieerig 235 to Discrete Mathematics Sectios 5.-5.6 & 7.5-7.6 of Rose cse235@cse.ul.edu

More information

Bertrand s Postulate

Bertrand s Postulate Bertrad s Postulate Lola Thompso Ross Program July 3, 2009 Lola Thompso (Ross Program Bertrad s Postulate July 3, 2009 1 / 33 Bertrad s Postulate I ve said it oce ad I ll say it agai: There s always a

More information

COMP 2804 Solutions Assignment 1

COMP 2804 Solutions Assignment 1 COMP 2804 Solutios Assiget 1 Questio 1: O the first page of your assiget, write your ae ad studet uber Solutio: Nae: Jaes Bod Studet uber: 007 Questio 2: I Tic-Tac-Toe, we are give a 3 3 grid, cosistig

More information

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

Let us consider the following problem to warm up towards a more general statement. Lecture 4: Sequeces with repetitios, distributig idetical objects amog distict parties, the biomial theorem, ad some properties of biomial coefficiets Refereces: Relevat parts of chapter 15 of the Math

More information

Homework 1 Solutions. The exercises are from Foundations of Mathematical Analysis by Richard Johnsonbaugh and W.E. Pfaffenberger.

Homework 1 Solutions. The exercises are from Foundations of Mathematical Analysis by Richard Johnsonbaugh and W.E. Pfaffenberger. Homewor 1 Solutios Math 171, Sprig 2010 Hery Adams The exercises are from Foudatios of Mathematical Aalysis by Richard Johsobaugh ad W.E. Pfaffeberger. 2.2. Let h : X Y, g : Y Z, ad f : Z W. Prove that

More information

Problem Set 2 Solutions

Problem Set 2 Solutions CS271 Radomess & Computatio, Sprig 2018 Problem Set 2 Solutios Poit totals are i the margi; the maximum total umber of poits was 52. 1. Probabilistic method for domiatig sets 6pts Pick a radom subset S

More information

Tutorial F n F n 1

Tutorial F n F n 1 (CS 207) Discrete Structures July 30, 203 Tutorial. Prove the followig properties of Fiboacci umbers usig iductio, where Fiboacci umbers are defied as follows: F 0 =0,F =adf = F + F 2. (a) Prove that P

More information

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

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 Homewor 3 Chapter 5 pp53: 3 40 45 Chapter 6 p85: 4 6 4 30 Use combiatorial reasoig to prove the idetity 3 3 Proof Let S be a set of elemets ad let a b c be distict elemets of S The umber of -subsets of

More information

Combinatorially Thinking

Combinatorially Thinking Combiatorially Thiig SIMUW 2008: July 4 25 Jeifer J Qui jjqui@uwashigtoedu Philosophy We wat to costruct our mathematical uderstadig To this ed, our goal is to situate our problems i cocrete coutig cotexts

More information

Combinatorics and Newton s theorem

Combinatorics and Newton s theorem INTRODUCTION TO MATHEMATICAL REASONING Key Ideas Worksheet 5 Combiatorics ad Newto s theorem This week we are goig to explore Newto s biomial expasio theorem. This is a very useful tool i aalysis, but

More information

Solutions to Final Exam

Solutions to Final Exam Solutios to Fial Exam 1. Three married couples are seated together at the couter at Moty s Blue Plate Dier, occupyig six cosecutive seats. How may arragemets are there with o wife sittig ext to her ow

More information

The Random Walk For Dummies

The Random Walk For Dummies The Radom Walk For Dummies Richard A Mote Abstract We look at the priciples goverig the oe-dimesioal discrete radom walk First we review five basic cocepts of probability theory The we cosider the Beroulli

More information

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

Combinatorics I Introduction. Combinatorics. Combinatorics I Motivating Example. Combinations. Product Rule. Permutations. Theorem (Product Rule) Combiatorics I Itroductio Combiatorics Computer Sciece & Egieerig 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.ul.edu Combiatorics is the study of collectios of objects. Specifically, coutig

More information

Lecture 4: Grassmannians, Finite and Affine Morphisms

Lecture 4: Grassmannians, Finite and Affine Morphisms 18.725 Algebraic Geometry I Lecture 4 Lecture 4: Grassmaias, Fiite ad Affie Morphisms Remarks o last time 1. Last time, we proved the Noether ormalizatio lemma: If A is a fiitely geerated k-algebra, the,

More information

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

Putnam Training Exercise Counting, Probability, Pigeonhole Principle (Answers) Putam Traiig Exercise Coutig, Probability, Pigeohole Pricile (Aswers) November 24th, 2015 1. Fid the umber of iteger o-egative solutios to the followig Diohatie equatio: x 1 + x 2 + x 3 + x 4 + x 5 = 17.

More information

( ) GENERATING FUNCTIONS

( ) GENERATING FUNCTIONS GENERATING FUNCTIONS Solve a ifiite umber of related problems i oe swoop. *Code the problems, maipulate the code, the decode the aswer! Really a algebraic cocept but ca be eteded to aalytic basis for iterestig

More information

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

Chapter 7 COMBINATIONS AND PERMUTATIONS. where we have the specific formula for the binomial coefficients: Chapter 7 COMBINATIONS AND PERMUTATIONS We have see i the previous chapter that (a + b) ca be writte as 0 a % a & b%þ% a & b %þ% b where we have the specific formula for the biomial coefficiets: '!!(&)!

More information

Machine Learning Theory Tübingen University, WS 2016/2017 Lecture 11

Machine Learning Theory Tübingen University, WS 2016/2017 Lecture 11 Machie Learig Theory Tübige Uiversity, WS 06/07 Lecture Tolstikhi Ilya Abstract We will itroduce the otio of reproducig kerels ad associated Reproducig Kerel Hilbert Spaces (RKHS). We will cosider couple

More information

As stated by Laplace, Probability is common sense reduced to calculation.

As stated by Laplace, Probability is common sense reduced to calculation. Note: Hadouts DO NOT replace the book. I most cases, they oly provide a guidelie o topics ad a ituitive feel. The math details will be covered i class, so it is importat to atted class ad also you MUST

More information

COS 341 Discrete Mathematics. Exponential Generating Functions and Recurrence Relations

COS 341 Discrete Mathematics. Exponential Generating Functions and Recurrence Relations COS 341 Discrete Mathematics Epoetial Geeratig Fuctios ad Recurrece Relatios 1 Tetbook? 1 studets said they eeded the tetbook, but oly oe studet bought the tet from Triagle. If you do t have the book,

More information

Joe Holbrook Memorial Math Competition

Joe Holbrook Memorial Math Competition Joe Holbrook Memorial Math Competitio 8th Grade Solutios October 5, 07. Sice additio ad subtractio come before divisio ad mutiplicatio, 5 5 ( 5 ( 5. Now, sice operatios are performed right to left, ( 5

More information

Pairs of disjoint q-element subsets far from each other

Pairs of disjoint q-element subsets far from each other Pairs of disjoit q-elemet subsets far from each other Hikoe Eomoto Departmet of Mathematics, Keio Uiversity 3-14-1 Hiyoshi, Kohoku-Ku, Yokohama, 223 Japa, eomoto@math.keio.ac.jp Gyula O.H. Katoa Alfréd

More information

MT5821 Advanced Combinatorics

MT5821 Advanced Combinatorics MT5821 Advaced Combiatorics 1 Coutig subsets I this sectio, we cout the subsets of a -elemet set. The coutig umbers are the biomial coefficiets, familiar objects but there are some ew thigs to say about

More information

HOMEWORK 2 SOLUTIONS

HOMEWORK 2 SOLUTIONS HOMEWORK SOLUTIONS CSE 55 RANDOMIZED AND APPROXIMATION ALGORITHMS 1. Questio 1. a) The larger the value of k is, the smaller the expected umber of days util we get all the coupos we eed. I fact if = k

More information

Summer High School 2009 Aaron Bertram

Summer High School 2009 Aaron Bertram Summer High School 009 Aaro Bertram 3 Iductio ad Related Stuff Let s thik for a bit about the followig two familiar equatios: Triagle Number Equatio Square Number Equatio: + + 3 + + = ( + + 3 + 5 + + (

More information

ARRANGEMENTS IN A CIRCLE

ARRANGEMENTS IN A CIRCLE ARRANGEMENTS IN A CIRCLE Whe objects are arraged i a circle, the total umber of arragemets is reduced. The arragemet of (say) four people i a lie is easy ad o problem (if they liste of course!!). With

More information

ECEN 655: Advanced Channel Coding Spring Lecture 7 02/04/14. Belief propagation is exact on tree-structured factor graphs.

ECEN 655: Advanced Channel Coding Spring Lecture 7 02/04/14. Belief propagation is exact on tree-structured factor graphs. ECEN 655: Advaced Chael Codig Sprig 014 Prof. Hery Pfister Lecture 7 0/04/14 Scribe: Megke Lia 1 4-Cycles i Gallager s Esemble What we already kow: Belief propagatio is exact o tree-structured factor graphs.

More information

1 Summary: Binary and Logic

1 Summary: Binary and Logic 1 Summary: Biary ad Logic Biary Usiged Represetatio : each 1-bit is a power of two, the right-most is for 2 0 : 0110101 2 = 2 5 + 2 4 + 2 2 + 2 0 = 32 + 16 + 4 + 1 = 53 10 Usiged Rage o bits is [0...2

More information

Name of the Student:

Name of the Student: SUBJECT NAME : Discrete Mathematics SUBJECT CODE : MA 65 MATERIAL NAME : Part A questios MATERIAL CODE : JM08AM1013 REGULATION : R008 UPDATED ON : May-Jue 016 (Sca the above Q.R code for the direct dowload

More information

Math 778S Spectral Graph Theory Handout #3: Eigenvalues of Adjacency Matrix

Math 778S Spectral Graph Theory Handout #3: Eigenvalues of Adjacency Matrix Math 778S Spectral Graph Theory Hadout #3: Eigevalues of Adjacecy Matrix The Cartesia product (deoted by G H) of two simple graphs G ad H has the vertex-set V (G) V (H). For ay u, v V (G) ad x, y V (H),

More information

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

Basic Combinatorics. Math 40210, Section 01 Spring Homework 7 due Monday, March 26 Basic Combiatorics Math 40210, Sectio 01 Sprig 2012 Homewor 7 due Moday, March 26 Geeral iformatio: I ecourage you to tal with your colleagues about homewor problems, but your fial write-up must be your

More information

What is Probability?

What is Probability? Quatificatio of ucertaity. What is Probability? Mathematical model for thigs that occur radomly. Radom ot haphazard, do t ow what will happe o ay oe experimet, but has a log ru order. The cocept of probability

More information

Number Representation

Number Representation Number Represetatio 1 Number System :: The Basics We are accustomed to usig the so-called decimal umber system Te digits :: 0,1,2,3,4,5,6,7,8,9 Every digit positio has a weight which is a power of 10 Base

More information

Week 5-6: The Binomial Coefficients

Week 5-6: The Binomial Coefficients Wee 5-6: The Biomial Coefficiets March 6, 2018 1 Pascal Formula Theorem 11 (Pascal s Formula For itegers ad such that 1, ( ( ( 1 1 + 1 The umbers ( 2 ( 1 2 ( 2 are triagle umbers, that is, The petago umbers

More information

Math 105 TOPICS IN MATHEMATICS REVIEW OF LECTURES VII. 7. Binomial formula. Three lectures ago ( in Review of Lectuires IV ), we have covered

Math 105 TOPICS IN MATHEMATICS REVIEW OF LECTURES VII. 7. Binomial formula. Three lectures ago ( in Review of Lectuires IV ), we have covered Math 5 TOPICS IN MATHEMATICS REVIEW OF LECTURES VII Istructor: Lie #: 59 Yasuyuki Kachi 7 Biomial formula February 4 Wed) 5 Three lectures ago i Review of Lectuires IV ) we have covered / \ / \ / \ / \

More information

Lecture 11: Pseudorandom functions

Lecture 11: Pseudorandom functions COM S 6830 Cryptography Oct 1, 2009 Istructor: Rafael Pass 1 Recap Lecture 11: Pseudoradom fuctios Scribe: Stefao Ermo Defiitio 1 (Ge, Ec, Dec) is a sigle message secure ecryptio scheme if for all uppt

More information

Lecture 2.5: Sequences

Lecture 2.5: Sequences Lecture.5: Sequeces CS 50, Discrete Structures, Fall 015 Nitesh Saxea Adopted from previous lectures by Zeph Gruschlag Course Admi HW posted Covers Chapter Due Oct 0 (Tue) Mid Term 1: Oct 15 (Thursday)

More information

What is Probability?

What is Probability? Quatificatio of ucertaity. What is Probability? Mathematical model for thigs that occur radomly. Radom ot haphazard, do t kow what will happe o ay oe experimet, but has a log ru order. The cocept of probability

More information

(k) x n. n! tk = x a. (i) x p p! ti ) ( q 0. i 0. k A (i) n p

(k) x n. n! tk = x a. (i) x p p! ti ) ( q 0. i 0. k A (i) n p Math 880 Bigraded Classes & Stirlig Cycle Numbers Fall 206 Bigraded classes. Followig Flajolet-Sedgewic Ch. III, we defie a bigraded class A to be a set of combiatorial objects a A with two measures of

More information

CS322: Network Analysis. Problem Set 2 - Fall 2009

CS322: Network Analysis. Problem Set 2 - Fall 2009 Due October 9 009 i class CS3: Network Aalysis Problem Set - Fall 009 If you have ay questios regardig the problems set, sed a email to the course assistats: simlac@staford.edu ad peleato@staford.edu.

More information

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

International Contest-Game MATH KANGAROO Canada, Grade 11 and 12 Part A: Each correct aswer is worth 3 poits. Iteratioal Cotest-Game MATH KANGAROO Caada, 007 Grade ad. Mike is buildig a race track. He wats the cars to start the race i the order preseted o the left,

More information

14 Classic Counting Problems in Combinatorics

14 Classic Counting Problems in Combinatorics 14 Classic Coutig Problems i Combiatorics (Herbert E. Müller, May 2017, herbert-mueller.ifo) Combiatorics is about coutig objects, or the umber of ways of doig somethig. I this article I preset some classic

More information

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) = AN INTRODUCTION TO SCHRÖDER AND UNKNOWN NUMBERS NICK DUFRESNE Abstract. I this article we will itroduce two types of lattice paths, Schröder paths ad Ukow paths. We will examie differet properties of each,

More information

Complex Numbers Solutions

Complex Numbers Solutions Complex Numbers Solutios Joseph Zoller February 7, 06 Solutios. (009 AIME I Problem ) There is a complex umber with imagiary part 64 ad a positive iteger such that Fid. [Solutio: 697] 4i + + 4i. 4i 4i

More information

CS284A: Representations and Algorithms in Molecular Biology

CS284A: Representations and Algorithms in Molecular Biology CS284A: Represetatios ad Algorithms i Molecular Biology Scribe Notes o Lectures 3 & 4: Motif Discovery via Eumeratio & Motif Represetatio Usig Positio Weight Matrix Joshua Gervi Based o presetatios by

More information

We will conclude the chapter with the study a few methods and techniques which are useful

We will conclude the chapter with the study a few methods and techniques which are useful Chapter : Coordiate geometry: I this chapter we will lear about the mai priciples of graphig i a dimesioal (D) Cartesia system of coordiates. We will focus o drawig lies ad the characteristics of the graphs

More information

6.046 Recitation 5: Binary Search Trees Bill Thies, Fall 2004 Outline

6.046 Recitation 5: Binary Search Trees Bill Thies, Fall 2004 Outline 6.046 Recitatio 5: Biary Search Trees Bill Thies, Fall 2004 Outlie My cotact iformatio: Bill Thies thies@mit.edu Office hours: Sat 1-3pm, 36-153 Recitatio website: http://cag.lcs.mit.edu/~thies/6.046/

More information

= 5! 3! 2! = 5! 3! (5 3)!. In general, the number of different groups of r items out of n items (when the order is ignored) is given by n!

= 5! 3! 2! = 5! 3! (5 3)!. In general, the number of different groups of r items out of n items (when the order is ignored) is given by n! 0 Combiatoial Aalysis Copyight by Deiz Kalı 4 Combiatios Questio 4 What is the diffeece betwee the followig questio i How may 3-lette wods ca you wite usig the lettes A, B, C, D, E ii How may 3-elemet

More information

Math 475, Problem Set #12: Answers

Math 475, Problem Set #12: Answers Math 475, Problem Set #12: Aswers A. Chapter 8, problem 12, parts (b) ad (d). (b) S # (, 2) = 2 2, sice, from amog the 2 ways of puttig elemets ito 2 distiguishable boxes, exactly 2 of them result i oe

More information

Computability and computational complexity

Computability and computational complexity Computability ad computatioal complexity Lecture 4: Uiversal Turig machies. Udecidability Io Petre Computer Sciece, Åbo Akademi Uiversity Fall 2015 http://users.abo.fi/ipetre/computability/ 21. toukokuu

More information

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

Lecture 6 April 10. We now give two identities which are useful for simplifying sums of binomial coefficients. Lecture 6 April 0 As aother applicatio of the biomial theorem we have the followig. For 0. 0 I other words startig with the secod row ad goig dow if we sum alog the rows alteratig sig as we go the result

More information

ICS141: Discrete Mathematics for Computer Science I

ICS141: Discrete Mathematics for Computer Science I Uivesity of Hawaii ICS141: Discete Mathematics fo Compute Sciece I Dept. Ifomatio & Compute Sci., Uivesity of Hawaii Ja Stelovsy based o slides by D. Bae ad D. Still Oigials by D. M. P. Fa ad D. J.L. Goss

More information

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

MATH 324 Summer 2006 Elementary Number Theory Solutions to Assignment 2 Due: Thursday July 27, 2006 MATH 34 Summer 006 Elemetary Number Theory Solutios to Assigmet Due: Thursday July 7, 006 Departmet of Mathematical ad Statistical Scieces Uiversity of Alberta Questio [p 74 #6] Show that o iteger of the

More information

Discrete mathematics , Fall Instructor: prof. János Pach. 1 Counting problems and the inclusion-exclusion principle

Discrete mathematics , Fall Instructor: prof. János Pach. 1 Counting problems and the inclusion-exclusion principle Discrete mathematics 014-015, Fall Istructor: prof Jáos Pach - covered material - Special thaks to Jaa Cslovjecsek, Kelly Fakhauser, ad Sloboda Krstic for sharig their lecture otes If you otice ay errors,

More information

Lecture 23 Rearrangement Inequality

Lecture 23 Rearrangement Inequality Lecture 23 Rearragemet Iequality Holde Lee 6/4/ The Iequalities We start with a example Suppose there are four boxes cotaiig $0, $20, $50 ad $00 bills, respectively You may take 2 bills from oe box, 3

More information

CALCULATION OF FIBONACCI VECTORS

CALCULATION OF FIBONACCI VECTORS CALCULATION OF FIBONACCI VECTORS Stuart D. Aderso Departmet of Physics, Ithaca College 953 Daby Road, Ithaca NY 14850, USA email: saderso@ithaca.edu ad Dai Novak Departmet of Mathematics, Ithaca College

More information

On Divisibility concerning Binomial Coefficients

On Divisibility concerning Binomial Coefficients A talk give at the Natioal Chiao Tug Uiversity (Hsichu, Taiwa; August 5, 2010 O Divisibility cocerig Biomial Coefficiets Zhi-Wei Su Najig Uiversity Najig 210093, P. R. Chia zwsu@ju.edu.c http://math.ju.edu.c/

More information

SOLUTIONS TO PRISM PROBLEMS Junior Level 2014

SOLUTIONS TO PRISM PROBLEMS Junior Level 2014 SOLUTIONS TO PRISM PROBLEMS Juior Level 04. (B) Sice 50% of 50 is 50 5 ad 50% of 40 is the secod by 5 0 5. 40 0, the first exceeds. (A) Oe way of comparig the magitudes of the umbers,,, 5 ad 0.7 is 4 5

More information

Chapter 6. Advanced Counting Techniques

Chapter 6. Advanced Counting Techniques Chapter 6 Advaced Coutig Techiques 6.: Recurrece Relatios Defiitio: A recurrece relatio for the sequece {a } is a equatio expressig a i terms of oe or more of the previous terms of the sequece: a,a2,a3,,a

More information

The Binomial Theorem

The Binomial Theorem The Biomial Theorem Robert Marti Itroductio The Biomial Theorem is used to expad biomials, that is, brackets cosistig of two distict terms The formula for the Biomial Theorem is as follows: (a + b ( k

More information

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

1. n! = n. tion. For example, (n+1)! working with factorials. = (n+1) n (n 1) 2 1 Biomial Coefficiets ad Permutatios Mii-lecture The followig pages discuss a few special iteger coutig fuctios You may have see some of these before i a basic probability class or elsewhere, but perhaps

More information

CSE 21 Mathematics for

CSE 21 Mathematics for CSE 2 Mathematics for Algorithm ad System Aalysis Summer, 2005 Outlie What a geeratig fuctio is How to create a geeratig fuctio to model a problem Fidig the desired coefficiet Partitios Expoetial geeratig

More information

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

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018) Radomized Algorithms I, Sprig 08, Departmet of Computer Sciece, Uiversity of Helsiki Homework : Solutios Discussed Jauary 5, 08). Exercise.: Cosider the followig balls-ad-bi game. We start with oe black

More information

Tennessee Department of Education

Tennessee Department of Education Teessee Departmet of Educatio Task: Comparig Shapes Geometry O a piece of graph paper with a coordiate plae, draw three o-colliear poits ad label them A, B, C. (Do ot use the origi as oe of your poits.)

More information

P1 Chapter 8 :: Binomial Expansion

P1 Chapter 8 :: Binomial Expansion P Chapter 8 :: Biomial Expasio jfrost@tiffi.kigsto.sch.uk www.drfrostmaths.com @DrFrostMaths Last modified: 6 th August 7 Use of DrFrostMaths for practice Register for free at: www.drfrostmaths.com/homework

More information

Lecture Notes for CS 313H, Fall 2011

Lecture Notes for CS 313H, Fall 2011 Lecture Notes for CS 313H, Fall 011 August 5. We start by examiig triagular umbers: T () = 1 + + + ( = 0, 1,,...). Triagular umbers ca be also defied recursively: T (0) = 0, T ( + 1) = T () + + 1, or usig

More information

Lecture 16: Monotone Formula Lower Bounds via Graph Entropy. 2 Monotone Formula Lower Bounds via Graph Entropy

Lecture 16: Monotone Formula Lower Bounds via Graph Entropy. 2 Monotone Formula Lower Bounds via Graph Entropy 15-859: Iformatio Theory ad Applicatios i TCS CMU: Sprig 2013 Lecture 16: Mootoe Formula Lower Bouds via Graph Etropy March 26, 2013 Lecturer: Mahdi Cheraghchi Scribe: Shashak Sigh 1 Recap Graph Etropy:

More information

MA3210 Lecture 8: The Pigeonhole Principle I 1

MA3210 Lecture 8: The Pigeonhole Principle I 1 MA30 Lecture 8: The Pigeohole Priciple I Erik E. Westlud The Pigeohole Priciple (simple: If +, or more objects are placed ito boxes, the at least oe box will cotai two or more objects. Proof. If ot, the

More information

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

Model Theory 2016, Exercises, Second batch, covering Weeks 5-7, with Solutions Model Theory 2016, Exercises, Secod batch, coverig Weeks 5-7, with Solutios 3 Exercises from the Notes Exercise 7.6. Show that if T is a theory i a coutable laguage L, haso fiite model, ad is ℵ 0 -categorical,

More information

Solutions to Final Exam Review Problems

Solutions to Final Exam Review Problems . Let f(x) 4+x. Solutios to Fial Exam Review Problems Math 5C, Witer 2007 (a) Fid the Maclauri series for f(x), ad compute its radius of covergece. Solutio. f(x) 4( ( x/4)) ( x/4) ( ) 4 4 + x. Sice the

More information

( ) = p and P( i = b) = q.

( ) = p and P( i = b) = q. MATH 540 Radom Walks Part 1 A radom walk X is special stochastic process that measures the height (or value) of a particle that radomly moves upward or dowward certai fixed amouts o each uit icremet of

More information

Induction: Solutions

Induction: Solutions Writig Proofs Misha Lavrov Iductio: Solutios Wester PA ARML Practice March 6, 206. Prove that a 2 2 chessboard with ay oe square removed ca always be covered by shaped tiles. Solutio : We iduct o. For

More information

Chimica Inorganica 3

Chimica Inorganica 3 himica Iorgaica Irreducible Represetatios ad haracter Tables Rather tha usig geometrical operatios, it is ofte much more coveiet to employ a ew set of group elemets which are matrices ad to make the rule

More information

Permutations" Basic principle of counting" Tree diagrams" k = 3, n 1 = 2, n 2 = 3, n 3 = 2. Braille alphabet" 10/31/10

Permutations Basic principle of counting Tree diagrams k = 3, n 1 = 2, n 2 = 3, n 3 = 2. Braille alphabet 10/31/10 /3/ Basic priciple of coutig" If step ca be performed i ways, step 2 i 2 ways,..., step i ways, the the ordered sequece" (step, step 2,..., step )" ca be performed i 2... ways. " Tree diagrams" = 3, =

More information

Some Basic Counting Techniques

Some Basic Counting Techniques Some Basic Coutig Techiques Itroductio If A is a oempty subset of a fiite sample space S, the coceptually simplest way to fid the probability of A would be simply to apply the defiitio P (A) = s A p(s);

More information

Introduction To Discrete Mathematics

Introduction To Discrete Mathematics Itroductio To Discrete Mathematics Review If you put + pigeos i pigeoholes the at least oe hole would have more tha oe pigeo. If (r + objects are put ito boxes, the at least oe of the boxes cotais r or

More information

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

and each factor on the right is clearly greater than 1. which is a contradiction, so n must be prime. MATH 324 Summer 200 Elemetary Number Theory Solutios to Assigmet 2 Due: Wedesday July 2, 200 Questio [p 74 #6] Show that o iteger of the form 3 + is a prime, other tha 2 = 3 + Solutio: If 3 + is a prime,

More information