Welcome to roadstat.com on July 6 2009.
This is an internet experiment running to monitor browsing habbits of individuals through wikipedia contents.

Tuple

From Wikipedia, the free encyclopedia

  (Redirected from Tuples)
Jump to: navigation, search

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 within parenthesis. For example, (2, 7, 4, 1, 7) is a 5-tuple.

Tuples are often used to describe mathematical objects that consist of specified components. For example, a graph is commonly defined as the 2-tuple (V, E) where V is the set of vertices and E is the set of edges. The edge set E is a subset of the cartesian product V × V, hence a set of 2-tuples.

Contents

[edit] Names of tuples

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 suffix plex comes from plicare "to fold", from which also English ply (and hence also the calque fivefold).

[edit] Names for tuples of specific length

  • 0: Empty tuple
  • 1: Single; Singleton
  • 2Pair/Double
  • 3Triple/Triplet
  • 4Quadruple
  • 5: Quintuple / Pentuple
  • 6: Sextuple / Hextuple
  • 7: Septuple
  • 8: Octuple
  • 9: Nonuple
  • 10: Decuple
  • 11: Undecuple / Hendecuple
  • 12: Duodecuple
  • 100: Centuple

An empty tuple is also called a unit in type theory.

[edit] Formal definitions

The main properties that distinguish a tuple from, for example, a set are that

  1. it can contain an object more than once;
  2. the objects appear in a certain order;
  3. it has finite size.

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) ↔ a1 = b1, a2 = b2, …, an = bn.

Since a n-tuple is indexed by the numbers 1…n (or 0…n-1), it can be regarded as a function from a subset of :

(a1, a2, …,an) ≡ fa: ℕn → A: iai.

Another way of formalizing tuples is by mapping them to more primitive constructs in set theory such as ordered pairs. For example, an n-tuple (with n > 2) can be defined as an ordered pair of its first entry and an (n−1)-tuple containing the remaining entries:

(a1, a2, …, an) = ((a1, a2, …, an-1), an).

Using the usual set-theoretic definition of an ordered pair, this results in the following inductive definition:

  1. the 1-tuple (i.e. the empty tuple) is represented by a single element a
  2. if x is an n-tuple then {{x}, {x,a}} is an (n + 1)-tuple.

Using this definition, (1, 2, 2) would be

((1,2), 2) = ({{1}, {1,2}}, 2) = { { {{1}, {1,2}} }, { {{1}, {1,2}}, 2 } }

There is an important similarity here with the way Lisp originally used the ordered pair abstraction to inductively create all of its n-tuple and list structures:

  1. a special symbol NIL represents the empty list;
  2. if X is a list and A an arbitrary value then the pair (A X) represents a list with the head (i.e. first element) A and the tail (i.e. the remainder of the list without the head) X.

[edit] Relational model

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] See also

[edit] References

  1. ^ R Rramakrishnan, J Gehrke. Database Management Systems, 3rd edition. 2003.

[edit] External links

Personal tools

Visit joltnews for the latest headlines
Visit bloit.com for company information
Geed Media does computer consulting on long island.
This page viewed times. See Logs