TOPICS
Search

Sequential Substitution System


SequentialSubstitutionSystem1

A sequential substitution system is a substitution system in which a string is scanned from left to right for the first occurrence of the first rule pattern. If the pattern is found, the rule is applied and processing advances to the next step. If the first rule pattern does not occur, the string is scanned from left to right for the first occurrence of the second rule pattern. If the pattern is found, the rule is applied and processing advances to the next step, and so on. If none of the rule patterns match at some step, the string repeats indefinitely for all subsequent steps. For example, consider the single rule A->B and the initial string ABA, illustrated above. The first step yields BBA, the second step yields BBB, and from there on the system repeats since there are no more matches of the pattern rule.

SequentialSubstitutionSystem2

A more interesting sequential substitution system is illustrated above (Wolfram 2002, p. 90). This system has two rules (ABA->AAB,A->ABA) and the initial condition BABA. It builds increasingly long runs of sequential As followed by sequential Bs by temporarily taking away one A before adding two more at the last step of each cycle.

SequentialSubstitutionSystem3

In systems with two or more rules, it is possible for some parts of a string to never be replaced as a result of another substitution always occurring first in a left-to-right scan. For example, consider the rules (AB->BA,B->AB) and the initial string ABAB. The first step yields BAAB by replacing the first AB. The second step yields ABAAB by replacing the first B. The third step yields BAAAB by replacing the first AB, and so on. This sequential substitution system will never replace the rightmost AB because it will always be preceded by either B or AB. As a result, it builds ever longer trailing strings of As.


See also

Multiway System, Substitution System

Portions of this entry contributed by Todd Rowland

Explore with Wolfram|Alpha

References

Wolfram, S. A New Kind of Science. Champaign, IL: Wolfram Media, pp. 88-92 and 893, 2002.

Referenced on Wolfram|Alpha

Sequential Substitution System

Cite this as:

Rowland, Todd and Weisstein, Eric W. "Sequential Substitution System." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SequentialSubstitutionSystem.html

Subject classifications