In
theoretical computer science
Theoretical computer science (TCS) is a subset of general computer science and mathematics that focuses on mathematical aspects of computer science such as the theory of computation, lambda calculus, and type theory.
It is difficult to circumsc ...
and
mathematical logic
Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of formal ...
a string rewriting system (SRS), historically called a semi-
Thue Thue may refer to:
* Axel Thue, a Norwegian mathematician
* Thue (food) Thue is a delicacy in Tibetan cuisine made with dri cheese (or sometimes parmesan or other hard cheeses), brown sugar (usually porang) and unsalted sweet cream butter. These in ...
system, is a
rewriting
In mathematics, computer science, and logic, rewriting covers a wide range of methods of replacing subterms of a formula with other terms. Such methods may be achieved by rewriting systems (also known as rewrite systems, rewrite engines, or reduc ...
system over
strings from a (usually
finite
Finite is the opposite of infinite. It may refer to:
* Finite number (disambiguation)
* Finite set, a set whose cardinality (number of elements) is some natural number
* Finite verb
Traditionally, a finite verb (from la, fīnītus, past partici ...
)
alphabet
An alphabet is a standardized set of basic written graphemes (called letters) that represent the phonemes of certain spoken languages. Not all writing systems represent language in this way; in a syllabary, each character represents a s ...
. Given a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
between fixed strings over the alphabet, called rewrite rules, denoted by
, an SRS extends the rewriting relation to all strings in which the left- and right-hand side of the rules appear as
substring
In formal language theory and computer science, a substring is a contiguous sequence of characters within a string. For instance, "''the best of''" is a substring of "''It was the best of times''". In contrast, "''Itwastimes''" is a subsequence ...
s, that is
, where
,
,
, and
are strings.
The notion of a semi-Thue system essentially coincides with the
presentation of a monoid. Thus they constitute a natural framework for solving the
word problem for monoids and groups.
An SRS can be defined directly as an
abstract rewriting system. It can also be seen as a restricted kind of a
term rewriting
In mathematics, computer science, and logic, rewriting covers a wide range of methods of replacing subterms of a formula with other terms. Such methods may be achieved by rewriting systems (also known as rewrite systems, rewrite engines, or red ...
system. As a formalism, string rewriting systems are
Turing complete
Alan Mathison Turing (; 23 June 1912 – 7 June 1954) was an English mathematician, computer scientist, logician, cryptanalyst, philosopher, and theoretical biologist. Turing was highly influential in the development of theoretical co ...
. The semi-Thue name comes from the Norwegian mathematician
Axel Thue
Axel Thue (; 19 February 1863 – 7 March 1922) was a Norwegian mathematician, known for his original work in diophantine approximation and combinatorics.
Work
Thue published his first important paper in 1909.
He stated in 1914 the so-called ...
, who introduced systematic treatment of string rewriting systems in a 1914 paper. Thue introduced this notion hoping to solve the
word problem for finitely presented semigroups. Only in 1947 was the problem shown to be
undecidable— this result was obtained independently by
Emil Post
Emil Leon Post (; February 11, 1897 – April 21, 1954) was an American mathematician and logician. He is best known for his work in the field that eventually became known as computability theory.
Life
Post was born in Augustów, Suwałki Gove ...
and
A. A. Markov Jr.
Definition
A string rewriting system or semi-Thue system is a
tuple
In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
where
* is an alphabet, usually assumed finite. The elements of the set
(* is the
Kleene star
In mathematical logic and computer science, the Kleene star (or Kleene operator or Kleene closure) is a unary operation, either on sets of strings or on sets of symbols or characters. In mathematics,
it is more commonly known as the free monoid ...
here) are finite (possibly empty) strings on , sometimes called ''words'' in
formal languages
In logic, mathematics, computer science, and linguistics, a formal language consists of words whose letters are taken from an alphabet and are well-formed according to a specific set of rules.
The alphabet of a formal language consists of sy ...
; we will simply call them strings here.
* is a
binary relation
In mathematics, a binary relation associates elements of one set, called the ''domain'', with elements of another set, called the ''codomain''. A binary relation over Set (mathematics), sets and is a new set of ordered pairs consisting of ele ...
on strings from , i.e.,
Each element
is called a ''(rewriting) rule'' and is usually written
.
If the relation is
symmetric
Symmetry (from grc, συμμετρία "agreement in dimensions, due proportion, arrangement") in everyday language refers to a sense of harmonious and beautiful proportion and balance. In mathematics, "symmetry" has a more precise definit ...
, then the system is called a Thue system.
The rewriting rules in can be naturally extended to other strings in
by allowing substrings to be rewritten according to . More formally, the one-step rewriting relation relation