Iterated binary operation

From testwiki
Jump to navigation Jump to search

Template:Short description 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

∑, ∏, ⋃, and ⋂, respectively.

More generally, iteration of a binary function is generally denoted by a slash: iteration of f over the sequence (a1,a2…,an) is denoted by f/(a1,a2…,an), 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

Denote by aj,k, with Template:Nowrap and Template:Nowrap, the finite sequence of length Template:Nowrap of elements of S, with members (ai), for Template:Nowrap. Note that if Template:Nowrap, the sequence is empty.

For Template:Nowrap, define a new function Fl on finite nonempty sequences of elements of S, where Fl(𝐚0,k)={a0,k=1f(Fl(𝐚0,k−1),ak−1),k>1.

Similarly, define Fr(𝐚0,k)={a0,k=1f(a0,Fr(𝐚1,k)),k>1.

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 ∏i=0∞ai is defined, and equal to limn→∞∏i=0nai, if and only if that limit exists.

Non-associative binary operation

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

Iterated operations
Area of mathematics Sum Product
Name Operation Definition Symbol Name Operation Definition Symbol
Arithmetic Summation Addition Sum of numbers ∑ Iterated product Multiplication Product of numbers ∏
Set theory Union of a sequence of sets Set union All elements of sets ⋃ Intersection of a sequence of sets Set intersection Common elements ⋂
Logic Existential quantifier Disjunction Disjunction of statements ⋁ Universal quantifier Conjunction Conjunction of statements ⋀
Divisibility theory Least common multiple Least common multiple The smallest number that is a multiple of all the terms lcm Greatest common divisor Greatest common divisor The greatest number that is a divisor of all the terms gcd
Category theory Coproduct Disjoint union Coproduct of objects ∐ Product Cartesian product Product of objects ∏

Notation

The iterated binary operation is written as:

★k=1nak

Meaning of symbols:

Symbol Meaning
★ Iterated binary operation symbol
k Index variable
k=1 Lower bound
k=n or n Upper bound
ak k-th element

Example:

★k=14ak=★k=1k=4ak=a1⋆a2⋆a3⋆a4

General form:

★k∈Kak

Restricted form:

★1≤k≤nk≡0(mod2)ak

Infinite version:

★k=1∞ak=★k=1k→∞ak

Properties

Let (S,⋆) be a structure with associative operation ⋆:

  • Single element:
★k=nnak=an
  • Expansion:
★k=1nak=a1⋆a2⋆…⋆an
  • Recursion:
★k=1nak=(★k=1n−1ak)⋆an
  • Right recursion:
★k=1nak=a1⋆(★k=2nak)
  • Splitting:
(★k=1mak)⋆(★k=m+1nak)=★k=1nak
  • Permutation invariance:
★k=1nak=★k=1naσ(k)
  • Empty product (monoid):
★k=10ak=e
  • Idempotence:
if a⋆a=a, then ★k=1na=a
  • Constant sequence:
★k=1na=a⋆⋯⋆a

Identity element and empty set

If (S,⋆,e) is a monoid, then:

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

Computer science

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

See also

References