![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Viterbi (max-times) m-semiring over \([0,1]\). More...


Go to the source code of this file.
Classes | |
| class | semiring::Viterbi |
The Viterbi (max-times) m-semiring over double. More... | |
Namespaces | |
| namespace | semiring |
Viterbi (max-times) m-semiring over \([0,1]\).
The Viterbi m-semiring ( \([0,1]\), \(\max\), \(\times\), 0, 1) is used to model most-likely-derivation provenance: input gates carry probabilities, \(\oplus = \max\) keeps the most likely derivation, and \(\otimes = \times\) multiplies probabilities along a derivation.
Operations:
zero() → 0one() → 1plus() → maximum of all operands (empty list → 0)times() → product of all operands (empty list → 1)monus() → 0 if \(a \le b\), \(a\) otherwisedelta() → 1 if x is non-zero, else 0Absorptivity: absorptive() returns true. With inputs in \([0,1]\), \(\mathbb{1} \oplus a = \max(1, a) = 1\). The circuit evaluator may exploit the resulting idempotency to deduplicate operands.
instSemiringWithMonusViterbi, with proofs of Viterbi.absorptive, Viterbi.idempotent, and Viterbi.mul_sub_left_distributive. Definition in file Viterbi.h.