Permutations and Combinations. MATH 107: Finite Mathematics University of Louisville. March 3, 2014

Similar documents
Finite Math - Fall 2016

Elementary Combinatorics CE 311S

The Product Rule The Product Rule: A procedure can be broken down into a sequence of two tasks. There are n ways to do the first task and n

Discrete Mathematics with Applications MATH236

Permutations and Combinations

FOURTH LECTURE : SEPTEMBER 18, 2014

Math 166: Topics in Contemporary Mathematics II

MATH 2420 Discrete Mathematics Lecture notes

NOTES ON SEPT 13-18, 2012

Theory of Probability - Brett Bernstein

Counting and Probability Math 2320

November 6, Chapter 8: Probability: The Mathematics of Chance

POKER (AN INTRODUCTION TO COUNTING)

Slide 1 Math 1520, Lecture 15

Chapter 2. Permutations and Combinations

n! = n(n 1)(n 2) 3 2 1

Compound Probability. Set Theory. Basic Definitions

CS 237: Probability in Computing

CISC-102 Fall 2017 Week 8

Lecture 1. Permutations and combinations, Pascal s triangle, learning to count

Principles of Counting. Notation for counting elements of sets

Introductory Probability

Fundamentals of Probability

CISC 1400 Discrete Structures

Slide 1 Math 1520, Lecture 13

7.4 Permutations and Combinations

6/24/14. The Poker Manipulation. The Counting Principle. MAFS.912.S-IC.1: Understand and evaluate random processes underlying statistical experiments

Lecture 14. What s to come? Probability. A bag contains:

Using a table: regular fine micro. red. green. The number of pens possible is the number of cells in the table: 3 2.

Elementary Combinatorics

Counting. Chapter 6. With Question/Answer Animations

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

Poker Hands. Christopher Hayes

Chapter 7. Intro to Counting

Counting Things Solutions

2. Combinatorics: the systematic study of counting. The Basic Principle of Counting (BPC)

CSE 1400 Applied Discrete Mathematics Permutations

Discrete Structures Lecture Permutations and Combinations

Math236 Discrete Maths with Applications

CPCS 222 Discrete Structures I Counting

Math 3012 Applied Combinatorics Lecture 2

Introduction. Firstly however we must look at the Fundamental Principle of Counting (sometimes referred to as the multiplication rule) which states:

MAT104: Fundamentals of Mathematics II Summary of Counting Techniques and Probability. Preliminary Concepts, Formulas, and Terminology

COUNTING AND PROBABILITY

More Probability: Poker Hands and some issues in Counting

Applied Statistics I

Math 475, Problem Set #3: Solutions

Math 1111 Math Exam Study Guide

9.5 Counting Subsets of a Set: Combinations. Answers for Test Yourself

Axiomatic Probability

TImath.com. Statistics. Too Many Choices!

Course Learning Outcomes for Unit V

Permutations and Combinations Problems

EECS 203 Spring 2016 Lecture 15 Page 1 of 6

Strings. A string is a list of symbols in a particular order.

Finite Math Section 6_4 Solutions and Hints

STAT 430/510 Probability

Probability (Devore Chapter Two)

W = {Carrie (U)nderwood, Kelly (C)larkson, Chris (D)aughtry, Fantasia (B)arrino, and Clay (A)iken}

Combinatorics. Chapter Permutations. Counting Problems

Question 1: How do you count choices using the multiplication principle?

Block 1 - Sets and Basic Combinatorics. Main Topics in Block 1:

Counting Things. Tom Davis March 17, 2006

The study of probability is concerned with the likelihood of events occurring. Many situations can be analyzed using a simplified model of probability

Simple Counting Problems

November 8, Chapter 8: Probability: The Mathematics of Chance

Poker: Further Issues in Probability. Poker I 1/29

November 11, Chapter 8: Probability: The Mathematics of Chance

With Question/Answer Animations. Chapter 6

Reading 14 : Counting

Week 3 Classical Probability, Part I

Name: Exam 1. September 14, 2017

1. Counting. 2. Tree 3. Rules of Counting 4. Sample with/without replacement where order does/doesn t matter.

STAT 430/510 Probability Lecture 1: Counting-1

10-1. Combinations. Vocabulary. Lesson. Mental Math. able to compute the number of subsets of size r.

Concepts. Materials. Objective

Permutations and Combinations Section

Unit 2 Lesson 2 Permutations and Combinations

Section : Combinations and Permutations

MATH 22. Lecture B: 9/4/2003 COUNTING. I counted two and seventy stenches, All well-defined, and several stinks.

Sets, Venn Diagrams & Counting

Binary Continued! November 27, 2013

Permutations and Combinations. Quantitative Aptitude & Business Statistics

Chapter 5 - Elementary Probability Theory

CSE 312: Foundations of Computing II Quiz Section #1: Counting (solutions)

MAT104: Fundamentals of Mathematics II Counting Techniques Class Exercises Solutions

Chapter 1. Probability

Mathematical Foundations of Computer Science Lecture Outline August 30, 2018

Chapter 1. Probability

Counting Methods and Probability

4.4: The Counting Rules

The next several lectures will be concerned with probability theory. We will aim to make sense of statements such as the following:

6.4 Permutations and Combinations

* Order Matters For Permutations * Section 4.6 Permutations MDM4U Jensen. Part 1: Factorial Investigation

Discrete Structures for Computer Science

Lecture 2.3: Symmetric and alternating groups

Math 42, Discrete Mathematics

Section Summary. Permutations Combinations Combinatorial Proofs

How Euler Did It. by Ed Sandifer. Derangements. September, 2004

CSE 21 Mathematics for Algorithm and System Analysis

Transcription:

Permutations and Combinations MATH 107: Finite Mathematics University of Louisville March 3, 2014 Multiplicative review Non-replacement counting questions 2 / 15 Building strings without repetition A familiar question How many ways are there to build a string of four letters from {A,B,C,D,E,F} if no letter can be used twice? This is an easy question to answer with multiplication. Any letter can be first, so you have 6 choices. Any letter except the one already used can be second, so you have 5 choices. Any letter except the two already used can be third, so you have 4 choices. Any letter except the three already used can be fourth, so you have 3 choices. Thus we can build any of 6 5 4 3 = 360 different strings.

How to generalize? Multiplicative review Non-replacement counting questions 3 / 15 The previous question is one of a large family of variants: we could have any alphabet and any string length. Definition A permutation of length k with n letters is a string of length k made from those letters, using no letter more than once. For instance, the 360 strings enumerated above were the permutations of length 4 with 6 letters. Question How many permutations of length k with n letters are there? The general formula Multiplicative review Non-replacement counting questions 4 / 15 Question How many permutations of length k with n letters are there? Let s consider a multiplicative approach: There are n choices for the first letter, n 1 choices for the second letter, n 2 choices for the third letter, and so forth up to n k + 1 choices for the kth letter. so we can make this sequence of different choices in a total of n(n 1)(n 2)(n 3) (n k + 1) different ways.

Factorials Multiplicative review Introducing the factorial 5 / 15 Counting permutations There are n(n 1)(n 2) (n k + 1) permutations of length k with n letters. We can introduce a new notation to simplify this product. Let the factorial of n be n! = n(n 1)(n 2) (3)(2)(1). Then our count of permutations is n(n 1)(n 2) (n k + 1)(n k)(n k 1) (3)(2)(1) (n k)(n k 1) (3)(2)(1) = n! (n k)! Multiplicative review Introducing the factorial 6 / 15 Calculation with Factorials The small factorials are easily calculated: 0! = 1 1! = 1 = 1 2! = 2 1 = 2 3! = 3 2 1 = 6 4! = 4 3 2 1 = 24 5! = 5 4 3 2 1 = 120 6! = 6 5 4 3 2 1 = 720 So, for instance, our original permutation question could have been solved with 6! (6 4)! = 6! 2! = 720 2 = 360

Ratios of large factorials Multiplicative review Introducing the factorial 7 / 15 Factorials of even small numbers can be very large. For instance, 13! = 6,227,020,800 Thus, it might be impractical to calculate the ratio 40! 35! by determining the numerator and denominator. Instead, we expand both and cancel common terms: 40! 35! = 40 39 38 37 36 35 2 1 = 40 39 38 37 36 35 2 1 which can be calculated to be 78,960,960. The Permutation Statistic Multiplicative review Introducing the factorial 8 / 15 Because counting permutations is useful, we denote a special sympol for it. Definition The permutation statistic P n,k is equal to n! (n k)! = n(n 1)(n 2)(n 3) (n k + 1) For example, if I had five different gifts, and I wanted to give then to three different people, I could do so in P 5,3 = 20 ways. A useful application How many ways are there to put five (distinguishable) people in a line? There are 5 objects, and we re building an ordered list of length 5 with no repetitions, so it s P 5,5 = 5! 0! = 120.

Ignoring order Multiplicative review Combinations 9 / 15 So far we ve looked at selecting objects when order matters. How could we consider selecting objects when order doesn t matter? Example question How many ways are there to choose a 3-element subset of {1,2,3,4,5}? {1,2,3} {1,2,4} {1,2,5} {1,3,4} {1,3,5} {1,4,5} {2,3,4} {2,3,5} {2,4,5} {3,4,5} There are 10, but how could we compute that? These structures we know as combinations: like permutations, but without order. Multiplicative review Combinations 10 / 15 An organizational scheme There are 60 permutations of length 3 from an alphabet of size 5; let s group those. 123 124 125 134 135 145 234 235 245 345 132 142 152 143 153 154 243 253 254 354 213 214 215 314 315 415 324 325 425 435 231 241 251 341 351 451 342 352 452 453 312 412 512 413 513 514 423 523 524 534 321 421 521 431 531 541 432 532 542 543 Note that the 10 columns correspond to the combinations of length 3 from an alphabet of size 5, while the 6 rows correspond to the orderings of a specific combination.

Multiplicative review Combinations 11 / 15 Abstracting this approach We have two different ways to count permutations. We know that the number of permutations of length k from n objects is P n,k. But we could also build such a permutation by selecting a combination of length k from n objects (from some yet-unknown number of possibilities) and then ordering these k objects (in any of k! ways). Thus, if we denote the number of combinations by C n,k, we have: P n,k = C n,k k! or C n,k = P n,k k! = n! (n k)!k! Multiplicative review Combinations 12 / 15 Examples of the combination statistic Choosing a committee How many different ways could a 3-person committee be chosen from a 7-person group? C 7,3 = 7! 4!3! = 7 6 5 3 2 1 = 35 ways. Choosing a meal A plate lunch consists of any of 5 entrees, together with a choice of 2 out of 6 sides. How many plate lunches are possible? 5 C 6,2 = 5 6! 4!2! = 5 6 5 2 1 = 75. Building a poker hand There are 52 cards in a deck and the order of the five cards in a draw poker hand is irrelevant. How many possible hands are there? C 52,5 = 52! 47!5! = 52 51 50 49 48 5 4 3 2 1 = 2,598,960

Multiplicative review Combinations 13 / 15 More fun with poker hands Drawing five cards from a 52-card deck (4 suits, 13 numbers) is instructive. We can count many different types of poker hands. Counting full houses A full house is a collection of five cards with three of the same number and two more of a different identical number. How many ways are there to build a full house? Construction process An example like 3 3 3 8 8 is the result of several decisions: a number for the triplet (here, 3): 13 choices. a different number for the pair (here, 8): 12 choices. three suits for the triplet (here,,, and ): C 4,3 choices. two suits for the pair (here, and ): C 4,2 choices. Thus there are 13 12 C 4,3 C 4,2 = 3744 different full houses. Some other poker hands Multiplicative review Combinations 14 / 15 Here s a list of several different types of poker hands, and the counts of each; you might want to try to figure out where these counts come from! Royal flush (AKQJT of a single suit): 4. Straight flush (5 in a row of a single suit, not royal): 4 9. Four of a kind: 13 C 4,1 12 C 4,4. Flush (all same suit, not a straight): 4 (C 13,5 10). Straight (5 in a row, not all the same suit): 4 4 3 10. Three of a kind: 13 C 4,3 C 12,2 4 2. Two pair: C 13,2 C 4,2 C 4,2 11 4. One pair: 13 C 4,2 C 12,3 4 3.

Multiplicative review Combinations 15 / 15 Summary:The important statistics We can count the number of ways to draw k objects from a set of size n in four different ways, depending on the rules of our drawing: Repetitions allowed, order matters: n n n = n k. Repetitions forbidden, order matters: n! n(n 1) (n k 1) = (n k)! = P n,k. Repetitions forbidden, order irrelevant: n(n 1) (n k 1) n! = k(k 1) (1) (n k)!k! = C n,k. Repetitions allowed, order irrelevant: We aren t using it, but it s actually C n+k 1,k 1.