Home

Arity

Arity is a term used in mathematics, logic, and computer science to designate the number of arguments or operands that a function, operation, or relation takes. The word derives from French arité, ultimately from Latin aritas, and is used to classify expressions by their input requirements.

In mathematics and logic, the arity of a function is the number of inputs it consumes; a

In programming, arity refers to the number of parameters a function or method expects. Most languages support

In databases, a relation's arity is the number of attributes (columns) in that relation. Arity concepts help

k-ary
relation
relates
k
elements.
Unary
operations
take
one
operand,
binary
take
two,
ternary
take
three,
and
so
on.
Many
standard
operations
are
fixed-arity,
such
as
unary
negation
and
binary
addition.
Some
operators
are
variadic
or
n-ary,
taking
an
arbitrary
number
of
arguments,
such
as
summation
over
a
list
or
logical
conjunction
over
a
set
of
propositions.
fixed-arity
functions
or
variadic
functions;
examples
include
C's
varargs,
Python's
*args,
and
JavaScript's
rest
parameters.
Some
languages
support
currying
and
partial
application
to
convert
a
function
of
several
arguments
into
a
sequence
of
unary
functions,
while
others
enforce
explicit
arity
at
declaration
and
do
not
provide
built-in
partial
application.
describe
the
structural
complexity
of
mathematical
objects,
programming
interfaces,
and
data
schemas,
and
they
influence
how
operations
are
composed
and
applied
across
disciplines.