Re: Powerset operation: how?
- To: mathgroup at smc.vnet.net
 - Subject: [mg45586] Re: Powerset operation: how?
 - From: Roland Franzius <roland.franzius at uos.de>
 - Date: Fri, 16 Jan 2004 06:05:01 -0500 (EST)
 - Organization: Universitaet Hannover
 - References: <bu2odb$jf9$1@smc.vnet.net>
 - Sender: owner-wri-mathgroup at wolfram.com
 
see.address at post.sig wrote:
> How should I code efficiently the powerset of a (small) set represented by a
> list?
> 
> A search on Wolfram site turned out nothing useful, but I'm quite sure
> somebody has done it already.
Three or more functions atre provided by
<< "DiscreteMath`Combinatorica`"
Sort[GrayCode[{1, 2, 3}], Length[#1] < Length[#2] & ]
Sort[Subsets[{1, 2, 3}], Length[#1] < Length[#2] & ]
BinarySubsets[{1, 2, 3}]
-- 
Roland Franzius