Report Number: CS-TR-79-734
Institution: Stanford University, Department of Computer Science
Title: Fast algorithms for solving path problems
Author: Tarjan, Robert Endre
Date: April 1979
Abstract: Let G = (V,E) be a directed graph with a distinguished source
vertex s. The single-source path expression problem is to
find, for each vertex v, a regular expression P(s,v) which
represents the set of all paths in G from s to v. A solution
to this problem can be used to solve shortest path problems,
solve sparse systems of linear equations, and carry out
global flow analysis. We describe a method to compute path
expressions by dividing G into components, computing path
expressions on the components by Gaussian elimination, and
combining the solutions. This method requires O(m
$\alpha$(m,n)) time on a reducible flow graph, where n is the
number of vertices in G, m is the number of edges in G, and
$\alpha$ is a functional inverse of Ackermann's function. The
method makes use of an algorithm for evaluating functions
defined on paths in trees. A simplified version of the
algorithm, which runs in O(m log n) time on reducible flow
graphs, is quite easy to implement and efficient in practice.
http://i.stanford.edu/pub/cstr/reports/cs/tr/79/734/CS-TR-79-734.pdf