  We define persistent homology groups over any set of spaces which have
inclusions defined so that the corresponding directed graph between the spaces
is acyclic, as well as along any subgraph of this directed graph. This method
simultaneously generalizes standard persistent homology, zigzag persistence and
multidimensional persistence to arbitrary directed acyclic graphs, and it also
allows the study of more general families of topological spaces or point-cloud
data. We give an algorithm to compute the persistent homology groups
simultaneously for all subgraphs which contain a single source and a single
sink in $O(n^4)$ arithmetic operations, where $n$ is the number of vertices in
the graph. We then demonstrate as an application of these tools a method to
overlay two distinct filtrations of the same underlying space, which allows us
to detect the most significant barcodes using considerably fewer points than
standard persistence.
