Adding algorithms to build the path from a routing matrix.