This is from my wife who is a high School math teacher.
ken
----- Original Message -----
From: "Mary Mirabella" <[email protected]>
To: "Ken" <[email protected]>
Sent: Thursday, July 27, 2000 6:51 PM
Subject: Math wiz
The problem is permutations of a string with repeated elements
Using factorial notation 3*2*1 can be expressed as 3! The definition of n!
where n is a nonnegative integer is: n! = (n)*(n -1)*(n -2)...3*2*1
(FYI : 1! = 1 and 0! = 1)
Calculating the permutations of a set of n objects which are not unique is
accomplished with the following formula:
Let S be a set of n elements of k different types. Let n1 = the number of
elements of type 1, n2 = the number of elements of type 2, ..., nk = the
number of elements of type k. Then the number of distinguishable
permutations of the n elements is: n! divided by the product of n1!*
n2!*...*nk!
Thus aaa will be 1, since 3! divided by 3! is 1.
Also aac SHOULD be 3, since 3! divided by the product of 2! and 1! is 3 or
(3*2*1) /(2*1*1) = 3 representing the 3 unique arrangements aac, aca, caa
Here is another example, but I won't list all the possible arrangements.
aabbbcdddd will be (10!)/(2!*3!*1!*4!) which is equal to 12600 possible
arrangements!