Re: Concurrency in an RDB
Date: 29 Dec 2006 12:23:50 -0800
Message-ID: <1167423830.038947.326860_at_a3g2000cwd.googlegroups.com>
NENASHI, Tegiri wrote:
> "Aloha Kakuikanu" <aloha.kakuikanu_at_yahoo.com> wrote in
> > In matrix language transitive closure is exponent. Exponent is
> > important operator but not basic algebraic operation like addition and
> > multiplication.
>
> What is the mathrix language ? How you write the transitive closure in the
> matrix language ?
Consider adjacency matrix of a graph. It's a square matrix with dimensions equal to the number of nodes. It is conventional to enumerate graph nodes with numbers from 1 to N, therefore, matching nodes with matrix columns and rows. With this arrangement matrix entry aij naturally correspond to an edge from node i to node j. If there is indeed such an edge in a graph, then we define a_ij=1; otherwise, a_ij=0.
For our purposes the powers of adjacency matrix are especially interesting. The entry in column i and row j of the adjacency matrix raised in the n-th power is the number of paths of length n from node i to node j.
Given transitive closure series matrix Ta, if we just change any nonzero number into 1, then we'll obtain an adjacency matrix!
Next, let's arrange the matrix powers sum a little bit differently
Ta = 1 + (A + A^2 + ...) = 1 + A(1 + A + A^2 + ...)
The series in the parenthesis, is again TA, hence
Ta = 1 + A Ta
could be written as
Ta = (1 - A )^(-1)
Therefore we can apply this method to calculate transitive closure even
in the case when power series is infinite. There is a snag, however.
Not every matrix can be inverted! Technically, matrix should be free of
0 eigenvalues.
A natural way to overcome this difficulty is to introduce a variable scalar factor "lambda":
Ta = 1 + lambda A + lambda^2 A^2 + ...
, because for adjacency values all nonzero values are equivalent. (The rigorous way to fix this is to switch to <min,+> algebra aka tropical arithmetics). Then we could select lambda such that matrix has no deficient eigenvalues.
A more elegant way to handle this problem is to introduce constant factorial coefficients:
Ta = 1 + A + A^2/2 + A^3/6 + ...
Now Ta is well defined for any graph, and it is formally a matrix exponent. Received on Fri Dec 29 2006 - 21:23:50 CET