Описание тега cartesian-product
The Cartesian product, named after René Descartes, of two sets A and B is the set of all ordered pairs ab, where a is element of A and b is element of B.
The Cartesian product, named after René Descartes, of two sets A and B is the set of all ordered pairs ab, where a is element of A and b is element of B.
The Cartesian product of two or more sets is the Cartesian product of the Cartesian product of n-1 sets with the nth set.
Example:
3 sets: {a,b,c}, {1,2}, {S,T}
Cartesian product: a1S a1T a2S a2T b1S b1T b2S b2T c1S c1T c2S c2T
The Cartesian product of a set and the empty set
is the empty set.
The size of the Cartesian product of two sets of size A and B is A*B.
Notation:
A X B := {(a, b) | a ∈ A, b ∈ B}