efficient way to get a sufficient set of identifying attributes

Chris Angelico rosuav at gmail.com
Thu Oct 19 13:39:06 EDT 2017


On Fri, Oct 20, 2017 at 4:21 AM, Stefan Ram <ram at zedat.fu-berlin.de> wrote:
> Dennis Lee Bieber <wlfraed at ix.netcom.com> writes:
>>Interesting -- that is coming out to be 2^size - 1, which will sure speed
>>up calculation for larger sets rather than doing all the factorial stuff.
>
>   A set of size n has 2^n subsets.
>
>   We exclude the empty set for our purpose, so we end at 2^n-1.

Why is this? Simple. In each subset, each element is either there or
not-there, independently of the others. So each one is 1 bit of
information.

ChrisA



More information about the Python-list mailing list