I have some code that generates all combinations from something like this:
[the or a] and [angry or mad or furious] and [cat or feline]
the angry cat the mad cat the furious cat the angry feline the mad feline the furious feline a angry cat a mad cat a furious cat a angry feline a mad feline a furious feline
The problem is that this cross product may become too large, in which case I would like to fairly sample as many combinations as possible in a given time limit. This is very similar to balanced gray codes but the parity is not the same for each "digit".
The obvious algorithms (e.g. Breadth-First search and Depth-First search) will oversample some combinations and completely ignore others which probabilistic sampling like monte-carlo will evenly sample all combinations very well but it cannot efficiently enumerate all combinations. Does anyone know of any algorithm for solving this problem?