Ask Your Question

Revision history [back]

Not that you are not iterating over all graphs on \{0,...,9\}, but on all isomorphism classes of graphs, which is a much harder task. I do not check the internals of the algorithm, but one can imagine that at some points, it has to backtrack or search a lot before finding a new graph, that was not found before.

Note that there is a faster alternative using nauty library, you can replace graphs(10) with graphs.nauty_geng(10).

Not that you are not iterating over all graphs on \{0,...,9\}, {0,...,9}, but on all isomorphism classes of graphs, which is a much harder task. I do not check the internals of the algorithm, but one can imagine that at some points, it has to backtrack or search a lot before finding a new graph, that was not found before.

Note that there is a faster alternative using nauty library, you can replace graphs(10) with graphs.nauty_geng(10).

Not that you are not iterating over all graphs on {0,...,9}, but on all isomorphism classes of graphs, which is a much harder task. I do did not check the internals of the algorithm, but one can easily imagine that at some points, it has to backtrack or search (or search) a lot before finding a new graph, that was not found before.

Note that there is a faster alternative using nauty library, you can replace graphs(10) with graphs.nauty_geng(10).

Not Note that you are not iterating over all graphs on {0,...,9}, but on all isomorphism classes of graphs, which is a much harder task. I did not check the internals of the algorithm, but one can easily imagine that at some points, it has to backtrack (or search) a lot before finding a new graph, that was not found before.

Note that there is a faster alternative using nauty library, you can replace graphs(10) with graphs.nauty_geng(10).