Counting Formulae Formulae (w/o Repetition) You are given a set with ๐ distinct objects. See: Rosen, Section XX Brualdi, Sections XX a (full) Permutation: an ordering of all of the ๐ objects There are ๐! distinct arrangements of this type. a ๐-Permutation: an arrangement using ๐ of the objects There are ๐ โ (๐ − 1) โ (๐ − 2) โฏ (๐ − (๐ − 2)) โ (๐ − (๐ − 1)) = ๐! (๐ − ๐)! distinct arrangements of this type. a ๐-Combination: a selection of ๐ of the objects (order doesn’t matter) There are ๐! ๐ ( ) = ๐ถ(๐, ๐) = ๐ (๐ − ๐)! ๐! distinct combinations of this type. Formulae (with Repetition) With Unlimited Repetition: You are given a set with ๐ distinct objects. Each object may appear any # of times. See: Rosen, Section 4.6 Brualdi, Sections 3.4 and 3.5 a ๐-Permutation: an arrangement of length ๐ The answer follows directly from the multiplication principle. There are ๐๐ distinct arrangements of this type. a ๐-Combination: a selection of ๐ of the objects (order doesn’t matter) This is our “stars and bars” picture. (See the next page.) Think of a cash-drawer that uses (๐ − 1) bars to create ๐ bins (for options) There are (๐ − 1 + ๐)! (๐ − 1) + ๐ ( ) = ๐ถ(๐ − 1 + ๐, ๐) = (๐ − 1)! ๐! ๐ distinct combinations of this type. With Specified Repetition: The ๐ ๐กโ object appears ๐๐ times. The total number of objects is given by ๐ = ๐1 + ๐2 + โฏ + ๐๐ a (full) Permutation: an ordering of all of the ๐ objects If the objects were distinct, there would be ๐! distinct arrangements. However, we must use the “division principle” to account for the fact that they aren’t distinct. In the end, there are ๐! ๐1 ! ๐2 ! โฏ ๐๐ ! distinct arrangements of this type. Combinations with Repetition Our “stars and bars” presentation is counting the number of possibilities for making ๐ selections from ๐ options. For the example of ๐ = 22, ๐ = 7, one possibility would be: ***I*******I**| |****|*|***** ๐1 = 3 ๐2 = 7 ๐3 = 2 ๐4 = 0 ๐5 = 4 ๐6 = 1 ๐7 = 5 objects in the first bin objects in the second bin objects in the third bin objects in the fourth bin objects in the fifth bin objects in the sixth bin objects in the seventh bin Where we need a total of ๐ = ๐1 + ๐2 + ๐3 + ๐4 + ๐5 + ๐6 + ๐7 = 22 selections. The number of distinct ways of selecting 22 objects from 7 possibilities is: ๐ − ๐ + ๐๐ ( ) = ๐ช(๐ − ๐ + ๐๐, ๐๐) ๐๐