A: (ABCD, ABCE, AEF, ABFG)
B: (ABCD, ABCE, ABFG)
C: (ABCD, ABCE)
D: (ABCD, DFG)
E: (ABCE, AEF)
F: (AEF, DFG, ABFG)
G: (DFG, ABFG)
Then, with our arbitrary set, BG, we just look at the sets in the B slot and the G slot.
B: (ABCD, ABCE, ABFG)
G: (DFG, ABFG)
If there's a superset, it's gotta be in one of those two slots. The next trick is that we only look at the smaller of the two lists, to try and minimize our work as much as possible:
G: (DFG, ABFG)
So now we only need to check and see if BG is a subset of DFG or ABFG. That's 2 checks instead of 5. Progress.