Is there a data indexing technique that speeds up finding subsets of a given set in a collection, or do I always have to scan all of the data?
For example, let's say that I have a collection of sets: (a, b) (b, c) (a, b, c, d) (a, b, c) (b, c, d) (b, e) (d, e, f) (d, f, g) (d, e, f, g)
I want to find subsets of (a, b, c, d), so the output should be: (a, b) (b, c) (a, b, c, d) (a, b, c) (b, c, d)
Is there a method to index/hash data in a way that will limit the number of collection elements that I have to scan in order to find all matches?