|Syntactic Confectionery Delight|
Re: Multiple Combinatoricsby BrowserUk (Pope)
|on Apr 15, 2012 at 11:14 UTC||Need Help??|
Update: My sets can overlap too. For exmaple I may have 4 sets like '0..7','1-6', '6-12',and '3..9'.
You don't say how many from each of those four sets, so I did 2 from each, but it should be obvious where to change the numbers supplied to permuteSets for different requirements.
The following runs in 1.7MB and takes a few seconds for wc -l to count the results:
I also need to eliminate duplicate items. In the case of overlapping sets, every resulting row should satisfy the initial condition.
I don't suppose you'd care to describe the application?
AFAIK, there in no combinatorics algorithm that would address those requirements, so it is going to be a post-production step and is left as a exercise.
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.