Binary decision diagrams in Software Encoding barcode 3/9 in Software Binary decision diagrams

6 Binary decision diagrams using barcode writer for software control to generate, create code-39 image in software applications. EAN8 of valuations, we s Software Code-39 imply check that they are identical. Although these operations seem simple, however, they are computationally intractable because of the fact that the number of lines in the truth table is exponential in the number of variables. Checking satis ability of a function with n atoms requires of the order of 2n operations if the function is represented as a truth table.

We conclude that checking satis ability and equivalence is highly ine cient with the truth-table representation. Representation of boolean functions by propositional formulas is slightly better. Propositional formulas often provide a wonderfully compact and e cient presentation of boolean functions.

A formula with 100 variables might only be about 200 300 characters long. However, deciding whether an arbitrary propositional formula is satis able is a famous problem in computer science: no e cient algorithms for this task are known, and it is strongly suspected that there aren t any. Similarly, deciding whether two arbitrary propositional formulas f and g denote the same boolean function is suspected to be exponentially expensive.

It is straightforward to see how to perform the boolean operations , +, and on these two representations. In the case of truth tables, they involve applying the operation to each line; for example, given truth tables for f and g over the same set of variables (and in the same order), the truth table for f g is obtained by applying to the truth value of f and g in each line. If f and g do not have the same set of arguments, it is easy to pad them out by adding further arguments.

In the case of representation by propositional formulas, the operations , , etc., are simply syntactic manipulations. For example, given formulas and representing the functions f and g, the formulas representing f g and f g are, respectively, and ( ) ( ).

We could also consider representing boolean functions by various subclasses of propositional formulas, such as conjunctive and disjunctive normal forms. In the case of disjunctive normal form (DNF, in which a formula is a disjunction of conjunctions of literals), the representation is sometimes compact, but in the worst cases it can be very lengthy. Checking satis ability is a straightforward operation, however, because it is su cient to nd a disjunct which does not have two complementary literals.

Unfortunately, there is not a similar way of checking validity. Performing + on two formulas in DNF simply involves inserting between them. Performing is more complicated; we cannot simply insert between the two formulas, because the result will not in general be in DNF, so we have to perform lengthy applications of the distributivity rule ( 1 2 ) ( 1 ) ( 1 ).

Computing the negation of a DNF formula is also expensive. The DNF formula may be. 6.1 Representing boolean functions Representation of b Software barcode 3 of 9 oolean functions Prop. formulas Formulas in DNF Formulas in CNF Ordered truth tables Reduced OBDDs test for satisf ty validity hard easy hard hard easy hard hard easy hard easy boolean operations + easy easy hard hard medium. compact often sometimes sometimes never often easy hard easy hard medium easy hard hard hard easy Figure 6.1. Comparing efficiency of five representations of boolean formulas. x y 1 0 0 y 0 Figure 6.2. An example of a binary decision tree. quite short, wherea s the length of the disjunctive normal form of can be exponential in the length of . The situation for representation in conjunctive normal form is the dual. A summary of these remarks is contained in Figure 6.

1 (for now, please ignore the last row).. 6.1.2 Binary decisi 3 of 9 for None on diagrams Binary decision diagrams (BDDs) are another way of representing boolean functions.

A certain class of such diagrams will provide the implementational framework for our symbolic model-checking algorithm. Binary decision diagrams were rst considered in a simpler form called binary decision trees. These are trees whose non-terminal nodes are labelled with boolean variables x, y, z, .

. . and whose terminal nodes are labelled with either 0 or 1.

Each non-terminal node has two edges, one dashed line and one solid line. In Figure 6.2 you can see such a binary decision tree with two layers of variables x and y.

. De nition 6.3 Let T be a nite binary decision tree. Then T determines a unique boolean function of the variables in non-terminal nodes, in the following way.

Given an assignment of 0s and 1s to the boolean variables.
Copyright © . All rights reserved.