Content deleted Content added
mNo edit summary |
|||
(32 intermediate revisions by 27 users not shown) | |||
Line 1:
{{Short description|Algorithm operating on grammar-like rules}}
In [[theoretical computer science]], a '''Markov algorithm''' is a [[string rewriting system]] that uses [[Formal grammar|grammar]]-like rules to operate on [[string (computer science)|strings]] of symbols. Markov algorithms have been shown to be [[Turing-complete]], which means that they are suitable as a general model of [[computation]] and can represent any [[mathematical expression]] from its simple notation. Markov algorithms are named after the Soviet mathematician [[Andrey Markov, Jr.]]▼
{{No footnotes|date=May 2020}}
▲In [[theoretical computer science]], a '''Markov algorithm''' is a [[string rewriting system]] that uses [[Formal grammar|grammar]]-like rules to operate on [[string (computer science)|strings]] of symbols. Markov algorithms have been shown to be [[Turing-complete]], which means that they are suitable as a general model of [[computation]] and can represent any [[mathematical expression]] from its simple notation. Markov algorithms are named after the Soviet mathematician [[Andrey Markov Jr.|Andrey Markov, Jr.]]
[[Refal]] is a [[programming language]] based on Markov algorithms.
Line 5 ⟶ 8:
==Description==
Normal algorithms are verbal, that is, intended to be applied to
: <math>\left\{\begin{matrix} |b&\to& ba|\\ ab&\to& ba\\ b&\to&\\ {*}|&\to& b*& \\ {*}&\to& c& \\
|c&\to& c\\ ac&\to& c|\\ c&\to\cdot\end{matrix}\right.</math>
The process of applying the normal algorithm to an arbitrary
For example,
Any normal algorithm is equivalent to some [[Turing machine]], and vice versa{{snd}}any [[Turing machine]] is equivalent to some normal algorithm. A version of the [[
Normal algorithms have proved to be a convenient means for the construction of many sections of [[constructive mathematics]]. Moreover, inherent in the definition of a normal algorithm
==Algorithm==
The ''Rules''
Given an ''input'' string:
Line 55 ⟶ 58:
If the algorithm is applied to the above example, the Symbol string will change in the following manner.
#"I bought a B of As from T S."
#"I bought a B of apples from T S."
#"I bought a bag of apples from T S."
Line 63 ⟶ 67:
The algorithm will then terminate.
==Another
These rules give a more interesting example. They rewrite binary numbers to their unary counterparts. For example
===Rules===
#"|0" -> "0||"
#"1" -> "0|"
Line 89 ⟶ 94:
==See also==
▲* [[formal grammar]]
==References==
* Caracciolo di Forino, A. ''String processing languages and generalized Markov algorithms.'' In Symbol manipulation languages and techniques, D. G. Bobrow (Ed.), North-Holland Publ. Co., Amsterdam,
* [[Andrey Markov
<references />
==External links==
* [https://yad-studio.github.io/ Yad Studio - Markov algorithms IDE and interpreter (Open Source)]
* [
* [https://web.archive.org/web/20060217113205/http://nic-nac-project.de/~jcm/index.php?nav=projects Markov algorithm interpreter]
* [
* [https://store.steampowered.com/app/1720850/AB/ A=B, a game about writing substitution rules for a Markov algorithm]
{{Strings}}
[[Category:Theory of computation]]
|