Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Other Topics > Science, Math, and Philosophy
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-01-2005, 06:48 PM
TomCollins TomCollins is offline
Senior Member
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 172
Default Re: Enumerating Groups - Algorithm

Ideally, I want only unique permutations. So I could use that method, but with binary.
ABCDEF
000111 = DEF
001111 = CDEF

I would have to check to see if the binary representation had a different number of 1's than 3.
Reply With Quote
  #2  
Old 12-01-2005, 06:58 PM
Guest
 
Posts: n/a
Default Re: Enumerating Groups - Algorithm

Yes, that's what I meant by requiring that the checksum is 3. The only valid numbers for you are ones in which the sum of the digits is 3. That is why you have to do a little bit of combinatorics to convert from the binary number to the enumeration.

If the first 1 is in digit x (counting from the right), second 1 in digit y (again counting from the right) and third 1 is in digit z, then I think that the number in the enumeration is (x-1 choose 3) + (y-1 choose 2)+ (z-1)+1
Reply With Quote
  #3  
Old 12-01-2005, 07:07 PM
Guest
 
Posts: n/a
Default Re: Enumerating Groups - Algorithm

To go backwards, i.e. to figure out which group of 3 corresponds to n in your enumeration, find x such that (x choose 3) >= n > (x-1 choose 3), and put a 1 in digit x (counting from the right). Then find y such that (y choose 2) >= n-(x-1 choose 3) > (y-1 choose 2), and put a 1 in digit y. Find z similarly.

For n=13, (6 choose 3) >= 13 > (5 choose 3), so we put a 1 in the 6th digit from the right, i.e., we include A. (3 choose 2) = 13-(5 choose 3) > (2 choose 2), so we put a 1 in the 3rd digit from the right. (2 choose 1)= 13-(5 choose 3)-(2 choose 2)> (1 choose 1), so we put a 1 in the 2nd digit from the right, giving us the element 100110, or ADE.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.