Week 3-4: Permutations and Combinations



Similar documents
The Binomial Distribution

Symmetric polynomials and partitions Eugene Mukhin

UNIT CIRCLE TRIGONOMETRY

Continuous Compounding and Annualization

2. TRIGONOMETRIC FUNCTIONS OF GENERAL ANGLES

Figure 2. So it is very likely that the Babylonians attributed 60 units to each side of the hexagon. Its resulting perimeter would then be 360!

Chapter 3 Savings, Present Value and Ricardian Equivalence

Model Question Paper Mathematics Class XII

The force between electric charges. Comparing gravity and the interaction between charges. Coulomb s Law. Forces between two charges

CRRC-1 Method #1: Standard Practice for Measuring Solar Reflectance of a Flat, Opaque, and Heterogeneous Surface Using a Portable Solar Reflectometer

Skills Needed for Success in Calculus 1

Vector Calculus: Are you ready? Vectors in 2D and 3D Space: Review

Lesson 7 Gauss s Law and Electric Fields

Coordinate Systems L. M. Kalnins, March 2009

Valuation of Floating Rate Bonds 1

MULTIPLE SOLUTIONS OF THE PRESCRIBED MEAN CURVATURE EQUATION

FXA Candidates should be able to : Describe how a mass creates a gravitational field in the space around it.

A r. (Can you see that this just gives the formula we had above?)

4a 4ab b (count number of places from first non-zero digit to

Semipartial (Part) and Partial Correlation

On Some Functions Involving the lcm and gcd of Integer Tuples

Top K Nearest Keyword Search on Large Graphs

1240 ev nm 2.5 ev. (4) r 2 or mv 2 = ke2

Solution Derivations for Capa #8

An Efficient Group Key Agreement Protocol for Ad hoc Networks

Mechanics 1: Work, Power and Kinetic Energy

STUDENT RESPONSE TO ANNUITY FORMULA DERIVATION

Risk Sensitive Portfolio Management With Cox-Ingersoll-Ross Interest Rates: the HJB Equation

Voltage ( = Electric Potential )

Voltage ( = Electric Potential )

An Introduction to Omega

Episode 401: Newton s law of universal gravitation

Chapter 22. Outside a uniformly charged sphere, the field looks like that of a point charge at the center of the sphere.

Approximation Algorithms for Data Management in Networks

Gauss Law. Physics 231 Lecture 2-1

Experiment 6: Centripetal Force

Physics 235 Chapter 5. Chapter 5 Gravitation

AFFILIATE MEMBERSHIP APPLICATION

INITIAL MARGIN CALCULATION ON DERIVATIVE MARKETS OPTION VALUATION FORMULAS

PY1052 Problem Set 8 Autumn 2004 Solutions

Graphs of Equations. A coordinate system is a way to graphically show the relationship between 2 quantities.

Things to Remember. r Complete all of the sections on the Retirement Benefit Options form that apply to your request.

Questions & Answers Chapter 10 Software Reliability Prediction, Allocation and Demonstration Testing

How To Find The Optimal Stategy For Buying Life Insuance

Quantity Formula Meaning of variables. 5 C 1 32 F 5 degrees Fahrenheit, 1 bh A 5 area, b 5 base, h 5 height. P 5 2l 1 2w

Instructions to help you complete your enrollment form for HPHC's Medicare Supplemental Plan

12. Rolling, Torque, and Angular Momentum

Displacement, Velocity And Acceleration

CHAPTER 10 Aggregate Demand I

Lecture 16: Color and Intensity. and he made him a coat of many colours. Genesis 37:3

Carter-Penrose diagrams and black holes

Intro to Circle Geometry By Raymond Cheong

Experiment MF Magnetic Force

Spirotechnics! September 7, Amanda Zeringue, Michael Spannuth and Amanda Zeringue Dierential Geometry Project

Forces & Magnetic Dipoles. r r τ = μ B r

Exam 3: Equation Summary

Financing Terms in the EOQ Model

Chapter 4: Matrix Norms

Multiple choice questions [60 points]

NURBS Drawing Week 5, Lecture 10

Determining solar characteristics using planetary data

Database Management Systems

CHAPTER 5 GRAVITATIONAL FIELD AND POTENTIAL

The LCOE is defined as the energy price ($ per unit of energy output) for which the Net Present Value of the investment is zero.

Gravitation. AP Physics C

12.1. FÖRSTER RESONANCE ENERGY TRANSFER

How to create a default user profile in Windows 7

Chapter 2. Electrostatics

ON THE (Q, R) POLICY IN PRODUCTION-INVENTORY SYSTEMS

Multiple choice questions [70 points]

9.5 Amortization. Objectives

How To Write A Theory Of The Concept Of The Mind In A Quey

PHYSICS 111 HOMEWORK SOLUTION #13. May 1, 2013

VISCOSITY OF BIO-DIESEL FUELS

AP Physics Electromagnetic Wrap Up

est using the formula I = Prt, where I is the interest earned, P is the principal, r is the interest rate, and t is the time in years.

Chapter 3. Distribution Problems. 3.1 The idea of a distribution The twenty-fold way

Separation probabilities for products of permutations


Gravitation and Kepler s Laws Newton s Law of Universal Gravitation in vectorial. Gm 1 m 2. r 2

Deflection of Electrons by Electric and Magnetic Fields

LATIN SQUARE DESIGN (LS) -With the Latin Square design you are able to control variation in two directions.

APPLICATION AND AGREEMENT FORM FOR TELECOMMUNICATION SERVICES BUSINESS APPLICATION

Chapter 17 The Kepler Problem: Planetary Mechanics and the Bohr Atom

Capital Investment and Liquidity Management with collateralized debt.

Summary: Vectors. This theorem is used to find any points (or position vectors) on a given line (direction vector). Two ways RT can be applied:

The transport performance evaluation system building of logistics enterprises

Transcription:

Week 3-4: Pemutations and Combinations Febuay 24, 2016 1 Two Counting Pinciples Addition Pinciple Let S 1, S 2,, S m be disjoint 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 1

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 (a) without epetition, (b) with epetition allowed Count the numbe of unodeed aangements o unodeed selections of objects (a) without epetition, 2

(b) with epetition allowed A multiset M is a collection whose membes need not be distinct Fo instance, the collection M {a, a, b, b, c, d, d, d, 1, 2, 2, 2, 3, 3, 3, 3} is a multiset; and sometimes it is convenient to wite 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 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 tens 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 3

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 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 n!, ead n factoial Theoem 22 The numbe of -pemutations of an n-set equals n! P (n, ) n(n 1) (n + 1) (n )! Coollay 23 The numbe of pemutations of an n-set is n! 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 below 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 an 8-pemutation (35, 22, 7, 16, 3, 21, 11, 26) of {1, 2,, 36} Thus the answe is 36! P (36, 8) (36 8)! 36! 28! 4

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, but not next to each othe (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 eithe 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} with 89 and 6-pemutations of {1, 2, 3, 4, 5, 6, 7, 98} with 98 It follows that Ā 2(P (8, 6) P (7, 6)) Thus the answe is A P (9, 7) 2 ( P (8, 6) P (7, 6) ) 9! ( 8! 2! 2 2! 7! ) 151, 200 1! 5

The set Ā can be obtained by taking all 5-pemutations of {1, 2,, 7} fist and then by adding 89 o 98 to one of 6 positions of the 5-pemutations Then A P (9, 7) 2P (7, 5) 6 9! 2! 7! 6 151, 200 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! (n )! 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, a 1 a 2 a a a 1 a 2 a a 1 a 2 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 (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? 6

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 ( ) n the numbe of -combinations of an n-set, ead n choose Theoem 31 The numbe of -combinations of an n-set equals ( n ) n! P (n, )!(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(a 1 a 2 a a +1 a n ) {a 1, a 2,, a }, a 1 a 2 a n X Clealy, f is sujective Moeove, fo any -subset A {a 1, a 2,, a } Y, thee ae! pemutations of A and (n )! pemutations of the complement Ā Then f 1 (A) {στ : σ is a pemutation of A and τ is a pemutation of Ā} 7

Thus f 1 (A)!(n )! Theefoe ( n ) X Y!(n )! n!!(n )! Second Poof 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(a 1 a 2 a ) {a 1, a 2,, a }, a 1 a 2 a X Clealy, f is sujective Moeove, thee ae exactly! pemutations of {a 1, a 2,, a } sent to {a 1, a 2,, a } Thus ( n ) 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 ( ) 8 3 5 3 21 5 wods having exactly 3 vowels 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 ( ) 8 5 4 21 4 + 4 ( ) 8 5 5 21 3 5 Coollay 32 Fo integes n, such that n 0, ( ) ( ) n n n Theoem 33 The numbe of subsets of an n-set S equals ( n ) ( n ) ( n ) ( n + + + + 2 0 1 2 n) n 8

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 n! n 1!n 2! n k! Poof List the elements of M as 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 π 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, independently 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! n 1!n 2! n k! 9

Coollay 43 The numbe of 0-1 wods of length n with exactly ones and n zeos is equal to n! ( n )!(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 8! When the 8 ooks have diffeent colos, the answe is 8!8! (8!) 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 8! 1!3!4!, and the answe in question is 8! 8! 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 one can attack anothe equals n! n! n 1!n 2! n k! (n!) 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} 8! The numbe of 8-pemutations of {2a, 2b, 4c}: 2!2!4! 8! The the numbe of 8-pemutations of {3a, b, 4c}: 8! The numbe of 8-pemutations of {3a, 2b, 3c}: Thus the answe is 8! 2!2!4! + 8! 3!1!4! + 8! 3!2!3! 3!1!4! 3!2!3! 420 + 280 + 560 1, 260 10

5 Combinations of Multisets 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 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 an 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, {a, a, b, c, c, c, d} {b, b, b, b, d, d, d} OO O OOO O 1 2 3 4 OOOO OOO 1 2 3 4 0010100010 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 11

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} Poof Each nondeceasing sequence a 1 a 2 a with 1 a i n can be identified as an -combination {a 1, a 2,, a } (an -multiset) fom the n-set {1, 2,, n} with epetition allowed, and vice vesa 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 So the answe is 5 18 ( 22 18 ) ( 22 4 ) 43890 12