BOOLEAN FUNCTIONS
Theory, Algorithms, and
Applications
Yves CRAMA and Peter L. HAMMER
with contributions by
Claude Benzaken, Endre Boros,
Nadia Brauner, Martin C. Golumbic, Vladimir Gurvich,
Lisa Hellerstein, Toshihide Ibaraki, Alexander Kogan,
Kazuhisa Makino, and Bruno Simeone
HEC Management School of the University of Li`ege Belgium
Dedication...
Contents
I
FOUNDATIONS
13
1 Fundamental concepts and applications 15
1.1 Boolean functions: definitions and examples . . . 16
1.2 Boolean expressions . . . 21
1.3 Duality . . . 26
1.4 Normal forms . . . 28
1.5 Transforming an arbitrary expression into a DNF . . . 33
1.6 Orthogonal DNFs and number of true points . . . 38
1.7 Implicants and prime implicants . . . 41
1.8 Restrictions of functions, essential variables . . . 45
1.9 Geometric interpretation . . . 49
1.10 Monotone Boolean functions . . . 51
1.10.1 Definitions and examples . . . 52
1.10.2 DNFs and prime implicants of positive functions . . . 54
1.10.3 Minimal true points and maximal false points . . . 57
1.11 Recognition of functional and DNF properties . . . 59
1.12 Other representations of Boolean functions . . . 63
1.12.1 Representations over GF(2) . . . 63
1.12.2 Representations over the reals . . . 65
1.12.3 Binary decision diagrams and decision trees . . . 66
1.13 Applications . . . 70
1.13.1 Propositional logic and artificial intelligence . . . 71
1.13.2 Electrical and computer engineering . . . 74
1.13.3 Game theory . . . 77
1.13.4 Reliability theory . . . 80
1.13.5 Combinatorics . . . 82
1.13.6 Integer programming . . . 84 1
1.14 Exercises . . . 88
2 Boolean equations 91 2.1 Definitions and applications . . . 91
2.2 The complexity of Boolean equations: Cook’s theorem . . . 97
2.3 On the role of DNF equations . . . 99
2.4 What does it mean to “solve a Boolean equation”? . . . 104
2.5 Branching procedures . . . 106
2.5.1 Branching rules . . . 108
2.5.2 Preprocessing . . . 111
2.6 Variable elimination procedures . . . 114
2.7 The consensus procedure . . . 120
2.8 Mathematical programming approaches . . . 124
2.8.1 Integer linear programming . . . 124
2.8.2 Nonlinear programming . . . 129
2.8.3 Local search heuristics . . . 131
2.9 Recent trends and algorithmic performance . . . 132
2.10 More on the complexity of Boolean equations . . . 133
2.10.1 Complexity of equation solving procedures . . . 133
2.10.2 Random equations . . . 135
2.10.3 Constraint satisfaction problems and Schaefer’s theorem . . . 138
2.11 Generalizations of consistency testing . . . 141
2.11.1 Counting the number of solutions . . . 141
2.11.2 Generating all solutions . . . 142
2.11.3 Parametric solutions . . . 144
2.11.4 Maximum satisfiability . . . 146
2.12 Exercises . . . 153
3 Prime implicants and minimal DNFs 155 Peter L. Hammer and Alexander Kogan 3.1 Prime implicants . . . 156
3.1.1 Applications to propositional logic and artificial intelligence . . . . 156
3.1.2 Short prime implicants . . . 158
3.2 Generation of all prime implicants . . . 160
3.2.1 Generation from the set of true points . . . 161
CONTENTS 3
3.2.3 Generation from a DNF representation: Complexity . . . 172
3.2.4 Generation from a CNF representation . . . 176
3.3 Logic minimization . . . 177
3.3.1 Quine-McCluskey approach: Logic minimization as set covering . . 179
3.3.2 Local simplifications of DNFs . . . 182
3.3.3 Computational complexity of logic minimization . . . 187
3.3.4 Efficient approximation algorithms for logic minimization . . . 194
3.4 Extremal and typical parameter values . . . 198
3.4.1 Number of prime implicants . . . 198
3.4.2 Extremal parameters of minimal DNFs . . . 200
3.4.3 Typical parameters of Boolean functions and their DNFs . . . 201
3.5 Exercises . . . 204
4 Duality theory 207 Yves Crama and Kazuhisa Makino 4.1 Basic properties and applications . . . 207
4.1.1 Dual functions and expressions . . . 207
4.1.2 Normal forms and implicants of dual functions . . . 209
4.1.3 Dual-comparable functions . . . 211
4.1.4 Applications . . . 215
4.2 Duality properties of positive functions . . . 218
4.2.1 Normal forms and implicants of dual functions . . . 218
4.2.2 Dual-comparable functions . . . 220
4.2.3 Applications . . . 221
4.3 Algorithmic aspects: The general case . . . 225
4.3.1 Definitions and complexity results . . . 225
4.3.2 Dualization by sequential distributivity . . . 229
4.4 Algorithmic aspects: Positive functions . . . 233
4.4.1 Some complexity results . . . 233
4.4.2 A quasi-polynomial dualization algorithm . . . 236
4.4.3 Additional results . . . 241
4.5 Exercises . . . 243
II
SPECIAL CLASSES
247
Bruno Simeone
5.1 Basic definitions and properties . . . 249
5.2 Why are quadratic Boolean functions important? . . . 251
5.3 Special classes of quadratic functions . . . 254
5.3.1 Classes . . . 254
5.3.2 Functional characterizations . . . 255
5.4 Quadratic Boolean functions and graphs . . . 256
5.4.1 Graph models of quadratic functions . . . 256
5.4.2 The matched graph . . . 257
5.4.3 The implication graph . . . 259
5.4.4 Conflict codes and quadratic graphs . . . 264
5.5 Reducibility of combinatorial problems to quadratic equations . . . 267
5.5.1 Introduction . . . 267
5.5.2 Bipartite graphs . . . 267
5.5.3 Balance in signed graphs . . . 269
5.5.4 Split graphs . . . 269
5.5.5 Forbidden-color graph bipartition . . . 270
5.5.6 Totally unimodular matrices with two nonzero entries per column . 271 5.5.7 The K˝onig-Egerv´ary property for graphs . . . 272
5.5.8 Single-bend wiring . . . 274
5.5.9 Max-quadratic functions and VLSI design . . . 275
5.5.10 A level graph drawing problem . . . 277
5.5.11 A final look into complexity . . . 281
5.6 Efficient graph-theoretic algorithms for quadratic equations . . . 281
5.6.1 Introduction . . . 281
5.6.2 Labeling algorithm (L) . . . 283
5.6.3 Alternative Labeling algorithm (AL) . . . 287
5.6.4 Switching algorithm (S) . . . 288
5.6.5 Strong Components algorithm (SC) . . . 292
5.6.6 An experimental comparison of algorithms for quadratic equations . 294 5.7 Quadratic equations: Special topics . . . 296
5.7.1 The set of solutions of a quadratic equation . . . 296
5.7.2 Parametric solutions . . . 300
5.7.3 Maximum 2-satisfiability . . . 303
CONTENTS 5
5.8 Prime implicants and irredundant forms . . . 305
5.8.1 Introduction . . . 305
5.8.2 A transitive closure algorithm for finding all prime implicants . . . 306
5.8.3 A restricted consensus method and its application to computing the transitive closure of a digraph . . . 310
5.8.4 Irredundant normal forms and transitive reductions . . . 319
5.9 Dualization of quadratic functions . . . 320
5.9.1 Introduction . . . 320
5.9.2 The dualization algorithm . . . 321
5.10 Exercises . . . 324
6 Horn functions 327 Endre Boros 6.1 Basic definitions and properties . . . 327
6.2 Applications of Horn functions . . . 331
6.2.1 Propositional rule bases . . . 331
6.2.2 Functional dependencies in data bases . . . 332
6.2.3 Directed graphs, hypergraphs and Petri nets . . . 333
6.2.4 Integer programming and polyhedral combinatorics . . . 334
6.3 False points of Horn functions . . . 336
6.3.1 Deduction in AI . . . 338
6.4 Horn equations . . . 340
6.4.1 Horn equations and the unit literal rule . . . 340
6.4.2 Pure Horn equations and forward chaining . . . 343
6.4.3 More on Horn equations . . . 346
6.5 Prime implicants of Horn functions . . . 346
6.6 Properties of the set of prime implicants . . . 354
6.7 Minimization of Horn DNFs . . . 359
6.7.1 Minimizing the number of terms . . . 360
6.7.2 Minimizing the number of literals . . . 364
6.7.3 Minimization of the number of source sides . . . 365
6.8 Dualization of Horn functions . . . 369
6.9 Special classes . . . 373
6.9.1 Submodular functions . . . 373
6.9.2 Bidual Horn functions . . . 374
6.9.4 Acyclic Horn functions . . . 377
6.10 Generalizations . . . 379
6.10.1 Renamable Horn expressions and functions . . . 379
6.10.2 Q-Horn functions . . . 381
6.10.3 Extended Horn expressions . . . 384
6.10.4 Polynomial hierarchies built on Horn expressions . . . 385
6.11 Exercises . . . 386
7 Orthogonal forms and shellability 393 7.1 Computation of orthogonal DNFs . . . 394
7.2 Shellings and shellability . . . 398
7.2.1 Definition . . . 398
7.2.2 Orthogonalization of shellable DNFs . . . 400
7.2.3 Shellable DNFs vs. shellable functions . . . 403
7.3 Dualization of shellable DNFs . . . 405
7.4 The lexico-exchange property . . . 407
7.4.1 Definition . . . 407
7.4.2 LE property and leaders . . . 408
7.4.3 Recognizing the LE property . . . 409
7.4.4 Dualization of functions having the LE property . . . 416
7.5 Shellable quadratic DNFs and graphs . . . 417
7.6 Applications . . . 419
7.7 Exercises . . . 420
8 Regular functions 423 8.1 Relative strength of variables and regularity . . . 423
8.2 Basic properties . . . 428
8.3 Regularity and left-shifts . . . 436
8.4 Recognition of regular functions . . . 439
8.5 Dualization of regular functions . . . 445
8.6 Regular set–covering problems . . . 453
8.7 Regular minorants and majorants . . . 457
8.7.1 Largest regular minorant with respect to a given order . . . 460
8.7.2 Smallest regular majorant with respect to a given order . . . 465
8.7.3 Regular minorization and set–covering problems . . . 466
8.8 Higher-order monotonicity . . . 469
CONTENTS 7
8.9.1 Weakly regular functions . . . 477
8.9.2 Aligned functions . . . 478
8.9.3 Ideal functions . . . 479
8.9.4 Relations among classes . . . 480
8.10 Exercises . . . 481
9 Threshold functions 485 9.1 Definitions and applications . . . 485
9.2 Basic properties of threshold functions . . . 489
9.3 Characterizations of threshold functions . . . 495
9.4 Recognition of threshold functions . . . 500
9.4.1 A polynomial-time algorithm for positive DNFs . . . 500
9.4.2 A compact formulation . . . 502
9.4.3 The general case . . . 504
9.5 Prime implicants of threshold functions . . . 506
9.6 Chow parameters of threshold functions . . . 512
9.6.1 Chow functions . . . 513
9.6.2 Chow parameters and separating structures . . . 515
9.6.3 Computing the Chow parameters . . . 521
9.7 Threshold graphs . . . 523
9.8 Exercises . . . 531
10 Read-once functions 535 Martin C. Golumbic and Vladimir Gurvich 10.1 Introduction . . . 535
10.2 Dual implicants . . . 538
10.2.1 Implicants and dual implicants . . . 538
10.2.2 The dual subimplicant theorem . . . 539
10.3 Characterizing read-once functions . . . 544
10.4 The properties of P4-free graphs and cographs . . . 552
10.5 Recognizing read-once functions . . . 556
10.6 Learning read-once functions . . . 564
10.7 Related topics and applications of read-once functions . . . 567
10.7.1 The readability of a Boolean function . . . 567
10.7.2 Factoring general Boolean functions . . . 568
10.8 Historical notes . . . 572
10.9 Exercises . . . 574
11 Characterizations of special classes by functional equations 581 Lisa Hellerstein 11.1 Characterizations of positive functions . . . 582
11.2 Functional equations . . . 583
11.3 Characterizations of particular classes . . . 586
11.3.1 Horn functions . . . 586
11.3.2 Linear functions and related classes . . . 587
11.3.3 Quadratic and degree k functions . . . 588
11.4 Conditions for characterization . . . 591
11.5 Finite characterizations by functional equations . . . 597
11.6 Exercises . . . 602
III
GENERALIZATIONS
605
12 Partially defined Boolean functions 607 Toshihide Ibaraki 12.1 Introduction . . . 60712.2 Extensions of pdBfs and their representations . . . 611
12.2.1 Definitions . . . 611
12.2.2 Support sets of variables . . . 612
12.2.3 Patterns and theories of pdBfs . . . 615
12.2.4 Roles of theories and co-theories . . . 620
12.2.5 Decision trees . . . 625
12.3 Extensions within given function classes . . . 630
12.3.1 Positive extensions . . . 630
12.3.2 Monotone (unate) extensions . . . 632
12.3.3 Degree-k extensions . . . 634
12.3.4 Horn extensions . . . 635
12.3.5 Threshold extensions . . . 638
12.3.6 Decomposable extensions . . . 640
12.3.7 k-convex extensions . . . 646
CONTENTS 9
12.5 Extensions of pdBfs with missing bits . . . 653
12.5.1 Three types of extensions . . . 653
12.5.2 Complexity results . . . 656
12.6 Minimization with don’t cares . . . 661
12.7 Conclusion . . . 664
12.8 Exercises . . . 665
13 Pseudo-Boolean functions 669 13.1 Definitions and examples . . . 669
13.2 Representations . . . 676
13.2.1 Polynomial expressions, pseudo-Boolean normal forms and posiforms . . . 676
13.2.2 Piecewise linear representations . . . 680
13.2.3 Disjunctive and conjunctive normal forms . . . 680
13.3 Extensions of pseudo-Boolean functions . . . 684
13.3.1 The polynomial extension . . . 686
13.3.2 Concave and convex extensions . . . 687
13.3.3 The Lov´asz extension . . . 691
13.4 Pseudo-Boolean optimization . . . 692
13.4.1 Local optima . . . 693
13.4.2 An elimination algorithm for global optimization . . . 695
13.4.3 Extensions and relaxations . . . 696
13.4.4 Posiform transformations and conflict graphs . . . 698
13.5 Approximations . . . 701
13.6 Special classes of pseudo-Boolean functions . . . 702
13.6.1 Quadratic functions and quadratic 0-1 optimization . . . 702
13.6.2 Monotone functions . . . 705
13.6.3 Supermodular and submodular functions . . . 708
13.6.4 Unimodular functions . . . 714
13.6.5 Threshold and unimodal functions . . . 716
13.7 Exercises . . . 717
A Graphs and hypergraphs 721 A.1 Undirected graphs . . . 721
A.1.1 Subgraphs . . . 722
A.1.2 Paths and connectivity . . . 722
A.2 Directed graphs . . . 725
A.2.1 Directed paths and connectivity . . . 725
A.2.2 Special classes of digraphs . . . 725
A.2.3 Transitive closure and transitive reduction . . . 726
A.3 Hypergraphs . . . 727
B Algorithmic complexity 729 B.1 Decision problems . . . 729
B.2 Algorithms . . . 731
B.3 Running time, polynomial-time algorithms and the class P . . . 733
B.4 The class NP . . . 733
B.5 Polynomial-time reductions and NP-completeness . . . 735
B.6 The class coNP . . . 736
B.7 Cook’s theorem . . . 737
B.8 Complexity of list-generation and counting algorithms . . . 739
C JBool: A software tool 743 Claude Benzaken and Nadia Brauner C.1 Introduction . . . 743
C.2 Work interface . . . 744
C.2.1 Menu bar . . . 745
C.2.2 Function windows . . . 745
C.2.3 Text zone . . . 746
C.3 Creating a Boolean function . . . 746
C.3.1 Function syntax and presentation . . . 746
C.3.2 Creation modes . . . 747
C.3.3 Saving a function . . . 748
C.4 Editing a function . . . 749
C.4.1 Changing the normal form . . . 749
C.4.2 Modifying the variable set . . . 749
C.5 Operations on Boolean functions . . . 749
C.5.1 Equivalent presentations of a Boolean function . . . 750
C.5.2 Constructions . . . 750
C.5.3 Operations on two Boolean functions . . . 750
C.5.4 Testing properties of a function . . . 750