How do I find the intersection of subgraphs in a directed acyclic graph efficiently? I have a directory structure in which each directory can have multiple parents (IOW, a cd .. is ambiguous).  AFAICS this means this is equivalent to a directed acyclic graph.

Now, a set of directories (aka vertices) is given.  I need to know all directories which are below all of those given directories.  Thus, I need the intersection of subgraphs.

In my case, getting the set of sub-directories is a rather costly operation.  However, I can do it in parallel, i.e. I can do ls on multiple directories at the same time.

While one can easily think of a brute-force algorithm to do that (collect all vertices in sets, find the intersection of the sets) I wonder whether these is a more efficient algorithm.
The more efficient algorithm you're looking for is breadth/depth-first search.