Discrete Structures Lecture Permutations and Combinations

Similar documents
Section Summary. Permutations Combinations Combinatorial Proofs

Sec$on Summary. Permutations Combinations Combinatorial Proofs

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

Permutations and Combinations

Permutations and Combinations

With Question/Answer Animations. Chapter 6

Discrete Mathematics: Logic. Discrete Mathematics: Lecture 15: Counting

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

DISCRETE STRUCTURES COUNTING

Counting. Chapter 6. With Question/Answer Animations

CSCI FOUNDATIONS OF COMPUTER SCIENCE

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12

Permutations and Combinations

Section : Combinations and Permutations

Sec 5.1 The Basics of Counting

Probability Theory. Mohamed I. Riffi. Islamic University of Gaza

Board Question 1. There are 5 Competitors in 100m final. How many ways can gold silver and bronze be awarded? May 27, / 28

Counting and Probability Math 2320

Elementary Combinatorics CE 311S

Exercises Exercises. 1. List all the permutations of {a, b, c}. 2. How many different permutations are there of the set {a, b, c, d, e, f, g}?

Topics to be covered

Week 1: Probability models and counting

With Question/Answer Animations. Chapter 6

Sec.on Summary. The Product Rule The Sum Rule The Subtraction Rule (Principle of Inclusion- Exclusion)

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

Chapter 2. Permutations and Combinations

Theory of Probability - Brett Bernstein

Jong C. Park Computer Science Division, KAIST

STAT 430/510 Probability Lecture 3: Space and Event; Sample Spaces with Equally Likely Outcomes

Introductory Probability

EECS 203 Spring 2016 Lecture 15 Page 1 of 6

COUNTING AND PROBABILITY

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

CPCS 222 Discrete Structures I Counting

A Probability Work Sheet

Discrete mathematics

Mat 344F challenge set #2 Solutions

Math 166: Topics in Contemporary Mathematics II

MATH 2420 Discrete Mathematics Lecture notes

CIS 2033 Lecture 6, Spring 2017

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

Mixed Counting Problems

Chapter 1. Probability

Chapter 1. Probability

Compound Probability. Set Theory. Basic Definitions

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

About Permutations and Combinations: Examples

Counting in Algorithms

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

More Probability: Poker Hands and some issues in Counting

HOMEWORK ASSIGNMENT 5

Solutions - Problems in Probability (Student Version) Section 1 Events, Sample Spaces and Probability. 1. If three coins are flipped, the outcomes are

Probability and Counting Techniques

Permutations and Combinations Section

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

Section 6.1 #16. Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

7.1 Chance Surprises, 7.2 Predicting the Future in an Uncertain World, 7.4 Down for the Count

Independent Events. If we were to flip a coin, each time we flip that coin the chance of it landing on heads or tails will always remain the same.

Combinatorics and Intuitive Probability

Well, there are 6 possible pairs: AB, AC, AD, BC, BD, and CD. This is the binomial coefficient s job. The answer we want is abbreviated ( 4

Chapter 11: Probability and Counting Techniques

The topic for the third and final major portion of the course is Probability. We will aim to make sense of statements such as the following:

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

CSCI 2200 Foundations of Computer Science (FoCS) Solutions for Homework 7

Permutations: The number of arrangements of n objects taken r at a time is. P (n, r) = n (n 1) (n r + 1) =

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

Section The Multiplication Principle and Permutations

Counting Methods and Probability

Finite Math Section 6_4 Solutions and Hints

Finite Math - Fall 2016

Statistics Intermediate Probability

1. An office building contains 27 floors and has 37 offices on each floor. How many offices are in the building?

CSE 21 Mathematics for Algorithm and System Analysis

Solutions for Exam I, Math 10120, Fall 2016

Math 42, Discrete Mathematics

Probability. Engr. Jeffrey T. Dellosa.

MATH 215 DISCRETE MATHEMATICS INSTRUCTOR: P. WENG

{ a, b }, { a, c }, { b, c }

What is counting? (how many ways of doing things) how many possible ways to choose 4 people from 10?

Discrete Mathematics with Applications MATH236

3 The multiplication rule/miscellaneous counting problems

Counting (Enumerative Combinatorics) X. Zhang, Fordham Univ.

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

Probability MAT230. Fall Discrete Mathematics. MAT230 (Discrete Math) Probability Fall / 37

Lecture 18 - Counting

Mathematical Foundations HW 5 By 11:59pm, 12 Dec, 2015

Combinations AMC AMS AMR ACS ACR ASR MSR MCR MCS CRS

CSC/MTH 231 Discrete Structures II Spring, Homework 5

CSE 312: Foundations of Computing II Quiz Section #2: Inclusion-Exclusion, Pigeonhole, Introduction to Probability (solutions)

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

Multiple Choice Questions for Review

CHAPTER 2 PROBABILITY. 2.1 Sample Space. 2.2 Events

Section 5.4 Permutations and Combinations

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

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

Discrete Structures for Computer Science

Objectives: Permutations. Fundamental Counting Principle. Fundamental Counting Principle. Fundamental Counting Principle

Fundamental Counting Principle

Junior Circle Meeting 5 Probability. May 2, ii. In an actual experiment, can one get a different number of heads when flipping a coin 100 times?

Combinations Example Five friends, Alan, Cassie, Maggie, Seth and Roger, have won 3 tickets for a concert. They can t afford two more tickets.

Transcription:

Introduction Good morning. Many counting problems can be solved by finding the number of ways to arrange a specified number of distinct elements of a set of a particular size, where the order of these elements matters. Many other counting problems can be solved by finding the number of ways to select a particular number elements from a set of a particular size, where the order of these elements does not matter. For example, in how many ways can we select three students from a group of five students to stand in line for a picture? How many different committees of three students can be formed from a group of four students? In this lecture we will develop methods to answer questions such as these. Permutations EXAMPLE 1.1 EXAMPLE 1.2 In how many ways can we select three students from a group of five students to stand in line for a picture? First, note that the order in which we select the students matters. There are five ways to select the first student to stand at the start of the line. Once this student has been selected, there are four ways to select the second student in the line. After the first and second students have been selected, there are three ways to select the third student in the line. By the product rule, there are 5 4 3 = 60 ways to select three students from a group of five students to stand in line for a picture. In how many ways can we arrange all five of these students in a line for a picture? To arrange all five students in a line for a picture, we select the first student in five ways, the second in four ways, the third in three ways, the fourth in two ways and the fifth in one way. Consequently, there are 5 4 3 2 1 = 120 ways to arrange all five students in a line for a picture. Definition EXAMPLE 2 THEOREM 1 COROLLARY 1 A permutation of a set of distinct objects is an ordered arrangement of these objects. An ordered arrangement of r elements of a set is called an r-permutation. The number of r-permutations of a set with n elements is denoted by P(n, r). We can find P(n, r) using the product rule. Let S = {1,2,3}. The ordered arrangement 3, 1, 2 is a permutation of S. The ordered arrangement 3,2 is a 2-permutation of S. If n is a positive integer and r is an integer with 1 r n, then there are P(n, r) = n(n 1)(n 2) (n r + 1) r-permutations of a set with n distinct elements. If n and r are integers with 0 r n, then n! P(n, r) = (n r)! 1

EXAMPLE 4 EXAMPLE 7 How many ways are there to select a first-prize winner, a second-prize winner, and a third-prize winner from 100 different people who have entered a contest? Because it matters which person wins which prize, the number of ways to pick the three prize winners is the number of ordered selections of three elements from a set of 100 elements, that is, the number of 3- permutations of a set of 100 elements. Consequently, the answer is P(100,3) = 100 99 98 = 970,200 How many permutations of the letters ABCDEFGH contain the string ABC? Because the letters ABC must occur as a block, we can find the answer by finding the number of permutations of six objects, namely, the block ABC and the individual letters D, E, F, G, and H. Because these six objects can occur in any order, there are 6! = 720 permutations of the letters ABCDEFGH in which ABC occurs as a block. Combinations EXAMPLE 8 Definition EXAMPLE 10 THEOREM 2 How many different committees of three students can be formed from a group of four students? To answer this question, we need only find the number of subsets with three elements from the set containing four students. We see that there are four such subsets, one for each of the four students, because choosing four students is the same as choosing one of the four students to leave out of the group. This means that there are four ways to choose the three students for the committee, where the order in which these students are chosen does not matter. An r-combination of elements of a set is an unordered selection of r elements from the set. Thus, an r-combination is simply a subset of the set with r elements. The number of r-combinations of a set with n distinct elements is denoted C(n, r). Note that C(n, r) is also denoted by ( n ) and is called a binomial r coefficient. How many subsets of the set S = {a, b, c, d} are there that have only two elements? Since order is not important we find C(4,2) = 6 consisting of the sets {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, and {c, d}. The number of r-combinations of a set with n elements, where n is a nonnegative integer and r is an integer with 0 r n is n! C(n, r) = r! (n r)! 2

EXAMPLE 11.1 How many poker hands of five cards can be dealt from a standard deck of 52 cards? Because the order in which the five cards are dealt from a deck of 52 cards does not matter, there are C(52,5) = 52! 5! 47! different hands of five cards that can be dealt. To compute the value C(52,5), first divide numerator and denominator by 47! to obtain 52 51 50 49 48 C(52,5) = = 26 17 10 49 12 = 2,598,960. 5 4 3 2 1 EXAMPLE 11.2 How many ways are there to select 47 cards from a standard deck of 52 cards Because the order in which the 47 cards are dealt from a deck of 52 cards does not matter, there are C(52,47) = 52! 47! 5! different ways to select 47 cards from a standard deck of 52 cards. 3

3. How many different permutations of the set {a, b, c, d, e, f, g} end with a? If we want the permutation to end with a, then we may as well forget about the a, and just count the number of permutations of {b, c, d, e, f, g}. Each permutation of these 6 letters, followed by a, will be a permutation of the desired type, and conversely. Therefore the answer is: 6! P(6, 6) = (6 6)! = 6! 0! = 720 1 = 720 9. How many possibilities are there for the win, place and show (first, second, and third) positions in a horse race with 12 horses if all orders of finish are possible? We need to pick 3 horses from the 12 horses in the race, and we need to arrange them in order (first, second, and third), in order to specify the win, place, and show. Thus there are: possibilities. P(12, 3) = 12! (12 3)! = 12! = 12 11 10 = 1320 9! 11. How many bit strings of length 10 contain a) exactly four 1s? To specify a bit string of length 10 that contains exactly four 1 s, we simply need to choose the four positions that contain the 1 s. There are C(10, 4) = 220 ways to do that. C(10, 4) = 220 b) at most four 1s? To contain at most four 1 s means to contain four 1 s three 1 s two 1 s one 1 or no 1 s. Reasoning as in part (a), we see that there are: C(10, 4) + C(10, 3) + C(10, 2) + C(10, 1) + C(10. 0) = 210 + 120 + 45 + 10 + 1 = 386 to do that. c) at least four 1s? To contain at least four 1 s means to contain four 1 s,, five 1 s, six 1 s, seven 1 s, eight 1 s, nine 1 s, or 10 1 s. We could reason as in part (b), but we would have many numbers to add. A simpler approach would be to figure out the number of ways not to have at least four 1 s (i.e., to have three 1 s, two 1 s, one 1, or no 1 s) and then subtract that from 2 10, the total number of bit strings of length 10. This way we get 1024 (120 + 45 + 10 + 1) = 848 1024 (120 + 45 + 10 + 1) = 848 d) an equal number of 0s and 1s? 4

To have an equal number of 0 s and 1 s in this case means to have five 1 s. Therefore the answer is C(10, 5) = 252. C(10, 5) = 252 5

18. A coin is flipped 8 times where each flip comes up either heads or tails. How many possible outcomes a) are there in total? Each flip can be either heads or tails, so there are 2 8 = 256 possible outcomes. 2 8 = 256 b) contain exactly three heads? To specify an outcome that has exactly three heads, we simply need to choose the three flips that came up heads. There are C(8, 3) = 56 such outcomes. C(8, 3) = 56 c) contain at least three heads? To contain at least three heads means to contain three heads, four heads, five heads, six heads, seven heads, or eight heads. Reasoning as in part (b), we see that there are C(8, 3) + C(8, 4) + C(8, 5) + C(8, 6) + C(8, 7) + C(8, 8) = 56 + 70 + 56 + 28 + 8 + 1 = 219 such outcomes. We could also subtract from 256 the number of ways to get two or fewer heads, namely 28 + 8 + 1 = 37. Since 256 37 = 219, we obtain the same answer using this alternative method. C(8, 3) + C(8, 4) + C(8, 5) + C(8, 6) + C(8, 7) + C(8, 8) = 219 d) contain the same number of heads and tails? To have an equal number of heads and tails in this case means to have four heads. Therefore the answer is C(8, 4) = 70. C(8, 4) = 70 6