Decidability of Livelock Detection for Parameterized Self-Disabling Unidirectional Rings
We prove that livelock detection is \emph{decidable in polynomial time} for parameterized symmetric unidirectional rings of self-disabling processes with bounded domain $\mathbb{Z}_m$. Given a protocol specified by its set of local transitions $T$, the algorithm decides whether a livelock exists for \emph{some} ring size $K!\geq!2$, running in $O(|T|^3)$ time independent of $K$. The algorithm computes the greatest fixed point of a deflationary monotone operator on the finite set $T$ and returns \emph{livelock} iff the fixed point is non-empty. The livelock freedom argument rests on maximality: the fix-point is the largest set of transitions that can together sustain a pseudolivelock at every process; its emptiness certifies freedom for all $K$ without any search over ring sizes. The work is grounded in the algebraic characterization of livelocks from Farahat~\citep{farahat2012}, which establishes necessary and sufficient conditions for livelock existence but does not address decidability. We also handle the $(1,1)$-asymmetric case in which one distinguished process $P_0$ differs from the remaining $K!-!1$ identical processes. Code and algebraic foundation are at the URL: https://github.com/cosmoparadox/mathematical-tools.
💡 Research Summary
The paper addresses the long‑standing verification problem of livelock freedom in self‑disabling protocols running on unidirectional rings whose size K is a parameter. A process holds a state variable in the bounded domain ℤₘ, reads its predecessor’s value and its own value, and may fire a transition t = (v, w, w′) when the predecessor equals v and the local value equals w, writing w′ back to its own variable. The self‑disabling restriction forbids any transition whose own value equals the written value of another transition sharing the same predecessor value, guaranteeing that once a transition fires the process cannot immediately fire another enabled transition with the same predecessor value.
The authors build on Farahat’s algebraic characterization of livelocks, which describes a livelock as a triple (H, E, L) where H is a pseudolivelock graph on a set of transitions L, E is a propagation relation linking a predecessor transition to a successor transition, and the two satisfy three conditions: (F1) every transition of L lies on a directed cycle of H, (F2) every transition participates in at least one propagation arc, and (F3) the “equivariance” law H ∘ E = E ∘ H holds at every process interface. Farahat proved that any such witness yields an actual infinite execution on a concrete ring size, but he did not give an algorithm to decide whether a witness exists.
The contribution of this work is a concrete, polynomial‑time decision procedure that works for all symmetric rings (all processes run the same protocol T) and for the (1, 1) asymmetric case (one distinguished process P₀ runs T₀, the others run T_other). The algorithm operates solely on the finite transition set T, independent of the unknown ring size K.
Two graph‑theoretic operators are defined on any subset S ⊆ T:
-
Pseudolivelock operator PL(S) – construct the directed graph H(S) whose vertices are the transitions in S and whose edges are tᵢ → tⱼ whenever tⱼ.own = tᵢ.written. PL(S) returns the union of all strongly connected components of H(S) that contain a directed cycle (size ≥ 2 or a self‑loop). This can be computed with Tarjan’s SCC algorithm in O(|S|²) time.
-
Shadow operator Shad(P) – for a set P of transitions, examine each edge tᵢ → tⱼ of H(P) and collect the pair (tᵢ.pred, tⱼ.pred). The resulting set of (own, written) pairs represents the exact predecessor‑value changes that must be realized by the preceding process in order to sustain the forward propagation of the edge.
Using Shad, a filter operation Filter(S,R) keeps only those transitions of S whose (own, written) pair belongs to the requirement set R. In the context of a candidate pseudolivelock P, Filter(S, Shad(P)) extracts precisely those predecessor transitions that can act as “shadow witnesses” for the edges of P.
The central monotone, deflationary operator is then
Φ(S) = PL( Filter( S, Shad( PL(S) ) ) ).
Intuitively, Φ first discards transitions that cannot belong to any cycle, then computes the shadow requirements imposed by the remaining cycles, and finally removes any transition that does not satisfy those requirements, repeating the process until a fixed point is reached. Because Φ is monotone and shrinking, the Knaster‑Tarski theorem guarantees a greatest fixed point L* = ν S. Φ(S), reachable in at most |T| iterations. Each iteration costs O(|T|²), yielding an overall O(|T|³) bound that does not depend on K.
Algorithm 1 (symmetric case) starts with S ← T and repeatedly applies Φ. If at any iteration PL(S) becomes empty, the algorithm terminates early and returns “FREE”, certifying livelock‑free behavior for all ring sizes K ≥ 2. Otherwise, when convergence is reached, a non‑empty L* is reported as “LIVELOCK”. The authors prove soundness (L* ≠ ∅ ⇒ a Farahat witness (H*, E*, L*) can be constructed, and by Farahat’s Circulation Law a concrete livelock exists) and completeness (any livelock yields a Farahat witness whose transition set is a pre‑fixed point of Φ, hence contained in L*; therefore L* must be non‑empty).
Algorithm 2 (1, 1 asymmetric case) runs a joint fixed‑point computation on the two protocol sets T₀ and T_other. It alternates between constraining T_other using the shadow of the current L₀ and recomputing L₀ using the shadow of the updated L_other, invoking Algorithm 1 as a warm‑started subroutine. The loop stops when both sides stabilize; emptiness of either side again yields “FREE”, otherwise “LIVELOCK”.
The paper supplies detailed lemmas:
- Lemma 1 (Farahat’s characterization) – the three necessary and sufficient conditions for a livelock.
- Lemma 2 (Circulation Law) – any witness yields a concrete ring size and infinite execution.
- Lemma 3 – every Farahat witness’s transition set L satisfies L ⊆ Φ(L), i.e., it is a pre‑fixed point.
- Lemma 4 – if L* ≠ ∅ then (H*, E*, L*) satisfies Farahat’s conditions.
- Lemma 5 – termination and O(|T|³) complexity.
- Theorem 6 – the main result: decidability in polynomial time, independent of K.
The authors also discuss implementation details (the code repository) and note that the technique extends to more general (l, q) asymmetric rings, which will be treated in a companion paper.
In summary, the work transforms an existential algebraic description of livelocks into an effective, parameter‑free decision procedure. By focusing on the finite transition space and exploiting SCC‑based cycle detection together with a precise “shadow” back‑propagation condition, the authors achieve a deterministic O(|T|³) algorithm that either produces a concrete livelock witness or certifies livelock freedom for all ring sizes. This resolves a previously open decidability question for a substantial class of self‑stabilizing protocols and opens the door to applying similar fixed‑point techniques to broader classes of parameterized distributed systems.
Comments & Academic Discussion
Loading comments...
Leave a Comment