arXiv:2609.00678cs.FLSep 2026

Manuscript Offprint

arXiv:2609.00678

Two-State Max-Plus Comparison Is Decidable

Keigo Oka

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Daviaud, Guillon, and Merlet proved that comparison of max-plus automata is undecidable under a fixed state bound of 553 and explicitly left the range from 2 to 552 states open. We resolve the two-state endpoint. More strongly, given an arbitrary finite max-plus automaton AA and a max-plus automaton BB with at most two states, it is decidable whether ⟦A⟧(w)≤⟦B⟧(w)\llbracket A \rrbracket(w) \leq \llbracket B \rrbracket(w) for every word ww. The structural reason is a one-dimensional projective normal form for two-state dynamics. Outside an effective bounded region, a transition has one of three tail behaviors: it propagates the unbounded projective gap with gap-independent height increment, forgets the gap with gap-independent height increment, or reads the gap magnitude into the height increment and then forgets it. In particular, any transition whose output depends on the unbounded gap necessarily destroys that gap. This yields an exact one-counter realization of BB. Effective semilinearity of context-free Parikh images then reduces comparison to Presburger arithmetic. As a consequence, two-state max-plus comparison, equivalence, and positivity are decidable.

1 Introduction

Let

Zmax⁡=(Z∪{−∞},max⁡,+)\mathbb{Z}_{\max} = (\mathbb{Z} \cup \{-\infty\}, \max, +)

be the max-plus semiring. A finite max-plus automaton AA over an alphabet Σ\Sigma computes a series

⟦A⟧:Σ∗⟶Zmax⁡\llbracket A \rrbracket : \Sigma^* \longrightarrow \mathbb{Z}_{\max}

by taking the maximum weight of an accepting run.

The exact comparison problem asks, for two automata A,BA, B, whether

⟦A⟧(w)≤⟦B⟧(w)for all w∈Σ∗.\llbracket A \rrbracket(w) \leq \llbracket B \rrbracket(w) \qquad \text{for all } w \in \Sigma^*.

It is undecidable in general. Daviaud, Guillon, and Merlet [1] proved undecidability already with a bounded number of states: their published bound is 553 states. They explicitly asked what happens between 2 and 552 states, noting that even the two-state case appeared difficult.

We prove the following.

Theorem 1.1 (Two-state right-hand comparison). Let AA be an arbitrary finite max-plus automaton over Zmax⁡\mathbb{Z}_{\max}, and let BB be a max-plus automaton with at most two states. It is decidable whether

⟦A⟧(w)≤⟦B⟧(w)for every w∈Σ∗.\llbracket A \rrbracket(w) \leq \llbracket B \rrbracket(w) \qquad \text{for every } w \in \Sigma^*.

This is stronger than merely resolving the two-state bounded-state endpoint, because only the right-hand automaton is required to have at most two states.

*Google. Work done in a personal capacity; no Google internal resources were used. Email: ogiekako@gmail.com. ORCID: 0009-0007-8119-9267.

Corollary 1.2. The following problems are decidable:

(i) comparison of two max-plus automata with at most two states;

(ii) equivalence of two max-plus automata with at most two states;

(iii) Posk2(Zmax⁡)\mathrm{Pos}_{k}^{2}(\mathbb{Z}_{\max}) for every finite alphabet size k.

The proof is elementary apart from one standard formal-language theorem. A two-state forward vector has only one unbounded projective coordinate, namely the difference of its two entries. For sufficiently large absolute difference, each letter has a fixed tail form. The essential property is one-way: if the current height increment depends on the magnitude of the unbounded projective gap, then the successor projective state no longer depends on that magnitude. A step that propagates the gap has a gap-independent height increment. This no-read-while-propagating property permits exact simulation by one nonnegative counter. The accepting transition language of the synchronized simulation is context-free, so effective Parikh semilinearity [5] reduces the existence of a comparison violation to Presburger arithmetic.

We use slightly more general conventions than [1]: arbitrary max-plus initial and final weights and words in Σ∗\Sigma^{*} are allowed here. The MFCS 2017 formulation uses Boolean-valued initial/final vectors and nonempty words. Restricting to that convention only simplifies the construction; excluding the empty word can also be enforced by one bit of finite control.

No complexity bound is claimed here.