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

On Sat, 11 Jul 2015 22:59:36 -0500, 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.

I'm in a different building from my statistics book; if I remember I'll
look it up and tell you the correct name for the function. For two
numbers x and y, the spoken expression is "x+y choose x" -- but I can't
remember the formal name to look up.

On finding the number of combinations that go away if you arrange them
in a circle -- I'm pretty sure that's hard. For a start, if x+y+z is
prime then there are no rotational symmetries to be had at all. Then,
if x+y+z and x are coprime, there are no rotational symmetries (or y, or
z). But if x+y+z and x do have common factors, the location of the
yellow balls in the circle does suddenly matter. It's enough to make me
run away screaming, or demand to be paid by the hour to figure it out.


If x, y and z have some lowest common denominator that is greater than
one, then there are arrangements of them around a circle that would be
symmetrical in rotation, but others that would not.

E.g., if x, y and z were all multiples of six, then there would be
arrangements of them in a circle that would not be rotationally
symmetric, would be symmetric on rotations of 180 degrees only, or 120
degrees, or 60 degrees. But putting numbers on that is still something
to make my head hurt.

--
www.wescottdesign.com