Power set: Difference between revisions

Content added Content deleted
(Fixed bug with the powerset of larger sets returning duplicate subsets due to the edit in place semantics of append())
m (added whitespace around a link.)
Line 2: Line 2:
{{omit from|GUISS}}
{{omit from|GUISS}}


A [[set]] is a collection (container) of certain values,
A   [[set]]   is a collection (container) of certain values,
without any particular order, and no repeated values.
without any particular order, and no repeated values.

It corresponds with a finite set in mathematics.
It corresponds with a finite set in mathematics.

A set can be implemented as an associative array (partial mapping)
A set can be implemented as an associative array (partial mapping)
in which the value of each key-value pair is ignored.
in which the value of each key-value pair is ignored.


Given a set S, the [[wp:Power_set|power set]] (or powerset) of S, written P(S), or 2<sup>S</sup>, is the set of all subsets of S.<br />
Given a set S, the [[wp:Power_set|power set]] (or powerset) of S, written P(S), or 2<sup>S</sup>, is the set of all subsets of S.