For testing if B contains a superset of the bitstring q we can use the procedure described in Algorithm 1: we start at the root of the tree and omit all branches that describe a non-set bit in a position where the query bitstring contains a set bit. This procedure is particularly fast for processing query bitstrings that are not contained in the tree. Under the assumption that the tree is roughly balanced, this takes O(log(n)) time, where n is the number of bitstrings in the tree.