The exemplary embodiments provide a computer implemented method, apparatus, and computer usable program code for calculating a probability. An input is received, wherein the input comprises a PQ tree. The leaf nodes of the PQ tree are counted to form a number of leaf nodes. A factorial value of the number of leaf nodes is calculated to form a denominator. A hash value of a frontier of all permutations of the PQ tree is calculated to form a numerator. A ratio of the numerator to the denominator is determined to form a result. The result is displayed to a user.
展开▼