🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.ansi-iso
Article #7

Re: all possible combinations

#7
From: Andrew
Date: Tue, 07 Mar 2000 00:00
21 lines
1523 bytes
In article <89v8r3$vag$1@nnrp1.deja.com>,
  I wrote:
> Anyone have any pascal code for all possible combinations of a set?

Thanks to all those who replied.

I forgot the important maxim of set theory: the empty set is
a subset of all sets.  So there are 2^N subsets of N elements.

I have a recursive algorithm now that uses enumeration of
binary numbers to get all possible subsets.  Far too clever for
me to have figured it out.  But I undertand it now that I see it.

Thanks again.

- Andrew
noymer@my-deja.com


Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <8a28de$3ee$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <89v8r3$vag$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10261c,77a4248f898f7bd2
X-Google-Attributes: gid10261c,public
X-Google-Thread: 108ebd,77a4248f898f7bd2
X-Google-Attributes: gid108ebd,public
X-Google-Thread: 10c950,77a4248f898f7bd2
X-Google-Attributes: gid10c950,public
X-Google-Thread: 111659,77a4248f898f7bd2
X-Google-Attributes: gid111659,public
From: Andrew <noymer@my-deja.com>
Subject: Re: all possible combinations
Date: 2000/03/07
Message-ID: <8a28de$3ee$1@nnrp1.deja.com>
X-Deja-AN: 594146304
References: <89v8r3$vag$1@nnrp1.deja.com>
X-Http-Proxy: 1.0 x21.deja.com:80 (Squid/1.1.22) for client 63.28.72.37
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Tue Mar 07 06:42:54 2000 GMT
X-MyDeja-Info: XMYDJUIDnoymer
Newsgroups: comp.lang.pascal.ansi-iso,comp.lang.pascal.misc,borland.public.turbopascal,comp.lang.pascal.borland
X-Http-User-Agent: Mozilla/4.51 [en] (Win98; U)