Fast and scalable methods for answering reachability queries