Find edges that can be on a path between nodes