From Wikipedia, the free encyclopedia
This article is about the mathematical concept. For the musical term, see Tuplet. For the achievement in Football, see The Quintuple.
In mathematics, a tuple is a sequence (or ordered list) of finite length. An n-tuple is a tuple with n elements.
Tuples are usually written by listing the elements within parenthesis '()' and separated by commas; for example, (2, 7, 4, 1, 7) denotes a 5-tuple. Sometimes other delimiters are used, such as brackets '[]' or angle parentheses '
'. (However, braces '{}' are almost never used for tuples, as they are the standard notation for sets.)
Tuples are often used to describe other mathematical objects. In algebra, for example, a ring is commonly defined as a 3-tuple (E,+,×), where E is some set, and '+','×' are functions from E×E to E with specific properties.
[edit]
The term originated as an abstraction of the sequence: single, double, triple, quadruple, quintuple, n-tuple. A 2-tuple is called a pair; a 3-tuple is a triple or triplet. The n can be any nonnegative integer. For example, a complex number can be represented as a 2-tuple, and a quaternion can be represented as a 4-tuple. Further constructed names are possible, such as octuple, but many mathematicians find it quicker to write "8-tuple", even if still pronouncing this "octuple".
Although the word tuple was taken as an apparent suffix of some of the names for tuples of specific length, such as quintuple, this is based on a false analysis. The word quintuple comes from Latin quintuplex, which should be analyzed as quintu-plex, in which the suffixplex comes from plicare "to fold", from which also English ply (and hence also the calque fivefold).
[edit]
An empty tuple is also called a unit in type theory.
[edit]
[edit]
The main properties that distinguish a tuple from, for example, a set are that
Note that (1) distinguishes it from an ordered set and that (2) distinguishes it from a multiset. This is often formalized by giving the following rule for the identity of two n-tuples:
(a1, a2, …,an) = (b1, b2, …, bn) if and only if a1 = b1, a2 = b2, …, and an = bn.
[edit]
An n-tuple can also be regarded as a function whose domain is the natural numbers { 1, 2, …, n } (or { 0, 1, …, n-1 }); that is, a set of index-element pairs:
(a1, a2, …,an) ≡ { (1, a1), (2, a2), … (n, an) }
or
(a0, a1, …,an−1) ≡ { (0, a0), (1, a1), … (n−1, an−1) }.
[edit]
Another way of formalizing tuples is as nested ordered pairs. Namely,
Thus, for example, the tuple (3, 5, 3) would be the same as (3,(5,(3,Ø))).
This definition mirrors the most common representation of tuples as linked lists — as used, for example, in standard implementations of the Lisp programming language.
A variant of this definition starts "peeling off" elements from the other end:
(a1, a2, …, an) = ((a1, a2, …, an-1), an).
Thus, for example, the tuple (3, 5, 3) would be the same as (((Ø,3),5),3).
[edit]
Using Kuratowski's representation for an ordered pair, the second definition above can be reformulated in terms of pure set theory as:
In this formulation, the tuple (3, 5, 3) would be
{ { (3, 5) }, { (3, 5), 3 } } =
{ { { { (3) }, { (3), 5 } } }, { { { (3) }, { (3), 5 } }, 3 } } =
{ { { { { { Ø }, { Ø, 3 } } }, { { { Ø }, { Ø, 3 } }, 5 } } }, { { { { { Ø }, { Ø, 3 } } }, { { { Ø }, { Ø, 3 } }, 5 } }, 3 } }
[edit]
In database theory, the relational model extends the definition of a tuple to associate a distinct name with each component.[1] A tuple in the relational model is formally defined as a finite function that maps field names to values, rather than a sequence, so its components may appear in any order.
Its purpose is the same as in mathematics, that is, to indicate that an object consists of certain components, but the components are identified by name instead of position, which often leads to a more user-friendly and practical notation, for example:
( player : "Harry", score : 25 )
Tuples are typically used to represent a row in a database table or a proposition; in this case, there exists a player "Harry" with a score of 25.
[edit]
[edit]
[edit]