Some Fundamental Properties of Boolean Ring Normal Forms
Total Page:16
File Type:pdf, Size:1020Kb
Series Logo Volume 00 xx Some Fundamental Prop erties of Bo olean Ring Normal Forms Jieh Hsiang and Guan Shieng Huang Abstract Bo olean ring is an algebraic structure which uses exclusiv e or instead of the usual or It yields a unique normal form for every Bo olean function In this pap er we present several fundamental prop erties concerning Bo olean rings We present a simple metho d for deriving the Bo olean ring nor mal form directly from a truth table We also describ e a notion of normal form of a Bo olean function with a dontcare condition and show an algorithm for generating such a normal form We then discuss two Bo olean ring based theo rem proving metho ds for prop ositional logic Finally we give some arguments on why the Bo olean ring representation had not b een used more extensively and how it can b e used in computing Intro duction Bo olean ring is an algebraic structure which is equivalent to Bo olean algebra The ma jor representational dierences are that Bo olean ring uses exclusiveor instead of or to represent Bo olean functions and that there is no need for negation in Bo olean ring Furthermore there is a unique Bo olean ring normal form for every Bo olean function It is curious however that in spite of its long history and elegant algebraic prop erties the Bo olean ring representation has rarely b een used in the computational context In this pap er we present several fundamental results concerning Bo olean rings Some of the results are so elementary and simple that they can and should b e taught in a rstyear logic design course It is surprising that most of them seem not known at least to our knowledge In Section we give an overview of some known results ab out Bo olean ring normal form notably the term rewriting metho d for pro ducing the normal form through simplication In Section we show a metho d for generating the Bo olean ring normal form directly from the truth table of a Bo olean function This metho d is conceptually very simple and is straightforward to implement Unlike the wellknown Karnaugh Mathematics Subject Classication Primary C E Secondary E C This research is supp orted in part by grant NSC E of the National Science Council of the Republic of China c American Mathematical So ciety p er page JIEH HSIANG AND GUAN SHIENG HUANG metho d which may pro duce dierent conjunctive normal forms dep ending on which prime implicants are chosen our metho d is completely deterministic We then present a notion of normal form for a Bo olean function with a dont care condition and an eective way for generating this normal form A Bo olean function with a dontcare condition A is a partial Bo olean function whose values on truth assignments in A are undened This concept is useful in circuit design in which the task of sp ecication can b e simplied by ignoring truth assignments that are inconsequential However during the actual design and fabrication of such a sp ecication the truth assignments in A must b e given some value Dep ending on the designs the values may b e lled dierently Thus even if two designs satisfy the same sp ecication they may represent dierent functions This makes the circuit verication problem signicantly more complicated From an algebraic p oint of view a truth table with a contcare condition rep resents a class of Bo olean functions Thus if there is a mechanical way of cho osing a normal form out of the entire class of functions then checking the equivalence of two functions under the same dontcare condition b ecomes reducing the two functions into the same normal form we present such a metho d in section Our metho d is based on the Buchb erger algorithm for generating the Grobner basis of the ideal dened by A and uses this Grobner basis to pro duce a unique normal form for each equivalent class of Bo olean functions Our metho d should make verifying correct implementations of sp ecication with a dontcare condition considerably easier In Section we show two ways of p erforming automated theorem proving for prop ositional logic in the Bo olean ring framework The rst one is a resolution style pro cedure based on Buchb erger algorithm This pro cedure was rst describ ed in KN and is dierent from resolution in several ways First the input is not restricted to clausal form Second it employs the inference rule of simplication which has no natural counterpart in the resolution framework Simplication is a p owerful way of reducing the search space in theorem proving BH The second metho d we present is a DavisPutnam like pro cedure In addition to splitting an inference rule employed in DavisPutnam DP DLL it also utilizes the inference rule of simplication Since simplication is more natural and has much more reduction p ower than the unit clause rule of DavisPutnam we feel that it may have some advantage over DavisPutnam as a basis for an ecient satisability checker In the last section of the pap er we give some reasons on why Bo olean ring has not b een used more extensively in logic or computer science We also p oint out areas where it can b e used pro ductively The Bo olean ring normal form A Boolean ring is a commutative ring B in which is idempotent ie x x x and is nilpotent ie x x The op erator is known in The rst approach to automated theorem proving using the Bo olean ring representation is to our knowledge H It is easy to show that the nilp otence of is a consequence of the idemp otence of SOME FUNDAMENTAL PROPERTIES OF BOOLEAN RING NORMAL FORMS logic design as exclusiveor By intro ducing the relationship x y x y x y x y xy x x one can show that the corresp onding algebraic structure B is a Bo olean algebra S The isomorphic relationship b etween Bo olean algebras and Bo olean rings was found in by Stone S and could probably date back to by Zhegalkin Z n A Bo olean function of n variables is a mapping from f g to f g In the rest of the pap er we reserve B for the set f g and F for the set of Bo olean functions with n variables The op erators and can b e extended to the functional level Let f g F n we dene f g as a function h such that hx f x g x for all x B The op erator is dened similarly Since a Bo olean ring is also a eld we know that F is a commutative ring where and are the constant functions and Let x x F b e the pro jection functions such that the value of x dep ends n i th only on the i argument it is easy to see that the set fx x g generates n the entire ring F In other words F can also b e regarded as a polynomial ring B x x n A Bo olean function m is a monomial if it can b e represented as a conjunction Y x where V fx x x g n xV If V is empty then m is the unity function In this denition as in the rest of the Q P pap er we use as a shorthand for a chain of conjunctions and for a chain of Note that since is idemp otent each Bo olean variable app ears in a monomial only once A Bo olean function can b e expressed as a sum of monomials Such a represen tation is called a Boolean polynomial By the nilp otence of an identical pair of monomials in a Bo olean p olynomial can b e deleted Thus each monomial can ap p ear at most once in a Bo olean p olynomial With these simplications a Bo olean function can b e represented by a unique Bo olean p olynomial normal form which is either or a sum of distinct monomials This normal form is the Boolean ring normal form B RN F We emphasize that unlike the wellknown disjunctive normal form DNF BRNF is unique for any Bo olean function Theorem Stone There exists a unique BRNF for each Boolean function with n variables Given a Bo olean function we can derive its Bo olean ring normal form by re duction using a canonical set of rewrite rules This metho d was rst presented in H We describ e it here briey A rewrite rule is an oriented equation A rewrite rule can b e applied to reduce a term via equational replacement in the lefttoright fashion This pro cess is called simplication We require that the simplication relation b e wel lfounded That is no term can b e simplied indenitely The wellfoundedness requirement can usually b e ensured by imp osing a simplication ordering when orienting equations into rules D If a term cannot b e simplied by a set of rewrite rules R then we JIEH HSIANG AND GUAN SHIENG HUANG say that the term is Rirreducible If a term s is simplied by R to a term t and t is Rirreducible then we say that t is an Rnormal form of s Note that the normal form of a term may not b e unique A set of rewrite rules R is called a canonical rewrite system if the Rnormal form of every term is unique The following is a canonical rewrite system called BA for Bo olean algebra x y x y x y x y x y x x x y x y x x x x x x x x x x x x y z x y x z We remark that the op erators and are commutative and asso ciative Given a Bo olean function one can apply the rules of BA to simplify it in arbitrary order until no more simplication is p ossible The resulting unique normal form is the BRNF of the Bo olean function For example given p p q it can b e transformed into it BRNF as follows p p q ppq p q ppq pp pq pq pq p p Generating BRNF from a truth table In this section we describ e a metho d for generating the Bo olean ring normal form of a Bo olean function represented by a truth table Our metho d works on the truth table directly and do es not need auxiliary notions such as prime implicants in Karnaugh map Furthermore since BRNF is unique our metho d is also more deterministic n Let D denote