Combinatorics I Introduction. Combinatorics. Combinatorics I Motivating Example. Combinations. Product Rule. Permutations. Theorem (Product Rule)
|
|
- Imogene Ford
- 6 years ago
- Views:
Transcription
1 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 objects, arragemet, deragemet, etc. of objects alog with their mathematical properties. Coutig objects is importat i order to aalyze algorithms ad compute discrete probabilities. Origially, combiatorics was motivated by gamblig: coutig cofiguratios is essetial to elemetary probability. I additio, combiatorics ca be used as a proof techique. A combiatorial proof is a proof method that uses coutig argumets to prove a statemet. Combiatorics I Motivatig Combiatios How may arragemets are there of a deck of 52 cards? The stadard deck (The Mameluke deck) is thought to be 000 years old. Have all possible 52! bee dealt? Suppose that 5 billio people have dealt had every secod for the last 000 years. Percetage of deals that have occurred: ! To eve deal % of all hads, we would require years (quidecillio). Choosig k elemets from a set of cardiality is a combiatio Notatios: C k C(, k) Combiatios are uordered! k ( k)!k! Commo usage: choosig sigletos: ( ) Choosig pairs: ( ) 2 ( ) 2 Permutatios Product Rule If two evets are ot mutually exclusive (that is, we do them separately), the we apply the product rule. Arragig elemets is a permutatio Number of permutatios:! Permutatios are ordered (Product Rule) Suppose a procedure ca be accomplished with two disjoit subtasks. If there are ways of doig the first task ad 2 ways of doig the secod, the there are 2 ways of doig the overall procedure.
2 Sum Rule I Sum Rule II If two evets are mutually exclusive, that is, they caot be doe at the same time, the we must apply the sum rule. (Sum Rule) If a evet e ca be doe i ways ad a evet e 2 ca be doe i 2 ways ad e ad e 2 are mutually exclusive, the the umber of ways of both evets occurrig is + 2 There is a atural geeralizatio to ay sequece of m tasks; amely the umber of ways m mutually exclusive evets ca occur is m + m We ca give aother formulatio i terms of sets. Let A, A 2,..., A m be pairwise disjoit sets. The A A 2 A m A + A A m I fact, this is a special case of the geeral Priciple of Iclusio-Exclusio. Priciple of Iclusio-Exclusio (PIE) I Itroductio Priciple of Iclusio-Exclusio (PIE) II Itroductio We caot use the sum rule because we would be over coutig the umber of possible outcomes. Say there are two evets, e ad e 2 for which there are ad 2 possible outcomes respectively. Now, say that oly oe evet ca occur, ot both. I this situatio, we caot apply the sum rule? Why? Istead, we have to cout the umber of possible outcomes of e ad e 2 mius the umber of possible outcomes i commo to both; i.e. the umber of ways to do both tasks. If agai we thik of them as sets, we have A + A 2 A A 2 Priciple of Iclusio-Exclusio (PIE) III Itroductio More geerally, we have the followig. Lemma Let A, B be subsets of a fiite set U. The. A B A + B A B 2. A B mi{ A, B } 3. A \ B A A B A B 4. A U A 5. A B A B A B A+B 2 A B A\B + B\A 6. A B A B Priciple of Iclusio-Exclusio (PIE) I Let A, A 2,..., A be fiite sets, the A A 2 A i A i A i A j i<j + A i A j A k i<j<k +( ) + A A 2 A
3 Priciple of Iclusio-Exclusio (PIE) II Priciple of Iclusio-Exclusio (PIE) III To illustrate, whe 3, we have Each summatio is over all i, pairs i, j with i < j, triples i, j, k with i < j < k etc. A A 2 A 3 A + A 2 + A 3 [ A A 2 + A A 3 + A 2 A 3 ] + A A 2 A 3 Priciple of Iclusio-Exclusio (PIE) IV Priciple of Iclusio-Exclusio (PIE) I I To illustrate, whe 4, we have A A 2 A 3 A 4 A + A 2 + A 3 + A 4 [ A A 2 + A A A A 4 ] A 2 A 3 + A 2 A 4 + A 3 A 4 [ + A A 2 A 3 + A A 2 A 4 + ] A A 3 A 4 + A 2 A 3 A 4 A A 2 A 3 A 4 How may itegers betwee ad 300 (iclusive) are Let. Divisible by at least oe of 3, 5, 7? 2. Divisible by 3 ad by 5 but ot by 7? 3. Divisible by 5 but by either 3 or 7? A { } B { } C { } Priciple of Iclusio-Exclusio (PIE) II I Priciple of Iclusio-Exclusio (PIE) III I How big are each of these sets? We ca easily use the floor fuctio; A 300/3 00 B 300/5 60 C 300/7 42 For () above, we are asked to fid A B C. By the priciple of iclusio-exclusio, we have that A B C A + B + C [ ] A B + A C + B C + A B C It remais to fid the fial 4 cardialities. All three divisors, 3, 5, 7 are relatively prime. Thus, ay iteger that is divisible by both 3 ad 5 must simply be divisible by 5.
4 Priciple of Iclusio-Exclusio (PIE) IV I Priciple of Iclusio-Exclusio (PIE) V I Usig the same reasoig for all pairs (ad the triple) we have Therefore, A B 300/5 20 A C 300/2 4 B C 300/35 8 A B C 300/05 2 For (2) above, it is eough to fid (A B) \ C By the defiitio of set-mius, (A B) \ C A B A B C A B C Priciple of Iclusio-Exclusio (PIE) VI I For (3) above, we are asked to fid B \ (A C) B B (A C) By distributig B over the itersectio, we get B (A C) (B A) (B C) B A + B C (B A) (B C) B A + B C B A C So the aswer is B Priciple of Iclusio-Exclusio (PIE) I II The priciple of iclusio-exclusio ca be used to cout the umber of oto fuctios. Let A {a, a 2,..., a m }, A m Let B {b, b 2,..., b }, B Say m (otherwise o oto fuctios exist) Observe: total umber of fuctios is m Cosider all fuctios such that o elemet maps to b : ( ) m Geeralize this: cosider all fuctios such that o elemet maps to b i for a particular i Priciple of Iclusio-Exclusio (PIE) II II There are such choices: Thus, the umber of fuctios that do ot map to (at least) a sigle elemet is: ( ) m We ve over couted though: whe we exclude b 2, the we are recoutig fuctios that also exclude b Need to restore couts: cosider pairs Cosider all fuctios such that o elemet maps to a pair of elemets: ( 2) m 2 Priciple of Iclusio-Exclusio (PIE) III II But observe: the first equatio is for fuctios that do ot map to at least oe elemet The secod equatio is for fuctios that do ot map to at least two elemets I.e. the first equatio took away too may fuctios; the secod restores this cout Cotiuig for i 3,..., we ca geeralize this.
5 Priciple of Iclusio-Exclusio (PIE) IV II Let A, B be o-empty sets of cardiality m, with m. The there are ( ) i ( i) m i i.e. m i0 ( ) ( ) ( ) ( ) m + ( 2) m + ( ) m 2 oto fuctios f : A B. Priciple of Iclusio-Exclusio (PIE) V II This is related to Stirlig Numbers of the Secod Kid Defiitio Stirlig umbers of the secod kid represet the umber of ways that you ca partitio elemets ito k o-empty subsets ad is defied as S(, k) { } k k! k ( k ( ) j j j0 Oly differece: for j k, (k j) 0 ) (k j) Stirlig umbers partitio ito uordered subsets Fuctio mappig requires orderig mapped elemets! possible mappigs, so the k! cacels out Priciple of Iclusio-Exclusio (PIE) VI II Priciple of Iclusio-Exclusio (PIE) VII II How may ways of givig out 6 pieces of cady to 3 childre if each child must receive at least oe piece? This ca be modeled by lettig A represet the set of cadies ad B be the set of childre. To cout how may there are, we apply the theorem ad get (for m 6, 3), 3 6 ( ) 3 ( ) 3 (3 ) (3 2) The a fuctio f : A B ca be iterpreted as givig cady a i to child c j. Sice each child must receive at least oe cady, we are cosiderig oly oto fuctios. Deragemets I Deragemets II Cosider the hatcheck problem. A employee checks hats from customers. However, he forgets to tag them. Whe customer s check-out their hats, they are give oe at radom. What is the probability that o oe will get their hat back? This ca be modeled usig deragemets: permutatios of objects such that o elemet is i its origial positio. The umber of deragemets of a set with elemets is [ D!! + 2! 3! + ] ( )!
6 Deragemets III Thus, the aswer to the hatcheck problem is Its iterestig to ote that D! e! + 2! 3! + + ( )! So that the probability of the hatcheck problem coverges; D lim e ! Deragemets IV The formula for deragemets ca be derived as follows. The umber of deragemets is equal to the umber of permutatio (!) mius ay permutatio that leaves at least oe elemet i its origial place (o deragemets). Total umber of permutatios:! Number of permutatios such that at least elemet is i place: ( )!!! We ve over corrected; add back permutatios such that at least 2 elemets are i place: + ( 2)!! 2 2! Deragemets V The Pigeohole Priciple I I geeral: ( ) k ( k)!! k k! Last term will be whe k which is the idetity permutatio The pigeohole priciple states that if there are more pigeos tha there are roosts (pigeoholes), for at least oe pigeohole, at least two pigeos must be i it. (Pigeohole Priciple) If k + or more objects are placed ito k boxes, the there is at least oe box cotaiig two or more objects. This is a fudametal tool of elemetary discrete mathematics. It is also kow as the Dirichlet Drawer Priciple. The Pigeohole Priciple II Geeralized Pigeohole Priciple I It is seemigly simple, but very powerful. The difficulty comes i where ad how to apply it. Some simple applicatios i computer sciece: Calculatig the probability of Hash fuctios havig a collisio. Provig that there ca be o lossless compressio algorithm compressig all files to withi a certai ratio. Lemma For two fiite sets A, B there exists a bijectio f : A B if ad oly if A B. If N objects are placed ito k boxes the there is at least oe box cotaiig at least N k I ay group of 367 or more people, at least two of them must have bee bor o the same date.
7 Probablistic Pigeohole Priciple I Probablistic Pigeohole Priciple II A probabilistic geeralizatio states that if objects are radomly put ito m boxes with uiform probability (each object is placed i a give box with probability /m) the at least oe box will hold more tha oe object with probability, m! (m )!m Amog 0 people, what is the probability that two or more will have the same birthday? Here, 0 ad m 365 (igore leapyears). Thus, the probability that two will have the same birthday is 365!.69 (365 0)!3650 So less tha a 2% probability! Oly 23 people required for a better tha 50% (50.7%) probability With oly 57, we have a better tha 99% probability Probablistic Pigeohole Priciple III Probablistic Pigeohole Priciple IV Derivatio: cosider the -permutatios of m pigeoholes: How may people do we eed to have a better tha 50% probability? For what is 365! (365 )! Surprisigly small: for 23, probability is greater tha 50.7%! Kow as the Birthday paradox P (m, ) m! m(m )(m 2) (m + ) (m )! These are the pigeoholes that we will evely distribute objects ito. Order is importat because the objects are distict. We place each object ito distict pigeohole with probability m, so i total: ( ) m m Thus the probability is: m! (m )!m Probablistic Pigeohole Priciple V Alteratively: cosider choosig bis (from a total of m bis to map objects to: ( ) m! (m )!! But ow cosider actually mappig objects o,..., o to each bi. Here, order matters, but i additio, we oly wat to map oe object to oe bucket. That is, we wat to cout the total umber of oe-to-oe fuctios from o,..., o to the bis we chose. Thus:! (m )!!!! (m )! Probablistic Pigeohole Priciple VI Thus the probability of a radom allocatio resultig i all bis havig 0 or objects is! (m )! m! m (m )!m Agai, viewig allocatio of objects to buckets, how may fuctios i total are there? m
8 Pigeohole Priciple I I Pigeohole Priciple II I Show that i a room of people with certai acquaitaces, some pair must have the same umber of acquaitaces. Note that this is equivalet to showig that ay symmetric, irreflexive relatio o elemets must have two elemets with the same umber of relatios. We ll show by cotradictio usig the pigeohole priciple. Assume to the cotrary that every perso has a differet umber of acquaitaces; 0,,..., (we caot have here because it is irreflexive). Are we doe? No, sice we oly have people, this is okay (i.e. there are possibilities). We eed to use the fact that acquaitaceship is a symmetric, irreflexive relatio. I particular, some perso kows 0 people while aother kows people. I other words, someoe kows everyoe, but there is also a perso that kows o oe. Thus, we have reached a cotradictio. Pigeohole Priciple I II Show that i ay list of te oegative itegers, a 0,..., a 9, there is a strig of cosecutive items of the list a l, a l+,..., a k whose sum is divisible by 0. Cosider the followig 0 umbers. a 0 a 0 + a a 0 + a + a 2. a 0 + a + a a 9 Pigeohole Priciple II II Otherwise, we observe that each of these umbers must be i oe of the cogruece classes mod 0, 2 mod 0,..., 9 mod 0 By the pigeohole priciple, at least two of the itegers above must lie i the same cogruece class. Say a, a lie i the cogruece class k mod 0. The (a a ) k k(mod 0) ad so the differece (a a ) is divisible by 0. If ay oe of them is divisible by 0 the we are doe. Pigeohole Priciple I III Say 30 buses are to trasport 2000 Corhusker fas to Colorado. Each bus has 80 seats. Show that. Oe of the buses will have 4 empty seats. 2. Oe of the buses will carry at least 67 passegers. For (), the total umber of seats is seats. Thus there will be empty seats total. Pigeohole Priciple II III By the geeralized pigeohole priciple, with 400 empty seats amog 30 buses, oe bus will have at least empty seats. For (2) above, by the pigeohole priciple, seatig 2000 passegers amog 30 buses, oe will have at least passegers.
9 Permutatios I Permutatios II 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. The umber of r permutatios of a set with distict elemets is r P (, r) ( i) ( )( 2) ( r + ) i0 It follows that I particular, P (, r)! ( r)! P (, )! Agai, ote here that order is importat. It is ecessary to distiguish i what cases order is importat ad i which it is ot. Permutatios I Permutatios I Variatio How may pairs of dace parters ca be selected from a group of 2 wome ad 20 me? The first woma ca be partered with ay of the 20 me. The secod with ay of the remaiig 9, etc. To parter all 2 wome, we have P (20, 2) Aother perspective: choose 2 me to iclude, the order them What if we allowed all 32 people to pair up i ay combiatio? Number of permutatios: 32! But a give pair, AB is the same as BA Correct for each pair: 2 6 Now each pair s orderig also does t matter Correct for each such permutatio: 6! 32! 2 6 6! Permutatios II Variatio Permutatios II Geeralizatio: give k objects, how may ways are there to form groups of size k? (k)! (k!)! I how may ways ca the Eglish letters be arraged so that there are exactly te letters betwee a ad z? The umber of ways of arragig 0 letters betwee a ad z is P (24, 0). Sice we ca choose either a or z to come first, there are 2P (24, 0) arragemets of this 2-letter block. For the remaiig 4 letters, there are P (5, 5) 5! arragemets. I all, there are 2P (24, 0) 5!
10 Permutatios III Permutatios III - Cotiued How may permutatios of the letters a, b, c, d, e, f, g cotai either the patter bge or eaf? The umber of total permutatios is P (7, 7) 7!. If we fix the patter bge, the we ca cosider it as a sigle block. Thus, the umber of permutatios with this patter is P (5, 5) 5!. Fixig the patter eaf we have the same umber, 5!. Thus we have Is this correct? 7! 2(5!) No. We have take away too may permutatios: oes cotaiig both eaf ad bge. Here there are two cases, whe eaf comes first ad whe bge comes first. Permutatios III - Cotiued Combiatios I Defiitio eaf caot come before bge, so this is ot a problem. If bge comes first, it must be the case that we have bgeaf as a sigle block ad so we have 3 blocks or 3! arragemets. Altogether we have 7! 2(5!) + 3! 4806 Whereas permutatios cosider order, combiatios are used whe order does ot matter. Defiitio A k-combiatio of elemets of a set is a uordered selectio of k elemets from the set. A combiatio is simply a subset of cardiality k. Combiatios II Defiitio Combiatios III Defiitio The umber of k-combiatios of a set with cardiality with 0 k is! C(, k) k ( k)!k! Note: the otatio, ( k) is read, choose k. I T EX use { choose k} (with the forward slash). A useful fact about combiatios is that they are symmetric. etc. ( ) ( ) ( ) ( ) 2 2
11 Combiatios IV Defiitio Combiatios I I This is formalized i the followig corollary. Corollary Let, k be oegative itegers with k, the ( ) ( ) k k I the Powerball lottery, you pick five umbers betwee ad 59 ad a sigle powerball umber betwee ad 35. How may possible plays are there? Order here does t matter, so the umber of ways of choosig five regular umbers is ( ) 59 5 Combiatios II I Combiatios I II We ca choose amog 35 power ball umbers. These evets are ot mutually exclusive, thus we use the product rule. ( ) 59 59! , 223, 50 5 (59 5)!5! So the odds of wiig are 75, 223, 50 < % I a sequece of 0 coi tosses, how may ways ca 3 heads ad 7 tails come up? The umber of ways of choosig 3 heads out of 0 coi tosses is ( ) 0 3 Combiatios II II However, this is the same as choosig 7 tails out of 0 coi tosses; ( ) 0 3 ( ) This is a perfect illustratio of the previous corollary. Combiatios III II Aother perspective: what is the correspodig probability of 0 coi tosses edig up with 3 heads/7 tails? It is the umber of such outcomes divided by the total umber of possible outcomes: C(0, 7) 2 0 Why 2 0? Each toss was a idepedet evet with 2 possible outcomes. Aother perspective: the total umber of outcomes is equal to the total umber of ways to choose: (0 tails, 0 heads), ( tails, 9 heads), (2 tails, 8 heads),... (0 tails, 0 heads) Which is: 0 i0 ( ) i
12 Combiatios IV II Gambler s Fallacy Say that we ve flipped a coi ad heads has appeared 9 times i a row. What is the probability that the ext flip will be tails? Heads? That is, the sum of biomial coefficiets is equal to 2 Each evet is idepedet: there is a fudametal differece betwee probabilities ivolvig a sequece of evets (parlays) ad the probability of a evet give a prior sequece. August 8, 93 Mote Carlo casio: black appeared 5 times i a row. Gamblers rushed to bet o red. Black would appear a total of 26 times i a row; may lost their bets thikig that red was due. Krusty o why he bet agaist the Harlem Globetrotters: I thought the Geerals were due! Combiatios I III Combiatios II III How may possible committees of five people ca be chose from 20 me ad 2 wome if. if exactly three me must be o each committee? 2. if at least four wome must be o each committee? For (), we must choose 3 me from 20 the two wome from 2. These are ot mutually exclusive, thus the product rule applies. ( )( ) Combiatios III III Combiatios IV III For (2), we cosider two cases; the case where four wome are chose ad the case where five wome are chose. These two cases are mutually exclusive so we use the additio rule. For the first case we have ( )( ) Ad for the secod we have ( )( ) Together we have ( 20 )( 2 4 ) + ( 20 0 )( 2 5 ) 0, 692
13 Biomial Coefficiets I Itroductio Biomial Coefficiets II Itroductio The umber of r-combiatios, ( r) is also called a biomial coefficiet. They are the coefficiets i the expasio of the expressio (multivariate polyomial), (x + y). A biomial is a sum of two terms. (Biomial ) Let x, y be variables ad let be a oegative iteger. The (x + y) j0 x j y j j Biomial Coefficiets III Itroductio Expadig the summatio, we have (x + y) ( ) 0 x + ( ) x y + ( 2) x 2 y ( ) xy + ( ) y For example, (x + y) 3 (x + y)(x + y)(x + y) (x + y)(x 2 + 2xy + y 2 ) x 3 + 3x 2 y + 3xy 2 + y 3 ) Biomial Coefficiets I What is the coefficiet of the term x 8 y 2 i the expasio of (3x + 4y) 20? By the Biomial, we have 20 ( ) 20 (3x + 4y) j (3x) 20 j (4y) j j0 So whe j 2, we have ( ) 20 (3x) 8 (4y) 2 2 so the coefficiet is 20! 2!8! Biomial Coefficiets I More Biomial Coefficiets II More A lot of useful idetities ad facts come from the Biomial. Corollary k k0 ( ) k k x k k k0 2 k k k0 k0 2 0 ( + x) 3 Ad may more.
14 Biomial Coefficiets III More Most of these ca be prove by either iductio or by a combiatorial argumet. (Vadermode s Idetity) Let m,, r be oegative itegers with r ot exceedig either m or. The ( ) m + r ( )( ) m r r k k k0 Biomial Coefficiets IV More Corollary If is a oegative iteger, the Corollary ( ) 2 k0 2 k Let, r be oegative itegers, r. The + r + jr ( ) j r Biomial Coefficiets I Pascal s Idetity & Triagle The followig is kow as Pascal s Idetity which gives a useful idetity for efficietly computig biomial coefficiets. (Pascal s Idetity) Let, k Z + with k. The ( ) ( ) + k k + k Pascal s Idetity forms the basis of a geometric object kow as Pascal s Triagle. Pascal s Triagle ( 0 0) ( ) ( 0 ) ( 2 ) ( 2 ) ( 2 0 2) ( 3 ) ( 3 ) ( 3 ) ( ) ( 4 ) ( 4 ) ( 4 ) ( 4 ) ( ) ( 5 ) ( 5 ) ( 5 ) ( 5 ) ( 5 ) ( ) Pascal s Triagle Pascal s Triagle ( 0 0) ( ) ( 0 ) ( 2 ) ( 2 ) ( 2 0 2) ( 3 ) ( 3 ) ( 3 ) ( ) ( 3 ) ( ) ( 3 4 3) ( 4 ) ( 4 ) ( 4 ) ( 4 ) ( ) ( 5 ) ( 5 ) ( 5 ) ( 5 ) ( 5 ) ( )
15 Geeralized Permutatios I Geeralized Combiatios I Sometimes we are cocered with permutatios ad combiatios i which repetitios are allowed. The umber of r-permutatios of a set of objects with repetitio allowed is r. There are ( + r r ) + r r-combiatios from a set with elemets whe repetitio of elemets is allowed. Geeralized Combiatios II To see this cosider: bars (so cells that represet that types of items) r stars: (if x stars are placed ito a give cell, its the umber of elemets of that type that we choose) So + r thigs to be arraged However, we ve over couted: stars ad bars are idistiguishable Ay sequece of cotiguous stars/bars is the same uder ay orderig, so we eed to divide out by permutatios of ad r: ( + r)! ( )!r! ( + r)! ( + r r)!r! + r r Geeralized Combiatios I There are 30 varieties of douts from which we wish to buy a doze. How may possible orders are there? Here 30 ad we wish to choose r 2. Order does ot matter ad repetitios are possible, so we apply the previous theorem to get that there are ( ) possible orders. 2 Geeralized Combiatios II Geeralized Combiatios III The umber of differet permutatios of objects where there are idistiguishable objects of type, 2 of type 2,..., ad k of type k is!! 2! k! A equivalet way of iterpretig this theorem is the umber of ways to distribute distiguishable objects ito k distiguishable boxes so that i objects are placed ito box i for i, 2,..., k. How may permutatios of the word Mississippi are there? Mississippi cotais 4 distict letters, M, i, s ad p; with, 4, 4, 2 occurreces respectively. Therefore there are permutatios.!!4!4!2!
16 Distiguishable Objects ito Distiguishable Boxes : how may ways are there to deal a 52 card deck ito 5 card hads to four players? ( )( )( )( ) The umber of ways to distribute distiguishable objects ito k distiguishable boxes such that each box has i objects for i,..., k is!! 2! k! Idistiguishable Objects ito Distiguishable Boxes Idistiguishable objects ito distiguishable boxes: equivalet to -combiatios of k elemets whe repetitio is allowed (parameters are switched). The umber of ways to distribute idistiguishable objects ito k distiguishable boxes is ( ) ( ) k + k + k Card example: the 5 box should cotai the remaiig 32 udealt cards Distiguishable Objects ito Idistiguishable Boxes Idistiguishable Objects ito Idistiguishable Boxes I Distiguishable objects ito idistiguishable boxes: ot the same as vice versa. Equivalet to Stirlig umbers of the 2d kid (the k! factor recogizes that boxes are idistiguishable ad corrects for it) The umber of ways to distribute distiguishable objects ito k idistiguishable boxes is k! k ( k ( ) j j j0 ) (k j) Far more complicated : 6 copies of the same book ito 4 idetical boxes: (6), (5, ), (4, 2), (4,, ), (3, 3),... Equivalet to partitios of a iteger sum No closed form, requires a geeratig fuctio: Geeratig Fuctio I Related: Set Partitios I How may ways are there to make chage for a dollar (usig half-dollars, quarters, dimes, ickels, peies)? The geeratig fuctio: C(x) ( x)( x 5 )( x 0 )( x 25 )( x 50 ) gives us the aswer: for ay amout of chage c, we wat the coefficiet of x c i the expasio of C(x). For c 00, the coefficiet of x 00 is 292. The umber of ways to partitio a set ito disjoit o-empty subsets (such that their uio is the origial set). : S {, 2, 3} the the partitios are: {{a}, {b}, {c}} {{a}, {b, c}} {{b}, {a, c}} {{c}, {a, b}} {{a, b, c}}
17 Related: Set Partitios II Related: Set Partitios III The umber of ways to partitio a set of size ito disjoit o-empty subsets correspods to the -th Bell Number: B + k0 B k k Note: B 0, B, B 2 2, B 3 5, B 4 5, 52, 203, 877, 440, 247, 5975,... Basic Idea: Cosider a ew elemet e + It could be i its ow partitio, thus there are ( 0) B partitioigs of the remaiig elemets It could be paired with oe other elemet, leavig ( ) B partitioigs of remaiig elemets It could be paired with two other elemet, leavig ( 2) B 2 partitioigs of remaiig elemets All the way to ( ) B0 Each Bell umber is the sum of Stirlig umbers of the secod kid: { } B k k0 Idea: Stirlig umbers give the umber of ways to partitio ito k o-empty subsets; summig over all such k gives us the formula. Geeratig Permutatios & Combiatios I Itroductio Geeratig Permutatios & Combiatios II Itroductio I geeral, it is iefficiet to solve a problem by cosiderig all permutatios or combiatios sice there are a expoetial umber of such arragemets. Nevertheless, for may problems, o better approach is kow. Whe exact solutios are eeded, back-trackig algorithms are used. Geeratig permutatios or combiatios are sometimes the basis of these algorithms. (Travelig Sales Perso Problem) Cosider a salesma that must visit differet cities. He wishes to visit them i a order such that his overall distace traveled is miimized. Geeratig Permutatios & Combiatios III Itroductio This problem is oe of hudreds of NP-complete problems for which o kow efficiet algorithms exist. Ideed, it is believed that o efficiet algorithms exist. (Actually, Euclidea TSP is ot eve kow to be i NP!) The oly kow way of solvig this problem exactly is to try all! possible routes. We give several algorithms for geeratig these combiatorial objects. Geeratig Combiatios I Recall that combiatios are simply all possible subsets of size r. For our purposes, we will cosider geeratig subsets of The algorithm works as follows. Start with {,..., r} {, 2, 3,..., } Assume that we have a a 2 a r, we wat the ext combiatio. Locate the last elemet a i such that a i r + i. Replace a i with a i +. Replace a j with a i + j i for j i +, i + 2,..., r.
18 Geeratig Combiatios II Geeratig Combiatios III The followig is pseudocode for this procedure. Algorithm (Next r-combiatio) Iput : A set of elemets ad a r-combiatio, a a r. Output i r 2 while a i r + i do 3 i i 4 ed 5 a i a i + 6 for j (i + )... r do 7 a j a i + j i 8 ed : The ext r-combiatio. Fid the ext 3-combiatio of the set {, 2, 3, 4, 5} after {, 4, 5} Here, a, a 2 4, a 3 5. The last i such that a i i is. Thus, we set a a + 2 a 2 a a 3 a So the ext r-combiatio is {2, 3, 4}. Geeratig Permutatios Geeratig Permutatios Lexicographic Order Algorithm (Next Permutatio (Lexicographic Order)) The text gives a algorithm to geerate permutatios i lexicographic order. Essetially the algorithm works as follows. Give a permutatio, Choose the left-most pair a j, a j+ where a j < a j+. Choose the least item to the right of a j greater tha a j. Swap this item ad a j. Arrage the remaiig (to the right) items i order. Geeratig Permutatios I Iput : A set of elemets ad a r-permutatio, a a r. Output j 2 while a j > a j+ do 3 j j 4 ed : The ext r-permutatio. //j is the largest subscript with a j < a j+ 5 k 6 while a j > a k do 7 k k 8 ed //a k is the smallest iteger greater tha a j to the right of a j 9 swap(a j, a k ) 0 r s j + 2 while r > s do 3 swap(a r, a s) 4 r r 5 s s + 6 ed Geeratig Permutatios II Ofte there is o reaso to geerate permutatios i lexicographic order. Moreover, eve though geeratig permutatios is iefficiet i itself, lexicographic order iduces eve more work. A alterate method is to fix a elemet, the recursively permute the remaiig elemets. Aother method has the followig attractive properties. It is bottom-up (o-recursive). It iduces a miimal-chage betwee each permutatio. The algorithm is kow as the Johso-Trotter algorithm. We associate a directio to each elemet, for example: A compoet is mobile if its directio poits to a adjacet compoet that is smaller tha itself. Here 3 ad 4 are mobile ad ad 2 are ot.
19 Geeratig Permutatios III Johso-Trotter s Algorithm (JohsoTrotter) A: cosider permutatios of (,..., 6): Iput : A iteger. Output π 2... : All possible permutatios of, 2, while There exists a mobile iteger k π do 3 k largest mobile iteger 4 swap k ad the adjacet iteger k poits to 5 reverse directio of all itegers > k 6 Output π 7 ed 4, 3,, 2, 6, 5 2, 6 are mobile, so swap 6, 5; o orietatio chages: 4, 3,, 2, 5, 6 2 is the oly mobile elemet, flip, 2; orietatio of 4, 3, 5, 6 gets reversed: 4, 3, 2,, 5, 6 More s I I As always, the best way to lear ew cocepts is through practice ad examples. How may bit strigs of legth 4 are there such that ever appears as a substrig? We ca represet the set of strig graphically usig a tree. I II : Coutig Fuctios I I Let S, T be sets such that S, T m. How may fuctios are there mappig f : S T? How may of these fuctios are oe-to-oe? A fuctio simply maps each s i to some t j, thus for each we ca choose to sed it to ay of the elemets i T. Therefore, the umber of such bit strig is 8.
20 : Coutig Fuctios I II : Coutig Fuctios I III Each of these is a idepedet evet, so we apply the multiplicatio rule; m } m {{ m } m times If we wish f to be oe-to-oe, we must have that m, otherwise we ca easily aswer 0. Now, each s i must be mapped to a uique elemet i T. For s, we have m choices. However, oce we have made a mappig (say t j ), we caot map subsequet elemets to t j agai. I particular, for the secod elemet, s 2, we ow have m choices. Proceedig i this maer, s 3 will have m 2 choices, etc. Thus we have m (m ) (m 2) (m ( 2)) (m ( )) A alterative way of thikig about this problem is by usig the choose operator: we eed to choose elemets from a set of size m for our mappig; ( ) m m! (m )!! : Coutig Fuctios I IV : Coutig Fuctios II Oce we have chose this set, we ow cosider all permutatios of the mappig, i.e.! differet mappigs for this set. Thus, the umber of such mappigs is m! (m )!!! m! (m )! Recall this questio from the st exam: Let S {, 2, 3}, T {a, b}. How may oto fuctios are there mappig S T? How may oe-to-oe fuctios are there mappig T S? : Coutig Primes I : Coutig Primes II Give a estimate for how may 70 bit primes there are. Recall that the umber of primes ot more tha is about l Usig this fact, the umber of primes ot exceedig 2 70 is 2 70 l 2 70 However, we have over couted we ve couted 69-bit, 68-bit, etc primes as well. The umber of primes ot exceedig 2 69 is about Thus the differece is 2 70 l l l 269
21 : More sets I : More sets II How may itegers i the rage k 00 are divisible by 2 or 3? Let A {x x 00, 2 x} B {y x 00, 3 y} Clearly, A 50, B , so is it true that A B ? No; we ve over couted agai ay iteger divisible by 6 will be i both sets. How much did we over cout? The umber of itegers betwee ad 00 divisible by 6 is 6, so the aswer to the origial questio is 00 6 A B ( ) 6 67
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 informationLecture 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 informationMath 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 informationSection 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 informationCSE 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 informationCIS 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 informationInjections, 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 informationPermutations & 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 informationNotes. Combinatorics. Combinatorics II. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006
Combinatorics Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 4.1-4.6 & 6.5-6.6 of Rosen cse235@cse.unl.edu
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.
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 informationRecursive Algorithms. Recurrences. Recursive Algorithms Analysis
Recursive Algorithms Recurreces Computer Sciece & Egieerig 35: Discrete Mathematics Christopher M Bourke cbourke@cseuledu A recursive algorithm is oe i which objects are defied i terms of other objects
More informationPermutations, 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 informationChapter 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 informationBertrand 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 informationThe 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 informationInduction: 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 informationChapter 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 informationChapter 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 informationLecture 10: Mathematical Preliminaries
Lecture : Mathematical Prelimiaries Obective: Reviewig mathematical cocepts ad tools that are frequetly used i the aalysis of algorithms. Lecture # Slide # I this
More information( ) 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 informationGenerating 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 informationMath 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 informationBasic 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 informationIntermediate 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 informationTopic 5: Basics of Probability
Topic 5: Jue 1, 2011 1 Itroductio Mathematical structures lie Euclidea geometry or algebraic fields are defied by a set of axioms. Mathematical reality is the developed through the itroductio of cocepts
More informationSolutions 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 informationAs 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 informationWhat 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 informationMATH 304: MIDTERM EXAM SOLUTIONS
MATH 304: MIDTERM EXAM SOLUTIONS [The problems are each worth five poits, except for problem 8, which is worth 8 poits. Thus there are 43 possible poits.] 1. Use the Euclidea algorithm to fid the greatest
More informationPutnam 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 informationComplex 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 informationSquare-Congruence Modulo n
Square-Cogruece Modulo Abstract This paper is a ivestigatio of a equivalece relatio o the itegers that was itroduced as a exercise i our Discrete Math class. Part I - Itro Defiitio Two itegers are Square-Cogruet
More informationBooks 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 informationARRANGEMENTS 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 information1 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 informationMT5821 Advanced Combinatorics
MT5821 Advaced Combiatorics 9 Set partitios ad permutatios It could be said that the mai objects of iterest i combiatorics are subsets, partitios ad permutatios of a fiite set. We have spet some time coutig
More informationRandom Models. Tusheng Zhang. February 14, 2013
Radom Models Tusheg Zhag February 14, 013 1 Radom Walks Let me describe the model. Radom walks are used to describe the motio of a movig particle (object). Suppose that a particle (object) moves alog the
More informationExercises 1 Sets and functions
Exercises 1 Sets ad fuctios HU Wei September 6, 018 1 Basics Set theory ca be made much more rigorous ad built upo a set of Axioms. But we will cover oly some heuristic ideas. For those iterested studets,
More informationEnd-of-Year Contest. ERHS Math Club. May 5, 2009
Ed-of-Year Cotest ERHS Math Club May 5, 009 Problem 1: There are 9 cois. Oe is fake ad weighs a little less tha the others. Fid the fake coi by weighigs. Solutio: Separate the 9 cois ito 3 groups (A, B,
More informationLet 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 informationIntroduction 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 informationMT5821 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 informationThe 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 informationLecture 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 informationIn number theory we will generally be working with integers, though occasionally fractions and irrationals will come into play.
Number Theory Math 5840 otes. Sectio 1: Axioms. I umber theory we will geerally be workig with itegers, though occasioally fractios ad irratioals will come ito play. Notatio: Z deotes the set of all itegers
More information3.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 informationREVIEW 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 informationAxioms of Measure Theory
MATH 532 Axioms of Measure Theory Dr. Neal, WKU I. The Space Throughout the course, we shall let X deote a geeric o-empty set. I geeral, we shall ot assume that ay algebraic structure exists o X so that
More informationDiscrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22
CS 70 Discrete Mathematics for CS Sprig 2007 Luca Trevisa Lecture 22 Aother Importat Distributio The Geometric Distributio Questio: A biased coi with Heads probability p is tossed repeatedly util the first
More informationInfinite Sequences and Series
Chapter 6 Ifiite Sequeces ad Series 6.1 Ifiite Sequeces 6.1.1 Elemetary Cocepts Simply speakig, a sequece is a ordered list of umbers writte: {a 1, a 2, a 3,...a, a +1,...} where the elemets a i represet
More informationCSE 1400 Applied Discrete Mathematics Number Theory and Proofs
CSE 1400 Applied Discrete Mathematics Number Theory ad Proofs Departmet of Computer Scieces College of Egieerig Florida Tech Sprig 01 Problems for Number Theory Backgroud Number theory is the brach of
More informationHomework 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 informationWeek 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 informationTHE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS
THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS DEMETRES CHRISTOFIDES Abstract. Cosider a ivertible matrix over some field. The Gauss-Jorda elimiatio reduces this matrix to the idetity
More information(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
MATH 337 Sequeces Dr. Neal, WKU Let X be a metric space with distace fuctio d. We shall defie the geeral cocept of sequece ad limit i a metric space, the apply the results i particular to some special
More informationCombinatorics 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 informationSolutions. tan 2 θ(tan 2 θ + 1) = cot6 θ,
Solutios 99. Let A ad B be two poits o a parabola with vertex V such that V A is perpedicular to V B ad θ is the agle betwee the chord V A ad the axis of the parabola. Prove that V A V B cot3 θ. Commet.
More informationarxiv: v1 [math.co] 23 Mar 2016
The umber of direct-sum decompositios of a fiite vector space arxiv:603.0769v [math.co] 23 Mar 206 David Ellerma Uiversity of Califoria at Riverside August 3, 208 Abstract The theory of q-aalogs develops
More information( ) = 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 informationCombinatorially 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 information6.3 Testing Series With Positive Terms
6.3. TESTING SERIES WITH POSITIVE TERMS 307 6.3 Testig Series With Positive Terms 6.3. Review of what is kow up to ow I theory, testig a series a i for covergece amouts to fidig the i= sequece of partial
More informationFinal Review for MATH 3510
Fial Review for MATH 50 Calculatio 5 Give a fairly simple probability mass fuctio or probability desity fuctio of a radom variable, you should be able to compute the expected value ad variace of the variable
More informationP1 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 informationCounting Well-Formed Parenthesizations Easily
Coutig Well-Formed Parethesizatios Easily Pekka Kilpeläie Uiversity of Easter Filad School of Computig, Kuopio August 20, 2014 Abstract It is well kow that there is a oe-to-oe correspodece betwee ordered
More informationCALCULATION 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 informationSequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence
Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece 1, 1, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet
More informationIP Reference guide for integer programming formulations.
IP Referece guide for iteger programmig formulatios. by James B. Orli for 15.053 ad 15.058 This documet is iteded as a compact (or relatively compact) guide to the formulatio of iteger programs. For more
More informationUC Berkeley Department of Electrical Engineering and Computer Sciences. EE126: Probability and Random Processes
UC Berkeley Departmet of Electrical Egieerig ad Computer Scieces EE26: Probability ad Radom Processes Problem Set Fall 208 Issued: Thursday, August 23, 208 Due: Wedesday, August 29, 207 Problem. (i Sho
More information18th 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 information4.3 Growth Rates of Solutions to Recurrences
4.3. GROWTH RATES OF SOLUTIONS TO RECURRENCES 81 4.3 Growth Rates of Solutios to Recurreces 4.3.1 Divide ad Coquer Algorithms Oe of the most basic ad powerful algorithmic techiques is divide ad coquer.
More informationRandomized 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 informationCS 330 Discussion - Probability
CS 330 Discussio - Probability March 24 2017 1 Fudametals of Probability 11 Radom Variables ad Evets A radom variable X is oe whose value is o-determiistic For example, suppose we flip a coi ad set X =
More informationLecture Notes for Analysis Class
Lecture Notes for Aalysis Class Topological Spaces A topology for a set X is a collectio T of subsets of X such that: (a) X ad the empty set are i T (b) Uios of elemets of T are i T (c) Fiite itersectios
More informationA sequence of numbers is a function whose domain is the positive integers. We can see that the sequence
Sequeces A sequece of umbers is a fuctio whose domai is the positive itegers. We ca see that the sequece,, 2, 2, 3, 3,... is a fuctio from the positive itegers whe we write the first sequece elemet as
More informationDiscrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 21. Some Important Distributions
CS 70 Discrete Mathematics for CS Sprig 2005 Clacy/Wager Notes 21 Some Importat Distributios Questio: A biased coi with Heads probability p is tossed repeatedly util the first Head appears. What is the
More information(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 informationLecture 2: April 3, 2013
TTIC/CMSC 350 Mathematical Toolkit Sprig 203 Madhur Tulsiai Lecture 2: April 3, 203 Scribe: Shubhedu Trivedi Coi tosses cotiued We retur to the coi tossig example from the last lecture agai: Example. Give,
More informationIt is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.
MATH 532 Measurable Fuctios Dr. Neal, WKU Throughout, let ( X, F, µ) be a measure space ad let (!, F, P ) deote the special case of a probability space. We shall ow begi to study real-valued fuctios defied
More informationRecursive Algorithm for Generating Partitions of an Integer. 1 Preliminary
Recursive Algorithm for Geeratig Partitios of a Iteger Sug-Hyuk Cha Computer Sciece Departmet, Pace Uiversity 1 Pace Plaza, New York, NY 10038 USA scha@pace.edu Abstract. This article first reviews the
More informationCHAPTER I: Vector Spaces
CHAPTER I: Vector Spaces Sectio 1: Itroductio ad Examples This first chapter is largely a review of topics you probably saw i your liear algebra course. So why cover it? (1) Not everyoe remembers everythig
More information1 Hash tables. 1.1 Implementation
Lecture 8 Hash Tables, Uiversal Hash Fuctios, Balls ad Bis Scribes: Luke Johsto, Moses Charikar, G. Valiat Date: Oct 18, 2017 Adapted From Virgiia Williams lecture otes 1 Hash tables A hash table is a
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.
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 informationLecture 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 informationA Combinatorial Proof of a Theorem of Katsuura
Mathematical Assoc. of America College Mathematics Joural 45:1 Jue 2, 2014 2:34 p.m. TSWLatexiaTemp 000017.tex A Combiatorial Proof of a Theorem of Katsuura Bria K. Miceli Bria Miceli (bmiceli@triity.edu)
More informationLecture 12: November 13, 2018
Mathematical Toolkit Autum 2018 Lecturer: Madhur Tulsiai Lecture 12: November 13, 2018 1 Radomized polyomial idetity testig We will use our kowledge of coditioal probability to prove the followig lemma,
More informationSets and Probabilistic Models
ets ad Probabilistic Models Berli Che Departmet of Computer ciece & Iformatio Egieerig Natioal Taiwa Normal Uiversity Referece: - D. P. Bertsekas, J. N. Tsitsiklis, Itroductio to Probability, ectios 1.1-1.2
More information1. 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 informationMATH 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 informationSolutions to Math 347 Practice Problems for the final
Solutios to Math 347 Practice Problems for the fial 1) True or False: a) There exist itegers x,y such that 50x + 76y = 6. True: the gcd of 50 ad 76 is, ad 6 is a multiple of. b) The ifiimum of a set is
More informationProblem 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 informationsubcaptionfont+=small,labelformat=parens,labelsep=space,skip=6pt,list=0,hypcap=0 subcaption ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, 2/16/2016
subcaptiofot+=small,labelformat=pares,labelsep=space,skip=6pt,list=0,hypcap=0 subcaptio ALGEBRAIC COMBINATORICS LECTURE 8 TUESDAY, /6/06. Self-cojugate Partitios Recall that, give a partitio λ, we may
More information4 The Sperner property.
4 The Sperer property. I this sectio we cosider a surprisig applicatio of certai adjacecy matrices to some problems i extremal set theory. A importat role will also be played by fiite groups. I geeral,
More informationSummer 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 informationPolynomial identity testing and global minimum cut
CHAPTER 6 Polyomial idetity testig ad global miimum cut I this lecture we will cosider two further problems that ca be solved usig probabilistic algorithms. I the first half, we will cosider the problem
More informationMathematical Induction
Mathematical Iductio Itroductio Mathematical iductio, or just iductio, is a proof techique. Suppose that for every atural umber, P() is a statemet. We wish to show that all statemets P() are true. I a
More informationSOLVED EXAMPLES
Prelimiaries Chapter PELIMINAIES Cocept of Divisibility: A o-zero iteger t is said to be a divisor of a iteger s if there is a iteger u such that s tu I this case we write t s (i) 6 as ca be writte as
More information1 Generating functions for balls in boxes
Math 566 Fall 05 Some otes o geeratig fuctios Give a sequece a 0, a, a,..., a,..., a geeratig fuctio some way of represetig the sequece as a fuctio. There are may ways to do this, with the most commo ways
More informationCSE 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 informationProblems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:
Math 224 Fall 2017 Homework 4 Drew Armstrog Problems from 9th editio of Probability ad Statistical Iferece by Hogg, Tais ad Zimmerma: Sectio 2.3, Exercises 16(a,d),18. Sectio 2.4, Exercises 13, 14. Sectio
More informationSummary: Congruences. j=1. 1 Here we use the Mathematica syntax for the function. In Maple worksheets, the function
Summary: Cogrueces j whe divided by, ad determiig the additive order of a iteger mod. As described i the Prelab sectio, cogrueces ca be thought of i terms of coutig with rows, ad for some questios this
More information