Top "Powerset" questions

A powerset is the set of all subsets for a given set.

How to generate the power set of a set in Scala

I have a Set of items of some type and want to generate its power set. I searched the web …

scala set powerset
Time complexity of this code to list all subsets of a set?

I have found numerous solutions across the web having O(2^n) complexity. Can someone help me figure out the time …

java big-o bit-manipulation time-complexity powerset
How to do a powerset in DrRacket?

I'm using the beginning language with list abbreviations for DrRacket and want to make a powerset recursively but cannot figure …

scheme racket powerset htdp
Powerset of a set with list comprehension in Haskell

I am a complete beginner in Haskell and I have 11 exercises for homework, 10 of which I have already solved. I …

haskell recursion list-comprehension powerset
Algorithm to calculate power set (all possible subsets) of a set in R

I couldn't find an answer to this anywhere, so here's my solution. The question is: how can you calculate a …

r set powerset