Fast and scalable methods for answering reachability queries
C++
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
sample
src
LICENSE
Makefile
README.md
sample.graph

README.md

Pruned Labeling for Reachability Queries

What is this?

This is an implementation of Pruned Labeling methods for reachability queries on directed graphs. A reachability query (s, t) asks if there is a path between two nodes s and t. Our program quickly answers reachability queries on a given graph by precomputing an index.

Our methods "Pruned Landmark Labeling" and "Pruned Path Labeling" are provided as C++ classes, RQPrunedLandmarkLabeling and RQPrunedPathLabeling. Please see sample/benchmark.cpp for the detailed usage.

Running a sample program

$ make
$ ./benchmark < sample.graph

An input (directed) graph file should be given in the following format:

  • The first line contains #vertices and #edges separated by a space.
  • The (i+1)-th line (0 <= i < |V|) contains indexes of vertices which are adjacent to the i-th vertex, separated by a space. (0-indexed)
  • The input graph can contain cycles.

References