I appreciate that this is not exactly a trivial problem. My approach so far has been to create a graph with $B+W$ vertices and initially no edges, making the first $B$ vertices black and the next $W$ vertices white. Then, connect each of the black vertices to two of the white vertices, such that each white vetex is connected to three black vertices (at least two of which are distinct). Check that the resulting graph is connected. Then use a cycle algorithm (such as the one herehere) to identify all the cycles of the graph starting at white vertices which do not backtrack, i.e. which do not go from a white vertex to a black vertex and back to a white vertex again, unless the intermediate black vertex is only connected to the initial white vertex. If those cycles have edge numbers given by the $2r_{\infty}\left(k\right)$, then draw the graph and move onto the next permutation of connections between the black vertices and white vertices. Else, just move onto the next permutation of connections between the black vertices and white vertices.
J. M.'s missing motivation
- 125.5k
- 11
- 407
- 581