Algorithm to find all (up to isomorphism) perfect matchings of quartic plane graphs I need to find all (up to isomorphism) perfect matchings of some quartic plane graphs. I haven't found any specific algorithm to give me all the perfect matchings. Does anybody know about such an algorithm or any results that could be useful when implementing such an algorithm? At the moment I can only think of a branch-and-bound approach.
I don't really expect there to be an algorithm for this specific case, but I thought I'd mention all properties of the graphs. Maybe there are results for plane graphs, planar graphs or quartic graphs.
 A: OK, here is a way which uses my other answer:


*

*Number the edges of your graph in some order.

*Check if your graph $G$ has a perfect matching.

*If no, return $\emptyset.$

*Add the lowest number edge to the matching, delete the edges incident to the endpoints. Call the resulting graph $G^\prime.$

*Recursively, return all the matchings in $G^\prime$ (union the first edge).

*Now, use the second lowest-numbered edge as the first edge.

*Halt when the total number of edges left is smaller than half the number of vertices.


Note that this algorithm (using the algorithms referenced in my other answer) will run in something like $n^{3/2}$ times the number of actual perfect matchings, which is pretty good. Those who care about such things will recognize the algorithm as a simple backtracking algorithm (as used in e.g. the $N$-queens problem).
A: The answer which is useful to you may depend on the details, so it would be good to have more. You mention isomorphism, quartic (regular of degree 4) and planar. Each of these could be important or ignored.
"Up to isomorphism"


*

*The jokey answer is that all graphs with $v/2$ disjoint edges are isomorphic so you just have to find if you have one! But that isn't what you mean.

*If you know some automorphisms that could speed things up quite a bit. You might be able to efficiently list all the matching types for  antiprisms up to a large size. ditto for the two kinds of prisms with a cupola on each end.   

*If you need to discover the automorphism group of a 14-30 vertex graph then there are various packages to do that but it is a big discussion.

*I'll just consider listing all the perfect matchings without worrying about isomorphism.


"Planar" There are various decompositions for planar graphs which can speed calculations. 


*

*If it happens that your graph is made of two or more disjoint connected components then you have to find all the perfect matchings for each piece and then you can say "take one from column A, one from column B and one from column C" (or actually do it.) 

*Of course you may have only connected graphs, but if your graph has a bridge  then you can decide not to use it and do what was described above and then also decide to use it , remove the endpoints and do as above. 

*Actually, only one (at most) of those two things will leave an even number of unmatched vertices on each half so that is all you have to do. 

*There are fast algorithms to find all the bridges (giving a tree like structure) and all the cutpoints 

*other decompositions might identify 3-connected blocks joined by a pair of edges or even more exotic things. This could be overkill for 20 vertices. But if a cutset of $j$ edges is found then one has $2^j$ ways to split into a pair of simpler problems. If $j$ is small, the sub-problems have about half the number of vertices and several of the sub-problems can be discarded as infeasible, this can be quite effective.
4-regular Maybe there are theorems about such beasts although after a partial matching you are stuck with one or more graphs with degrees at most 4.
Exact Cover Without explicitly saying anything about being planar or 4-regular or even a graph, perfect matching is a special case of the exact cover problem (as are sudoku, n-queens and many other problems). Even if you are going to do an exhaustive search there are more and less clever ways to do it. the dancing links algorithm of Donald Knuth is a  depth first search using doubly linked circular lists for very efficient backtracking . It can be set to choose each step as one which may be most productive (if a vertex only has one edge on it, put that in the matching before doing anything else, etc.)
Of course if a sub-problem has an odd number of vertices then it is time to backtrack, there may be productive preprocessing such as the decompositions above.  
A: I'll just address the "up to isomorphism" requirement, assuming you have an algorithm for making all the perfect matchings. I'm assuming you are only consider embedding-preserving automorphisms. A connected plane graph with $m$ edges has at most $4m$ embedding-preserving automorphisms, and in most interesting classes (such a quartic graphs) most graphs have only the trivial automorphism.  Make a complete list of automorphisms by starting a BFS (or DFS) scan starting at each flag.  Then for each perfect matching $M$, reject it if there an automorphism $g$ such that $g(M)$ is lexicographically less than $M$.  Since most graphs except very small ones have only the identity automorphism, the overall cost of this is approximately zero.  For the same reason, it is a waste of time to consider the automorphisms during the perfect matching generation, unless you are working on a class of graphs where automorphisms are common.
A: This paper (maximum matching in planar graphs using Gaussian Elmination, by Mucha-Sankowski, J. Algorithms 2006) shows how to generate matchings uniformly at random, which, for a graph of any reasonable size is far more useful than generating all the matching (which, as Henry points out, is not useful once the size of the graph is bigger than a couple of dozen).
A: I want to mention that you can exploit your favorite symbolic algebra package to do this job for smallish graphs. I've used this method successfully for graphs with 20-30 vertices. 
The FKT algorithm expresses the number of matchings of a planar graph as a pfaffian, where each nonzero entry of the matrix is $\pm 1$, corresponding to an edge $e$ of the graph. Write down the same matrix but replace $\pm 1$ by $\pm x(e)$, where $x(e)$ is a formal variable corresponding to the edge $e$, and ask your favorite computer algebra package to take the determinant. The result will be $\sum_M \prod_{e \in M} x(e)$, where the sum is over all matchings $M$. So you can look at the output and immediately read off your matchings.
This is most useful when the graph is bipartite, as the Pfaffian then simplifies to a determinant, and where the graph is small and/or symmetric enough to carry out the orientation part of the algorithm by hand.
