Metalworking (rec.crafts.metalworking) Discuss various aspects of working with metal, such as machining, welding, metal joining, screwing, casting, hardening/tempering, blacksmithing/forging, spinning and hammer work, sheet metal work.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 56
Default Math help needed.

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.
  #2   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,620
Default 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.


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.

* How unique you are if you have N 2 balls is another matter. 0 and 2
cover most of the population, 1 a small but significant fraction, but for
N 2 there is a sharply diminishing proportion -- at N 5 you're well
past "unusual" and into "astonishing" or perhaps even "frighteningly
pitiful".

--
www.wescottdesign.com
  #3   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 2
Default Math help needed.

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.

i

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.

* How unique you are if you have N 2 balls is another matter. 0 and 2
cover most of the population, 1 a small but significant fraction, but for
N 2 there is a sharply diminishing proportion -- at N 5 you're well
past "unusual" and into "astonishing" or perhaps even "frighteningly
pitiful".

  #4   Report Post  
Posted to rec.crafts.metalworking
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
  #5   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 257
Default 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


  #6   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,648
Default Math help needed.

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.

  #7   Report Post  
Posted to rec.crafts.metalworking
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
  #8   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 56
Default Math help needed.

On 7/11/2015 11:59 PM, 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.



That's the formula I was trying to suss out. Thanks.




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.


I've done the screaming. G The circular part is just secondary
curiosity. Still working on the algorithm for the combinations. The
application is for a slot car track program I'm working on, just because
I can. Not going to market it, just personal curiosity.






* How unique you are if you have N 2 balls is another matter. 0 and 2
cover most of the population, 1 a small but significant fraction, but for
N 2 there is a sharply diminishing proportion -- at N 5 you're well
past "unusual" and into "astonishing" or perhaps even "frighteningly
pitiful".


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Math help :-) The Medway Handyman UK diy 36 July 30th 13 11:40 PM
Do the math Steve B[_4_] Metalworking 2 March 2nd 10 08:27 AM
Math help needed - triangle.jpg John Woodworking Plans and Photos 9 June 21st 08 06:52 AM
Let's try to do the math Ignoramus5114 Metalworking 6 October 21st 07 07:08 AM
I need a little bit of math help. Modat22 Metalworking 11 May 4th 05 04:16 PM


All times are GMT +1. The time now is 05:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"