Say, given a $4\times 4$ grid with black and white dots on vertices. Each dot can form one (and only one) bond with a nearest dot of opposite color. Suppose every dot is guaranteed to find its other part. For one set of dot arrangement there can be many valid bond configurations. Question: an efficient algorithm to find all configurations?
For example, the following are 2 valid configurations of the same chessboard grid. How to find all others efficiently?
In such a simple form I guess this may be a classic problem for algorithm or graph theory courses, but I don't even know what's the keyword to search. I was thinking about exhaustive method: loop over all dots, bookkeeping all bonds(T/F) and reject conflicts during the process; it was, of course, exhaustive.
Another example using $2\times 2$ chessboard grid. There are only 2 valid solutions.
O--X or O X | | X--O X O