Citizendia
Your Ad Here

In mathematics, a tuple is a sequence (also known as an "ordered list") of values, called the components of the tuple. Mathematics is the body of Knowledge and Academic discipline that studies such concepts as Quantity, Structure, Space and In Mathematics, a sequence is an ordered list of objects (or events These components can be any kind of mathematical objects, where each component of a tuple is a value of a specified type. A tuple containing n components is known as an "n-tuple". For example, the 4-tuple (or "quadruple"), with components of respective types PERSON, DAY, MONTH and YEAR, could be used to record that a certain person was born on a certain day of a certain month of a certain year.

Tuples are used to describe mathematical objects that consist of specified components. For example, a directed graph is defined as a tuple (V, E) where V is the set of nodes and E is a subset of V × V that denotes the edges. In Mathematics and Computer science, a graph is the basic object of study in Graph theory. The type of the first object is "set of nodes" and the type of the second is "set of edges".

Contents

Names of tuples

The term originated as an abstraction of the sequence: single, double, triple, quadruple, quintuple, n-tuple. A tuple of length n is usually described as an 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. Complex plane In Mathematics, the complex numbers are an extension of the Real numbers obtained by adjoining an Imaginary unit, denoted Quaternions, in Mathematics, are a non-commutative extension of Complex numbers They were first described by the Irish Mathematician 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). Latin ( lingua Latīna, laˈtiːna is an Italic language, historically spoken in Latium and Ancient Rome. In Linguistics, a calque (kælk or loan translation is a Word or Phrase borrowed from another Language by Literal, word-for-word

Names for tuples of specific length

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. Mathematics For any number x: x ·1 = 1· x = x (1 is the multiplicative identity In Mathematics, a singleton is a set with exactly one element In mathematics Two has many properties in Mathematics. An Integer is called Even if it is divisible by 2 ---- In mathematics Three is the first odd Prime number, and the second smallest prime In Mathematics a triple is an n-tuple with n being 3. A triple is a sequence of three elements In mathematics Four is the smallest Composite number, its proper Divisors being and. In Mathematics, a quadruple or quadruplet is an ''n''-tuple with n being 4 This article discusses the number five. For the year 5 AD see 5. In mathematics Six is the second smallest Composite number, its proper Divisors being 1, 2 and 3. In mathematics Seven is the fourth Prime number. It is not only a Mersenne prime (since 23 &minus 1 = 7 but also a In mathematics 8 is a Composite number, its Proper divisors being 1, 2, and 4. In mathematics Nine is a Composite number, its proper Divisors being 1 and 3.

Note that (1) distinguishes it from an ordered set and that (2) distinguishes it from a multiset. Ordered set is used with distinct meanings in Order theory. A set with a Binary relation R on its elements that is reflexive (for In Mathematics, a multiset (or bag) is a generalization of a set. 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. The Mathematical concept of a function expresses dependence between two quantities one of which is given (the independent variable, argument of the function In Mathematics, a natural number (also called counting number) can mean either an element of the set (the positive Integers or an

Another way of formalizing tuples is by mapping them to more primitive constructs in set theory such as ordered pairs. In Mathematics, an ordered pair is a collection of two distinguishable objects one of which is identified as the first coordinate (or the first entry 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)). In Mathematics, an ordered pair is a collection of two distinguishable objects one of which is identified as the first coordinate (or the first entry

Using the usual set-theoretic definition of an ordered pair and letting the empty set represent the empty tuple, this results in the following inductive definition:

  1. the 0-tuple (i. In Mathematics, an ordered pair is a collection of two distinguishable objects one of which is identified as the first coordinate (or the first entry e. the empty tuple) is represented by
  2. if x is an n-tuple then {{a}, {a, x}} is an (n + 1)-tuple.

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

(1,(2,(2,))) = (1,(2, {{2}, {2, }} )) = (1, {{2}, {2, {{2}, {2, }}}} ) = {{1}, {1, {{2}, {2, {{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. Lisp (or LISP) is a family of Computer Programming languages with a long history and a distinctive fully parenthesized syntax e. first element) A and the tail (i. e. the remainder of the list without the head) X.

Usage in computer science

In computer science, tuple has three distinct meanings. Computer science (or computing science) is the study and the Science of the theoretical foundations of Information and Computation and their Typically in functional and some other programming languages, a tuple is a data object that holds several objects, similar to a mathematical tuple. In Computer science, functional programming is a Programming paradigm that treats Computation as the evaluation of mathematical functions and A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer.

The Eiffel programming language has a built-in notion of tuple. Eiffel is an ISO -standardized Object-oriented Programming language designed to enable programmers to efficiently develop extensible reusable reliable The type

  TUPLE [X, Y, Z]

has, as its values, tuples of three or more elements, of which the first is of type X, the second of type Y and the third of type Z. This can also be written with tags:

  TUPLE [tag1: X, tag2: Y, tag3: Z]

without affecting the resulting type. Such a tuple that has labels for its fields is usually called a record. In Computer science, object composition (not to be confused with function composition) is a way and practice to combine simple objects or An actual tuple, corresponding to this type, is written in bracket notation, for example

   [x1, y1, z1]

with x1 of type X etc. If t is such a tuple, its elements can be accessed, in the form using tags, as t. tag1 etc. ; they can also be set in the same way, as in t. tag2 := y2 which replaces the second element, of type Y, by y2. A value of type TUPLE [X, Y, Z] can be assigned to a variable of the same type but also to one of type TUPLE [X, Y], or TUPLE [X], or just TUPLE which covers all tuples. This is thanks to the definition that TUPLE [X, Y], for example, covers sequences of at least (rather than exactly) two elements, with the first two of the types given. Tuple types fit well in an object-oriented context, where they save writing a class when all you need is simple sequences of values with associated access and set mechanisms for each field.


The Python programming language also uses the tuple as a standard sequence data type. Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability The difference with other Python sequence types is that the tuple is immutable, once created objects inside the tuple may not be altered or have their position changed. Additonaly, objects may not be added or removed from a tuple after it has been created.

   >>> t = (12345, 54321, 'hello!')
   >>> t[0]
   12345
   >>> del t[0]
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   TypeError: 'tuple' object doesn't support item deletion


Information Modeling

With inherent Name/Value pair properties, along with a structured and ordered nature, the term 'tuple' extends readily to use in Information Modeling and Database Definition.

For example, XML-Tuples represent Name/Value tuple structures. The following is an example of an XML-Tuple

   <name>Value</name>

Field names

In some languages, and especially in database theory, a tuple is defined as a finite function that maps field names to a certain value. Database theory encapsulates a broad range of topics related to the study and research of the theoretical realm of Databases and Database management systems Theoretical Its purpose is the same as in mathematics, namely to indicate that a certain entity or object consists of certain components and/or has certain properties, but here these components are identified by a unique field name and not by a position, which often leads to a more user-friendly notation. The general term for this construct is an associative array; other programming languages have yet other names for the concept. An associative array (also associative container, map, mapping, hash, dictionary, finite map, and in query-processing an

A small example of a tuple would be:

( player : "Harry", score : 25 )

which is a function that maps the field name "player" to the string "Harry" and the field name "score" to the number 25. Note that the order of the components is not relevant, so the same tuple can also be written as:

( score : 25, player : "Harry" )

In the relational model such tuples are typically used to represent a single proposition; in this case there exists a player with the name "Harry" and a score of 25.

In programming languages, tuples are used to form data structures. For example, the following could be a structure that represents a node in a doubly linked list:

( value : 16, previous-node : 1174782, next-node : 1174791 )

See also

External links

In Computer science, a linked list is one of the fundamental Data structures and can be used to implement other data structures Cartesian square redirects here For Cartesian squares in Category theory, see Cartesian square (category theory. A formal language is a set of words, ie finite strings of letters, or symbols. In Computer science, Linda is a model of coordination and communication among several parallel processes operating upon objects stored in and retrieved from shared virtual Multidimensional Expressions (MDX is a Query language for OLAP Databases much like SQL is a query language for Relational databases This article sets out the set-theoretic notion of relation For a more elementary point of view see Binary relations and Triadic relations The Tuple Calculus is a calculus that was introduced by Edgar F A unit type is a mathematical type that allows only one value (and thus can hold no information In Logic, Mathematics, and Computer science, the arity (synonyms include type, adicity, and rank) of a function

Dictionary

tuple

-noun

  1. (set theory) A finite sequence of terms; equivalently, an ordered set.
  2. (computing) A single row in a relational database.
  3. (computing) A set of comma-separated values passed to a program or operating system as a parameter to a function call.
© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic