single E-subpath algorithm