BSS Machines over Semirings
- BSS machines over semirings are a computational framework that generalizes the classical BSS model by replacing fields with commutative, positive semirings and integrating semiring semantics for logic.
- They support both deterministic and nondeterministic computation, enabling polynomial-time algorithms and NP(S) characterizations via descriptive complexity techniques.
- Canonical problems like semiring satisfiability and the Boolean fragment of NP(S) illustrate how logical encodings and algebraic circuit evaluations are unified in this framework.
Searching arXiv for the cited work and closely related semiring/BSS papers. BSS machines over semirings are extensions of the Blum–Shub–Smale model in which the underlying domain of computation is not restricted to a field such as , but is taken to be a semiring . In the 2025 literature, this framework is formulated for arbitrary first-order structures and then specialized to semirings, with particular emphasis on commutative, positive semirings and on their interaction with semiring semantics for logic due to Grädel and Tannen (Gaßner, 24 Feb 2025, Barlag et al., 18 Feb 2025, Barlag et al., 30 Sep 2025). The resulting theory supports deterministic and nondeterministic machine models, polynomial-time and nondeterministic polynomial-time classes such as , and descriptive-complexity analogues of Fagin’s theorem and Cook’s theorem. In this setting, satisfiability for semiring-valued propositional logic becomes the canonical complete problem for , while the true existential first-order theory of captures the Boolean part of (Barlag et al., 30 Sep 2025).
1. Semiring setting and semantic background
A semiring is given as a tuple
such that is a commutative monoid, is a monoid, multiplication distributes over addition, and (Barlag et al., 30 Sep 2025). In the semiring-oriented BSS literature summarized in 2025, the standing assumptions for the main logical characterizations are that 0 is commutative, positive, and nontrivial, with 1 (Barlag et al., 30 Sep 2025, Barlag et al., 18 Feb 2025).
The associated semantic framework is the semiring semantics for first-order and second-order formulas introduced by Grädel and Tannen. For a finite domain 2, a relational vocabulary 3, and an 4-interpretation
5
formula values are computed inductively by interpreting conjunction as multiplication, disjunction as addition, existential quantification as summation over the finite domain, and universal quantification as product over the finite domain (Barlag et al., 30 Sep 2025). Equality and inequality are treated in a crisp fashion, yielding either 6 or 7 in 8 (Barlag et al., 30 Sep 2025). Existential second-order quantification is interpreted Boolean-wise: 9 if there is an extension 0 with 1, and 2 otherwise (Barlag et al., 30 Sep 2025).
This semantic choice is structurally decisive. It permits the direct comparison of machine acceptance, logical truth in semiring semantics, and satisfiability phenomena over semiring-valued propositional languages. In particular, when 3 one recovers classical first-order logic, and the semiring framework specializes to the ordinary Boolean setting (Barlag et al., 30 Sep 2025).
2. Machine models and configurations
The 2025 literature presents two closely related formulations. One is a general BSS-RAM model over an arbitrary first-order structure 4; the other is a node-based BSS5 model directly over a semiring (Gaßner, 24 Feb 2025, Barlag et al., 18 Feb 2025).
In the first-order-structure formulation, a deterministic BSS-RAM has data registers 6 holding elements of 7, index registers 8 holding positive integers, and a special register 9 storing the current instruction label (Gaßner, 24 Feb 2025). A program is a finite directed graph with a unique halt node, and the allowed deterministic instruction templates include assignment by a function symbol, assignment of a constant, copying a register, relation tests with branching, integer tests with branching, resetting an index, incrementing an index, and halting (Gaßner, 24 Feb 2025). Formally, the machine is presented as
0
where 1 is the configuration space, 2 is the input procedure, 3 is the step function, and 4 reads the output at halt (Gaßner, 24 Feb 2025).
In the semiring specialization, the signature becomes
5
and the principal arithmetic instructions are addition, multiplication, loading constants, and copying (Gaßner, 24 Feb 2025). The input procedure loads 6 into the first registers, initializes the index registers to 7, sets the control to the initial instruction, and fills unused data registers with 8 (Gaßner, 24 Feb 2025).
The node-based BSS9 model instead uses a tape-like state space
0
or equivalently 1 with finite support, together with distinguished input, output, computation, branch, and shift nodes (Barlag et al., 18 Feb 2025, Barlag et al., 30 Sep 2025). The input map writes the word 2 into the positive coordinates and records the length 3 in unary on the negative side:
4
The output map reads the first 5 positive cells, where 6 is recovered from the run-length of 7’s in the negative coordinates (Barlag et al., 18 Feb 2025, Barlag et al., 30 Sep 2025).
Computation nodes perform one primitive operation at one coordinate, namely 8, 9, or 0 for a fixed semiring constant; branch nodes test either 1 or, when an order is available, 2; shift nodes move the tape left or right (Barlag et al., 18 Feb 2025, Barlag et al., 30 Sep 2025). A configuration in the node formalism is 3, while an equivalent register-style account writes
4
A worked semiring example is given by a program computing the product of two inputs. With input 5 loaded into 6, a single instruction
7
followed by a jump to halt yields output 8 in 9 (Gaßner, 24 Feb 2025). The example is elementary, but it illustrates the unit-cost arithmetic abstraction characteristic of the model.
3. Determinism, nondeterminism, and complexity measures
Nondeterminism is introduced in two equivalent ways in the abstract BSS-RAM framework. One can replace the input procedure by a multi-valued map 0, so that a run may begin in any of several start configurations, or one can add explicit nondeterministic instructions such as
1
and a multi-valued “2-oracle” choice instruction (Gaßner, 24 Feb 2025). In either formulation, the transition map becomes multi-valued, and acceptance is defined by the existence of some run reaching halt (Gaßner, 24 Feb 2025).
For semiring BSS machines in the logical characterizations of 3, nondeterminism is described as certificate guessing. A language 4 lies in 5 if there is a nondeterministic BSS-machine 6 and a polynomial 7 such that on input 8, the machine first guesses a certificate 9, then runs deterministically in 0 steps, and accepts exactly when the final output, an element of 1, is 2 (Barlag et al., 30 Sep 2025).
Time is measured as in the classical BSS model: one counts the number of node visits, transitions, or register updates until halting (Gaßner, 24 Feb 2025, Barlag et al., 18 Feb 2025). If the running time on inputs of length 3 is bounded by a polynomial, one obtains the analogue of 4 over 5 (Barlag et al., 18 Feb 2025). Space is measured by the maximal number of distinct tape cells or registers that ever become non-zero (Barlag et al., 18 Feb 2025).
The 2025 papers emphasize that the unit-cost interpretation depends on the signature. In the semiring setting, addition and multiplication can each be treated as cost 6, whereas a Turing-style simulation would instead charge according to the size of the representations of semiring elements (Gaßner, 24 Feb 2025). This distinction is standard in algebraic computation and affects how semiring complexity classes relate to representation-sensitive models.
Several transfer results are stated. One lemma asserts that if 7 is computed by an 8-Turing machine in time 9 and space 0, then there is a BSS1 machine computing 2 in time
3
and space 4 (Barlag et al., 18 Feb 2025). The same source states that every poly-time register machine over 5 can be simulated by a polytime BSS6 machine and vice versa (Barlag et al., 18 Feb 2025).
4. Descriptive complexity: 7
A central result is the semiring analogue of Fagin’s theorem: for commutative, positive semirings,
8
(Barlag et al., 30 Sep 2025). Here 9 denotes existential second-order logic interpreted in the semiring semantics.
The inclusion 0 is obtained by taking an existential second-order sentence
1
and observing that a nondeterministic BSS-machine can guess interpretations 2 for the second-order relation symbols and then evaluate the first-order part 3 deterministically in polynomial time (Barlag et al., 30 Sep 2025). This relies on a known simulation of semiring-semantics first-order evaluation by BSS computation in polynomial time in the domain size (Barlag et al., 30 Sep 2025).
For the converse inclusion, suppose 4 is decided by a nondeterministic BSS-machine 5 in time 6. The input of length 7 is encoded as a one-unary relational structure 8 of size 9 with one unary 00-relation indexing the input word (Barlag et al., 30 Sep 2025). One then constructs an existential second-order sentence 01 whose second-order variables encode the machine tableau: a relation symbol 02 of arity 03 records tape content at time 04 and position 05, and predicates 06 record the control state at time 07 (Barlag et al., 30 Sep 2025). Initialization, transition constraints, and acceptance conditions are then enforced arithmetically so that the sentence is true in semiring semantics exactly when the machine accepts (Barlag et al., 30 Sep 2025).
This tableau construction is the semiring counterpart of the classical descriptive encoding of polynomial-time nondeterministic computations. What changes is not the architecture of the proof but the interpretation of logical connectives and quantifiers: additive and multiplicative aggregation over 08 replaces purely Boolean truth propagation, while second-order existence remains Boolean-wise through the nonzero test built into the semantics (Barlag et al., 30 Sep 2025). This suggests that the semiring generalization preserves the classical proof schema with minimal structural alteration.
A related result concerns first-order logic and arithmetic circuits. For a commutative, positive semiring 09 and a set of tests 10, the class of functions computed by polynomial-size, constant-depth arithmetic circuits over 11 with 12-test gates coincides with the class of functions definable by first-order sentences in semiring semantics with the same tests and an arbitrary built-in supply of 13-valued relations (Barlag et al., 18 Feb 2025). In the notation given there,
14
(Barlag et al., 18 Feb 2025). This locates semiring BSS computation within a broader descriptive-complexity landscape that also includes semiring circuits and semiring-valued first-order evaluation.
5. Canonical complete problems: semiring satisfiability and existential theory
The semiring version of Cook’s theorem identifies a canonical complete satisfiability problem. One defines semiring-15 propositional logic 16 by the grammar
17
where 18 ranges over propositional atoms and 19 (Barlag et al., 30 Sep 2025). Assignments map each literal 20 to an element of 21, conjunction is evaluated by multiplication, disjunction by addition, constants by their designated semiring values, and equality or order tests by crisp 22 outcomes (Barlag et al., 30 Sep 2025). The satisfiability problem is
23
The paper proves that 24: a machine guesses an assignment and evaluates the formula bottom-up on its parse tree in polynomial time using semiring additions and multiplications as primitive operations (Barlag et al., 30 Sep 2025). Hardness is shown by translating the existential second-order tableau encoding 25 of an arbitrary 26 computation into a propositional formula 27. Each second-order predicate value becomes a fresh propositional atom, universal quantifiers are expanded into finite conjunctions, existential quantifiers into disjunctions, and the resulting formula is satisfiable over 28 if and only if the original machine accepts (Barlag et al., 30 Sep 2025). Hence 29 is 30-complete (Barlag et al., 30 Sep 2025).
A second canonical problem concerns the Boolean part of semiring nondeterminism. Define
31
where truth is interpreted in classical Tarski semantics, and define
32
(Barlag et al., 30 Sep 2025). The paper proves that 33 is complete, under the specified “non-arithmetic” reductions, for 34 (Barlag et al., 30 Sep 2025).
Membership follows because for an existential first-order sentence 35 one can guess values in 36 for the variables and check 37 in nondeterministic polynomial time by semiring evaluation of the polynomial atoms (Barlag et al., 30 Sep 2025). Hardness is obtained by transforming a semiring propositional formula into a single existential first-order sentence: propositional atoms are replaced by variables, 38 by 39, 40 by 41, literals outside algebraic contexts by tests of the form “42,” and the whole formula is wrapped in existential quantifiers (Barlag et al., 30 Sep 2025). The resulting sentence is true in 43 exactly when the original propositional formula is satisfiable (Barlag et al., 30 Sep 2025).
These two completeness results separate two levels of generality. 44 captures full semiring nondeterministic polynomial time, while 45 captures its restriction to Boolean input languages (Barlag et al., 30 Sep 2025).
6. Examples, special cases, and decidability issues
Several standard semirings appear as illustrative instances. If 46 with 47 and 48, the framework recovers the classical classes 49 and 50, together with the classical forms of Fagin’s and Cook’s theorems (Barlag et al., 30 Sep 2025). If 51 or 52, one obtains the BSS class 53 and its characterization by existential second-order logic in 54-semiring semantics (Barlag et al., 30 Sep 2025). In the Boolean part, one recovers the class 55 of decision problems reducible to the existential theory of the reals (Barlag et al., 30 Sep 2025).
A further example is the tropical semiring
56
where “addition” is 57 and “multiplication” is ordinary addition (Barlag et al., 18 Feb 2025). In this setting, a BSS58 machine performs min-plus recurrences in one step, and branch nodes compare distances (Barlag et al., 18 Feb 2025). The same source states that many classical shortest-path or dynamic-programming procedures can be written as BSS59 programs whose running time corresponds exactly to the number of graph edges (Barlag et al., 18 Feb 2025).
Decidability behavior depends strongly on the underlying structure. Over an arbitrary first-order structure, even the halting problem of a BSS-RAM can be undecidable (Gaßner, 24 Feb 2025). Over a finite semiring, every BSS-RAM runs in bounded time and halts on every input, so every predicate is decidable (Gaßner, 24 Feb 2025). Over infinite but effectively presented semirings such as the integers, polynomials, or real algebraic numbers, one can often simulate a Turing machine and obtain the usual semi-decidable but not decidable problems (Gaßner, 24 Feb 2025). Over a field of characteristic 60 with exact equality, the bounded-time hierarchy 61 raises analogues of the classical 62 versus 63 question, described there as open (Gaßner, 24 Feb 2025).
Taken together, these examples show that the semiring formulation is not a single complexity theory but a uniform schema. The machine primitives remain fixed—addition, multiplication, constants, equality or order tests, and control flow—while the computational interpretation varies with the algebraic properties and effective presentation of 64 (Gaßner, 24 Feb 2025, Barlag et al., 18 Feb 2025, Barlag et al., 30 Sep 2025). A plausible implication is that the semiring viewpoint is best understood as a common language connecting Boolean, numeric, tropical, and other algebraic computation models rather than as a replacement for any one of them.