Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Powerset Calculator

Powerset

Function: powerset (<a>)

powerset ({a, b, c});
 powerset ({w, x, y, z}, 4);
 powerset ({w, x, y, z}, 3);
 powerset ({w, x, y, z}, 2);
 powerset ({w, x, y, z}, 1);
 powerset ({w, x, y, z}, 0);

Function: powerset (<a>, <n>) Returns the set of all subsets of <a>, or a subset of that set.

powerset(<a>) returns the set of all subsets of the set <a>. powerset(<a>) has 2^cardinality(<a>) members.

powerset(<a>, <n>) returns the set of all subsets of <a> that have cardinality <n>.

powerset complains if <a> is not a literal set, or if <n> is not a nonnegative integer.

Examples:

          (%i1) powerset ({a, b, c});
          (%o1) {{}, {a}, {a, b}, {a, b, c}, {a, c}, {b}, {b, c}, {c}}
          (%i2) powerset ({w, x, y, z}, 4);
          (%o2)                    {{w, x, y, z}}
          (%i3) powerset ({w, x, y, z}, 3);
          (%o3)     {{w, x, y}, {w, x, z}, {w, y, z}, {x, y, z}}
          (%i4) powerset ({w, x, y, z}, 2);
          (%o4)   {{w, x}, {w, y}, {w, z}, {x, y}, {x, z}, {y, z}}
          (%i5) powerset ({w, x, y, z}, 1);
          (%o5)                 {{w}, {x}, {y}, {z}}
          (%i6) powerset ({w, x, y, z}, 0);
          (%o6)                         {{}}

(%o1)                                true
(%i2) 

Powerset Example

Related Examples

powerset

powerset ({{}, {{}}});

Calculate

powerset

powerset( powerset (p...

Calculate

powerset

powerset ({1}, {1,2});

Calculate

powerset

B : {{},a,{}};

powerset(B);

Calculate

powerset

powerset ({1,2,3,4,5});

Calculate

powerset

powerset ({{}, {{}, {...

Calculate

powerset

powerset ({a, {b, c}});

powerset ({w, x, y, ...

powerset ({w, x, y, ...

Calculate

powerset

powerset ({a, b, c});

powerset ({w, x, y, ...

powerset ({w, x, y, ...

Calculate

powerset

powerset ({},{{}});

Calculate

powerset

powerset ({{},{1}});

Calculate