(redirected from Tuples)
Also found in: Dictionary.


(computer science)
A horizontal row of data items in a relational data structure; corresponds to a record or segment in other types of data structures.
McGraw-Hill Dictionary of Scientific & Technical Terms, 6E, Copyright © 2003 by The McGraw-Hill Companies, Inc.




In functional languages, a data object containing two or more components. Also known as a product type or pair, triple, quad, etc. Tuples of different sizes have different types, in contrast to lists where the type is independent of the length. The components of a tuple may be of different types whereas all elements of a list have the same type. Examples of tuples in Haskell notation are (1,2), ("Tuple",True), (w,(x,y),z). The degenerate tuple with zero components, written (), is known as the unit type since it has only one possible value which is also written ().

The implementation of tuples in a language may be either "lifted" or not. If tuples are lifted then (bottom,bottom) /= bottom and the evaluation of a tuple may fail to terminate. E.g. in Haskell:

f (x,y) = 1 --> f bottom = bottom f (bottom,bottom) = 1

With lifted tuples, a tuple pattern is refutable. Thus in Haskell, pattern matching on tuples is the same as pattern matching on types with multiple constructors (algebraic data types) - the expression being matched is evaluated as far as the top level constructor, even though, in the case of tuples, there is only one possible constructor for a given type.

If tuples are unlifted then (bottom, bottom) = bottom and evaluation of a tuple will never fail to terminate though any of the components may. E.g. in Miranda:

f (x,y) = 1 --> f bottom = 1 f (bottom,bottom) = 1

Thus in Miranda, any object whose type is compatible with a tuple pattern is assumed to match at the top level without evaluation - it is an irrefutable pattern. This also applies to user defined data types with only one constructor. In Haskell, patterns can be made irrefutable by adding a "~" as in

f ~(x,y) = 1.

If tuple constructor functions were strict in all their arguments then (bottom,x) = (x,bottom) = bottom for any x so matching a refutable pattern would fail to terminate if any component was bottom.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)


(1) In a relational database, a tuple is one record (one row). See record and relational database.

(2) A set of values passed from one programming language to another application program or to a system program such as the operating system. Typically separated by commas, the values may be parameters for a function call or a set of data values for a database. See function.
Copyright © 1981-2019 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
References in periodicals archive ?
f) Trapdoor queries: When the adversary A issues a query for the trapdoor for keyword < IDi, wi >, the Challenger C then access the corresponding tuples < IDi, [Q.sub.i], [b.sub.i], [coin.sub.i] > and < [ID.sub.i], [W.sub.i], Q[W.sub.i], [x.sub.i] > in the [H.sub.1.sup.LIST] and [H.sub.2.sup.LIST] respectively and computes [T.sub.wi], = [x.sub.i]skID +t where [x.sub.i] [member of] [Z.sub.q.sup.*] and t = [H.sub.2]([W.sub.i]) and returns [T.sub.wi] to the adversary A.
Such units are small programs that can autonomously run on the static sensor nodes and communicate according to the Linda tuple space model [26].
(1) Inputs the state information A, the tuples ([ID.sub.i], [m.sub.i], [PK.sub.i], [[sigma].sub.i]).sub.1[less than or equal to]i[less than or equal to]n], and the aggregate signature [sigma] = (R, V)
Deductive databases are a set of basic relationships containing explicit tuples [Date, 2005].
Modification will be done to the tuples of sensitive rules in such a way that the alterations are spread to the tuples of the significant non-sensitive rules.
Problem statement: Find a differentiable bijective mapping function m that takes as input the tuples of the input image and outputs a new set of tuples whose statistics match the statistics of the target tuples.
All the current tables in the database use tuple time stamping approach [2] to store all those tuples which are currently valid for the real world.
The tuples in the database are grouped and watermarks are embedded into groups.
That is, a split point for A can partition the tuples in D into two subsets satisfying the conditions A [less than or equal to] split-point and A > split-point, respectively, thereby creating a binary discretization.
The basic idea of MSB method [16] is: (1) assign each tuple to a bucket based on each sensitive attribute values of the tuple, each bucket has the same values on all sensitive attributes and the priority is assigned to each bucket according to the MMDCF (Maximal Multi Dimensional Capacity First) method (2) tuple is chosen randomly in the highest priority bucket (3) based on satisfying l-diversity the tuples are grouped into the bucket.
In order to derive the corresponding criteria for tuples, we firstly presented the equivalent characterization for the disk-cyclic or codisk-cyclic tuple T = ([T.sub.1], [T.sub.2]) on H paralleling to [8, Theorem 4.24 and Theorem 5.2.4], respectively.