Boolean Evaluation with a Pairing and Unpairing Function
Paul Tarau, Brenda Luderman · 2012
A pairing function is a bijection f : N × N → N. Its inverse is called an em unpairing function. We show that boolean logic on bit vector variables can be expressed as compositions of pairing/unpairing operations which can emulate boolean evaluation of ordered binary decision trees (OBDTs) of a canonical form. Applications to enumeration and random generation of OBDTs and a generalization to Multi-Terminal Ordered OBDTs (MTOBDT) are also described. The paper is organized as a literate Haskell program (code available at http://logic.csci.unt.edu/tarau/research/2012/hOBDT.hs).