Arity

related topics
{math, number, function}
{system, computer, user}
{language, word, form}
{group, member, jewish}

In logic, mathematics, and computer science, the arity of a function or operation is the number of arguments or operands that the function takes. The arity of a relation is the number of domains in the corresponding Cartesian product. The term springs from such words as unary, binary, ternary, etc.

The term "arity" is primarily used with reference to functions of the form f : VS, where VSn, and S is some set. Such a function is often called an operation on S, and n is its arity.

Arities greater than 2 are seldom encountered in mathematics, except in specialized areas, and arities greater than 3 are seldom encountered in theoretical computer science. In computer programming there is often a syntactical distinction between operators and functions; syntactical operators usually have arity 0, 1 or 2.

In mathematics, depending on the branch, arity may be called type, adicity or rank.

In computer science arity may be called adicity, a function that takes a variable number of arguments being called variadic.

The term adicity (and monadic, dyadic etc.) is less ambiguous, as illustrated by the term dyadic Boolean operator where boolean can be safely replaced by binary, but replacing dyadic by binary exposes the ambiguity.

In linguistics and in logic, arity is sometimes called valency, not to be confused with valency in graph theory.

Contents

Examples

The term "arity" is rarely employed in everyday usage. For example, rather than saying "the arity of the addition operation is 2" or "addition is an operation of arity 2" one usually says "addition is a binary operation". In general, the naming of functions or operators with a given arity follows a convention similar to the one used for n-based numeral systems such as binary and hexadecimal. One combines a Latin prefix with the -ary ending; for example:

Full article ▸

related documents
Procedural programming
Linear search
Closure (topology)
Constructible number
Union (set theory)
Riesz representation theorem
Octal
Compactness theorem
Gram–Schmidt process
Integral domain
Bolzano–Weierstrass theorem
Depth-first search
Pauli matrices
Hyperbolic function
Open set
Decimal
Recursive descent parser
Compactification (mathematics)
Compact space
Legendre polynomials
Augmented Backus–Naur Form
Elliptic integral
Chain complex
Perfect number
Commutator subgroup
Berry paradox
Free variables and bound variables
Multiplicative function
Fixed point combinator
Paracompact space