Invariant algorithms for the F(n, f) graph.