# Learning Insight – Cardinality of a Mist

The total number of items (balls) in an object, no matter the color, is known formally as cardinality. Despite its sophisticated sounding title, the formula for calculating cardinality of a mist is quite simple and derivable from its definition.

A ‘mist’ is a two-level hierarchical structure:

Level 1: (Entry)j  j = 1…N (separated by comma), with each entry containing

Level 2: (Items)k   k = 1…M drawn from set of balls {white, black}

with the added restriction that each item contains the same number of balls – that is:
Cardinality (Item)a = Cardinality (Item)b

Thus, the total number of items (balls) in a mist is a sum of a sum and this double sum turns out to equal the product of the number of items in each of the individual sums.  So we have:

Total Number of Items (balls) In Mist = N x M

Which is formally called the cardinality of the mist.

Beyond calculating the outcome of two objects, we also acknowledge the process used with a fancy formal name – Cartesian Product.

But why stop at two objects such as ‘entries’ and ‘items’? The calculation process readily generalizes to any number of objects – say M, N, O, P – whose cardinality would equal M x N x O x P.

When more than two objects are involved, the process earns a more cosmopolitan designation – Tensor Product’.