A Reduct-and-Closure Algorithm for Graphs

The transitive closure of (V,E) is the graph Clos(V,E) = (V,C) where (x,y) £C iff there is a path p:x-~y in (V,E) with ILpil>0. The transitive reduct Red(V,E) of an acyclic graph (V,E) is the least graph (V,R) with Clos(V,R) = Clos(V,E) . The number o f e l emen t s o f a f i n i t e s e t X w i l l be denoted t h r o u ghout by IX1 . If Alg is an algorithm processing graphs, Time (Alg(V,E)) denotes the number of steps taken by Alg to process (V,E) . We write Time(Alg(V,E)) ~ 0(f(V,E)) , for a function f:K -~ N from some class of graphs to the non-negative integers N , if there exists ceN such that the inequality Time(Alg(V,E)) ~ c.f(V,E) holds for all (V,E)~ K . We then also say that Alg needs O(f(V,E)) time to process a member (V,E) of K , or that Alg has the time complexity O(f) on K . The main objective of the present note is to describe an algorithm Recl computing simultaneously both Red(V,E) and Clos(V,E) , for (V,E) acyclic, with the time complexity Time(Recl(V,E)) ~ O(IV I .~R~+ +lE l ) comparing f a v o r a b l y wi th the a l g o r i t h m s d e s c r i b e d i n [1~ , [2J , [ 5S , [6]. We also describe some useful modifications of this basic algorithm.