# GetWiki

*power set*

ARTICLE SUBJECTS

being →

database →

ethics →

fiction →

history →

internet →

language →

linux →

logic →

method →

news →

policy →

purpose →

religion →

science →

software →

truth →

unix →

wiki →

ARTICLE TYPES

essay →

feed →

help →

system →

wiki →

ARTICLE ORIGINS

critical →

forked →

imported →

original →

power set

[ temporary import ]

**please note:**

- the content below is remote from Wikipedia

- it has been imported raw for GetWiki

*x*,

*y*,

*z*} ordered with respect to inclusion.]]In mathematics, the

**power set**(or

**powerset**) of any set {{mvar|

*S*}} is the set of all subsets of {{mvar|

*S*}}, including the empty set and {{mvar|S}} itself, variously denoted as {{mathcal|P}}({{mvar|S}}), ð’«({{mvar|

*S*}}), â„˜({{mvar|

*S*}}) (using the "Weierstrass p"), {{math|

*P*(

*S*)}}, {{math|â„™(

*S*)}}, or, identifying the powerset of {{mvar|

*S*}} with the set of all functions from {{mvar|

*S*}} to a given set of two elements, {{math|2

*S*}}. In axiomatic set theory (as developed, for example, in the ZFC axioms), the existence of the power set of any set is postulated by the axiom of power set.{{harvnb|Devlin|1979|page=50}}Any subset of {{mathcal|P}}({{mvar|S}}) is called a

*family of sets*over {{mvar|

*S*}}.

## Example

If {{mvar|S}} is the set {{math|{{mset|*x*,

*y*,

*z*}}}}, then the subsets of {{mvar|S}} are

- {{math|{{mset}}}} (also denoted varnothing or empty, the empty set or the null set)
- {{math|{{mset|
*x*}}}} - {{math|{{mset|
*y*}}}} - {{math|{{mset|
*z*}}}} - {{math|{{mset|
*x*,*y*}}}} - {{math|{{mset|
*x*,*z*}}}} - {{math|{{mset|
*y*,*z*}}}} - {{math|{{mset|
*x*,*y*,*z*}}}}

*x*}},{{mset|

*y*}},{{mset|

*z*}},{{mset|

*x*,

*y*}},{{mset|

*x*,

*z*}},{{mset|

*y*,

*z*}},{{mset|

*x*,

*y*,

*z*}}}}}}.{{harvnb|Puntambekar|2007|pages=1â€“2}}

## Properties

If {{mvar|*S*}} is a finite set with {{math|1={{!}}

*S*{{!}} =

*n*}} elements, then the number of subsets of {{mvar|

*S*}} is {{math|1={{!}}{{mathcal|P}}(

*S*){{!}} = 2

*n*}}. This fact, which is the motivation for the notation {{math|2

*S*}}, may be demonstrated simply as follows,

First, order the elements of {{mvar|S}} in any manner. We write any subset of {{mvar|

Cantor's diagonal argument shows that the power set of a set (whether infinite or not) always has strictly higher cardinality than the set itself (informally the power set must be larger than the original set). In particular, Cantor's theorem shows that the power set of a countably infinite set is uncountably infinite. The power set of the set of natural numbers can be put in a one-to-one correspondence with the set of real numbers (see Cardinality of the continuum).The power set of a set {{mvar|*S*}} in the format {{math|{Î³1, Î³2, ..., Î³*n*}}} where {{math|Î³i , 1 â‰¤*i*â‰¤*n*}}, can take the value of {{math|0}} or {{math|1}}. If {{math|1=Î³*i*= 1}}, the {{mvar|i}}-th element of {{mvar|*S*}} is in the subset; otherwise, the {{mvar|i}}-th element is not in the subset. Clearly the number of distinct subsets that can be constructed this way is {{math|2*n*}} as {{math|Î³*i*âˆˆ {0, 1} }}.*S*}}, together with the operations of union, intersection and complement can be viewed as the prototypical example of a Boolean algebra. In fact, one can show that any

*finite*Boolean algebra is isomorphic to the Boolean algebra of the power set of a finite set. For

*infinite*Boolean algebras this is no longer true, but every infinite Boolean algebra can be represented as a subalgebra of a power set Boolean algebra (see Stone's representation theorem).The power set of a set {{mvar|

*S*}} forms an abelian group when considered with the operation of symmetric difference (with the empty set as the identity element and each set being its own inverse) and a commutative monoid when considered with the operation of intersection. It can hence be shown (by proving the distributive laws) that the power set considered together with both of these operations forms a Boolean ring.

## Representing subsets as functions

In set theory, {{math|*X*

**'Y****}}**

**is the set of all functions from {{mvar|Y}} to {{mvar|X}}. As "2" can be defined as {{math|{{mset|0,1}}}} (see natural number), {{math|2**

*S*}} (i.e., {{math|{{mset|0,1}}*S*}}) is the set of all functions from {{mvar|*S*}} to {0,1}. By identifying a function in {{math|2*S*}} with the corresponding preimage of {{math|1}}, we see that there is a bijection between {{math|2*S*}} and {{mathcal|P}}({{mvar|S}}), where each function is the characteristic function of the subset in {{mathcal|P}}({{mvar|S}}) with which it is identified. Hence {{math|2*S*}} and {{mathcal|P}}({{mvar|S}}) could be considered identical set-theoretically. (Thus there are two distinct notational motivations for denoting the power set by {{math|2*S*}}: the fact that this function-representation of subsets makes it a special case of the {{math|*X**'Y*}} notation and the property, mentioned above, that {{math|1={{abs|2

*S*}} = 2{{abs|

*S*}}}}.)This notion can be applied to the example above in which {{math|1=

*S*= {{mset|

*x*,

*y*,

*z*}}}} to see the isomorphism with the binary numbersfrom 0 to {{math|2

*n*âˆ’ 1}} with {{mvar|n}} being the number of elements in the set.In {{mvar|

*S*}}, a "1" in the position corresponding to the location in the enumerated set {{math|1={{mset| (

*x*, 0), (

*y*, 1), (

*z*, 2) }}}} indicates the presence of the element. So {{math|1={{mset|

*x*,

*y*}} = 011(2)}}.For the whole power set of {{mvar|

*S*}} we get:{|class="wikitable"!scope="col"| Subset!scope="col"| Sequence of digits!scope="col"| Binary interpretation!scope="col"| Decimal equivalent

1={{mset | 0, 0, 0}} | {{math | 0(10)}} |

1={{mset | x }} }} > | 0, 0, 1}} | {{math | 1(10)}} |

1={{mset | y }} }} > | 0, 1, 0}} | {{math | 2(10)}} |

1={{mset | x, y }} }} > | 0, 1, 1}} | {{math | 3(10)}} |

1={{mset | z }} }} > | 1, 0, 0}} | {{math | 4(10)}} |

1={{mset | x, z }} }} > | 1, 0, 1}} | {{math | 5(10)}} |

1={{mset | y, z }} }} > | 1, 1, 0}} | {{math | 6(10)}} |

1={{mset | x, y, z }} }} > | 1, 1, 1}} | {{math | 7(10)}} |

*S*to integers is arbitrary, so this representation of subsets of

*S*is not unique, but the sort order of the enumerated set does not change its cardinality.However, such finite binary representation is only possible if

*S*can be enumerated (this is possible even if

*S*has an infinite cardinality, such as the set of integers or rationals, but not for example if

*S*is the set of real numbers, in which we cannot enumerate all irrational numbers to assign them a defined finite location in an ordered set containing all irrational numbers).

## Relation to binomial theorem

The power set is closely related to the binomial theorem. The number of subsets with {{mvar|k}} elements in the power set of a set with {{mvar|n}} elements is given by the number of combinations, {{math|C(*n*,

*k*)}}, also called binomial coefficients.For example, the power set of a set with three elements, has:

- C(3, 0) = 1 subset with 0 elements (the empty subset),
- C(3, 1) = 3 subsets with 1 element (the singleton subsets),
- C(3, 2) = 3 subsets with 2 elements (the complements of the singleton subsets),
- C(3, 3) = 1 subset with 3 elements (the original set itself).

## Algorithms

If {{mvar|S}} is a finite set, there is a recursive algorithm to calculate {{mathcal|P}}({{mvar|S}}).Define the operation {{math|1={{mathcal|F}} (*e*,

*T*) = {

*X*âˆª {

*e*} {{!}}

*X*âˆˆ

*T*}}}.In English, return the set with the element {{mvar|e}} added to each set {{mvar|X}} in {{mvar|T}}.

- If {{math|1=
*S*= { } }}, then {{math|1={{mathcal|P}}({{mvar|S}}) = { { } } }} is returned. - Otherwise:

*Let {{mvar|e}} be any single element of {{mvar|S}}.
*Let {{math|1=

In words: The power set of the empty set is the set containing only the empty set and the power set of any other set is all the subsets of the set containing some specific element and all the subsets of the set not containing that specific element.The following is a Python (programming language) | Python]] implementation of the above algorithm as used for lists (note that such lists, opposed to sets, may also hold duplicated enties):Verbose:def p(s):
*T*=*S*{*e*} }} be the set {{mvar|S}} with element {{mvar|e}} excluded (a relative complement of the singleton {{math|{*e*} }} in {{mvar|S}}). *And the result: {{math|1={{mathcal|P}}(*S*) = {{mathcal|P}}(*T*) âˆª {{mathcal|F}} (*e*, {{mathcal|P}}(*T*))}} is returned.
if s==[]: # base case

return [s] # if s is empty, then the only sublist of s is s itself

else:

e = s[0] # any element from s (in this implementation, we choose the first element)

t = s[1:] # s with e removed

pt = p(t) # the list of all sublists of t (note that this is a recursive call)

fept = [x + [e] for x in pt] # pt with e appended to each sublist

return pt + fept # the concatenation of all constructed sublists

return [s] # if s is empty, then the only sublist of s is s itself

else:

e = s[0] # any element from s (in this implementation, we choose the first element)

t = s[1:] # s with e removed

pt = p(t) # the list of all sublists of t (note that this is a recursive call)

fept = [x + [e] for x in pt] # pt with e appended to each sublist

return pt + fept # the concatenation of all constructed sublists

- example:

( return p(s[1:]) + [x + [s[0) for x in p(s[1:])] if s else [s]

## Subsets of limited cardinality

The set of subsets of {{mvar|*S*}} of cardinality less than or equal to {{math|Îº}} is sometimes denoted by {{math|{{mathcal|P}}Îº(

*S*)}} or {{math|[

*S*]Îº}}, and the set of subsets with cardinality strictly less than {{math|Îº}} is sometimes denoted {{math|{{mathcal|P}}< Îº(

*S*)}} or {{math|[

*S*]

**- content above as imported from Wikipedia**

- "

- time: 7:06am EDT - Sun, Aug 18 2019

- "

__power set__" does not exist on GetWiki (yet)- time: 7:06am EDT - Sun, Aug 18 2019

[ this remote article is provided by Wikipedia ]

LATEST EDITS [ see all ]

GETWIKI 09 JUL 2019

GETWIKI 09 MAY 2016

GETWIKI 18 OCT 2015

GETWIKI 20 AUG 2014

GETWIKI 19 AUG 2014

© 2019 M.R.M. PARROTT | ALL RIGHTS RESERVED