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:

Cardinality Calculator

Cardinality

Function: cardinality (<a>) Returns the number of distinct elements of the set <a>.

cardinality ignores redundant elements even when simplification is disabled.

Examples:

          (%i1) cardinality ({});
          (%o1)                           0
          (%i2) cardinality ({a, a, b, c});
          (%o2)                           3
          (%i3) simp : false;
          (%o3)                         false
          (%i4) cardinality ({a, a, b, c});
          (%o4)                           3

(%o1)                                true
(%i2) 

Cardinality Example

Related Examples

cardinality-every-integer_partitions-lambda-primep-subset

xprimep(x) := (x <...

d: subset (integer_pa...

cardinality (d);

Calculate

cardinality-false-simp

cardinality ({{{1}}});

cardinality ({a, a, ...

simp : false;

Calculate

cardinality-false-simp

cardinality ({});

cardinality ({a, a, ...

simp : false;

Calculate

cardinality-false-simp

cardinality ({});

cardinality ({a, a, ...

simp : false;

Calculate

cardinality-false-simp

cardinality ({});

cardinality ({null, ...

simp : false;

Calculate

cardinality-false-simp

cardinality ({{1,2,3}...

cardinality ({a, a, ...

simp : false;

Calculate

cardinality-false-simp

cardinality ({0,1,{0,...

cardinality ({0,1,{0...

simp : false;

Calculate

cardinality-simp-true

simp : true;

cardinality ({});

Calculate

cardinality-false-simp

cardinality ({2,3,{4,...

cardinality ({a, a, ...

simp : false;

Calculate

cardinality-false-simp

cardinality ({});

cardinality ({{x}});

simp : false;

Calculate