1. A computer implemented method comprising: transforming a decision tree into an optimal compact representation, the decision tree having a plurality of variables, a root node, intermediate nodes, and leaf nodes; and displaying the optimal compact representation of the decision tree; wherein the transforming comprises: computing an ordering of variables in the decision tree to result in a directed acyclic graph with a minimum number of nodes; and converting the directed acyclic graph into an exception-based directed acyclic graph with a single exception to result in the optimal compact representation.