Ahahahahah :-) Beautiful problem ! Not really a graph problem, but a beautiful problem.
What do you think of this ? http://www.sagemath.org/doc/reference/sage/combinat/designs/block_design.html#sage.combinat.designs.block_design.steiner_triple_system Does it sound familiar ? But then it only works for cards with 3 pictures on it. The trouble is that what you are looking for is not exactly straightforward to produce... http://en.wikipedia.org/wiki/Block_design#Definition_of_a_BIBD_.28or_2-design.29 You will find some solutions there : http://designtheory.org/database/t-designs/ You are interested in the following values : t = 2 (because you have a condition on PAIRS of elements) L = 1 (because only ONE card must contain both symbols at the same time) v (the total number of elements) k (the number of elemens on each card) By the way, Sage's documentation points toward this file, which may interest you : http://www.utu.fi/~honkala/designs.ps .... Oh, and having more of this kind of stuff inside of Sage would be really, really, REALLY great :-) Have fuuuuuuuuuuuuuuuuuuun ! Nathann -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en.