Next Article in Journal
The Boltzmann Equation and Its Place in the Edifice of Statistical Mechanics
Previous Article in Journal
Stochastic Gradient Descent for Kernel-Based Maximum Correntropy Criterion
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Enumerating Finitary Processes

by
Benjamin D. Johnson
1,2,
James P. Crutchfield
1,2,3,*,
Christopher J. Ellison
1,3 and
Carl S. McTague
4
1
Complexity Sciences Center, University of California at Davis, One Shields Avenue, Davis, CA 95616, USA
2
Mathematics Department, University of California at Davis, One Shields Avenue, Davis, CA 95616, USA
3
Physics Department, University of California at Davis, One Shields Avenue, Davis, CA 95616, USA
4
DPMMS, Centre for Mathematical Sciences, University of Cambridge, Wilberforce Road, Cambridge CB3 0WB, UK
*
Author to whom correspondence should be addressed.
Entropy 2024, 26(12), 1105; https://doi.org/10.3390/e26121105
Submission received: 17 October 2024 / Revised: 9 December 2024 / Accepted: 11 December 2024 / Published: 17 December 2024
(This article belongs to the Section Complexity)

Abstract

:
We show how to efficiently enumerate a class of finite-memory stochastic processes using the causal representation of ϵ -machines. We characterize ϵ -machines in the language of automata theory and adapt a recent algorithm for generating accessible deterministic finite automata, pruning this over-large class down to that of ϵ -machines. As an application, we exactly enumerate topological ϵ -machines up to eight states and six-letter alphabets.
PACS:
02.50.-r; 89.70.+c; 05.45.Tp; 02.50.Ey

1. Introduction

What does the landscape of stochastic processes look like? Some classes of process—e.g., modeled by Markov and Hidden Markov chains, finite or denumerable [1,2,3,4]—are familiar to us since they have proven so useful as models of randomness in real world systems. Even if this familiarity belies a now-extensive understanding for particular classes, it begs the question of the intrinsic organization and diversity found in the space of all stochastic processes. Randomly selecting a stochastic process, how often does one find that it saturates the entropy rate? How many distinct processes are there at a given entropy rate or with a given number of states? Answers to these and related questions will go some distance to understanding the richness of stochastic processes and these, in turn, will provide hints as to what is possible in nature.
Stochastic processes show up in an exceedingly wide range of fields, but they are not generally analyzed or classified in broad swaths. In an attempt to address such concerns, we show how to enumerate the class of stochastic processes that admit the causal representation of finite-state ϵ -machines.
An ϵ -machine is the minimally complex, maximally predictive representation that completely captures all of a stochastic process’s information storage and processing properties. The  ϵ -machine representation allows for the direct analysis of the underlying process using only relevant information, and it provides a framework for comparing different processes through common, measurable quantities, such as process entropy rate and statistical complexity. The literature on computational mechanics [5], the area responsible for the theory of ϵ -machines, provides details about the construction of ϵ -machines from process output, proof of their optimality, various information-theoretic quantities that can be calculated from the ϵ -machine, and more.
Here, we consider stationary stochastic processes over discrete states, alphabets, and time. Given that each such process can be completely represented by its ϵ -machine, to enumerate all stochastic processes it suffices to enumerate all ϵ -machines. Even if one restricts to the case of ϵ -machines with finitely many states, this task appears to be extraordinarily difficult. So, as a first step, we enumerate a subclass of ϵ -machines called topological ϵ -machines, which represent a subclass of all finite-memory processes. In a sequel, we extend the ideas presented here to more general stochastic processes and their  ϵ -machines.
Although we are a long way from mapping the landscape of all stochastic processes, enumerating a subclass of finite-memory stochastic processes is useful for a number of reasons. The first is basic understanding. One would simply like to know how many processes there are for a given number of states and alphabet size. Moreover, if we fix one of these parameters and increase the other, it is informative to see how the number of distinct processes scales as well. Second, it allows for a thorough survey of process characteristics. An example of a such a survey is found in Ref. [6]. Third, an enumerated list of processes can be used to rigorously establish properties for various kinds of complex systems. For example, proving theorems about pattern formation in cellular automata. Finally, and rather more generally, one needs to be able to sample and explore the space of processes in a random or a systematic way, such as required in Bayesian inference.
Starting from an algorithm initially designed to enumerate deterministic finite automata, we use ϵ -machine properties as selection criteria for these automata, resulting in the set of topological ϵ -machines (and the processes they describe) as a result. Our development of this is organized as follows. First, we briefly discuss our previous approach to this problem using a different orderly enumeration algorithm due to Read [7], followed by an overview of the algorithm on which our enumeration scheme is based [8,9]. Second, we lay out the machinery of this algorithm, reviewing automata theory and computational mechanics. We define the necessary concepts as they apply to ϵ -machine generation and enumeration. Third, we then describe our algorithm, give the pseudocode for its implementation, and prove that it successfully enumerates all topological ϵ -machines. Fourth, we present enumeration results as a function of the number of states and symbols. We discuss, as well, the performance of the new algorithm, comparing it to our previous algorithm, and explain the improvements.

2. Related Work

The enumeration of ϵ -machines has not, to our knowledge, been previously explored, outside of the above-cited works. The enumeration of certain classes of automata, in contrast, has been pursued with varying degrees of success. Of particular interest, strongly connected and minimal complete finite automata were separately enumerated in Refs. [10,11], respectively. See Ref. [12] and references therein for more details on other recent efforts.
Much of the literature on computational mechanics focuses on ϵ -machines from the standpoint of Markov chains and stochastic processes and, therefore, typically uses the transition matrices as an ϵ -machine’s representation. Our first approach for enumerating finitary processes focused on generating all possible transition matrices and, hence, all ϵ -machines, interpreted as labeled directed graphs. Read [7] presented an orderly generation algorithm that could be used to efficiently generate certain classes of combinatorial objects. Among the objects that can be generated are directed and undirected graphs, rooted trees, and tournaments (interpreted as a special class of directed complete graphs). The essence of Read’s algorithm is that, given the complete list L m of graphs with n nodes and m edges, we can construct the complete list L m + 1 of graphs with n nodes and m + 1 edges without having to run an isomorphism check against each of the already constructed graphs. This offers a significant speed improvement versus the classical method.
We initially adapted Read’s algorithm to generate all edge-labeled multi-digraphs (with loops). From this extensive list, we then eliminated graphs that were not strongly connected and minimal in the sense of finite automata theory. While this algorithm was successful, it had three main performance drawbacks: (1) a large memory footprint, as  L m must be stored to generate L m + 1 ; (2) an improved but still extensive isomorphism check for each generated graph—the worst-case scenario requires n ! comparisons for each generated graph; and (3) the generation of a substantially larger class than needed and, as a consequence, many graphs to eliminate.
Our second approach, and the one presented in detail here, uses a different representation of ϵ -machines, looking at them as a type of deterministic finite automata (DFA). The new algorithm suffers from none of the previous method’s problems, although it should be noted that this method cannot be used to enumerate the generalized structures available via Read’s algorithm.
In his thesis, Nicaud [13] discussed the enumeration of “accessible” DFAs restricted to binary alphabets. These results were then independently extended to k-ary alphabets in Refs. [14,15]. Recently, Almeida et al. [8,9] developed an algorithm that generates all possible accessible DFAs with n states and k symbols using a compact string representation initially discussed in Refs. [8,9]. They showed that considering the “skeleton” of these DFAs as k-ary trees with n internal node guarantees that a DFA’s states are all accessible from a start state. From there, they procedurally add edges to the tree in all possible ways to generate all DFAs. As it is possible to generate all such trees, they show that it is possible to generate all accessible DFAs. They continue on to discuss their enumeration in comparison to the methods of Refs. [14,15], as well as giving a brief commentary on the percentage of DFAs that are minimal for a given number of states and symbols.

3. Automata Representations

We start with notation and several definitions from automata theory [16] that serve as the basis for the algorithm.
Definition 1. 
A deterministic finite automaton is a tuple Q , Σ , δ , q 0 , F , where Q is a finite set of states, Σ is a discrete alphabet, δ : Q × Σ Q is the transition function, q 0 is the start state, and  F Q is the set of final (or accepting) states. (Technically speaking, despite being referred to as a transition function, δ ( · ) is a partial function—some outputs are not specified).
Informally, we extend the transition function from individual symbols to words with δ ( q , λ ) = q , for all q Q , and for v , v Σ , δ ( q , v v ) = δ ( δ ( q , v ) , v ) . Here, λ denotes the empty word. (Note that the transition partial function on symbols can be made a total function on words [8,9]).
With | Q | = n and | Σ | = k , we take our set of states to be Q = { 0 , , n 1 } and our alphabet to be Σ = { 0 , , k 1 } . When context alone is not clear, states and symbols will be denoted by q i and v j , respectively. We will use F = Q (all states are accepting) for our algorithm, although this is not a general characteristic of DFA but is a property of  ϵ -machines.
Definition 2. 
A DFA is complete if its transition function δ is total. That is, for any state q Q and symbol v Σ , δ ( q , v ) = q for some q Q .
The DFAs generated by Refs. [8,9]’s algorithm may be incomplete. Shortly, we will see this is a necessary condition for the DFA to be a topological ϵ -machine.
Definition 3. 
Two states, q and q , of a DFA are said to be equivalent if for all words w Σ * , δ ( q , w ) F if and only if δ ( q , w ) F . That is, for every word w, following the transitions from q and q both lead to accepting or nonaccepting states. A DFA is minimal if there are no pairwise equivalent states.
As we take F = Q for ϵ -machines, we can simplify the idea of equivalence somewhat.
Definition 4. 
Two states of a topological ϵ-machine are equivalent if the sets of words following each state are the same.
Definition 5. 
A DFA is accessible or initially connected if for any state q Q , there exists a word w Σ * such that δ ( q 0 , w ) = q .
Simply put, there is a directed path from the initial state to any other state. The reverse is not necessarily true.
Definition 6. 
A DFA is strongly connected if for any two states q , q Q , there is a word w Σ * such that δ ( q , w ) = q . Equivalently, for any state q Q , setting q 0 = q results in the DFA still being accessible.
Definition 7. 
Two DFAs are isomorphic if there is a one-to-one map between their state sets that (i) maps accepting states of one DFA to the corresponding states of the other, (ii) similarly with their nonaccepting states, (iii) preserves adjacency, and (iv) preserves edge labeling when applied to δ.
Definition 8. 
A finite ϵ-machineis a probabilistic finite-state machine with a set of n causal states { σ 1 , , σ n } , a finite alphabet of k symbols { v 1 , , v k } , and a set of k n × n symbol-labeled substochastic transition matrices T ( v i ) , i { 1 , , k } . Here, T σ , σ ( v ) is the probability of transitioning from state σ to state σ while emitting symbol v.
Moreover, there are two key additional defining properties. The first is unifilarity: for each state and each symbol, there is at most one outgoing transition. Second is probabilistically distinct states: for each pair of distinct states σ and σ , there exists a finite word w = v 1 v such that Pr ( w | σ ) P r ( w | σ ) .
Due to these properties, one can show that the ϵ -machine is minimal [5].
An ϵ -machine has transient and recurrent components, but we only focus on the recurrent portion, as the transient component can be calculated from the recurrent. In the following, when we talk about ϵ -machines, we implicitly refer to the recurrent states. With this restriction, ϵ -machines are also strongly connected.
Figure 1 gives the ϵ -machine for the Even Process. The Even Process produces binary sequences in which all blocks of uninterrupted 1 s are even in length, bounded by 0 s. Furthermore, after each even length is reached, there is a probability p of breaking the block of 1 s by inserting a 0. If a 0 is inserted, then the same rule applies again.
Definition 9. 
A topological ϵ-machine is an ϵ-machine where the transition probabilities from a single state are uniform across all outgoing edges.
The topological ϵ -machine for the Even Process is given in Figure 2. We see that the transitions on both edges leaving state A have probability 1 / 2 , instead of p and 1 p as they were in the original Even Process ϵ -machine.
Since the transition probabilities are uniform across all edges leaving each single state, we only need to know their number. As far as the enumeration algorithm is concerned, we may effectively ignore the probabilities and focus instead on where the edges go.
This makes clear the name topological ϵ -machine: we are only interested in the topological structure (connectivity or adjacency) as this determines all its other properties.
One of the key reasons for the success of the algorithm is its compact representation of DFAs, which allows for direct enumeration. Recall that | Σ | = k and suppose that there is a fixed ordering 0 , , n 1 on the states Q.
Definition 10. 
A DFA’s string S = [ t 0 , t 1 , , t n k 1 ] is an n k -tuple that specifies the terminal state t i Q on each outgoing edge. The first k entries in the string correspond to the states reached by following the edges labeled 0 , , k 1 that start in state 0. The next k tis correspond to the edges that start in state 1 and so on. Thus, for each of the n states, there are k specified transitions. If an outgoing edge does not exist, the corresponding index is marked with t i = 1 .
For clarity, let us consider the topological ϵ -machine for the Even Process. Let states A and B be denoted by 0 and 1, respectively. The transition symbols will also be 0 and 1, though there is no connection between the two labelings. As A transitions to A on a 0 and to B on a 1, the terminal states for these two transitions are 0 and 1, respectively. B has no outgoing transition on symbol 0, so that will be denoted 1 in the string, while the transition from B to A on a 1 will be given by 0. Thus, the string representation for the Even Process is S = [ 0 , 1 , 1 , 0 ] .
In the definition of a DFA’s string, we assumed a fixed ordering on the states. In general, there are n ! ways to label the states and as many strings, so we need a way to fix a labeling unambiguously. To do this, we label the states in the order in which they are reached by following edges lexicographically from state q 0 . Start with q 0 0 , then follow the edges coming out of q 0 in order: 0 , 1 , , k 1 . The first state reached that is not state 0 is labeled as 1. The next state that is not 0 or 1 becomes state 2, and so on. Once the edges 0 , , k 1 have been explored, the procedure is repeated, starting from state 1, then state 2, and so on, until all the states have been labeled. Given the initial state q 0 of an accessible DFA, the edges uniquely determine the labeling of all the other states in the DFA. A proof can be found in Refs. [8,9]. Note that the DFA must be accessible for this to work, or else states will be missed in the labeling process.
Definition 11. 
Given a DFA string S, the corresponding flag f = [ f 0 , f 1 , , f n ] is an n + 1 tuple, with  f 0 = 1 , f n = n k , and  f i = min { j : S j = i } . That is, f i is the index of the first occurrence of i in the DFA string S. Note that as the DFA is accessible, f i i k 1 .
The flag for the Even Process shown above is [ 1 , 1 , 4 ] .

4. Enumeration Algorithm

To enumerate and generate all topological ϵ -machines, we begin with the Almeida et al. algorithm [8,9] that generates all accessible DFAs, of which topological ϵ -machines are a subclass. We then eliminate those DFAs that are not ϵ -machines. The following Lemmas help with this process.
Lemma 1. 
A topological ϵ-machine with n states has at least n transitions.
Proof. 
Assume there are at most n 1 transitions. Then, there is at least one state with no outgoing transition. There is no path from this state to any other state, so this cannot be an ϵ -machineas it is not strongly connected.    □
Lemma 2. 
A topological ϵ-machine with n > 1 states and alphabet size k can have at most n k 1  transitions.
Proof. 
The number of transitions is at most n k , as each state can have at most k transitions. Suppose that an ϵ -machine has n k transitions. Then, every word w Σ * is accepting for every state, so all states are pairwise equivalent. This cannot be an ϵ -machine, since it is not minimal. Thus, there are at most n k 1 transitions.    □
This establishes our earlier claim that topological ϵ -machines are incomplete.
Lemma 3. 
A topological ϵ-machine with n states has n isomorphic string automata representations.
Proof. 
An ϵ -machine is strongly connected. In the above definition of a strongly connected DFA, we gave an equivalent characterization where any state may serve as q 0 and result in an accessible DFA. As state q 0 determines the labeling of the states, and so the string representations, there are exactly n such representations.    □
We now need to determine the canonical representation for a given topological ϵ -machine. Given the n different strings that all represent the ϵ -machine equally well, which do we add to our enumerated list, and how do we know if we already have an isomorphism of an ϵ -machine on our list?
A closed-form expression to exactly count the number B n , k 1 of incomplete, accessible DFAs with n states and alphabet size k was developed in Refs. [8,9]. A bijection between the integers 0 , , B n , k 1 1 and the DFAs generated by the algorithm was also given. In this way, we can determine the ith DFA generated by the algorithm and likewise, given an arbitrary accessible DFA, we can determine exactly where in the generation sequence it occurs. This bijection allows us to easily determine whether an ϵ -machine is the canonical representation for its isomorphism class. We denote by B n , k 1 ( S ) the index of the string representation S in the enumeration process. Appendix A gives the details.
Definition 12. 
Given the n different string representations of a topological ϵ-machine— S 1 , S 2 , , S n —the canonical representation S ^ is the string with the smallest B n , k 1 value. It is the first of the isomorphisms generated by the enumeration process:
S ^ min 1 i n B n , k 1 ( S i ) .
With this definition of a canonical representation, it is simple to determine whether a given ϵ -machine has already been generated: compute the index B n , k 1 ( S ) of its representation S. Take each state as q 0 and compute the new string representation. If any of the resulting representations has a lower index than the original, then the given ϵ -machine is not canonical. So, we ignore it and generate the next DFA in the enumeration sequence.
To solidify the above ideas, consider the topological ϵ -machine in Figure 3. Note that since transition probabilities are not relevant to the enumeration process, we omit them entirely and only show the output symbol. Also, note that we label our states with letters, not numbers, for clarity.
Depending on the choice of q 0 , there are three different representations of this ϵ -machine:
  • q 0 = A :
    To determine the state ordering, we follow the edge labeled 0 and obtain q 1 = B . We follow the edge labeled 2 from state B to obtain q 2 = C . In this way, we identify ( A , B , C ) as ( 0 , 1 , 2 ) and obtain the string representation S 1 = [ 1 , 2 , 0 , 0 , 1 , 2 , 1 , 0 , 2 ] . From this, we compute that B n , k 1 ( S 1 ) = 70791 .
  • q 0 = B :
    We find that q 1 = A and q 2 = C . So, we identify ( A , B , C ) as ( 1 , 0 , 2 ) and determine that S 2 = [ 1 , 1 , 2 , 0 , 2 , 1 , 1 , 1 , 2 ] . This yields B n , k 1 ( S 2 ) = 55115 .
  • q 0 = C :
    We identify ( A , B , C ) = ( 1 , 2 , 0 ) , finding that S 3 = [ 1 , 1 , 0 , 2 , 0 , 1 , 1 , 1 , 0 ] and B n , k 1 ( S 3 ) = 18977 .
All three strings are valid representations of the ϵ -machine, but the third S 3 has the lowest index ( 18 , 977 ) in the enumeration sequence, so it is the canonical representation of the ϵ -machine. During the enumeration process, the other two representations would be ignored after it was determined they were noncanonical.
With this information in-hand, we can now provide the pseudocode for our algorithm. For clarity of discussion, we break the algorithm into two pieces (Algorithms 1 and 2). The first generates accessible DFAs, while the second tests to see if they are topological ϵ -machines.
Algorithm 1 DFA Generation
Input: Number of states n, alphabet size k.
1.
Generate the flags in reverse lexicographic order.
2.
For each flag:
(a)
Generate strings with this flag one at a time, in lexicographic order. Each is generated from the previous.
(b)
Test the DFA string S to see if it is a canonical topological ϵ -machine. (See Algorithm 2).
(c)
If the DFA is canonical, output B n , k 1 ( S ) to the list of topological ϵ -machines.
(d)
Move to the next flag when all of the strings have been generated.
3.
Terminate after the last string when the last flag has been generated.
Output: The list of indices { B n , k 1 ( S ) } of all topological ϵ -machines for the given n and k.
Algorithm 2 Test for topological ϵ -machine
Input: DFA X in string representation S and B n , k 1 ( S ) .
1.
Reject X unless it has at least n transitions.
2.
Reject X if it has n k transitions.
3.
For i = 1 , , n 1 :
(a)
Create a new DFA Y i from DFA X with q 0 = i .
(b)
Reject X if the states of Y i cannot be labeled by follow edges lexicographically from q 0 .
(X is not strongly connected).
(c)
Build string S i for Y i .
(d)
Compute index B n , k 1 ( S i ) .
(e)
Reject X if B n , k 1 ( S i ) B n , k 1 ( S ) .
(X is not canonical).
4.
Reject X if it is not a minimal DFA, based on failing Nerode equivalence [16].
Output: True or False, whether the input DFA is a canonical representation of a topological ϵ -machine.
We only highlight the important aspects of the DFA generation algorithm here. For a more complete discussion, as well as code for implementation, see Refs. [8,9].
Note that steps 1 and 2 are not formally necessary for the algorithm to work, as any DFA that fails these will be not strongly connected and nonminimal, respectively. However, it is quicker to perform these tests than it is to check for connectedness or minimality, and it is for these reasons that Lemmas 1 and 2 were mentioned.
Proposition 1. 
The above algorithm generates all topological ϵ-machines with n states and k symbols.
Proof. 
It was already shown in Refs. [8,9] that the original algorithm generates all accessible DFAs with n states and k symbols. We need only show that our additions result in only topological ϵ -machines being generated.
As stated previously, topological ϵ -machines are minimal and strongly connected. We also require a single representative of an isomorphism class. We check that we only obtain strongly connected DFAs in step 3(b), and we obtain minimality from step 4. Finally, we prune state isomorphisms with the test in step 3(e). □
See Ref. [16] for details on the minimization algorithm used here. Also, note that we are not interested in the minimal DFA itself, only whether the given DFA is minimal. We minimize the automaton and accept it if it has the same number of states as the original.
Note that the order of the above checks for connectedness, minimality, and isomorphic redundancy can be changed, but the performance of the algorithm suffers. The minimization algorithm is the slowest step, so it should be performed as few times as necessary, which is why it appears last.

5. Results

We ran the algorithm on a range of n and k values. To date, the majority of work in computational mechanics has focused on binary alphabets, so we provide not only the number E n , 2 of ϵ -machines with a binary alphabet but also a breakdown by the number of edges (transitions) for a given number of states in Table 1.
Looking at the numbers in the table, we see that the number of ϵ -machines increases quite rapidly, but when compared to the total number B n , 2 1 of accessible binary DFAs, the ratios decrease. At n = 3 , 9.6% of all accessible DFAs were topological ϵ -machines, while at n = 8 , that ratio was already down to 3.8%. We also see that for any given number of states, the majority of ϵ -machines have the maximum number of possible edges. This is not surprising as a DFA is more likely to be strongly connected with more edges present.
We note that E n , 2 is now listed on the On-Line Encyclopedia of Integer Sequences as sequence A181554 [17].
We can certainly consider larger alphabets, and Table 2 provides the number E n , k of ϵ -machines for a given number of states n and alphabet size k.
Using the data in Table 2, we again consider the ratios of E n , k / B n , k 1 . Looking at 2-state machines with an increasing alphabet, the ratio quickly approaches 1 / 2 , indicating that almost every accessible DFA with 2 states is a topological ϵ -machine. (Recall that half of all machines are noncanonical isomorphisms).
Although data are lacking to make a definitive conclusion, there is also a trend that the number of ϵ -machines increases more rapidly with increasing states (at large alphabet) than with increasing alphabet size. This agrees with how the number of accessible DFAs grows given these two conditions, but we need more data to be sure.
At this point, we need to address two types of overcounting that appear in Table 2. The first occurs due to multiple representations of a process using a larger alphabet. For example, all machines over l 2 letters are also machines over k letters for k > l . In fact, there are k l representations for each l-ary machine in the k-ary library. One may be more interested, however, in new structural features and process characteristics that appear with a larger alphabet rather than the number of ways we can re-represent machines with smaller alphabets. As such, Table 3 provides the number F n , k of topological ϵ -machines that employ all k letters. These machines cannot be found for smaller k and are, thus, “new” due to the larger alphabet.
The second type of overcounting is due to symbol isomorphism. Certain processes listed in both Table 2 and Table 3 have multiple representations that are different as ϵ -machines but have the same characteristics, for example, when quantified using information-theoretic measures of complexity. The Even Process, to take one example, can be considered as having even-length blocks of 1 s, as depicted in Figure 2, or even-length blocks of 0 s. The measurable process characteristics are the same for these two processes. We include both in our list, as the numbers are of interest to those studying finite-state transducers, as one example.
We also note that Table 2 and Table 3 are incomplete. This is not a shortcoming of the algorithm, but rather a comment on the exploding number of ϵ -machines. Looking only at the binary alphabet ϵ -machines, we see that their numbers increase very rapidly.
Looking at the generation times for binary alphabet machines in Table 4, we see that the run times increase very rapidly also. Our estimate for 9-state binary machines is approximately 35 CPU days. Naturally, since they depend on current technology, the absolute times are less important than the increasing ratios of run times.

6. Applications

Computational mechanics considers a number of different propertie, including the entropy rate, statistical complexity, and excess entropy, to quantify a process’s ability to store and transform information [5]. Additionally, there are known bounds on a number of these quantities as well as generalizations of ϵ -machines that achieve these bounds, e.g., see the binary ϵ -machine survey in Ref. [6]. However, little is known about the nonbinary alphabet case and about other more recently introduced quantities, such as causal irreversibility and crypticity. A survey of the intrinsic Markov order and the cryptic order for 6-state ϵ -machines recently appeared in Ref. [18]. A series of sequels will provide additional surveys, all of which depend on the ϵ -machine libraries we have shown how to construct.
Beyond this kind of fundamental understanding of the space of stochastic processes and the genericity of properties, ϵ -machine enumeration has a range of practical applications. One often needs to statistically sample representations of finite-memory stochastic processes, and a library of ϵ -machines forms the basis of such sampling schemes. In the computational mechanics analysis of spatiotemporal patterns in spatial dynamical systems, ϵ -machines play the role of representing spacetime shift-invariant sets of configurations. The library can then be used in computer-aided proofs of the domains, particles, and particle interactions that are often emergent in such systems. Finally, in Bayesian statistical inference from finite data, priors over the space of ϵ -machines are updated based on the evidence the data provides. Applications along these lines will appear elsewhere.

7. Conclusions

Beginning with an algorithm for enumerating and generating accessible DFAs, we showed how to enumerate all topological ϵ -machines based on the fact that they are strongly connected and minimal DFAs, discounting for isomorphic redundancies along the way.
There are a number of open problems and extensions to the algorithm and enumeration procedure to consider. Ideally, we would like to modify this algorithm or create an altogether new one that directly generates topological ϵ -machines without having to generate a larger class of objects—counted via B n , k 1 —that we then prune. Failing this, at least we would like to generate a smaller class of DFAs, perhaps only those that are strongly connected, so that fewer candidate DFAs need be eliminated.
We would also like to find a closed-form expression for the number of topological ϵ -machines for a given n and k. If this is not possible, we would like reasonable upper bounds on this quantity (better than B n , k ) and, perhaps, asymptotic estimates of the number of accessible DFAs that are actually topological ϵ -machines. Along these lines, we conjecture that for fixed k, lim n E n , k / B n , k 1 = 0 and, for fixed n, lim k E n , k / B n , k 1 = 1 / n .

Author Contributions

Conceptualization, B.D.J. and J.P.C.; Methodology, B.D.J., C.J.E. and C.S.M.; Software, B.D.J. and C.J.E.; Validation, B.D.J., J.P.C. and C.J.E.; Formal analysis, B.D.J., J.P.C., C.J.E. and C.S.M.; Investigation, B.D.J., J.P.C., C.J.E. and C.S.M.; Resources, J.P.C.; Data curation, B.D.J.; Writing—original draft, J.P.C.; Writing—review & editing, B.D.J. and J.P.C.; Supervision, J.P.C.; Project administration, J.P.C.; Funding acquisition, J.P.C. All authors have read and agreed to the published version of the manuscript.

Funding

B.D.J. was partially supported on an NSF VIGRE graduate fellowship. C.S.M. was partially supported on an NSF REU internship at the Santa Fe Institute during the summer of 2002. C.J.E. was partially supported by a DOE GAANN graduate fellowship. This work was partially supported by the Defense Advanced Research Projects Agency (DARPA) Physical Intelligence Subcontract No. 9060-000709 and ARO award W911NF-12-1-0234-0. The views, opinions, and findings contained in this article are those of the authors and should not be interpreted as representing the official views or policies, either expressed or implied, of the DARPA or the Department of Defense.

Data Availability Statement

Data is contained within the article.

Acknowledgments

C.S.M. thanks Fred Annexstein for originally pointing out Read’s algorithm.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. String-Index Mapping

Let S be some DFA string representation, and let f be the flag corresponding to S. Then, we have B n , k 1 ( s ) = n f + n r , where:
n f = j = 1 n 1 m = 0 j 1 ( m + 2 ) f m + 1 f m 1 × l = f j + 1 j k 1 ( j + 1 ) l f j N j , l 1
n r = j = 1 n 1 l = f j + 1 f j + 1 1 s l ( j + 2 ) f j + 1 1 l × m = j + 1 n 1 ( m + 2 ) f m + 1 f m 1 .
Equation (A1) calculates the first index that uses the given flag, and Equation (A2) calculates the index of the string S among those DFAs with the given flag.
Equation (A1) refers to the number N j , l 1 of accessible DFAs whose string representation has the first occurrence of symbol j occur in position l. It can be defined by a recursive formula and its values stored in a table for efficient access. For completeness, we provide the formulas here, but for more detail we direct the reader to Refs. [8,9]:
N n 1 , j 1 = ( n + 1 ) n k 1 j , j [ n 2 , ( n 1 ) k 1 ] N m , m k 1 1 = i = 0 k 1 ( m + 2 ) i N m + 1 , m k + i 1 , m [ 1 , n 2 ] N m , j 1 = ( m + 2 ) N m , j + 1 1 + N m + 1 , j + 1 1 , m [ 1 , n 2 ] , j [ m 1 , m k 2 ] .

References

  1. Kemeny, J.G.; Snell, J.L. Finite Markov Chains; D. Van Nostrand Company: Princeton, NJ, USA, 1965. [Google Scholar]
  2. Kemeny, J.G.; Snell, J.L.; Knapp, A.W.; Griffeath, D.S. Denumerable Markov Chains; Springer: New York, NY, USA, 1976. [Google Scholar]
  3. Rabiner, L.R.; Juang, B.H. An introduction to hidden Markov models. IEEE Assp. Mag. 1986, 3, 4–16. [Google Scholar] [CrossRef]
  4. Ephraim, Y.; Merhav, N. Hidden Markov processes. IEEE Trans. Inf. Theory 2002, 48, 1518–1569. [Google Scholar] [CrossRef]
  5. Crutchfield, J.P. Between Order and Chaos. Nat. Phys. 2012, 8, 17–24. [Google Scholar] [CrossRef]
  6. Feldman, D.P.; McTague, C.S.; Crutchfield, J.P. The organization of intrinsic computation: Complexity-entropy diagrams and the diversity of natural information processing. Chaos 2008, 18, 59–73. [Google Scholar] [CrossRef] [PubMed]
  7. Read, R.C. Everyone a winner. Ann. Discret. Math. 1978, 2, 107–120. [Google Scholar]
  8. Almeida, M.; Moreira, N.; Reis, R. Enumeration and Generation Of Initially Connected Deterministic Finite Automata; Technical Report DCC-2006-07; University of Porto: Porto, Portugal, 2006. [Google Scholar]
  9. Almeida, M.; Moreira, N.; Reis, R. Enumeration and generation with a string automata representation. Theor. Comput. Sci. 2007, 387, 93–102. [Google Scholar] [CrossRef]
  10. Robinson, R.W. Counting strongly connected finite automata. In Graph Theory with Applications to Algorithms and Computer Science; Wiley: Hoboken, NJ, USA, 1985; pp. 671–685. [Google Scholar]
  11. Narushima, H. Principles of Inclusion-Exclusion on Semilattices and Its Applications. Ph.D. Thesis, Waseda University, Tokyo, Japan, 1977. [Google Scholar]
  12. Domaratzki, M.; Kisman, D.; Shallit, J. On the number of distinct languages accepted by finite automata with n states. J. Lang. Autom. Comb. 2002, 7, 469–486. [Google Scholar]
  13. Nicaud, C. Etude du Comportement en Moyenne des Automates Finis et des Langages Rationnels. Ph.D. Thesis, Universite de Paris 7, Paris, France, 2000. [Google Scholar]
  14. Champarnaud, J.-M.; Paranthoën, T. Random generation of DFAs. Theor. Comput. Sci. 2005, 330, 221–235. [Google Scholar] [CrossRef]
  15. Bassino, F.; Nicaud, C. Enumeration and random generation of accessible automata. Theor. Comput. Sci. 2007, 381, 86–104. [Google Scholar] [CrossRef]
  16. Hopcroft, J.E.; Ullman, J.D. Introduction to Automata Theory, Languages, and Computation; Addison-Wesley, Reading: Boston, MA, USA, 1979. [Google Scholar]
  17. Johnson, B.D.; Crutchfield, J.P.; Ellison, C.J.; McTague, C.S. A181554: The Number of n-State Topological Epsilon-Machines Over a Binary Alphabet. On-Line Encyclopedia of Integer Sequences. 2010. Available online: http://oeis.org/A181554 (accessed on 16 October 2024).
  18. James, R.G.; Mahoney, J.R.; Ellison, C.J.; Crutchfield, J.P. Many roads to synchrony: Natural time scales and their algorithms. Phys. Rev. E 2014, 89, 042135. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Even Process. The transition labels p | x denote the probability p ( 0 , 1 ) of generating symbol x.
Figure 1. Even Process. The transition labels p | x denote the probability p ( 0 , 1 ) of generating symbol x.
Entropy 26 01105 g001
Figure 2. Topological ϵ -machine for the Even Process. Transition probabilities are uniform across edges leaving state A.
Figure 2. Topological ϵ -machine for the Even Process. Transition probabilities are uniform across edges leaving state A.
Entropy 26 01105 g002
Figure 3. Arbitrary topological ϵ -machine with three states over alphabet of size three.
Figure 3. Arbitrary topological ϵ -machine with three states over alphabet of size three.
Entropy 26 01105 g003
Table 1. The number E n , 2 of binary-alphabet topological ϵ -machines as a function of the number of states (n) and edges (k). The number B n , 2 1 of accessible binary DFAs is listed for comparison.
Table 1. The number E n , 2 of binary-alphabet topological ϵ -machines as a function of the number of states (n) and edges (k). The number B n , 2 1 of accessible binary DFAs is listed for comparison.
StatesEdges E n , 2 B n , 2 1
1 3
12
21
2 745
21
36
3 78816
32
422
554
4 138820,225
43
568
6403
7914
5 35,186632,700
56
6192
72228
810,886
921,874
6 1,132,61323,836,540
69
7512
89721
985,974
10360,071
11676,326
7 43,997,4261,048,592,640
718
81312
937,736
10526,760
113,809,428
1214,229,762
1325,392,410
8 1,993,473,48052,696,514,169
830
93264
10133,218
112,729,336
1230,477,505
13190,505,028
14651,856,885
151,117,768,214
Table 2. The number E n , k of topological ϵ -machines as a function of number of states n and alphabet size k.
Table 2. The number E n , k of topological ϵ -machines as a function of number of states n and alphabet size k.
n k 23456
137153163
27141187320,925213,997
37815,5981,658,606136,146,590
413883,625,638
535,186
61,132,613
743,997,426
81,993,473,480
Table 3. The number F n , k of full-alphabet topological ϵ -machines as a function of number of states n and alphabet size k.
Table 3. The number F n , k of full-alphabet topological ϵ -machines as a function of number of states n and alphabet size k.
n k 23456
111111
27120135112,900113,827
37815,3641,596,682128,008,760
413883,621,474
535,186
61,132,613
743,997,426
81,993,473,480
Table 4. Average run times ( 2.4 GHz Intel Core 2 Duo CPU) to generate all binary alphabet topological ϵ -machines as a function of the number n of states.
Table 4. Average run times ( 2.4 GHz Intel Core 2 Duo CPU) to generate all binary alphabet topological ϵ -machines as a function of the number n of states.
nTime (s)
3 1.00 × 10 2
4 1.30 × 10 2
5 2.75 × 10 1
6 1.39 × 10 1
7 7.80 × 10 2
8 4.94 × 10 4
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Johnson, B.D.; Crutchfield, J.P.; Ellison, C.J.; McTague, C.S. Enumerating Finitary Processes. Entropy 2024, 26, 1105. https://doi.org/10.3390/e26121105

AMA Style

Johnson BD, Crutchfield JP, Ellison CJ, McTague CS. Enumerating Finitary Processes. Entropy. 2024; 26(12):1105. https://doi.org/10.3390/e26121105

Chicago/Turabian Style

Johnson, Benjamin D., James P. Crutchfield, Christopher J. Ellison, and Carl S. McTague. 2024. "Enumerating Finitary Processes" Entropy 26, no. 12: 1105. https://doi.org/10.3390/e26121105

APA Style

Johnson, B. D., Crutchfield, J. P., Ellison, C. J., & McTague, C. S. (2024). Enumerating Finitary Processes. Entropy, 26(12), 1105. https://doi.org/10.3390/e26121105

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop