Re: string combination script?
- From: "John Coleman" <jcoleman@xxxxxxxxxxxxxx>
- Date: 9 Dec 2006 09:17:07 -0800
John Coleman wrote:
(snip)
For reasons unrelated to
this thread I had recently wanted an algorithm that would iterate
through all ways to partition a set of around 30 items into 3 disjoint
subsets. My initial algorithm wasn't very efficient, so when I
recognized the problem as being one of multiset permutations ...
This is a slight mistatement. I was looking at iterating over such
things when the size of the 3 subsets was fixed. Say you want to
paritition 30 elements into 3 sets of size 10. One way to code such a
thing is by a string like "aabaccbaa...ab" where you have 10 a's, 10
b's and 10 c's. Then each distinguishable permutation corresponds to a
unique partition and vice versa.
.
- References:
- string combination script?
- From: JW
- Re: string combination script?
- From: Nicholas M. Makin
- Re: string combination script?
- From: Nicholas M. Makin
- Re: string combination script?
- From: John Coleman
- Re: string combination script?
- From: John Coleman
- Re: string combination script?
- From: Dr J R Stockton
- Re: string combination script?
- From: John Coleman
- string combination script?
- Prev by Date: Re: Script to close open files in a folder?
- Next by Date: Re: Call remote vbscript
- Previous by thread: Re: string combination script?
- Next by thread: Re: string combination script?
- Index(es):
Relevant Pages
|