Lag system

From Esolang
Jump to navigation Jump to search

A lag system is a Post normal system with similar semantics and structure to tag systems.

The major difference is that while a tag system has a deletion number and rules which operate on the first symbol of the word, lag systems have a prematch number m and rules which match on the first m symbols of the word.

In tuple form, a lag system is a 3-tuple :[1]

  • A set of symbols
  • A match length
  • A set of productions , which each as
    • That is, each rule matches symbols and produces a string of any finite length

We may observe the production lengths as a notable property of a system. Let be the length of the production of , being the maximal , and being the minimal. We may also note .

Execution proceeds on a word by taking the first symbols as the prefix, deleting the first symbol of the word, finding the corresponding rule for the selected prefix, and finally appending the production of that rule to the end of the word. Execution continues until the length of the word is less than or there is no rule for the selected prefix. A halting symbol may be implemented by having no rules which are defined for the halting symbol at the start of the prefix.

Wang proved lag systems Turing complete by reducing Shepherdson-Sturgis (SS) machines into a 2-lag system. Wang provided the following translation scheme:

You may note that there are variable indices in this scheme. This is because these are rule forms, rather than explicit rules. For instance, has four forms, with one form being . Any SS machine can be translated into lag by using the forms listed above.

Lag systems are decidable for , as well as for . In a fully specified lag system, that is one where every has a corresponding production rule, is also decidable, meaning that Turing complete lag systems of this type must contain a rule which produces the empty string.[1]

References

  1. 1.0 1.1 Wang, H. Tag Systems and Lag Systems, Math. Annalen 152, 65-74 (1963).