aabb abab abba baab baba bbaa permutations of these. But, there is a lot of duplicity in this list, each distinct word (such as 6! 3!2!1!

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

Elementary Combinatorics

Chapter 2. Permutations and Combinations

Reading 14 : Counting

CIS 2033 Lecture 6, Spring 2017

Polynomials - Special Products

Mat 344F challenge set #2 Solutions

50 Counting Questions

Topics to be covered

CS 237: Probability in Computing

Permutations and Combinations. Quantitative Aptitude & Business Statistics

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

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

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

Multiple Choice Questions for Review

Combinatorial Proofs

CS100: DISCRETE STRUCTURES. Lecture 8 Counting - CH6

Permutations and Combinations

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

Counting. Chapter 6. With Question/Answer Animations

Discrete Structures Lecture Permutations and Combinations

PERMUTATIONS AND COMBINATIONS

DISCRETE STRUCTURES COUNTING

COUNTING AND PROBABILITY

CSE 21 Mathematics for Algorithm and System Analysis

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

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}?

JUST THE MATHS UNIT NUMBER PROBABILITY 2 (Permutations and combinations) A.J.Hobson

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

Foundations of Computing Discrete Mathematics Solutions to exercises for week 12

IB HL Mathematics Homework 2014

In this section, we will learn to. 1. Use the Multiplication Principle for Events. Cheesecake Factory. Outback Steakhouse. P.F. Chang s.

DISCUSSION #8 FRIDAY MAY 25 TH Sophie Engle (Teacher Assistant) ECS20: Discrete Mathematics

Unit on Permutations and Combinations (Counting Techniques)

Combinatorics and Intuitive Probability

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

Math 3338: Probability (Fall 2006)

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

11.3B Warmup. 1. Expand: 2x. 2. Express the expansion of 2x. using combinations. 3. Simplify: a 2b a 2b

Honors Precalculus Chapter 9 Summary Basic Combinatorics

Unit 5 Radical Functions & Combinatorics

CISC-102 Fall 2017 Week 8

Permutations and Combinations

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

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

Finite Math - Fall 2016

Review I. October 14, 2008

Section The Multiplication Principle and Permutations

CSE 312: Foundations of Computing II Quiz Section #2: Combinations, Counting Tricks (solutions)

Introductory Probability

About Permutations and Combinations: Examples

CHAPTER 8 Additional Probability Topics

CS 237 Fall 2018, Homework SOLUTION

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

With Question/Answer Animations. Chapter 6

Section Summary. Permutations Combinations Combinatorial Proofs

Problem Set 2. Counting

STAT 430/510 Probability Lecture 1: Counting-1

Permutations and Combinations

17. Symmetries. Thus, the example above corresponds to the matrix: We shall now look at how permutations relate to trees.

4.4: The Counting Rules

Week 3-4: Permutations and Combinations

Math Fall 2011 Exam 2 Solutions - November 1, 2011

13.3 Permutations and Combinations

Distribution of Aces Among Dealt Hands

Counting Things Solutions

With Question/Answer Animations. Chapter 6

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

Counting Methods and Probability

More Probability: Poker Hands and some issues in Counting

3 The multiplication rule/miscellaneous counting problems

CSE 21: Midterm 1 Solution

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

Combinatorics. Reading: EC Peter J. Haas. INFO 150 Fall Semester Lecture 14 1/ 28

Week 6: Advance applications of the PIE. 17 and 19 of October, 2018

Math 42, Discrete Mathematics

LAMC Junior Circle February 3, Oleg Gleizer. Warm-up

UNC Charlotte 2008 Algebra March 3, 2008

Permutation Groups. Definition and Notation

Solutions to Exercises on Page 86

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

Permutation and Combination

Permutations and Combinations Problems

(1). We have n different elements, and we would like to arrange r of these elements with no repetition, where 1 r n.

Twenty-fourth Annual UNC Math Contest Final Round Solutions Jan 2016 [(3!)!] 4

STATISTICAL COUNTING TECHNIQUES

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

Sec 5.1 The Basics of Counting

CSC/MATA67 Tutorial, Week 12

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

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

Theory of Probability - Brett Bernstein

CS1800: Permutations & Combinations. Professor Kevin Gold

1 Permutations. 1.1 Example 1. Lisa Yan CS 109 Combinatorics. Lecture Notes #2 June 27, 2018

Unit Nine Precalculus Practice Test Probability & Statistics. Name: Period: Date: NON-CALCULATOR SECTION

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

Staircase Rook Polynomials and Cayley s Game of Mousetrap

CISC 1400 Discrete Structures

Week in Review #5 ( , 3.1)

Sec$on Summary. Permutations Combinations Combinatorial Proofs

Transcription:

Introduction to COMBINATORICS In how many ways (permutations) can we arrange n distinct objects in a row?answer: n (n ) (n )... def. = n! EXAMPLE (permuting objects): What is the number of different permutations of n + n +... + n k objects, n (n,...n k ) of them being indistinguishable, e.g. aabb abab abba baab baba bbaa Another EXAMPLE: aaabbc. First consider them distinguishable: a a a b b c. There is 6! permutations of these. But, there is a lot of duplicity in this list, each distinct word (such as babaac) appears!!! times: b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c, b a b a a c. Dividing 6! by this multiplicity factor yields 6!!!! =60 for the number of distinct words one can create by permuting aaabbc. A shorthand notation ³ 6! for is 6, called multinomial coefficient.!!!,, In general, the answer is (n + n + n +... + n k )! n!n!n!...n k! Selecting out of letters (say a, b, c). There are 4 different answers, depending on:

. The order is important, duplication is not allowed: ab, ac, ba, bc, ca, cb. Order irrelevant: ab, ac, bc. Order important again, but now each letter can be used any number of times: aa, ab, ac, ba, bb, bc, ca, cb, cc 4. Order irrelevant: aa, ab ba, ac ca, bb, bc cb, cc Selecting r out of n distinct objects. n (n ) (n )... (n r +)= n! (n r)! P n r. Each unordered selection of r letters will appear, in the previous list, exactly r! times. The answer: n! ³ n (n r)!r! Cn r r called binomial coefficient. Note the symmetry.. When we can use each letter repeatedly, for ordered selection we get n n n... n = n r 4. The last formula is more difficult to derive. Note the each possible result can be represented by... with r dots and n bars. For example, selecting 5 letters from a, b, c, d

represents a s and c s. The answer: (n + r )! r!(n )! µ n + r = r Note that the last formula also counts the number of ways to write r as a sum of n non-negative integers, order relevant! Binomial expansion (x + y) n =(x + y)(x + y)...(x + y) =xxx...x + yxx...x +... + yyy...y. Thisisthesum of all possible n-letter words, using a -letter alphabet. How many of them have exactly i x s and n iy s? Well, there is exactly n i such words and, algebraically, they have the same value of x i y n i. Answer: (x + y) n = nx i=0 ³ n i x i y n i Example: ( x ) 4 =+4 x +6 x +4 x + x 4 Extension: ( + x) n =+ ³ n ³ n ³ n x + x + x +... remains true (as a Taylor expansion) even when n is negative and/or non-integer, with the understanding that n i n (n )... (n i+). For example i! ( + x) = x +6x 0x +5x 4... ( + x) = + x + 8 x 6 x + 8 x4 +... Multinomial expansion

(x + y + z) n =(x + y + z)(x + y + z)...(x + y + z) =xxx...x + yxx...x +... + zzz...z (complete dictionary of all n-letter words composed of x, y and z). How many of them have ix s, jy s and kz s? Well, we know that there are of these, and each of them will be there, exactly once. Thus (x + y + z) n = X i,j,k 0 i+j+k=n ³ n i,j,k µ n x i y j z k i, j, k How many terms does this formula have? We have to choose n symbols from x, y and z, repetition allowed, orderless, i.e. n+. EXAMPLES: (x + y + z) = x + y + z +x y +x z +xy +xz +y z +yz +6xyz (0 terms) Find the coefficient of ut in the expansion of (u + 4t) 5. Solution: The only term containing ut is: ( 5,, )(u) () ( 4t) = 560ut. ( + x 5x ) 7 is a 4-degree polynomial in x. When expressed as such (i.e. when expanded, and terms with like powers of x are combined), what will be the coefficient of x 4? Solution: ( 7 i,j,k )()i (x) j ( 5x ) k is the general term of this expansion. Let us make i j k a table of the exponents which contribute to x 4 : 4 0 4. This translates to: ( 7 4 )(x)4 +( 7 4,, )(x) ( 5x )+( 7 )( 5x ) = 680x 4. 5 0 Partitioning 4

n distinct objects are to be divided into several groups of a given size each, e.g. 9 people into teams of size 4, and. Answer: 9 4 5 ³ = 9 = 60 -sameasthenumber 4,, of permutations of aaaabbbcc. What is some of the groups are of the same size, and we consider them interchangeable, e.g. divide 9 people into groups of size each, considering 456 789 and 456 789 as thesame partitioning.theanswer: ³ 9,, = 80.! Another example: 0 people into groups of 4, groupsof and groups of : ³ 0 4,4,,,,,!!! =6, 08, 047, 000 Circular arrangement When arranging n people around a (circular) table (instead of a row), and we care only about who are the left and right neighbors of each person, the amount of duplicity in the list of the original n! (row) arrangements is n. So, in this sense, there are only n! n distinct circular arrangements of n people. END-OF-CHAPTER EXAMPLES: =(n )!. A team plays a series of 0 games which they can either win (W ), lose (L) or tie (T ). (a) How many possible outcomes (order is important). Answer: 0 = 59049. (b) How many of these have exactly 5 wins, 4 losses and tie? Answer: 0 5,4, =60. (c) Sameas(a) ifwedon t care about the order of wins, losses and ties? Answer: =66(only one of these will have 5 wins, 4 losses and tie). 5

. A student has to answer 0 true-false questions. (a) In how many distinct ways can this be done? Answer: 0 = 048576. (b) How many of these will have exactly 7 correct answers? Answer: 0 7 = 7750. (c) At least 7 correct answers? 0 7 + 0 8 + 0 9 + 0 (d) Fewer than? (excludes ): 0 0 + 0 + 0 =. 0 = 0 + 0 + 0 + 0 0 =5.. In how many ways can A s, 4 F s, 4 D s and C s be arranged (a) in a row. Answer:,4,4, = 0 4 6 4 = 900900. (b) In how many of these will like letters stay together? Answer: 4! = 4. (c) Repeat (a) with circular arrangement: Answer: 900900 = 6900. (d) Repeat (b) with circular arrangement: Answer:! = 6. 4. Four couples (Mr&Mrs A, Mr&Mrs B,...) are to be seated at a round table. (a) In how many ways can this be done? Answer: 7! = 5040. (b) How many of these have all spouses sit next to each other? Answer:! 4 =96. (Pr =.905%). (c) How many of these have the men and women alternate? Answer: 4 =44(.86%). (d) How many of these have the men (and women) sit together? Answer: (4!) =576 (.4%). 5. In how many ways can we put books onto shelves? 6

(a) It the books are treated as identical: Answer: 4 =9 (b) Books as distinct, their order important. Answer: 9! = 4, 589, 45, 600. (c) Books distinct, order irrelevant. Answer: =5, 44. 6. Twelve men can be seated in a row in! = 479, 00, 600 number of ways (trivial). (a) How many of these will have Mr A and Mr B sit next to each other? Answer:! = 79, 8, 600. (b) How many of the original arrangements will have Mr A and Mr B sit apart? Answer:!! = 99, 68, 000. (c) How many of the original arrangements will have exactly 4peoplesitbetween Mr A and Mr B? Answer: 7 0! = 50, 80, 00. 7. Consider 5 distinct letters, U, R, G, F among them. These can be arranged in a row in 5! possible ways. How many of these have F and G next to each other but (at the same time) U and R apart? Answer: 4!! = 49, 448, 499, 00. 8. Consider the standard deck of 5 cards. Deal 5 cards from this deck. This can be done in 5 5 = 598960 distinct ways. (a) How many of these will have exactly diamonds? Answer: 9 =, 96. (b) Exactly aces? Answer: 4 48 = 0776. (c) Exactly aces and diamonds? Answer: 6 + 0 6 =9, 808. 9. In how many ways can we deal 5 cards each to 4 players? (a) Answer: 5 5 47 5 4 5 7 5 =.478 0 4 7

(b) So that each gets exactly one ace? Answer: 4 48 44 40 6 4 4 4 4 =.47 0 (c) None gets any ace: Answer: 48 4 8 5 5 5 5 =.966 0 (d) Mr A gets exactly aces, the rest get none. Answer: 4 48 45 40 5 5 5 5 =.7084 0 (e) (Any) one player gets aces, the other players get none. Answer: 4.7084 0 =.084 0 (f) Mr. A gets aces. Answer: 4 48 47 4 7 5 5 5 =5.907 0. (g) Mr. C gets aces. Clumsy answer: 48 4 5 5 8 4 7 4 44 4 5 9 7 4 4 5 4 9 7 4 44 4 4 40 7 4 45 5 40 7 4 4 5 40 7 5 =5.907 0, or be smart and argue that... (h) At least one player gets aces (regardless of what the others get). More difficult. 0. Roll a die five times. The number of possible (ordered) outcomes is 6 5 =7776. How many of these will have: (a) One pair of identical values(and no other duplicates). Answer: 6 5 5,,, = 600. (b) Two pairs. Answer: 6 4 5,, =800. (c) A triplet: 6 5 5,, =00. (d) Full house (a triplet and a pair): 6 5 5, =00. (e) Four of a kind : 6 5 5 4, =50. (f) Five of a kind : 6 5 5 =6. 8

(g) Nothing. 6 5 4 =70. Note that all these answers properly add up to 7776 (check).. Let us try the same thing with 5 rolls of a die (6 5 =4.7080 outcomes in total). How many of these will have: (a) A quadruplet, triplets, pairs and singlet: 6 5 5 4,,,,, =6.808 0 0 (b) triplets and pairs: 6 5,,,,, =.55 0 0. We will not try to complete this exercise; the full list would consist of 0 possibilities. 9