Say A is a set of edges of a graph.
Let B be a subset of A
Let X be a set of matrices.
How do I create a list of all possible ways of distributing X over A such that elements of B always get the identity matrix?
Without the B restriction I was using a combination of "repeat" , "product" and "izip" to do such a distribution.