In particular embodiments, a method includes accessing a first binary decision diagram (BDD) representing data streams from sensors, selecting portions from the first BDD, constructing a second BDD representing the selected portions and a third BDD representing the non-selected portions, determining sizes of the first, second, and third BDDs, and if the size of the first BDD is less than a sum of the sizes of the second and third BDDs, then storing the first BDD, else storing the second and third BDDs.