| US 7,492,727 B2 | ||
| Space and time efficient XML graph labeling | ||
| Philip S. Yu, Chappaqua, N.Y. (US); Haixun Wang, Irvington, N.Y. (US); and Hao He, Durham, N.C. (US) | ||
| Assigned to International Business Machines Corporation, Armonk, N.Y. (US) | ||
| Filed on Mar. 31, 2006, as Appl. No. 11/396,502. | ||
| Prior Publication US 2007/0230488 A1, Oct. 04, 2007 | ||
| Int. Cl. H04L 12/28 (2006.01) | ||
| U.S. Cl. 370—255 [370/400; 370/408] | 1 Claim |

| 1. A method for determining node reachability within a graph, wherein the method comprises:
performing a depth-first traversal of a graph to define unique interval labels for each respective node in the graph, wherein
each interval-based label specifies a start and an end, where the start is the node's preorder number and the end is one less
than the node's postorder number in the graph,
assigning, after the performing, a respective unique interval-based label within the unique interval labels to each node within
the graph,
assigning a respective non-tree label to each node in the graph that is connected to another node in the graph by a non-tree
link;
creating a link table of non-tree links, the link table listing each non-tree link between nodes in the graph;
creating a transitive closure of the link table,
adding a link i1→[j2, k2) to a transitive link table if i2∈[j1, k1) for any two links i1→[j1, k1) and i2→[j2, k2) in the link table;
reducing a number of entries in the transitive link table by removing transitive links that are not located at grid points
that correspond to {i |i→[j,k)∈T}×{j|i→[j,k)∈T}, where T is the transitive link table;
computing a transitive link counting function with a first parameter and a second parameter, the function specifying a number
of specified links, wherein each respective specified link has:
a respective source node identifier greater than the first parameter; and
a respective destination with a spanning range encompassing the second parameter;
determining that the first node is reachable from the second node by determining if the difference between a first transitive
link counting function with a first parameter pair and a second transitive link counting function with a second parameter
pair is greater than zero, wherein a first parameter of the first parameter pair is set to a preorder of the first node, a
first parameter of the second parameter pair is set to the adjusted post order of the first node and the second parameter
of the first parameter pair and the second parameter of the second parameter pair is set to a preorder of the second node;
and
providing, based at least in part on data within the link table, an output indicating reachability through a non-tree link
from a first node to a second node within the graph based at least in part on data contained in the non-tree labels.
|