1. A method, comprising: partitioning a domain, utilizing a processor, into a plurality of sets; assigning a probability to each of the plurality of sets; constructing a tree over the partitioned domain utilizing the probability assigned to each of the plurality of sets; selecting a subtree from the tree, the selected subtree having a left subtree and a right subtree; calculating an entropy of at least one leaf of the left subtree of the selected subtree; calculating an entropy of at least one leaf of the right subtree of the selected subtree; calculating an expected number of traversal steps for the selected subtree as a function of a probability of the left subtree, a probability of the right subtree, the entropy of the at least one leaf of the right subtree, and the entropy of the at least one leaf of the left subtree; splitting the selected subtree into at least two portions based on the calculated expected number of traversal steps, wherein the selected subtree is split into the at least two portions in response to a determination that a total entropy is less than a predetermined maximum entropy, the total entropy including a sum of an entropy of all of the leaves of the left subtree of the selected subtree and an entropy of all of the leaves of the right subtree of the selected subtree; and traversing at least one of the at least two portions of the selected subtree by generating samples from the plurality of sets, the samples being generated according to the probability of a corresponding set.