A sequence of objects is a list of these objects in some order. We usually designate a sequence by writing the list within parenthesis. For example, the sequence 7,21,57 would be written: (7,21,57).
order
The order doesn't matter in /sets, but in a sequence it does. Hence (7,21,57) is not the same as (57,7,21). Similarly, repition does matter in a sequence, but it doesn't matter in a set. Thus (7,7,21,57) if different from both of the other sequences.
infinite or finite
Sequences may be finite or infinite. Finite sequences are called tuples. A
sequence with k
elements is called a k-tuple
. This (7,21,57) is a 3-tuple
.
A 2-tuple
is also known as an ordered pair.
recursion
Sets and sequences may appear as elements of other sets and sequences. For
example, the power set of A is the set of all subsets of A. If A is the set
{0,1}
then the power set is {∅, {0}, {1}, {0,1}}
. The set of all ordered
pairs whose elements are 0s and 1s is {(0,0), (0,1), (1,0), (1,1)}.
If A and B are two sets, the Cartesian product or cross product of A and B, written A * B, is the set of all ordered pairs wherein the first element member of A is the second element member of B.
If A = {1,2} and B = {x,y,z} then
A * B = {(1,x), (1,y), (1,z), (2,x), (2,y), (2,z)}
We can also take the Cartesian product of k sets, A₁ * A₂ * ··· * Aₖ. It is the set consisting of all k-tuples (a₁, a₂, ..., aₖ) where aᵢ ∈ Aᵢ.
If A = {1,2} and B = {x,y,z} then
A * B * A = {(1,x,1), (1,x,2),
(1,y,1), (1,y,2),
(1,z,1), (1,z,2),
(2,x,1), (2,x,2),
(2,y,1), (2,y,2),
(2,z,1), (2,z,2)}
The set ℕ² equals ℕ * ℕ. It consists of all ordered pairs of natural numbers. We could also write it as {(i,j)|i,j ≥ 1}.