I have had this interesting problem come up at work and it seems like the sort of problem that might have a well known solution, apologies in advance if some of my terminology is wrong or confusing. I have a set of inputs and a set of outputs, each input connects to every output except when specified in a dictionary which associates an output to a list of inputs which cannot be connected to it. Since it is expected that most inputs will connect to most outputs so it saves memory to only store when an input can't connect to a particular output. I want to build a set of the minimum amount pairs of lists like:pair<list<Output>, list<Input>> where all the outputs can be connected to the inputs. so as an example inputs are [a, b, c, d] and outputs are [A, B, C, D] wherewe have a map of outputs which cannot be connected to certain inputs:A -> [a, b]B -> []C -> []D -> [c, d]so in this case we'd have pairs: ([c, d], [A, B, C])([a, b, c, d], [B]) ([a, b, c, d], [C]) ([a, b], [B, C, D])Which can be reduced to the minimum 'spanning' set:([c, d], [A, B, C])    ([a, b, c, d], [B, C]) ([a, b], [B, C, D])For practical considerations there are typically expected to be on the order of 10 or so outputs and several thousand inputs. 
Is there a general solution to this mapping problem?
algorithms