Boundedness for (min,plus)-automata
We prove a well-known result: the boundedness problem for (min,plus)-automata is decidable. One of the main application of this result is that the star-heigh problem of regular expressions reduces to (a slight extension of) it. The main point is to present a very useful tool in action: Simon's factorisation theorem. This proof scheme has been used in many, many papers recently.
We consider (min,plus)-automata, meaning that an automaton computes a function
where , by assigning to a word the minimum value of a run, where the value of a run is computed by summing the weights along the run.
The boundedness problem asks whether the function is bounded, meaning
In this note, we will construct an algebraic structure from an automaton generalising the transition monoid for non-deterministic automata. This algebraic structure is a stabilisation monoid. The answer to the boundedness problem can be found by inspecting the stabilisation monoid: the function is bounded if and only if the stabilisation monoid induced by does not contain an unbounded witness. The correctness proof of this characterisation relies on a generic tool for stabilisation monoids called Simon’s factorisation theorem.
Extending the transition monoid
Let be a (min,plus)-automaton. The transition for letter is given by
which reads: the cost of going from to reading is . Algebraically, we consider the semiring with operations and , inducing similar operations on matrices. The function is defined by where are the initial and final vectors and is extended to a morphism .
We also write for the cost of the minimal run from to over the word .
The special case of non-deterministic automata
Let us consider a special case: and . Then , and is essentially a non-deterministic automaton, where means that there exists a transition from to , and if is accepted. Indeed in algebraic terms the semiring is isomorphic to the usual boolean semiring (where is mapped to and to ). In this special case, the boundedness problem reduces to the universality problem (note that this implies PSPACE-hardness of the boundedness problem).
We show how to solve the universality problem by computing the transition monoid. The transition monoid of a non-deterministic automaton is the monoid generated by the matrices for . In other words, we start from and close under matrix product. For the sake of explanation let us see as a matrix in the boolean semiring . Since is finite, the transition monoid is finite and can be effectively computed using a simple saturation algorithm.
One can verify that is universal if and only if does not contain a matrix such that . Indeed, the morphism maps words to matrices in and a word is rejected if .
Projecting on a finite semiring
A crucial property for non-deterministic automata is that is finite, implying that the transition monoid is finite, therefore computable. This does not hold anymore for (min,plus)-automata, i.e. in the semiring .
The good news is that for answering the boundedness problem it is enough to project into a finite semiring. The semiring we are looking at contains three elements: and . The intuitive meaning is in terms of costs: is free, is a small cost, and a large cost. We let denote the projection from to , which simply sends to , any finite value to and to .
The two operations are and , with the expected semantics. Using these two operations we can multiply matrices in .
Stabilisation
We bring a new operator called stabilisation. Consider the following weighted automaton.

We have . The function is unbounded, because , diverges for . Hence we need an operator to capture the behaviour of a repeated sequence; the stabilisation operator will do just that!
Define
At an intuitive level: corresponds to iterating. Repeating a large number of times an operation with cost yields an operation with cost . However, if each operation costs , the whole operation becomes very costly.
A matrix is idempotent if . The stabilisation operator over matrices is defined for idempotent matrices by
Intuitively: how much does it cost to go from to by repeating the action a large number of times? The path achieving the minimum goes from to some , follows a loop around , and then from to , with the whole operation of cost .
We now have a unary operation on (idempotent) matrices. What we have done is defining a stabilisation monoid, which is given by a set (here matrices over ), a binary operation (multiplication of matrices) and a unary operation called stabilisation.
The stabilisation monoid of a (min,plus)-automaton
Given a (min,plus)-automaton , we define its stabilisation monoid to be the stabilisation monoid generated by the matrices for . For convenience we let denote . In other words, we start from and close under matrix product and stabilisation. Since the underlying semiring is finite, the stabilisation monoid is finite and can be effectively computed using a simple saturation algorithm.
We say that a matrix is an unbounded witness if .
Theorem:
Let be a (min,plus)-automaton. is bounded if and only if does not contain any unbounded witness.
This yields an algorithm for deciding boundedness. A naive implementation is in EXPTIME; a further analysis of the stabilisation monoid gives a PSPACE algorithm.
One direction is easy: let be an unbounded witness. One can associate with a -expression explaining how was computed in : for instance, represents the computation:
* first apply the stabilisation operator to ,
* then multiply the result with ,
* finally apply the stabilisation operator to the result.
Following the inductive construction of the -expression, one can construct a sequence of words (essentially replacing by ) such that
Hence the fact that is an unbounded witness implies that .
In the remainder of this post we prove the converse more challenging implication, called completeness.
Simon’s factorisation theorem
Imagine that we have some (min,plus)-automaton and we are looking at for some word (which we can think of as very long), for instance . As an approximation let us think of this word as for a very large .
We want to know whether is large, or in other words whether it diverges to infinity when : this is equivalent to asking whether .
The word had an obvious factorisation into for a large . Simon’s factorisation theorem says that any word can be factorised in a similar way. Let us formalise this notion of factorisation. Let be a stabilisation monoid and a morphism , the factorisation of is a tree such that
* each node is labeled by a pair where and ,
* the leaves are labeled by for ,
* reading the second component of the leaves from left to right yields the word ,
* the internal nodes are of two types: product nodes and stabilisation nodes,
* a product node has two children, let and be their labels, then the label of the node is ,
* a stabilisation node has children, let be their labels, then is an idempotent of (meaning ) and the label of the node is .

Theorem:
Let be a stabilisation monoid and a morphism . There exists a constant such that for all words , there exists a factorisation of of depth .
The theorem says that no matter of long, complicated and messy a word is, it can be factorised through by a tree of constant depth. Here constant means that the value depends on but not on the word. The optimal is .
Finishing the proof
Let us assume that there are no unbounded witness and prove that is bounded.
Consider a word . Thanks to Simon’s factorisation theorem applied to the morphism
defined by , there exists a factorisation of of depth . We will reason on this tree.
We let denote the maximal weight appearing in the (min,plus)-automaton .
Lemma:
For all nodes labeled at distance from the leaves, for all states we have
We prove the lemma by induction from the leaves to the root.
* If the node is a leaf this is by definition of and .
* If the node is a product node labeled .
The first item is easy to prove, let us focus on the second. Assume , this implies that there exists such that and . It follows by induction hypothesis that .
* If the node is a stabilisation node labeled .
Again we only prove the second item, the first one is easy. Assume , this implies that there exists such that so and . It follows by induction hypothesis that
which is bounded by .
We can now finish the proof of completeness. Since does not contain any unbounded witness, the previous lemma implies that is bounded by where is the constant inherited from Simon’s factorisation theorem.