nLab algorithm

Context

Computability

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
propositional equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

Contents

Idea

An algorithm is a computational system that, for a given class of mathematical problems, allows one to arrive at a solution “record” BB from a problem condition record AA. The process from AA to BB is an entirely mechanical, determined sequence of operations.

Formal definitions

Turing

see Turing 1937

Kolmogorov & Uspénski

The following is meant to be a digest of Kolmogorov & Uspénski 1958.

We define 𝔗\mathfrak{T} as a naturally ordered set of classes T 0,T 1,T 2,…,T rT_{0}, T_{1}, T_{2}, \dots, T_{r}. The states of the algorithm are constructed from the “elements” of which these classes consist; each class T iT_{i} has what is described as an “unlimited volume,” that is, infinitely many elements of that type. These classes are mutually disjoint, and we denote the union of these classes simply as TT, that is, T:=⋃ i=0 rT iT := \bigcup_{i = 0}^{r}\,{T_{i}}.

We also say that an element of class T iT_{i} is an element of “type T iT_{i}” and we denote this (prototypical) element as a circle with the number ii within it: ⓘ.

We define a “complex over the set 𝔗\mathfrak{T}” as an “ordinary one-dimensional complex with vertices from 𝔗\mathfrak{T}.” Explicitly, given K 0K_{0} to be a finite set {O α}\{O_{\alpha}\} consisting of certain elements from 𝔗\mathfrak{T} (corresponding to the complex’s vertices) and K 1K_{1} to be a finite set consisting of pairs of elements from K 0K_{0} (corresponding to the “segments” of the complex), we may define a complex KK over the set 𝔗\mathfrak{T} as the union K:=K 0∪K 1K := K_{0} \cup K_{1}.

Given that SS is a complex as defined above, we define the “active part” U(S)U(S) to be the subcomplex of SS consisting of all vertices and segments belonging to chains of length λ≤N\lambda \leq N which contain/start from the initial vertex (NN is an arbitrarily fixed number for a given algorithm Γ\Gamma).

States are constructed as complexes over 𝔗\mathfrak{T}, wherein calculations, step-by-step, physically alter the active part of the state strictly based on predefined immediate processing rules, a finite list of graph transformation rules determining explicitly how Ω Γ\Omega_{\Gamma} operates on SS to transform it into subsequent S *S^*.

The rules are specified with a fixed set of paired states: U 1→W 1,U 2→W 2,…,U r→W rU_{1} \to W_{1}, U_{2} \to W_{2}, \dots, U_{r} \to W_{r}. Each of the algorithm’s conditions, each U iU_{i}, is a valid active part, i.e., U(U i)=U iU(U_{i}) = U_{i} (the operator UU does not alter or remove anything from its argument). To make sure the algorithm is deterministic, we must have that U i¬≅U jU_{i} \not\cong U_{j} for all 1≤i,j≤r1 \leq i, j \leq r. Each state replacement, each (arbitrary) W iW_{i}, replaces its corresponding active part U iU_{i}. Each pair (U iU_{i}, W iW_{i}) has a corresponding isomorphism φ i:L(U i)→L˜(W i)\varphi_{i} : L(U_{i}) \to \tilde{L}(W_{i}) where L˜(W i)\tilde{L}(W_{i}) denotes a certain, specific subcomplex of W iW_{i} (i.e., L˜(W i)⊆W i\tilde{L}(W_{i}) \subseteq W_{i}). L(U i)=U(U i)∩V(U i)L(U_{i}) = U(U_{i}) \cap V(U_{i}) denotes the boundary of U iU_{i} where V(S)V(S) denotes the external part of SS, the subcomplex of SS consisting of vertices that cannot be connected to initial vertex by chains shorter than NN (i.e., chains λ<N\lambda \lt N), as well as segments that enter the chains of length λ≤N\lambda \leq N that contain the initial vertex.

Finally, we may formally define an algorithm (à la Kolmogorov and Uspenskii): an algorithm Γ\Gamma is a state transition operator S *:=Ω Γ(S)S^* := \Omega_{\Gamma}(S), from a computational state SS to a subsequent state S *S^*.

For a (current) state SS, Γ\Gamma checks if U(S)≅U iU(S) \cong U_{i} for some U iU_{i} (some predefined complex in the fixed rule set of paired states); if a match is found, then we now have that the state is within the domain of the algorithm, denoted 𝔇(Γ)\mathfrak{D}(\Gamma). Since the complexes, U(S)U(S) and U iU_{i}, are connected, the isomorphism U(S)≅U iU(S) \cong U_{i} induces a unique isomorphism L(S)≅L(U i)L(S) \cong L(U_{i}). The algorithm will then create a new complex W˜\tilde{W} (≅W i\cong W_{i}); however, the paper does not provide a step-by-step process for this complex, instead positing that “obviously, one can form a complex W˜\tilde{W} isomorphic to complex W iW_{i}” with the following conditions:

  1. W˜∩V(S)=L(S)\tilde{W} \cap V(S) = L(S): wherein W˜\tilde{W} and V(S)V(S) are disjoint sans L(S)L(S) or, in other words, W˜\tilde{W} and V(S)V(S) only share the boundary vertices.
  2. Isomorphism extension: the composition of L(S)≅L(U i)L(S) \cong L(U_{i}) with the (predefined) φ i\varphi_{i} induces a unique boundary-oriented isomorphism G i S:L(S)⟶≅L˜(W i)G_{i}^{S} : L(S) \overset{\cong}{\longrightarrow} \tilde{L}(W_{i}). Γ\Gamma has it that W˜≅W i\tilde{W} \cong W_{i} must be a direct extension of the induced G i SG_{i}^{S}.

The final stage of the algorithm, upon the definition of W˜\tilde{W} using the previous conditions, defines the subsequent state S *S^* of the current state SS: S *=W˜∪V(S)S^* = \tilde{W} \cup V(S).

Applications

References

Original hostorical formulations of the notion of algorithms:

  • A. M. Turing: On Computable Numbers, with an Application to the Entscheidungs problem, Proceedings of the London Mathematical Society 2 42 (1937) 230–265 [pdf]

  • A. N. Kolmogorov, V. A. Uspénski: On the definition of an algorithm, American Mathematical Society Translations, Series II 29 (1963) 217–245

    original in: Uspehi Mat. Nauk. 13 (1958) 3–28 [math-net.ru]

    JSL review by Elliott Mendelson: jstor:2272011.

See also:

Last revised on September 26, 2026 at 15:58:53. See the history of this page for a list of all contributions to it.