Math help needed.
On Sat, 11 Jul 2015 23:29:00 -0400, Steve Walker wrote:
Can't seem to figure out an answer. Permutation/combination stuff.
Suppose I have n red balls, x yellow balls, y green balls, and z orange
balls. (no blue. G) I need a formula for how many unique ways there
are to arrange them. Even better would be a formula for how many unique
ways to arrange them on the perimeter of a circle, so that no pattern
can be duplicated by rotating the circle. Extra credit for a link to an
algorithm to generate the patterns. Racking my brain, and Googling for
the last week.
Tim Wescott showed a correct technique for the first part of your
question (the number of unique ways to arrange the balls in a line)
for three colors of balls, with answer (x+y+z)! / (x! y! z!).
For four colors of balls, with n, x, y, and z members respectively,
the count is (n+x+y+z)! / (n! x! y! z!).
For the number of unique ways to arrange them on a circle, see wikipedia
at https://en.wikipedia.org/wiki/Necklace_%28combinatorics%29
--
jiw
|