P200: Enumeration of all stories in a graph

P200: Enumeration of all stories in a graph
Input:
A directed graph $G = (V, E, S, T)$ that has the set of source vertices $S$ and the set of target vertices of $T$.
Output:
All stories in $G$.
Complexity:
Comment:
A \textit{pitch} $P$ of $G$ is a set of arcs $E' \subseteq E$, such that the subgraph $G' =(V', E')$ of $G$, where $V' \subseteq V$ is the set of vertices of G having at least one out-going or in-coming arc in $E'$, is acyclic and for each vertex $w \in V' \setminus S$, $w$ is not a source in $G'$, and for each vertex $w \in V' \setminus T$ ,$w$ is not a target in $G'$. $P$ is a \textit{story} if $P$ is maximal.
Reference:
[Acuna2012] (Bibtex)