Indexing Strings and Rulesets
Kenneth Caviness · The Mathematica Journal · 2011
An enumeration of strings is developed, in which all strings of finite length of symbols from any alphabet appear, with no upper bounds for string length or alphabet size.A bijective indexing function and its inverse are found for the string enumeration, allowing iteration through the set of all strings, as well as identification of arbitrary strings by the associated index.The method is then extended to sequences of strings and to sequential substitution system (SSS) rulesets, providing a welldefined, relatively dense enumeration of all possible valid SSS rulesets for strings of arbitrary length and any number of symbols used in rulesets of any length, although in this case the indexing function is not one-to-one.