Sum and Product Rules. Combinatorics. Some Subtler Examples



Similar documents
CS103X: Discrete Structures Homework 4 Solutions

5.3. Generalized Permutations and Combinations

In nite Sequences. Dr. Philippe B. Laval Kennesaw State University. October 9, 2008

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 13

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

1. MATHEMATICAL INDUCTION

Notes on exponential generating functions and structures.

Chapter 5: Inner Product Spaces

1. C. The formula for the confidence interval for a population mean is: x t, which was

Soving Recurrence Relations

CHAPTER 7: Central Limit Theorem: CLT for Averages (Means)

THE ARITHMETIC OF INTEGERS. - multiplication, exponentiation, division, addition, and subtraction

Example 2 Find the square root of 0. The only square root of 0 is 0 (since 0 is not positive or negative, so those choices don t exist here).

I. Chi-squared Distributions

CS103A Handout 23 Winter 2002 February 22, 2002 Solving Recurrence Relations

3. Greatest Common Divisor - Least Common Multiple

FIBONACCI NUMBERS: AN APPLICATION OF LINEAR ALGEBRA. 1. Powers of a matrix

Factoring x n 1: cyclotomic and Aurifeuillian polynomials Paul Garrett <garrett@math.umn.edu>

Lecture 4: Cauchy sequences, Bolzano-Weierstrass, and the Squeeze theorem

Trigonometric Form of a Complex Number. The Complex Plane. axis. ( 2, 1) or 2 i FIGURE The absolute value of the complex number z a bi is

Hypothesis testing. Null and alternative hypotheses

University of California, Los Angeles Department of Statistics. Distributions related to the normal distribution

4.3. The Integral and Comparison Tests

THE REGRESSION MODEL IN MATRIX FORM. For simple linear regression, meaning one predictor, the model is. for i = 1, 2, 3,, n

Section 11.3: The Integral Test

Determining the sample size

PERMUTATIONS AND COMBINATIONS

Elementary Theory of Russian Roulette

Basic Elements of Arithmetic Sequences and Series

Infinite Sequences and Series

Department of Computer Science, University of Otago

Lesson 15 ANOVA (analysis of variance)

Properties of MLE: consistency, asymptotic normality. Fisher information.


Definition. A variable X that takes on values X 1, X 2, X 3,...X k with respective frequencies f 1, f 2, f 3,...f k has mean

5.4 Amortization. Question 1: How do you find the present value of an annuity? Question 2: How is a loan amortized?

SECTION 1.5 : SUMMATION NOTATION + WORK WITH SEQUENCES

1 Computing the Standard Deviation of Sample Means

Week 3 Conditional probabilities, Bayes formula, WEEK 3 page 1 Expected value of a random variable

Case Study. Normal and t Distributions. Density Plot. Normal Distributions

1 Correlation and Regression Analysis

A probabilistic proof of a binomial identity

Your organization has a Class B IP address of Before you implement subnetting, the Network ID and Host ID are divided as follows:

Maximum Likelihood Estimators.

Math C067 Sampling Distributions

S. Tanny MAT 344 Spring be the minimum number of moves required.

Convexity, Inequalities, and Norms

Chapter 14 Nonparametric Statistics

Chapter 6: Variance, the law of large numbers and the Monte-Carlo method

NATIONAL SENIOR CERTIFICATE GRADE 12

GCSE STATISTICS. 4) How to calculate the range: The difference between the biggest number and the smallest number.

3 Basic Definitions of Probability Theory

Lesson 17 Pearson s Correlation Coefficient

Confidence Intervals. CI for a population mean (σ is known and n > 30 or the variable is normally distributed in the.

SAMPLE QUESTIONS FOR FINAL EXAM. (1) (2) (3) (4) Find the following using the definition of the Riemann integral: (2x + 1)dx

The Stable Marriage Problem

Incremental calculation of weighted mean and variance

Descriptive Statistics

.04. This means $1000 is multiplied by 1.02 five times, once for each of the remaining sixmonth

One-sample test of proportions

Sequences and Series

7.1 Finding Rational Solutions of Polynomial Equations

Hypergeometric Distributions

Asymptotic Growth of Functions

Overview of some probability distributions.

*The most important feature of MRP as compared with ordinary inventory control analysis is its time phasing feature.

G r a d e. 2 M a t h e M a t i c s. statistics and Probability

MARTINGALES AND A BASIC APPLICATION

Listing terms of a finite sequence List all of the terms of each finite sequence. a) a n n 2 for 1 n 5 1 b) a n for 1 n 4 n 2

HOW MANY TIMES SHOULD YOU SHUFFLE A DECK OF CARDS? 1

Baan Service Master Data Management

5: Introduction to Estimation

Measures of Spread and Boxplots Discrete Math, Section 9.4

How To Solve The Homewor Problem Beautifully

Building Blocks Problem Related to Harmonic Series

Solving Logarithms and Exponential Equations

Present Value Factor To bring one dollar in the future back to present, one uses the Present Value Factor (PVF): Concept 9: Present Value

BINOMIAL EXPANSIONS In this section. Some Examples. Obtaining the Coefficients

Output Analysis (2, Chapters 10 &11 Law)

Solutions to Exercises Chapter 4: Recurrence relations and generating functions

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies ( 3.1.1) Limitations of Experiments. Pseudocode ( 3.1.2) Theoretical Analysis

Chatpun Khamyat Department of Industrial Engineering, Kasetsart University, Bangkok, Thailand

5 Boolean Decision Trees (February 11)

2-3 The Remainder and Factor Theorems

Approximating Area under a curve with rectangles. To find the area under a curve we approximate the area using rectangles and then use limits to find

CME 302: NUMERICAL LINEAR ALGEBRA FALL 2005/06 LECTURE 8

CHAPTER 3 THE TIME VALUE OF MONEY

UC Berkeley Department of Electrical Engineering and Computer Science. EE 126: Probablity and Random Processes. Solutions 9 Spring 2006

PENSION ANNUITY. Policy Conditions Document reference: PPAS1(7) This is an important document. Please keep it in a safe place.

How Euler Did It. In a more modern treatment, Hardy and Wright [H+W] state this same theorem as. n n+ is perfect.

where: T = number of years of cash flow in investment's life n = the year in which the cash flow X n i = IRR = the internal rate of return

The following example will help us understand The Sampling Distribution of the Mean. C1 C2 C3 C4 C5 50 miles 84 miles 38 miles 120 miles 48 miles

A Guide to the Pricing Conventions of SFE Interest Rate Products

Lecture 5: Span, linear independence, bases, and dimension

Center, Spread, and Shape in Inference: Claims, Caveats, and Insights

Section 8.3 : De Moivre s Theorem and Applications

Transcription:

Combiatorics Sum ad Product Rules Problem: How to cout without coutig. How do you figure out how may thigs there are with a certai property without actually eumeratig all of them. Sometimes this requires a lot of cleveress ad deep mathematical isights. But there are some stadard techiques. That s what we ll be studyig. Example 1: I New Hampshire, licese plates cosisted of two letters followed by 3 digits. How may possible licese plates are there? Aswer: 26 choices for the first letter, 26 for the secod, 10 choices for the first umber, the secod umber, ad the third umber: 26 2 10 3 = 676, 000 Example 2: A travelig salesma wats to do a tour of all 50 state capitals. How may ways ca he do this? Aswer: 50 choices for the first place to visit, 49 for the secod,... : 50! altogether. Chapter 4 gives geeral techiques for solvig coutig problems like this. Two of the most importat are: 1 2 The Sum Rule: If there are (A) ways to do A ad, distict from them, (B) ways to do B, the the umber of ways to do A or B is (A) + (B). This rule geeralizes: there are (A) + (B) + (C) ways to do A or B or C I Sectio 4.8, we ll see what happes if the ways of doig A ad B are t distict. The Product Rule: If there are (A) ways to do A ad (B) ways to do B, the the umber of ways to do A ad B is (A) (B). This is true if the umber of ways of doig A ad B are idepedet; the umber of choices for doig B is the same regardless of which choice you made for A. Agai, this geeralizes. There are (A) (B) (C) ways to do A ad B ad C 3 Some Subtler Examples Example 3: If there are Seators o a committee, i how may ways ca a subcommittee be formed? Two approaches: 1. Let N 1 be the umber of subcommittees with 1 seator (), N 2 the umber of subcommittees with 2 seator (( 1)/2),... Accordig to the sum rule: N = N 1 + N 2 + + N It turs out that N k =! k!( k)! ( choose k); this is discussed i Sectio 4.4 A subtlety: What about N 0? Do we allow subcommittees of size 0? How about size? The problem is somewhat ambiguous. If we allow subcommittees of size 0 ad, the there are 2 subcommittees altogether. This is the same as the umber of subsets of the set of Seators: there is a 1-1 correspodece betwee subsets ad subcommittees. 2. Simpler method: Use the product rule! 4

Each seator is either i the subcommittee or out of it: 2 possibilities for each seator: 2 2 2 = 2 choices altogether Geeral moral: I may combiatorial problems, there s more tha oe way to aalyze the problem. How may ways ca the full committee be split ito two sides o a issue? This questio is also ambiguous. If we care about which way each Seator voted, the the aswer is agai 2 : Each subcommittee defies a split + vote (those i the subcommittee vote Yes, those out vote No); ad each split + vote defies defies a subcommittee. If we do t care about which way each Seator voted, the aswer is 2 /2 = 2 1. This is a istace of the Divisio Rule. 5 6 Copig with Ambiguity More Examples If you thik a problem is ambiguous: 1. Explai why 2. Choose oe way of resolvig the ambiguity 3. Solve the problem accordig to your iterpretatio Make sure that your iterpretatio does t reder the problem totally trivial Example 4: How may legal cofiguratios are there i Towers of Haoi with rigs? Aswer: The product rule agai: Each rig gets to vote for which pole it s o. Oce you ve decided which rigs are o each pole, their order is determied. The total umber of cofiguratios is 3 Example 5: How may distiguishable ways ca the letters of computer be arraged? How about discrete? For computer, it s 8!: 8 choices for the first letter, for the secod,... Is it 8! for discrete? Not quite. There are two e s Suppose we called them e 1, e 2 : There are two versios of each arragemet, depedig o which e comes first: discre 1 te 2 is the same as discre 2 te 1. Thus, the right aswer is 8!/2! 7 8

Divisio Rule: If there is a k-to-1 correspodece betwee of objects of type A with objects of type B, ad there are (A) objects of type A, the there are (A)/k objects of type B. A k-to-1 correspodece is a oto mappig i which every B object is the image of exactly k A objects. Permutatios A permutatio of thigs take r at a time, writte P(,r), is a arragemet i a row of r thigs, take from a set of distict thigs. Order matters. Example 6: How may permutatios are there of 5 thigs take 3 at a time? Aswer: 5 choices for the first thig, 4 for the secod, 3 for the third: 5 4 3 = 60. If the 5 thigs are a,b,c,d,e, some possible permutatios are: abc abd abe acb acd ace adb adc ade aeb aec aed... I geeral P(,r) =! = ( 1) ( r + 1) ( r)! 9 10 Combiatios More Examples A combiatio of thigs take r at a time, writte C(,r) or ( ) r ( choose r ) is ay subset of r thigs from thigs. Order makes o differece. Example 7: How may ways are there of choosig 3 thigs from 5? Aswer: If order mattered, the it would be 5 4 3. Sice order does t matter, are all the same. abc,acb,bac,bca,cab,cba For way of choosig three elemets, there are 3! = 6 ways of orderig them. Therefore, the right aswer is (5 4 3)/3! = 10: abc abd abe acd ace ade bcd bce bde cde Example 8: How may full houses are there i poker? A full house has 5 cards, 3 of oe kid ad 2 of aother. E.g.: 3 5 s ad 2 K s. Aswer: You eed to fid a systematic way of coutig: Choose the deomiatio for which you have three of a kid: 13 choices. Choose the three: C(4, 3) = 4 choices Choose the deomiatio for which you have two of a kid: 12 choices Choose the two: C(4, 2) = 6 choices. Altogether, there are: 13 4 12 6 = 3744 choices I geeral C(,r) =! = ( 1) ( r + 1)/r! ( r)!r! 11 12

0! More Questios It s useful to defie 0! = 1. Why? 1. The we ca iductively defie ( + 1)! = ( + 1)!, ad this defiitio works eve takig 0 as the base case istead of 1. 2. A better reaso: Thigs work out right for P(, 0) ad C(, 0)! How may permutatios of thigs from are there? P(,) =! ( )! =! 0! =! How may ways are there of choosig out of? 0 out of? =!!0! = 1 =! 0 0!! = 1 Q: How may ways are there of choosig k thigs from {1,...,} if 1 ad 2 ca t both be chose? (Suppose,k 2.) A: First fid all the ways of choosig k thigs from C(, k). The subtract the umber of those ways i which both 1 ad 2 are chose: This amouts to choosig k 2 thigs from {3,...,}: C( 2,k 2). Thus, the aswer is Q: What if order matters? C(,k) C( 2,k 2) A: Have to compute how may ways there are of pickig k thigs, two of which are 1 ad 2. P(, k) k(k 1)P( 2, k 2) 13 14 Q: How may ways are there to distribute four distict balls evely betwee two distict boxes (two balls go i each box)? A: All you eed to decide is which balls go i the first box. C(4, 2) = 6 Q: What if the boxes are idistiguishable? A: C(4, 2)/2 = 3. Combiatorial Idetities There all lots of idetities that you ca form usig C(,k). They seem mysterious at first, but there s usually a good reaso for them. Theorem 1: If 0 k, the Proof: C(,k) = C(,k) = C(, k).! k!( k)! =! ( k)!( ( k))! = C(, k) Q: Why should choosig k thigs out of be the same as choosig k thigs out of? A: There s a 1-1 correspodece. For every way of choosig k thigs out of, look at the thigs ot chose: that s a way of choosig k thigs out of. This is a better way of thikig about Theorem 1 tha the combiatorial proof. 15 16

Theorem 2: If 0 < k < the = k 1 k + 1 k 1 Proof 1: (Combiatorial) Suppose we wat to choose k objects out of {1,...,}. Either we choose the last oe () or we do t. 1. How may ways are there of choosig k without choosig the last oe? C( 1, k). 2. How may ways are there of choosig k icludig? This meas choosig k 1 out of {1,..., 1}: C( 1,k 1). Proof 2: Algebraic... Note: If we defie C(,k) = 0 for k > ad k < 0, Theorems 1 ad 2 still hold. 17