Quire

Iterated binary operation

From Quire, the open reference·Repeated application of an operation to a sequence·3 min read

In mathematics, an iterated binary operation is an extension of a binary operation on a set S to a function on finite sequences of elements of S through repeated application.[1] Common examples include the extension of the addition operation to the summation operation, and the extension of the multiplication operation to the product operation. Other operations, e.g., the set-theoretic operations union and intersection, are also often iterated, but the iterations are not given separate names. In print, summation and product are represented by special symbols; but other iterated operators often are denoted by larger variants of the symbol for the ordinary binary operator. Thus, the iterations of the four operations mentioned above are denoted

{\displaystyle \sum ,\ \prod ,\ \bigcup ,} and {\displaystyle \bigcap }, respectively.

More generally, iteration of a binary function is generally denoted by a slash: iteration of {\displaystyle f} over the sequence {\displaystyle (a_{1},a_{2}\ldots ,a_{n})} is denoted by {\displaystyle f/(a_{1},a_{2}\ldots ,a_{n})}, following the notation for reduce in Bird–Meertens formalism.

In general, there is more than one way to extend a binary operation to operate on finite sequences, depending on whether the operator is associative, and whether the operator has identity elements.

Definition#edit

Denote by aj,k, with j ≥ 0 and k ≥ j, the finite sequence of length k − j of elements of S, with members (ai), for j ≤ i < k. Note that if k = j, the sequence is empty.

For f : S × S → S, define a new function Fl on finite nonempty sequences of elements of S, where &#123;\displaystyle F_&#123;l&#125;(\mathbf &#123;a&#125; _&#123;0,k&#125;)&#61;&#123;\begin&#123;cases&#125;a_&#123;0&#125;,&k&#61;1\\f(F_&#123;l&#125;(\mathbf &#123;a&#125; _&#123;0,k-1&#125;),a_&#123;k-1&#125;),&k>1.\end&#123;cases

Similarly, define &#123;\displaystyle F_&#123;r&#125;(\mathbf &#123;a&#125; _&#123;0,k&#125;)&#61;&#123;\begin&#123;cases&#125;a_&#123;0&#125;,&k&#61;1\\f(a_&#123;0&#125;,F_&#123;r&#125;(\mathbf &#123;a&#125; _&#123;1,k&#125;)),&k>1.\end&#123;cases

If f has a unique left identity e, the definition of Fl can be modified to operate on empty sequences by defining the value of Fl on an empty sequence to be e (the previous base case on sequences of length 1 becomes redundant). Similarly, Fr can be modified to operate on empty sequences if f has a unique right identity.

If f is associative, then Fl equals Fr, and we can simply write F. Moreover, if an identity element e exists, then it is unique (see Monoid).

If f is commutative and associative, then F can operate on any non-empty finite multiset by applying it to an arbitrary enumeration of the multiset. If f moreover has an identity element e, then this is defined to be the value of F on an empty multiset. If f is idempotent, then the above definitions can be extended to finite sets.

If S also is equipped with a metric or more generally with topology that is Hausdorff, so that the concept of a limit of a sequence is defined in S, then an infinite iteration on a countable sequence in S is defined exactly when the corresponding sequence of finite iterations converges. Thus, e.g., if a0, a1, a2, a3, … is an infinite sequence of real numbers, then the infinite product &#123;\textstyle \prod _&#123;i&#61;0&#125;^&#123;\infty &#125;a_&#123;i is defined, and equal to &#123;\textstyle \lim \limits _&#123;n\to \infty &#125;\prod _&#123;i&#61;0&#125;^&#123;n&#125;a_&#123;i&#125;,&#125; if and only if that limit exists.

Non-associative binary operation#edit

The general, non-associative binary operation is given by a magma. The act of iterating on a non-associative binary operation may be represented as a binary tree.

Basic iterated operations#edit

Iterated operations
Area of mathematicsSumProduct
NameOperationDefinitionSymbolNameOperationDefinitionSymbol
ArithmeticSummationAdditionSum of numbers&#123;\displaystyle \sum &#125;Iterated productMultiplicationProduct of numbers&#123;\displaystyle \prod &#125;
Set theoryUnion of a sequence of setsSet unionAll elements of sets&#123;\displaystyle \bigcup &#125;Intersection of a sequence of setsSet intersectionCommon elements&#123;\displaystyle \bigcap &#125;
LogicExistential quantifierDisjunctionDisjunction of statements&#123;\displaystyle \bigvee &#125;Universal quantifierConjunctionConjunction of statements&#123;\displaystyle \bigwedge &#125;
Divisibility theoryLeast common multipleLeast common multipleThe smallest number that is a multiple of all the terms&#123;\displaystyle \operatorname &#123;lcm&#125; &#125;Greatest common divisorGreatest common divisorThe greatest number that is a divisor of all the terms&#123;\displaystyle \gcd &#125;
Category theoryCoproductDisjoint unionCoproduct of objects&#123;\displaystyle \coprod &#125;ProductCartesian productProduct of objects&#123;\displaystyle \prod &#125;

Notation#edit

The iterated binary operation is written as:

&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a_&#123;k

Meaning of symbols:

SymbolMeaning
&#123;\displaystyle \bigstar &#125;Iterated binary operation symbol
&#123;\displaystyle k&#125;Index variable
&#123;\displaystyle k&#61;1&#125;Lower bound
&#123;\displaystyle k&#61;n&#125; or &#123;\displaystyle n&#125;Upper bound
&#123;\displaystyle a_&#123;kk-th element

Example:

&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;4&#125;a_&#123;k&#125;&#61;\mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;k&#61;4&#125;a_&#123;k&#125;&#61;a_&#123;1&#125;\star a_&#123;2&#125;\star a_&#123;3&#125;\star a_&#123;4

General form:

&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k\in K&#125;a_&#123;k

Restricted form:

&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;1\leq k\leq n \atop k\equiv 0&#123;\pmod &#123;2a_&#123;k

Infinite version:

&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;\infty &#125;a_&#123;k&#125;&#61;\mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;k\to \infty &#125;a_&#123;k

Properties#edit

Let &#123;\displaystyle (S,\star )&#125; be a structure with associative operation &#123;\displaystyle \star &#125;:

  • Single element:
&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;n&#125;^&#123;n&#125;a_&#123;k&#125;&#61;a_&#123;n
  • Expansion:
&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a_&#123;k&#125;&#61;a_&#123;1&#125;\star a_&#123;2&#125;\star \dots \star a_&#123;n
  • Recursion:
&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a_&#123;k&#125;&#61;\left(\mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n-1&#125;a_&#123;k&#125;\right)\star a_&#123;n
  • Right recursion:
&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a_&#123;k&#125;&#61;a_&#123;1&#125;\star \left(\mathop &#123;\bigstar &#125; _&#123;k&#61;2&#125;^&#123;n&#125;a_&#123;k&#125;\right)&#125;
  • Splitting:
&#123;\displaystyle \left(\mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;m&#125;a_&#123;k&#125;\right)\star \left(\mathop &#123;\bigstar &#125; _&#123;k&#61;m+1&#125;^&#123;n&#125;a_&#123;k&#125;\right)&#61;\mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a_&#123;k
  • Permutation invariance:
&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a_&#123;k&#125;&#61;\mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a_&#123;\sigma (k)
  • Empty product (monoid):
&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;0&#125;a_&#123;k&#125;&#61;e&#125;
  • Idempotence:
if &#123;\displaystyle a\star a&#61;a&#125;, then &#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a&#61;a&#125;
  • Constant sequence:
&#123;\displaystyle \mathop &#123;\bigstar &#125; _&#123;k&#61;1&#125;^&#123;n&#125;a&#61;a\star \cdots \star a&#125;

Identity element and empty set#edit

If &#123;\displaystyle (S,\star ,e)&#125; is a monoid, then:

  • Empty product = identity element
  • Empty sum = 0 (in arithmetic monoids)

Computer science#edit

In functional programming, iterated binary operations correspond to higher-order functions such as fold or reduce.

See also#edit

References#edit

  1. ^ Saunders MacLane (1971). Categories for the Working Mathematician. New York: Springer-Verlag. p. 142. ISBN 0387900357.

This article is mirrored from “Iterated binary operation” on English Wikipedia, revision 1370193624, written by Wikipedia's contributors and licensed CC BY-SA 4.0. Editing it here creates a Quire copy with its own history.

Synced with Wikipedia revision 1370193624 · just now