Consider n equations involving n+1 variables. with aij elements in a ring or semiring R. The free variablex0 corresponds to a source vertexv0, thus having no defining equation. Each equation corresponds to a fragment of a directed graph G= as show in the figure. The edge weights define a function f from E to R. Finally fix an output vertex vm. A signal-flow graph is the collection of this data S =. The equations may not have a solution, but when they do, with T an element ofR called the gain.
Successive Elimination
Return Loop Method
There exist several noncommutative generalizations of Mason's rule. The most common is the return loop method, having a dual backward return loop method. The first rigorous proof is attributed to Riegle, so it is sometimes called Riegle's rule. As with Mason's rule, these gain expressions combine terms in a graph-theoretic manner. They are known to hold over an arbitrary noncommutative ring and over the semiring of regular expressions.
Formal Description
The method starts by enumerating all paths from input to output, indexed by jJ. We use the following definitions:
The j-th path product is a tuple of kj edge weights along it:
To split a vertex v is to replace it with a source and sink respecting the original incidence and weights.
The loop gain of a vertex v w.r.t. a subgraph H is the gain from source to sink of the signal-flow graph split at v after removing all vertices not in H.
Each path defines an ordering of vertices along it. The along path j, the i-th FRL node factor is −1 where Si is the loop gain of the i-th vertex along the j-th w.r.t. the subgraph obtained by removing v0 and all vertices ahead of it.
The contribution of the j-th path to the gain is the product along the path, alternating between the path product weights and the node factors: so the total gain is
An Example
Consider the signal-flow graph shown. From x to z, there are two path products: and. Along, the FRL and BRL contributions coincide as both share same loop gain : Multiplying its node factor and path weight, its gain contribution is Along path, FRL and BRL differ slightly, each having distinct splits of vertices y and z as shown in the following table. Adding to Td, the alternating product of node factors and path weights, we obtain two gain expressions: and These values are easily seen to be the same using identities −1 = b−1a−1 and a−1=−1a.
Applications
Matrix Signal-Flow Graphs
Consider equations and This system could be modeled as scalar signal-flow graph with multiple inputs and outputs. But, the variables naturally fall into layers, which can be collected into vectors x=t y=t and z=t. This results in much simpler matrix signal-flow graph as shown in the figure at the top of the article. Applying the forward return loop method is trivial as there's a single path product with a single loop-gain B at y. Thus as a matrix, this system has a very compact representation of its input-output map
Finite Automata
An important kind of noncommutative signal-flow graph is a finite state automaton over an alphabet. Serial connections correspond to the concatenation of words, which can be extended to subsets of the free monoid. For A, B Parallel connections correspond to set union, which in this context is often written A+B. Finally, self-loops naturally correspond to the Kleene closure where is the empty word. The similarity to the infinite geometric series is more than superficial, as expressions of this form serve as 'inversion' in this semiring. In this way, the subsets of built of from finitely many of these three operations can be identified with the semiring of regular expressions. Similarly, finite graphs whose edges are weighted by subsets of can be identified with finite automata, though generally that theory starts with singleton sets as in the figure. This automaton is deterministic so we can unambiguously enumerate paths via words. Using the return loop method, path contributions are:
path ab, has node factors, yielding gain contribution
path ada, has node factors, yielding gain contribution
path ba, has node factors, yielding gain contribution