arXiv:2611.07781cs.FLNov 2026

Manuscript Offprint

arXiv:2611.07781

Reliability-Aware Z-Grammars and Z-Automata over a Credible-Grade Semiring

Sherzod Turaev, Nor Haniza Sarmin, Wan Heng Fong

OVER A CREDIBLE-GRADE SEMIRING

Sherzod Turaev*

Department of Computer Science and Software Engineering College of Computing and Artificial Intelligence United Arab Emirates University Al Ain, United Arab Emirates sherzod@uaeu.ac.ae

Nor Haniza Sarmin†

Department of Mathematical Sciences, Faculty of Science Universiti Teknologi Malaysia Johor Bahru, Malaysia nhs@utn.my

Wan Heng Fong‡

Department of Mathematical Sciences, Faculty of Science Universiti Teknologi Malaysia Johor Bahru, Malaysia fwh@utn.my

November 6, 2026

Abstract

Fuzzy grammars and weighted automata usually attach to each word a single grade, which records how strongly the word is generated but not how far that record can be trusted. We study weighted grammars and finite automata whose weights are scalar grade-reliability pairs inspired by Z-numbers. Sequential composition multiplies both components, while aggregation selects a derivation by its credible grade, the product of grade and reliability, with ties resolved by grade. On the canonical carrier, in which the weights of zero grade or zero reliability are identified with zero, the resulting structure is a commutative selective semiring, isomorphic to a subsemiring of a lexicographically ordered product, and its credible-grade projection is a homomorphism onto the Viterbi semiring. We compare several alternative combination rules and identify the carriers on which the relevant algebraic laws hold. Standard results on weighted automata then yield a rational characterization and closure properties. We prove that positive credible-grade cuts and selected-run reliability filters of finite automata are regular and effectively constructible for rational weights and thresholds, and we exhibit distinctions that the scalar projection cannot see: a reliability filter that no scalar reweighting of the same one-state automaton implements, nonmonotonicity under the addition of runs, and an unambiguous automaton with no deterministic equivalent although its scalar projection is deterministic. A count-based example illustrates an attestation penalty for grammar rules. The construction concerns scalar pairs, and its extension to arbitrary fuzzy-valued Z-numbers remains open.

*Corresponding author. ORCID: 0000-0001-6661-8469. †ORCID: 0000-0003-4291-5746. ‡ORCID: 0000-0001-8202-4388.

Keywords Z-numbers · weighted automata · fuzzy grammars · selective semiring · reliability-aware parsing · formal power series

1 Introduction

The theory of formal languages has, from early in its history, been generalized so that a grammar or an automaton carries not only the bare fact that a word belongs to a language but a quantity attached to that word. The fuzzy grammars of Lee and Zadeh [1] graded each production by a membership degree and read the membership of a word as the best such degree along a derivation. The weighted automata that Schützenberger [2] introduced in the same period assigned to each transition an element of a semiring and computed the behavior of the automaton as a formal power series. The modern synthesis collected these and many other developments into a single theory of weighted automata over an arbitrary semiring, within which fuzzy, probabilistic, and distance-based devices are recovered by a choice of the weight structure [3]. In the fuzzy and probabilistic instances that motivate the present work, the weight is a single number, whether a membership grade, a probability, a cost, or a value in a lattice-ordered monoid [4], and it records how strongly a word is generated. Multicomponent weights are not new in themselves, since product, lexicographic, and derivation-carrying semirings attach several quantities to a path [5, 6], and intuitionistic fuzzy automata carry a degree of membership together with a degree of nonmembership [7]. In none of these, however, does the second component qualify how far the first can be trusted.

A single number is not always an adequate record of what is known about a quantity. In the elicited judgments on which decision models increasingly rely, and in the estimates that data-driven systems derive from finite samples, a value arrives together with an indication of how far it is to be trusted, and the two should not be collapsed into one. Zadeh [8] proposed the Z-number as the formal device for exactly this pairing. A Z-number Z=(A,B)Z = (A, B) attaches to a variable a fuzzy restriction AA, the imprecise value itself, together with a second fuzzy quantity BB that measures the reliability of that restriction, understood as a graded constraint on the probability that the variable indeed satisfies AA. The construction has been developed into a full arithmetic and a decision calculus [9, 10] and applied across the quantitative decision sciences. Our own work on sustainable trip planning has used it to attach to the rating of a place a reliability built from the number of reviews behind it, benchmarking that evidence-aware representation against alternative formalisms across a national catalog [11]. In all of this the Z-number is a datum or a decision variable; it has not been asked to pass through a grammar.

The question this paper takes up is whether it can. Formal language theory knows how to carry a grade through a derivation, and the second component of a Z-number is, on its face, just another number in [0,1][0, 1], so one might expect the reliability to ride along beside the grade, each component combined by its own operations as a derivation proceeds. The expectation is sound algebraically and unsound semantically, and the gap between the two is instructive rather than incidental. If grades and reliabilities are each composed along a derivation and each aggregated across competing derivations by their own operations, the result is a product of two semirings and hence a semiring. The pair it reports for an ambiguous word, however, may join the best grade of one derivation to the best reliability of another, and then it describes no derivation of the word at all. A reliability qualifies a particular derivation and must stay attached to it, which requires coupling the two components: the competing derivations are compared, one of them is selected, and its grade and its reliability are reported together. Coupling by selection keeps the reported pair coherent, but it puts the semiring laws at risk, since distributivity then fails at the degenerate weights, in which one component is zero and the other is not. A structure that is not a semiring may lose the agreement of the recognizable and the rational series, the agreement of the run and the initial-algebra semantics, and the decision procedures that make the theory of weighted automata usable, so a naively coupled Z-grammar would be a definition without a theory. Carrying a reliability through a grammar is therefore not a matter of pairing two known constructions. It requires a coupled combination of the two components under which the weights still form a semiring, together with an argument that this combination is faithful to what the reliability is supposed to mean.

The existing generalizations of fuzzy grammars do not address this, because they generalize a different part of the device. The computing-with-words automata of Ying [12], extended to Turing machines by Wang and Qiu [13], replace the input symbols of a fuzzy automaton by words in the sense of linguistic terms, so that the machine reads imprecise observations, while the transition weight remains a scalar grade; the generalization is on the alphabet, not on the weight. Grammars built on type-2 fuzzy sets, whose theory goes back to Mizumoto and Tanaka [14], replace the grade itself by a type-2 membership, a fuzzy set of grades, which is a second order of fuzziness about the value, whereas a Z-number's second component is a reliability about the probability of the first, a different kind of second order altogether. Neither development carries a reliability through a derivation, and neither meets the coupling problem just described, since in neither must a second component stay attached to the derivation it qualifies. The multicomponent semirings mentioned above do carry a second quantity, but it either describes the word on the same footing as the first or merely breaks ties (Section 2.7). To the best of our knowledge, no weighted grammar or automaton whose weights carry the reliability component of a Z-number has been proposed, and the extensions of Z-numbers surveyed by Banerjee, Pal, and Pal [15] include no formal-language model. The construction of such devices is the contribution of this work.

We resolve the problem as follows. We define the Z-grammar and the Z-automaton as weighted devices whose weights are Z-weights, pairs of a grade and its reliability, combined by a weight structure that fixes how the two components compose along a derivation and how competing derivations are aggregated. We study scalar grade-reliability pairs inspired by Z-numbers. The semiring developed below is a model for these pairs; it is not a semiring of arbitrary fuzzy-valued Z-numbers, and no general arithmetic-preserving defuzzification is assumed, so that the fuzzy-valued extension is left open (Remark 3.4). Along a derivation, grades and reliabilities multiply. The multiplicative law for reliabilities admits a probabilistic reading: if the scalar reliability bb of a restriction is read as a probability b=P(X is A)b = P(X \text{ is } A) that the restriction holds, then under an explicit independence assumption between occurrences the probability that all the restrictions used by a derivation hold is the product of their reliabilities (Section 2). Where that assumption cannot be defended, notably when one estimated rule is used more than once, we read the product as a declared path score. Across derivations, the structure selects the derivation of greatest credible grade, the grade discounted by its reliability, and reports its grade and its reliability together. We prove that this reliability-aware credible-grade structure, once its degenerate weights are identified with the zero of the semiring, is a commutative semiring whose credible-grade map is a homomorphism onto the Viterbi semiring. The Z-grammars and Z-automata built over it therefore inherit the theory of weighted automata over a commutative semiring, now carrying a reliability alongside the grade at every step. We then compare it with alternative structures obtained from the same parameter families, and we illustrate with a complete count-based example how the reliability can act as an attestation penalty on grammar rules.

The specific contributions of the paper are the following.

  1. We isolate what the reliability component adds beyond its scalar projection, which is where the results specific to the pair lie. A reliability filter on a one-state Z-automaton cannot be implemented by any positive scalar reweighting of the same skeleton (Proposition 5.12); the filter on the selected run is not monotone under the addition of runs, whereas every upward scalar threshold is (Proposition 5.13); and an unambiguous Z-automaton can have no deterministic equivalent over any commutative semiring containing the Z-weights, although its scalar projection is deterministic (Proposition 5.11). We also prove that the positive credible-grade cuts and the selected-run reliability filters of every finite Z-automaton with rational weights and thresholds are regular and effectively constructible (Proposition 5.7).

  2. We define the Z-grammar and the Z-automaton over grade-reliability pairs and a coupled combination of the two components, the credible-grade structure Z, which multiplies both components along a derivation and selects among derivations by the credible grade, ties broken by grade. On the canonical carrier {0}∪(0,1]2\{\mathbf{0}\} \cup (0, 1]^2 it is a commutative selective semiring, the map (a,b)↦(ab,a)(a, b) \mapsto (ab, a) embeds it into the lexicographic product of two Viterbi semirings, and the credible grade is a semiring homomorphism onto the Viterbi semiring. Neither the embedding nor the semiring laws are new as general theorems, since selective semirings and lexicographic products are classical; what is specific is the choice of the order and of the carrier.

  3. We compare alternative combination rules through a three-parameter family of Z-weight schemes, fixed by a grade law, a path-reliability law, and an aggregation scheme, and identify the carriers on which eight representative structures from these families satisfy the semiring laws. It shows that the separable structure is a semiring on the full carrier but decouples the reported reliability from the selected derivation, that select-by-grade is a semiring on the grade-zero quotient but induces no operation on the double quotient, and that coupling by selection fails distributivity on every carrier examined when grades are combined by the minimum.

  4. We record the rational theory of Z-languages that follows from the semiring laws, namely the Kleene-Schützenberger characterization, the conservative extension of the max-product fuzzy theory, the closure properties, and the regularity of supports; these are standard corollaries and are labeled as such. We prove that the twins property suffices for the determinization of unambiguous Z-automata, leave the ambiguous case open, and locate the boundary at which behavioral equivalence becomes undecidable.

  5. We give a complete count-based example in which the grade of a rule is its maximum-likelihood probability and its reliability is an evidence score that grows with its count. The example shows that this attestation penalty can change the selected analysis; it is not an evaluation of parsing accuracy.

The classification rests on a deliberate methodological choice. Each positive semiring claim is proved in the text, and each distributivity failure among the scalar structures is witnessed by an explicit counterexample, found by exact rational computation over a fixed grid of grades and reliabilities. The grid computation proves no semiring law, since a finite grid cannot; it locates the failures and confirms the proved identities at the grid points, so that the boundary between the semirings and the strong bimonoids is drawn by proofs and checked witnesses rather than by expectation. Two structures that a quick reading would treat alike are separated in this way. The separable structure is a semiring on the full carrier, whereas the select-by-grade structure, which couples the two components, fails distributivity at the weights of grade zero and nonzero reliability and becomes a semiring only on a quotient. The reliability-aware structure is singled out because it is a semiring that keeps the reported pair attached to a single derivation and lets the reliability enter the choice among derivations, not because it was preferred in advance.

The paper is organized as follows. Section 2 recalls fuzzy numbers, Z-numbers, and the background on grammars and weighted automata, and it separates the three readings of reliability that the paper keeps apart. Section 3 defines the Z-weight structure, the Z-grammar, and the Z-automaton and proves the semiring laws. Section 4 compares alternative combination rules and the carriers on which they satisfy these laws. Section 5 develops the rational theory and the results specific to the reliability component, Section 6 gives the count-based example, and Section 7 concludes with the limitations and the open problems.

References (33)