Algorithm 3.
Main steps for generating common ancestors for all and only pairable nodes. Here (V, E) is the input graph with V the set of nodes, and E the set of edges. qi(u, υ) is the set of common ancestors for nodes u and υ computed up to step i. Note that when i = 0, q0(u, υ)represents the initialization result (lines 1–8), computed before the main phase (lines 9–18).
