First implementation of SAP using BreadthFirstDirectedPaths