Table of Contents
Fetching ...

On Constructing Finite Automata by Relational Programming

Attila Egri-Nagy, Chrystopher L. Nehaniv

TL;DR

The paper tackles constructing minimal finite-state transducers that realize a given set of input–output word pairs, framing this as a lossless, non-statistical learning problem. It introduces relational programming, specifically using miniKanren via core.logic in Clojure, to infer transducers by solving constraint-based formulations, and contrasts this with a classical trie-based minimization approach. Through several examples, the authors show that the relational method can produce truly minimal transducers for the training set, albeit at a high computational cost and limited scalability, whereas the trie-based method runs faster but does not guarantee minimality due to flexible output assignments. The work highlights the potential of exact transducer design for algebraic analysis of games and points to future directions, including incremental relational construction and hybrid classical techniques to improve scalability and practicality.

Abstract

We consider ways to construct a transducer for a given set of input word to output symbol pairs. This is motivated by the need for representing game playing programs in a low-level mathematical format that can be analyzed by algebraic tools. This is different from the classical applications of finite state automata, thus the usual optimization techniques are not directly applicable. Therefore, we use relational programming tools to find minimal transducers realizing a given set of input-output pairs.

On Constructing Finite Automata by Relational Programming

TL;DR

The paper tackles constructing minimal finite-state transducers that realize a given set of input–output word pairs, framing this as a lossless, non-statistical learning problem. It introduces relational programming, specifically using miniKanren via core.logic in Clojure, to infer transducers by solving constraint-based formulations, and contrasts this with a classical trie-based minimization approach. Through several examples, the authors show that the relational method can produce truly minimal transducers for the training set, albeit at a high computational cost and limited scalability, whereas the trie-based method runs faster but does not guarantee minimality due to flexible output assignments. The work highlights the potential of exact transducer design for algebraic analysis of games and points to future directions, including incremental relational construction and hybrid classical techniques to improve scalability and practicality.

Abstract

We consider ways to construct a transducer for a given set of input word to output symbol pairs. This is motivated by the need for representing game playing programs in a low-level mathematical format that can be analyzed by algebraic tools. This is different from the classical applications of finite state automata, thus the usual optimization techniques are not directly applicable. Therefore, we use relational programming tools to find minimal transducers realizing a given set of input-output pairs.

Paper Structure

This paper contains 11 sections, 3 figures.

Figures (3)

  • Figure 1: Signal Locator 9-3. The transducer for locating 1 among the zeroes in a bit-string of length 9. The node named nil is a sink state, representing partial transformations. We can see what allows the state transition to remain undefined. State 1 represents the case when the signal is in the first third, thus no more ones can be read. To detect the signal in the second third, we need to reach state 4, then return to the initial state and back to 4 'in time'. To locate the signal in the last third, we do the same, just not getting back to 4. This transducer would be easy to design manually, but it is also interesting enough to study the algorithm of this minimal solution.
  • Figure 2: Zeroes or ones. A solution for the 'Zeroes or ones' problem for bitstrings of length 4. Left: minimal one by the logic engine, right: minimized trie construction. The difference is clear: the minimized trie has only forward edges.
  • Figure 3: Palindromes. Transducers for detecting palindromic bitstrings of length 4; minimal and classic trie-based version.

Theorems & Definitions (6)

  • Definition 2.1: Single-output transducer
  • Example 2.2
  • Example 3.1: Signal Locator 9-3
  • Example 3.2: Zeroes or ones
  • Example 3.3: Palindromes
  • Example 3.4: Word classification