Second, the Bellman–Ford algorithm is used, starting from the new vertex q, to find for each vertex v the minimum weight h(v) of a path from q to v. If this step detects a negative cycle, the algorithm is terminated.
Drugo, algoritam se koristi, počevši od novog čvora q, da nađe za svaki čvor v minimalnu težinu h(v) puta od q do v. Ako ovaj korak otkrije negativni ciklus, algoritam se prekida.