powerset Questions
1
Solved
A small application that I have written allows a user to add various items to two arrays. Some logic calculates a figure from the contents of each array.
Any items in array x can be placed into ar...
Chagres asked 26/3, 2013 at 22:52
1
Solved
I'm trying to generate the powerset of a set and I wrote this code. The problem is, when user enter two similar member of the set it dosen't work properly. What can I do?
Here is my code:
#includ...
3
Solved
I'm trying to find the n-th set in a powerset. By n-th I mean that the powerset is generated in the following order -- first by the size, and then, lexicographically --, and so, the indices of the ...
2
Solved
I'm trying to write a method that will compute all permutations of a power set where order matters. I believe these are called "arrangements." What I mean by this is:
{a} -> {{a}, {}}
{a,b} -&g...
Crosswise asked 18/6, 2012 at 17:52
3
Solved
I would like to generate a powerset of a rather big set (about 30-50 elements) and I know that it takes 2^n to store the powerset.
Is it possible to generate one subset at a time?
I.e. generate ...
1
Solved
I was looking at Data.Set, and I found out that it has no powerset function. Why?
I can implement it like this:
import Data.Set (Set, empty, fromList, toList, insert)
powerset :: (Ord a) => S...
3
Solved
I have an algorithm to compute the powerset of a set using all of the bits between 0 and 2^n:
public static <T> void findPowerSetsBitwise(Set<T> set, Set<Set<T>> results){
...
Uninstructed asked 21/5, 2011 at 21:30
6
Is there some equivalent library or function that will give me the next combination of a set of values like next_permutation in does for me?
Longspur asked 21/4, 2010 at 18:22
© 2022 - 2024 — McMap. All rights reserved.