Let $G$ - be an undirected graph (not necessary connected) with up to $n=9$ vertices, and $[G]$ - a set of all graphs isomorphic to $G$. Is there a decent algorithm for a function $f: [G] \to [G]$ which acts as follows: graphs $G$ and $H$ are isomorphic iff $f(G) = f(H)$. Thus $f(G)$ finds a representative graph for $[G]$.
I understand that this problem can be solved in $O(n!)$ time. In general this can be optimized by sorting vertices by the number of adjacent edges. Due to considerably small number of vertices, it is possible to generate some tables and other helper structures beforehand, but I just can't figure out an algorithm which would benefit of these pre-cached structures.