In theoretical computer science and mathematical logic a string rewriting system (SRS), historically called a semi-Thue system, is a rewriting system over strings from a (usually finite) alphabet. Given a binary relation 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 substrings, 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 system. As a formalism, string rewriting systems are Turing complete. The semi-Thue name comes from the Norwegian mathematician Axel Thue, 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 and A. A. Markov Jr. Definition A string rewriting system or semi-Thue system is a tuple where is an alphabet, usually assumed finite. The elements of the set (* is the Kleene star here) are finite (possibly empty) strings on , sometimes called words in formal languages; we will simply call them strings here. is a binary relation on strings from , i.e., Each element is called a (rewriting) rule and is usually written . If the relation is symmetric, 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 induced by on for any strings : if and only if there exist such that , , and . Since is a relation on , the pair fits the definition of an abstract rewriting system. Obviously is a subset of . Some authors use a different notation for the arrow in (e.g. ) in order to distinguish it from itself () because they later want to be able to drop the subscript and still avoid confusion between and the one-step rewrite induced by . Clearly in a semi-Thue system we can