View Single Post
  #7   Report Post  
Posted to rec.crafts.metalworking
Tim Wescott Tim Wescott is offline
external usenet poster
 
Posts: 1,620
Default Math help needed.

On Sun, 12 Jul 2015 13:31:37 +0000, Doug Miller wrote:

Ignoramus10431 wrote in
news
On 2015-07-12, Tim Wescott wrote:
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.

If you had N = x + y + z unique balls*, then there would be N! (N
factorial) ways to arrange them. Within the yellow balls, there would
be x! unique ways to arrange them, but you lose that. Ditto green and
orange.

So there are

((x+y+z)!) / ((x!)(y!)(z!))

unique ways to arrange the balls in a line.


This is correct.


No, it's not. The OP has a total of K = n + x + y + z balls in *four*
different colors.


Whoops -- I missed that. Please don't ask me how.

choices = K! / ((n!)(x!)(y!)(z!))

Eliminating the circularly symmetric possibilities is still a bitch.

--
www.wescottdesign.com