Assume we have trillions of sets stored somewhere. The domain for each of these sets is the same. It is also finite and discrete. So each set may be stored as a bit field (eg: 0
A quick glance make me think of BDDs - which is somewhat along the idea of the DAG solution. Alternatively a ZDD.