Permutations and Combinations

Similar documents
Auchmuty High School Mathematics Department Advanced Higher Notes Teacher Version

Section 5.3 Arrangements and Selections with repetitions

1) (A B) = A B ( ) 2) A B = A. i) A A = φ i j. ii) Additional Important Properties of Sets. De Morgan s Theorems :

Chapter 3: Theory of Modular Arithmetic 38

Divisibility. c = bf = (ae)f = a(ef) EXAMPLE: Since 7 56 and , the Theorem above tells us that

A Bijective Approach to the Permutational Power of a Priority Queue

New problems in universal algebraic geometry illustrated by boolean equations

(n 1)n(n + 1)(n + 2) + 1 = (n 1)(n + 2)n(n + 1) + 1 = ( (n 2 + n 1) 1 )( (n 2 + n 1) + 1 ) + 1 = (n 2 + n 1) 2.

3.6 Applied Optimization

Online Mathematics Competition Wednesday, November 30, 2016

Solutions to Problem Set 8

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

Chapter Eight Notes N P U1C8S4-6

of the contestants play as Falco, and 1 6

INTRODUCTION. 2. Vectors in Physics 1

Chapter 1: Introduction to Polar Coordinates

Math Section 4.2 Radians, Arc Length, and Area of a Sector

A STUDY OF HAMMING CODES AS ERROR CORRECTING CODES

MATH 220: SECOND ORDER CONSTANT COEFFICIENT PDE. We consider second order constant coefficient scalar linear PDEs on R n. These have the form

Problem Set 10 Solutions

THE CONE THEOREM JOEL A. TROPP. Abstract. We prove a fixed point theorem for functions which are positive with respect to a cone in a Banach space.

Pushdown Automata (PDAs)

Solution to HW 3, Ma 1a Fall 2016

On the Quasi-inverse of a Non-square Matrix: An Infinite Solution

The Archimedean Circles of Schoch and Woo

PROBLEM SET #1 SOLUTIONS by Robert A. DiStasio Jr.

SMT 2013 Team Test Solutions February 2, 2013

Δt The textbook chooses to say that the average velocity is

MATH 417 Homework 3 Instructor: D. Cabrera Due June 30. sin θ v x = v r cos θ v θ r. (b) Then use the Cauchy-Riemann equations in polar coordinates

Motithang Higher Secondary School Thimphu Thromde Mid Term Examination 2016 Subject: Mathematics Full Marks: 100

Lecture 7: Angular Momentum, Hydrogen Atom

6 PROBABILITY GENERATING FUNCTIONS

8 Separation of Variables in Other Coordinate Systems

Exploration of the three-person duel

Section 8.2 Polar Coordinates

What Form of Gravitation Ensures Weakened Kepler s Third Law?

Math 124B February 02, 2012

OLYMON. Produced by the Canadian Mathematical Society and the Department of Mathematics of the University of Toronto. Issue 9:2.

Review Exercise Set 16

PDF Created with deskpdf PDF Writer - Trial ::

arxiv: v1 [math.nt] 12 May 2017

working pages for Paul Richards class notes; do not copy or circulate without permission from PGR 2004/11/3 10:50

A Crash Course in (2 2) Matrices

Review for the previous lecture

Graphs of Sine and Cosine Functions

Do Managers Do Good With Other People s Money? Online Appendix

Brief summary of functional analysis APPM 5440 Fall 2014 Applied Analysis

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

B da = 0. Q E da = ε. E da = E dv

Polar Coordinates. a) (2; 30 ) b) (5; 120 ) c) (6; 270 ) d) (9; 330 ) e) (4; 45 )

arxiv: v1 [math.co] 4 May 2017

To Feel a Force Chapter 7 Static equilibrium - torque and friction

In statistical computations it is desirable to have a simplified system of notation to avoid complicated formulas describing mathematical operations.

Magnetic Field. Conference 6. Physics 102 General Physics II

Australian Intermediate Mathematics Olympiad 2017

Physics 521. Math Review SCIENTIFIC NOTATION SIGNIFICANT FIGURES. Rules for Significant Figures

Method for Approximating Irrational Numbers

The Chromatic Villainy of Complete Multipartite Graphs

C/CS/Phys C191 Shor s order (period) finding algorithm and factoring 11/12/14 Fall 2014 Lecture 22

When two numbers are written as the product of their prime factors, they are in factored form.

Chapter 2: Introduction to Implicit Equations

Trigonometry Standard Position and Radians

On a quantity that is analogous to potential and a theorem that relates to it

As is natural, our Aerospace Structures will be described in a Euclidean three-dimensional space R 3.

Introduction Common Divisors. Discrete Mathematics Andrei Bulatov

EXTRA HOTS PROBLEMS. (5 marks) Given : t 3. = a + (n 1)d = 3p 2q + (n 1) (q p) t 10. = 3p 2q + (10 1) (q p) = 3p 2q + 9 (q p) = 3p 2q + 9q 9p = 7q 6p

Tutorial Exercises: Central Forces

The Substring Search Problem

Radian and Degree Measure

Radian Measure CHAPTER 5 MODELLING PERIODIC FUNCTIONS

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012

Physics 2A Chapter 10 - Moment of Inertia Fall 2018

Lecture 16 Root Systems and Root Lattices

Syntactical content of nite approximations of partial algebras 1 Wiktor Bartol Inst. Matematyki, Uniw. Warszawski, Warszawa (Poland)

Algebra. Substitution in algebra. 3 Find the value of the following expressions if u = 4, k = 7 and t = 9.

Physics 111 Lecture 5 (Walker: 3.3-6) Vectors & Vector Math Motion Vectors Sept. 11, 2009

9.1 The multiplicative group of a finite field. Theorem 9.1. The multiplicative group F of a finite field is cyclic.

Review: Electrostatics and Magnetostatics

No. 48. R.E. Woodrow. Mathematics Contest of the British Columbia Colleges written March 8, Senior High School Mathematics Contest

f h = u, h g = v, we have u + v = f g. So, we wish

CHEM1101 Worksheet 3: The Energy Levels Of Electrons

7.2. Coulomb s Law. The Electric Force

Berkeley Math Circle AIME Preparation March 5, 2013

Pledge: Signature:

Math 2263 Solutions for Spring 2003 Final Exam

18.06 Problem Set 4 Solution

Physics 11 Chapter 4: Forces and Newton s Laws of Motion. Problem Solving

The Strain Compatibility Equations in Polar Coordinates RAWB, Last Update 27/12/07

POISSON S EQUATION 2 V 0

radians). Figure 2.1 Figure 2.2 (a) quadrant I angle (b) quadrant II angle is in standard position Terminal side Terminal side Terminal side

ST 501 Course: Fundamentals of Statistical Inference I. Sujit K. Ghosh.

GROWTH ESTIMATES THROUGH SCALING FOR QUASILINEAR PARTIAL DIFFERENTIAL EQUATIONS

( ) ( )( ) ˆ. Homework #8. Chapter 27 Magnetic Fields II.

3.1 Random variables

MAC Module 12 Eigenvalues and Eigenvectors

Calculus I Section 4.7. Optimization Equation. Math 151 November 29, 2008

OSCILLATIONS AND GRAVITATION

Question 1: The dipole

Physics 11 Chapter 3: Vectors and Motion in Two Dimensions. Problem Solving

Phys 201A. Homework 5 Solutions

Transcription:

Pemutations and Combinations Mach 11, 2005 1 Two Counting Pinciples Addition Pinciple Let S 1, S 2,, S m be subsets of a finite set S If S S 1 S 2 S m, then S S 1 + S 2 + + S m Multiplication Pinciple Let S 1, S 2,, S m be finite sets and S S 1 S 2 S m Then S S 1 S 2 S m Example 11 Detemine the numbe of positive integes which ae factos of the numbe 5 3 7 9 13 33 8 The numbe 33 can be factoed into 3 11 By the unique factoization theoem of positive integes, each facto of the given numbe is of the fom 3 i 5 j 7 k 11 l 13 m, whee 0 i 8, 0 j 3, 0 k 9, 0 l 8, and 0 m 1 Thus the numbe of factos is 9 4 10 9 2 7280 Example 12 How many two-digit numbes have distinct and nonzeo digits? A two-digit numbe ab can be egaded as an odeed pai (a, b whee a is the tens digit and b is the units digit The digits in the poblem ae equied to satisfy a 0, b 0, a b The digit a has 9 choices, and fo each fixed a the digit b has 8 choices So the answe is 9 8 72 The answe can be obtained in anothe way: Thee ae 90 two-digit numbes, ie, 10, 11, 12,, 99 Howeve, the 9 numbes 10, 20,, 90 should be excluded; anothe 9 numbes 11, 22,, 99 should be also excluded So the answe is 90 9 9 72 Example 13 How many odd numbes between 1000 and 9999 have distinct digits? A numbe a 1 a 2 a 3 a 4 between 1000 and 9999 can be viewed as an odeed tuple (a 1, a 2, a 3, a 4 Since a 1 a 2 a 3 a 4 1000 and a 1 a 2 a 3 a 4 is odd, then a 1 1, 2,, 9 and a 4 1, 3, 5, 7, 9 Since a 1, a 2, a 3, a 4 ae distinct, we conclude: a 4 has 5 choices; when a 4 is fixed, a 1 has 8( 9 1 choices; when a 1 and a 4 ae fixed, a 2 has 8( 10 2 choices; and when a 1, a 2, a 4 ae fixed, a 3 has 7( 10 3 choices Thus the answe is 8 8 7 5 2240 Example 14 In how many ways to make a basket of fuit fom 6 oanges, 7 apples, and 8 bananas so that the basket contains at least two apples and one banana? Let a 1, a 2, a 3 be the numbe of oanges, apples, and bananas in the basket espectively Then 0 a 1 6, 2 a 2 7, and 1 a 3 8, ie, a 1 has 7 choices, a 2 has 6 choices, and a 3 has 8 choices Thus the answe is 7 6 8 336 Geneal Ideas about Counting: Count the numbe of odeed aangements o odeed selections of objects 1

(a without epetition, (b with epetition allowed Count the numbe of unodeed aangements o unodeed selections of objects (a without epetition, (b with epetition allowed A multiset M is a collection whose membes need not be distinct Fo instance, the collection is a multiset; and sometimes it is convenient to wite M {a, a, b, b, c, d, d, d, 1, 2, 2, 2, 3, 3, 3, 3} M {2a, 2b, c, 3d, 1, 3 2, 4 3} A multiset M ove a set S can be viewed as a function v : S N fom S to the set N of nonnegative integes; each element x S is epeated v(x times in M; we wite M (S, v Example 15 How many integes between 0 and 10,000 have exactly one digit equal to 5? Fist Method: Let S be the set of all such numbes, and let S i be the set of such numbes having exactly i digits, 1 i 4 Clealy, S 1 1 Fo S 2, if the tens is 5, then the units has 9 choices; if the units is 5, then the tens has 8 choices; thus S 2 9 + 8 17 Fo S 3, if the tends is 5, then the units has 9 choices and the hundeds has 8 choices; if the hundeds is 5, then both tens and the units have 9 choices; if the units is 5, then the tens has 9 choices and hundeds has 8 choices; thus S 3 9 9 + 8 9 + 8 9 225 Fo S 4, if the thousands is 5, then each of the othe thee digits has 9 choices; if the hundeds o tens o units is 5, then the thousands has 8 choices, each of the othe two digits has 9 choices; thus S 4 9 9 9+3 8 9 9 2, 673 Theefoe S S 1 + S 2 + S 3 + S 4 1 + 17 + 225 + 2, 673 2, 916 Second Method: Let us wite any intege with less than 5 digits in a fomal 5-digit fom by adding zeos in the font Fo instance, we wite 35 as 00035, 836 as 00836 Let S i be the set of integes of S whose ith digit is 5, 1 i 4 Then S i 9 9 9 729 Thus S 4 729 2, 916 Example 16 How many distinct 5-digit numeals can be constucted out of the digits 1, 1, 1, 6, 8? The digit 6 can be located in any of the 5 positions; then 8 can be located in in 4 positions Thus the answe is 5 4 20 2 Pemutation of Sets Definition 21 An -pemutation of n objects is a linealy odeed selection of objects fom a set of n objects The numbe of -pemutations of n objects is denoted by P (n, An n-pemutation of n objects is just called a pemutation of n objects The numbe of pemutations of n objects is denoted by, ead n factoial Theoem 22 The numbe of -pemutations of an n-set equals P (n, n(n 1 (n + 1 Coollay 23 The numbe of pemutations of an n-set is (n! 2

Example 21 Find the numbe of ways to put the numbes 1, 2,, 8 into the squaes of 6-by-6 gid so that each squae contains at most one numbe Thee ae 36 squaes in the 6-by-6 gid We label the squaes by the numbes 1, 2,, 36 as follows: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 5 3 7 4 6 2 8 1 The filling patten on the ight can be viewed as the 8-pemutation (35, 22, 7, 16, 3, 21, 11, 26 of {1, 2,, 36} Thus the answe is 36! P (36, 8 (36 36! 2 Example 22 What is the numbe of ways to aange the 26 alphabets so that no two of the vowels a, e, i, o, and u occu next to each othe? We fist have the 21 consonants aanged abitaily and thee ae 21! ways to do so Fo each such 21- pemutation, we aange the 5 vowels a, e, i, o, u in 22 positions between consonants; thee ae P (22, 5 ways of such aangement Thus the answe is 21! P (22, 5 21! 22! 17! Example 23 Find the numbe of 7-digit numbes in base 10 such that all digits ae nonzeo, distinct, and the digits 8 and 9 do not appea next to each othe Fist method: The numbes in question can be viewed as 7-pemutations of {1, 2,, 9} with cetain estictions Such pemutations can be divided into thee types: (i pemutations without 8 and 9; (ii pemutations with eithe 8 o 9 but not both; and (iii pemutations with both 8 and 9 (i Thee ae P (7, 7 7! 5, 040 such pemutations (ii Thee ae P (7, 6 6-pemutations of {1, 2,, 7} Thus thee ae 2 7 P (7, 6 2 7 7! 1! 70, 560 such pemutations (iii Fo each 5-pemutation of {1, 2,, 7}, thee ae 6 ways to inset 8 in it, and then thee ae 5 ways to inset 9 Thus thee ae 6 5 P (7, 5 75, 600 Theefoe the answe is 5, 040 + 70, 560 + 75, 600 151, 200 Second method: Let S be the set of 7-pemutations of {1, 2,, 9} Let A be the subset of 7-pemutations of S in the poblem Then Ā is the set of 7-pemutations of S such that 89 o 98 appeas somewhee We may think of 89 and 98 as a single object in whole, then Ā can be viewed as the set of 6-pemutations of {1, 2, 3, 4, 5, 6, 7, 89} and the 6-pemutations of {1, 2, 3, 4, 5, 6, 7, 98} Thus the answe is S P (9, 7 2P (8, 6 + 2P (7, 7 9! 2! 2 2! + 2 7! 151, 200 0! A cicula -pemutation of a set S is an odeed objects of S aanged as a cicle; thee is no the beginning object and the ending object Theoem 24 The numbe of cicula -pemutations of an n-set equals P (n, (n! 3

Poof Let S be an n-set Let X be the set of all -pemutations of S, and let Y be the set of all cicula - pemutations of S Define a function f : X Y as follows: Fo each -pemutation a 1 a 2 a of S, f(a 1 a 2 a is the cicula -pemutation such that a 1 a 2 a a 1 a 2 is counteclockwise on a cicle Clealy, f is sujective Moeove, thee ae exactly -pemutations sent to one cicula -pemutation In fact, the pemutations a 1 a 2 a 3 a 1 a, a 2 a 3 a 4 a a 1,, a a 1 a 2 a 2 a 1 ae sent to the same cicula -pemutation Thus the answe is Y X P (n, Coollay 25 The numbe of cicula pemutations of an n-set is equal to (n 1! Example 24 Twelve people, including two who do no wish to sit next to each othe, ae to be seated at a ound table How many cicula seating plans can be made? Fist method: We may have 11 people (including one of the two unhappy pesons but not both to sit fist; thee ae 10! such seating plans Next the second unhappy peson can sit anywhee except the left side and ight side of the fist unhappy peson; thee ae 9 choices fo the second unhappy peson Thus the answe is 9 10! Second method: Thee ae 11! seating plans fo the 12 people with no estiction We need to exclude those seating plans that the unhappy pesons a and b sit next to each othe Note that a and b can sit next to each othe in two ways: ab and ba We may view a and b as an insepaable twin; thee ae 2 10! such seating plans Thus the answe is given by 11! 2 10! 9 10! Example 25 How many diffeent pattens of necklaces with 18 beads can be made out of 25 available beads of the same size but in diffeent colos? Answe: P (25,18 18 2 25! 36 7! 3 Combinations of Sets A combination is a collection of objects (ode is immateial fom a given set An -combination of an n-set S is an -subset of S We denote by the numbe of -combinations of an n-set, ead n choose Theoem 31 The numbe of -combinations of an n-set equals!(n! P (n,! Fist Poof Let S be an n-set Let X be the set of all pemutations of S, and let Y be the set of all -subsets of S Conside a map f : X Y defined by f(x 1 x 2 x x +1 x n {x 1, x 2,, x }, x 1 x 2 x n X Clealy, f is sujective Moeove, fo any -subset A {x 1, x 2,, x } Y, thee ae! pemutations of A and (n! pemutations of the complement Ā Then Thus f 1 (A!(n! Theefoe f 1 (A {στ : σ is a pemutation of A and τ is a pemutation of Ā} Y X!(n!!(n! 4

Second Method: Let X be the set of all -pemutations of S and let Y be the set of all -subsets of S Conside a map f : X Y defined by f(x 1 x 2 x {x 1, x 2,, x }, x 1 x 2 x X Clealy, f is sujective Moeove, thee ae exactly! pemutations of {x 1, x 2,, x } sent to {x 1, x 2,, x } Thus Y X! P (n,! Example 31 How many 8-lette wods can be constucted fom 26 lettes of the alphabets if each wod contains 3, 4, o 5 vowels? It is undestood that thee is no estiction on the numbe of times a lette can be used in a wod The numbe of wods with 3 vowels: Thee ae ( 8 3 ways to choose 3 vowel positions in a wod; each vowel position can be filled with one of the 5 vowels; the consonant position can be any of 21 consonants Thus thee ae 5 3 21 5 wods having exactly 3 vowels ( 8 3 The numbe of wods with 4 vowels: ( 8 4 5 4 21 4 The numbe of wods with 5 vowels: ( 8 5 5 5 21 3 Thus the answe is ( 8 5 3 21 5 + 3 Coollay 32 Fo integes n, such that n 0, ( 8 5 4 21 4 + 4 ( n n ( 8 5 5 21 3 5 Theoem 33 The numbe of subsets of an n-set S equals + + + + 2 0 1 2 n n 4 Pemutations of Multisets Let M be a multiset An -pemutation of M is an odeed aangement of objects of M If M n, then an n-pemutation of M is called a pemutation of M Theoem 41 Let M be a multiset of k diffeent types whee each type has infinitely many elements Then the numbe of -pemutations of M equals k Example 41 What is the numbe of tenay numeals with at most 4 digits? The question is to find the numbe of 4-pemutations of the multiset { 0, 1, 2} Thus the answe is 3 4 81 Theoem 42 Let M be a multiset of k types with epetition numbes n 1, n 2,, n k espectively Let n n 1 + n 2 + + n k Then the numbe of pemutations of M equals Poof List the elements of M as n 1!n 2! n k! a,, a, b,, b,, d,, d }{{}}{{}}{{} n 1 n 2 n k Let S be the set consisting of the elements a 1, a 2,, a n1, b 1, b 2,, b n2,, d 1, d 2,, d nk Let X be the set of all pemutations of S, and let Y be the set of all pemutations of M Thee is a map f : X Y, sending each pemutation of S to a pemutation of M by emoving the subscipts of the elements Note that fo each pemutation 5

π of M thee ae n 1!, n 2!,, and n k! ways to put the subscipts of the fist, the second,, and the kth type elements back, espectively Thus thee ae n 1!n 2! n k! elements of X sent to π by f Theefoe the answe is Y X n 1!n 2! n k! n 1!n 2! n k! Coollay 43 The numbe of 0-1 wods of length n with exactly ones and n zeos is equal to!(n! Example 42 How many possibilities ae thee fo 8 non-attacking ooks on an 8-by-8 chessboad? How about having 8 diffeent colo ooks? How about having 1 ed (R ook, 3 blue (B ooks, and 4 yellow (Y ooks We label each squae by an odeed pai (i, j of coodinates, (1, 1 (i, j (8, 8 Then the ooks must occupy 8 squaes with coodinates (1, a 1, (2, a 2,, (8, a 8, whee a 1, a 2,, a 8 must be distinct, ie, a 1 a 2 a 8 is a pemutation of {1, 2,, 8} Thus the answe is When the 8 ooks have diffeent colos, the answe is ( 2 If thee ae 1 ed ook, 2 blue ooks, and 3 yellow ooks, then we have a multiset M {R, 3B, 4Y } of ooks The numbe of pemutations of M equals 1!3!4!, and the answe in question is 1!3!4! Theoem 44 Given n ooks of k colos with n 1 ooks of the fist colo, n 2 ooks of the second colo,, and n k ooks of the kth colo The numbe of ways to aange these ooks on an n-by-n boad so that no two ooks can attack anothe equals n 1!n 2! n k! ( 2 n 1!n 2! n k! Example 43 Find the numbe of 8-pemutations of the multiset M {a, a, a, b, b, c, c, c, c} {3a, 2b, 4c} The numbe of 8-pemutations of {2a, 2b, 4c}: 2!2!4! The the numbe of 8-pemutations of {3a, b, 4c}: The numbe of 8-pemutations of {3a, 2b, 3c}: Thus the answe is 5 Combinations of Multisets 3!1!4! 3!2!3! 2!2!4! + 3!1!4! + 420 + 280 + 560 1, 260 3!2!3! Let M be a multiset An -combination of M is an unodeed collection of objects fom M Thus an -combination of M is itself an -submultiset of M Fo a multiset M { a 1, a 2,, a n }, an -combination of M is also called an -combination with epetition allowed of the n-set S {a 1, a 2,, a n } The numbe of -combinations with epetition allowed of an n-set is denoted by n Theoem 51 Let M { a 1, a 2,, a n } be a multiset of n types Then the numbe of -combinations of M is given by ( ( n n + 1 n + 1 n 1 Poof When objects ae taken fom the multiset M, we put them into the following boxes 1st 2nd nth 6

so that the ith type objects ae contained in the ith box, 1 i n Since the objects of the same type ae indistinguishable, we may use the symbol O to denote any object in the boxes, and the objects in diffeent boxes ae sepaated by a stick Convet the symbol O to zeo 0 and the stick to one 1, any such placement is conveted into a 0-1 sequence of length + n 1 with exactly zeos and n 1 ones Fo example, fo n 4 and 7, OO O OOO O {a, a, b, c, c, c, d} 0010100010 1 2 3 4 {b, b, b, b, d, d, d} OOO OOO 1 2 3 4 1000011000 Now the poblem becomes counting the numbe of 0-1 wods of length + (n 1 with exactly zeos and n 1 ones Thus the answe is ( ( n n + 1 n + 1 n 1 Coollay 52 The numbe n equals the numbe of ways to place identical balls into n distinct boxes Coollay 53 The numbe n equals the numbe of nonnegative intege solutions of the equation x 1 + x 2 + + x n Coollay 54 The numbe n equals the numbe of nondeceasing sequences of length whose tems ae taken fom the set {1, 2,, n} Example 51 Find the numbe of nonnegative intege solutions fo the equation x 1 + x 2 + x 3 + x 4 < 19 The poblem is equivalent to finding the numbe of nonnegative intege solutions of the equation x 1 + x 2 + x 3 + x 4 + x 5 18 7