Spectral Interpretation of Decision Diagrams
Springer
New York Berlin Heidelberg Hong Kong London Milan Paris Tokyo
Spectral Interpretation of Decision Diagrams With 108 Figures
Radomir S. Stankovic´ Department of Computer Science Faculty of Electronics University of Nisˇ Beogradska 14 Nisˇ, Serbia 18 000
[email protected]
Jaakko T. Astola Tampere Intenational Center for Signal Processing Tampere University of Technology P.O. Box 552 Tampere, FIN-33101 Finland
[email protected]
Library of Congress Cataloging-in-Publication Data Stankovic´, Radomir S. Spectral interpretation of decision diagrams / Radomir Stankovic´, Jaakko Astola. p. cm. Includes bibliographical references and index. ISBN 0-387-95545-3 (alk. paper) 1. Logic design—Mathematics. 2. Spectrum analysis—Mathematics. 3. Signal processing—Mathematics. I. Astola, Jaako. II. Title. TK7868.L6S73 2003 621.39′5—dc21 2003042475 ISBN 0-387-95545-3
Printed on acid-free paper.
© 2003 Springer-Verlag New York, Inc. All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer-Verlag New York, Inc., 175 Fifth Avenue, New York, NY 10010, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. Printed in the United States of America. 9 8 7 6 5 4 3 2 1
SPIN 10886385
Typesetting: Pages created by the authors in LaTeX 2e using Springer’s svsing6.cls macro. www.springer-ny.com Springer-Verlag New York Berlin Heidelberg A member of BertelsmannSpringer Science+Business Media GmbH
Contents
Preface
ix
List of Figures
xiii
List of Tables
xvii
1 Signals 1.1 Signals and Signal Processing . . . . . . . . . . . . . . . 1.2 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Algebraic Structures for 2.1 Domains and Ranges 2.2 Vector spaces . . . . 2.3 Summary . . . . . . .
Signal Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Spectral Techniques 3.1 Fourier Analysis . . . . . . . . . . . . . 3.2 Fourier and Fourier-Like Transforms on Dyadic Groups . . . . . . . . . . . . . . 3.3 Reed-Muller Transform . . . . . . . . . 3.4 Arithmetic Transform . . . . . . . . . . 3.5 Walsh Transform . . . . . . . . . . . . 3.6 Kronecker Transforms . . . . . . . . . . 3.7 Partial Kronecker Transforms . . . . .
1 1 6 7 7 13 15
. . . . . . . . . .
17 17
. . . . . .
18 20 25 28 30 32
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
vi
Contents
3.8 3.9 3.10 3.11
Fixed Polarity Transforms . . . . . . Non-Kronecker Transforms . . . . . . Classification of Spectral Transforms Summary . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
37 41 45 46
4 Fourier Analysis on Groups 4.1 Discrete Functions . . . . . . . . . . . . . . . . 4.2 Fourier Transforms . . . . . . . . . . . . . . . 4.3 Series Expansions . . . . . . . . . . . . . . . . 4.4 Fourier Series . . . . . . . . . . . . . . . . . . 4.5 Fourier Transform . . . . . . . . . . . . . . . . 4.6 Walsh Transform . . . . . . . . . . . . . . . . 4.7 Generalized Definition of Spectral Transforms 4.8 Fixed Polarity Kronecker Transforms . . . . . 4.9 Non-Kronecker Transforms . . . . . . . . . . . 4.10 Summary . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . .
49 49 51 53 54 56 57 63 66 66 70
5 Spectral Interpretation of Decision Diagrams 5.1 Decision Diagrams . . . . . . . . . . . . . . . 5.2 Spectral Interpretation of BDTs . . . . . . . . 5.3 Spectral Interpretation of FDTs . . . . . . . . 5.4 Bit-Level DDs . . . . . . . . . . . . . . . . . . 5.5 Summary . . . . . . . . . . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
71 71 78 79 84 86
6 Advanced Topics in Decision Trees and Diagrams 6.1 Decision Trees . . . . . . . . . . . . . . . . . . . . . 6.2 Basic Features of DTs . . . . . . . . . . . . . . . . 6.3 Decision Diagrams . . . . . . . . . . . . . . . . . . 6.4 Programming of Decision Diagrams . . . . . . . . . 6.5 Summary . . . . . . . . . . . . . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
89 89 98 101 112 123
7 Optimization of Decision Diagrams 7.1 Decision Diagrams and Order of Variables . . . 7.2 Free BDDs . . . . . . . . . . . . . . . . . . . . . 7.3 Spectral Interpretation of Optimization of DDs 7.4 Summary . . . . . . . . . . . . . . . . . . . . . .
. . . .
. . . .
. . . .
. . . .
. . . .
125 125 130 137 141
8 Word-Level Decision Diagrams 8.1 Word-Level DDs . . . . . . . . . . . . 8.2 Spectral Interpretation of Word-Level 8.3 Haar Transform and Related DDs . . 8.4 Haar Spectral Diagrams . . . . . . . 8.5 Haar Spectral Transform DDs . . . . 8.6 Summary . . . . . . . . . . . . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .
145 145 146 149 150 156 166
. . . DDs . . . . . . . . . . . .
. . . .
. . . . . .
. . . . . .
. . . . . .
Contents
vii
9 Spectral Interpretation of Edge-Valued Decision Diagrams 9.1 Edge-Valued Decision Diagrams . . . . . . . . . . . . . . 9.2 Relationships Between Edge-Valued DDs and Other DDs 9.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .
167 167 175 178
10 Spectral Interpretation of Ternary Decision Diagrams 10.1 Ternary Decision Diagrams . . . . . . . . . . . . . . . . 10.2 Spectral Transform for TDDs . . . . . . . . . . . . . . 10.3 Extended Reed-Muller Transform . . . . . . . . . . . . 10.4 ERM-Transform for EXOR-TDDs . . . . . . . . . . . . 10.5 ERM-Transform for Other TDDs . . . . . . . . . . . . 10.6 Calculation of TDD-Spectrum . . . . . . . . . . . . . . 10.7 Calculation of the Weight Vector . . . . . . . . . . . . 10.8 TDDs and Boolean Difference . . . . . . . . . . . . . . 10.9 EXOR-TDTs and KDTs . . . . . . . . . . . . . . . . . 10.10 EXOR-TDDs and Kronecker Expressions . . . . . . . . 10.11 EXOR-TDTs and Pseudo-KDTs . . . . . . . . . . . . 10.12 EXOR-TDDs and Pseudo-Kronecker Expressions . . . 10.13 Word-Level TDDs . . . . . . . . . . . . . . . . . . . . 10.14 Arithmetic Transform TDDs . . . . . . . . . . . . . . 10.15 EXOR-TDDs, Arith-TDDs, and AC-TDDs . . . . . . 10.16 ARs and AC-TDDs . . . . . . . . . . . . . . . . . . . . 10.17 AC-TDDs for Multi-Output Functions . . . . . . . . . 10.18 Exact Minimization of FPAR-expressions . . . . . . . 10.19 Word-Level TDDs and Gibbs Derivatives . . . . . . . 10.20 TDDs and STDT(Q)s . . . . . . . . . . . . . . . . . . 10.21 Summary . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
181 181 182 186 186 191 193 198 200 206 206 212 214 216 218 220 221 224 225 227 231 232
11 Group Theoretic Approach to Optimization of Decision Diagrams 11.1 DDs on C4 . . . . . . . . . . . . . . . . . . . . . 11.2 DDs on Quaternion Groups . . . . . . . . . . . 11.3 Applications of FNADDs . . . . . . . . . . . . . 11.4 Features of DDs on Finite Groups . . . . . . . . 11.5 Summary . . . . . . . . . . . . . . . . . . . . . .
. . . . .
235 237 239 248 252 253
. . . . .
. . . . .
. . . . .
. . . . .
12 Closing Remarks
255
Answered Questions
257
References
261
List of Decision Diagrams
279
Index
283
Preface
Decision diagrams (DDs) are data structures that are efficient, in terms of space and time, for representing large discrete functions. Decision diagrams form an integral part of many CAD systems for logic design and are the basis of many signal processing algorithms. In the last decade, a variety of different DDs has been introduced for providing compact representations of various classes of discrete functions, including switching and multiplevalued logic functions as particular examples. Considerable progress has been made in classification and uniform characterization of DDs, on one hand, through spectral representations relating them to Fourier-type functional expressions for discrete functions and, on other hand, through group theoretic approach in optimizing DDs. This book is based on these recent advances. It collects, recalls and sets the notation for the basic mathematical concepts and terms that are necessary in understanding theory and applications of decision diagrams. Many concepts in the theory of decision diagrams are based on algebraic concepts that are not routinely taught in engineering curricula and the book covers these topics but avoids going into details that are not vital for understanding the key issues. To simplify the presentation and make it easy to use the book for self study it is written in the form of a series of simple questions and simple answers, while taking care that the simplification does not violate the mathematical correctness of the presentation. Because we shall give definitions of most of the basic concepts, but avoid excessive length, most elementary concepts are assumed to be familiar to the reader. If in doubt, the reader can recall these concepts from any basic text on abstract algebra. While being an introduction to the theory of decision diagrams the book also provides a
x
Preface
parallel track forming a deeper study that has features of a research monograph in this area. To meet these almost contradictory goals, we provide several short sections after the presentation of each subtopic summarizing and reviewing previously discussed topics in a compact manner assuming a higher level of background knowledge.
Overview of the Presentation Spectral techniques have proven to be highly applicable in switching theory and logic design when logic functions are viewed as discrete signals over binary fields. With this motivation, Chapter 1 briefly reviews basic notions of signals and their mathematical models. Chapter 2 discusses the algebraic structures for signal processing that are needed in applying spectral methods for switching theory and logic design. Chapter 3 presents fundamentals of spectral transforms for switching theory and logic design. In Chapter 4, these transforms are reconsidered from a more general point of view and discussed in terms of Fourier analysis on finite groups. These considerations provide a basis for the presentation of spectral interpretation of decision diagrams. In Chapter 6, a unified view to various decision diagram representations derived from their spectral interpretation is presented. Special attention has been paid to basic characteristics of DDs permitting comparison of DDs on different finite groups. In Chapter 7, spectral interpretation of the optimization of DDs by reordering of variables and generalizations of this method are presented. Chapters 8, 9, and 10 discuss spectral interpretation of word-level DDs, edge-valued DDs, and Ternary DDs, respectively. In Chapter 11, the group-theoretic approach to the optimization of decision diagram representations is discussed. The book ends with closing remarks presenting a systematization of various decision diagrams from the point of view of spectral interpretation and group theoretic approach to DD representations.
Organization and Features Presentation is organized as a modular system of self-contained chapters. Each chapter ends with a brief summary. Chapters 4, 6, and 11 provide more advanced topics in decision diagram representations of discrete functions. The material in these chapters and sections 7.3, 9.2, and 10.20 require more background but can be digested by a reader with less knowledge in decision diagrams consulting examples in other chapters and sections. Conversely, examples in the remaining part of the book can be considered as illustration of the presentation in these advanced chapters and sections. A peculiar feature of the book is the unified point of view to various classes of
Preface
xi
decision diagrams through their spectral interpretation and group theoretic representation.
Audience The book is written in a way making it suitable for self-learning and useful as a basic text for organization of specialized university courses in this area. The chapters and sections presenting advanced topics on the subject provide attributes of a research monograph to the book. In this way, besides for students, the book may be interesting for researchers in various areas where compact representations of discrete functions are required, including logic design and signal processing.
Acknowledgments The preliminary work towards this manuscript started during the stay of Radomir S. Stankovi´c’s stay in Kyushu Institute of Technology, Iizuka, Fukuoka, Japan, with the support of KIT Fellowship. This work is supported by the Academy of Finland, Finnish Center of Excellence Programme, Grant No. 44876, and the EXSITE Project No. 51520.
Radomir S. Stankovi´c Niˇs, Serbia Jaakko T. Astola Tampere, Finland April 2003
List of Figures
2.1 2.2
Relationships among algebraic structures. . . . . . . . Hierarchy among algebraic structures. . . . . . . . . .
13 14
3.1 3.2 3.3 3.4 3.5
Waveforms of Reed-Muller functions for n = 3. . . . . Discrete Walsh functions for n = 3. . . . . . . . . . . . Waveforms of Walsh functions for n = 3. . . . . . . . . A Kronecker transform matrix for n = 3. . . . . . . . . Basic functions for the Kronecker transform matrix in Example 29. . . . . . . . . . . . . . . . . . . . . . . . . Fast flow-graph for Kronecker product. . . . . . . . . . The partial Kronecker transform matrix with respect to x2 for the Kronecker transform in Example 29. . . . . Reed-Muller matrix for n = 3 and the polarity vector H = (010). . . . . . . . . . . . . . . . . . . . . . . . . . Arithmetic transform matrix for n = 3 and H = (0, 1, 0). Sequentially ordered Haar functions for n = 3. . . . . . Waveforms of Haar functions for n = 3. . . . . . . . . . Naturally ordered Haar functions for n = 3. . . . . . . Non-normalized discrete Haar functions for n = 3. . . . The inverse of the matrix Hs (3). . . . . . . . . . . . . Classification and generalizations of spectral transforms in switching theory. . . . . . . . . . . . . . . . . . . . . Spectral transforms on dyadic groups. . . . . . . . . .
24 29 30 31
3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16
32 34 37 38 40 42 42 43 44 44 46 47
xiv
List of Figures
5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 6.1
BDT for n = 3. . . . . . . . . . . . . . . . . . . . . . . Correspondence among G, f , and DT for f . . . . . . . BDD for f in Example 46. . . . . . . . . . . . . . . . . Reduction of BDT into BDD for f in Example 46. . . BDD reduction rules and zero-suppressed BDD reduction rules. . . . . . . . . . . . . . . . . . . . Generalized BDD reduction rules. . . . . . . . . . . . . Shared BDD for f in Example 48. . . . . . . . . . . . . MTBDD for f in Example 48. . . . . . . . . . . . . . . FDT for n = 3. . . . . . . . . . . . . . . . . . . . . . . BDT and FDT. . . . . . . . . . . . . . . . . . . . . . . BDT, BDD, FDT, and FDD with zero-suppressed reduction rules, and FDD with generalized BDD rules. KDT for n = 3 in Example 52. . . . . . . . . . . . . . PKDT for n = 3 in Example 53. . . . . . . . . . . . . .
72 73 74 75 76 76 77 78 80 81 82 85 86
6.4 6.5 6.6 6.7 6.8 6.9 6.10
Correspondence between f and DTs for two different decompositions of G. . . . . . . . . . . . . . . . . . . . Hierarchy among basic DTs. . . . . . . . . . . . . . . . Classification of MTDTs with respect to the values of constant nodes. . . . . . . . . . . . . . . . . . . . . . . Assignment of f to (a) MTDT, (b) STDT. . . . . . . . Structure of BDT, QDT, mvFNADT, and nvFNADT. Characteristics of DDs. . . . . . . . . . . . . . . . . . . Fib1 (5)DD for functions defined in N = 13 points. . . Node in a BDD. . . . . . . . . . . . . . . . . . . . . . . Construction of a BDD. . . . . . . . . . . . . . . . . . Procedure for calculation with DDs. . . . . . . . . . .
92 94 101 105 112 115 117 122
7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7.10 7.11 7.12 7.13 7.14 7.15
BDT for f in Example 63 for x1 , x2 , x3 , x4 . . . . BDD for f in Example 63 for x1 , x2 , x3 , x4 . . . . BDT for f in Example 63 for x3 , x1 , x4 , x2 . . . . BDD for f in Example 63 for x3 , x1 , x4 , x2 . . . . FBDT for f in Example 65. . . . . . . . . . . . Truth-table for Fr in Example 65. . . . . . . . . Flow-graph for Mr and Fr in Example 65. . . . FBDD for f in Example 66. . . . . . . . . . . . FBDT for f in Example 67. . . . . . . . . . . . Truth-table for Fr in Example 67. . . . . . . . . Flow-graph for Fr in Example 67. . . . . . . . . FBDD for f in Example 67. . . . . . . . . . . . Bases in bit-level DDs. . . . . . . . . . . . . . . MTBDD(f ), MTBDD(fσ ), and MTBDD(fσ1 ). . BDDs for G = C2 × C4 and G = C4 × C2 . . . .
126 126 127 127 131 132 132 132 133 134 134 134 136 140 141
6.2 6.3
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
91 91
7.16
8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10
9.1 9.2 9.3 9.4 9.5 9.6
9.7 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9
List of Figures
xv
Assignment of f to (a) MTDT, (b) STDT with optimization by ordering of variables. . . . . . . . . . .
142
MTBDT for f in Example 70. . . . . . . BMT for f in Example 70. . . . . . . . . WDD for f in Example 72. . . . . . . . KBMT for f in Example 73. . . . . . . . HST for n = 3. . . . . . . . . . . . . . . HSD for f in Example 76. . . . . . . . . HSTDT for n = 3. . . . . . . . . . . . . HSTDD for f in Example 76. . . . . . . HSTDD for a two-bit adder. . . . . . . . HSTDD for a two-bit adder with linearly transformed variables. . . . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
146 147 148 149 151 151 157 158 165
. . . . . . . .
165
EVBDT for f of n = 3 variables and the partial arithmetic transforms coefficients. . . . . . . . . . . . . Pseudo-Kronecker DT corresponding to EVBDT for n = 3. . . . . . . . . . . . . . . . . . . . . . . . . . FEVBDT for n = 3. . . . . . . . . . . . . . . . . . . . ∗BMT for f in Example 70. . . . . . . . . . . . . . . . K∗BMT for f in Example 9.5. . . . . . . . . . . . . . . Assignment of f to (a) STDT with additive coefficients at edges, and (b) STDT with mltiplicative coefficients at edges. . . . . . . . . . . . . . . . . . . . . . . . . . . . Classification of STDTs with attributed edges. . . . . .
168 169 171 173 174
178 179
10.10 10.11 10.12 10.13
Node in TDDs. . . . . . . . . . . . . . . . . . . . . . . 182 AND, EXOR, and Kleene-TDT of f in Example 85. . 185 EXOR-TDT for n = 2. . . . . . . . . . . . . . . . . . . 188 Generation of Kleene-TDD for f in Example 85. . . . . 197 EXOR-TDD for f in Example 85. . . . . . . . . . . . . 201 KDDs contained in EXOR-TDT for n = 2. . . . . . . . 207 KDDs contained in EXOR-TDT for n = 2 (continued). 208 Examples of PKDDs contained in EXOR-TDT for n = 2. 213 EXOR-TDT, Arith-TDT, and AC-TDT for the majority function for n = 3. . . . . . . . . . . . . . . . . . . . . 221 Examples of PKACDDs contained in AC-TDT for n = 2. 223 AC-TDT for fz in Example 110. . . . . . . . . . . . . . 225 AC-TDT and partial Gibbs derivatives for n = 2. . . . 230 Assignment of f to a TDT. . . . . . . . . . . . . . . . 232
11.1 11.2 11.3
Domain groups. . . . . . . . . . . . . . . . . . . . . . . BDD and QDD. . . . . . . . . . . . . . . . . . . . . . . BDD, QDD, and FNADD. . . . . . . . . . . . . . . . .
241 243 244
xvi
List of Figures
11.4 11.5 11.6
245 249
11.7
FFT on Q2 . . . . . . . . . . . . . . . . . . . . . . . . . MTDD for the 3-bit multiplier on G64 = C4 × C4 × C4 . Matrix-valued FNADD for the 3-bit multiplier on G64 = Q2 × Q2 . . . . . . . . . . . . . . . . . . . . . . . FNADD for the 3-bit multiplier on G64 = Q2 × Q2 . . .
12.1
DD of decision diagrams. . . . . . . . . . . . . . . . . .
256
249 250
List of Tables
1.1 1.2 1.3 1.4
Binary-valued input functions. . . . . . . . . Binary-valued input multi-output functions. Multiple-valued input functions. . . . . . . . Discrete functions. . . . . . . . . . . . . . .
. . . .
5 6 6 6
2.1 2.2 2.3
Addition GF (4). . . . . . . . . . . . . . . . . . . . . . Multiplication GF (4). . . . . . . . . . . . . . . . . . . Vector spaces. . . . . . . . . . . . . . . . . . . . . . . .
12 12 16
3.1 3.2
Switching functions for n = 2. . . . . . . . . . . . . . . Truth-vectors for products in Reed-Muller expressions.
20 20
4.1 4.2 4.3
Multi-output function. . . . . . . . . . . . . . . . . . . Different orderings of Walsh functions. . . . . . . . . . Recurrence relations for Haar functions for n = 2. . . .
50 61 69
5.1
Bases used in the AND-EXOR expressions and related DDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
87
6.1 6.2 6.3 6.4 6.5
. . . .
. . . .
. . . .
. . . .
. . . .
Classification of DDs by range. . . . . . . . . . . . . . Discrete transforms and decision diagrams. . . . . . . . DTLs and basis functions in PKDDs. . . . . . . . . . . Symbolic representation of direct and inverse transform matrices used in definition of PKDTs. . . . . . . . . . Percentage of used nodes in BDDs. . . . . . . . . . . .
95 96 98 99 107
xviii
List of Tables
6.6 6.7 6.8 6.9 6.10
6.12 6.13 6.14 6.15 6.16 6.17 6.18 6.19
Percentage of used nodes in QDDs. . . . . . . . . . . Percentage of used nodes in different word-level DDs. Size, width, and area of different DDs. . . . . . . . . Size, width, and area of different DDs. . . . . . . . . Size, width, and area of SBDDs and MTBDDs for adders and multipliers. . . . . . . . . . . . . . . . . . Size, width, and area of different DDs for adders and multipliers. . . . . . . . . . . . . . . . . . Ratio of nodes in different DDs. . . . . . . . . . . . . Description of a node. . . . . . . . . . . . . . . . . . Description of nodes in PUMA. . . . . . . . . . . . . Structure for nodes in MDDs. . . . . . . . . . . . . . Binary operation OP. . . . . . . . . . . . . . . . . . . q-ary operation OP. . . . . . . . . . . . . . . . . . . . Structure for Unique Table. . . . . . . . . . . . . . . Realization of Unique Table. . . . . . . . . . . . . . .
. . . . . . . . .
111 111 115 116 116 119 119 120 122
7.1
Spectral transforms and DDs. . . . . . . . . . . . . . .
138
8.1 8.2 8.3 8.4
158 162 162
8.7 8.8
MTBDDs and MTBDD-LTAs for adders. . . . . . . . . Function with the minimized Haar spectrum. . . . . . Haar coefficients for adders. . . . . . . . . . . . . . . . Number of coefficients in the Haar spectrum and Haar-LTA spectrum. . . . . . . . . . . . . . . . . . . . Complexity of MTBDD for a two-bit adder. . . . . . . Complexity of HSTD and HSTDD-LTA for a two-bit adder. . . . . . . . . . . . . . . . . . . . . . . . . . . . Complexity of HSTDs. . . . . . . . . . . . . . . . . . . Complexity of HSTDD-LTAs. . . . . . . . . . . . . . .
9.1
Edge-valued DDs for switching functions. . . . . . . . .
168
10.1 10.2 10.3 10.4 10.5
Alignment x y. . . . . . . . . . . . . . . . . . . . AND as addition. . . . . . . . . . . . . . . . . . . . AND as multiplication. . . . . . . . . . . . . . . . . Relationships among I(1), R(1), R(1) and E(1). . . Paths in EXOR-TDT, ERM-spectrum, and Boolean differences. . . . . . . . . . . . . . . . . . . Decomposition rules. . . . . . . . . . . . . . . . . . Examples of paths determining KDTs contained in EXOR-TDTs. . . . . . . . . . . . . . . . . . . . DTLs and basic functions in PKDDs. . . . . . . . . Direct and inverse transform matrices used in definition of PKDTs. . . . . . . . . . . . . . . . . .
. . . .
182 183 183 187
. . . .
205 206
. . . . the . .
211 212
6.11
8.5 8.6
10.6 10.7 10.8 10.9
. . . .
. . . .
108 109 109 110
.
110
163 163 163 164 166
214
List of Tables
10.10 Symbolic representation of direct and inverse transform matrices used in definition of PKDTs. . . . . . . . . . 10.11 Paths in EXOR-TDT corresponding to PKDTs. . . . . 10.12 Features of EXOR-TDDs, Arith-TDDs, and AC-TDDs. 10.13 Extended-DTLs and basic functions in PKACDDs. . . 10.14 Symbolic representation of direct and inverse transform matrices used in the definition of PKACDTs. . . . . . 10.15 SAFs for PKDDs in Example 106. . . . . . . . . . . . 10.16 Multi-output function in Example 109. . . . . . . . . . Nodes in DDs on C2n . . . . . . . . . . . . . . . . . . . . Nodes in DDs on C4n . . . . . . . . . . . . . . . . . . . . Irreducible unitary representations of Q2 over C. . . . Nodes in FNADDs. . . . . . . . . . . . . . . . . . . . . Complexity of DD-representation of the 3-bit multiplier, in terms of depth (d), non-terminal nodes (ntn), width (w), minimum (min) and average (av) number of nodes per a level, constant nodes (cn), size (s), and the number of edges (e) of nodes. . . . . . . . . . . . . . . . . . . . 11.6 SBDDs for adders. . . . . . . . . . . . . . . . . . . . . 11.7 FNADDs for adders. . . . . . . . . . . . . . . . . . . . 11.8 SBDDs for multipliers. . . . . . . . . . . . . . . . . . . 11.9 FNADDs for multipliers. . . . . . . . . . . . . . . . . . 11.10 SBDDs and FNADDs for benchmark functions. . . . . 11.1 11.2 11.3 11.4 11.5
xix
215 216 220 222 223 224 225 236 239 240 246
248 251 251 251 251 252
1 Signals
1.1 Signals and Signal Processing In this chapter, we discuss the fundamentals of spectral techniques in logic design and certain signal processing problems in the form of presenting simplified questions and providing answers. Questions with essentially the same content can be formulated on many levels of depth and sophistication and here a purpose of these questions and answers is to fix ideas and set the point of view for the following chapters. Spectral techniques are used in processing signals. What is meant by the concept signal? The real-life signals can be thought of as physical conveyors of information. For instance, when we are talking, our vocal system (vocal cords and vocal tract) generates pressure changes in the air around us and these changes carry information that is then analyzed first (in biological signal processing sense) by the auditory system of the listener and then further processed on higher level by the brain. In addition to signals generated intentionally our auditory system receives and processes huge number of signal that are generated by some random events (background noise, sound of wind etc.) or by nature.
2
1. Signals
This already reveals some key ingredients of signals • Information is either intentionally or unintentionally coded into the parameters describing the physical phenomenon corresponding to the signal. In the example, measuring air pressure as a function of time reveals all relevant information. Measuring, e.g. the level of carbon dioxide would not provide additional relevant information, in this case. • By appropriate processing we can extract the relevant information from the signal, at least in principle. • Signal processing is the area of applied mathematics, electrical engineering, and information technology that deals with methods, algorithms, and procedures for processing signals. It has turned out that many concepts that itself are not intuitively what we understand by signals can very efficiently be analyzed and manipulated by signal processing methods. A particular example is logic functions that can often be represented in a much more compact form when they are thought of as signals and then processed by the spectral methods of signal processing. Signals are physical processes that spread in space-time. Switching theory, logic design, and multiple-valued logic are included as subareas in signal processing devoted to the processing and design of networks for realization of some particular classes of signals. These are binary and multiple-valued logic signals [77, 103, 105].
1.1.1 Mathematical models of signals How can a signal be processed? Signals can be processed as follows: 1. Directly, in the real time, by processing them physically as they are received from their sources. This is not always possible. For example, there are short-duration signals, very long duration signals, signals emitted from dangerous places, etc. 2. Indirectly, through their mathematical models. What is the mathematical model for a signal? Since the signal spreads through space-time, we need first at least one independent variable x in its modeling. Since signals convey some information, we need a dependent quantity that will be changed and modulated with respect to some rule to code the information into the signal. It follows,
1.1. Signals and Signal Processing
3
therefore that we need a dependent variable f (x). Therefore, we can say the following: Statement 1 Signals are represented by functions. Usually, we can identify the signal with the function that represents it. What is a function? A function is a mathematical notion that expresses the dependence of one quantity on another quantity or quantities. A simple, more detailed, answer would be that a function is a special case of a relation, however, then the question becomes What is a relation? Therefore, we first introduce some notations and definitions before providing an answer. A tuple (x, y) of two elements arranged in a fixed order is a pair. In general, a tuple of n elements (x1 , x2 , . . . , xn ) is an n-tuple. Two n-tuples (x1 , x2 , . . . , xn ) and (y1 , y2 , . . . , yn ) are equal iff xi = yi for all i. Definition 1 (Direct product) The set of all pairs (x, y) is the direct product, or the Cartesian product, of two sets X and Y , X × Y = {(x, y)|x ∈ X, y ∈ Y }. Example 1 For X = {0, 1} and Y = {0, 1, 2}, X × Y = {(0, 0), (0, 1, ), (0, 2), (1, 0), (1, 1), (1, 2)}. Definition 2 (Relation) A subset R of a direct product X × Y of two sets X and Y is a binary relation from X to Y , i.e., if R ⊆ X × Y , xi ∈ X, yi ∈ Y , and (xi , yj ) ∈ R, then xi and yi are in the relation R, or the relation R holds. A binary relation from X to X is a binary relation on X. An n-ary relation is a subset of the direct product of n sets X1 × X2 × · · · × Xn . Definition 3 (Inverse relation) If R is a relation from X to Y , then the set with the order of elements in the pair R interchanged, is an inverse relation of R and is denoted by R−1 . Thus, R−1 = {(yj , xi )|(xi , yj ) ∈ R}. Definition 4 (Function) Consider a binary relation f from a set X to a set Y . If for each element x in X there exist unique element y in Y such than xf y, then f is a function from X to Y , i.e., f : X → Y . The set X is the domain for f . The element yj in Y that corresponds to an element xi ∈ X in a given function f , i.e., f (xi ) = yj is the value of the function f with respect to xi . The set of all function values for the domain of f is the range of f . In this case, R ⊆ Y . Therefore, a function is a special case of a relation, and from a given function f we can define a relation Rf as follows:
4
1. Signals
For the function f : X → Y , f (xi ) = yj iff (xi , yj ) ∈ Rf . Notice that if f −1 is the inverse relation of the function f : X → Y , then is, in general, not a function. If y = f (X), then f −1 (y) is, in general, f a subset of X. −1
Example 2 Consider a function f (x) = x2 of the set of integers Z to Z, i.e., x ∈ Z, and f (x) ∈ Z. Although f is a function, the inverse relation is not a function, since for some y there may exist two x’s such that y = f (x). For example, if x = −2, then f (x) = 4, but also for x = 2. Moreover, there is no x such that f (x) = 3. This definition of functions through relations makes it possible to prove the existence of a function without being able to calculate its values explicitly for any element of the domain. Also, it allows us to prove general properties of functions independently of their form. Therefore, in many cases, the following informative definition of functions is simple and sufficient. Definition 5 A function is a rule that associates each element d of a set D to a unique element r = f (d) of another set R, symbolically f : D → R. The first set is called the domain; and the second is the range for f . In this book, we are concerned with functions on finite sets. Usually, we identify a finite set of k elements D(k) with the subsets of first k nonnegative integers. In this case, we write D(k) = {0, . . . , k−1}, where k ∈ N0 , N0 = N ∪ {0}, N - the set of natural numbers. Definition 6 A finite n-variable discrete function is defined as a mapping f : ×ni=1 Di → Rq , where Di and R are finite sets, and xi ∈ Di . Definition 7 A multi-output function f is a function where q = 1. Thus, this is a system of functions f = (f0 , . . . , fq−1 ). In some practical applications, a multi-output function can be replaced by the equivalent single-output function fz defined as a sum of outputs fi multiplied by powers of a weighting coefficient wi , i = 0, 1, . . . , q − 1. In this case, it may be convenient to enumerate the outputs in reverse order, i.e., f = (fq−1 , . . . , f0 ), to have the index i of fi equal to the exponent of the assigned weighting coefficient wi . Do we know an example of a function? Yes, n-variable switching functions f : B n → B, B = {0, 1} are an example.
1.1. Signals and Signal Processing
0 1 2 3 4 5 6 7
x1 x2 x3 000 001 010 011 100 101 110 111
5
f f (0) f (1) f (2) f (3) f (4) f (5) f (6) f (7)
Table 1.1. Binary-valued input functions.
Example 3 The vector F = [1, 0, 0, 0, 0, 1, 1, 1]T defines a three-variable switching function f (x1 , x2 , x3 ) : B 3 → B by listing the values of f for different combinations of binary values for the variables x1 , x2 , and x3 , B 3 = {(0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)}. Example 4 The truth-vectors F1 = [1, 0, 1, 1]T and F0 = [1, 0, 0, 1]T define a two-variable multi-output function f = (f1 , f0 ), where f0 and f1 are defined by F0 and F1 . This function can be represented by an integer-valued function fZ = 2f1 + f0 , i.e., ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 3 1 1 ⎢ 0 ⎥ ⎢ 0 ⎥ ⎢ 0 ⎥ ⎥ ⎢ ⎥ ⎢ ⎥ FZ = 2 ⎢ ⎣ 1 ⎦ + ⎣ 0 ⎦ = ⎣ 2 ⎦. 3 1 1 When the domain D and the range R are finite sets, the number of function f : D → R is finite. Example 5 Consider D1 = {0, 1}, D2 = {0, 1, 2}, and R = {0, 1, 2, 3}. The number of function f : D1 × D2 → R is 42×3 = 46 , since for each element in the set of 2 × 3 = 6 elements, one element of the four elements in R can be associated. Example 6 The number of n-variable switching functions f : B n → B, n B = {0, 1}, is 22 . Discrete functions, having finite sets as domains, are conveniently defined by tables showing elements of the domain in the left part, and the corresponding function values in the right part. In the case of switching functions, these tables are the truth-tables, and function values are represented by truth-vectors. Tables 1.1, - 1.3 show tables that define functions with domains considered in Examples 3, 4, and 5, respectively. The size of tables defining discrete functions is exponentially dependent on the number of variables. Therefore, this method, and equally vector representations, i.e., the right part of the tables, are unsuitable for functions with a large number of variables.
6
1. Signals
0 1 2 3
x1 x2 00 01 10 11
f f0 (0)f1 (0) f0 (1)f1 (1) f0 (2)f1 (2) f0 (3)f1 (3)
Table 1.2. Binary-valued input multi-output functions.
f f f f f f f f
0 1 2 3 4 5
x1 x2 00 01 02 10 11 12
f f (0) f (1) f (2) f (3) f (4) f (5)
Table 1.3. Multiple-valued input functions.
: ×ni=1 {0, . . . , mi − 1} → {0, . . . , τ − 1} : {0, . . . , τ − 1}n → {0, . . . , τ − 1} : {0, 1}n → {0, 1} : ×ni=1 {0, . . . , mi − 1} → {0, 1} : {0, 1}n → {0, . . . , τ − 1} : {0, 1}n → R : {GF (p)}n → GF (p) : I n → I, I = [0, 1]
Integer Multiple-valued Switching, or Boolean Pseudo-logic Pseudo-logic Pseudo-Boolean Galois Fuzzy
Table 1.4. Discrete functions.
In tabular representations, all the function values are explicitly shown, without taking into account their possible relationships. In representations of discrete functions by decision diagrams, which is the main subject of this book, the reduction is achieved due to the particular properties of functions and the corresponding relationships among function values. Table 1.4 shows examples of different classes of discrete functions . This book deals mainly with switching, multiple-valued, and integer functions.
1.2 Summary Up to now, we have agreed on the following. 1. Signals are physical conveyors of information. 2. Signals are processed to extract the information in them. 3. Signals can be processed through mathematical models. 4. Functions are mathematical models of signals.
2 Algebraic Structures for Signal Processing
2.1 Domains and Ranges To get a practically tractable mathematical model for a signal, it is not enough to consider D and R simply as sets. We should enrich D and R with some operations that reflect the nature of the source of the signal. To be useful these operations should define a meaningful algebraic structure whose properties enable simpler or faster processing of signals. What is an algebraic structure? First we will define an algebraic system as a set and a collection of operations and possibly relations for the set, which implies that the algebraic system is closed under these operations. In many cases, neither the set nor the operations are defined in a system. The structure of a system is instead characterized by a set of axioms, and all systems satisfying these axioms are grouped together in a set called an algebraic structure. Thus, an algebraic structure is an abstraction of joint features of several algebraic systems. Definition 8 (Algebraic structure) An algebraic structure is defined by the tuple A, o1 , . . . , ok ; R1 , . . . , Rm ; c1 , . . . , ck , where A is a non-empty set, oi is a function Api → A, Rj is a relation on A, pi is a positive integer, and ci is an element of A.
8
2. Algebraic Structures for Signal Processing
Example 7 Z, + is an algebraic structure consisting of the set of integers Z and addition + defined in the usual way. Z, +, ≤ is an algebraic structure consisting of the set of integers Z, the addition, and the relation equal to or less than. In many applications, this general definition of an algebraic structure is simplified as follows. Definition 9 An algebraic structure is a triple A, O, C , where 1. Underlying set A = , 2. Operation set O = ∪ni=1 oi , where oi are i-ary operations, 3. Constant set C ⊆ A. Further, it is usually assumed that for a nonempty set A, the operations oi are binary oi : A2 → A or unary oi : A → A operations, and constants are defined as A0 → A, with A0 = {}, i.e., c1 , . . . , ck ⊂ A. In what follows, we consider a few examples of algebraic structures.
2.1.1 Domains It is shown [267] that the group is the weakest algebraic structure for D still sufficient for many signal processing tasks. What is a group? A group is an example of algebraic structures with a single binary operation, where a binary operation on a set X is a function of the form f : X × X → X. Binary operations are often written using infix notation such as x + y, x · y, or simply by juxtraposition xy, rather than by functional notation of the form f (x, y). Examples of operations are the addition and multiplication of numbers and matrices as well as the composition of functions. Consider two functions q : X → X and r : X → X on a set X. Then, q ◦ r : X → X is the function defined by (q ◦ r)(x) = q(r(x)) for all x ∈ X. This defines an associative binary operation on the set of functions from X to X. Definition 10 (Group) An algebraic structure G = G, ⊕, 0 with the following properties is a group. 1. Associative law: (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z), x, y, z ∈ G. 2. There is identity: For all x ∈ G, the unique element 0 (identity) satisfies x ⊕ 0 = 0 ⊕ x = x. 3. Inverse element: For any x ∈ G, there exists an element x−1 such that x ⊕ x−1 = x−1 ⊕ x = 0.
2.1. Domains and Ranges
9
A group G is an Abelian group if x ⊕ y = y ⊕ x for each x, y ∈ G, otherwise G is a non-Abelian group. The following example shows some Abelian groups that will appear later in the text. Examples of non-Abelian groups are given in Chapter 11. Example 8 (Group) 1. Zq = ({0, 1, . . . , q − 1}, ⊕q ), the group of integers modulo q. 2. Z5 = ({0, 1, 2, 3, 4}, ⊕5 ), where 2 ⊕5 2 = 4, 3 ⊕5 4 = 2, etc. 3. Z2 = ({0, 1}, ⊕), where 0 ⊕ 0 = 0, 0 ⊕ 1 = 1, 1 ⊕ 1 = 0, etc. Notice that addition modulo 2, symbolically ⊕, is equivalent to the logic operation EXOR usually denoted in switching theory simply as ⊕. Likewise, multiplication modulo 2 is equivalent to logic AND. Notice that groups of the same order can have totally different structure. Example 9 Consider the groups of integers modulo 4, Z4 = ({0, 1, 2, 3}, ⊕4 ) and the group B2 = ({(0, 0), (0, 1), (1, 0), (1, 1)}, ⊕), where ⊕ is pairwise EXOR. In Z4 we have 1 ⊕4 1 = 2 = 0, but in B2 , it is (x, y) ⊕ (x, y) = (0, 0) for any (x, y) ∈ B2 . As examples of infinite groups, notice that the set of integers Z under usually defined addition is a group. The real numbers R form a group under addition and positive real numbers form a group under multiplication. Many useful operations in signal processing rely heavily on the existence of the inverse element and, thus, many weaker structures, semigroups (a set equipped with an operation satisfying associativity), monoids (a semigroup with unity), etc., are not considered in this book. When D is a finite group G that has g elements, we say G is of order g. Often, G is decomposable as G = ×ni=1 Gi , g = Πni=1 gi , g1 ≤ g2 ≤ . . . ≤ gn .
(2.1)
Example 10 Let Gi = Gi , ⊕i , 0i be a group of order gi , i = 1, . . . , n. Then, ×ni=1 Gi , ⊕, (01 , . . . , 0n ) , where ⊕ denotes componentwise addition in a group, is called the direct product of Gi , i = 1, . . . , n. If G is decomposable as a direct product of Gi , ⊕i , 0i , a function f (x) on G can be considered alternatively as an n-variable function f (x1 , . . . xn ), xi ∈ Gi . Example 11 Let f : ×ni=1 Gi → R be a function. We can alternatively view f as a single variable function f (x), x ∈ ×ni=1 Gi , or an n-variable function f (x1 , . . . , xn ), where xi ∈ Gi . In (2.1), if gi = p for each i, we get a group Cpn used as the domain for p-valued logic functions, and C2n , when gi = 2 for each i, used as the domain for switching functions.
10
2. Algebraic Structures for Signal Processing
Example 12 The set B n of binary n-tuples (x1 , . . . , xn ), xi ∈ {0, 1} expresses the structure of a group of order 2n under the componentwise operation EXOR defined by 0, xi = xj , xi ⊕ xj = 1, xi = xj . The identity is the zero n-tuple O = (0, . . . , 0) and each element is selfinverse. This group is denoted as the finite dyadic group C2n . Example 13 For n = 3, a three-variable function f (x1 , x2 , x3 ), xi ∈ {0, 1}, can be represented by the truth-vector F = [f (000), f (001), f (010), f (011), f (100), f (101), f (110), f (111)]T , often written as F = [f000 , f001 , f010 , f011 , f100 , f101 , f110 , f111 ]T . The set B 3 = {(x1 , x2 , x3 )|xi ∈ B} of binary triplets with no structure specified can be considered as the underlying set of the dyadic group C23 , and the values for xi are considered as logic values 0 and 1. If we perform the mapping z = 4x1 +2x2 +x3 , where the values of xi are considered as integer values 0 and 1, and the addition and multiplication are over the integers, we have one-to-one correspondence in B 3 and the underlying sets of C23 and the cyclic group of order 8, Z8 = ({0, 1, 2, 3, 4, 5, 6, 7}, ⊕8 ). Therefore, f can be alternatively viewed as a function of two very different groups, C23 and Z8 , of the same order. It becomes clear that choosing the right group structure may be very important in the processing of signals.
2.1.2 Ranges When we want to compare some signals, a single operation, such as addition, may be sufficient if their absolute values are considered. Since we have the inverse element, we may estimate the difference between some parameters of a signal by subtracting one from the other. However, if we want to consider their relative ratio, another operation may be needed. Therefore, in engineering practice, the structure of a field P is usually assumed for the range R of functions f describing signals. Besides that, in nature there are phenomena that are naturally equipped with field structure. Electric fields are an important example. Further, an algebraic structure enriched with some more operations provides a convenient environment for representation and study of functions, and in this way, for processing and analysis of the information content of signals whose models they are.
2.1. Domains and Ranges
11
What is a field? A field is a much richer structure that has two operations which are tied together. Another operation besides the addition ⊕, is usually the multiplication · for elements in G. We get the structure of a ring if the multiplication is associative. Definition 11 (Ring) An algebraic structure R = G, ⊕, · with two binary operations ⊕ and · is a ring if 1. G = G, ⊕ is an Abelian group, i.e., the addition ⊕ is commutative. 2. G, · is a semigroup, i.e., the multiplication is associative. 3. The distributivity holds, i.e., x(y ⊕ z) = xy ⊕ xz, for each x, y, z ∈ G. Example 14 (Ring) B, ⊕, · , where B = {0, 1}, and ⊕, and · are EXOR and logic AND, respectively, form the Boolean ring. The set of all switching functions of a given number n of variables with the same operations applied componentwise is also a Boolean ring. Further, we get a field if the non-zero elements form an Abelian group with respect to multiplication. Definition 12 (Field) A ring R = G, ⊕, ·, 0 is a field if G \ {0}, · is an Abelian group. The identity element of this multiplicative group is denoted by 1. Example 15 (Field) 1. The complex numbers with usual operations, i.e., C, +, ·, 0, 1 compose a field, the complex field C. 2. The real numbers with usual operations, i.e., R, +, ·, 0, 1 compose a field, the real-field R. 3. The integers modulo k, Zk form a ring. Notice that this ring has the multiplicative identity 1. In general, not every non-zero element has a multiplicative inverse and, thus, is not necessarily a field. In Z4 = {0, 1, 3, 3}, ⊕4 , ·4 , where ⊕4 and ·4 are modulo 4 operations, there is no element x such that 2 ·4 x = 1. However, if k is a prime number, then Zk is a field. The fields with finitely many elements are finite fields. It can be shown that for power of a prime number pn , there exist a finite field with pn elements. See, for example, [157, 183, 191]. In this case, the addition and multiplication are defined by a table composed such that the requirements for a field are true. If q = pn is a prime power, then there exists up to isomorphism a single field with q elements.
12
2. Algebraic Structures for Signal Processing
Recall that two structures are isomorphic if each of them can be derived from the other by suitably changing the symbols of the structure. Formally, the structures X, q and Y, r , where X and Y are sets, and q and r sets of operations, are isomorphic if there are mappings µ : q → r and ν : X → Y such that for all elements x, y, and z in X, and ⊕ in q holds that if x⊕y = z, then ν(x)µ(⊕)ν(y) = ν(z). Example 16 If p = 2, and n = 2, then {0, 1, 2, 3}, ⊕, · is a finite field if the the addition ⊕ and multiplication · are defined as in Tables 2.1, 2.2, respectively. Note that the field GF (4) is completely unrelated to the ring Z4 of integers modulo 4. The other possible definitions of operations over four elements that fulfill the requirements of a field can be mapped in these tables. ⊕ 0 1 2 3
0 0 1 2 3
1 1 0 3 2
2 2 3 0 1
3 3 2 1 0
Table 2.1. Addition GF (4).
· 0 1 2 3
0 0 0 0 0
1 0 1 2 3
2 0 2 3 1
3 0 3 1 2
Table 2.2. Multiplication GF (4).
In signal processing, fields with pn elements are most frequently used. Such fields are convenient in the processing of logic signals, since their elements my be encoded by p-valued n-tuples. Further, if p = 2 this provides for realizations with two stable-state elements. It should also be noted that logic circuits with more than two states, in particular three and four stable states have been developed and realized [191]. What if k = 2? Then, Z2 = {0, 1}. If we interpret the elements of Z2 as logic values 0 and 1, and define the addition as EXOR and multiplication as logic AND given by 1, xi = xj = 1, xi ∧ xj = 0, otherwise, then we get the Galois field of order 2 and denote it by GF (2). Fig. 2.1 shows relationships between the previously discussed algebraic structures, groups, rings, and fields, imposed on a set G by introducing the addition ⊕, and the multiplication ·, and by requiring some relations among them. Fig. 2.2 shows some hierarchy among these algebraic structures. It shows that starting from non-Abelian groups, the other structures can be obtained by introducing some new operations and requirements
2.2. Vector spaces
13
Field P
Ring R Group G
Figure 2.1. Relationships among algebraic structures.
on the set G. Thus, among the structures discussed, we consider the nonAbelian groups to be the structure with greatest freedom, since even the commutativity law is not required. However, the hierarchy can be discussed from the opposite point of view. A field should be first a group, then a ring, and finally a field, if it is enriched with some operations satisfying some properties.
2.2 Vector spaces In order to consider spectral transforms and spectral transform DDs, we introduce another algebraic structure, the vector space.
14
2. Algebraic Structures for Signal Processing
Non-Abelian Group Group Abelian Group Ring Field
Figure 2.2. Hierarchy among algebraic structures.
Definition 13 Given an Abelian group G and a field P , the pair (G, P ) is a linear vector space, in short, a vector space, if the multiplication of elements of G with elements of P , i.e., the operation P × G → G, is defined such that the following properties hold. For each x, y ∈ G, and λ, µ ∈ P , 1. λx ∈ G, 2. λ(x ⊕ y) = λx ⊕ λy, 3. (λ + µ)x = λx ⊕ µx, 4. λ(µx) = (λµ)x, 5. e · x = x, where e is the identity element in P . In what follows, we will consider the vector spaces of functions defined on finite discrete groups. Definition 14 Denote by P (G) the set of all functions f : G → P , where G is a finite group of order g, and P is a field that may be the complex field C, the real-field R, the field of rational numbers Q, or a finite (Galois) field GF (pk ). P (G) is a vector space if 1. For f, z ∈ P (G), addition of f and z is defined by (f + z)(x) = f (x) + z(x) 2. Multiplication of f ∈ P (G) by an α ∈ P is defined as (αf )(x) = αf (x). Since the elements of P (G) are vectors of the dimension g, it follows that multiplication by α ∈ P can be viewed as componentwise multiplication with constant vectors in P (G). This points out the difference between a
2.3. Summary
15
vector space and an algebra, where the multiplication is defined for all the elements in P (G). Example 17 Consider the set GF (C2n ) of functions whose domain is C2n and range GF (2). These functions can be conveniently represented by binary vectors of the dimension 2n . This set is the vector space over GF (2) if the operations in GF (2) are applied componentwise. Similarly, the set C(C2n ) of functions whose domain is C2n and range the complex field C can be viewed as a set of complex vectors of the dimension 2n . This set is the vector space over C if the operations in C are applied componentwise to the vectors of function values. Generalizations to functions on other finite Abelian groups into different fields are also interesting in practice. Definition 15 A vector space V, ⊕ over a field P becomes an V, ⊕, · if multiplication · is defined such that x(y ⊕ z) = xy ⊕ xz, (y ⊕ z)x = yx ⊕ zx, for each x, y, z ∈ V , and αx · βy = (αβ)(x · y), for each x, y ∈ V and α, β ∈ P . Boolean algebras are particular cases of linear algebras. Example 18 B, ∨, ∧, , where B = {0, 1}, ∨, ∧, and are the logic OR, AND and complement, is a Boolean algebra. It is derived from the Boolean ring by using the relation x ⊕ y = xy ∨ x y, for each x, y ∈ B. The set of all switching functions for a given number n of variables with the same operations applied componentwise form a Boolean algebra. Example 19 The space C(C2n ) may be given the structure of a complex function algebra by introducing the pointwise product of functions through (f · g)(x) = f (x) · g(x), for all f, g ∈ C(C2n ), for all x ∈ C2n . Table 2.3 summarizes groups and fields used in the definitions of vector spaces primarily considered in this book. In this table, G may be arbitrary finite, not necessarily an Abelian group, and P a field that could be a finite (Galois) field GF (pk ) or the complex field C. It is usually assumed that P expresses properties permitting definition of a Fourier transform in P (G) [101].
2.3 Summary 1. Discrete functions are mappings between discrete sets D and R.
16
2. Algebraic Structures for Signal Processing
Group C2n Cpn G
Domain Galois GF (2) Complex C Galois GF (pk ) Complex C P
Vector space GF2 (C2n ) C(C2n ) GFpk (Cpn ) C(Cpn ) P (G)
Table 2.3. Vector spaces.
2. In applications, the structure of a group is imposed on the domain D, and of a field on the range R of f . 3. Switching functions are considered as functions on the dyadic groups GF2 (C2n ) into GF (2) or Q ⊂ R ⊂ C. 4. Multiple-valued functions are considered as functions on the group Cpn into GF (pk ) or Q ⊂ R ⊂ C.
3 Spectral Techniques
3.1 Fourier Analysis In the previous chapter, we provided the algebraic structure to study spectral techniques. What are spectral techniques? We have always devised spectral techniques so that the problem in the original space is transferred somehow isomorphically to some other space that reflects particular properties of the problem. Thus, in the new space, the problem is simpler or there are at least well known tools to solve the transformed problem. When the transformed is solved, we can go back to the original space. Statement 2 Spectral techniques are a very powerful tool for signal processing. Why? Statement 3 Spectral techniques express the principle of linearity and superposition inherent in many physical phenomena in nature and very often assumed in engineering descriptions and approximations of natural phenomena. This is an essential principle often discussed and exploited in engineering practice.
18
3. Spectral Techniques
Jean Baptiste Joseph, Baron de Fourier, a famous French mathematical physicist from 18th century, developed the foundations of a mathematical discipline known as Fourier analysis [74], although other mathematicians used some results of his theory before him (see discussions, for example in [120, 255]. Fourier discovered that a periodic function (f (x) = f (x + T ), for all x ∈ R), can be represented as an infinite sum of sinusoids [21] f (x) =
∞ n=0
(an cos
2πx 2πx + bn sin ). T T
The key is that the correspondence between the function f and the coefficients ai , bi is linear. The extreme practical importance of this follows from the fact that so many natural phenomena: circular motion, vibrations, electromagnetic radiation, etc., are fundamentally sinusoidal. Thus, this transformation (the Fourier transform) often changes the problem of controlling a strange waveform to that of manipulating a few coefficients. The same expression can be applied to finite duration signals assuming their periodic extension [21]. For the representation of aperiodic signals, the Fourier transform is used: ∞ f (x)e−i2πwx dx, Sf (w) = −∞ ∞ f (x) = Sf (w)ei2πwx dw. ∞
Some conditions must be satisfied to allow us to represent a function by the Fourier series or to use the Fourier transform for it. Classical Fourier analysis is defined for functions on a particular Abelian group, i.e., for functions of real-valued variables into the complex field C. Extensions to other classes of functions, that means to functions on other groups into other fields, are possible. This is easily done through the group theoretic approach and group representation theory. The real group R is replaced by an arbitrary, not necessarily Abelian group. Fourier representations for functions on these groups are defined in terms of the group representations. This leads to a mathematical discipline called abstract harmonic analysis [101]. Spectral techniques are a subarea of this field devoted to applications in electrical and electronic engineering practice [154].
3.2 Fourier and Fourier-Like Transforms on Dyadic Groups Functional analysis is a mathematical discipline dealing with functions, function spaces, different operators in these spaces, and related subjects.
3.2. Fourier and Fourier-Like Transforms on Dyadic Groups
19
There is a theorem in functional analysis which we would like to mention now. Theorem 1 Let P (G) be a finite-dimensional vector space consisting of g elements. Each set Φ = {φi }, i = 0, . . . , g − 1, of g linearly independent functions is a basis in P (G). Thus, each function f ∈ P (G) can be represented as a linear combination si φi (x), si ∈ P. f= x∈G
What does ”linearly independent” mean? Any function from a set of linearly independent functions cannot be reduced to some other function from this set by some simple linear operations over this function and other functions: e.g., by addition of some functions in this set, subtraction, multiplication by a constant and then addition or subtraction, etc. Definition 16 The set of functions f0 , . . . , fn−1 is linearly independent if from the relation λ0 f0 + λ1 f1 + · · · + λn−1 fn−1 = 0,
(3.1)
follows λ0 = λ1 = · · · = λn−1 = 0. Thus, the set of functions is linearly dependent if there exists at least scalar λi , different from zero, such that (3.1) holds. Do we know an example of linearly independent functions? Example 20 Consider the set of functions f : B 2 → B. There are 16 functions, each of which can be represented as a truth-vector of length 4. Table 3.1 shows these truth-vectors. For simplicity, in this table, a function fi is denoted by the index i. Consider the subset of these functions r0 = F1 , r1 = F2 , r2 = F4 , and r3 = F8 . It is obvious that from relation ⎡ ⎤ 0 ⎢ 0 ⎥ ⎢ , λ 0 r 0 + λ 1 r1 + λ 2 r 2 + λ 3 r 3 = ⎣ ⎥ 0 ⎦ 0 it must follow that λ0 = λ1 = λ2 = λ3 = 0. Therefore, the set {r0 , r1 , r2 , r3 } is a set of linearly independent functions. Another example would be the basis functions in terms of which the Reed-Muller transform is defined.
20
3. Spectral Techniques 0 0 0 0 0
1 1 0 0 0
2 0 1 0 0
3 1 1 0 0
4 0 0 1 0
5 1 0 1 0
6 0 1 1 0
7 1 1 1 0
8 0 0 0 1
9 1 0 0 1
10 0 1 0 1
11 1 1 0 1
12 0 0 1 1
13 1 0 1 1
14 0 1 1 1
15 1 1 1 1
Table 3.1. Switching functions for n = 2.
x1 x2 x3 000 001 010 011 100 101 110 111
1 1 1 1 1 1 1 1 1
x3 0 1 0 1 0 1 0 1
x2 0 0 1 1 0 0 1 1
x2 x3 0 0 0 1 0 0 0 1
x1 0 0 0 0 1 1 1 1
x1 x3 0 0 0 0 0 1 0 1
x1 x2 0 0 0 0 0 0 1 1
x1 x2 x3 0 0 0 0 0 0 0 1
Table 3.2. Truth-vectors for products in Reed-Muller expressions.
3.3 Reed-Muller Transform Example 21 Consider the set of all switching functions for n = 3 and operations EXOR as addition and AND as multiplication. This is the vector space of functions on C23 into GF (2). Each f in this space is uniquely represented as f (x1 , x2 , x3 )
= r0 ⊕ r1 x3 ⊕ r2 x2 ⊕ r3 x2 x3 ⊕r4 x1 ⊕ r5 x1 x3 ⊕ r6 x1 x2 ⊕ r7 x1 x2 x3 ,
where ri ∈ {0, 1}. ˇ This is the Zegalkin polynomial [286, 287], or positive polarity ReedMuller expression for f [155, 174]. Thus, the set of functions consisting of the constant 1 and the considered product terms form a basis of the vector space. We will represent it as a vector
Xr (3) = 1 x3 x2 x2 x3 x1 x1 x3 x1 x2 x1 x2 x3 . Table 3.2 shows truth-vectors for this basis. Please do not be confused with the order of product terms. We are using the so-called Hadamard order for product terms, and lexicographic order for variables xi , i = 1, 2, 3, and coefficients rj , j = 1, 2, . . . , 7, since we want to use the matrix notation in further discussions. This ordering is convenient in such situations.
3.3. Reed-Muller Transform
21
What is the problem here? Given a function f , for example, expressed by its truth-vector F = [f (0), f (1), f (2), f (3), f (4), f (5), f (6), f (7)]T . Consider the problem of determining the coefficients ri in the positive polarity Reed-Muller (PPRM) expression of f . This is why we like to use the matrix notation. We first separate the coefficients from the product terms. To do this, we borrow some large brackets from matrices. It is convenient to use the Kronecker product of matrices in such applications. What is the Kronecker product? It is an operation over matrices named for the mathematician Kronecker to honor his contributions to mathematics, for example in set theory. We will explain the Kronecker product and its use with a simple example. Example 22 Consider two (2 × 2) matrices
b00 a00 a01 , B= A= a10 a11 b10 The Kronecker product of A and B is the ⎡ a00 b00
⎢ a00 b10 a00 B a01 B C=A⊗B= =⎢ ⎣ a10 b00 a10 B a11 B a10 b10
b01 b11
.
(4 × 4) matrix C defined by ⎤ a00 b01 a01 b00 a01 b01 a00 b11 a01 b10 a01 b11 ⎥ ⎥, a10 b01 a11 b00 a11 b01 ⎦ a10 b11 a11 b10 a11 b11
where ⊗ denotes the Kronecker product. The Kronecker product is associative and has many useful properties, some of which will be discussed and used in further considerations. Extension of the Kronecker product to not necessarily square matrices is straightforward. In general, the Kronecker product of two (p×q) and (r×s) matrices produces a (pr × qs) matrix whose elements are determined as in the above example. If we use the Kronecker product, the product terms in Xr (3) are generated as
1 x1 ⊗ 1 x2 ⊗ 1 x3 Xr (3) =
1 x3 x2 x2 x3 x1 x1 x3 x1 x2 x1 x2 x3 . = For an arbitrary n, Xr (n) =
n
i=1
1 xi
.
22
3. Spectral Techniques
If we substitute all the possible combinations of the logic values 0 and 1 for the variables x1 , x2 , x3 , then Xr (3) is written as a matrix R(3), whose columns are truth-vectors for elements of Xr (3) in Hadamard ordering, ⎤ ⎡ 1 0 0 0 0 0 0 0 ⎢ 1 1 0 0 0 0 0 0 ⎥ ⎥ ⎢ ⎢ 1 0 1 0 0 0 0 0 ⎥ ⎥ ⎢ ⎢ 1 1 1 1 0 0 0 0 ⎥ ⎥ R(3) = ⎢ ⎢ 1 0 0 0 1 0 0 0 ⎥. ⎥ ⎢ ⎢ 1 1 0 0 1 1 0 0 ⎥ ⎥ ⎢ ⎣ 1 0 1 0 1 0 1 0 ⎦ 1 1 1 1 1 1 1 1 Consider a matrix ⎡ x11 X = ⎣ x21 x31
x12 x22 x32
⎤ x13
x23 ⎦ = x1 x33
x2
x3
.
From the definition of matrix product, we see that a linear combination of the vectors x1 , x2 , x3 , ⎤⎡ ⎤ ⎡ λ1 x11 ⎦ ⎣ λ2 ⎦ = XΛ, x22 λ1 x1 + λ2 x2 + λ3 x3 = ⎣ x33 λ3 where Λ = [λ1 , λ2 , λ3 ]T . Thus, the requirement vectors can be written ⎡ 1 ⎢ 1 ⎢ ⎢ 1 ⎢ ⎢ 1 F = R(3)Srf = ⎢ ⎢ 1 ⎢ ⎢ 1 ⎢ ⎣ 1 1
that f be expressed with the Reed-Muller basis 0 1 0 1 0 1 0 1
0 0 1 1 0 0 1 1
0 0 0 1 0 0 0 1
0 0 0 0 1 1 1 1
0 0 0 0 0 1 0 1
0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 1
⎤⎡ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎦⎣
Srf (0) Srf (1) Srf (2) Srf (3) Srf (4) Srf (5) Srf (6) Srf (7)
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Thus, Srf is found by multiplying this equation from the left by the inverse matrix of R(3) (which clearly exists). It turns out that (remember that we are working in GF (2), i.e., modulo 2) R(3) is self-inverse, i.e., R−1 (3) = R(3), as can be directly verified. Thus, Srf = R−1 (3)F = R(3)F. How do we find R(n) and R−1 (n) in general?
We saw that Xr (3) = 1 x1 ⊗ 1 x2 ⊗ 1 x3 . If we substitute
1 0 0 and 1 for x1 in 1 x1 , we obtain the matrix . When forming 1 1
3.3. Reed-Muller Transform
23
R(3), we substitute 0 and 1 for x1 , x2 , x3 in natural order and the Kronecker product appears to be compatible with this as we see that
1 0 1 0 1 0 . ⊗ ⊗ R(3) = 1 1 1 1 1 1 This rule holds in general and we have Xr (n)
= =
R(n)
n
i=1 n i=1
1
xi
1 0 1 1
,
.
Since the following theorem holds for the Kronecker product, the inverse of R(n) (over GF (2)) is R(n). Theorem 2 If matrices A and B are invertible, then the matrix (A ⊗ B) is invertible, and (A ⊗ B)−1 = B−1 ⊗ A−1 . Definition 17 Consider a function f : C2n → GF (2) given by the truthvector F, Then, the pair = R(n)F F = R(n)Srf
Srf
(3.2) (3.3)
defines the direct and the inverse Reed-Muller transforms over GF (2). The matrix R(n) is called the Reed-Muller matrix and its columns are denoted as the Reed-Muller functions over GF (2). From (3.3), the i-th Reed-Muller function is given by rm(i, x) = rm(i1 , . . . , in ; x1 , . . . , xn ) = xi11 · · · xinn . Example 23 Fig. 3.1 shows the waveforms of the Reed-Muller functions for n = 3. From (3.3), the relationship between the Reed-Muller expressions and the Reed-Muller transform becomes evident. They are a different interpretation of the same concept. The Reed-Muller coefficients ri are interpreted as the coefficients in a polynomial expression or, alternatively, as the spectral coefficients in a spectral transform. This is a simple but important remark. Definition 18 In matrix notation, positive polarity Reed-Muller (PPRM) expressions for functions in C(C2n ) are given by f
= Xr (n)Srf (n) = Xr (n)R(n)F.
24
3. Spectral Techniques
rm(0,x)
rm(1,x) rm(2,x)
rm(3,x) rm(4,x)
rm(5,x) rm(6,x)
rm(7,x) x
Figure 3.1. Waveforms of Reed-Muller functions for n = 3.
Example 24 Consider a function f defined by f (x1 , x2 , x3 ) = (x1 ∧ x3 ) ∨ x3 , i.e., F = [0, 1, 01, 0, 1, 1, 1]T . How do we find the expression of f in terms of the Reed-Muller functions 1, x3 , x2 , x2 x3 , x1 , x1 x3 , x1 x2 , x1 x2 x3 ? By (3.2) the coefficients are obtained simply by multiplying (or transforming) by R(3), ⎤⎡ ⎤ ⎡ ⎤ ⎤ ⎡ ⎡ 0 0 1 0 0 0 0 0 0 0 r0 ⎢ r1 ⎥ ⎢ 1 1 0 0 0 0 0 0 ⎥ ⎢ 1 ⎥ ⎢ 1 ⎥ ⎥⎢ ⎥ ⎢ ⎥ ⎥ ⎢ ⎢ ⎢ r2 ⎥ ⎢ 1 0 1 0 0 0 0 0 ⎥ ⎢ 0 ⎥ ⎢ 0 ⎥ ⎥⎢ ⎥ ⎢ ⎥ ⎥ ⎢ ⎢ ⎢ r3 ⎥ ⎢ 1 1 1 1 0 0 0 0 ⎥ ⎢ 1 ⎥ ⎢ 0 ⎥ ⎥⎢ ⎥ ⎢ ⎥ ⎥=⎢ ⎢ ⎢ r4 ⎥ ⎢ 1 0 0 0 1 0 0 0 ⎥ ⎢ 0 ⎥ = ⎢ 0 ⎥ . ⎥⎢ ⎥ ⎢ ⎥ ⎥ ⎢ ⎢ ⎢ r5 ⎥ ⎢ 1 1 0 0 1 1 0 0 ⎥ ⎢ 1 ⎥ ⎢ 0 ⎥ ⎥⎢ ⎥ ⎢ ⎥ ⎥ ⎢ ⎢ ⎣ r6 ⎦ ⎣ 1 0 1 0 1 0 1 0 ⎦ ⎣ 1 ⎦ ⎣ 1 ⎦ 1 1 1 1 1 1 1 1 1 1 r7 Thus, f (x1 , x2 , x3 ) = x3 ⊕ x1 x2 ⊕ x1 x2 x3 . Is it possible to use calculations in other fields, for example, in the field of rational numbers Q or complex numbers C? Yes, a simple answer is related to the arithmetic transform . We explain in what follows. The set of integers Z is considered as a subset of Q or C. Therefore, Z ⊂ Q ⊂ C.
3.4. Arithmetic Transform
25
3.4 Arithmetic Transform Assume that the values 0 and 1 of a logic function are interpreted as integers 0 and 1. To have a vector space as the range, we need to consider these values 0 and 1 as elements of a field containing integers. The smallest possible field would be the field of rational numbers Q, but it will be convenient to go further and use the field of complex numbers. Thus, in the previous discussion, we replace GF (2) by C and consider functions f : C2n → C. Consider variable functions, i.e., 1 and x1 and the matrix
the single Xa (1) = 1 x1 , where a makes the distinction that the range is C. Denote by
1 0 A(1) = 1 1 the matrix whose columns are the functions 1 and x1 . As before, the matrix whose columns are the functions
Xa (1) = 1 xi , is obtained as A(n) =
n 1 0 . 1 1 i=1
The difference from working in C in the case of the arithmetic transform instead of GF (2), as was the case with the Reed-Muller functions, shows in the inverse matrix A−1 (n).
1 0 Since over C, A−1 (1) = , then −1 1 A−1 (n) =
n
A−1 (1).
i=1
Definition 19 Consider a function f : C2n → C, given by a vector F. The arithmetic spectrum of f is given by Saf
= A−1 (n)F,
(3.4)
and the inverse transform by F = A(n)Saf ,
(3.5)
where A(n) =
n
A(1).
i=1
The relations (3.4) and (3.5) define the direct and the inverse arithmetic transform, respectively.
26
3. Spectral Techniques
Example 25 For n = 3, the arithmetic transform is calculated by using the transform matrix ⎤ ⎡ 1 0 0 0 0 0 0 0 ⎢ −1 1 0 0 0 0 0 0 ⎥ ⎥ ⎢ ⎢ −1 0 1 0 0 0 0 0 ⎥ ⎥ ⎢ ⎢ 1 −1 −1 1 0 0 0 0 ⎥ −1 ⎥, ⎢ A (3) = ⎢ 0 0 0 1 0 0 0 ⎥ ⎥ ⎢ −1 ⎢ 1 −1 0 0 −1 1 0 0 ⎥ ⎥ ⎢ ⎣ 1 0 −1 0 −1 0 1 0 ⎦ −1 1 1 −1 1 −1 −1 1 where the exponent −1 denotes that this is a matrix inverse to A(n) over C, and A(n) is equal to R(n), however, with elements 0 and 1 interpreted as integers or, in general, complex numbers 0 and 1. Example 26 Let us derive the arithmetic spectrum of F = [1, 0, 1, 1]T . Thus, we need to find the coefficients a0 , a1 , a2 , a3 in the representation ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 1 1 0 0 0 ⎢ 0 ⎥ ⎢ 1 ⎥ ⎢ 1 ⎥ ⎢ 0 ⎥ ⎢ 0 ⎥ ⎢ ⎥ = a0 ⎢ ⎥ + a1 ⎢ ⎥ + a2 ⎢ ⎥ + a3 ⎢ ⎥ ⎣ 1 ⎦ ⎣ 1 ⎦ ⎣ 0 ⎦ ⎣ 1 ⎦ ⎣ 0 ⎦ 1 1 1 1 1 ⎡ ⎤⎡ ⎡ ⎤ ⎤ a0 a0 1 0 0 0 ⎢ a1 ⎥ ⎢ 1 1 0 0 ⎥ ⎢ a1 ⎥ ⎥⎢ ⎢ ⎥ ⎥ = ⎢ ⎣ 1 0 1 0 ⎦ ⎣ a2 ⎦ = A(2) ⎣ a2 ⎦ . 1 1 1 1 a3 a3 Multiplying ⎡ a0 ⎢ a1 ⎢ ⎣ a2 a3
from left by the inverse of A(2), we find ⎤⎡ ⎤ ⎡ ⎤ ⎡ 1 1 1 0 0 0 ⎥ ⎢ 0 ⎥ ⎢ −1 ⎥ ⎢ −1 1 0 0 ⎥⎢ ⎥ = ⎢ ⎥=⎢ ⎦ ⎣ −1 0 1 0 ⎦⎣ 1 ⎦ ⎣ 0 1 1 1 −1 −1 1
⎤ ⎥ ⎥. ⎦
Remark 1 The arithmetic transform is the integer Reed-Muller transform. Similarly, the arithmetic (AR) expressions are the integer counterparts of the Reed-Muller expressions. The waveforms of basic functions in terms of which ARs are defined are identical to those of Reed-Muller functions, and the difference is in the interpretation of the function values. However, the ARs can be applied to represent functions in C(C2n ), which includes the switching functions under the interpretation of their values as elements of C. Definition 20 In matrix notation, positive polarity arithmetic (PPAR) expressions for functions in C(C2n ) are given by f
= Xa (n)Saf (n) = Xa (n)A−1 (n)F.
3.4. Arithmetic Transform
27
3.4.1 Arithmetic transform of multi-output functions What are the differences and advantages of ARs compared to PPRMs? Arithmetic polynomials are used for efficient representation and calculation of multi-output functions fk , fk−1 , . . . , f0 represented as integer-valued functions f (z) via the mapping [139] f (z) =
k
2i fi .
i=0
Example 27 [139]: Consider a system of functions (f2 (x1 , x2 , x3 ), f1 (x1 , x2 , x3 ), f0 (x1 , x2 , x3 )), where f0 (x1 , x2 , x3 ) f1 (x1 , x2 , x3 ) f2 (x1 , x2 , x3 )
= x1 x3 ⊕ x2 , = x2 ∨ x1 x3 , = x1 (x2 ∨ x3 ).
If we form the matrix F whose columns are truth-vectors of f2 , f1 , and f0 , with their values interpreted as integers, ⎤ ⎡ 0 0 0 ⎢ 0 0 0 ⎥ ⎥ ⎢ ⎢ 0 1 1 ⎥ ⎥ ⎢ ⎢ 0 1 1 ⎥ ⎥ F=⎢ ⎢ 0 1 1 ⎥ = [F2 , F1 , F0 ] , ⎥ ⎢ ⎢ 1 0 0 ⎥ ⎥ ⎢ ⎣ 1 1 0 ⎦ 1 1 1 we have a compact representation for f2 , f1 , f0 . Reading the rows of F as binary numbers, we obtain an integer valued representation for f2 , f1 , f0 as f = 22 f2 + 2f1 + f0 , i.e., ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 0 0 0 0 ⎢ 0 ⎥ ⎢ 0 ⎥ ⎢ 0 ⎥ ⎢ 0 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ 1 ⎥ ⎢ 1 ⎥ ⎢ 0 ⎥ ⎢ 3 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎥ ⎢ ⎥ ⎢ ⎢ 3 ⎥ 1 0 ⎢ ⎥ = 22 ⎢ ⎥ + 2 ⎢ ⎥ + 1 ⎢ 1 ⎥ = 4F2 + 2F1 + F0 . ⎢ 1 ⎥ ⎢ 1 ⎥ ⎢ 0 ⎥ ⎢ 3 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ 0 ⎥ ⎢ 0 ⎥ ⎢ 1 ⎥ ⎢ 4 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ 0 ⎦ ⎣ 1 ⎦ ⎣ 1 ⎦ ⎣ 6 ⎦ 1 1 1 7
28
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
3. Spectral Techniques
Now, the arithmetic spectrum of F = [0, 0, 3, 3, 3, 4, 6, 7]T is ⎤⎡ ⎤ ⎡ ⎤ 0 0 ↔ 1 0 0 0 0 0 0 0 ⎢ ⎥ ⎢ ⎥ −1 1 0 0 0 0 0 0 ⎥ ⎥⎢ 0 ⎥ ⎢ 0 ⎥ ↔ ⎢ ⎥ ⎢ ⎥ −1 0 1 0 0 0 0 0 ⎥ ⎥⎢ 3 ⎥ ⎢ 3 ⎥ ↔ ⎢ ⎥ ⎢ ⎥ 1 −1 −1 1 0 0 0 0 ⎥ ⎥⎢ 3 ⎥ = ⎢ 0 ⎥ ↔ ⎢ ⎥ ⎢ ⎥ −1 0 0 0 1 0 0 0 ⎥ ⎥⎢ 3 ⎥ ⎢ 3 ⎥ ↔ ⎢ ⎥ ⎢ ⎥ 1 −1 0 0 −1 1 0 0 ⎥ ⎥⎢ 4 ⎥ ⎢ 1 ⎥ ↔ 1 0 −1 0 −1 0 1 0 ⎦⎣ 6 ⎦ ⎣ 0 ⎦ ↔ 7 0 ↔ −1 1 1 −1 1 −1 −1 1
1 x3 x2 x2 x3 x1 x1 x3 x1 x2 x1 x2 x3 .
Therefore, f is represented as the arithmetic polynomial f (z) = 3x2 + 3x1 + x1 x3 . From the linearity of the arithmetic transform, this polynomial can be generated as the sum of the arithmetic polynomials for f1 , f2 , f3 . Where are ARs used? Arithmetic expressions are useful in design of arithmetic circuits [122, 123, 124, 125]. They were recommended by Aiken and his group [264], with whom Komamiya worked for some time [242]. Arithmetic polynomials have also proved useful in the testing of logical circuits [62, 99, 100, 128, 156, 172], and their efficiency in parallel calculations has been reported [126, 143, 144]. Further applications of ARs are considered in [139, 140, 141, 142]. A brief review of arithmetic expressions is given in [53].
3.5 Walsh Transform In the Reed-Muller transform, we viewed the values 0,1 of a logic function as elements of GF (2). By viewing these values as integers 0,1 as elements of C, we obtain an arithmetic (functions) transform. Instead of the values 0 and 1, we could use some other complex numbers α, β and consider functions f : C2n → {α, β}. By using α = 1 and β = −1, we obtain the Walsh functions and the Walsh transform. This transform has many useful properties, one of the main ones being that under multiplication of complex numbers, {1, −1} forms a group with exactly the same structure as the group {0, 1} under (modulo 2) addition. Let us now use the values (1,-1) instead of (0,1) in the basic arithmetic transform matrix. We write this matrix as
1 1 W(1) = , 1 −1
3.5. Walsh Transform
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ W(3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
1 1 1 1 1 1 1 1
1 −1 1 −1 1 −1 1 −1
1 1 −1 −1 1 1 −1 −1
1 −1 −1 1 1 −1 −1 1
1 1 1 1 −1 −1 −1 −1
1 −1 1 −1 −1 1 −1 1
1 1 −1 −1 −1 −1 1 1
1 −1 −1 1 −1 1 1 −1
29
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.2. Discrete Walsh functions for n = 3.
or in symbolic notation Xw (1) =
1 (1 − 2xi )
.
In general, as in the Reed-Muller and arithmetic transforms, Xw (n) =
n
1 (1 − 2xi )
.
i=1
Definition 21 Consider functions f : C2n → {1, −1} ⊆ C, then the Walsh transform pair is given by = W−1 (n)F = 2−n W(n)F F = W(n)Swf ,
Swf
(3.6) (3.7)
where W(n) =
n
W(1).
i=1
The coefficient 2−n follows from the fact that W−1 (1) = 12 W(1). The relations (3.6) and (3.7) define the direct and the inverse Walsh transforms, respectively. Example 28 Fig. 3.2 shows the discrete Walsh functions for n = 3. Fig. 3.3 shows the waveforms of these functions. Remark 2 It is shown that the Walsh transform is the Fourier transform on the dyadic groups C2n [73]. It expresses the properties corresponding to the properties of the classical Fourier transform on R. Therefore, it is often called the Walsh-Fourier transform. The Reed-Muller and arithmetic transforms do not have all of these properties, and cannot be derived from the group representation theory as a generalization of the classical Fourier transform. However, they are closely related and share some of the useful properties of the Fourier transforms on groups. Therefore, they are denoted as the Fourier-like transforms.
30
3. Spectral Techniques wal(0,x) wal(1,x) wal(2,x) wal(3,x) wal(4,x) wal(5,x) wal(6,x) wal(7,x)
0
1
2
3
4
5
6
7
x
Figure 3.3. Waveforms of Walsh functions for n = 3.
Similar as for the Reed-Muller and arithmetic expressions, the Walsh expressions can be defined in terms of Walsh functions. Definition 22 In matrix notation, positive polarity Walsh (PPW) expressions for functions in C(C2n ) are given by f
=
2−n Xw (n)Swf (n)
=
2−n Xw (n)W(n)F.
3.6 Kronecker Transforms The transforms we discussed can be generalized into the Kronecker product representable transforms. Denote by P (Cn2 ) the set of all switching functions on C2n into P , where P is a field that may be a finite (Galois) field or the complex field C. Consider the set K = {Ki (1)} of all (2 × 2) non-singular matrices over P . Definition 23 The Kronecker transform in P (C2n ) is defined by the (2n × 2n ) transform matrix K(n) given by K(n) =
n
Ki (1),
i=1
where Ki (1) are freely chosen matrices in K.
3.6. Kronecker Transforms
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ K(3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
0 1 0 1 0 0 0 0
1 1 1 1 0 0 0 0
0 0 0 1 0 0 0 0
0 0 1 1 0 0 0 0
0 0 0 0 0 1 0 1
0 0 0 0 1 1 1 1
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 1
31
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.4. A Kronecker transform matrix for n = 3.
Definition 24 For a function f ∈ P (C2n ) the Kronecker spectrum is defined as Sk,f (n) = K(n)F.
(3.8)
The reconstruction of f is performed as F = K(n)−1 Sk,f (n).
(3.9)
Therefore, the relations (3.8) and (3.9) define the direct and inverse Kronecker transform pair. It is clear that for particular choices of the matrices Ki (1) and the field P , the Kronecker transforms include the Reed-Muller, arithmetic, and Walsh transforms. It should be noted that in the previously considered transforms, we first consider a matrix whose columns are the basis functions, and then determine the inverse of it to calculate the spectral coefficients. In these cases, the basis functions have already been defined for polynomial or series expansions, as for example the Reed-Muller expressions [286] and the Walsh series [275]. As we mentioned, the spectral interpretation of these coefficients is the same subject from a different point of view. Therefore, for the transition from the original into the spectral domain, we use the relation R(n)R−1 (n) = I(n), where R is a matrix whose columns define the basis functions and I(n) is the identity matrix. However, in Kronecker transforms, we do the opposite, we can freely chose the submatrices Ki (1) in the transform matrix K(n). Then, if we want to determine the basis functions with respect to which K(n) is a spectral transform, and determine the corresponding polynomial or series expression, we use the relation K−1 (n)K(n) = I(n). It is a matter of convention which transform is used as the direct and inverse transform matrix, but it is important to preserve the property expressed in these relations. For example, as will be discussed in what follows, the same convention is used for the Haar transform, where the Haar matrix is defined as a matrix whose rows, not columns, are the Haar functions [88]. Here, we use the property that the inverse of the Haar matrix is equal to its transpose.
32
3. Spectral Techniques
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ K−1 (3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
1 1 1 1 0 0 0 0
1 0 1 0 0 0 0 0
0 0 1 1 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 0 1 1 1 1
0 0 0 0 1 0 1 0
0 0 0 0 0 0 1 1
0 0 0 0 0 0 1 0
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.5. Basic functions for the Kronecker transform matrix in Example 29.
Example 29 Fig. 3.4 shows the Kronecker transform matrix K(3) for P = where B(1) is (2×2) identity matrix over Gf (2), GF (2) and K 1 (1) = B(1),
1 0 thus, B(1) = , K2 = R(1) and K3 = R(1), where R(1) is obtained 0 1 by exchanging the columns in R(1). This matrix is used to define the values of constant nodes in the Kronecker decision tree in Fig. 2.2.5 in [187]. Fig. 3.5 shows the matrix K−1 (3) whose columns define the set of basic functions in terms of which this particular Kronecker transform in Fig. 3.4 is defined. By definition, K−1 (3) is the inverse of K(3) over GF (2), i.e., as we discussed, K−1 (3)K(3) = I(3). From the properties of the Kronecker product, it is defined as the Kronecker product of submatrices K−1 1 (1) =
1 0 1 1 1 0 , and K−1 . Thus, , K−1 2 (1) = 3 (1) = 1 1 1 0 0 1 −1 −1 K−1 (3) = K−1 1 (1) ⊗ K2 (1) ⊗ K3 (1).
In discussing certain decision diagrams, we will use the concept of partial Kronecker transforms. Thus, we will define this concept here to make the presentation of different transforms complete.
3.7 Partial Kronecker Transforms The Fast Fourier transform (FFT) is an efficient algorithm for calculation of the discrete Fourier transform [35]. Its wide application in practice originated with publication of [35], although as is documented in [98], the essence of this algorithm was known and used by Gauss and some other scientists. The algorithm is based on the property that a function on a group C2n of order 2n can be considered as an n-variable function on C2n . Thus, the discrete Fourier transform of order 2n can be performed as n discrete Fourier transforms of orders 2. Each of these transforms is performed with respect to a variable in f . The method defined for DFT [35] may be extended to any Kronecker product representable transform due to the properties of the Kronecker
3.7. Partial Kronecker Transforms
33
product [84], as will be explained in the following example. In this case, the transform with respect to the i-th variable is determined by the submatrix Ki (1) in K(n).
x y q r Example 30 Consider two matrices X = and Y = z w s v
1 0 . Then, and the identity matrix I = 0 1 (X ⊗ Y) = (X ⊗ I)(I ⊗ Y). From the left side, X⊗Y =
x y z w
⊗
q s
r v
⎡
xq ⎢ xs =⎢ ⎣ zq zs
xr xv zr zv
⎤ yq yr ys yv ⎥ ⎥. wq wr ⎦ ws wv
From the right side, (X ⊗ I)(I ⊗ Y)
= ⎡
x y z w
x ⎢ 0 ⎢ = ⎣ z 0 ⎡ xq ⎢ xs = ⎢ ⎣ zq zs
⊗
0 y 0 x 0 y 0 w 0 z 0 w xr xv zr zv
yq ys wq ws
1 0 1 0 q ⊗ 0 1 0 1 s ⎤ ⎤⎡ q r 0 0 ⎥⎢ s v 0 0 ⎥ ⎥ ⎥⎢ ⎦⎣ 0 0 q r ⎦ 0 0 s v ⎤ yr yv ⎥ ⎥. wr ⎦ wv
r v
When the product of sparse matrices is multiplied by a vector, then the calculations can be expressed as a flow-graph with elements of matrices as weighting coefficients at the edges. In applications to calculation of spectral transforms, such a flow-graph is called a fast flow-graph and the related algorithm described in this way is called a fast transform. Each of the factor matrices in the product of sparse matrices describes a step in the FFT-like algorithm for calculation of the Kronecker transform defined by K(n). Fig. 3.6 shows the flow-graph for multiplication of X ⊗ Y by a vector F = [f0 , f1 , f2 , f3 ]T . In this figure, Sf (0) = Sf (1) = Sf (2) = Sf (3) =
(f0 x + f2 y)q + (f1 x + f3 y)r = f0 xq + f2 yq + f1 xr + f3 yr, (f0 x + f2 y)s + (f1 x + f3 y)v = f0 xy + f2 ys + f1 xv + f3 yv, (f0 z + f2 w)q + (f1 z + f3 z)r = f0 zq + f2 wq + f1 zr + f3 wr, (f0 z + f2 w)z + (f1 z + f3 w)v = f0 zs + f2 ws + f1 zv + f3 wv.
34
3. Spectral Techniques
z f1
q
x
f0
f0x+f2y y
x
f1x+f3y
y
z
s
f2
w
f0z+f2w
f3
w
f1z+f3w
r v
q s
r v
Sf(0) Sf(1) Sf(2) Sf(3)
Figure 3.6. Fast flow-graph for Kronecker product.
The factorization of the Kronecker product into the product of sparse matrices that are also Kronecker product representable is called the GoodThomas factorization [84, 265]. From this factorization, a Kronecker product representable matrix K(n) can be factored as [84, 265] K(n) =
n
Cj (n),
(3.10)
j=1
where Cj (n) =
n
Cji (1),
i=1
and
Cji (1) =
Ki (1), for i = j, Ij (1), for i = j,
where Ij (1) is the identity matrix of order gj . The matrix Cj (n) defines the partial Kronecker transform of f with respect to the j-th variable xj . Definition 25 For a function f given by the vector F = [f (0), . . . , f (g − 1)]T , the partial Kronecker spectrum with respect to the i-th variable xi , Kif = [Kif (0), . . . , Kif (g − 1)]T , is given by Kif = Ci (n)F. For the particular choices of P and Ki (1) this relation defines the partial Reed-Muller, partial arithmetic, and partial Walsh transforms. Example 31 Partial arithmetic transforms for n = 3 with respect to x1 , x2 , and x3 are given by the matrices A1 , A2 , and A3 :
1 0 1 0 1 0 ⊗ ⊗ A1 (f ) = 0 1 0 1 −1 1
3.7. Partial Kronecker Transforms
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
A2
= ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
A3
= ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 −1 0 0 0 0 −1 0 0 0 0 −1 0 0 0 0 −1
1 0 0 1
⊗
1 0 −1 1
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
⊗
1 0 0 0 0 0 0 1 0 0 0 0 −1 0 1 0 0 0 0 −1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 −1 0 0 0 0 0 0 −1
1 0 0 1 1 −1 0 0 0 0 0 0
⊗
1 0 0 1
⊗
0 0 0 0 0 0 1 0
1 0
0 0 0 0 0 0 0 1
0 1 0 0 0 0 0 0 1 0
1 0 −1 1
0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 −1 1 0 0 0 0 0 0 1 0 0 0 0 0 −1 1 0 0 0 0 0 0 1 0 0 0 0 0 −1
35
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎦
0 0 0 0 0 0 0 1
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎦
0 0 0 0 0 0 0 1
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
The partial arithmetic transform spectra of a function given by the vector
F = [f000 , f001 , f010 , f011 , f100 , f101 , f110 , f111 ]T ,
36
3. Spectral Techniques
are given by
⎡
S1f
⎢ ⎢ ⎢ ⎢ ⎢ = A1 F = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡
S2f
⎢ ⎢ ⎢ ⎢ ⎢ = A2 F = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡
S3f
⎢ ⎢ ⎢ ⎢ ⎢ = A3 F = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
f000 f001 f010 f011 f100 − f000 f101 − f001 f110 − f010 f111 − f011 f000 f001 f010 − f000 f011 − f001 f100 f101 f110 − f100 f111 − f101 f000 f001 − f000 f010 f011 − f010 f100 f101 − f100 f110 f111 − f110
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Example 32 For the Kronecker transform in Example 29, the partial Kronecker transform matrix with respect to x1 for n = 3 is equal to the identity matrix, since K1 (1) = B(1). The partial Kronecker transform matrix with respect to x2 is shown in Fig. 3.7. It is generated as
1 0 1 0 1 0 Ck2 = ⊗ ⊗ . 0 1 1 1 0 1 It is equal to the partial Reed-Muller matrix with respect to x2 , since K2 (1) = R(1). The partial Kronecker transform spectra for a function f given by the vector F = [1, 0, 0, 1, 0, 1, 1, 1]T are Sk1 ,f Sk2 ,f Sk3 ,f
= =
[1, 0, 0, 1, 0, 1, 1, 1]T , [1, 0, 1, 1, 0, 1, 1, 0]T ,
=
[0, 1, 1, 1, 1, 1, 1, 0]T .
3.8. Fixed Polarity Transforms
⎡
Ck2
⎢ ⎢ ⎢ ⎢ ⎢ =⎢ ⎢ ⎢ ⎢ ⎢ ⎣
1 0 1 0 0 0 0 0
0 1 0 1 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 1 0
0 0 0 0 0 1 0 1
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
37
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.7. The partial Kronecker transform matrix with respect to x2 for the Kronecker transform in Example 29.
3.8 Fixed Polarity Transforms 3.8.1 Fixed polarity Reed-Muller transforms Each switching function f can be represented as f = xi f0 ⊕ xi f1 , where f0 and f1 are the cofactors of f for xi = 0 and xi = 1, respectively. This expansion is called the Shannon expansion [191], although it has been noted that the same expansion was suggested by G. Boole. In matrix notation, this expansion is given by
1 0
f0 . f = xi xi f1 0 1 Therefore, the complete disjunctive normal form for a given function f can be derived by the recursive application of the Shannon expansion rule to all the variables in f [191]. Since xi = 1 ⊕ xi , f
= xi f0 ⊕ xi f1 = (1 ⊕ xi )f0 ⊕ xi f1 = 1 · f0 ⊕ xi f0 ⊕ xi f1 = 1 · f0 ⊕ xi (f0 ⊕ f1 ).
In matrix notation, f=
1 xi
1 0 1 1
f0 f1
.
This expansion is the positive Davio (pD) expansion rule whose recursive application to all the variables in f results in the positive polarity ReedMuller expression for f . However, since xi = 1 ⊕ xi , from the pD-expansion rule, f
= =
1 · f0 ⊕ xi (f0 ⊕ f1 ) = (1 · f0 ⊕ (xi ⊕ 1)(f0 ⊕ f1 ) 1 · f0 ⊕ xi (f0 ⊕ f1 ) ⊕ 1 · f0 ⊕ 1 · f1 = 1 · f1 ⊕ xi (f0 ⊕ f1 ).
This is the negative Davio (nD) expansion rule, the recursive application of which to all the variables in f produces the negative-polarity Reed-Muller expression for f .
38
3. Spectral Techniques
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ R(0,1,0) (3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
0 0 1 1 0 0 1 1
0 0 0 1 0 0 0 1
1 1 1 1 1 1 1 1
0 1 0 1 0 0 0 1
0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 1
0 0 0 0 1 1 1 1
0 0 0 0 0 1 0 1
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.8. Reed-Muller matrix for n = 3 and the polarity vector H = (010).
In matrix notation, f=
1 xi
0 1 1 1
f0 f1
.
It follows that the use of the negative literal for the i-th variable xi requires permutation of columns of the i-th basic Reed-Muller matrix R(1) in the Kronecker product representation of R(n) [211]. The use of the negative Davio expansion together with the positive Davio expansion (but not both for the same variable) permits the derivation of the fixed polarity Reed-Muller (FPRM) polynomials [184, 193, 195]. These polynomials are characterized by the polarity vectors H = (h1 , . . . , hn ) ∈ {0, 1}n , whose i-th coordinate hi = 1 shows that the corresponding variable is represented by the negative literal xi in the polynomial representation for a given function f . In that setting, for a given polarity vector H, the FPRM polynomial is given in the matrix notation by n n
hi hi R (1) F, f (x1 , . . . , xn ) = 1 xi i=1
i=1
where xhi i
=
xi , xi ,
hi = 0, hi = 1,
⎧
1 0 ⎪ ⎪ , ⎪ ⎪ 1 1 ⎨
hi
R (1) =
⎪ ⎪ 0 1 ⎪ ⎪ , ⎩ 1 1
hi = 0,
hi = 1.
The matrix notation permits interpreting the coefficients in FPRMs as the spectral coefficients of fixed polarity Reed-Muller transforms defined by the transform matrices RH (n) =
n i=1
for different choices of H.
Rhi (1),
3.8. Fixed Polarity Transforms
39
For a given positive polarity Reed-Muller spectrum, the Reed-Muller spectrum for the polarity H = (h1 , . . . , hn ) is determined by the permutation of the i-th Reed-Muller coefficient into the (i1 ⊕ h1 , . . . , in ⊕ hn ) coefficient, since RH (n) is derived from R(n) by the permutation of columns in which the i-th column is shifted to the position (i1 ⊕h1 , . . . , in ⊕ hn ). However, for a given n-variable function f , the use of different polarity Reed-Muller matrices produces 2n different Reed-Muller spectra. The fixed polarity Reed-Muller spectrum with the minimum number of non-zero coefficients defines the coefficients in the minimum Reed-Muller expansion for f . Example 33 Fig. 3.8 shows the Reed-Muller transform matrix for n = 3 and the polarity vector H = (0, 1, 0). Compared to the positive polarity Reed-Muller matrix R(3), i.e., the Reed-Muller matrix for H = (0, 0, 0), the indices of columns in R(010) (3) are defined as (i1 ⊕ h1 , i2 ⊕ h2 , i3 ⊕ h3 ). Thus, it follows (0, 1, 2, 3, 4, 5, 6, 7) → (2, 3, 0, 1, 6, 7, 4, 5). With this matrix, for a function f given by the truth-vector F = [1, 0, 0, 1, 0, 1, 1, 1]T , the Reed-Muller expansion for H = (0, 1, 0) is given by f = x3 ⊕ x2 ⊕ x1 ⊕ x1 x3 ⊕ x1 x2 x3 . Example 34 For f in Example 33, the Reed-Muller expansions for the polarity vectors H = (0, 0, 0), H = (0, 0, 1), H = (0, 1, 0), H = (1, 0, 0), H = (1, 1, 1) have five product terms. Each of other three Reed-Muller expansions has six product terms. Therefore, the positive polarity ReedMuller expansion for f given in Example 33 can be used as the minimal Reed-Muller expansion for f , the same as that in Example 33. Various exact and heuristic algorithms have been derived for determining FPRMs with minimum number of product terms for a given switching function f , see, for example, [25, 40, 195]. Generalized Reed-Muller expressions (GRMs) are a generalization of FPRMs where we are allowed to chose freely either the pD or nD expansion rule for each variable in a product independently of the assignment of the polarity to the same variable in other product terms [187, 191].
3.8.2 Fixed polarity arithmetic transforms Just as for the fixed polarity Reed-Muller transforms, the fixed polarity arithmetic transforms are defined by switching columns of those A(1) corresponding to the variables xi used with negative literals xi . Example 35 Fig. 3.9 shows the arithmetic transform matrix for the polarity vector H = (0, 1, 0).
40
3. Spectral Techniques
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ A(3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
0 0 0 0 1 0 −1 1 0 0 0 0 −1 0 1 −1
1 0 0 −1 1 0 −1 0 0 1 −1 0 −1 0 0 1 −1 0 1 0 1 −1 1 −1
0 0 0 0 0 0 0 0 0 1 0 −1 0 −1 1 1
0 0 0 0 0 1 0 −1
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.9. Arithmetic transform matrix for n = 3 and H = (0, 1, 0).
Therefore, the FPARs in matrix notation are given by n n
f (x1 , . . . , xn ) = (A−1 )hi (1) F, 1 xhi i i=1
i=1
where xhi i
=
xi , xi ,
hi = 0, hi = 1,
(A
−1 hi
) (1) =
⎧
1 0 ⎪ ⎪ , ⎪ ⎪ −1 1 ⎨
hi = 0,
⎪ ⎪ 0 1 ⎪ ⎪ , ⎩ 1 −1
hi = 1.
There are different algorithms for the determination of FPARs [69, 70, 281].
3.8.3 Fixed polarity Walsh transform As for Reed-Muller and arithmetic polynomials, for a given polarity vector H = (h1 , . . . , hn ) the fixed polarity Walsh polynomial is given in the matrix notation by n n
1 1 −n hi F. f (x1 , . . . , xn ) = 2 1 1 − 2xi (−1)hi (−1)hi i=1 i=1 The Walsh polynomials expressed in terms of switching variables reduce, after the simplifications, to the arithmetic polynomials. The Walsh polynomials can be used to represent the multi-output functions in the same way as with arithmetic polynomials. Example 36 For f in Example 33, the Walsh polynomial for H = (0, 1, 0) is given by
1 1 − 2x1 ⊗ 1 1 − 2x2 ⊗ 1 1 − 2x3 f =
1 1 1 1 1 1 ⊗ ⊗ F 1 −1 −1 1 1 −1
3.9. Non-Kronecker Transforms
=
41
5 − (1 − 2x3 ) + (1 − 2x2 ) − (1 − 2x2 )(1 − 2x3 ) − (1 − 2x1 ) +(1 − 2x1 )(1 − 2x3 ) − (1 − 2x1 )(1 − 2x2 ) −3(1 − 2x1 )(1 − 2x2 )(1 − 2x3 ),
which after simplifications reduces to the arithmetic polynomial of the same polarity for f . Further, if the coefficients are calculated modulo 2, and addition and subtraction formally replaced by EXOR, this expression reduces to the FPRM for f for the considered polarity. The Walsh spectral coefficients of switching functions in (1, −1) encoding express some very useful properties [103, 105, 199]. Probably most important among them is the property that in this coding the values of the Walsh coefficients of switching functions are restricted to even numbers from the set {−2n , . . . , 2n }. The fixed polarity Walsh polynomial for switching functions in that coding and for the polarity vector H = (h1 , . . . , hn ) is given in the matrix notation by n n
1 1 hi f(1,−1) = sign F(1,−1) , 1 xi (−1)hi (−1)hi i=1 i=1 where sign denotes the sign function defined by sign(a) = 1, sign(−a) = −1 for any a. Remark 3 For each bit-level Kronecker transform, it is possible to define the integer counterpart Kronecker transform. Positive polarity arithmetic transforms (PPARs), fixed polarity arithmetic transforms (FPARs), and the Walsh transform are examples of integer Kronecker transforms.
3.9 Non-Kronecker Transforms 3.9.1 Haar transform The discrete Haar transform is an important example of a non-Kronecker transform in C(C2n ). It is defined in terms of the discrete Haar functions that can be considered as a discrete counterpart of Haar functions on the interval [0, 1] [88] derived by sampling these functions in 2n points, or as a set of functions in C(C2n ) defined in such a way that share or resemble properties of the Haar functions. In matrix notation, the discrete Haar functions can be represented by rows of the Haar matrix. For the sequential ordering of the discrete Haar functions, the Haar matrix is defined by the recurrence relation
⎤ ⎡ √Hs (n − 1)
⊗ 1 1
⎦ 2 √0 (3.11) Hs (n) = ⎣ (n−2) ⊗ I2n−2 ⊗ 1 −1 2 2 0 2
42
3. Spectral Techniques
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ Hs (3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
⎤ 1 1 1 1 1 1 1 1 −1 −1 ⎥ ⎥ √ 1 √1 √1 √1 −1 −1 ⎥ 2 2 − 2 − 2 √0 √0 √0 √0 ⎥ 0 0 0 0 2 2 − 2 − 2 ⎥ ⎥. 2 −2 0 0 0 0 0 0 ⎥ ⎥ 0 0 2 −2 0 0 0 0 ⎥ ⎥ 0 0 0 0 2 −2 0 0 ⎦ 0 0 0 0 0 0 2 −2
Figure 3.10. Sequentially ordered Haar functions for n = 3. har(0,x) har(1,x) har(2,x) har(3,x) har(4,x) har(5,x) har(6,x) har(7,x)
0
1
2
3
4
5
6
7
x
Figure 3.11. Waveforms of Haar functions for n = 3.
with
Hs (1) =
1 1 1 −1
.
Example 37 The sequentially ordered discrete Haar functions for n = 3 are shown in Fig. 3.10. In applications to switching functions the nonnormalized Haar functions √ are often used. They are derived by deleting the normalization factors ( 2)q . Therefore, such defined Haar functions take the values -1,0,1, and are therefore compatible with switching functions. For n = 3, waveforms of thus defined Haar functions are shown in Fig. 3.11.
3.9. Non-Kronecker Transforms
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ Hp (3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
1 1 1 1 1 1 1 1 2 −2 0 0 0 0 0 0 √ √ √ √ 2 2 − 2 − 2 0 0 0 0 0 0 2 −2 0 0 0 0 1 1 1 1 −1 −1 −1 −1 0 0 0 0 √2 √ −2 √0 √0 0 0 0 0 2 2 − 2 − 2 0 0 0 0 0 0 2 −2
43
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.12. Naturally ordered Haar functions for n = 3.
Besides these, the naturally ordered, also denoted as Paley ordered, Haar functions are often used in engineering practice. The sequency and naturally ordered Haar functions are related through a repeated application of the bit-reversal procedure to the binary representation of the index i denoting the i-th row of the Haar matrix. For details see, for example, [4]. Example 38 The naturally (Paley) ordered Haar functions for n = 3 are shown in Fig. 3.12. In this figure, the index p in Hp stands for the Paley ordering. In matrix notation, the non-normalized discrete Haar functions in sequential order are represented as rows of the matrix
Hp (n − 1) ⊗
1 1 , Hs (n) = I(n − 1) ⊗ 1 −1 where Hs (10) = [1]. Example 39 Fig. 3.13 shows the non-normalized discrete Haar functions for n = 3, and Fig. 3.14 shows the corresponding inverse matrix. It should be noted that since the Haar matrix whose rows are Haar functions is used to calculate the Haar spectrum (see definition below) the columns of the inverse matrix are the Haar functions, due to the orthogonality of Haar functions. In the case of non-normalized Haar functions these columns are multiplied by the constants 1,1,2,2,4,4,4,4, respectively. Since subsets of rows in the Haar matrix can be generated by the Kronecker product, the Haar transform is an example of layered Kronecker transforms [54, 282, 283].
3.9.2 Discrete Haar transform The discrete Haar transform in C(C2n ) is defined by the Haar matrix. For f ∈ C(C2n ), given by the vector F = [f (0), . . . , f (2n − 1)]T , the Haar
44
3. Spectral Techniques
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ Hs (3) = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
⎤ 1 1 1 1 1 1 1 1 1 1 1 1 −1 −1 −1 −1 ⎥ ⎥ 1 1 −1 −1 0 0 0 0 ⎥ ⎥ 0 0 0 0 1 1 −1 −1 ⎥ ⎥. 1 −1 0 0 0 0 0 0 ⎥ ⎥ 0 0 1 −1 0 0 0 0 ⎥ ⎥ 0 0 0 0 1 −1 0 0 ⎦ 0 0 0 0 0 0 1 −1
Figure 3.13. Non-normalized discrete Haar functions for n = 3.
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ H−1 (3) = s ⎢ ⎢ ⎢ ⎢ ⎣
1 1 2 0 4 0 0 0 1 1 2 0 −4 0 0 0 1 1 −2 0 0 4 0 0 1 1 −2 0 0 −4 0 0 1 −1 0 2 0 0 4 0 1 −1 0 2 0 0 −4 0 1 −1 0 −2 0 0 0 4 1 −1 0 −2 0 0 0 −4
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Figure 3.14. The inverse of the matrix Hs (3).
spectrum Sh,q = [Sh,q (0), . . . , Sh,q (2n − 1)]T is defined by Shq ,f = Hq (n)F, where Hq , q ∈ {s, p} is the Haar matrix in the corresponding ordering, s for the sequential and p for the natural ordering [104, 114, 227]. The inverse transform is defined as F = HTq (n)Shq f . Example 40 The Haar spectra in the sequential and the natural ordering for f in Example 33 are given by Shs ,f
=
Shn ,f
=
√ [5, −1, 0, − 2, 2, −2, −2, 0]T , √ [5, 2, 0, −2, −1, −2, − 2, 0]T .
In the application of the Haar transform to switching functions, the coding (0, 1)GF (2) → (0, 1)Z is assumed. Different generalizations of Haar functions and related transforms are reviewed in [228].
3.10. Classification of Spectral Transforms
45
3.10 Classification of Spectral Transforms Fig. 3.15 classifies spectral transforms used in switching theory and shows their relationships as well as generalizations to spectral transforms for multiple-valued (MV) functions. The Walsh transform is the Fourier transform on a particular group, viz. the dyadic group [73, 255, 257]. The arithmetic transform can be derived from the Walsh transform by recoding (1, −1) → (0, 1) of the values of switching variables. In the arithmetic transform, if the calculations are performed over GF (2) instead C, the Reed-Muller transform is derived. The Vilenkin-Chrestenson transform is the Fourier transform on groups Cpn , where Cp is the cyclic group of order p [271], [272]. Thus, it is a generalization of the Walsh transform for p > 2 [29]. Galois field transforms and the Reed-Muller-Fourier transforms are generalizations of the Reed-Muller transform over GF (p) for p > 2. They are derived, respectively, from the two different interpretations of the Reed-Muller transform mentioned above. For Galois field transforms, the Reed-Muller coefficients are considered as the polynomial expressions for switching functions analogous to the Taylor expressions in classical mathematical analysis [77, 80, 157, 262, 263]. The Reed-Muller-Fourier transforms are a generalization of the Reed-Muller transform studied in the Gibbs algebra [80, 231, 233, 236]. Fig. 3.16 summarizes and explain relationships between transforms on finite dyadic groups. Various extensions of spectral methods intended for different applications in logic design and related areas were suggested in [11, 68, 137, 138, 170, 171]. Some generalizations of polynomial expressions and spectral transforms to multiple-valued functions and efficient methods for their calculations are considered in [46, 64, 59, 60, 61, 173, 233, 236]. There is a variety of methods for calculation of spectral transforms starting from FFT-like methods using vector representations of discrete functions [4, 9, 14, 103, 105, 114], and their different variants [63, 52], including tabular methods [261] and their spectral interpretations [229, 230], through reduced representations of discrete functions [268] and decision diagrams [108]. A review of decision diagram methods for calculation of different spectral transforms used in switching theory and logic design is presented in [249]. Extensions of discussions of relationships between different transforms have recently been presented in [67, 57]. A review of recent results in spectral techniques in binary and multiple-valued switching theory is presented in [118].
46
3. Spectral Techniques
Figure 3.15. Classification and generalizations of spectral transforms in switching theory.
3.11 Summary What is abstract harmonic analysis?
Abstract harmonic analysis is a mathematical discipline derived as a generalization of the classical Fourier analysis.
What are spectral techniques? Spectral techniques are a subarea of abstract harmonic analysis devoted to applications of spectral transforms in engineering practice.
3.11. Summary
47
Kronecker
FPRM PPRM
GF2(C2n) n
FPAR
C(C2 )
PPAR
Walsh
Haar
Figure 3.16. Spectral transforms on dyadic groups.
What are spectral transforms? Consider a basis Q in a finite-dimensional vector space P (G) of functions on G into P , where G is a group and P a field. Represent its elements by columns of a matrix Q. The matrix Q−1 inverse for Q over P and Q define the spectral transform pair. Matrices Q−1 and Q define the direct and the inverse transforms for f ∈ P (G). Remark 4 Spectral transforms are mathematical operators in vector spaces, which assign to a function f ∈ P (G) a spectrum Sf defined by Sf = Q−1 F, and reconstruction of f is given by F = QSf . Thus, spectral transforms are mappings from the original domain into the spectral domain for f . For functions on finite and discrete groups, they can be considered as Fourier series-like expansions or Fourier-like transforms, since the concepts of the sum and the integral coincide. Among many possible transforms in P (G), we choose those expressing some useful properties in practical applications. For example, we use transforms sharing some of the properties of Fourier transforms on groups. An important property is the fast calculation algorithm similar to FFT. Kronecker product representable transforms have this property.
48
3. Spectral Techniques
Why use spectral transforms, and what are their applications? Remark 5 Spectral transforms do not increase the amount of information in the signal represented by f . However, they redistribute the information content in it. Is that useful for something? Thanks to this redistribution of the information content of the signal modeled by f , we can achieve the following. 1. Some of the properties of f that cannot be easily observed in the original domain become easily observable in the spectral domain. 2. Some of the operations that are difficult to calculate or perform in the original domain can be easily performed in the spectral domain. These are very general statements. They can be further elaborated and specified in many practical applications. With respect to DDs, spectral transforms provide a unified interpretation of various DDs through the concept of spectral transform DDs (STDDs) defined in what follows. This concept involves many different DDs, and spectral interpretation extends to all DDs without exceptions.
4 Fourier Analysis on Groups
In this chapter, the Fourier transform and related transforms discussed in previous chapters will be introduced through a discussion of Fourier analysis on finite groups. For this reason, we first briefly introduce notation for discrete functions considered as functions on finite groups.
4.1 Discrete Functions A multi-output discrete function f is defined as a mapping f : G → R, m where the domain G = ×ni=1 Gi and range mR = ×i=1 Ri are non-empty sets n of cardinalities g = i=1 gi and r = i=1 ri , respectively. Thus, gi and ri are cardinalities of Gi and Ri . Switching functions and multiple-valued (MV) functions are included as particular cases for g0 = · · · = gn = r0 = · · · = rm = 2 and p, respectively, where p ≥ 2, is a natural number. To derive the means and tools to represent, manipulate, and calculate with discrete functions, some algebraic structure is imposed on the domain G and range R. In this book, a discrete function is defined as a function on a finite, not necessarily Abelian, group G = (G, ◦) of order g, where ◦ is the group operation in G and G is the support set for G with g elements. We associate with each group element permanently and bijectively a non-negative integer from the set {0, 1, . . . , g − 1}, and 0 is associated with the group identity. In what follows, each group element will be identified with the fixed non-negative integer associated with it and with no other element.
50
4. Fourier Analysis on Groups
x0 0 0 1 1
x1 0 1 0 1
f1 0 0 0 1
f0 0 1 1 1
f (z) 0 1 1 3
Table 4.1. Multi-output function.
We assume, corresponding to the definition of discrete functions, that G can be represented as a direct product of subgroups G1 , . . . , Gn of orders g1 , . . . , gn , respectively, i.e., G = ×ni=1 Gi , g = Πni=1 gi g1 ≤ g2 ≤ . . . ≤ gn .
(4.1)
The convention adopted above for the association of group elements with integers applies to the subgroups Gi as well. Provided that the notational bijections of the subgroups Gi and of G are chosen consistently, each x ∈ G can be uniquely represented as x=
n
ai xi , xi ∈ Gi , x ∈ G,
(4.2)
i=1
with
ai =
Πnj=i+1 gj , 1,
i = 1, . . . , n − 1, i = n,
where gj is the order of Gj . Under the specified bijection of group elements to non-negative integers, the group operation ◦ of G can be expressed in terms of the group · operations i of the subgroups Gi , i = 1, . . . , n by: ·
·
·
x ◦ y = (x1 1 y1 , x2 2 y2 , . . . xn n yn ), x, y ∈ G, xi , yi ∈ Gi . We assume the structure of a field, P , for the range R of single output discrete functions. In general, P may be the complex field C, the field of rational numbers Q, or a finite (Galois) field GF (pn ), where p is prime and n is a natural number. In particular, the switching functions are defined as mappings f : C2n → GF (2), where C2 = ({0, 1}, ⊕), and where ⊕ denotes the addition modulo 2, usually denoted as the logic EXOR. We assume that multi-output functions are represented by the singleoutput equivalent functions in P determined by a mapping corresponding to (4.2) [114]. Example 41 A multi-output switching function given in Table 4.1 is represented by the integer-valued function f (z) = 2f1 + f0 given by the truth-vector F = [0, 1, 1, 3]T .
4.2. Fourier Transforms
51
4.2 Fourier Transforms In the spectral techniques approach to switching theory, switching functions are considered as elements of the linear space consisting of complex-valued functions on finite dyadic groups. In that way, the spectral techniques for switching functions are defined as a particular example in abstract harmonic analysis, i.e., a mathematical discipline derived from classical Fourier analysis by the replacement of the real group R by an arbitrary locally compact Abelian or compact non-Abelian group. Finite dyadic groups are a particular case of Abelian groups. For that reason, we will first briefly repeat some basic concepts of the Fourier transform on groups by restricting the consideration to finite Abelian groups.
4.2.1 Algebraic structures for Fourier analysis Denote by G a finite Abelian group of order g with elements in some fixed order and let P stand for a field which could be the complex field C, the real field R or a finite field admitting the existence of a Fourier transform. To guarantee that this requirement is satisfied, we will assume henceforth that 1. charP = 0 or charP does not divide g, 2. P is a so-called splitting field for G, where charP is the characteristic of P 1 . Recall that the complex field C is the splitting field for any finite group G. Each non-cyclic Abelian group G can be represented as the direct product of some cyclic subgroups Gi of order gi , i.e., G = ×ni=1 Gi , g =
n
gi ,
(4.3)
i=1
where the value of n is determined by the values of g and the corresponding gi ’s. The group operation ◦ can be expressed in terms of group operations of Gi as ◦
◦
x ◦ y = (x1 1 y1 , . . . , xn n yn ), x, y ∈ G, xi , yi ∈ Gi . Also, each x ∈ G can be defined in terms of xi as follows, n n j=i+1 gj , i = 1, . . . , n − 1, (4.4) x= ai xi , xi ∈ Gi , with ai = 1, i = n, i=1
1 If e is the identity in P , then the smallest number p for which p · e = 0 is called the characteristic of P . If n · e = 0 for each n ∈ N , then charP = 0.
52
4. Fourier Analysis on Groups
where gj is the order of Gj . Example 42 The set of binary n-tuples (x1 , . . . , xn ), xi ∈ {0, 1}, under the componentwise EXOR express the structure of a group called the finite dyadic group of order 2n and denoted by C2n . By (4.3), C2n can be represented as the direct product of n cyclic groups C2 = ({0, 1}; ⊕). Due to the above assumption, any function f ∈ P (G) can be considered as a function of n-variables, i.e., f (x) = f (x1 , . . . , xn ), x ∈ G, xi ∈ Gi , i = 1, . . . , n. For example, the switching functions are functions on C2n into GF (2). They can be alternatively regarded as functions f (x), x ∈ {0, . . . , 2n − 1}. In that case they can be defined by enumerating their values at the points in C2n = {0, . . . , 2n − 1} denoted by the decimal indexes defined by (4.4). Thanks to the simplicity of their range, the switching functions can be alternatively regarded as functions on C2n into C if the elements of GF (2), logical 0 and 1, are interpreted as the integers 0 and 1. The set P (G) of functions on G into P is an Abelian group under the pointwise addition defined by (f + g)(x) = f (x) + g(x), f, g ∈ P (G), x ∈ G, and with multiplication by a scalar defined by (αf )(x) = αf (x), α ∈ P, it is a linear space. In P (G) we consider the inner product ∼ f, h = g −1 f (x) h (x), ∀f, h ∈ P (G), x∈G ∼
where h= h∗ is the complex conjugate of h for P to be the complex field ∼ C and h= h for P to be the real field R or a finite field. Thus, P (G) has the Hilbert space structure with the norm 1 1 (|f (x)|2 ) 2 , ∀f ∈ P (G). f = (f, f ) 2 = g −1 x∈G
A linear function space P (G) becomes an algebra if multiplication of functions is defined so that it satisfies 1. f (hk) = (f h)k, 2. f (h + k) = f h + f k, 3. λ(f h) = (λf )h = f (λh), for any f, h, k ∈ P (G) and λ ∈ P .
4.3. Series Expansions
53
Two important multiplication operations satisfying the above requirements are 1. Componentwise multiplication: (f h)(x) = f (x)h(x), x ∈ G 2. Convolution product: (f ∗ h)(y) = g −1
f (x)h(x−1 ◦ y), y ∈ G.
x∈G
C2n ,
Example 43 If G = the convolution product is called the dyadic convolution and is defined by −n
(f h)(y) = 2
n 2 −1
f (x)h(x ⊕ y), x, y ∈ G, f, h ∈ P (C2n ),
x=0
with calculations in P and where P (G) is a linear commutative function algebra.
4.3 Series Expansions A basis in the linear space P (G) is a set {er , r = 0, . . . , g − 1} of linearly independent elements of P (G). Such linear independence is expressed by asserting that the equation g−1
c(r)er (x) = 0 ∈ P (G),
r=0
where, for each r = 0, . . . , g − 1, c(r) ∈ P , has no solution other than c = (c(0), . . . , c(g − 1)) = 0 ∈ P (G), or equivalently, by asserting that a matrix over P whose columns are the functions {er , r = 0, . . . , g − 1} is non-singular. Given a basis {φi }, i = 0, . . . , g − 1, each function f ∈ P (G) can be represented in terms of that basis as a linear combination f= ai φi (x). (4.5) x∈G
The set of elements {er , r = 0, . . . , g − 1} is an orthonormal system in P (G) if 1, i = j, ei , ej = i, j ∈ {0, . . . , g − 1}. 0, i = j, The elements of an orthonormal system are linearly independent and, thus, form a basis in P (G). The coefficients in (4.5) with respect to an orthonormal basis are the inner products of f with the basic functions, i.e.,
54
4. Fourier Analysis on Groups
ai = f, ei . The corresponding series are called the Fourier-like series for their resemblance to the Fourier series on R. An obvious example for a basis in P (G) is the set E = {er,j } r, j ∈ {0, . . . , g − 1}, where
er,j =
1, 0,
(4.6)
r = j, r = j,
which is called the trivial or natural basis. In the matrix notation these basic functions are represented by the columns of the identity matrix. In engineering practice this basis is identified with the block pulse functions [9]. If P = GF (2), this basis is defined by the identity matrix I(n) over GF (2). Thus, the disjunctive normal form of switching functions can be considered as the Fourier-series like expansion with respect to the basis (4.6) [214]. Another example of a basis is the set of functions on C2n into GF (2) that consists of the Reed-Muller functions, i.e., columns of R(n). If P = C, the corresponding basis consists of the integer Reed-Muller functions, i.e., columns of A−1 (n).
4.4 Fourier Series An interesting orthonormal set in P (G) is obtained by referring to the dual object Γ of G represented by a transversal Γ = {R0 , . . . , RK−1 } of all equivalent classes of unitary irreducible representations of G over P . These representations may be given a fixed order. In the case of Abelian groups all unitary irreducible representations are one dimensional; i.e., they reduce to group characters. If P = C the group characters are defined as the homomorphisms of G into the unit circle [176], or equivalently to the multiplicative group T of complex numbers with modulus equal 1. Definition 26 Complex-valued function χw (x) on G is the group character of G if |χw (x)| = 1 for all x ∈ G: χw (x ◦ y) = χw (x)χw (y), ∀x, y ∈ G. The character χ0 (x) = 1 for all x ∈ G always exists and is called the principal character. The set Γ = {χw (x)} of necessarily continuous characters expresses the structure of a multiplicative group called the dual group for G, with the group operation denoted by and defined as (χ1 χ2 )(x) = χ1 (x)χ2 (x), ∀x ∈ G,
4.4. Fourier Series
55
for all χ1 , χ2 ∈ Γ. If G is a discrete group, Γ is compact and vice versa. If G is finite, Γ is also finite and isomorphic to G. It follows that in this case Γ can be represented in the form (4.3) and each w ∈ Γ can be represented in the form (4.4). Thanks to that duality, the index w and argument x in χw (x) have equivalent roles and it is convenient to express that property through the notation χ(w, x), x ∈ G, w ∈ Γ. The theory of group characters has been considerably developed by Pontryagin [167]. Chief properties of group characters follow from their definition: 1. χ(w, x1 ◦ x2 ) = χ(w, x1 )χ(w, x2 ), 2. χ(x, w1 w2 ) = χ(x, w1 )χ(x, w2 ), 3. χ(0, x) = χ(x, 0) = 1, ∀x ∈ G, w ∈ Γ, 4. χ(x−1 , w) = χ(x, w−1 ) = χ−1 (x, w) = χ∗ (x, w), where χ∗ is the complex conjugate of χ. The group characters of a cyclic Abelian group are defined simply by 2πj 1 χ(w, x) = ω wx with ω = e g , j = (−1) 2 . Since each non-cyclic Abelian group G can be represented in the form (4.3), the dual object Γ of a finite Abelian group is uniquely determined by G and consists of the set of group characters defined by χ(w, x) = χ((w1 , . . . wn ), (x1 , . . . , xn )) =
n
(2πj
ω wx = e
n i=1
wi xi gi
)
. (4.7)
i=1
The set of characters {χ(w, x)} is an orthonormal set for C(G), i.e., g, w = ψ, χ(w, ·), χ(ψ, ·) = 0, w = ψ, and f, χ(w, ·) = 0, ∀w ∈ G, implies that f = 0. Therefore, f ∈ C(G), G-finite Abelian group, is conveniently represented in the form of a series expansion in terms of the group characters and, thus, called the Fourier series Sf (w)χ(w, x), (4.8) f= w∈Γ
where the coefficients Sf are given by Sf (w) = g −1
x∈G
f (x)χ∗ (w, x).
(4.9)
56
4. Fourier Analysis on Groups
4.5 Fourier Transform Since on discrete structures the concept of the sum and integral coincides, the relations (4.8) and (4.9) are usually reported as the Fourier transform pair in C(G) consisting of the direct (4.9) and inverse (4.8) Fourier transform for f . Therefore, in matrix notation, the Fourier transform on finite Abelian groups is given by Sf = g −1 [χ∗ ] F, F = [χ] Sf , where [χ] is the matrix of group characters. The terminology derives from the analogy to classical Fourier analysis on the real line R, since it is shown that if G = R, then Γ = R and the group characters have the form χ(w, x) = ejwx . Thus, the Fourier transform is defined by ∞ f (x)e−jwx dx. Sf (w) = −∞
If G is the cyclic group of integers modulo a given integer g, i.e., G = Zg , then Γ = Zg , and we have the discrete Fourier transform (DFT) [114, 257], given by Sf = g −1
g−1
f (n)e−j
2πnk g
, 0 ≤ k ≤ g − 1.
n=0
are the discrete exponential functions. Therefore The functions exp −j 2πnk g DFT is defined with respect to the discrete exponential functions. If G is a finite Abelian group and P is a finite Galois field GF (pr ), the existence conditions for the Fourier transform in P (G) reduce to the requirement that η divides pr − 1, where η is the smallest common divisor of g1 , . . . , gn . In that case, as in (4.7), the group characters are also roots of unity of order gi in GF (pr ), i.e., they are given by χ(w, x) = where ξi =
√
gi
n−1
ξiwi xi , wi , xi ∈ {0, . . . , g − 1},
i=0
1 ∈ GF (pr ) and all calculations are done in GF (pr ). It is 2πj
1
shown that if P = C, ξi = e gi with j = (−1) 2 and we have (4.7). In the case of the finite dyadic group g1 = · · · = gn = 2, so that the character group of the dyadic group over GF (2) seems to be trivially the singleton group whose only element is the principal character. An approach to the Fourier analysis for switching functions through the group characters over GF (2) appears therefore to be excluded. It follows that for a proper counterpart of the Fourier analysis for switching functions, these functions
4.6. Walsh Transform
57
have to be considered as elements of the Hilbert space of functions on C2n into C instead of into GF (2). Walsh functions [275] are the group characters of finite dyadic groups [73, 271]. Therefore, the Fourier analysis on dyadic groups is performed in terms of Walsh functions. In the case of finite groups, it is done in terms of the discrete Walsh functions [9, 105, 114]. As is noted in [1], relationship between Walsh functions and group characters has been pointed out by I.M. Geljfand to Vilenkin whose paper [271] appeared thanks to that suggestion. A direct extension of the theory to powers of cyclic groups of order p can be done in terms of the Vilenkin-Chrestenson functions [29, 271]. They can be derived as a generalization of Walsh functions [29], or from the group representation theory used in solving problems of Fourier integration on topological groups [272, 273]. For P = C and g1 = · · · = gn = 4, the group characters are the complex Walsh functions [79, 83, 82]. The basic complex Walsh transform matrix is of order 4 and is given by ⎡ ⎤ 1 1 1 1 ⎢ 1 −i −1 i ⎥ ⎥. CW(1) = ⎢ ⎣ 1 −1 1 −1 ⎦ 1 i −1 −i These functions are a subset of the Vilenkin-Chrestenson functions.
4.6 Walsh Transform 4.6.1 Discrete Walsh functions Discrete Walsh functions are a discrete version of the functions introduced by J.L. Walsh [275] in solving some problems in the uniform approximation of square-integrable functions on the interval [0, 1). In the original formulation by Walsh, these functions are defined by the following recurrence relations: 1, 0≤ x < 12 , φ0 = 1, φ1 (x) = −1, 12 < x ≤ 1. For n ≥ 1, n ∈ N represented as n = 2m−1 + l − 1, 1, 2, . . . , 2m−1 ; m = 1, 2 . . . (l) φn(l) = φm (x), (1)
where it is assumed φ1 = φ1 . For m ≥ 2, (l) φm (2x), 0 = x < 12 , (2l−1) φm+1 (x) = l+1 (l) (−1) φm (2x − 1), 12 < x = 1,
l =
58
4. Fourier Analysis on Groups
(2l) φm+1 (x)
(l)
φm (2x), 0 = x < 12 , l (l) (−1) φm (2x − 1), 12 < x = 1,
=
with
(l) φ2 (x)
=
(2l) φ2 (x)
=
(l)
φm (2x), 0 = x < 12 , (l) −φm (2x − 1), 12 < x = 1, (l)
φ1 (2x), 0 = x < 12 , (l) φ1 (2x − 1), 12 < x = 1.
It is assumed that φn (x) = 12 [φn (x+1)+φn (x−1)] at the dyadic rational points. The set of thus defined functions is called the Walsh functions and is usually denoted by wal(w, x), w ∈ N . As noted above, the Walsh functions can be identified with the group characters of the dyadic group defined as the infinite countable direct products of C2 [1, 73, 271]. Similarly, the discrete Walsh functions, the discrete counterparts of the Walsh functions, are characters of the finite dyadic groups and by (4.7), since gi = 2, i = 1, . . . , n, they are given by n−1 wal(w, x) = (−1) i=0 wi xi , w, x ∈ {0, . . . , 2n − 1}, where wi , xi are the coordinates in the binary representation of w and x. In the case of finite groups, the group characters are conveniently represented by matrices. The characters of the basic dyadic group C2 = ({0, 1}; ⊕) are given by the matrix
1 1 W(1) = , 1 −1 which is called the basic Walsh matrix. Since by (4.3) the finite dyadic group of order n is the direct product of n-cyclic groups C2 , the characters of C2n are defined by the matrix W(n) given by W(n) =
n
W(1),
(4.10)
i=1
whose columns can be identified with the discrete Walsh functions. Thanks to the Kronecker product representation W(n) can be represented as
W(n − 1) W(n − 1) W(n) = , (4.11) W(n − 1) −W(n − 1) which is a relation characterizing the subset of so-called Hadamard matrices of order 2n introduced by M.J. Hadamard [89] by a generalization of the results of J.J. Sylvester [258]. Therefore, the Walsh matrix whose columns are discrete Walsh functions ordered in that way is a subset of Hadamard
4.6. Walsh Transform
59
matrices, and thus ordered Walsh functions are considered as the WalshHadamard functions. Walsh functions in that ordering are a special case of the VilenkinChrestenson functions derived from the group characters of Abelian groups [29, 271]. From the original abstract of [278], also reported in [166], it can be seen that a general theory of harmonic analysis on topological Abelian groups including the Walsh-Fourier analysis on dyadic groups was also given by Paley and Wiener. The Walsh functions, besides these properties characteristic for group characters, possess the symmetry property. Due to that, the Walsh matrix is orthogonal and symmetric and, therefore, self-inverse over C up to the normalization constant 2−n . The Kronecker product structure of the Walsh matrix, expressed by (4.10) and (4.11), and often used to define the discrete Walsh functions, follows from the property that the Walsh functions are characters of the dyadic group representable in the form (4.3). The relationship of Walsh functions to some other classes of matrices predating the definition of Walsh functions was mentioned in [82], and in details discussed in [145]. In the original definition by Walsh [275], the Walsh functions were ordered with respect to the increasing number of zero-crossings. That number [15, 34], or according to some authors, half of it [4, 94, 95], is called sequency, a concept analogous in some aspects to frequency in classical Fourier analysis [93]. However, in some other respects, sequency can hardly be accepted as a generalization of frequency [269, 270]. Though this ordering of Walsh functions is called the sequency or Walsh ordering, the term Walsh-Kaczmarz functions is also used, since Kaczmarz [112] studied thus ordered Walsh functions and proved that they can be considered as the extension of the Rademacher functions [168] into a complete system. For the purposes of this book, it is convenient to define the Rademacher functions by rad(j, x) = (−1)xi = cos(πxi ), x ∈ {0, . . . , 2j − 1}, j ∈ N, where xi is the i-th coordinate in the binary representation of x. For the Hadamard-ordered Walsh functions wal(2j , x) = rad(j, x). The Walsh functions of the index w = 2j are called the basic Walsh functions, since Paley [159] proved that the Walsh functions can be defined as products of Rademacher functions. The Walsh functions ordered with respect to the Paley definition are called the Walsh-Paley or dyadic-ordered Walsh functions. For a Walsh function in that ordering wal(p, x), the constituent Rademacher functions are defined by the position of the non-zero coordinates in the dyadic expansion of the order index p. For example, if
60
4. Fourier Analysis on Groups
p = 13 = (1101)2 , wal(13, x) = rad(4, x)rad(3, x)rad(1, x), since 1 appears in the dyadic expansion of 13 at the coordinates 1, 3, and 4. Walsh-Paley functions are the most important special case of the Takayasu Ito functions [107]. Using the definition of Walsh functions proposed by Paley, the relationship between the discrete Walsh functions and the switching functions is simple and can be established by the following consideration. A very useful property of Walsh functions is that they take only two values, +1 and −1, and in that respect are compatible with switching functions, which are also two-valued. Moreover, if the switching variables are considered as particular trivial switching functions, then the Rademacher functions can be identified with the switching variables in coding {0, 1} → {1, −1} described by the simple arithmetic expression xi :→ 1 − 2xi , xi ∈ {0, 1}. Therefore, 1 − 2xi = wal(2n−i , ·). Thus, the discrete Walsh functions can be expressed through the products of switching variables in 1, −1 coding or through the products (1 − 2xi ) in 0,1 coding of switching variables. In the matrix notation the Hadamard-ordered Walsh functions can be generated as elements of a vector Xw defined by Xw =
n
1 1 − 2xi
,
(4.12)
i=1
similar to the Reed-Muller and integer Reed-Muller functions. It follows that the Hadamard-ordered discrete Walsh functions are counterparts of the integer Reed-Muller functions in coding (1, −1). For a given switching function f , the inner product with basic Walsh functions si = f, wal(2n−i , x) determines the correlation of f with the switching variables. This property has proved useful in some applications in logic design. In particular, the coefficients si ordered in the descending order of the absolute values can be identified with the Chow parameters [103] used in characterization of threshold functions. This suggests the use of Walsh functions ordered with respect to the increasing number of component Rademacher functions and their indexes. With the intended applications in mind, that ordering is known as the logical ordering of Walsh functions or Rademacher-Walsh ordering [9, 103]. The matrix obtained by replacing +1 values in the Rademacher-Walsh matrix by a logical 0 and −1 by a logical 1 is the binary Walsh matrix [9, 103]. The rows 1 to n in this matrix are the Rademacher functions in 0,1 coding, i.e., the switching variables, and, thus, can be used to form all subsequent rows of this matrix by the componentwise EXOR. Therefore, the rows of this matrix are linear switching functions. The use of binary Walsh matrices was suggested in [9, 103]. In the Rademacher-Walsh matrix, if +1 is replaced by a logical 0 and −1 by a logical 1, the Besslich-Rademacher-Walsh matrix is obtained. The
4.6. Walsh Transform
w 0 1 2 3 4 5 6 7
sequency R0 R1 R1 R2 R2 R2 R3 R 1 R2 R3 R1 R3 R3
dyadic R0 R1 R2 R1 R2 R3 R1 R3 R2 R3 R1 R2 R3
natural R0 R2 R3 R 2 R3 R1 R 1 R3 R 1 R2 R 1 R2 R3
61
logic R0 R1 R2 R3 R1 R2 R1 R3 R2 R3 R1 R2 R3
Table 4.2. Different orderings of Walsh functions.
rows 1 to n of this matrix generate all subsequent rows through the componentwise AND. Such matrices were used in final determination of an iredundant prime implicant cover of a switching function f [13]. The four different orderings of Walsh functions mentioned above are compared for n = 3 in Table 4.2 taken from [257]. In this table, Ri denotes the i-th Rademacher function, and the Walsh functions are generated as products of the Rademacher functions. Among the many possible orderings of discrete Walsh functions, most of them destroy the symmetry property of the Walsh matrix, as is, for example, the case with the logical ordering. Therefore, the first three orderings are the ones most often used in applications. The relationships among different orderings of discrete Walsh functions were discussed in a series of papers see, for example, [284, 285, 288]. These relationships were used as a basis to develop the so-called shift-copy theory [110, 111, 291], providing the broad family of the so-called bridge functions [289], involving the discrete Walsh functions in different orderings as particular examples [292].
4.6.2 Walsh expansions The set of Walsh functions is the set of group characters and, thus, this is a basis of C(C2n ). Therefore, each f ∈ C(C2n ) can be represented by the Walsh expansion Sw,f (w)wal(w, x), f= w∈Γ
where the coefficients Sw,f (·) are determined as the scalar products of f with the Walsh functions. Since the Walsh matrix is symmetric, f (x)wal(w, x). Sw,f (w) = x∈G
62
4. Fourier Analysis on Groups
The basic Walsh matrix W(1) defines the Walsh expansion rule 1 (f0 + f1 + (1 − 2xi )(f0 + f1 )), 2 whose repeated application to all the variables in f produces the Walsh polynomial for f . Using this rule, the Walsh polynomials can be written in the matrix notation as the Reed-Muller and arithmetic polynomials, f=
f = Xw W(n)F, where Xw and W(n) are defined by (4.12) and (4.10).
4.6.3 Discrete Walsh transform Expressed in matrix notation, Walsh polynomials can be regarded as the Fourier transform for functions on finite dyadic groups into C. The relation Sw,f (n) = 2−n W(n)F
(4.13)
defines the Hadamard-ordered Walsh spectrum of f and with the relation f = W(n)Sw,f (n) forms the Walsh transform pair. The fixed polarity Walsh transforms are defined from the WalshHadamard transform through the permutation of columns in W(1) corresponding to the variables xi used with negative literals xi . Therefore, for the polarity vector H, they are defined by the transform matrix
n 1 1 . WH = (−1)hi (−1)hi i=1 The partial Walsh transforms can be defined through the factorization of W(n) in the same way as in the case of the Reed-Muller and arithmetic transforms. This factorization and the corresponding matrices will be used later to explain fast calculation algorithms for spectral transforms and, therefore, will not be discussed here. Since the Walsh transform is the Fourier transform on a particular group, it possesses all the properties of the Fourier transform on groups and the name Walsh-Fourier transform is sometimes used in the literature [165]. In this notation, the coefficients of fixed polarity Walsh polynomials correspond to some different ordering of the Walsh transform matrix. Referring to the discussed orderings of the Walsh matrix, the Walsh-Kaczmarz, Walsh-Paley and Walsh-Hadamard transforms are distinguished. Moreover, somewhere the Hadamard ordered Walsh transform is simply called the Hadamard transform. However, if the term Hadamard transform is used instead of the Hadamard ordered Walsh transform, it should be noted that a subset of Hadamard transforms is assumed. In general, the Walsh matrices are a
4.7. Generalized Definition of Spectral Transforms
63
subset of Hadamard matrices of order 2nk [2]. For example, there is a Hadamard matrix of order 12 and 956 [48]. Even the Hadamard matrices of order 2n are a larger set. They can be generated through the matrix relation of the form (4.11), but it is allowed that [2] D1 =
1 −1 1 1
W(1) ∈ {±D1 , ±D2 , ±D3 , ±D4 },
1 1 −1 1 1 1 , D2 = , D3 = , D4 = . 1 −1 1 1 −1 1
A symmetric Hadamard matrix whose elements in the first row and column are +1 is know as the normal form for the Hadamard matrix. The Hadamard ordered Walsh transform relates just to these forms. For example, if n = 2, there are eight Hadamard matrices of order 4. The matrix generated by +D2 is the Hadamard ordered Walsh matrix. Referring to the fixed polarity polynomial representations, the matrix generated by +D4 corresponds to the polarity vector H = (01). Therefore, each Hadamard matrix defines a transform in the space of complex functions on finite groups of the corresponding order and the class of Hadamard transforms is quite larger than the class of Walsh transforms [201]. That distinction could be important in practical applications, for example in calculation of the corresponding transforms.
4.7 Generalized Definition of Spectral Transforms 4.7.1 Kronecker transform on groups Definitions of spectral transforms considered in previous sections can be unified into a generalized definition of Kronecker product representable spectral transforms, thus, denoted as the Kronecker transforms. Definition 27 The Kronecker transform for f ∈ P (G) is defined by a (g × g) transform matrix K(n) defined by K(n) =
n
Ki (1),
i=1
where Ki (1) is a non-singular (gi × gi ) matrix over P . Definition 28 For f ∈ P (G) represented by the vector of function values F = [f (0), . . . , f (g − 1)]T , and a given transform matrix K(n), the Kronecker spectrum of f , Kf = [Kf (0), . . . , Kf (g − 1)]T , is defined by Kf = K(n)F.
(4.14)
Reconstruction of f from its Kronecker spectrum may be done by F = K−1 (n)Kf ,
(4.15)
64
4. Fourier Analysis on Groups
where K−1 (n) is the inverse of K(n) over P . The Reed-Muller, fixed polarity Reed-Muller, arithmetic, fixed polarity arithmetic, discrete Walsh, and fixed polarity discrete Walsh transforms are included in Definition 23 as particular cases derived for particular choices of the submatrices Ki (1) as R(1), A(1), and 12 W(1), respectively. Definition 23 extends to some other transforms. For example, assume that G is a finite dyadic groups, and if K0 (1) = . . . = Kn (1) = √ 1 j , where j = −1 is the complex unity, the complex Hadamard −j −1 transform (CHT) is derived [66, 169]. Since equal submatrices Ki (1) are used as factors in the Kronecker product, it is convenient to introduce the operation of exponentiation when the exponent is a matrix. Assume a number r and a (n × q) matrix A = [ai,j ], i = 1, . . . n, j = 1, . . . , q. Then, rA is a (n × q) matrix V = [vi,j ], where vij = raij . Using this notation, the basic transform matrix for CHT is generated as CH(1) = j A ,
0
j1 1 j j 0 1 . Thus, CH(1) = where A = . = 3 2 j3 j2 −j −1 In this definition, any other (2 × 2) non-singular matrix over Z(4) can be used to define the particular CHT. For example, W(1) = (−j)A ,
0 0 . Note that A generating W(1) is the matrix that 0 2 defines the logical multiplication AND multiplied by 2. By using this remark, if A is taken as the table for multiplication modulo 4, we define the complex Walsh matrix. Thus,
where A =
⎡
0 0 ⎢ 0 3 where A = ⎢ ⎣ 0 2 0 1 Note that for
0 2 0 2
CW(1) = (−j)A , ⎤
0 1 ⎥ ⎥. 2 ⎦ 3
A=
0 0 1 3
,
the CHT reduces to the matrix Φ(1) of Fresnel functions associated to the basic Walsh transform matrix W(1) [6]:
1 1 Φ(1) = . (4.16) j −j
4.7. Generalized Definition of Spectral Transforms
65
The Fresnel functions for W(n) are represented by columns of the matrix Φ(n) generated by the Kronecker product of Φ(1) Φ(n) =
n
Φ(1).
i=1
Each Fresnel function, i.e., each column of Φ(n) can be used to define a Fresnel transform. The matrix Fφi of the Fresnel transform with respect to the Fresnel function φi associated to the Walsh transform is defined by Fφi (n) = 2−n W(n)(W(n)φ−1 i · W(n)), where · denotes the componentwise (Hadamard) multiplication of matrices, φi is the i-th column of Φ, and φ−1 = [φ−1 (0), . . . , φ−1 (2n − 1)]T . i The Fresnel transform can be defined through the Kronecker product, since we are working with Kronecker product representable transforms. For example, for the Fresnel function represented by the first column in Φ(1) in (4.16), the basic Fresnel transform matrix is given by
1 −j Fφ0 = . −j 1
0 3 Thus, it is the CHT for A = . 3 0 The corresponding Fresnel transform matrix of order n is defined by the Kronecker product. The procedure can be repeated for the other column in Φ(1). The generalization in Definition 23 is proper, since it permits definition of new classes of spectral transforms for different choices of Ki (1) and fields P . Extension of this definition to other not necessarily Abelian groups is straightforward. Various Kronecker transforms over C in terms of different matrices of orders 2 and 4 are used in [33] in defining different hybrid decision diagrams (HDDs).
4.7.2 Partial Kronecker transforms on groups Since the Kronecker product decomposition is assumed in Definition 23, K(n) can be factorized in the same way as in the previously discussed transforms. Thus, K(n) =
n
Cki (n),
i=1
where Cki (n) =
n
j j=1 Cki (1),
Cjki (1)
=
(4.17) Ki (1), I(1),
i = j, i = j.
66
4. Fourier Analysis on Groups
For an n-variable function, each matrix Cki (n) defines a partial Kronecker transform with respect to the i-th variable.
4.8 Fixed Polarity Kronecker Transforms If P = GF (2), the columns of the constituent submatrices Ki (1) can be expressed in terms of constant 1 and literals of switching variables xi and xi . In this way, the Kronecker transforms determine the Kronecker expressions of switching functions [187]. For a given Kronecker transform defined for a particular choice of submatrices Ki (1), the fixed polarity Kronecker transforms can be defined through permutations of columns in Ki (1). Therefore, they can be considered as the optimization of the corresponding Kronecker expansions by freely choosing literals for switching variables in f . The method is equal to that used in Reed-Muller expansions. However, since in Definition 23 we are freely choosing submatrices Ki , each fixed polarity Kronecker transform can be considered as particular Kronecker transform, rather than the optimization of a basic Kronecker transform.
4.9 Non-Kronecker Transforms In this section, we discuss some discrete transforms on dyadic groups that cannot be represented as the Kronecker product of a basic transform matrix. However, these transforms belong by their properties to the same class of discrete transforms whose most widely known representative is probably the discrete Walsh transform.
4.9.1 Haar transform and generalizations Discrete Haar functions that are defined on C2n are a discrete counterpart of the Haar functions [88] defined on the interval [0, 1], derived through a correspondence between [0, 1] and the set {0, 1, . . . , 2n − 1}. The Haar functions are defined in two-parameters notation by har(0, θ) = 1, for each 0 ≤ θ ≤ 1, ⎧ √ j− 12 ⎪ for j−1 ⎨ 2i , 2i 1 ≤ θ ≤ 2i , √ j− har(i, j, θ) = − 2i , for 2i2 ≤ θ ≤ 2ii , ⎪ ⎩ 0, otherwise, i = 0, 1, . . . ; j = 1, . . . , 2i . The discrete Haar functions are defined on C2n , or the set {0, 1, . . . , 2n − 1}, such that the points where the discrete Haar functions are defined take
4.9. Non-Kronecker Transforms
67
values equal to the values of the Haar functions on [0, 1] at the corresponding subintervals, assuming that these intervals are split into 2n equal subintervals. In [250], a generalized definition of Haar functions in P (Cp ) is given, where P is a finite (Galois) field or the complex field C. Assume that for f ∈ P (Cpn ), given by the vector of function values F = [f (0), . . . f (pn − 1)]T , and that a series expansion for f with respect to a basis Q represented by columns of a matrix Q is defined as = Q−1 (n)F, F = Q(n)Sf ,
Sf
where Sf = [Sf (0), . . . , Sf (pn − 1)]T is the vector of coefficients in the expansion with respect to the basis Q defined by columns of a matrix Q(n) =
n
Q(1),
i=1
where Q(1) is the Fourier transform matrix in P (Cp ) or the matrix defining the product terms in polynomial expressions in P (Cp ). Definition 29 Haar functions in P (Cpn ) are ⎡ H(n − 1) ⊗ q0 ⎢ I(n − 1) ⊗ q1 ⎢ H(n) = ⎢ . ⎣ ..
defined by the relation ⎤ ⎥ ⎥ ⎥, ⎦
I(n − 1) ⊗ qp−1 where qi , i = 0, . . . p − 1 are rows of Q(1)T for P = GF (p), and of Q(1)∗ for P = C. Example 44 Table 4.3 shows examples of recurrence relations for Haar functions for different choices of the domain groups Cp and ranges P and n = 2. For simplicity, the normalization constants are omitted. The identity matrices in P (Cp ) are denoted by Ip (1). Definition 29 determines an algorithm for the design of Haar functions, and thus Haar transforms in P (Cpn ) for different choices of domain Cp and range P .
Algorithm 1 (Design of Haar transforms) 1. Assume a vector space P (Cpn ). 2. Consider the matrix Q(1) defining the Fourier basis or the basis for polynomial expressions in P (Cp ) and define H(1) = Q(1)T if P = GF (p) and H(1) = Q(1)∗ if P = C.
68
4. Fourier Analysis on Groups
3. Denote the rows of H(1) as q0 , . . . , qp−1 . 4. Determine the Haar matrix in P (Cpn ) by performing the Kronecker product as determined in Definition 29 and enumerate rows of the produced matrix as the Haar functions har(w, x), w, x ∈ {0, . . . , pn − 1} in P (Cpn ). End of Algorithm. The Haar functions and related Haar transforms defined by using this algorithm produce the related Haar spectral transform decision diagrams (HSTDDs) in P (Cpn ) [250]. At the same time, they can be calculated through MTDDs by a simple generalization of DD methods for the Haar transform in C(C2n ). The generalization consists in the application of the related matrices H(1) instead of W(1) and identity matrices Ip (1) instead of I2 (1). Thus, the FFT (or more properly, FHT) algorithms can be derived. Definition 30 The Haar expression for a function f ∈ P (Cpn ) is defined as f (x) =
n p −1
Sf (w)har(w, x),
w=0
where Sf are the Haar spectral coefficients for f , defined by Sf (w) =
n p −1
f (x)har(w, x),
x=0
where the calculations are in P . T
For f represented by the vector F(n) = [f (0), . . . , f (pn − 1)] , the Haar spectrum Sf (n) = [Sf (0), . . . , Sf (pn − 1)]T is given by = p−n H(n)F(n), F(n) = H(n)−1 Sf (n),
Sf (n)
(4.18) (4.19)
where H(n) is the Haar matrix in the corresponding ordering and H−1 (n) is its inverse over the field P . The rows of H(n) are the discrete Haar functions. From the orthogonality of the Haar functions, it follows that H−1 (n) = HT (n), where HT denotes the transpose of H. The discrete Haar transform is derived for P = C and p = 2. It should be noted that although it is a non-Kronecker transform, the discrete Haar transform is somewhere denoted as the layered Kronecker transform, since subsets of rows in the Haar matrix for a given parameter j in two-parameter notation har(i, j, θ), can be generalized through recurrence relations in terms of the Kronecker product [282, 283]. The same notation applies to the Haar transform in P (Cpn ), as it follows from Definition 29 of the Haar matrix H(n).
4.9. Non-Kronecker Transforms
Domain
Range
Haar transform
Q ⎡
C2
C
W(1)
H(n) = ⎣
W(1) ⊗ I2 ⊗ ⎡
C2
GF (2)
R(1)
RMH(n) = ⎣
C
VC3 (1)
GF (3)
GF3 (1)
R(1)T ⊗
C
VC4 (1)
GF (4)
GF4 (1)
⎦
1
0
GF∗3 (1) ⊗
1
GFT3 (1) ⊗
VC∗3 (1) ⊗
⎦
1
⎤
1
1
1
1
1
⎤
⎥ ⎥ ⎥ e1 ⎥ ⎦ e2 1
⎤ ⎥ ⎥ ⎥ ⎥ ⎦
1
2
1
1
1
1
1
1
1
1
1
1
⎤
⎢ ⎢
⎢ I4 (1) ⊗ 1 i −1 −i ⎢ VCH4 (n) = ⎢ ⎢
⎢ I4 (1) ⊗ 1 −1 1 −1 ⎢ ⎣
I4 (1) ⊗ 1 −i −1 i ⎡
C4
−1
⎤
1
⎢ ⎢
GFH3 (n) = ⎢ ⎢ I3 (1) ⊗ 0 ⎣
I3 (1) ⊗ 0 ⎡
C4
1
1
⎢ ⎢
VCH3 (n) = ⎢ ⎢ I3 (1) ⊗ 1 e2 ⎣
I3 (1) ⊗ 1 e1 ⎡
C3
I(1) ⊗ ⎡
C3
69
GFT3 (1) ⊗
⎢ ⎢
⎢ I4 (1) ⊗ 0 ⎢ GFH4 (n) = ⎢ ⎢
⎢ I4 (1) ⊗ 0 ⎢ ⎣
I4 (1) ⊗ 0
1
2
3
1
3
2
1
1
1
Table 4.3. Recurrence relations for Haar functions for n = 2.
⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
70
4. Fourier Analysis on Groups
The paired Haar transform has been recently introduced to represent efficiently incompletely specified switching functions [23]; and calculation algorithms for this transform are provided in [58, 209]. Extensions of the paired Haar transform in C(C2n ) to functions in P (Cpn ) is straightforward.
4.10 Summary 1. The Fourier transform in classical mathematical analysis is defined in terms of exponential functions exp(jwx) that may be thought of as the characters of the real line considered as a particular locally compact Abelian group. 2. Extension of Fourier analysis to other Abelian groups can be done in terms of group characters. Particular examples are the Walsh functions, which are characters of the dyadic group, and discrete Walsh functions, the characters of finite dyadic groups. 3. Various Kronecker transforms are defined by using different nonsingular matrices on subgroups in the domain group. 4. Generalizations of the Haar transform on dyadic groups to Haar transforms Cpn is straightforward by using the identity matrices as the transform matrices for some basic matrices in Kronecker transforms on groups.
5 Spectral Interpretation of Decision Diagrams
5.1 Decision Diagrams What are decision diagrams? Definition 31 Decision diagrams (DDs) are data structures for representing discrete functions. Switching functions and MV functions are particular examples of discrete functions on groups C2n and Cpn , respectively. DDs are derived by the reduction of decision trees (DTs)[195, 196]. The reduction of a DT into a DD for a given function f is possible due to some particular properties of f that assure some relationships between the function values, and is performed by exploiting these properties. Thus, DTs are the basic concept in DDs representation of discrete functions, since they do not depend on the properties of a particular function. The same class of DDs may differ considerably for different functions. Therefore, when discussing and comparing features of different classes of DDs, we should consider DTs from which DDs are derived to stay independent on the properties of particular functions. What are DTs? DTs were first used to represent discrete sets in 1935 in the Ph.D. Thesis by Prof. Dj. Kurepa [129]; hence they are called the Kurepa trees in mathematics. DTs were used to represent all switching functions of a given
72
5. Spectral Interpretation of Decision Diagrams
Figure 5.1. BDT for n = 3.
number of variables [130, 204]. In the context of present applications, to represent a particular function, DTs were used to represent switching functions by Akers [7], and to represent MV functions by Thayse, Davio, and Deshamps [263], both in 1978. The present interest in DDs is the result of a 1986 paper by Bryant [19], in which the binary DDs (BDDs) for switching functions were used. We will introduce and illustrate this concept using the example of three-variable switching functions. Example 45 Fig. 5.1 shows BDT for n = 3. This tree is also called the Shannon tree [187], by referring to the paper of Shannon [204], since it is the graphical representation of the decomposition of f performed by the recursive application of the Shannon decomposition rule (S-decomposition rule) f = xi f0 ⊕ xi f1 , where f0 = f (xi = 0), f1 = f (xi = 1), for all the variables in f . In a BDT, we consider non-terminal nodes and constant nodes represented by circles and squares, respectively. The non-terminal nodes to which the same variable is assigned form a level in the BDT. For each non-terminal node we consider the incoming and outcoming edges. The incoming edge at the root node is labeled by the represented function f . The outgoing edges are labeled by the values 0 and 1, or equivalently, the negative and positive literals xi and xi . The constant nodes show the function values at the points (x1 , x2 , x3 ) and are labeled by fijk , where i, j, k ∈ {0, 1}. In a BDT, the values of constant nodes are the function values of f . Various DTs can be defined by using different decomposition rules to assign f to the DT. In these cases, the constant nodes represent the values Sf
5.1. Decision Diagrams
73
1 2 3 f
Decomposition rules
f f f f f f f
G =
C2 ´ C2 ´ C2
1
2
3
Figure 5.2. Correspondence among G, f , and DT for f .
calculated from the values of f , which depend on the decomposition rules used assigned to non-terminal nodes in the DT. Fig. 5.2 shows a correspondence among f , the truth-table for f , the group G where f is defined, and a decision tree for f . A DT expresses the symmetry on the vertical axes in the same way as the truth-table expresses the symmetry on the horizontal axes. The recursive structure of the truthtable, or equivalently, the group G = C2n , as shown in Fig. 5.2, maps into the recursive structure of the DT. In a DT for a given f , if there are some constant or equal subvectors in the vector of the values of constant nodes, then the reduction can be performed. It is done by deleting and sharing isomorphic subtrees in the DT. In that way the DD for f is derived. In a DD, edges connecting nodes at non-successive levels may appear. The length of an edge connecting a
74
5. Spectral Interpretation of Decision Diagrams f S
_ x1
x1
S
S x2
x2
_ x2
_ x2 _ x3
0
S x3
1
Figure 5.3. BDD for f in Example 46.
node at the i-th level with a node at the (i + k)-th level is k. A point where such an edge crosses the imaginary line connecting nodes corresponding to the same variable is denoted as the cross point. Definition 32 In a reduced decision diagram, a cross point is a point where an edge longer than one crosses a level in the DD. Cross points permit us to take into account the impact of the deleted nodes. The following example illustrates the reduction procedure performed over a BDT to derive a BDD for f . Example 46 In the BDT for f (x1 , x2 , x3 ) = x1 x2 ∨ x2 x3 reduction by deleting nodes is possible since there are two constant subvectors representing f000 = f001 = 0 and f100 = f011 = 1. Therefore, the corresponding subtrees representing these subvectors reduce to constant nodes 0 and 1, respectively. In this BDT, there are two equal subvectors [f010 , f011 ]T and [f110 , f111 ] equal [0, 1]T . Therefore, the corresponding subtrees can be joined and the redundant subtree deleted. Fig. 5.3 shows a thus derived BDD for f . Fig. 5.4 explains the way in which the reduction is performed. The reduction rules used in the reduction of the BDT in the above example are called the BDD reduction rules [196]. Depending on the decomposition rules at the nodes in the DT, different reduction rules are defined. For example, the positive Davio (pD) decomposition rule is defined as f = 1 · f0 ⊕ xi (f0 ⊕ f1 ). The negative Davio (nD) expansion rule is defined as f = 1 · f1 ⊕ xi (f0 ⊕ f1 ). These rules and DTs derived by using them will be discussed further. We mention them here for the purpose of discussing different reduction rules used in DD representations of discrete functions.
5.1. Decision Diagrams
75
Figure 5.4. Reduction of BDT into BDD for f in Example 46.
For the positive Davio (pD) decomposition and negative Davio (nD) decomposition rules zero-suppressed reduction rules are defined [151]. Fig. 5.5 shows the BDD and zero-suppressed BDD reduction rules. In this figure, part (a) and part (c) show reduction of nodes in Shannon (S), and positive Davio (pD) and negative Davio nodes (nD), respectively. Part (b) is equal in both BDD and zero-supressed BDD reduction rules and represents sharing of isomorphic subtrees. In the reduction of Shannon nodes, the property xi ⊕ xi = 1 is exploited, and the incoming edge to the remaining node is labeled by 1 multiplied by the label of the incomming edge of the deleted node. In the reduction of Davio nodes, we use the property that multiplication of xi or xi by 0 is zero, thus, it does not contribute to the value of f represented by the node. Fig. 5.6 shows the generalized BDD reduction rules that should be used in a general case of DDs where labels at the edges
76
5. Spectral Interpretation of Decision Diagrams
Figure 5.5. BDD reduction rules and zero-suppressed BDD reduction rules.
Figure 5.6. Generalized BDD reduction rules.
can take values different from logic 0 and 1 or integers 0 and 1 [243]. They involve the BDD reduction rules as a particular example. From a given BDD, the represented function f is determined by starting from the constant nodes and performing the Shannon expression at the non-terminal nodes up to the root node. Equivalently, f is represented by the AND-EXOR expression with product terms determined as products of variables at the edges in the paths from the root node to the constant nodes showing the value 1. Example 47 For the BDD in Fig. 5.3, the node at the level for x3 shows the subfunction 0 · x3 ⊕ 1 · x3 = x3 . The left node at the level for x2 shows the subfunction 0 · x2 ⊕ xx x3 = x2 x3 . Similarly, the subfunction represented by the subtree rooted at the right node for x2 is 1 · x2 ⊕ x2 x3 = x2 ⊕ x2 x3 . Finally, for the root node, x1 · x2 x3 ⊕ x1 · (x2 ⊕ x2 x3 ). Thus, this BDD represents the given function f in the form f = x1 x2 x3 ⊕ x1 x2 ⊕ x1 x2 x3 . The product terms x1 x2 x3 , x1 x2 , and x1 x2 x3 correspond to the product of labels at the edges in the paths from the root node to the constant node 1.
5.1. Decision Diagrams
S2 x1
_ x1 x1
S2
_ x2
0
S2 _ S2 x1 x1
x2 x2
x1 _ x1
77
S2 _ x1
S2 _
x2
1
Figure 5.7. Shared BDD for f in Example 48.
How do we represent multi-output functions? Multi-output functions can be represented by shared BDDs (SBDDs) [151, 152, 153], with a separate root node for each output. Example 48 Fig. 5.7 shows a shared BDD for the multi-output function f = (f4 , f3 , f2 , f1 ), where f1 = x1 x2 , f2 = x1 ⊕ x2 , f3 x1 , and f4 = x1 ∨ x2 . Alternatively, a multi-output function can be represented by an equivalent integer-valued function fz , as is explained in Examples 4 and 13 and represented by a single root-node word-level DD discussed in what follows. We will introduce this way of representing multi-output functions with the following example. Example 49 The multi-output function in Example 48 can be represented by the integer-valued function fZ (x) = 23 f4 + 22 f3 + 2f1 + f0 . Functions f4 , f3 , f2 , and f1 are represented by the vectors F4 = [1, 1, 0, 1]T , F3 = [1, 1, 0, 0]T , F2 = [0, 1, 1, 0]T , and F1 = [0, 1, 0, 0]T . Therefore, fZ (x) is represented by the vector ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 1 1 0 0 12 ⎢ 1 ⎥ ⎢ 1 ⎥ ⎢ 1 ⎥ ⎢ 1 ⎥ ⎢ 15 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎥ FZ = 8 ⎢ ⎣ 0 ⎦ + 4⎣ 0 ⎦ + 2⎣ 1 ⎦ + ⎣ 0 ⎦ = ⎣ 2 ⎦. 1 0 8 0 0 This function can be represented by a decision tree that will have integers as constant nodes. The i-th bit in the binary representation for the values of constant nodes shows the value of the i-th output fi . These DTs are denoted as Multi-terminal binary DDs (MTBDDs) [32] and will be discussed later. MTBDDs use the property that the Shannon decomposition can be formally extended to integers as f = xi f0 + xi f1 , where the xi is interpreted as (1 − xi ). Fig. 5.8 shows MTBDT for FZ . The reduction into a DD is impossible, since there are no equal values in FZ .
78
5. Spectral Interpretation of Decision Diagrams
fZ S2
_ x1
x1
S2 _ x2 12
S2 x2
_ x2
x2
15
2
8
Figure 5.8. MTBDD for f in Example 48.
We will mainly discuss single root-node DDs, assuming that the presentation extends in a straightforward way to shared DDs.
5.2 Spectral Interpretation of BDTs In matrix notation, the Shannon decomposition rule f = xi f0 ⊕ xi f1 is written as
1 0
f0 . f = xi xi f1 0 1 First, we apply it to x1 , which means to the root node in the DT. Thus, we write
1 0
f0 . f = x1 x1 f1 0 1 Then, we use the same rule for x2 and
f=
x1
x1
⊗
x2
x2
1 0 0 1
⊗
1 0
0 1
When we apply it for x3 , then f
=
x1
x1
⊗
x2
x2
⊗
x3
x3
⎤ f00 ⎢ f01 ⎥ ⎥ ⎢ ⎣ f10 ⎦ . f11 ⎡
5.3. Spectral Interpretation of FDTs
⎡ ⎢ ⎢ ⎢
⎢ ⎢ 1 0 1 0 1 0 ⎢ ⊗ ⊗ ⎢ 0 1 0 1 0 1 ⎢ ⎢ ⎢ ⎣
=
[x1 x2 x3 ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
x1 x2 x3 0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
x1 x2 x3 x1 x2 x3 0 0 0 0 0 1 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
x1 x2 x3 x1 x2 x3 ⎤⎡ f000 ⎥ ⎢ f001 ⎥⎢ ⎥ ⎢ f010 ⎥⎢ ⎥ ⎢ f011 ⎥⎢ ⎥ ⎢ f100 ⎥⎢ ⎥ ⎢ f101 ⎥⎢ ⎦ ⎣ f110 f111
f000 f001 f010 f011 f100 f101 f110 f111
79
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
x1 x2 x3 ⎤
x1 x2 x3 ]
⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
Remark 6 A BDT represents f in the complete disjunctive form for f . In spectral interpretation, f is assigned to a BDT, by decomposition of f with respect to the trivial mapping described by the identity matrix, whose columns can be represented by minterms. Therefore, the constant nodes represent the values of f . Each path from the root node to the constant nodes corresponds to a basis function in the identity mapping. It is described by a minterm that is generated by the multiplication of labels at the edges.
5.3 Spectral Interpretation of FDTs Functional DDs (FDDs) [113], also called positive polarity Reed-Muller DDs (PPRMDDs) [187], are derived by using the positive Davio decomposition f = 1 · f0 ⊕ xi (f0 ⊕ f1 ). Fig. 5.9 shows FDT for n = 3. This DT is also denoted as the positive Davio tree, or positive polarity Reed-Muller DT [187]. In this figure, the index 2 denotes EXOR of cofactors indexed by 0 and 1, i.e., f2 = f0 ⊕ f1 . Similarly, for constant nodes, f002 represents f000 ⊕ f001 , and f020 = f000 ⊕ f010 , etc. In matrix notation,
1 0
f0 f = 1 xi . 1 1 f1
80
5. Spectral Interpretation of Decision Diagrams
Figure 5.9. FDT for n = 3.
After a recursive application of this decomposition rule to the nodes in FDT, we get
1 x1 ⊗ 1 x2 ⊗ 1 x3 f =
1 0 1 0 1 0 F ⊗ ⊗ 1 1 1 1 1 1 = Xr (3)R(3)F. The way that a FDT represents a given function f through the ReedMuller spectrum for f , is explained by the following example. Example 50 Fig. 5.10 shows the BDT for a function f of n = 2 variables. The constant nodes are elements of the truth-vector for f (x1 , x2 ); thus, F = [f00 , f01 , f10 , f11 ]T . If at each node we perform calculations determined by the basic Reed-Muller matrix R(1), at the root node we get the Reed-Muller spectrum. The calculations at each node are performed over subfunctions represented by subtrees rooted at the processed node. Referring to the FFT-like algorithm for the Reed-Muller transform, at each node we perform the basic butterfly operation of the algorithm. Since at upper levels in the BDT, the calculations are performed over subfunctions, corresponding to componentwise calculations over subvectors in F, instead of over function values, it follows that we perform an FFT-like algorithm over BDT. For this reason we get the Reed-Muller spectrum for f at the root node. However, if we consider an FDT having the Reed-Muller coefficients f00 , f02 = f00 ⊕ f01 , f20 = f00 ⊕ f10 , and f22 = f00 ⊕ f01 ⊕ f11 , and perform the same calculations, we get the function values for f at the root node, since the Reed-Muller matrix is a self-inverse matrix. In FDTs, the labels at the
5.3. Spectral Interpretation of FDTs
f00 f00Åf01 f00Åf10 f00Åf01Åf10Åf11
f _ x1
f00 f00 f01 f00Åf02 = f10 f00Åf20 f11 f00Åf02Åf20Åf22
f
S2
_ x1
x1
S2 x1
_ x2
f00 f10 S f00Åf01 _ 2 f00Åf10 x2 x2 x2
_ x2
f00 f20 S f00Åf02 _ 2 f20Åf22 x2 x2 x2
f00
f01
f00
f02
S2
f10 BDD
f11
S2
81
f20
f22
FDD Figure 5.10. BDT and FDT.
edges are determined as symbolic notation for columns of R(1). Because of this, in determining f from the FDT by following labels at the edges, we actually perform the inverse Reed-Muller transform over the values of constant nodes of FDT, which are, therefore, selected as the Reed-Muller coefficients. The following example explains the applications of FDDs. Example 51 Consider the function f (x1 , x2 ) = x1 x2 ⊕ x1 x2 , whose truthvector is F = [1, 0, 0, 1]T . Fig. 5.11 shows the BDT for f and related BDD. We cannot reduce any non-terminal node, since there are no equal subvectors in F. However, the Reed-Muller spectrum, calculated as Srf = (R(1) ⊗ R(1))F = [1, 1, 1, 0]T , determines the PPRM for this function f = 1 ⊕ x1 ⊕ x2 . Fig. 5.11 shows the FDT for f determined using the Reed-Muller spectrum. From zero-supressed BDD reduction rules, we can share constant nodes for the left node at the level for x2 , since both outgoing edges, labeled by 1 and x2 , point to the same value 1. These rules allow us to delete the edge labeled by x2 that points to the constant node 0, since x2 · 0 = 0 does not contribute to the Reed-Muller spectrum. In this way we determine the FDD representing f in the form of PPRM. We can use the generalized BDD rules, which allow us to delete the left node at the level for x2 , since both outgoing edges point to the same value; however, we should redetermine the label at the incoming edge for the remaining node as is specified by these reduction rules. Transferring from the original domain into the Reed-Muller spectrum provides for the constant subvector [1, 1] in Srf , which permits reduction of a non-terminal node. Remark 7 In an FDT, each path from the root node to the constant nodes represents a Reed-Muller function, i.e., a column in the Reed-Muller ma-
82
5. Spectral Interpretation of Decision Diagrams
_ x1
f
f
S2
pD x1
S2 _ x2 1
S2 x2
x2
0
0
1
1 1
pD x2
1
x2
1
1
0
FDD
f
f
pD
pD x1
1 pD
pD
_ x2
BDD
x1
1
x2
x1 1(1Åx2)
pD 1
x2
1 1
1
0
Figure 5.11. BDT, BDD, FDT, and FDD with zero-suppressed reduction rules, and FDD with generalized BDD rules.
trix. The constant nodes represent the Reed-Muller coefficients. Therefore, FDTs represent f in the form of the positive polarity Reed-Muller expression.
Statement 4 (Spectral interpretation of positive Davio trees) 1. Given a function f , to determine a positive Davio tree representing f , the Reed-Muller transform is performed. 2. Given a positive Davio tree, to determine an f which it represents, the (inverse) Reed-Muller transform is performed. This inverse transform determines labels at the edges of a pD node, 1 and xi . They are symbolic notation for the columns of R(1). The use of the inverse Reed-Muller transform to determine f from the positive Davio tree is shadowed by the self-inverseness of the Reed-Muller
5.3. Spectral Interpretation of FDTs
83
transform. However, a proper interpretation of the BDTs and FDTs permits the following statement. Statement 5 Given a switching function f , FDD for f is BDD for its Reed-Muller spectrum Sf and, vice versa, BDT for Sf is FDT for f . The same consideration trivially applies to BDDs. Compared to the positive Davio tree, the use of a direct transform to determine the Shannon tree of f and the inverse transform to read f from it, is double shadowed, since we are working with the identity transform that is also self-inverse. This consideration about spectral interpretation of BDDs and FDDs permits us to state the two following theorems, basic for the spectral interpretation of DDs for discrete functions. Theorem 3 DTs are graphical representations of spectral transform expansions of f ∈ P (G) with respect to a basis Q in P (G). In a DT, each path from the root node to the constant nodes corresponds to a basic function in Q. The constant nodes represent the Q-spectral coefficients for f . Theorem 4 A DT defined with respect to a basis Q represents at the same time f and the Q-spectrum of f . From this theorem, the statement below follows. Statement 6 Each decision tree representing a function f can be considered as the Shannon tree representing the Q-spectrum of f . This spectral interpretation of BDDs and FDDs implies definition of spectral transform decision trees (STDTs) [243] as a concept involving different DDs for particular specification of the basis Q. Let Q(n) be a (2n × 2n ) non-singular matrix with elements in P . Thus, the columns of Q form a set of linearly independent functions. Since there are 2n such functions, Q(n) determines a basis in P (C2n ). Suppose that Q(n) is represented as the Kronecker product of n factors Q(1), i.e., Q(n) =
n
Q(1).
i=1
For such a basis Q, the i-th basic matrix Q(1) defines an expansion of f with respect to the i-th variable
f0 −1 , f = Q (1)Q(1) f1 where Q−1 is the matrix inverse of Q(1). Definition 33 [243] A spectral transform decision tree (STDT) is a decision tree assigned to f by the decomposition of f with respect to the basis Q.
84
5. Spectral Interpretation of Decision Diagrams
Definition 34 [243] Spectral transform decision diagrams (STDDs) are decision diagrams derived by the reduction of the corresponding STDTs. Reduction of STDTs is performed by deleting and sharing isomorphic subtrees [196]. It is obvious that the definition of STDTs satisfies requirements in Theorem 3 and that different DDs are involved in STDTs for different specifications of the matrices Q(1). After this discovery of the relationship between FDTs for f and BDTs for the Reed-Muller spectrum Sf as well as the definition of STDTs, the following spectral interpretation of various DDs was a simple piece of research work. The previous consideration extends directly to other bit-level DDs. They are also denoted as AND-EXOR related DDs [71, 72, 196]. What are bit-level DDs?
5.4 Bit-Level DDs Definition 35 Bit-level DDs are DDs in which the constant nodes are logic values 0 and 1. BDDs and FDDs are particular examples of bit-level DDs. Different bit-level DDs for switching functions are defined by using different decomposition rules. In these DDs, besides the Shannon and positive Davio decomposition, the negative Davio decomposition defined by f = 1 · f1 ⊕ xi (f0 ⊕ f1 ) is used. Definition 36 Consider the set K of matrices I(1), R(1), and R(1), corresponding to the Shannon, positive Davio, and negative Davio decompositions, respectively:
0 1 1 0 1 0 . K = I(1) = , R(1) = , R(1) = 1 1 0 1 1 1 1. Kronecker DTs (KDTs) [43] are defined with respect to the Kronecker transforms over GF (2). In these transforms and in KDDs, the basic transform matrices Ki (1), and corresponding decomposition rules, are freely chosen in the set K for each variable. 2. Pseudo-Kronecker DDs (pseudo-KDDs) [187] are defined by freely choosing in the set K decomposition rules for each node irrespective of other nodes at the same level in the DT. 3. Fixed polarity Reed-Muller DTs (FPRMDTs) and pseudo-ReedMuller DTs (PRMDTs) [187] are subsets of KDTs and PKDTs, respectively, allowing R(1) and R(1), but not I(1), as decomposition rules.
5.4. Bit-Level DDs
85
f pD x1
1
pD
pD x2
1
S _ x3
f000
1
x3
f001
f020
S
S
S _ x3
x2
x3
_ x3
f021
f200
x3
_ x3
x3
f201
f220
f221
Figure 5.12. KDT for n = 3 in Example 52.
Example 52 (KDD) Fig. 5.12 shows KDT for n = 3 with positive Davio (pD) nodes for x1 and x2 and Shannon nodes (S)-nodes for x3 . This KDT is the graphical representation of the decomposition of f with respect to the basis ϕ0
= x3 , ϕ1 = x3 , ϕ2 = x2 x3 , ϕ3 = x2 x3 ,
ϕ4
= x1 x3 , ϕ5 = x1 x3 , ϕ6 = x1 x2 x3 , ϕ7 = x1 x2 x3 ,
where the variables xi take logic values 0 and 1. Example 53 (PKDD) Fig. 5.13 shows an example of a pseudo-Kronecker decision tree (PKDT) for n = 3 [187]. This PKDT is defined with respect to the basis ϕ0 ϕ4
= x1 x3 , ϕ1 = x1 x3 , ϕ2 = x1 x2 , ϕ3 = x1 x2 x3 , = x1 , ϕ5 = x1 x3 , ϕ6 = x1 x2 x3 , ϕ7 = x1 x2 x3 .
Assume that columns of the Reed-Muller matrix R(3) are denoted by ri (x), i = 0, . . . , 7, respectively. The basic functions for PKDT in Fig. 5.13 are determined by the cyclic shift of r5 , r6 , r7 as follows: φ0 (x)
= r5 (x + 5), φ1 (x) = r5 (x + 4), φ2 (x) = r6 (x + 4), φ3 (x) = r7 (x + 4),
φ4 (x)
= r4 (x), φ5 (x) = r5 (x + 1), φ6 (x) = r7 (x + 3), φ7 (x) = r5 (x),
where x + k denotes the shift for k places with respect to the addition of integers, and x is a number whose binary representation is (x1 , x2 , x3 ), thus, x = (x1 , x2 , x3 ).
86
5. Spectral Interpretation of Decision Diagrams
_ x1
x1
_ x2
x2
_ x3
x3
f000
f001
x3 f020
f022
f111
_ x3
_ x3
x3
f112
f110
f121
Figure 5.13. PKDT for n = 3 in Example 53.
Table 5.1 summarizes allowed bases and compares permitted changes in basic functions in terms of which various AND-EXOR expressions and corresponding DTs for functions in GF (C2n ) are defined.
5.5 Summary 1. Decision diagrams are graphic representations of Fourier series-like expressions for switching functions. 2. BDDs and FDDs are particular examples derived as graphic representations of disjunctive normal-form and positive polarity Reed-Muller expressions. In these DDs, basic functions are described by minterms and distinct products of variables. The products are determined over the power set of the set of variables. Thus, in FDDs, basis functions are described by the product of variables in the subsets of the power set. 3. BDDs and FDDs have non-terminal nodes defined in terms of Shannon and positive Davio nodes. Different Kronecker DDs are defined by freely choosing among the Shannon decomposition rule, positive Davio decomposition rule, and negative Davio decomposition rule for nodes at each level in the decision tree. In pseudo-Kronecker DDs, decomposition rules are freely chosen for each node irrespective of other nodes at the same level in the decision tree. 4. In DDs, constant nodes show values of spectral coefficients for the represented function in terms of the spectral transform used in definition of the related DTs. Basic functions are defined by the product
5.5. Summary
DD
Trivial
Form of functions Fixed
Order of functions Fixed
PPRM
Reed-Muller
Fixed
Fixed
FPRM
Reed-Muller
Fixed
PRM
PseudoReed-Muller
Fixed
GRM
Combined Reed-Muller
Fixed
Changeable depending on levels Changeable depending on nodes Changeable depending on nodes
KDD
Combined Reed-Muller and trivial depending on levels Pseudo-KRO
Changeable depending on levels
Changeable depending on levels
Permuted and cyclic shifted Reed-Muller Combination of the permuted Reed-Muller for different polarities Kronecker product representable
Changeable depending on nodes
Changeable depending on nodes
Permuted and cyclic shifted KRO
BDD
PKDD
Basis
87
Property Kronecker product representable Kronecker product representable Permuted Reed-Muller
Table 5.1. Bases used in the AND-EXOR expressions and related DDs.
of the labels at the edges. Therefore, to assign a given function f to a DT, we perform the direct transform. In reading f from the DT, we perform the inverse transform. The same applies to DDs, since the reduction rules do not destroy the information content of DTs. It follows that a DD represents at the same time f and the spectrum for f with respect to the spectral transform used in definition of the related DT.
6 Advanced Topics in Decision Trees and Diagrams
6.1 Decision Trees Decision diagrams (DDs) are derived by the reduction of decision trees (DTs) [196]. Although different reduction rules are introduced depending on the particular expansion rules used in the definition of the DTs, they all can be generally defined as sharing isomorphic parts in the DT and deleting of the redundant information from the DT [243]. Therefore, the DT is the basic concept in DD representations of discrete functions. DTs were introduced in [129] for the study of representations of discrete sets. The same concept can be used to represent discrete functions, since they are defined as mappings between different discrete sets. We distinguish the basic DTs, denoted as multi-terminal DTs (MTDTs) and spectral transform DTs (STDTs). In what follows, when this distinction is not important, both MTDTs and STDTs are simply referred to as DTs. Edge-valued DTs, such as those considered in [20, 36, 131, 274], are considered to be a different notation for some particular STDTs [44, 214, 219].
6.1.1 Basic DTs A definition of DTs can be derived from the following considerations. A function f on a group G is defined by giving its values at all the points of G. Since G has the form (4.3), the elements in G can be identified with the lexicographically ordered set of n-tuples (x1 , . . . , xn ), xi ∈ Gi . Conversely,
90
6. Advanced Topics in Decision Trees and Diagrams
since f (x1 , . . . , xn ), xi ∈ Gi , the n-tuples (x1 , . . . , xn ) can be generated through the recursive assignment of values for variables xi , i = 1, . . . , n, in f . This recursive assignment means that for xi = sj , where sj is a particular value in Gi , the variable xi−1 takes all the values in Gi−1 , before xi takes the value sj+1 in Gi . In a graphic representation of this enumeration procedure for some f , we first represent x1 by a node with g1 outgoing edges, where g1 is the order of G1 . This node is denoted as the root node for the considered DT. Each outgoing edge of the root node points to a node to which x2 is assigned. Each of these nodes has g2 outgoing edges, since g2 ∈ G2 . Such representations for all the variables in f produces a decision tree. The outgoing edges of nodes to which xn is assigned point to the constant nodes corresponding to the lexicographically ordered set of n-tuples representing elements of G. Thus, the constant nodes show values of f at the points (x1 , . . . , xn ) in G. Therefore, the following definition of DTs is possible. Definition 37 A basic decision tree (DT) for f ∈ P (G) is the graphic representation of the procedure of enumeration the values for f at the lexicographically ordered set of points in G. Statement 7 The recursive structure of a basic DT originates with the recursive assignment of values to coordinates xi ∈ Gi of the points (x1 , . . . , xn ) in G. Example 54 Fig. 6.1 shows the correspondence between a function f defined in eight points, and the basic DTs for f derived for two different decompositions of the domain group G. It is assumed that G = C23 , and G = C2 × C4 , where C2 and C4 are the cyclic groups of orders two and four, respectively. The nodes assigned to the variables taking values in a subgroup Ci are denoted by Si . If Gi = C2 for each i, and P = GF (2), we get binary decision trees (BDTs) [19]. If Gi = Cp for each i, and P = GF (p), we get multiple-place DTs (MDTs) [263]. In the general case, subgroups Gi , i = 1, . . . , n, may be of different orders, and P may be either GF (p), Q, or C. Then, we use the term multi-terminal DTs (MTDTs) [147]. Therefore, we have the following hierarchy: BDT ⊂ M DT ⊂ M T DT. Fig. 6.2 shows this hierarchy among BDTs, MDTs and MTDTs. The hierarchy is determined with respect to the support sets G and P in the domain groups G and fields P . When f is a matrix-valued function, then constant nodes in the MTDT for f are matrices over P . We denote these MTDTs as matrix-valued MTDTs (mvMTDTs). When the values of constant nodes are elements of P , such MTDTs are denoted as number-valued MTDTs (nvMTDTs). Fig. 6.3 classifies MTDTs with respect to the values of constant nodes (cn).
6.1. Decision Trees
91
Figure 6.1. Correspondence between f and DTs for two different decompositions of G.
Figure 6.2. Hierarchy among basic DTs.
Besides BDTs [7, 19], examples of MTDTs are multi-terminal binary DTs (MTBDTs) [32], denoted also as arithmetic DTs (ADTs) [8], and multiple-place DTs (MDTs) [207, 263].
6.1.2 Spectral transform DTs A given f is directly mapped to the elements of MTDTs, which are the non-terminal nodes, edges, and constant nodes. As shown in Fig. 6.1, each variable in f corresponds to a level in the MTDT. The i-th level consists of nodes to which the same variable xi ∈ Gi is assigned. These nodes have
92
6. Advanced Topics in Decision Trees and Diagrams
Figure 6.3. Classification of MTDTs with respect to the values of constant nodes.
gi outgoing edges, where gi is the order of Gi . Each edge corresponds to a value for xi , and is denoted by the corresponding literal for xi . We denote these literals by xki , which stands for xi = k, k ∈ P . In MTDTs, values of f are directly mapped into values of constant nodes. Therefore, as shown in Fig. 6.4(a), a given f is assigned to an MTDT by the identical mapping. This mapping for f on G of order g is represented by the (g × g) identity matrix I, where all the elements are equal to the zero in P , except the elements on the main diagonal, which are equal to the unity value in P . Since the non-terminal nodes in MTDTs are denoted by variables in f , the assignment of f to the MTDT is formalized through a set of decomposition rules applied to the variables in f . In MTDTs, the decomposition rules are described by the identity matrices. In the left part of Fig. 6.1, these are (2 × 2) matrices, while in the right part of this figure, we use (4 × 4) identity matrices. These rules are denoted as Shannon and generalized Shannon decomposition rules [196]. In Fig. 6.4(a), if instead of the identical mapping, I, we use some other spectral transform (ST) in P (G) to assign f ∈ P (G) to a MTDT, we get a spectral transform DT (STDT) [243]. Fig. 6.4(b) illustrates this statement. Therefore, the following definition is possible. Definition 38 A spectral transform decision tree (STDT) for f ∈ P (G) is the graphic representation of a series expansion for f with respect to a spectral transform (ST) in P (G). From this definition, a STDT is the pair (MTDT, ST). STDTs involve various DTs reported in the literature as particular examples for different choices of related STs [241]. Examples of STDTs are the Arithmetic trans-
6.1. Decision Trees
93
form DDs (ACDDs), and Walsh DDs [243], Binary moment diagrams [20], Hybrid transform DDs [33], Complex Hadamard transform DDs (CHTDDs) [65, 66], Kronecker DDs [36, 43], Galois field DDs (GFDDs) and Reed-Muller-Fourier DDs (RMFDDs) [213]. In particular, when the ST is the identical transform, then the STDT is simply the MTDT. Therefore, the following statement is possible. Statement 8 A STDT is defined though a composition of two mappings, a ST and the identical transform. To get a STDT for some f , a ST maps f into its corresponding spectrum Sf , which is then assigned to a MTDT. Decomposition of f by a ST can be expressed through a change of the meaning of non-terminal nodes and values of constant nodes in MTDTs. The meaning of non-terminal nodes is determined by the ST that is used. In a STDT, values of constant nodes are the coefficients in the ST-expansion used in the definition of the considered STDT. Correspondingly, the labels at the edges are changed in comparison to those in MTDTs. In a STDT, products of labels at the edges in the paths from the root node to the constant nodes describe basic functions in terms of which the corresponding ST is defined. These changes in MTDTs that transfer them into STDTs, are formalized through the definition of decomposition rules. Spectral interpretation of DDs indicates that these rules are derived from the STs used. Therefore, various DDs reported in the literature can be classified with respect to the decomposition rules used, and alternatively the STs, used in their definition [241]. In the literature, some STDTs are specified by enumerating the decomposition rules that are assigned to the nodes in the Decision Type Lists (DTLs). An example is the Kronecker DTs [36, 43, 187]. Thus, a STDT can be defined as the pair (MTDT, DTL). However, such a definition is rather incomplete, since it says nothing about the values of constant nodes and the way that they are determined. In such definitions, it is assumed, although not stated, that values of constant nodes are calculated during the application of the enumerated decomposition rules to f . Statement 9 explains relationship between MTDTs and other DTs, and respectively, MTDDs and other DDs. It induces the following statement: Statement 9 A STDT for f ∈ P (G) is the MTDT for the ST-spectrum of f . Conversely, the MTDT for the ST-spectrum of f is the STDT for f . For example, Binary Decision Trees (BDTs) are defined by using the Shannon decomposition rule [19], while the Functional Decision Trees (FDTs) are defined by using the positive Davio decomposition rule [113]. FDTs are also denoted as the Positive Reed-Muller DDs [187]. The relationship between BDTs and FDTs has been studied and discussed in several papers (see, for example, [36, 40]). However, it can be completely expressed by the following remark.
94
6. Advanced Topics in Decision Trees and Diagrams
I
F
F
ST
Sf
I
Figure 6.4. Assignment of f to (a) MTDT, (b) STDT.
Remark 8 FDT for f ∈ GF2 (C2n ) is the BDT for the Reed-Muller spectrum Sf of f ; and vice versa, BDT for the Reed-Muller spectrum Sf of f is the FDT for f . The classification of MTDTs as shown in Figs. 6.2, and 6.3, applies to STDTs as well. In [241], a classification of various STDDs by their range as in Fig. 6.3 is presented. Table 6.1 shows this classification of STDDs updated with DDs recently introduced. Table 6.2 shows the classification of DDs with respect to spectral transforms used in their definition to assign a given function f to the DT [241]. The basis functions for DDs given in the parenthesis are not directly equal to a particular transform, but are derived from it or are close to it. The basis functions for pseudo-QDDs are defined through (4 × 4) non-singular over GF (2) matrices [193]. The basis functions for FGs are derived through particular generalizations of the Shannon and Davio nodes to MV functions [10]. These functions are expressed through the characteristic functions in the set theory. The abbreviations for DDs used in these tables are given in the List of DDs, with corresponding references. For a brief description of these various STDDs, refer to [241]. In Definition 38, since STDT=(MTDT, ST), it is assumed that the ST used to define the STDT expresses a recursive structure matching the recursive structure of the MTDT. In the following subsection, we determine STs in P (G) that may be used to define STDTs for functions in P (G).
6.1. Decision Trees
Range Logic {0, 1}
Logic {0, 1, u} Binary vectors {0, 1, . . . , p − 1} Rational numbers
Floating point numbers Complex numbers Matrix over C or GF (p)
95
Decision Diagram BDD, FDD=PPRMDD, FPRMDD, Pseudo-RMDD, KDD, Pseudo-KDD, UDD, EVFDD, EXOR-TDD, AND-TDD, Prime-TDD TDD-U, Kleene-TDD MTMDD, SMTMDD MDD, FG, QDD, GFDD, RMFDD, KGFDD MTBDD, BMD, KBMDD, ACDD, WDD, EVBDD, FEVBDD, ∗BMD, K∗BMD, Arith-TDD, AC-TDD ∗PHDD HDD, CHDD, FADD, nvFNADD, nvFNAPDD FNADD, FNAPDD, mvEXOR-TDD
Table 6.1. Classification of DDs by range.
6.1.3 Structure of STs for STDTs Each non-singular (g × g) matrix, Q, over P defines a basis Q in P (G), where G is of the order g. The elements of Q are represented by columns of Q. In terms of these functions, an ST in P (G) may be defined. Each f ∈ P (G) is uniquely represented by its ST-spectrum. However, as noted above, the recursive structure of MTDTs in STDT=(MTDT, ST) requires the corresponding structure to be present in the ST which is used to define the STDT. This structure can be determined from the following considerations. From Statement 7, the recursive structure of a DT is determined by the decomposition of the domain group G. Some spectral transforms can be calculated through FFT-like algorithms [114, 256]. A class of FFT-like algorithms on finite groups is derived from the Good-Thomas factorization of the related spectral transform matrices [84]. This factorization is based on the decomposition of the domain group G where the ST is defined, and it follows from this observation that such FFT-like algorithms express a recursive structure that matches the recursive structure of G. Since the recursive structure in both DTs and STs with FFT-like calculation algorithms originates in the decomposition for G, the following remark is possible. Remark 9 The structure of an ST which may be used to define a STDT relates to the structure of the transform matrices for which FFT-like algorithms using the Good-Thomas factorization may be derived.
96
6. Advanced Topics in Decision Trees and Diagrams
Domain C2n
Range GF (2)
Transform Identical Reed-Muller
Partial Reed-Muller Identical and Reed-Muller ERM Matrices over GF (2) GF (3) Kleene algebra Rational numbers
Cpn
Arbitrary Abelian Arbitrary NonAbelian
Floating point C GF (p)
C or GF (p) Matrices over C or GF (p)
ERM Identical ERM Identical Arithmetic EAT Partial Arithmetic Walsh Haar Kronecker Kronecker CHT Identical GF-transform RMF-transform Partial GF Partial RMF Identical Fourier Fourier for number-valued functions Fourier for matrix-valued functions
Decision Diagram BDD FDD=PPRMDD, FPRMDD Pseudo-RMDD EVFDD KDD, PKDD AND-TDD, EXOR-TDD Prime-TDD mvEXOR-TDD TDD-U Kleene-TDD MTBDD=ADD BMD, ACDD, ∗BMD Artih-TDD, AC-TDD EVBDD, FEVBDD WDD HSD, HSTDD KBMD, K∗BMD, ∗PHDD CHDD, (HDD), EVCHDD MDD, MD-SV, MTMDD, QDD GFDD, (Pseudo-QDD) Reed-Muller-Fourier DD EVGFDD EVRMFDD MTDD, (FG) FADD
FNADD
FNAPDD,
Table 6.2. Discrete transforms and decision diagrams.
6.1. Decision Trees
97
We consider a non-singular (gi × gi ) matrix Qi defined on each Gi in G decomposable as in (4.3). Columns of the matrix Q=
n
Qi ,
(6.1)
i=1
where ⊗ denotes the Kronecker product, form a complete set of linearly independent functions, and thus, a basis in P (G). Therefore, each f ∈ P (G) can be represented as a linear combination of columns of Q. At the same time, Q expresses a recursive structure equal to the structure of a DT. Therefore, the following statement is possible. Statement 10 Each Kronecker product representable matrix Q, with constituent submatrices Qi of orders gi , can be used to define an STDT for f ∈ P (G), where G is decomposable as in (4.3). For each submatrix Qi in Q, we denote by Q−1 i , the matrix inverse to Qi over P . In an STDT, the rows of Q−1 determine the decomposition rules applied at the nodes to which the variable xi ∈ Gi is assigned. From Statement 9, the columns of Q determine labels at the edges of these nodes. Kronecker STDTs are derived by using the same submatrix Qi for all the nodes at the i-th level in the STDT. We denote an STDT defined with respect to a basis Q by STDT(Q). A Kronecker STDT(Q) is uniquely specified by (MTDT, Q, DTL), where DTL is the decision type list specifying the decomposition rules determined by submatrices Qi chosen for the nodes in the STDT. From Statement 8, due to the structure of Q in (3), a STDT(Q) for f may be generated by performing the ST defined by Q over MTDT for f . At each node in the MTDT, calculations determined by the submatrix Qi assigned to this node are performed.
6.1.4 Pseudo-Kronecker DTs If different submatrices Qi are used at different nodes at the same level, then pseudo-Kronecker STDTs (PKDTs) result. A pseudo-Kronecker spectral transform decision tree (STDT(Q)) is completely determined by (MTDT, Q, exDTL), where the extended DTL (exDTL) specifies Qi for each node. In an exDTL, the hierarchy among the levels is expressed through brackets separating nodes at different levels in the STDT(Q). In this definition, the basis Q shows the set of allowed submatrices Qi in definition of a Kronecker DT by whose modification the pseudo-Kronecker DT is derived. However, the use of different submatrices for the nodes at the same level performs a modification in Q. The modification consists in permutation of basic functions and reordering of some co-factors in some of these basic functions. It follows that pseudo-Kronecker DTs are defined as graphical representations of Fourier-series like expansions of f with respect
98
6. Advanced Topics in Decision Trees and Diagrams
to non-Kronecker bases. However, these bases can be derived by transformations over rows and columns of Kronecker bases [219]. As in other STDT(Q)s, in a pseudo-Kronecker STDT(Q), the correspondence between the structure of the DT and the transform matrix Q is preserved. Example 55 Table 6.3 shows basic functions in symbolic form for five PKDTs for switching functions for n = 2. These PKDTs are specified by the exDTLs, where S, pD, and nD denote the Shannon, the positive Davio, and the negative Davio decomposition rules. In the matrix notation, these rules are given by the following matrices
0 1 1 0 1 0 . nD = pD = S= 1 1 1 1 0 1 Table 6.4 shows the basis functions in these PKDTs. These are the matrices Td . The column Ti shows the inverse matrices used to determine the values of constant nodes in these PKDTs. The matrices are written in terms of the basic submatrices assigned to the nodes as shown in exDTLs. It is apparent that the matrices Td and Ti are derived from the Kronecker product representable matrices by replacing some submatrices with other submatrices as shown in the exDTLs. For example, the structure of Ti for PKDT(S,(pD,nD)) is first determined by the structure of the basic matrix for the S-decomposition rule. Thus, this Ti has the diagonal form. The blocks in the diagonal correspond to the matrices for pD, and nDdecomposition rules, respectively. The same structure is apparent in Td , taking into account that Ti and Td are the inverse matrices each to other. Extended DTL (S, (pD, nD)) (S, (nD, pD)) (pD, (S, nD)) (pD, (nD, S)) (nD, (S, pD))
Basic functions [x1 , x1 x2 , x1 , x1 x2 ] [x1 , x1 x2 , x1 , x1 x2 ] [x2 , x2 , x1 , x1 x2 ] [1, x2 , x1 x2 , x1 x2 ] [x2 , x2 , x1 , x1 x2 ]
Table 6.3. DTLs and basis functions in PKDDs.
6.2 Basic Features of DTs A function f defined on a set G of g points may be represented by different MTDTs, depending on the decomposition assumed for the group G imposed on G. These MTDTs differ with respect to the number of 1. levels, 2. non-terminal nodes, and
6.2. Basic Features of DTs
Extended DTL
Td
(S, (pD, nD)) (S, (nD, pD)) (pD, (S, nD)) (pD, (nD, S)) (nD, (S, pD))
nD−1 0 nD−1 0 S−1 S−1 nD−1 nD−1 S−1 S−1
99
Ti 0
pD−1
0
pD−1 0
nD−1
0
S−1 pD−1 0
pD 0 0 nD nD 0 0 pD S nD nD S 0 pD
0 nD 0 S S pD
Table 6.4. Symbolic representation of direct and inverse transform matrices used in definition of PKDTs.
3. outgoing edges of nodes. These three parameters determine the structure of an MTDT and are mutually related. The number of levels and the number of non-terminal nodes depend on the number of allowed outgoing edges, and vice versa [220]. Statement 11 The structure of an MTDT is determined by the decomposition of the domain group G of f . The number of levels in the DT is equal to the number of subgroups Gi into which the domain group G of f is decomposed. The number of outgoing edges of nodes at the i-th level and, thus, the number of nodes at the (i + 1)-st level is determined by the order gi of Gi . The number of constant nodes is equal to the order g of G. Since an STDT is specified by the pair (MTDT, ST), the structure of the STDDs is determined by the same parameters as the structure of MTDTs. However, for the decomposition of G into subgroups of fixed orders, we may change the structure of STDTs by choosing between STs defined on Abelian and non-Abelian groups. The following statement determines the structure of STDTs on arbitrary, not necessarily, Abelian groups [216]. Statement 12 The number of levels in the DT is equal to the number of subgroups Gi into which the domain group G of f is decomposed. The number of outgoing edges of nodes at the i-th level is equal to the cardinality Ki of the dual object Γi of Gi . The number of constant nodes in a DT is equal to the cardinality K of the dual object Γ of G.
100
6. Advanced Topics in Decision Trees and Diagrams
In a DT, if the matrix-valued constant nodes are not allowed, then the number of constant nodes is equal to the order g of G. We assume that in this case matrix-valued constant nodes are represented by subtrees on Abelian groups. This representation, does not change the number of nonterminal nodes at the upper levels in the DT. This statement corrects a definition of DDs commonly encountered in the literature. In such definitions, it is often stated that the number of outgoing edges of a node with the decision variable xi is equal to the number of different values that xi may take. Statement 12 shows that this definition only holds for MTDTs and STDTs on Abelian groups. MTDDs are defined with respect to the identical mapping. Thus, in this case the domain group G and its dual object Γ coincide. The dual object Γ of any Abelian group expresses the structure of a multiplicative group isomorphic to G. This consideration and Statement 11 suggest the following remark. Remark 10 MTDTs and STDTs on Abelian groups for a fixed decomposition of G have the same structure irrespective of the one used in the decomposition of the ST. In the other words, for a fixed decomposition that is assumed over an Abelian group G, all the DTs on G have the same structure. It follows that on Abelian groups, the structure of STDTs is independent of the decomposition expansions, since the ST is determined by these rules. However, the structure of DTs on non-Abelian groups may be changed by using different STs. For example, the structures of an MTDT and a Fourier DT on a given non-Abelian group are quite different [216, 217]. Example 56 Fig. 6.5 compares structures of a BDT, quaternary decision tree (QDT), matrix-valued Fourier decision tree on non-Abelian groups (mvFNADT), and number-valued Fourier decision tree on non-Abelian groups (nvFNADT) as defined in [193, 216, 217], on groups of order 8. The assumed decompositions for G are GBDD = C23 , GQDD = C2 × C4 , and GF N ADD = Q2 , where C2 and C4 are the cyclic groups of order two and four, and Q2 is the quaternion group of order 8. In FNADTs, the labels at the edges are elements of the dual object Γ. For G = Q2 , Γ is a set of five elements. Thus, labels at the edges in FNADDs are denoted by wik , where wik denotes wi = k, k ∈ Γ. The matrix-valued node in the nvFNADD is represented by a node in C4 . Therefore, the outgoing edges are denoted by X k , k = 0, 1, 2, 3. Statement 13 DTs of the same structure differ mutually in the meaning of nodes and correspondingly determined labels at the edges and values of the constant nodes. In a spectral interpretation, Statement 13 may be reformulated as follows.
6.3. Decision Diagrams
101
f _ x1
S2
_ S2 x2 x2 _ x3 c0
S2
_ x3 x3 c1
c2
S2
_ x3 x3
x2
S2
c4
_ x1
S2
_ x2
c3
f
x1
_ x3 x3 c6
c5
S2
x1
S4
S4
S2 x3 c7
BDT
0 X20 X21 X22 X23 X2 X21 X22 X23 c0 c1 c2 c3 c4 c5 c6 c7
QDT f FNA5
f
w4
FNA5 w4
S4
0
w w1 w2 w3 c0 c1 c2 c3
c4 c5 c6 c7
mvFNADT
w0 w1 w2 w3 X 0 1 2 3 X2 X2 X2 2 c0 c1 c2 c3 c4 c5 c6 c7 nvFNADT
Figure 6.5. Structure of BDT, QDT, mvFNADT, and nvFNADT.
Statement 14 DTs of the same structure differ mutually with respect to the STs used in their definition.
6.3 Decision Diagrams A formal description of DDs may be given as follows: Definition 39 A decision diagram representing a given f ∈ P (G) is a rooted acyclic graph G = (V, E) with the edge set E and the node set V consisting of non-terminal and constant nodes. A DD for some function f is specified by way of the assignment of f to the DD though the use of some decomposition rules, i.e., a spectral transform, that relates the function values for f and the nodes in the DD. The specification of the assignment of a function f to a DD is simplified if we note that a DD for some f ∈ P (G) is derived by the reduction of the corresponding DT for f . Moreover, this statement is sufficient and strong enough to be accepted as an alternative definition of DDs.
102
6. Advanced Topics in Decision Trees and Diagrams
Definition 40 DDs are graphic representations of discrete functions derived by the reduction of the corresponding DTs for the represented functions. Reduction is accomplished by sharing all isomorphic subtrees and deleting any redundant information in the DT. We denote by V a vector representing values of constant nodes in a DT on G of the form (4.3). This vector consists of n subvectors Vi of orders Ki . Note that for Abelian groups Ki = gi . In a DT, two subtrees are isomorphic if [196] 1. They are rooted in nodes at the same level 2. The constant nodes of the subtrees represent identical subvectors Vi in the vector of values of constant nodes V. This definition completely covers different reduction rules used in different DDs. It applies to both MTDTs and STDTs, and it is true for all bit-level or word-level classes of these DDs. In the case of a MTDT, the minimum possible isomorphic subtrees are two equal constant nodes. In this case, f has equal values at the points corresponding to these equal-valued constant nodes. The maximum possible isomorphic subtrees are two equal subtrees rooted at the nodes pointed by the outgoing edges of the root node. In that case, f is independent of the variable assigned to the root node. In STDTs, the same statements hold, but for the corresponding ST-spectra Sf for f . The reduction of DTs is formalized and performed in practice by using reduction rules. They are first defined for DDs on dyadic groups and then extended to DDs on other groups. There are BDD reduction rules [187], zero-suppressed BDD reduction rules [151], and generalized BDD rules [243]. BDD reduction rules and zero-suppressed BDD reduction rules can be applied to bit-level DDs, since in these DDs the labels at the edges are taken in the set consisting of the logic constant 1, and the literals of switching variables xi and xi . Advantages are taken from various properties of Boolean algebraic structures where the bit-level DTs are defined. Due to these properties, a reduction by application of BDD and zero-suppressed BDD rules does not require relabeling of any edge in the DDs. Generalized BDD rules must be applied in DDs where labels at the edges are different from the constant 1 and the binary-valued variables. Thus, relabeling of edges after the reduction is required. The labels at the outgoing edges of a deleted node are added and multiplied by the label at the incoming edge. If there are several incoming edges, the same rule is applied to each of them, and then the labels are added [243]. In a DD, edges longer than 1, i.e., connecting nodes at non-successive levels, can appear. For example, the length of an edge connecting a node at the (i − 1)-th level with a node at the (i + 1)-th level is 2. Therefore, the following definition is possible.
6.3. Decision Diagrams
103
Definition 41 (Cross points [243]) In a DD, a cross point is a point where an edge longer than 1 crosses a level in the DD. The cross points are an important notion in the theory of DDs. In applications of DDs, the cross points permit ua to take into account the impact of the deleted nodes. That should be done in some calculations through DDs, and in realizations derived from DDs by using circuits different from toese corresponding to the decomposition rules used in the definition of DDs.
6.3.1 Complexity of DDs In DD representations, the main goal is to represent a given f by a DD which is best suited for an intended application. The criteria for suitability of a DD representation relates to the structure of the DD. The structure of a DD is determined by the structure of the DT which the DD is derived from. The number of levels in a DT may be reduced by using different decomposition of the domain group G of f into large subgroups. However, large subgroups in G require nodes with an increased number of outgoing edges. The number of outgoing edges of a node is denoted as the cost of the node. In a DT, the cost of nodes at the i-th level determines the number of nodes at the (i+1)-th level and in that way determines the reduction possibilities. As the cost of the nodes increases, the resulting number of non-terminal nodes decreases. However, in this case, the minimal subvectors Vi in the isomorphic subtrees are of larger orders. Therefore, the probability of finding isomorphic subtrees in a DT is smaller. After this intuitive consideration, the following remark is possible. Remark 11 Changing the structure of a DT results in a change in the reduction possibilities in the DT. Usually, increasing the cost of the nodes results in a corresponding decrease in the reduction possibilities of a DT. An experimental confirmation of this is given in the Addendum by way of comparing BDDs and quaternary DDs (QDDs) [193]. In some applications, we may want to reduce the number of levels, the number of non-terminal nodes, or the maximum number of nodes per level in a DT. In that order, consideration of parameters for determining the structure of a DD can be formalized through the following definitions. Definition 42 For a DD, the size, (s), is defined as the number of nodes used to represent a given f . Definition 43 For a DD, the depth, (d), is defined as the number of levels in the DD.
104
6. Advanced Topics in Decision Trees and Diagrams
Definition 44 For a DD, the width, (w), is defined as the maximum number of nodes for a level in the DD. For a given f , different DDs produce representations of different levels of complexity. DDs for an f derived from DTs with the same structure are often compared by their size. We say that the smallest size DD provides the most efficient representation for f . In DDs of a different structure, the depth and the width are also compared. However, from Statement 12, it is clear that consideration of just the size is not enough for a proper comparison of the efficiency of representation of a given f by DDs with different numbers of outgoing edges per node. The following parameters are useful for comparing DDs derived from DTs of different structures. Definition 45 For a DD, the percentage of nodes used, (u), is the ratio of the size, (s), and the total number of nodes, (t), in the DT from which the DD was originally derived. Thus, s u = 100 × [%]. t The reduced depth is an inherent property of DDs with an increased number of outgoing edges per nodes. Depth reduction is an important problem. In circuit realizations derived from DDs representations, the propagation delay is roughly proportional to the depth of DDs used. In applications such as verification, testing, and satisfiability checking, it is often necessary to traverse a DD many times from the root node to the constant nodes. Therefore, in such applications, the time complexity of the related procedures is proportional to the depth of DDs. However, in many cases, the use of DDs with an increased number of outgoing edges per node increases the width of the DD. Therefore, this different, often opposite, impact of nodes with increased number of edges to the depth and width of DDs motivates us to introduce the concept of the area of a DD. Definition 46 For a DD, the area (a) is defined as the product of the depth and the width of the DD. Thus, a = s · w. The area provides a measure of the space complexity of a DD. Thus, it permits us to compare DDs with different number of outgoing edges per nodes. In word-level DDs, the values of constant nodes are the integers, complex numbers, or elements of a finite field. The number of constant nodes in different word-level DDs for the same function f may be considerably different. In circuit realizations derived from DDs, the constant nodes can be considered as inputs into a network, while each non-terminal node represents a subcircuit in the network. In calculations through DDs, some calculation subprocedure is performed at each non-terminal node. The constant nodes
6.3. Decision Diagrams
105
% of used nodes ratio = ntn/cn
Figure 6.6. Characteristics of DDs.
are the input data for the calculation procedure. In such applications, it may be useful to compare the number of non-terminal and constant nodes. Thus, we define the ratio of nodes in the DDs. Definition 47 In DDs, the ratio of nodes (r) is defined as the ratio of the number of non-terminal nodes and constant nodes: non-terminal nodes . constant nodes In applications such as network design and calculations with discrete functions through DD representations, the size, width, and area express measures of the space complexity of DDs. The size and depth express its time complexity. These are quantitative characteristics of a DD. The percentage of nodes used and the ratio of non-terminal and constant nodes show the efficiency of a DD in terms of the reduction operation. These are qualitative characteristics of DDs. Fig. 6.6 summarizes the characteristics of DDs. ratio of nodes =
6.3.2 Experimental results for complexity of DDs The following examples and discussions confirm and illustrate the relevance of parameters introduced in Definitions 45, 46, and 47, for comparison of different DDs. Percentage of nodes used Tablea 6.5 and 6.6 show the percentage of nodes used (%uBDD and %uQDD ) in BDDs and QDDs for a set of benchmark functions. The data for this table are taken from [193]. In Table 6.5, the total of nodes in the BDT for a multi-output function is calculated as tBDT = (2n − 1) × Out, where Out is the number of outputs.
106
6. Advanced Topics in Decision Trees and Diagrams
In QDTs, when n is an even number, we calculate the total of nodes n as tQDT = (((4 2 − 1)/3) × Out). When n is an odd number, we assume that the root node has two outgoing edges. Thus, we calculate tQDT = n−1 ((2(4 2 )/3+1)×Out). We do not take into account the number of constant nodes, since both BDTs and QDTs are the bit-level DDs. Thus, there are always two constant nodes. This example shows that on average QDDs require 35% fewer nodes than BDDs. BDDs require on the average 5.4% of the total of nodes in BDTs. QDDs require 8.5% of nodes in QDTs. It follows that for the considered set of functions, we spend 1.6 times fewer nodes in QDDs than in BDDs. The possibility of reducing a node in the QDT is reduced 1.6 times, compared to BDT. Note that in QDDs, we can reduce or share a node if we have equal subvectors of order 4k within the truth-vector of order 2n , k ≤ n−1, instead of subvectors of order 2k as we do in BDDs. Thus, QDDs permit absolute reduction of the size at the price of increased cost of nodes. However, the relative reduction ratio in QDDs is smaller than in BDDs. If the overall complexity of a DD is defined as the product of size and the cost of a node, then BDDs and QDDs have a comparable complexity. Table 6.7 shows the percentage of nodes used in different word-level DDs. The SBDDs, the arithmetic transform DDs (ACDDs) [243], the CHTDDs [66], and the Walsh DDs (WDDs) with coding (0, 1) → (1, −1) of switching variables [243] are compared. As noted above, in these word-level DDs, the total of nodes is calculated as the sum of non-terminal and constant nodes. In Table 6.7, all the DDs have the same cost of a node. In this case, the percentage of nodes used expresses the impact of the range allowed for values of constant nodes. In spectral interpretation of DDs [243], the values of constant nodes are the spectral transform coefficients for f with respect to the spectral transform used in definition of the DD. In SBDDs, this is the identical transform. In ACDDs, this is the arithmetic transform, the same as in binary moment diagrams (BMDs) [20]. ACDDs and BMDs differ in the reduction rules used [44]. In ACDDs these are BDD reduction rules, while in BMDs the zero-suppressed BDD reduction rules are used. In CHTDDs, the values of constant nodes are the coefficients of the complex Hadamard transform [66]. In WDDs, these are the Walsh transform coefficients. Thus, in SBDDs, ACDDs, CHTDDs, and WDDs, the values of constant nodes are non-negative integers, integers, complex number, and even integers from the set {−2n , . . . 2n }, respectively. The percentage of nodes used clearly expresses the influence of this restriction of the range for the values of constant nodes. In WDDs, we extend the range for the values of constant nodes, compared to SBDDs. In that way, we reduce the percentage of nodes used. Further extensions, as in ACDDs and CHTDDs, are not always efficient. However, for a particular function, these DDs may provide more compact representations. For exam-
6.3. Decision Diagrams
f 9sym add6 adr4 alu2 apla bw clip eo14 con1 dc2 dist dk17 dk27 duke2 f51m inc misex1 mpl4 radd rd53 rd73 rd84 risc rot8 sao2 sex sqr8 t481 tial ts10 xor5 z5xp1 av.
In 9 12 8 10 10 5 9 14 7 8 8 10 8 22 8 7 8 8 8 5 7 8 8 8 10 9 8 16 14 22 5 7
Out 1 7 5 6 12 28 5 1 2 7 5 11 9 29 8 9 7 8 5 3 3 4 31 5 4 14 16 1 8 16 1 10
sBDD 33 47 29 61 103 108 97 27 15 64 152 63 25 373 67 70 36 141 29 23 43 59 67 75 85 47 233 32 690 146 9 68 97
sBDT 511 28,665 1,275 6,138 12,276 868 2,555 16,383 254 1,785 1,275 11,253 2,295 121,634,787 2,040 1,143 1,785 2,040 1,275 93 381 1,020 7,905 1,275 4,092 7,154 4,080 65,535 131,064 9,568,110 31 1,270 4,110,019
107
%uBDD 6.458 0.164 2.275 0.994 0.839 12.442 3.796 0.165 5.906 3.585 11.922 0.56 1.089 0.000 3.284 6.124 2.017 6.912 2.275 24.731 11.286 5.784 0.848 5.882 2.077 0.657 5.711 0.049 0.526 0.002 35.484 5.354 5.287
Table 6.5. Percentage of used nodes in BDDs.
ple, the sizes of SBDDs for rd53 and rd84 are 23 and 59, while the sizes of CHTDDs for these functions are 21 and 45, respectively. This consideration of the percentage of nodes used suggests the use of DDs with constant nodes in finite fields, as a compromise between the size and the cost of nodes. A reasonable compromise between the cardinality of the field where constant nodes take values, and the number of outgoing edges of nodes, may provide the most compact DDs.
108
6. Advanced Topics in Decision Trees and Diagrams
f 9sym add6 adr4 alu2 apla bw clip eo14 con1 dc2 dist dk17 dk27 duke2 f51m inc misex1 mpl4 radd rd53 rd73 rd84 risc rot8 sao2 sex sqr8 t481 tial ts10 xor5 z5xp1 av.
In 9 12 8 10 10 5 9 14 7 8 8 10 8 22 8 7 8 8 8 5 7 8 8 8 10 9 8 16 14 22 5 7
Out 1 7 5 6 12 28 5 1 2 7 5 11 9 29 8 9 7 8 5 3 3 4 31 5 4 14 16 1 8 16 1 10
sQDD 17 17 11 48 78 71 52 13 11 44 71 47 25 257 46 41 27 81 11 11 21 29 56 60 69 41 169 17 392 148 5 33 97
sQDT 171 9,555 425 2,040 4,092 308 855 5,461 86 595 425 3,751 765 40,544,929 680 387 595 680 425 33 129 340 2,635 425 1,364 2,394 1,360 21,845 43,688 3,189,370 11 430 4,110,019
%uQDD 9.942 0.178 2.588 2.346 1.906 23.052 6.082 0.238 12.791 7.395 16.706 1.253 3.268 0.001 6.765 10.594 4.538 11.912 2.588 33.333 16.279 8.529 2.125 14.118 5.059 1.713 12.426 0.078 1.795 0.005 45.455 7.674 5.287
Table 6.6. Percentage of used nodes in QDDs.
Area of DDs Tables 6.8 and 6.9 compare the areas of different DDs on different domain groups, thus, DDs with different depths. The SBDDs, the ACDDs, the CHTDDs, the Walsh DDs (WDDs) with coding (0, 1) → (1, −1) of switching variables, and FNADDs on the quaternion groups [216] are compared.
6.3. Decision Diagrams
f 5xp1 bw con1 rd53 rd73 xor5 av.
In 7 5 7 5 7 5
Out 10 28 2 3 3 1
sDT 2560 1764 510 189 765 63
%uSBDD 3.51 6.58 3.92 13.92 13.28 17.46 8.43
%uACDD 1.91 3.57 8.82 11.11 4.31 33.33 10.51
%uCHT DD 99.61 3.57 51.40 11.11 4.71 17.46 31.31
109
%uW DD 1.95 3.57 11.57 10.58 5.62 11.11 7.40
Table 6.7. Percentage of used nodes in different word-level DDs.
f 5xp1 bw con1 rd53 rd73 xor5 av.
s 90 116 20 25 45 11 51
SBDD w a 25 2,250 37 4,292 5 100 6 150 10 450 2 22 14 1,211
s 49 63 45 21 33 21 39.6
ACDD w a 10 490 16 1,008 10 450 5 105 6 188 5 105 8.6 391
s 255 63 157 21 36 11 90.5
CHTDD w a 64 16,320 16 1,008 56 8,792 5 105 7 252 2 22 25 4,416.5
Table 6.8. Size, width, and area of different DDs.
In FNADDs, the optimization is performed by using different decompositions for the domain groups. Therefore, for FNADDs, the assumed decomposition of the domain groups is shown. C2 and C4 are the cyclic groups of order 2 and 4, respectively. We used the Shannon rules for the nodes on these subgroups. W2 means that we used the Walsh transform expansion rules for nodes on the corresponding subgroup. Q2 denotes the quaternion group of order 8, and on this group we always used the Fourier transform expansion rules. The depth of SBDDs, ACDDs, CHTDDs, and WDDs is equal to the number of variables in f , since these DDs are defined on C2n . In FNADDs, the depth is equal to the number of subgroups in the assumed decomposition for the domain group G increased for the levels introduced by the nodes used to represent the matrix-valued constant nodes. In this table, the depth of FNADDs is always 5, since we assume decomposition into three subgroups and Q22 introduces one (4 × 4) matrix-valued constant node. We represent this node by a QDD over the complex field C [217]. Tables 6.10 and 6.11 compares the area of SBDDs the Multi-terminal BDDs (MTBDDs) [32], and FNADDs for representation of n-bit adders and multipliers.
110
6. Advanced Topics in Decision Trees and Diagrams
f 5xp1 bw con1 rd53 rd73 xor5 av.
s 50 63 59 20 33 7 38.6
WDD w a 8 450 16 1,008 13 767 5 100 7 231 1 7 8.3 427
s 167 34 25 21 53 11 51.8
FNADD w a 18 3,006 4 136 6 150 3 63 6 318 2 22 6.5 615.8
Group C2 Q22 C4 Q22 C2 Q22 C4 Q22 W2 Q22 C4 Q22
Table 6.9. Size, width, and area of different DDs.
n 3 4 5 6 av.
s 57 103 226 477 215.7
n 3 4 5 6 av.
s 63 159 473 788 370.7
adders SBDD w a s 20 1,140 56 30 3,090 144 62 14,012 352 126 60,102 832 59.5 19,586 346 multipliers SBDD w a s 15 945 82 39 6,201 330 114 53,922 1,332 192 151,296 5,270 90 5,091 1,753.5
MTBDD w 14 30 62 126 58
a 784 4,320 21,824 104,832 32,940
MTBDD w a 29 2296 120 39,600 496 660,672 2,016 10,624,320 665.25 2,831,722
Table 6.10. Size, width, and area of SBDDs and MTBDDs for adders and multipliers.
Ratio of non-terminal and constant nodes in DDs Table 6.12 compares ratio of nodes in different DDs. Estimation of this parameter is useful in applications where reduction of the number of nonterminal nodes is a primary goal, and an increase in the number of different input data is allowed.
6.3.3 Fibonacci decision diagrams In previous discussions, it was assumed that the cardinality of the domain for a given function f can be represented as the product of some factors. The structure of the decision diagrams to represent f is determined by this multiplicative decomposition assumed for the cardinality of the domain as
6.3. Decision Diagrams
n 3 4 5 6 av.
n 3 4 5 6 av.
adders FNADD s w a 13 4 52 29 7 203 34 7 238 33 7 231 20750 6 181 multipliers FNADD s w a 29 4 116 20 11 770 104 23 2,392 94 22 2,068 61.7 15 1,336.5
111
Group Q22 C4 Q22 C2 Q32 Q42
Group Q22 C4 Q22 C2 Q32 Q42
Table 6.11. Size, width, and area of different DDs for adders and multipliers.
f 5xp1 bw con1 rd53 rd73 xor5 av.
rACDD 3.45 0.97 8.00 2.5 4.5 2.5 3.653
rCHT DD 0.99 0.96 2.74 2.5 3.37 4.5 2.5120
rW DD 2.85 0.97 4.36 3.00 5.6 2.50 3.213
rF N ADD 0.35 0.36 1.83 0.50 0.77 0.83 0.773
Table 6.12. Ratio of nodes in different DDs.
shown in Fig. 6.5. The problem is that such decision diagrams cannot be used to represent functions defined on domains that cannot be represented as a product of some factors. In particular, in BDDs, the paths to constant nodes correspond to binary numbers, i.e., representations of the form x = xn−1 2n−1 + xn−2 2n−2 + . . . + x1 21 + x0 20 . There are other number systems, e.g., Fibonacci code which is based on Fibonacci recursion, and this may be used to define Fibonacci decisions diagrams (FibDDs) [246]. In FibDDs, the additive decomposition of cardinality of the domain which is represented as a generalized Fibonacci number [51] is assumed. Since each integer can be represented by some generalized Fibonacci number, it follows that it is possible to design an FibDD to represent functions defined in an arbitrary number of points [246, 247]. Example 57 Fig. 6.7 shows an FibDD for functions defined in N = 13 points and derived for particular assignments of values for parameters in
112
6. Advanced Topics in Decision Trees and Diagrams f FB 1
0 FB 0 0
1
FB 1
0 FB
FB 0
0
1 FB 0 1
FB 0 1 f0
f2
f1
f3
f4
FB 0
1
FB 0 1 f5
f6
FB 1
1
FB 0 1 f7
f8
f9
0 f10
FB 1
f11
f12
Figure 6.7. Fib1 (5)DD for functions defined in N = 13 points.
the generalized Fibonacci p-numbers. The decomposition of the cardinality of the domain is assumed as φ1 (5) = 8 = 5 + 3 = (3 + 2) + 3 = ((2 + 1) + 2) + (2 + 1) =
(((1 + 1) + 1) + (1 + 1) + ((1 + 1) + 1)).
6.4 Programming of Decision Diagrams The basic tasks that should be solved in programming DDs can be summarized as follows 1 : 1. Determine the data structure to represent a node. 2. Provide a way to construct a DD from a specification of the function f to be represented, and to perform mathematical operations over DDs representing given functions. 3. Ensure that the procedures for constructing, manipulating, and calculating with DDs are efficient to keep the complexity of the problem within reasonable limits. To satisfy these requirements, the following basic programming techniques are used in present computer program manipulating. 1 We thank Dragan Jankovi´ c, Dept. of Computer Science, Faculty of Electronics, Niˇs, for useful discussions and comments on this section about programming of decision diagrams.
6.4. Programming of Decision Diagrams
113
1. A hash table, which associates a value with a key. A hash function applied to the key selects which of N linked lists, will be used to store the pair (key, value). The load factor of a hash table is defined as α = k/N , where k is the number of keys stored in the table. 2. A memory function F , which is a table of values (x, F (x)) that the function has already computed. If F is called with argument x again, F (x) is returned without any computation. 3. Garbage collection, which is a class of techniques used periodically to free unused memory. It is useful when references to the structure being freed prevent incremental freeing. The cost of searching for these references is amortized over many free operations. Decision diagrams are stored in the memory of a computer as tables specifying nodes and interconnections among them. The table representing a DD is realized as a hash table and is called the Unique Table [18], since in programming a DD, generating multiple nodes representing identical subfunctions is avoided to save the memory. The Unique Table is organized as a list of chain lists, each of them specifying nodes to which the same variable is assigned, i.e., nodes at the same level in the DD. Entries of the Unique Table are pointers to the nodes. In practice, when a node is generated, a part of memory is allocated for it, and its address is stored in the Unique Table. It is necessary to be able to change the order of variables, since DDs for different orders of variables may have different numbers of nodes. This is achieved by storing the current assignment of variables to the levels in a separate vector.
6.4.1 Representation of nodes The structure used to represent a node differs depending on the implementation of the package, the programming environment used, and the intended applications. The minimum structure describing a node contains data about the variable assigned to the node and pointers to its children. If implemented as suggested in [18], this structure comprises 22 Bytes per node in a 32-Bit-processor machine. We will briefly discuss implementations of DDs in the packages CUDD (see, for example, [205]), PUMA [36] and the programming of MDDs reported in [148]. CUDD works with BDDs and multi-terminal BDDs (MTBDDs), denoted in this package as arithmetic DDs [8]. The package PUMA and the package described in [148] are adapted to work with multiple-place DDs (MDDs) [207] for representation of MV functions. More details about construction of DD packages for switching and MV functions can be found in [41, 42, 148]. In [41], a unified method is presented for construction and calculation with arbitrary spectral transform DDs (STDDS) by using a spectral interpretation of DDs.
114
6. Advanced Topics in Decision Trees and Diagrams
Node structure If implemented as suggested in [18], a node is described by the following parameters: 1. index, specifying the variable assigned to the node. Since the reordering of the variables is allowed, the level to which a variable is assigned is stored in a separate vector as noted above. 2. ref , showing the total number of nodes whose outgoing edges point to this node. This data is used to control the memory in the following way. If there is a node to which there are no pointers, then this node is denoted as dead; however, it is not automatically deleted from the table, because it may be eventually used later and since to delete or generate a node requires some processing time. Instead, the nodes denoted as dead are all deleted simultaneously when the mechanism for garbage collection is started. 3. ∗next, which is the pointer to the following node in the table. Since table is realized as a list of chain lists, to relate the nodes within a list, a pointer to the following node is required. 4. union type is a specific structure that may be a constant or the structure DdChildren when a constant node and a non-terminal node are generated, respectively. The structure DdChildren consists of two fields for pointers to two successing nodes. Therefore, the structure for DdChildren is struct DdChildren { struct DdN ode ∗T struct DdN ode ∗E }
Pointer to the right (Then) successor Pointer to the left (Else) successor
Example 58 In Fig. 6.8, for description of the node whose address is q1 , index = i, ref = 4, ∗next = q2 , T = q4 , E = q3 Table 6.13 shows the structure used in the CUDD package to describe a node. Since, unlike CUDD, which is written in C, PUMA is written in C++, nodes are described by classes as in Table 6.14. In this description of nodes, v denotes the variable, and there are five pointers to successors, since five-valued logic is allowed. Key is the value assigned to the node, which is used when the node is searched for in the hash table. In this implementation, the Key is generated from the pointers
6.4. Programming of Decision Diagrams
q1
_ xi _ xq
115
q2 xi
q3 xq _ xk
q4 xk
_ xr
q5 xr
Figure 6.8. Node in a BDD.
struct DdN ode { DdHalf W ord index DdHalf W ord ref DdN ode ∗next union { CU DD V ALU E T Y P E value DdChildren kids } type }
Index of the variable assigned to the node Counter of references, i.e., number of nodes pointing to this node Pointer to the following node in the Unique Table For constant nodes For internal, i.e., non-terminal nodes
Table 6.13. Description of a node.
G, H, I, J, K as follows: Key
= v + HASH KEY (G) + HASH KEY (H) + HASH KEY (I) + HASH KEY (J) + HASH KEY (K);
Key is generated and stored when the node is generated to avoid repeated calculation each time when the given node is examined. Table 6.15 shows the structure for representation of nodes that is assumed in [148], and expressed in C for nodes in MDDs. The node components have the following meaning: 1. value shows the index of the variable assigned to a non-terminal node or the value associated with a constant node.
116
6. Advanced Topics in Decision Trees and Diagrams
class M ddN ode { public : unsigned v; pM ddN ode G, H, I, J, K;
Outgoing edges per node Pointers to successors PUMA works with at most five-valued variables // F = (v, G, H, I, J, K) ⇔ // F = (v == 0) ∗ G||(v == 1) ∗ H|| //(v == 2) ∗ H||(v == 3) ∗H||(v == 4) ∗ K; unsigned Key; Value assigned to the node identifying it in the hash table
} Table 6.14. Description of nodes in PUMA.
typedef struct node ∗DDedge; typedef struct node ∗DDlink; typedef struct node { char value, f lag; DDlink next; DDedge edge[0]; }node; Table 6.15. Structure for nodes in MDDs.
2. f lag is a field used to track visits to nodes in recursive descent algorithms. 3. next is a pointer to chain a node into linked lists, for memory management and Unique Table management. 4. edge is an array of DDedge’s showing the number of edges for the node being created, and initially declared as empty. The main difference here compared to structures to describe nodes in BDDs is that edge is specified as an array of edges, instead of being a fixed number of two edges as in BDDs.
6.4. Programming of Decision Diagrams
117
6.4.2 Construction of DDs DDs are constructed using a single operation or a small set of basic operations adapted to the way in which the function to be represented is specified. Example 59 Fig. 6.9 shows basic principle of construction of a BDD for the function f = x1 x2 ∨x3 . The construction starts with BDDs representing variables, and then basic operations are performed as described in analytic descriptions for the function f .
x3 x2 0
1
0
1
0
1
1
0
1
0
0
0
1
1
1
0
x1
x1
AND
x3 x2
1
x1 1
0
x2 0
0
f
OR
1
0
0
1
1
Figure 6.9. Construction of a BDD.
In programming implementation, the construction of a DD is performed by using a procedure reported in the literature as the APPLY procedure [19]. If two functions f and g are represented by BDDs, then the function f < OP > g, where < OP > is a binary operation, is represented as f < OP > g = v(fv < OP > gv ) + v(fv < OP > gv ), where v is the top variable in f and g. The cofactors of f and g with respect to different values of v are denoted by fv , fv , and gv , gv , respectively. Realization of logic operations over BDDs by APPLY can be improved using If − T hen − Else (ITE) operator defined as IT E(f, g, h) = if f then g else h, and expressed in terms of logic operations as [18] IT E(f, g, h) = f · g + f · h, where f , g, and h are arbitrary switching functions and · and + denote logic AND and OR, respectively. Example 60 The logic AND of two functions f and g is expressed in terms of ITE as AN D(f, g) = IT E(f, g, 0).
118
6. Advanced Topics in Decision Trees and Diagrams
The operation IT E(f, g, h) is performed in a recursive way over BDDs representing functions f , g, and h. Assume that we want to perform Z = IT E(f, g, h) over f , g, and h represented by BDDs with v as the top variable. Then, Z
= vZv + vZv
(6.2)
= v · (f · g + f · h)v + v · (f · g + f · h)v = v · (fv · gv + f v · hv ) + v · (fv · gv + f v · hv ) = IT E(v, IT E(fv , gv , hv ), IT E(fv , gv , hv )) =
(v, IT E(fv , gv , hv ), IT E(fv , gv , hv )).
The terminal cases for this recursion are IT E(1, f, g) = IT E(0, g, f ) = IT E(f, 1, 0) = f . Generalization to construction of MDDs can be done through the CASE operator defined as CASE(f, g 0 , g 1 , . . . , g q−1 ) = g f , In a relation corresponding to (6.2), CASE can be written as Z
= CASE(f, g 0 , g 1 , . . . , g q−1 ) =
(6.3)
CASE(v, CASE(fv0 , gv00 , . . . , gvq−1 ), 0 0 1 q−1 CASE(fv1 , gv1 , gv1 , . . . , gv1 ), . . . , CASE(fvq−1 , gv0q−1 , gv1q−1 , . . . , gvq−1 )), q−1
where fvj = f (v = j), and gvi j = g i (v = j). The terminal cases for this recursion are Z
= CASE(0, f, g 0 , g 1 , . . . , g q−1 ) = CASE(1, g 0 , f, . . . , g q−1 ) = ... = CASE(q − 1, g 0 , g 1 , . . . , f ) = CASE(f, 0, 1, q − 1) = f.
The relations (6.2) and (6.3) can be used to generate BDDs, and MDDs, respectively, for a function f < OP > g, where < OP > is an arbitrary binary operation for switching and MV functions, respectively. The realization is reduced to the specification of arguments f , g, and h in IT E, and similar for CASE. In [41], it is pointed out that the same procedure can be formulated by a operation table instead of the recursion as explained above. The method will be explained by means of the following example. Example 61 Table 6.16 shows an operation table for an arbitrary binary operation OP over switching functions, thus, the entries of the table are binary values, ri,j ∈ {0, 1}. This operation can be performed over BDDs
6.4. Programming of Decision Diagrams
OP 0 1
0 r0,0 r1,0
119
1 r0,1 r1,1
Table 6.16. Binary operation OP.
qOP 0 1 .. .
0 r0,0 r1,0 .. .
1 r0,1 r1,1 .. .
q−1
rq−1,0
rq−1,1
··· ··· ··· ··· ···
q−1 r0,q−1 r1,q−1 .. . rq−1,q−1
Table 6.17. q-ary operation OP.
representing two functions f and g as OP (f, g) = IT E(f, IT E(g, r1,1 , r1,0 ), IT E(g, r0,1 , r0,0 )). The arguments of ITE are determined by rows of the operation table. Generalization to binary operations over q-valued functions is straightforward. Example 62 Table 6.17 defines a binary operation for q-valued functions qOP . This operation can be implemented over MDDs for functions f and g as follows: qOP (f, g)
= CASE(f, CASE(g, r0,0 , r0,1 , . . . , r0,q−1 ), CASE(g, r1,0 , r1,1 , . . . , r1,q−1 ), . . . , CASE(g, rq−1,0 , rq−1,1 , . . . , rq−1,q−1 )).
The main advantage of this interpretation of ITE and CASE is that tables defining binary operations and tables defining basic matrices for various spectral transforms can be uniformly considered and implemented in a unified way. Due to that, it is possible to construct various spectral transform DDs (STDDs) by choosing different tables for whatever operations or spectral transforms corresponding to the decomposition rules. No other modifications in the main program are required. Construction of BDDs by a recursive implementation of logic NAND instead of ITE, or realization of NAND through ITE is considered in [45]. The extension to MV functions is provided by recursive implementation of MV operations MIN and MAX to construct MDDs, instead of through CASE, in [148].
120
6. Advanced Topics in Decision Trees and Diagrams
struct DdSubtable { DdN ode ∗ ∗ nodelist int shif t unsigned int slots unsigned int keys unsigned int maxKeys
unsigned int dead unsigned int next
Hash table Shift for the hash function Size of the hash table Number of nodes in the hash table Maximum number of nodes allowed for processing If larger number of nodes is required for a BDD of a given function, then this BDD cannot be generated. Number of nodes denoted as dead Index of the following variable in the group, i.e., pointer to the subtable for the following variable, i.e., the successing level in the BDD }
Table 6.18. Structure for Unique Table.
6.4.3 Unique and computed tables In a BDD, each node represents a subfunction in the represented function f , and isomorphic subfunctions are eliminated by the reduction rules. Therefore, in constructing a BDD, repeated construction of nodes representing identical subfunctions should be avoided; thus ensures successful application of reduction rules during construction of the BDD. This is achieved by using hash tables to create a Unique Table where the nodes in the BDD are stored [175]. The unique table maps a triple (x, g, h) into a node f = (x, g, h), where x is the decision variable assigned to the node, and g and h are subfunctions pointed to by the outgoing edges of the node. Each node has an entry in the Unique Table. Before a new node is added to the BDD, a lookup in the unique table determines if a node representing the same subfunction already exists. In other words, the chain list for nodes to which the same variable is assigned is linearly searched, and if the node is found, the instance found is used, otherwise, the node is added at the front of the chain list for possible future use. The same method is used in the construction of MDDs and STDDs. As noted in [148], experiments for MDDs have shown that adding new nodes to the front of the chain is most effective due to the local nature of computation in DD construction. The structure shown in Table 6.18 is used in CUDD [205] to create the Unique Table for DDs with two outgoing edges.
6.4. Programming of Decision Diagrams
121
In CUDD, the Unique Table is realized within a structure that is denoted as DdM anager described in Table 6.19. In construction of a decision diagram, a request to perform the same operation over the same subdiagrams may appear many times during the overall construction of the decision diagram. The memory function is used to avoid repeated computation over DDs. It is called the Computed Table, at its rows store the result of a previous computation by retaining the operation performed, edge pointers identifying DDs that represent operands, and a final edge pointer that identifies the resulting DD. The Computer Table is usually realized as a hash table. Before a computation is performed, edge pointers for DDs to be combined are used as initial data to search over the corresponding row of the Computed Table to check if it contains the required computation. If it does, the pointer to the result is returned, if does not, the required computation is performed and the corresponding information is stored in that row of the Computed Table. This information replaces any prior computation stored there. The use of the memory function to avoid repeated computations was suggested in [19] and then used in many other DD packages. In some implementations, as, for example, in [18] for BDDs and [148] for MDDs, the Computed Table approach is inserted into the ITE and CASE or MIN procedures.
6.4.4 Calculations with DDs Calculation with DDs consists of performing some mathematical operations over functions represented by DDs. These are implemented again by ITE and CASE operators with properly specified parameters. For example, to calculate the spectrum of a Kronecker transform with the basic (2 × 2) transform matrix Ki (1) for a function f represented by a BDD, we perform at each node and cross point of the BDD the calculations specified by Ki (1). This can be implemented through a series of ITE operators whose parameters are elements of the corresponding rows of Ki (1) [41]. Extension of this method to MV functions by using CASE is straightforward. For example, consider a basic matrix of a Kronecker transform over GF (3) written in the form of Table 6.17. Assume that a row of this matrix has elements 1, 3, and 2. Then, calculations specified by this row of the transform matrix at a node whose outgoing edges point to the nodes representing subfunctions x, y, and z, can be performed as T R(x, y, z) = qOP (qOP (qAN D(1, x), qAN D(3, y)), qAN D(2, z)), where qAN D denotes multiplication modulo 3.
122
6. Advanced Topics in Decision Trees and Diagrams
struct DdM anager { in size int maxsize DdSubtable ∗subtables
DdSubtable constants unsigned int keys unsigned int dead int ∗perm int ∗invperm
Number of subtables Maximum number of subtables The vector, i.e. the list of pointers to the subtables, each subtable corresponds to a variable in the represented function f Subtable to store constant nodes Total number of nodes in BDD (ADD=MTBDD) Total number of nodes declared as dead Vector for present permutation of variables (index to level) Inverse to the present permutation of variables (index to level) Some other data, relevant for particular implementation and application intended.
} Table 6.19. Realization of Unique Table.
Procedure T ransN ode(v : node){ if v is a non-terminal node { Ci = i-th descending node of v, i = 0, . . . , q − 1, for i = 0, q − 1, Ci1 = T ransN ode(Ci ) for i = 0, q − 1, 1 ) newCi = T Ri (C01 , C11 , . . . , Cq−1 generation of node newv whose descending edges are newCi , i = 0, . . . , q − 1, return newv } else return v } Figure 6.10. Procedure for calculation with DDs.
Notice that the operation qAN D for q = 3 is defined by a table whose rows are 000, 012, and 021. Therefore, it can be implemented by CASE as 2AN D(x, y)
= CASE(x, 0, CASE(y, 0, 1, 2), CASE(y, 0, 2, 1)), = CASE(x, 0, y, CASE(y, 0, 2, 1)).
6.5. Summary
123
Fig. 6.10 shows a bottom-up procedure T ransN ode() proposed in [41] for performing calculations over MDDs consisting of nodes with q outgoing edges. The procedure starts from the root node and descends through the MDD recursively level by level to the constant nodes. Cross points are considered as nodes whose outgoing edges all point to the same node. Each node and the cross point in the MDD for a given function f is transformed into a node in the MDD for the result of the computation over MDD for f through implementing the CASE operator at the node. In the case of the calculation of spectral transforms over MDDs, each node of the MDD for f is transformed into a node of the MDD for the spectrum Sf of f with respect to the considered Kronecker transform. It is clear that this is not a direct correspondence between nodes of MDD for f and MDD for the resulting computations, since cross points can be expanded into nonterminal nodes and conversely, some non-terminal nodes may reduce to cross points. For q = 2, the procedure applies to BDDs and other STDDs consisting of nodes with two edges.
6.5 Summary 1. Decomposition rules in DDs can be interpreted in terms of a spectral transform for discrete functions on finite groups. 2. The recursive structure of DTs relates to the Kronecker and layered Kronecker spectral transforms. 3. DDs with different numbers of outgoing edges of nodes at different levels correspond to domain groups decomposed into the product of subgroups of different orders. 4. DDs are characterized by size, depth, and width as their basic features. For a proper comparison of the efficiency of different DDs, besides these characteristics, the area, percentage of used nodes out of the total number of nodes in the corresponding DTs, and ratio of the number of non-terminal nodes and constant nodes should be used.
7 Optimization of Decision Diagrams
7.1 Decision Diagrams and Order of Variables Is the order of variables important in DDs? In the BDT for a given f , values of constant nodes are the function values for f . As climbing down the tree from the root corresponds to assigning values 0 and 1 to variables x1 , x2 , . . . , xn , the constant nodes are in lexicographic order of variables (x1 , x2 , . . . , xn ) (Fig. 5.2) [183]. Thus, they are elements of the truth-vector F for f . Reduction is possible if there are constant or mutually equal subvectors of orders 2k , k ≤ n/2 in F. Different orderings of variables in f produce different orderings of elements in F and may increase the number of constant or equal subvectors. Thus, permutation of variables in f may produce BDDs for f with different number of nodes. Symmetric functions are an exception since their structure is independent of orderings. Example 63 Consider a four-variable function f (x1 , x2 , x3 , x4 ) given by the truth-vector [259] F = [1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1]T . Fig. 7.1 shows BDT for f for the ordering of variables x1 , x2 , x3 , x4 , Thus, in this BDT the values of constant nodes are f (0000), f (0001), f (0010), f (0011), f (0100), f (0101), f (0110), f (0111),
126
7. Optimization of Decision Diagrams
f S2
_ x1 S2
_ x2
_ x4 1
S2
_ x4 x4 0
1
S2
_ x3
x3 S2
x4
_ x4
0
0
S2
_ x2
x2
S2
_ x3
x1
S2
S2
x4
_ x4
0
1
S2
_ x3
x3
x4
_ x4
1
1
x2
S2
x4
_ x4
0
0
S2
S2
_ x3
x3 _ x4 x4 0
1
S2
x3 _ x4 x4 0
1
S2
x4 1
Figure 7.1. BDT for f in Example 63 for x1 , x2 , x3 , x4 .
f S2
_ x1 S2 x2 S2 _ x x3 3
_ x2
x1 _ x2
S2 x2
_ S2 S2 x3 _ x3 x3 S2 x3 x4 _ x4 0
1
Figure 7.2. BDD for f in Example 63 for x1 , x2 , x3 , x4 .
f (1000), f (1001), f (1010), f (1011), f (1100), f (1101), f (1110), f (1111). Fig. 7.2 shows BDD for f derived by the reduction of this BDT. Fig. 7.3 shows BDT for f for the ordering of variables x3 , x1 , x4 , x2 , where the constant nodes show values f (0000), f (0010), f (1000), f (1010), f (0001), f (0011), f (1001), f (1011), f (0100), f (0110), f (1100), f (1110),
7.1. Decision Diagrams and Order of Variables
f S2
_ x3
_ x2 1
S2
_ x2 x2 0
1
S2
_ x4
x4 S2
x2
_ x2
0
0
S2
_ x1
x1
S2
_ x4
x3
S2
_ x1
x2
_ x2
0
1
S2
x2
_ x2
1
1
x1
S2
_ x4
x4
S2
127
S2
x2
_ x2
0
0
S2
S2
_ x4
x4 _ x2 x2 0
1
S2
x4 _ x2 x2 0
1
S2
x2 1
Figure 7.3. BDT for f in Example 63 for x3 , x1 , x4 , x2 . f S2
_ x3 _ x1
S2
S _ 2 x4 x4 S2
x3 _ x1
x1 S2 _ x4
x4 _ x2
x2 0
S2 x1
S2 x4 _ x4 _ S2 x2 x2 1
Figure 7.4. BDD for f in Example 63 for x3 , x1 , x4 , x2 .
f (0101), f (0111), f (1101), f (1111), and Fig. 7.4 shows the corresponding BDD for f . These BDDs for different ordering of variables have 7 and 8 non-terminal nodes, respectively. Definition 48 In a BDD, a 1-path is a path from the root node up to the constant node representing the logic value 1. The set of all 1-paths in the BDD for a given f corresponds to the set of the implicants in a disjunctive form for f . Each implicant is described by the product of labels at the edges in a 1-path in the BDD for f .
128
7. Optimization of Decision Diagrams
Example 64 By descending the 1-paths in the BDD in Fig. 7.2, we determine that this BDD represents f in the form f = x1 x2 x3 + x1 x2 x4 + x1 x2 x3 x4 + x1 x2 x3 + x1 x2 x3 x4 . BDD in Fig. 7.4 represents f in the form f = x3 x1 x4 x2 + x3 x1 x4 + x3 x1 x4 + x3 x1 x4 x2 + x3 x1 x2 . In this relation, we kept the order of variables in the products that was used in the related BDDs.
7.1.1 Spectral interpretation of variables ordering in BDDs In BDT in Fig. 7.3, the paths from the root node down to the constant nodes are described by minterms which, in the matrix notation, are given by M3142
=
[x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 , x3 x1 x4 x2 ]T .
In the matrix notation, they are generated by performing the following Kronecker product determined by the chosen order of variables:
x3 x3 ⊗ x1 x1 ⊗ x4 x4 ⊗ x2 x2 . The set of thus ordered minterms determines a permutation matrix whose columns are described by elements of M3142 . We denote this matrix as P−1 3142 (4). Thus, ⎡ 1,1 ⎤ S2 S2,1 02 02 02 02 02 02 2 ⎢ 0 02 02 02 S1,2 S2,2 02 02 ⎥ ⎢ 2 ⎥ 2 2 ⎢ S1,2 S2,2 0 02 02 02 02 02 ⎥ 2 ⎢ 2 ⎥ 2 ⎢ ⎥ 02 02 02 S1,2 S2,2 02 02 ⎥ ⎢ 02 −1 2 2 P3142 (4) = ⎢ ⎥, ⎢ 02 02 S1,1 S22,1 02 02 02 02 ⎥ 2 ⎢ ⎥ ⎢ 02 ⎥ 02 02 02 02 02 S1,1 S2,1 2 2 ⎢ ⎥ 2,2 ⎣ 02 02 S1,2 S 0 0 0 0 2 2 2 2 ⎦ 2 2 02 02 02 02 02 02 S1,2 02,2 2 2
0 0 1 0 where the submatrices are defined as 02 = , and S1,1 = , 2 0 0 0 0
0 1 0 0 0 0 , S2,1 , S22,2 = . S1,2 2 = 2 = 0 0 1 0 0 1 Conversely, P−1 3142 determines through its inverse, P3142 , a mapping of the lexicographically ordered set of minterms into the set of minterms ordered
7.1. Decision Diagrams and Order of Variables
129
as in the BDT in Fig. 7.3. If the lexicographically ordered minterms are represented as the vector M1234
=
[x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 , x1 x2 x3 x4 ]T ,
then the vector M3142 of minterms ordered as in the BDT in Fig. 7.3 is determined by M3142 = P3142 M1234 , where P3142 is the inverse of P−1 3142 . determines the values of constant nodes in the BDT for The matrix P−1 3124 f for the ordering of variables x3 , x1 x4 x2 . Thus, if F3142 is the truth-vector of f for the ordering of variables x3 , x1 , x4 , x2 , then F3124 = P−1 3142 F. Remark 12 Optimization of BDDs can be performed by ordering of variables. Permutation of variables in f , corresponds to the permutation of elements in the set of lexicographically ordered minterms, thus, elements in the truth-vector F for f . This permutation can be defined by a permutation matrix P. A suitable permutation of variables in f , equally elements in F, may increase the number of constant or equal subvectors in F, which permits reduction in the corresponding BDT. Remark 13 (Spectral Interpretation) In a BDD with permuted variables, f is assigned to the related BDT through decomposition with respect to the permuted trivial basis. For a given permutation of variables in f , this basis is determined as the composition of mappings defined by the corresponding permutation matrix P and the identical transform I. In this BDT, the values of constant nodes are determined as elements of the vector P−1 F. Thus, they are spectral coefficients in a Fourier series-like expression for f with respect to the used permuted trivial basis. As shown in Examples 63 and 64, different orderings of variables produce different BDDs for f , which represent f in different disjunctive forms. That permits a generalization of BDDs denoted as Free BDDs. Interpretation of the reduction of DDs by ordering of variables in terms of permutation of function values allows us to establish relationships between this method of optimization of DD representations with the theory of linearization of switching functions [114, 117].
130
7. Optimization of Decision Diagrams
7.2 Free BDDs What are free BDDs? In a BDT, each non-terminal node relates to two subtrees. The root nodes of these subtrees are successors of this node. Definition 49 Free BDTs (FBDTs) [12, 78], are a generalization of BDTs obtained by allowing permutation of variables in a subtree independently of its sibling subtree. Free BDDs (FBDDs) are decision diagrams derived by the reduction of the corresponding FBDTs. Example 65 In Fig. 7.1, if we permute variables x2 and x3 in the path corresponding to x1 = 1, we get an FBDT. Fig. 7.5 shows this FBDT. Fig. 7.6 shows the corresponding change in the truth-table for f . The sign ∼ shows that particular variables are permuted. That change produces permutation of elements in the vector of lexicographically ordered minterms M1234 . Fig. 7.7 shows the flow-graph describing that reordering of elements in M1234 to get the set of minterms Mr describing paths in FBDT in Fig. 7.5. In the matrix notation, this reordering in M1234 is represented by the matrix ⎤ ⎡ I2 02 02 02 02 02 02 02 ⎢ 02 I2 02 02 02 02 02 02 ⎥ ⎥ ⎢ ⎢ 02 02 I2 02 02 02 02 02 ⎥ ⎥ ⎢ ⎢ 02 02 02 I2 02 02 02 02 ⎥ ⎥ Pr (4) = ⎢ ⎢ 02 02 02 02 I2 02 02 02 ⎥ , ⎥ ⎢ ⎢ 02 02 02 02 02 02 I2 02 ⎥ ⎥ ⎢ ⎣ 02 02 02 02 02 I2 02 02 ⎦ 02 02 02 02 02 02 02 I2
1 0 0 0 where I2 = and 02 = . Therefore, 0 1 0 0 Mr = Pr (4)M1234 . Fig. 7.8 shows the corresponding FBDD for f . The vector Fr of values of constant nodes in this FBDT are determined by Fr = Pr (4)−1 F.
7.2.1 Spectral transforms for FBDDs As shown in Example 65 for n = 4, we use the matrix P−1 (n) to determine the vector Fr of values of constant nodes in a FBDD for a given f . The matrix Pr (n) is defined by reordering columns of I(n). The inverse matrix T for Pr (n) is defined as the transpose of Pr (n). Thus, P−1 r (n) = Pr (n) is
7.2. Free BDDs
f S2
_ x1
_ x4 1
S2
_ x4 x4 0
1
S2
_ x3
x3 S2
x4
_ x4
0
0
S2
_ x2
x2
S2
_ x3
x1
S2
_ x2
x4
_ x4
0
1
S2
x4
_ x4
1
1
x2
S2
_ x3
x3
S2
131
x3
S2
x4
_ x4
0
1
S2
S2
_ x3 _ x4 x4 0
S2
0
x3 _ x4 x4 0
1
S2
x4 1
Figure 7.5. FBDT for f in Example 65.
determined by reordering rows of I(n) in the same way as columns of I(n) are reordered to get Pr (n). Therefore, in the spectral interpretation of FBDDs, Fr is the spectrum of f with respect to the spectral transform defined by PTr (n). This transform is defined in terms of a set of basic functions determined by the columns in Pr (n). Thus, PTr (n) defines the direct transform, and Pr (n) the inverse transform determining FBDD for f for a given order of variables in the paths from the root node to the constant nodes. In terms of DDs, then, a given f is decomposed in terms of the set of basic functions defined by columns of Pr (n) and assigned to the FBDT. This means that the values of constant nodes in this FBDT are calculated as the spectral coefficients for f with respect to PTr (n). Example 66 For the considered permutation of variables in Example 65, the values of constant nodes in the corresponding FBDD are f (0000), f (0100), f (1000), f (1010),
f (0001), f (0101), f (1001), f (1011),
f (0010), f (0110), f (1100), f (1110),
f (0011), f (0111), f (1101), f (1111).
In Example 65, the truth-vector of f is split into pairs of equal subvectors with four elements Fr = [1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1]T . Fig. 7.8 shows an FBDD for f corresponding to this permutation of variables. This reordering produces an FBDD whose size is smaller that the size of the corresponding BDD. It represents f in the form f = x1 x2 x3 + x1 x2 x4 + x1 x3 x4 + x1 x3 x2 .
132
7. Optimization of Decision Diagrams
Figure 7.6. Truth-table for Fr in Example 65.
Figure 7.7. Flow-graph for Mr and Fr in Example 65.
_ S2 x1
_ x3
_ x2
x2 S2 _ x3
x1 S2
x3 _ x2
x3 S2
x4
_ x4
0
1
S2
x2
Figure 7.8. FBDD for f in Example 66.
Note that in this example Pr = PT . Thus, the same flow-graph can be used to perform permutations in Fr . Example 67 We determine another FBDD for f , if in Fig. 7.5, we permute variables 1. x2 and x4 in the path for x1 = 1, x3 = 0, 2. x3 and x4 in the path for x1 = 0 and x2 = 0.
7.2. Free BDDs
f S2
_ x1
_ x3 1
S2
_ x3 x3 1
0
S2
_ x4
x4 S2
x3
_ x3
0
0
S2
_ x2
x2
S2
_ x4
x1
S2
_ x2
x3
_ x3
0
1
S2
x3
_ x3
1
1
x2
S2
_ x3
x4
S2
133
S2
x3
_ x3
1
0
S2
S2
_ x3
x3 _ x3 x4 0
0
S2
x3 _ x4 x4 0
1
S2
x4 1
Figure 7.9. FBDT for f in Example 67.
Fig. 7.9 shows FBDT derived by these permutations. Fig. 7.10 shows these permutations in the truth-table for f . Fig. 7.11 shows the flow-graph for these permutations. In this example, Mr is determined by the matrix ⎤ ⎡ 1,1 S2 S2,1 02 02 02 02 02 02 2 1,2 2,2 ⎢ S S2 02 02 02 02 02 02 ⎥ ⎥ ⎢ 2 ⎢ 02 02 I2 02 02 02 02 02 ⎥ ⎥ ⎢ ⎢ 02 02 02 I2 02 02 02 02 ⎥ ⎥. Pr (4) = ⎢ ⎢ 02 02 02 02 S1,1 02 S2,1 02 ⎥ 2 2 ⎥ ⎢ 2,2 ⎥ ⎢ 0 02 02 02 S1,2 0 S 0 2 2 ⎥ ⎢ 2 2 2 ⎣ 0 02 02 02 02 I2 02 02 ⎦ 2 02 02 02 02 02 02 02 I2 The values of constant nodes in FBDT in Fig. 7.9 are defined by using the inverse matrix for thus defined Pr (n) to Fr in Example 66. Fig. 7.12 shows the corresponding FBDD for f . Thus, FBDD in Fig. 7.12 represents f in the form f = x1 x2 x4 + x1 x2 x3 + x1 x2 x3 + x1 x3 x2 . Do FBDDs extend the set of bases used in AND-EXOR related DDs? In spectral interpretation, DDs are a graphical representation of the decomposition of f with respect to a basis in the space of switching functions of a given number of variables. Any set of 2n linearly independent binaryvalued functions is a basis in this space. Thus, it can be used to determine a decision tree (DT) for f . In logic design, such bases are denoted as linearly independent bases [134, 135, 136]. In DDs theory, linearly independent
134
7. Optimization of Decision Diagrams
Figure 7.10. Truth-table for Fr in Example 67.
Figure 7.11. Flow-graph for Fr in Example 67.
f S2
_ x1 _ x2
x1
S2
_ x3
x2
S2 x3
S2 S2 S2 S2 _ x4 x2 _ x_ _ x4 x3 x3 2 x2 x2
1
0
Figure 7.12. FBDD for f in Example 67.
bases are introduced in considerations related to quaternary DDs (QDDs) and pseudo-QDDs [193]. Various DTs are defined by choosing particular sets of basis functions in the space of all switching functions of a given number of variables. Constant nodes in the corresponding DTs represent values of the spectrum for f with respect to the basis used. In an alternative interpretation, we first consider the expansion rules assigned to the nodes in the DT. Then the basis used in the DT is determined by the expansion rules used at the nodes.
7.2. Free BDDs
135
In [241], various DDs are split into classes according to the spectral transforms used in the definition of the corresponding DTs. To classify FBDDs with respect to spectral transforms, we should determine the set of basis functions used to decompose f and assign it to the FBDT. Spectral interpretation of FBDDs shows that f is assigned to an FBDD through decomposition by using a matrix derived by permutation of columns in the identity matrix. In each path in the FBDT from the root node to the constant nodes, all the variables in f must appear. In Sasao’s notation of DDs [187], the product of labels at the edges along a path in a FBDT are minterms. Unlike BDTs, in FBDTs the minterms do not appear in lexicographic order. In products describing minterms, the literals for the variables are permuted. Changing the order of literals for variables in a minterm does not change its value. Therefore, f is assigned to an FBDT through decomposition with respect to the identical transform, since the columns in I(n) are described by minterms. Remark 14 In classification with respect to the spectral transforms, BDD and FBDD belong to the same class of DDs. These are both DDs related to the identical transform. In FBDDs, the columns of the identity matrix used to decompose f and assign it to the DT are permuted. Thus, the values of constant nodes are permuted in the corresponding way. Thanks to that, in Fr , the number of constant or equal subvectors of orders 2k , k < n, may be increased. From there, the possibility for node reduction may be increased compared to that in BDD for f . Thus, an FBDD may provide more compact representation for f compared to BDDs and BDDs with optimization by ordering of variables. Fig. 7.13 shows relationships among different bases used in bit-level DDs. We separated the FBDD basis from the pseudo-Kronecker basis, since in FBDDs, the element equal to 1 cannot appear two or more times in the same column of the transform matrix. If BDDs are considered as a trivial example of pseudo-Kronecker DDs, then the FBDD bases may be involved in the pseudo-Kronecker bases, but not the Kronecker bases. What are relationships among FBDDs and other Bit-Level DDs? In the bit-level DDs discussed in Section 7.4, the Shannon (S), the positive Davio (pD), and the negative Davio (nD) nodes are used [187]. A node is determined by the decomposition rule used to assign f to the node. In positive polarity Reed-Muller decision diagrams (PPRMDDs), the pD nodes are used for all the nodes. In Reed-Muller DDs (RMDDs) either the pD or nD nodes are freely chosen for levels in the DD. In pseudo-ReedMuller DDs (pseudo-RMDDs) different nodes at the same level in the DD may be used. As shown in Example 53, the Kronecker DDs and pseudoKronecker DDs are defined in a similar way. In this case, the nodes are freely chosen among the S, pD, and nD nodes.
136
7. Optimization of Decision Diagrams
Figure 7.13. Bases in bit-level DDs.
Permutation of variables in a path irrespective to other paths, makes FBDDs similar to the pseudo-Reed-Muller and pseudo-Kronecker DDs (PKDDs). In these DDs, we change the meaning of a node irrespective of other nodes at the same level in the DD. In FBDDs, a change of a node corresponds to the permutation of variables in a path in the BDD. What are the relationships among BDDs and FBDDs? In spectral interpretation, PPRMDDs are the basic concept determining a class of DDs related to the Reed-Muller transform. The other RMDDs and Pseudo-RMDDs are optimizations of this basic DD in this class. Therefore, they all belong to this class of DDs. The same applies to KDDs and PSDKDDs, which belong to the class of DDs related to the Kronecker transforms. These DDs can be considered as optimizations of BDDs by changing the related spectral transforms. Free BDDs are optimizations of BDDs, similar to the optimization of positive polarity Reed-Muller DDs (PPRMDDs) by pseudo-Reed-Muller DDs. The same similarity applies to FBDDs and optimization of various Kronecker DDs (KDDs) by the corresponding pseudo-KDDs. Remark 15 FBDDs are optimizations of BDDs within the same class of DDs in the classification of DDs with respect to the related spectral transforms. Both FBDDs and BDDs are defined in terms of identical mapping;
7.3. Spectral Interpretation of Optimization of DDs
137
thus, the basis functions are described by minterms. However, the difference is that the minterms are used in different orders. FBDDs are a large family of DDs involving BDDs as a particular example. There are 2n paths in a FBDT for n-variable functions. Each path consists of n edges. Each edge corresponds to a variable in f . Therefore, there are 2n (n!) different FBDDs for a given f . Remark 16 BDTs are FBDTs where the minterms derived by multiplication of labels at the edges are in lexicographic order.
7.3 Spectral Interpretation of Optimization of DDs 7.3.1 Reduction of DDs Thanks to the reduction performed in DTs, DDs are often considerably more compact representations of a function f than DTs. Denote as V the vector of values of constant nodes in a DT. Then isomorphic subtrees in the DT correspond to equal subvectors in V. These subvectors have orders determined by the depth of the related subtrees. Subvectors of the larger orders correspond to the larger subtrees. Thus, more efficient reduction is possible by sharing larger isomorphic subtrees. In spectral interpretation V is the spectrum of f with respect to the spectral transform Q used to assign f to the DT. If Q is the identical transform, V is the truth-vector of f , and DT is the BDT or MTBDT, depending on the range assumed for f .
7.3.2 Optimization of DDs A given function f can be represented by various DDs. By choosing among these possible DDs for f , we can determine a DD for f optimal with respect to some criteria. Depending on intended applications, the criteria for an optimal DDs representation can be chosen from the following: 1. Minimum size, depth or width 2. Simple interconnections, for example, without crossings, as in planar DDs [194] 3. Range of constant nodes, which can be [241] (a) logic values as in bit-level DDs, (b) integers or complex numbers, or elements of some finite fields, as in word-level DDs, (c) vectors, as in [96], (d) matrices, as in [216], [217]
138
7. Optimization of Decision Diagrams
Spectral Transform Identical Reed-Muller
Partial RM Arithmetic Partial Arithmetic Walsh CHT Kronecker Hybrid Haar Linearly Independent Fourier
Decision Diagram Bit-Level DDs Word-Level DDs BDD, FBDD MTBDD, SMTBDD SMTBDD FDD, PPRMDD FPRMDD Pseudo-RMDD EVFDD BMD, ACDD, ∗BMD EVBDD WDD CHTDD, EVCHTDD KDD, Pseudo-KDD KBMD, K∗BMD HDD HSD, HSTDD QDD, Pseudo-QDD, mvFNADD, nvFNADD
Table 7.1. Spectral transforms and DDs.
4. Ratio between the number of non-terminal and constant nodes [216, 217], etc. Optimization of DDs is performed by increasing the possibility for reduction, in other words by increasing the number of constant or equal subvectors in V. That goal can be achieved by 1. Mapping the truth-vector F of f into a spectrum Sf with respect to a spectral transform, such that a greater number of constant or equal subvectors appears in Sf than in F. In this way, various classes of DDs are defined. Each class is related to a spectral transform as shown in Table 6.2. Table 7.1 shows a part of this classification for bit-level and word-level DDs considered in this book. The spectral transform used to assign f to the DT is determined by the decomposition rules used in the nodes of the DT. Thus, we refer to this method of optimization of DD representations as optimization by nodes. 2. For V ∈ {F, Sf }, where Sf is defined with respect to a chosen spectral transform, by reordering elements in V to form constant or equal subvectors in V. That can be performed by (a) Permuting variables in f . Many algorithms are developed for optimization of BDDs in this way. As shown in Example 72, these algorithms can be applied to DDs related to other spectral transforms to produce compact representations. In spectral interpretation, this method of optimization of DDs involves per-
7.3. Spectral Interpretation of Optimization of DDs
139
mutation of basics functions in terms of which the spectral transform used in the DT is defined. Since the permutation of variables is performed over levels in the DT, it corresponds to the optimization by using Kronecker transforms. (b) Reordering values in V as in FBDDs. The same method can be applied to any other DD. This corresponds to the pseudo-Kronecker DDs. Reorderings in V corresponding to the permutation of variables in f are included as particular examples. That is the same as the Kronecker transforms are particular examples of pseudo-Kronecker transforms and the same is with the corresponding DDs. In Sasao’s notation of DDs [187], the labels at the edges are expressed in terms of variables in DDs on Abelian groups. In the case of DDs on non-Abelian groups, these are coordinates in the componentwise representation of indices of elements of the dual object for the domain group for f [216, 217]. In both cases, i.e., for the Abelian and non-Abelian groups, the labels at the edges relate to the inverse transforms of spectral transforms used in the definition of the DTs. The expansion rules at the nodes relate to the direct transforms in the spectral interpretation of the DTs. Therefore, we denote that optimization method as the optimization of DDs by edges. Remark 17 For a given function f , the optimization of DDs representation is performed by nodes or by edges. In both cases, we perform optimization by changing a suitable spectral transform to assign f to the DT. The choice is made over the set of various transforms and their different modifications that are derived by permuting and shifting values of basic functions in terms of which the related spectral transforms are defined. Based on this remark, a particular class of transforms over DDs to get reduced number of nodes is defined by replacing the spectral transform used in the definition of a DT by permutations over the variables or the function values, which results into DDs optimized by ordering of variables and free DDs [75], respectively. Efficient heuristic algorithms for reordering of variables, like the dynamic reordering of variables for optimization of DDs was introduced for BDDs in [76] and further improved in [175]. The same problem was considered and elaborated by many authors in a number of publications; see for example, [40, 146]. The ordering of variables is an NP-hard problem [17]. Moreover, it is NP-hard to compute an almost optimal variable ordering when a given function is already represented by a BDD [203, 202, 276]. Therefore, several heuristic algorithms are proposed for reduction of DDs by ordering of variables with heuristics based on local transformations. For example, this ordering can be implemented as dynamic sifting [175] and further generalized into group sifting [160, 161].
140
7. Optimization of Decision Diagrams
However, there are classes of functions where reordering of variables cannot be used or does not produce considerable reductions, as in the case of symmetric functions. For this reason free BDDs were suggested. An alternative approach are the linearly transformed BDDs [85, 86, 146]. As shown in [117], and in [225] for the particular case of adders, the method relates to the problem of linearization of switching functions [158, 114]. It should be noted that linearly transformed DDs can be defined for any STDD. The relationships between DDs optimized by ordering of variables and LT-DDs are straightforward. LT-DDs are derived by allowing more that a single value 1 per row or columns in permutation matrices for variables used in DDs optimized by reordering of variables. Example 68 Consider a two-variable integer function f (x) = f (x1 , x2 ) given by the vector F = [f (0), f (1), f (2), f (3)]T = [1, 2, 2, 1]T . Permutation of variables converts f into a function fσ = f (y1 , y2 ), where y1 = x2 , y2 = T T x1 , given by the vector Fσ = [f (0), f (2), f (1), f (3)] = [1, 2, 2, 1] . This 0 1 vector is generated from F by a permutation σ = and does not 1 0 reduce the size of the MTBDD for f . However, if we select the permutation
1 1 , which converts f into a function fσ1 = f (z1 , z2 ), matrix σ1 = 0 1 where z1 = x1 ⊕ x2 , and z2 = x2 , then the vector of function values is Fσ1 = [f (0), f (3), f (2), f (1)]T = [1, 1, 2, 2]T . Fig. 7.14 shows MTBDDs of f , fσ , and fσ1 .
f
f
_ S x1 x1 S _ x2 x2 S_ x2 x2 1
2
f
_ S y1 y1 S
_ y2 y2 S_ y2 y2 1
2
S _ z1
1
z1
2
Figure 7.14. MTBDD(f ), MTBDD(fσ ), and MTBDD(fσ1 ).
7.4. Summary
141
7.4 Summary 1. When the domain group G for f is decomposed into subgroups of different orders, an ordering of the subgroups by orders g1 ≤ g2 ≤ . . . ≤ gn produces a DT with the smallest number of nodes. It is supposed that such DTs will result in DDs with fewer nodes. It is hardly possible to expect the converse, since the nodes with large numbers of edges at the lower levels permit reduction of nodes at upper levels, iff there are large equal or constant subvectors in the truth-vector for the represented function f . Example 69 In Fig. 6.1, a DT for G = C2 × C4 has three nonterminal nodes. If we take G = C4 × C2 , the corresponding DT has five non-terminal nodes. Fig. 7.15 shows these BDTs.
f _ x1
f S4
S2 x1
S4 X20
1
X
S2
S4 0
X2 X2 2 X2 3
X2 X 1 2 3 2 X2 X2
0 1
_ x2
X11
3 X12 X1
S2 x2
_ x2
S2 x2
_ x2
S2 x2
_ x2
x2
f0 0 f01 f02 f0 3 f10 f11 f12 f13
f00 f01 f02 f03 f10 f11 f12 f13
G = C2´C4
G = C4´C2
Figure 7.15. BDDs for G = C2 × C4 and G = C4 × C2 .
However, if G is decomposed into subgroups of equal orders, the size of DDs depends considerably on the ordering of subgroups Gi in G. Since each xi in f takes values in the corresponding Gi , this problem is denoted as the optimization of DDs by variable ordering. 2. A given f is assigned to an MTDT through identical mapping. Thus, the values of constant nodes are elements of the vector F representing f . We can get isomorphic parts in the MTDT for f if there are equal subvectors in F. The subvectors where all the elements are equal to a constant in P are included as special cases. In this case, we can perform a reduction of the MTDT for some f into a MTDD for f . 3. Each permutation of variables in f is equivalent to a permutation of elements in the vector F representing values for f . It follows that we can provide the possibility of reduction in the MTDT for f by permuting the variables in f .
142
7. Optimization of Decision Diagrams
This method of DDs optimization by ordering of variables was first applied to BDDs. However, it may be used in any other DD, since it does not depend on the ST used. 4. In DDs optimized by ordering of variables, f is assigned to the DT by the composition of mappings. In MTDTs, we use two mappings, a mapping represented by a permutation matrix P and the identical mapping represented by the identity matrix I. In STDTs optimized by ordering of variables, we use the composition of three mappings, an ST, a permutation, and the identical mapping. Fig. 7.16 shows an assignment of f to (a) MTDT, and (b) STDT with optimization by ordering of variables. In this figure, we are using a subset of n! among the total of 2n ! possible permutation matrices for vectors of orders 2n . These are permutation matrices that correspond to the permutation of variables in f .
Figure 7.16. Assignment of f to (a) MTDT, (b) STDT with optimization by ordering of variables.
5. BDDs can be reduced by reordering of variables in the functions represented. Free BDDs (FBDDs) [12] are a generalization of BDDs derived by extending this method of optimization of BDDs. The generalization is done by extending the set of allowed permutation matrices compared to those used in DD optimizations by ordering of variables. In a BDD, each non-terminal node relates to two subtrees. These are subtrees rooted at the nodes where point the outgoing edges of the considered node. In FBDDs, we are allowed to permute the variables
7.4. Summary
143
in a subtree irrespective of the order of variables in the other subtree related to the same node. 6. Permutations used in MTDTs optimized by ordering of variables and free MTDTs, do not result in the changes in the values of the constant nodes. These values remain the function values, although given in a different order. In the classification of DDs with respect to spectral transforms we refer to the basic mapping used to assign some f to a DT. In this setting, BDDs and FBDDs belong to the same class of DDs. They are both DDs related to the identical transform. 7. The following remark is possible from previous considerations. Remark 18 BDDs optimized by ordering of variables and FBDDs are BDDs where values of f are permuted and then assigned to the corresponding BDT by the identical mapping. 8. This method of optimizing DDs by permuting elements in the vector of values of constant nodes in the corresponding DT may be applied to any DD. This consideration permits definition of free counterparts for any DD on finite dyadic groups through permutation of values of constant nodes in the related DT in a way equal to that used in FBDDs [56, 102]. Extension of the concept of free DDs to other groups is simple. It should be pointed out that finding the FBDD permutations is very difficult, but there are a few good heuristic methods available [24, 26, 87, 146]. 9. The optimization of BDDs by reordering of variables can be described as a particular class of permutations of elements of the vector V representing values of constant nodes. Free DDs and linearly transformed DDs extend the class of allowed permutation matrices. 10. Although developed for BDDs and MTBDDs, this method of optimization can be applied to any STDD.
8 Word-Level Decision Diagrams
8.1 Word-Level DDs The spectral interpretation of DDs extends to word-level DDs. What are word-level DDs? Definition 50 Word-level DDs are DDs in which constant nodes are elements of finite (Galois) fields, integers, or complex numbers. Therefore, they extend DD representation to integer or complex-valued functions. Multi-output switching functions fq−1 ∗ fq−2 ∗ · · · ∗ f0 are represented by their integer-valued equivalents by using the mapping fz =
q−1
2i fi
i=0
and then represented by the word-level DDs. Note that optimization of DD representations of multi-output functions with respect to the number of non-terminal nodes can be achieved by using multi-terminal binary DDs (MTBDDs) and shared MTBDDs (SMTBDDs) [194]. Further optimization can be achieved by pairing of outputs in SMTBDDs [96, 97]. When aspects of generalizations of spectral transforms are compared, word-level DDs are derived by changing GF (2) with C, in the same way as the arithmetic transform is derived from the Reed-Muller transform.
146
8. Word-Level Decision Diagrams
f S
_ x1 _ x2
S
S _ x3
x1
_ x3 x3
x2
_ x2
S
S _ x3 x3
8 -12 10 -6
S x2 S _ x3 x3
x3
20 24 37 45
Figure 8.1. MTBDT for f in Example 70.
Therefore, they are integer counterparts of bit-level DDs or AND-EXOR related DDs. Multi-terminal binary DTs (MTBDTs) [31, 33] are a generalization of BDTs derived by allowing integers, or complex numbers, in constant nodes. Thus, MTBDDs represent functions in C(C2n ). Example 70 Fig. 8.1 shows a multi-terminal binary DT (MTBDT) for f given by the truth-vector F = [8, −12, 10, −6, 20, 24, 37, 45]T .
8.2 Spectral Interpretation of Word-Level DDs Given that we know spectral interpretation of BDDs, the spectral interpretation of MTBDDs is obvious. Remark 19 [243] In spectral interpretation, MTBDTs are defined in terms of the identical mapping in C(C2n ). Thus, they are integer counterparts of BDDs, since are defined with respect to the same mapping over different fields, GF (2) for BDDs and C for MTBDDs. The following concerns extensions of other bit-level DDs into word-level counterparts as well as some modifications and further generalizations of DDs. Example 71 Fig. 8.2 shows binary moment tree (BMT) [20] for f in Example 70. Binary moment diagrams (BMDs) [20] are derived by the reduction of BMTs by using the zero-suppressed BDD rules applied to integers by the
8.2. Spectral Interpretation of Word-Level DDs
147
f A
x1
1 A
A x2
1 A
A x3
1
8 -20
2
1
x2
1 A x3 1 4
A x3 1
12 24 15
x3 0
Figure 8.2. BMT for f in Example 70.
using property that logic AND and multiplication of integers 0 and 1 produce formally the same result and that the logic complement xi can be interpreted as 1 − xi over integers for xi = 0, 1. Arithmetic transform DDs (ACDDs) [243] are defined by using the same decomposition rule, but the reduction is performed by BDD reduction rules applied to integers. For a further discussion of these rules and their application to BMDs, ACDs, and other STDDs, we refer to [243]. Remark 20 [243] In BMDs and ACDDs, a given function f is assigned to the DT by the decomposition in terms of the arithmetic transform. The constant nodes in these DDs represent the arithmetic spectrum for f . BMDs and ACDDs differ in the reduction rules. BMDs use zero-suppressed reduction rules, while ACDDs use generalized BDDs rules. Thus, BMDs and ACDDs are integer counterparts of FDDs. An advantage of the spectral interpretation of DDs is the possibility to define new DDs by the decomposition of f with respect to different spectral transforms. For example, if we replace the arithmetic transform with the Walsh transform [275], we define the Walsh DDs (WDDs) [243]. WDDs are derived from Walsh decision trees (WDTs) by using the generalized BDD reduction rules. In the representation of switching functions by WDDs, advantages are gained by employing properties of the Walsh spectrum of switching functions. For example, if the function values (0,1) are encoded by (1,-1), then the constant nodes in WDDs for n-variable switching functions are even integers in the set {−2n , . . . , 2n }.
148
8. Word-Level Decision Diagrams
f
1
2-2xx3 2-2
f
1-2xx1 1-2 2-2xx3 2-2
1-2xx2 1-2
a
1
(2-2x2)(2-2x3)
x1«x2
1-2xx2 1-2 2-2xx3 2-2
1-2xx3 1-2
_1 4 0 -4 8 a = (1-2x2)(2-2x3)
1-2xx1 1-2 1-2xx3 1-2
Figure 8.3. WDD for f in Example 72.
Example 72 Fig. 8.3 shows WDD for f = x2 ⊕ x1 x3 with different ordering of variables. These WDDs differ in the number of non-terminal nodes. This example points out that the ordering of variables is a very important problem in determination of compact word-level DDs representations of discrete functions. Kronecker binary moment trees (KBMTs) [36, 37] are integer counterparts of KDTs [43]. They are defined by freely choosing decomposition matrices for nodes at each level in the DT from the set
0 1 1 0 1 0 . , A(1) = , A(1) = KI = I(1) = 1 −1 −1 1 0 1 Example 73 Fig. 8.4 shows KBMT for f in Example 70 with A(1) for x1 and x2 and I(1) for x3 . This KBMT is graphical representation of the Fourier series like-expansion of f with respect to the basis ϕ0 ϕ4
= x3 , ϕ1 = x3 , ϕ2 = x2 x3 , ϕ3 = x2 x3 , = x1 x3 , ϕ5 = x1 x3 , ϕ6 = x1 x2 x3 , ϕ7 = x1 x2 x3 ,
where the variables xi take integer values 0 and 1. After reduction this KBMT produces the smallest size KBMD for f . Note that this KBMDT is defined with respect to the same basis as KDT in Example 70, but with a different interpretation of the values of switching variables. Many other DDs can be defined by using different spectral transforms to decompose f and assign it to a DT. Such examples are complex Hadamard transform decision diagrams (CHTDDs) [66] and hybrid decision diagrams (HDDs) [33]. The use of function expansions with respect to arbitrary bases was suggested in [162, 180].
8.3. Haar Transform and Related DDs
149
f pD
x1
1 pD
pD
1
x2
S
S
_ x3
x3
_ x3
8
-12
2
x2
1 S
_ x3 x3 6
S
_ x3
x3
12 36 15
15
x3
Figure 8.4. KBMT for f in Example 73.
8.3 Haar Transform and Related DDs Is it possible to define DDs in terms of non-Kronecker transforms. The answer is yes. Some non-Kronecker transforms have very useful properties that can be exploited in logic design. For example, the Haar transform, which is a layered Kronecker, but not a Kronecker transform, has the property that complexity of the spectrum, expressed in terms of the number of non-zero coefficients of conjunction and disjunction, increases linearly with the number of variables. For the Walsh spectrum of conjunction and disjunctions, the complexity increases exponentially [114]. Further, with some functions, as for example, arithmetic functions, savings of 25% in hardware can be achieved if a given f is represented by Haar series instead of by Boolean expressions [114] (see also [227]). The Haar transform is a local transform, similar to the Reed-Muller and arithmetic transform, in the sense that not all function values are used to calculate all the spectral coefficients, except for the first two coefficients. Due to that, the number of non-zero Haar coefficients can be reduced by the permutation of function values in the truth-vector. A deterministic algorithm for reduction of the Haar spectrum is given in [114].
150
8. Word-Level Decision Diagrams
8.4 Haar Spectral Diagrams Can DDs be defined in terms of the Haar transform? Some attempts in this direction were made in [92], where Haar spectral diagrams (HSDs) were introduced as an edge-valued modification of multiterminal binary DDs (MTBDDs) [32] to represent the Haar spectrum for a given f . HSDs are defined by an analogy to edge-valued binary DDs (EVBDDs) [131] and their relationship to the arithmetic transform [214, 219]. Due to this relationship, an EVBDD represents f in the form of an arithmetic expression for f determined in terms of the arithmetic coefficients assigned to the incoming edge of the root node and the right edges of other nonterminal nodes in the EVBDD for f . The arithmetic transform expansion rule [243] has been adapted to the characteristics of EVBDDs, and used as the expansion rule to assign f to an EVBDD [131]. The inverse rule is used to determine f from a given EVBDD in the form of an arithmetic expression for f . In HSDs, the Haar coefficients are assigned to the incoming edge of the root node and the right outgoing edges in the MTBDDs for f . The assignment of the Haar coefficients to the MTBDDs for f is performed through a correspondence among the Haar coefficients and Haar functions in terms of which they are determined. A coefficient is situated at the edge ending the subpath consisting of edges whose labels are used to describe the corresponding Haar function in terms of binary variables. Example 74 Fig. 8.5 shows an example of the Haar spectral tree (HST) for n = 3. The following relation shows the correspondence among the Haar functions, labels at the edges in the multi-terminal binary decision tree (MTBDT), and the Haar coefficients. f (0) f (1) f (2) f (3) f (4) f (5) f (6) f (7)
har(0, x) = 1 har(1, x) = (1 − 2x1 ) har(2, x) = (1 − 2x2 )x1 har(3, x) = (1 − 2x2 )x1 har(4, x) = (1 − 2x3 )x1 x2 har(5, x) = (1 − 2x3 )x1 x2 har(6, x) = (1 − 2x3 )x1 x2 har(7, x) = (1 − 2x3 )x1 x2
Sf (0) Sf (1) Sf (2) Sf (3) Sf (4) Sf (5) Sf (6) Sf (7)
From this example, a coefficient Sf (w) is situated at the end of a subpath consisting of edges denoted by variables used in symbolic description of the corresponding Haar function har(w, x) with respect to which this Haar coefficient is calculated. Example 75 In HSD for n = 3, Sf (1) is situated at the edge labeled by x1 . Sf (2) is situated at the end of the subpath consisting of the edges labeled
8.4. Haar Spectral Diagrams
151
Figure 8.5. HST for n = 3.
Figure 8.6. HSD for f in Example 76.
by x1 and x2 . In this way, Sf (7) is situated at the path consisting of edges labeled by x1 , x2 , and x3 . In the representation of the Haar functions in terms of switching variables, we keep xi for logic NOT, since we would not like to change the notation which has been already used in discussions of HSD [266]. How-
152
8. Word-Level Decision Diagrams
ever, since we are working with integers or complex numbers, the proper meaning is xi = (1 − xi ), with xi ∈ {0, 1}, where 0 and 1 are the integers 0 and 1. Example 76 [92] Fig. 8.6 shows MTBDD and HSD for the Haar spectrum for the function f = x1 x2 x3 x4 ∨ x1 x3 x5 ∨ x1 x2 x3 x4 x5 ∨ x1 x2 x3 x4 x5 . The truth-vector for f in the (1,-1) encoding is F =
[1, 1, 1, 1, −1, 1, 1, 1, −1, 1, 1, 1, 1, 1, 1, 1, 1, −1, 1, −1, 1, 1, 1, 1, 1, −1, −1, −1, 1, 1, 1, 1]T .
The Haar spectrum for f in the Haar ordering is Sf
=
1 [18, 6, 0, 2, 2, −2, −4, −6, 0, −2, −2, 0, 0, 32 0, 2, 0, 0, 0, −2, 0, −2, 0, 0, 0, 2, 2, 0, 0, 2, 0, 0, 0]T .
Since the structure of the MTBDD for f is not changed, and the constant nodes are preserved, but ignored in HDS, f remains represented by the same MTBDD from which HSD is derived. Remark 21 For a given f , the HSD for the Haar spectrum Sf is the MTBDD for f (MTBDD(f )) with the first Haar coefficient assigned to the incoming edge and other Haar coefficients to the right edges of other non-terminal nodes. That assignment corresponds to the assignment of the arithmetic transform coefficients to the edges in EVBDDs. HSDs are similar, but not the same as STDDs, which were defined earlier. What are the differences? First, no expansion rule is derived to determine the meaning of nodes. In HSDs, the nodes are MTBDD nodes. Therefore, from HSD for f , we can read f as from the MTBDD(f ), and we can read the Haar coefficients as from the MTBDD(Sf ), however, we can not read f in terms of the Haar coefficients. In [92], it was shown that if f is a switching function in coding (1,-1), the values of constant nodes in the MTBDD for f can be determined by the values of spectral coefficients assigned to the edges of nodes corresponding to xn . This is possible, since from the definition of the Haar matrix, the processing of nodes at this level consists of subtraction of the function values at the neighboring points. However, that property cannot be used for integer or complex-valued functions. After these considerations, what are the relationships between MTBDDs and HSDs?
8.4. Haar Spectral Diagrams
153
Alternatively, an HSD(f ) is a modified MTBDD for the Haar spectrum, thus, MTBDD(Sf ). The modification is done by replacing the Haar coefficient at the edges from the constant nodes. This modification permits us to keep the structure of the MTBDD(f ), instead of that of MTBDD(Sf ), which for switching functions is usually simpler. However, the price is that we cannot read f in terms of the Haar coefficients, and that we cannot represent all the spectral coefficients explicitly. As is explained in [92], the zero coefficients assigned to the edges at the lower levels are not explicitly shown. For example, in Fig. 8.6, only 12 of 32 coefficients are shown explicitly, and just a single zero coefficient assigned to the right outgoing edge of the leftmost node corresponding to x2 . The other zero coefficients are not shown. It is assumed that they are assigned to the outgoing edges of the cross points pointing to constant nodes. Thus, this relationship between MTBDDs and HSDs is important since it shows that in dealing with the Haar spectrum no more storage is required than for the original function f if the nodes are counted. It is assumed that we should also store the values of the Haar coefficients. Is that an important remark? For a given incompletely specified function f , HSD does not require more nodes than the BDD(f ). For completely specified functions, HSD is isomorphic to the BDD, since this is a BDD to whose edges the Haar coefficients are assigned. Since these coefficients are integer values, we say MTBDD instead of BDD when we consider HSDs. The assignment of Haar coefficients to the edges is determined from the following correspondence between the rows of the Haar matrix and the corresponding Haar coefficients for f . In determination of this correspondence, it is assumed that the discrete Haar functions are expressed in terms of switching variables, which are used as labels at the edges of MTBDDs. This is an alternative interpretation of the assignment of the Haar coefficients to the edges and it is different from that presented in [92]. However, the HSDs produced are the same, since the interpretation does not interfere with the definition of HSDs. In [92], HDDs are defined with respect to the natural ordering of the Haar matrix. A decomposition of the Haar matrix into a sum of two Kronecker product representable matrices is used. This decomposition was used for the assignment of the Haar coefficients to the edges. A different ordering of the Haar matrix implies different enumeration of the Haar coefficients and different ordering of variables in related DDs. However, in any ordering, the coefficients defined with respect to the same Haar function are assigned to the same edges in the MTBDD(f ). In [55], the relationships between BDDs and Haar spectral coefficients of switching functions are also considered. It should be pointed out that, in this case, BDDs should be denoted as MTBDDs, since to calculate the Haar
154
8. Word-Level Decision Diagrams
spectrum, the logic values should be interpreted as integers. Therefore, we transfer from GF2 (C2n ) to C(C2n ).
8.4.1 HSDs and other DDs What are the relationships between HSDs and other DDs? The answer is in the study of the way the Haar coefficients are assigned to the edges of MTBDDs. An MTBDD for a given f represents f through the disjunctive normal form for f . The product terms are determined as products of labels at the edges. An HSD represents the Haar coefficients for f through the MTBDD for f . Thus, a HSD does not represent a given f in terms of a Haar expression for f . It follows that HSDs, although denoted as spectral diagrams, are not the spectral transform decision diagrams (STDDs) in the sense of the definition of that concept in [243]. Like EVBDDs, HSDs are DDs with attributed edges. In HSDs, the attributes are the Haar coefficients. In EVBDDs, they are the arithmetic transform coefficients [214]. However, an HSD does not use the Haar coefficients to represent f , in the way that EVBDDs represent f in terms of the arithmetic coefficients used as the attributes at the edges. It follows that HSDs are related to EVBDDs, but are not a counterpart of EVBDDs in the sense that the Haar coefficients instead of the arithmetic coefficients are used in EVBDDs. We have shown a formalism to assign Haar coefficients to the edges, expressed through the relations of rows of the transform matrices in terms of switching variables used as labels at the edges in MTBDDs. The formalism used to define HSDs, may be extended to other spectral transforms where rows of the transform matrix are expressed in terms of switching variables. The following example illustrates this statement. Example 77 For n = 3, the following correspondence between the Walsh functions wal(w, x), which are rows of the Walsh transform matrix, switching variables, and Walsh coefficients may be shown: f (0) f (1) f (2) f (3) f (4) f (5) f (6) f (7)
wal(0, x) = 1 wal(1, x) = (1 − 2x3 ) wal(2, x) = (1 − 2x2 ) wal(3, x) = (1 − 2x2 )(1 − 2x3 ) wal(4, x) = (1 − 2x1 ) wal(5, x) = (1 − 2x1 )(1 − 2x3 ) wal(6, x) = (1 − 2x1 )(1 − 2x2 ) wal(7, x) = (1 − 2x1 )(1 − 2x2 )(1 − 2x3 )
Sf (0) Sf (1) Sf (2) Sf (3) Sf (4) Sf (5) Sf (6) Sf (7)
8.4. Haar Spectral Diagrams
155
Due to that, we may define a Walsh spectral tree (WST) for n = 3 corresponding to the HST in Fig. 8.5, with the Walsh coefficients at the same positions where the Haar coefficients are in the HSD. However, since, in this example, we are using the Walsh transform in Kronecker ordering, the variables should be assigned to the levels in the descending order x3 , x2 , x1 .
8.4.2 Haar spectra and HSDs Can we read the Haar coefficients for different orderings of Haar functions from HSDs? In applications, both normalized or non-normalized, the Haar matrices are used with rows ordered in different ways. Some of these orderings were intended to provide Kronecker or Kronecker-like representations of the Haar matrices suitable for their generation or calculations with Haar matrices [92, 114]. In [92], an ordering that allows a particular decomposition of the Haar matrix was used to assign Haar coefficients to the edges in MTBDD(f ). The ordering in Examples 76, and 77 is denoted as the sequency or Haar ordering. However, all the considerations involved may be extended to any other ordering. In representations of the Haar spectrum through DDs, as with MTBDDs and HSD, the following remark may be stated. Remark 22 Assume an HSD showing Haar coefficients for a particular ordering of the Haar matrix. From this HSD, we can read the Haar coefficients for any other ordering by performing a different traversal of the HSD, i.e., by changing the method of visiting labels at the edges in the HSD. We refer the reader to [249] for more details about reading spectral coefficients from DDs for different orderings of spectral transform matrices. In particular, for the Haar coefficients, see [208]. It should be noted that ordering of rows in the Haar matrix should not be confused with the ordering of variables in f , although the rows of the Haar matrix are expressed in terms of switching variables. The change in the ordering of the Haar functions in the Haar matrix changes the order of the Haar coefficients in the Haar spectrum, but does not change their values. However, for a fixed ordering of rows of the Haar matrix, the change of the order of variables in f changes the values of the Haar coefficients. This is a joint property of local wavelets-like transforms. An exact algorithm for determination of the order of variables in f which minimizes the number of non-zero Haar coefficients is given in [114]. This ordering for a given f is denoted as the optimal ordering of variables. In terms of word-level DDs [196] this ordering makes the minimum number of constant nodes.
156
8. Word-Level Decision Diagrams
8.5 Haar Spectral Transform DDs How can we define DDs in terms of Haar functions to agree with the definition of STDDs? We should define the Haar spectral transform DDs (HSTDDs) as DDs which represent f in the form of the Haar series expression for f [248]. For the consistency with the notation in DDs, we will use an ordering of the Haar matrix which is the most compatible with DDs. In this ordering, the Haar functions, rows of the Haar matrix, are described in terms of switching variables, as is shown in Example 76, however, with all the variables in descending order of indices. For example, for n = 3, that descending order of variables implies that the Haar functions corresponding to Sf (5), and Sf (6) are permuted. As in other spectral transform DDs (STDDs) [219, 243], in a HSTDD for f , each path corresponds to a term in the Haar expression for f . Definition 51 The Haar spectral transform decision trees (HSTDTs) are defined as the graphic representation of the Haar expression for f . In an HSTDD for f , each path from the root node to a constant node corresponds to a Haar function har(w, x). The constant nodes show the values of Haar coefficients. Example 78 Fig. 8.7 shows the HSTDT for n = 3 defined by using the non-normalized Haar transform. This HSTDT represents f in the form of the Haar expression for f :
f
=
1 (Sf (0) + Sf (1)(1 − 2x1 ) + 2Sf (2)(1 − 2x2 )x1 8 +2Sf (3)(1 − 2x2 )x1 + 4Sf (4)(1 − 2x3 )x2 x1 +4Sf (5)(1 − 2x3 )x2 x1 + 4Sf (6)(1 − 2x3 )x2 x1 +4Sf (7)(1 − 2x3 )x2 x1 ).
When we have DTs, we define DDs as in the other cases of STDDs. Definition 52 Haar spectral transform decision diagrams (HSTDDs) are derived by the reduction of the corresponding HSTDTs by the generalized BDD reduction rules [243]. Example 79 In the ordering of the Haar matrix used in the definition of HSTDTs, for f in Example 76, the Haar spectrum is given by Sf
=
1 [18, 6, 0, 2, 2, −4, −2, −6, 0, 0, −2, 2, −2, 0, 0, 0, 32 0, 2, 0, 2, −2, 0, 0, 0, −2, 2, 0, 0, 0, 0, 0, 0]T .
8.5. Haar Spectral Transform DDs
W
4(
157
)
W 2(
)
W
Figure 8.7. HSTDT for n = 3.
Fig. 8.8 shows the HSTDD for f in Example 76. This HSTDD represents f in the form of the Haar expression f
=
1 (1 · 18 + 6 · (1 − 2x1 ) + 2 · 2(1 − 2x2 )x1 32 +2 · 4(1 − 2x3 )x2 x1 − 4 · 4(1 − 2x3 )x2 x1 −2 · 4(1 − 2x3 )x2 x1 − 6 · 4(1 − 2x3 )x2 x1 −2 · 8(1 − 2x4 )x3 x2 x1 +2 · 8(1 − 2x4 )x3 x2 x1 −2 · 8(1 − 2x4 )x3 x2 x1 +2 · 16(1 − 2x5 )x4 x3 x2 x1 +2 · 16(1 − 2x5 )x4 x3 x2 x1 −2 · 16(1 − 2x5 )x4 x3 x2 x1 −2 · 16(1 − 2x5 )x4 x3 x2 x1 +2 · 16(1 − 2x5 )x4 x3 x2 x1 ).
We have another class of STDDs. Are they useful for something? Like other DDs, HSTDDs are useful for representing some classes of functions. For example, HSTDDs provide efficient representations of adders. Table 8.1 compares MTBDDs and HSTDDs for adders for n = 2, 3, 4, 5, 6, 7. What are other possible distinguishing properties of HSTDDs? It is interesting to note that most of the exact optimization algorithms for DDs reduce to the brute force search of all possible combinations. There-
158
8. Word-Level Decision Diagrams
W W W W W
Figure 8.8. HSTDD for f in Example 76.
n 2 3 4 5 6 7
ntn 13 41 113 289 705 1665
MTBDD cn s 7 20 15 56 31 144 63 352 127 832 255 1920
w 6 14 30 62 126 254
ntn 4 6 8 10 12 14
HSTDD cn s 4 8 7 13 7 15 11 21 10 22 15 29
w 1 1 1 1 1 1
Table 8.1. MTBDDs and MTBDD-LTAs for adders.
fore, they can be used for functions with a relatively small number of variables. The other algorithms are heuristics algorithms [40]. Unlike them, a deterministic algorithm for the reduction of the number of paths in HSTDDs is proposed [248] by using the method of Karpovsky to reduce the number of Haar coefficients [114]. How can we reduce the number of paths in HSTDDs? In bit-level DDs, the 0-paths and 1-paths are distinguished. The 1-paths correspond to terms in AND-EXOR expressions in the form of which a DD represents f . In word-level DDs, we consider 0-paths and c-paths, where c is an arbitrary integer or complex number.
8.5. Haar Spectral Transform DDs
159
In [114], M.G. Karpovsky presented an algorithm for ordering elements in a vector F representing a function f defined in 2n points, such that the Haar spectrum for f has the minimum number of coefficients. The algorithm is based on the calculation of the total autocorrelation function for f [114]. What are the autocorrelation functions? Roughly speaking, these are functions that express interrelationships among values of a signal and in this way give some information about it. In the case of functions on C(C2n ), we use the following definitions. Definition 53 (Autocorrelation function) For a given n-variable switching function f , the autocorrelation function Bf is defined as Bf (τ ) =
n 2 −1
f (x)f (x ⊕ τ ),
τ ∈ {0, . . . , 2n − 1},
x=0
Definition 54 (Total autocorrelation function) For a system of k switching functions f(i) (x1 , . . . , xn ), i = 0, . . . , k − 1, the total autocorrelation function is defined as the sum of autocorrelation functions of each function in the system. Thus, Bf (τ ) =
k−1
Bf(i) (τ ).
i=0
We point out that the autocorrelation function is invariant to the shift operator ⊕ in terms of which Bf is defined. Due to that, it performs some compression of data in the sense that several functions may have the same autocorrelation function Bf . However, although we are sacrificing a part of the data, this compression makes description of problems where the shift is not important very efficient. For example, the autocorrelation function is very useful in applications where we are interested in the equality of some function values, and not in their magnitude. This is the case in reduction of decision diagrams where the equal function values imply the isomorphic subtrees that can be reduced from the DD. How can we use the autocorrelation functions to reduce the Haar spectrum? In [114], M.G. Karpovsky presented an algorithm for ordering elements in a vector F representing a function f defined in 2n points, such that the Haar spectrum for f has the minimum number of coefficients. The algorithm is based upon the calculation of the total autocorrelation function for f [114].
160
8. Word-Level Decision Diagrams
It assigns a function fσ to f , defined as fσ (σ x) = f (x), where denotes the multiplication modulo 2, and σ is an (n×n) matrix determining the transformation over the binary representation of arguments of f to determine the elements of Fσ representing fσ . Thus, Fσ and F are vectors with equal elements, but in different order, uniquely determined by σ. The algorithm determines σ in such a way that the Haar spectrum for fσ has the minimum number of non-zero coefficients. The algorithm applies to multi-output functions f0 ∗ f1 ∗ · · · ∗ fk−1 represented by the equivalent k−1 integer-valued function fZ (x) = i=0 2n−i−1 fi . The procedure for minimization of the number of Haar coefficients is performed through the following algorithm. K-procedure 1. Assign to a given multi-output function f (0) , . . . , f (k−1) , an integer k−1 equivalent function fZ (x) = i=0 2n−i−1 f(i) (x). 2. Denote by R the range of f (x) assigned to f . For every i ∈ R, construct characteristic functions 1, if f (x) = i, f (i) (x) = 0, otherwise. 3. Calculate the autocorrelation functions Bfi for each fi (x), and the total autocorrelation function Bf = i Bf (i) . 4. Determine the n-tuple of input variables τ = (x1 , . . . , xn ), where Bf takes the maximum value, excepting the value Bf (0). If there are several choices, select any one of them. 5. Determine a matrix σ from the requirement σ τ = (0, . . . , 0, 1)T , where denotes the multiplication over GF (2). 6. Determine a function fσ such that fσ (σ x) = f (x). That means reorder values in a vector F representing values of f by the mapping x = (x1 , . . . , xn ) → xσ , where xσ = σ −1 x. 7. In a vector Fσ representing the values of fσ , perform an encoding of pairs of adjacent values by assigning the same symbol to identical pairs. Denote the resulting function of (n − 1) variables by Qn−1 . 8. Repeat the previous procedure for i = i − 1 to some k until there are identical pairs in Qk .
8.5. Haar Spectral Transform DDs
9. Determine MTBDD for fσk .
161
End of procedure.
Remark 23 The K-procedure produces the maximal number of identical pairs of values or subtrees at the positions pointed by the outgoing edges xi and xi for all i = n, n − 1, . . . , 1. Example 80 [114] Table 8.2 shows a two-output function f0 ∗ f1 of four variables. This function is represented by the integer equivalent function f = 2f0 + f1 . This function has the Haar spectrum with 14 nonzero coefficients. The matrix determined by the algorithm proposed by Karpovsky, ⎡ ⎤ 0 1 1 0 ⎢ 1 0 0 1 ⎥ ⎥ σ=⎢ ⎣ 0 0 1 1 ⎦, 1 1 1 0 defines a reordering of the variables xi , i = 1, 2, 3, 4 in the binary representation for x = (x1 , x2 , x3 , x4 ) through the relation ⎡
Since, σ
−1
1 0 ⎢ 0 1 ⎢ =⎣ 1 1 1 1
F =
0 1 1 0
xσ = σ −1 x. ⎤ 1 1 ⎥ ⎥, the vector 1 ⎦ 1
[f (0), f (1), f (2), f (3), f (4), f (5), f (6), f (7), f (8), f (9), f (10), f (11), f (12), f (13), f (14), f (15)]T ,
is transformed into the vector Fσ
=
[f (0), f (15), f (6), f (9), f (7), f (8), f (1), f (14), f (11), f (4), f (13), f (2), f (12), f (3), f (10), f (5)]T .
The matrix σ defines a function fσmin which has the Haar spectrum with 9 non-zero coefficients, compared to the 14 coefficients in the Haar spectrum for f . Is that useful in practice? It could be useful for some functions. Table 8.3 shows the number of nonzero Haar coefficients in the Haar spectrum for n-bit adders and the Haar spectrum for linearly transformed n-bit adders with linear transformation of variables determined by the K-procedure. The number of coefficients is reduced by about 50%. Table 8.4 compares the number of non-zero coefficients in the Haar spectrum before and after the linear transformation of variables. The savings in the number of non-zero coefficients range from 0.81% to 88.24%. The
162
8. Word-Level Decision Diagrams
x, w 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
f0 ∗ f1 00 10 00 01 10 01 10 11 11 00 01 10 01 10 10 00
f (x) 0 2 0 1 2 1 2 3 3 0 1 2 1 2 2 0
16Sf (w) 22 0 -5 1 1 0 -2 1 -2 3 1 -1 -1 -1 -1 2
fσ (x) 0 0 2 0 3 3 2 2 2 2 2 0 1 1 1 1
16Sfσ 22 2 -8 2 -2 -2 2 0 0 0 0 0 2 2 0 0
Table 8.2. Function with the minimized Haar spectrum.
n 2 3 4 5 6 7
Haar 16 64 256 1024 4096 16384
Haar-LTA 7 29 121 497 2017 8129
% 56.25 54.69 52.74 51.47 50.76 50.39
Table 8.3. Haar coefficients for adders.
average savings for benchmark functions are 49.48% and 12.254% for randomly generated functions. Are there some relationships between the number of paths and the number of nodes in DDs? In many cases, although not always, reduction of the number of paths in a DD, reduces the number of nodes. An opposite example for BDDs is shown in [47]. In HSTDDs adders are such an example, since it is obvious from the vector of Haar coefficients that any permutation of the function values may destroy the constant subvectors. Example 81 The output of a two-bit adder is described by the vector F = [0, 1, 2, 3, 1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6]T .
8.5. Haar Spectral Transform DDs
f 9sym ex1010 misex1 rd53 rd73 rd84 xor5 add2 add3 f1 f6 f7 f8 f9 n1 n2 n3 n4 n5 n6 n7 n8 n9 n10
Haar 211 989 32 32 128 265 17 16 64 161 141 163 234 247 162 169 165 165 156 147 150 150 161 273
Haar-LTA 106 971 28 22 32 64 2 7 29 131 122 133 212 245 136 108 155 152 139 125 127 133 137 242
% 49.77 1.83 12.50 31.25 75.00 75.85 88.24 56.25 54.69 18.64 13.48 18.41 8.41 0.81 1.05 36.10 6.07 7.88 10.90 14.97 15.34 11.34 14.10 11.36
Table 8.4. Number of coefficients in the Haar spectrum and Haar-LTA spectrum.
ntn
cn
13
7
MTBDD s w 0 20 6 1
paths c total 15 16
Table 8.5. Complexity of MTBDD for a two-bit adder.
ntn 4
cn 4
HSTDD s w 0 8 1 0
paths c total 5 5
ntn 6
HSTDD-LTA s w paths 0 c total 4 10 2 4 3 7
cn
Table 8.6. Complexity of HSTD and HSTDD-LTA for a two-bit adder.
163
164
8. Word-Level Decision Diagrams
f 9sym ex1010 misex1 rd53 rd73 rd84 xor5 add2 add3 f1 f6 f7 f8 f9 f10 n1 n2 n3 n4 n5
ntn 111 1023 34 23 52 74 12 4 6 137 135 137 220 250 192 150 155 160 160 152
cn 16 639 17 9 11 16 4 4 7 13 13 10 33 55 26 13 13 15 14 17
s 127 1662 51 32 63 90 16 8 13 150 148 147 253 305 218 163 168 175 174 169
w 26 512 11 9 14 18 3 1 1 47 46 49 93 123 66 52 58 58 56 52
0 189 35 22 0 0 0 4 0 0 72 80 68 22 9 37 70 65 69 68 70
paths c total 197 381 989 1024 18 40 30 30 103 103 201 201 17 21 5 5 7 7 140 212 122 202 137 205 227 249 246 255 208 245 143 213 150 215 156 225 155 223 147 217
Table 8.7. Complexity of HSTDs.
The Haar spectrum for this adder is Sadd2 = [48, −16, −4, −4, −4, −4, −4, −4, −1, −1, −1, −1, −1, −1, −1, −1]T . After the linear transformation of variables, we get the Haar spectrum Sadd2σ = [48, 0, 0, 0, −8, 0, −8, 0, −2, −2, 0, 0, −2, −2, 0, 0]T . Although in this HSTDD the number of non-zero coefficient is reduced from 15 to 7, size(HST DD)(add2 − LT A) > size(HST DD)(add2), since in the Haar spectrum for add2 there is a constant vector of order 4 and a constant vector of order 4. That permits reduction of a subtree with 7 non-terminal nodes and a subtree with three non-terminal nodes. In the linearly transformed spectrum, equal subvectors are of order 2, which permits reduction of a single non-terminal node for each constant or equal subvector. Tables 8.5 and 8.6 show the basic characteristics of MTBDDs and HSTDDs and HSTDD-LTAs for a two-bit adder. It follows that the HSTDD is the simplest among these representations, and that linear transformation for variables increases the complexity, since reordering of the function values destroys sequences of identical values. Figs. 8.9 and 8.10 show HSTDD(add2) and HSTDD(add2 − LT A), respectively.
8.5. Haar Spectral Transform DDs
165
add2 W 1
8(1-2x4)
W 1 4(1-2x3)
W 1
2(1-2x2)
W 1
1-2x1
48
-16
-4
-1
Figure 8.9. HSTDD for a two-bit adder.
add2-LTA W 1
8(1-2x4)
W 1
4(1-2x3)
W
_ x2
1
S x2
2(1-2x2)
W
_ x1
1
S x1
1-2x1
48
0
-8
-2
Figure 8.10. HSTDD for a two-bit adder with linearly transformed variables.
Tables 8.7 and 8.8 show characteristics of HSTDDs and linearly transformed HSTDDs including the number of non-terminal nodes (ntn); constant nodes (cn), whose sum is the size of the HSTDD (s = ntn + cn); and the width (w) of the HSTDDs. Also show are the number of 0-paths, c-paths, and the total number of paths. The K-procedure was used to reduce the number of c-paths and the width of HSTDDs for all the considered functions. For 14 functions, the size is reduced. For 16 functions the number of non-terminal nodes is reduced. For 11 functions the number of constant nodes is reduced. In other functions these parameters remained the same
166
8. Word-Level Decision Diagrams
f 9sym ex1010 misex1 rd53 rd73 rd84 xor5 add2 add3 f1 f6 f7 f8 f9 f10 n1 n2 n3 n4 n5
ntn 89 1019 41 19 20 32 5 6 9 129 134 134 223 241 198 118 118 91 153 155
cn 13 636 17 10 6 8 3 4 5 16 17 14 36 52 26 42 42 13 19 20
s 102 1655 58 29 26 40 8 10 14 135 151 148 259 293 224 160 160 104 172 175
w 25 508 13 7 7 10 1 2 2 41 43 45 97 114 71 55 55 31 55 52
0 85 53 26 8 0 0 4 4 6 76 83 83 40 11 37 18 18 38 76 82
paths c total 87 172 969 1022 18 44 19 27 23 23 44 44 2 6 3 7 4 10 114 190 110 193 120 203 205 245 238 249 210 247 107 125 107 125 77 115 139 215 132 214
Table 8.8. Complexity of HSTDD-LTAs.
or increased as result of the reduced number of c-paths and the width of HSTDDs.
8.6 Summary 1. Word-level DDs are STDDs defined with respect to different spectral transforms on finite groups over the field of rational numbers Q, or, in the general case, complex numbers C. 2. In word-level DDs, values of constant nodes are integers, or, in the general case, complex numbers. 3. MTBDDs are word-level counterpart of BDDs. 4. For each bit-level DD, the corresponding word-level DD can be defined by using the integer counterpart of the related spectral transform, i.e., by interpretation of logic values 0 and 1 for variables and function values, as integers 0 and 1, and then calculating spectral coefficients in Q or C.
9 Spectral Interpretation of Edge-Valued Decision Diagrams
9.1 Edge-Valued Decision Diagrams What are edge-valued DDs? Definition 55 Edge-valued DDs are DDs in which weighting coefficients are assigned to the edges in the DD to achieve compact representations. First, edge-valued binary DDs (EVBDDs) [132, 274] were introduced to improve efficiency of representation of multi-output switching functions for which MTBDDs are of the exponential size. For example, such functions describe outputs of two-variable function generators, n-bit multipliers, etc. In EVBDDs, there is one constant node and its value is set to zero irrespective of the represented function f . Therefore, procedures to assign f to the DTs, and to determine f from the DT are related to the edges and weighting coefficients at the edges, not to the nodes. Such DDs belong to the class of DDs with attributed edges. As shown in Table 9.1, there are DDs with additive weights, multiplicative weights, and both additive and multiplicative weights. This table shows DDs for switching functions that are discussed below. In a group theoretic approach, these DDs are DDs on dyadic groups. Thus, they consist of nodes with two outgoing edges. Spectral interpretation relates them to some spectral transforms and partial spectral transforms for functions on dyadic groups into the complex field C. Spectral interpretation of edge-valued DDs is based on their partial spectral transforms. We will explain with an example for n = 3.
168
9. Spectral Interpretation of Edge-Valued Decision Diagrams
Weights Additive Multiplicative Additive and Multiplicative
Decision Diagrams EVBDD, FEVBDD ∗BMDs, ∗PHDDs FEVBDDs, K∗BMDs
Table 9.1. Edge-valued DDs for switching functions.
f000 x1
f100-f000
x2
x2
f110-f100
f010-f000
x3
f111-f110
0
x3
f101-f100
0
0
x3
x3
f001-f000
f011-f010
0
0
0
0
0
Figure 9.1. EVBDT for f of n = 3 variables and the partial arithmetic transforms coefficients.
In EVBDDs, a non-terminal node represents the function f = xi (vi + fl ) + (1 − xi )fr , where fl , fr denote the left and right outgoing edge of a node in EVBDTs, respectively, and vi is the weight associated to the left edge. The weight associated to fr is always equal zero, since that provides EVBDDs for a fixed order of variables are canonic representations for f . The decomposition function in EVBDDs can be written as f = xi vi + f0 + xi (f1 − f0 ), to point out the similarity to the arithmetic transform. Therefore, the nodes in EVBDDs are integer counterparts of the positive Davio nodes. Fig. 9.1 shows edge-valued binary decision tree (EVBDT) for functions f of n = 3 variables. The left and right outgoing edges correspond to f1 , and f0 , respectively. It follows that all the calculations in EVBDDs are done from the right to the left. The following remark can be derived by inspection of the weighting coefficients in EVBDDs and a comparison with partial arithmetic transform coefficients [214].
9.1. Edge-Valued Decision Diagrams
169
f000 pD
1
x3
pD
x2
1 pD
1 Sf(0)
S
_ x1 x1 Sf(1)
Sf(2)
S
_ x2
x2 S
S
_ x1 x1 Sf(3)
Sf(4)
x1 Sf(5)
_ x1 Sf(6)
x1 Sf(7)
Figure 9.2. Pseudo-Kronecker DT corresponding to EVBDT for n = 3.
Remark 24 [214] In EVBDDs, the weights at the edges at the i-th level are equal to some partial arithmetic transform coefficients with respect to the i-th variable. Example 82 The weights at the edges in EVBDT in Fig. 9.1 are equal to S1f (4), S2f (2), S2f (6), S3f (1), S3f (5), and S3f (7). From the decomposition rules, it follows that the EVBDT in Fig. 9.1 represents f in the form f
= f000 + x1 (f100 − f000 ) + x2 (f010 − f000 ) + x3 (f001 − f000 ) +x2 x3 (f011 − f010 − f001 + f000 ) +x1 (x2 (f110 − f100 ) + x3 (f101 − f100 ) +x2 x3 (f111 − f110 − f101 + f100 ) −x2 (f010 − f000 ) − x3 (f001 − f000 ) − x2 x3 (f011 − f010 − f001 + f000 )). This relation after the reordering is the arithmetic polynomial for f .
Remark 25 [214] EVBDDs represents f in the form of the algebraic polynomials.
9.1.1 EVBDDs and Kronecker decision diagrams The reading rule that should be used to determine the function f represented by a given EVBDD is expressed by the algebraic function xi (vi + f1 ) + (1 − xi )f0 , which can be written formally as xi (vi + fl ) + xi fr , where x denotes the logical complement of x, since x takes two integer values 0 and 1, just as a switching variable takes two logic values 0 and 1.
170
9. Spectral Interpretation of Edge-Valued Decision Diagrams
It follows, through a repeated application of this reading rule to the nodes of the tree in Fig. 9.1, that this tree represents the function f
= f000 + x1 (f100 − f000 + x2 (f110 − f100 + x3 (f111 − f110 + 0) + x3 · 0) +x2 (x3 (f101 − f100 + 0) + x3 · 0)) +x1 (x2 (f010 − f000 + x3 (f011 − f010 + 0) + x3 · 0) +x2 (x3 (f001 − f000 + 0) + x3 )) = f000 + x1 (f100 − f000 ) + x1 x2 (f010 − f000 )
(9.1)
+x1 x2 (f110 − f100 ) x1 x2 x3 (f001 − f000 ) + x1 x2 x3 (f101 − f100 ) +x1 x2 x3 (f011 − f010 ) + x1 x2 x3 (f111 − f110 ). This expression can be understood as the expansion of f relative to the basic functions ϕ0 = 1, ϕ1 = x1 , ϕ2 = x1 x2 , ϕ3 = x1 x2 , ϕ4 = x1 x2 x3 , ϕ5 = x1 x2 x3 , ϕ6 = x1 x2 x3 , ϕ7 = x1 x2 x3 , which can be represented by columns of a matrix Q given by ⎡ ⎤ 1 0 0 0 0 0 0 0 ⎢ 1 0 0 0 1 0 0 0 ⎥ ⎢ ⎥ ⎢ 1 0 1 0 0 0 0 0 ⎥ ⎢ ⎥ ⎢ 1 0 1 0 0 0 1 0 ⎥ ⎢ ⎥. Q=⎢ ⎥ ⎢ 1 1 0 0 0 0 0 0 ⎥ ⎢ 1 1 0 0 0 1 0 0 ⎥ ⎥ ⎢ ⎣ 1 1 0 1 0 0 0 0 ⎦ 1 1 0 1 0 0 0 1 The matrix Q−1 inverse of Q, given by ⎡ 1 0 0 0 0 ⎢ −1 0 0 0 1 ⎢ ⎢ −1 0 1 0 0 ⎢ ⎢ 0 0 0 0 −1 Q−1 = ⎢ ⎢ −1 1 0 0 0 ⎢ ⎢ 0 0 0 0 −1 ⎢ ⎣ 0 0 −1 1 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 −1
0 0 0 0 0 0 0 1
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
is the transform matrix that can be used to determine the coefficients in (9.1). The tree shown in Fig. 9.2 is the graphical representation of this expansion. The constant nodes contain spectral coefficients Sf of f defined by Sf = Q−1 F. It is obvious that this tree is a particular pseudo-Kronecker tree. Therefore, the EVBDDs are nothing but the pseudo-Kronecker DDs with respect to a particular basis, related to the partial algebraic transforms.
9.1. Edge-Valued Decision Diagrams
171
f f000, f001 -f000 f100 -f000 , f101 -f100 f001 -f000 f001 -f000
x1
x2
f110 -f100 , f111 -f110 f101 -f100 f101 -f100
pD
(1,0)
pD f010 -f000 , f011 -f010 f001 -f000 f001 -f000
pD
x3
pD
pD
pD (1,0)
(1,0)
pD (1,0)
Figure 9.3. FEVBDT for n = 3.
9.1.2 FEVBDDs In a DT, the greatest number of non-terminal nodes is at the level just before the constant nodes. In an EVBDD, the constant nodes are set to zero and, therefore, it is worthwile to normalize to 1 the additive weights at the outgoing edges of nodes at this level toward the constant nodes. The possibility of reducing a node at this level is thereby increased. The corresponding multiplicative weights are introduced to take into account the impact of the normalization of the additive weights. In this way, the factored edge-valued binary DDs (FEVBDDs) [274] are introduced. In FEVBDDs, the non-terminal nodes represent the function f = xi (vi + f actori f1 ) + (1 − xi )f0 , where f actori is the multiplicative weight at the edge corresponding to fl . FEVBDD for n = 3 (shown in Fig. 9.3) represents f in the form f100 − f000 f = f000 + (f001 − f000 ) x1 f001 − f000 f010 − f000 f010 − f000 + x2 x3 − x3 + x3 + x2 f001 − f000 f001 − f000 f101 − f100 f110 − f100 f111 − f110 + x1 x3 − x3 x2 + x3 + x2 f001 − f000 f101 − f100 f101 − f100 f010 − f000 f010 − f000 − x2 x3 − x3 + x3 + x2 . f001 − f000 f001 − f000 Remark 26 ACDDs=BMDs, EVBDDs and FEVBDDs are related through decomposition of f with respect to the arithmetic transform. In BMDs, the
172
9. Spectral Interpretation of Edge-Valued Decision Diagrams
coefficients in the decomposition are expressed at the constant nodes. In EVBDDs, they are transferred at the edges. In FEVBDDs, they are moved further to the edges at the upper levels in the DD. Remark 27 [44] FEVBDDs are EVBDDs with normalized weights in the edges towards the constant nodes. For these edges the additive weights are taken as 1 and multiplicative weights as 0. Remark 28 In FEVBDDs, the weights are derived as combinations of partial arithmetic coefficients.
9.1.3
∗BMDs
∗BMDs [20] are edge-valued version of BMDs. The difference with EVBDDs is in the order of the decompositions applied in definition of these DDs. The decomposition used in ∗BMDs is the modification of that used in BMDs and is given by f = wi (f0 + xi (f1 − f0 )), where wi are the weighting coefficients. The number of factors allowed in the factorization of the arithmetic transform coefficients is equal to or less than the number of levels in the DT, i.e., to the number of variables in f . Example 83 Fig. 9.4 shows ∗BMD for f in Example 70. The arithmetic spectrum for f is given by Af = [8, −20, 2, 4, 12, 24, 15, 0]T . These values can be factored as 2 · 2 · 2, 2 · 2 · (−5), 2 · 1 · 1, 2 · 1 · 2, 3 · 4 · 1, 3 · 4 · 2, 3 · 1 · 5, 3 · 1 · 0, To produce an ∗BMD for f the first and second factors are moved to the first and the second level in the BMD. The third factors are kept as the values of constant nodes. Remark 29 In ∗BMDs, weights at the edges are factors in the arithmetic transform coefficients. They can be determined during the calculation of the arithmetic transform over BDD for f , step by step by using the FFT-like algorithm adapted for implementation over BDDs.
9.1.4 Arithmetic transform related DDs Spectral interpretation shows that the arithmetic transform is used in several DDs to decompose f and assign it to a DT. Therefore the following theorem can be stated. Theorem 5 ACDDs, BMDs, EVBDDs, FEVBDDs, and ∗BMDs represent f in the form of the arithmetic expression for f . These DDs can be regarded as arithmetic transform related DDs. They represent an integer counterpart of the Reed-Muller related DDs, that are a subset of AND-EXOR related DDs.
9.1. Edge-Valued Decision Diagrams
f A
1 1 2
A
x2
1 2
1 4
1
A
A x3
-5
1 1
x1
3
2
A
x2 1
A x3 1
2
1
173
A x3 1 2
5
x3 0
Figure 9.4. ∗BMT for f in Example 70.
9.1.5 K∗BMDs Kronecker ∗BMDs (K∗BMDs) [36] are derived by replacing the role of arithmetic transform in ∗BMDs by the Kronecker transforms [44]. Therefore, the number of different DTs for a given f is increased, and thus the likelihood of finding a more compact representation for f . In a K∗BMD, a Kronecker spectrum is determined for f . Then the spectral coefficients are factored and some factors assigned to the edges as in ∗BMDs [44]. Example 84 Fig. 9.5 shows K∗BMT for f in Example 70. As in EVBDDs, in K∗BMDs, the constant nodes can be set to zero and both additive and multiplicative weights introduced [38]. Furthermore, as in FEVBDDs, the the weights can be normalized to get K∗BMDs with integervalued weights [39]. However, unlike FEVBDDs, in thus defined K∗BMDs, not all the additive weights at the edges toward the constant nodes are 1. These weights at the nodes corresponding to integer counterparts of the negative Davio nodes are equal to -1.
9.1.6 Generalizations of edge-valued DDs Many other edge-valued DDs can be introduced by using different partial spectral transforms. Edge-valued complex Hadamard transform DDs (EVCHTDDs) were introduced in [66]. The same can be repeated to derive edge-valued versions of any HDD. The sufficient condition for the existence of an edge-valued counterpart for a given decision diagram is that the related spectral transform is Kronecker product representable, which assures the existence of an FFT-like algorithm and that the weighting coefficients
174
9. Spectral Interpretation of Edge-Valued Decision Diagrams
pD
pD
pD
Figure 9.5. K∗BMT for f in Example 9.5.
that should be assigned to the edges can be determined as factors in the steps of FFT-like algorithm [44, 215]. Recently, the multiplicative power hybrid decision diagrams (∗PHDDs) has been introduced to represent arithmetic circuits efficiently. These DDs can be used to represent integers and floating point numbers, as a combination of subtrees for the mantissa and the exponent. With respect to the classification of DDs through the group theoretic approach and spectral interpretation of DDs [241], ∗PHDDs are an edge-valued counterpart of word-level Kronecker DDs, since they use three expansion rules, with multiplicative weights restricted to powers of a constant c, in practice chosen as 2. They can be viewed as a generalization of ∗BMDs, by allowing the integer Shannon and the integer negative Davio decomposition rules, besides the integer positive Davio rule. Further, to reduce the number of non-terminal nodes, negative edges are used as in BDDs and KDDs, which increases the possibility of sharing subtrees, since subtrees representing a subfunction f and −f , can be shared. Recall that in BDDs, −f is viewed as logic complement f . However, values of multiplicative weights are restricted to powers of 2. This restriction is natural for the intended applications and proves useful in the representation of arithmetic circuits, since in the vectors representing integer-equivalent functions for these circuits there are many elements with common factors of this form. In [215], extensions to edge-valued decision diagrams for multiple-valued functions [213, 218] are given with respect to Reed-Muller and Reed-MullerFourier transforms for multiple-valued functions. In all so-defined DTs, the normalization of weights at the edges toward constant nodes can be performed to derive the factored versions of the corresponding edge-valued DDs as with FEVBDDs and K∗BMDs.
9.2. Relationships Between Edge-Valued DDs and Other DDs
175
In applications to switching functions, the disadvantage of EVBDDs is that integer-valued weights are required although the represented functions take two logic values. Partial spectral transforms over GF (2) can be used to define edge-valued versions of bit-level DDs. That overcomes the above- mentioned disadvantage. For example, the edge-valued functional DDs (EVFDDs) [234] are defined by using the partial Reed-Muller transforms. In these DDs, the weighting coefficients are logic values 0 and 1. The depth of a DD is defined as the number of levels. In all the abovediscussed DDs, the depth is equal to the number of variables in f . In the group theoretic approach, each level corresponds to a subgroup C2 in C2n . Therefore, these DDs which consists of nodes with two outgoing edges do not permit reduction of the depth of the DDs. The use of nodes with four outgoing edges, i.e., subgroups of order 4 in the decomposition of G, is proposed in [193]. The method is generalized in [216, 217] by allowing the use of non-Abelian subgroups in G. An alternative method for depth reduction is suggested in [149].
9.2 Relationships Between Edge-Valued DDs and Other DDs Word-level DDs are introduced as integer counterparts of bit-level DDs by allowing integers or in general complex-numbers as values of constant nodes. The simplest examples are multi-terminal DDs (MTBDDs) [32], which were introduced also as arithmetic decision diagrams (ADDs) [8]. These diagrams correspond to BDDs, with switching variables used as labels at the edges interpreted as integer-valued variables taking the integer values 0 and 1 instead of logic values 0 and 1. Further examples are binary moment diagrams (BMDs) [20] and arithmetic spectral transform DDs (ACDDs) [243], corresponding to PPRMs [187]. Both these diagrams, therefore, relate to the arithmetic transform [214]. The difference between BMDs and ACDDs is in the reduction rules used [243]. Relationships between and ACTDDs and EVBDDs are considered in [239]. Considerable work has been done in the application of these DDs to representation of arithmetic circuits, in particular, adders, multipliers, and divisors [27], [28], [30], [90], [119]. For the same purposes and for testing of logic circuits, integer counterparts of Kronecker DDs and their edge-valued versions have proposed [36, 38, 39]. In spectral interpretation, word-level DDs are STDD(Q), where Q is a transform matrix over the field of rational numbers Q or the complexnumber C. An interesting class of word-level DDs is related to the Haar transform. Haar spectral diagrams (HSD) [92] have been introduced to represent Haar coefficients efficiently in terms of space and time. They
176
9. Spectral Interpretation of Edge-Valued Decision Diagrams
are derived by assigning the Haar coefficients for a given function f to the corresponding edges in the multi-terminal binary decision diagrams (MTBDDs) [32]. HSDs are defined by an analogy to the edge-valued binary DDs (EVBDDs) [131] and their relationship to the arithmetic transform [214, 219]. Due to this relationship, an EVBDD represents f in the form of an arithmetic expression for f determined in terms of the arithmetic coefficients assigned to the incoming edge of the root node and the right edges of other non-terminal nodes in the EVBDD for f . The arithmetic transform expansion rule [243] has been adapted to the characteristics of EVBDDs, and used as the expansion rule to assign f to an EVBDD [131]. The inverse rule is used to determine f from a given EVBDD in the form of an arithmetic expression for f . In HSDs, the Haar coefficients are assigned to the incoming edge of the root node and the right outgoing edges in the MTBDDs for f . The assignment of the Haar coefficients to the MTBDDs for f is performed through a correspondence among the Haar coefficients and Haar functions in terms of which they are determined. A coefficient is situated at the edge ending the subpath consisting of edges whose labels are used to describe the corresponding Haar function in terms of binary variables. However, no expansion rule is derived to determine the meaning of nodes. In HSDs, the nodes are MTBDD nodes. Therefore, from HSD for f , we can read f as from the MTBDD(f ), and we can read the Haar coefficients as from the MTBDD(Sf ), where Sf is the Haar spectrum; however, we cannot read f in terms of the Haar coefficients. In [92], it was shown that if f is a switching function in coding (1,-1), the values of constant nodes in the MTBDD for f can be determined by the values of spectral coefficients assigned to the edges of nodes corresponding to xn . This is possible, since from the definition of the Haar matrix, the processing of nodes at this level consists of subtraction of the function values at the neighboring points. However, that property cannot be used for integer- or complex-valued functions. Haar spectral transform decision diagrams (HSTDDs) [248] exploit spectral properties of the Haar wavelet transform for a compact representation of both a given function and its Haar spectrum (refer to the discussions in [147, 243]). Extensions to multiple-valued functions are given in [250]. In [114], a deterministic algorithm is presented which for a given f determine the Haar spectrum with the minimum number of non-zero coefficients. The algorithm performs reordering of elements in the vector of function values for f . In this respect, the algorithm relates to the algorithms for optimization of DDs by variables ordering, input groupings, and output pairing [40]. It was shown in [248] that the algorithm of Karpovsky can be used to minimize the number of paths in the HSTDD for a given f . The impact of the minimized number of Haar coefficients on the reduction of the size
9.2. Relationships Between Edge-Valued DDs and Other DDs
177
of HSTDDs was also considered. It was shown that the same transform for variables can be used in the reduction of MTBDDs. The study of HSDs and HSTDDs can improve applicability of earlier and recent spectral methods using the Haar transform and can be useful in both theory and applications of its various generalizations [5, 210, 227, 253, 290]. Further generalizations of word-level DDs are matrix-valued DDs [221] defined by allowing matrices as values of constant nodes. These DDs vere used for decomposition of switching functions [221].
9.2.1 Edge-valued STDT(Q)s Various DTs with attributed edges are a different notation for some particular STDT(Q)s [219]. If the values of constant nodes are set to zero and the information they are providing is converted into some weight coefficients assigned to the edges, then such DTs are denoted as edge-valued DTs. In DTs with attributed edges, some weighting coefficients are introduced as a part of labels at the edges. These coefficients can be determined by performing steps of FFT for ST used in definition of the STDT(Q) to which corresponds the considered DT with attributed edges. If all the steps of FFT are performed over f , then edge-valued DTs with additive weighting coefficients are derived. The coefficients for edges at the i-th level are taken as some values calculated in the application of the i-th step of FFT for the corresponding ST. The first introduced and probably most widely known example are edge-valued binary DTs (EVBDTs), [132, 274]. They are derived by the application of the arithmetic transform [214]. Thus, EVBDTs are the edge-valued version of arithmetic transform DTs (ACDTs) [243]. In [234], the edge-valued functional DDs (EVFDDs) are introduced in terms of the partial Reed-Muller transform. Therefore, in EVFDDs, the coefficients assigned to the edges are logic values. Generalizations to multiple-valued functions are defined in [215, 235] with respect to both Galois field transforms and the Reed-Muller-Fourier transform. If the steps of FFT for ST used in definition of the DT are performed recursively to f , then the DTs with multiplicative weighting coefficients are derived. After the calculations in the i-th step are performed, the common factors in the resulting values are taken as the weighting coefficients at the edges for the i-th level in the DT. Therefore, the weighting coefficients in DTs with multiplicative coefficients are the common factors in the values of constant nodes of the corresponding STDT(Q). ∗BMD [20] are an example of DTs with multiplcative coefficients. They are derived from BMDs [20], and thus, they are related to the arithmetic transform [44]. Therefore, in ∗BMDs, coefficients at the edges are determined by using steps of an FFT-like algorithm for the arithmetic transform. Multiplicative power hybrid DDs ∗PHDDs [28] are a generalization of ∗BMDs, introduced by allowing the integer Shannon, and integer negative Davio expansion rules. In
178
9. Spectral Interpretation of Edge-Valued Decision Diagrams
ST
Sf(x1)
ST
Sf(x2)
F
EVBDT
F
ST
ST
BMT
Figure 9.6. Assignment of f to (a) STDT with additive coefficients at edges, and (b) STDT with mltiplicative coefficients at edges.
∗PHDDs, the negative edges are used to make it possibile to shareg subtrees representing subfunctions f and −f . Factored EVBDTs [274] and K∗BMD [36] are examples of edge-valued DTs with both additive and multiplicative weighting coefficients at the edges. Fig. 9.6 shows the assignment of f to STDTs with attributed edges. Fig. 9.7 shows a classification of STDTs with attributed edges with respect to the weighting coefficients. A similar classification of other DDs considered in this paper is given in [241].
9.3 Summary 1. Bit-level DDs are graphical representations of AND-EXOR expressions.
9.3. Summary
179
Figure 9.7. Classification of STDTs with attributed edges.
2. BDDs are defined with respect to the identical transform. The positive polarity Reed-Muller, fixed polarity Reed-Muller, and pseudoReed-Muller DDs are related to the Reed-Muller transform. 3. Generalizations such as KDDs and pseudo-KDDs are defined through combinations of the basic functions for identical and Reed-Muller transforms. 4. These DDs are optimization of BDDs obtained by changing expansion rules at the nodes. Thus, this is optimization of BDDs by nodes. 5. FBDDs are another way of optimizing BDDs. It is a generalization of the optimization of BDDs by ordering of variables. In Sasao’s notation of BDDs, variables are labels at the edges. Thus, optimization of BDDs by variables ordering and FBDDs as its generalizations are optimization by edges. 6. World-level DDs are determined as integer counterparts of some bitlevel DDs. 7. Several word-level DDs are related to the arithmetic transform in the same way as the corresponding bit-level DDs are related to the Reed-Muller transform.
180
9. Spectral Interpretation of Edge-Valued Decision Diagrams
8. Edge-valued DDs are related to the partial spectral transforms. They were first defined for word-level DDs. Their spectral interpretation permitted to define edge-valued version of bit-level DDs. 9. Generalizations such as ∗BMDs and K∗BMDs are defined by the factorization of the values of constant nodes. Further manipulations with these factors are performed to achieve the optimization of DD representations for a given function f . Manipulations consist of setting the constant nodes in the resulting DDs to zero as well as normalization of the weights at the edges toward the constant nodes.
10 Spectral Interpretation of Ternary Decision Diagrams
10.1 Ternary Decision Diagrams What are TDDs? Ternary decision trees (TDTs) are a generalization of binary decision trees (BDTs) [109], [190]. The outgoing edges of a node at the i-th level in a TDT (Fig. 10.1) point to the subfunctions f0 = f (xi = 0), f1 = f (xi = 1) and f2 = f0 ∗ f1 . Definition 56 The symbol ∗ denotes any of the four operations, the AND, the OR, the EXOR, or the Alignment shown in Table 10.1. Different assignments of the operation to ∗ produce different TDTs: 1. When ∗ is the AND, we have AND-TDTs. 2. When ∗ is the OR, we have OR-TDTs. 3. When ∗ is the EXOR, we have EXOR-TDTs. 4. When ∗ is the Alignment operation , we have Kleene-TDTs. The constant nodes in a TDT represent a 3n -element vector Fe . In the case of an EXOR-TDTs, Fe is the extended truth-vector [197, 189]. Since we consider a uniform interpretation of different TDTs, we will use the same terminology for other TDTs. For a given f , Fe is derived by using a recursive FFT-like algorithm. The detailed discussion of this algorithm for EXOR-TDTs is given in [197]. In this algorithm, the AND and the
182
10. Spectral Interpretation of Ternary Decision Diagrams
0 1 u
0 0 u u
1 u 1 u
u u u u
Table 10.1. Alignment x y.
f S3 0
f0
1
f1
2
f0 * f1
Figure 10.1. Node in TDDs.
EXOR operations are used. The function fe defined by Fe is, in general, a three-valued function. The concept of the extended truth-vector as well as the way of calculating it in terms of the corresponding operations extend to the vector of values in constant nodes of other TDDs. Since we consider a uniform spectral interpretation of different DDs, we consider the extended truth-vector as a spectrum of f with respect to a purposely defined spectral transform denoted as the Extended Reed-Muller (ERM) transform. Therefore, the extended truth-vectors Fe for AND, OR, EXOR, and Kleene-TDDs are also called the AND, OR, EXOR, and Kleene spectrum, respectively. Example 85 Fig. 10.2 shows the AN D, the OR, the EXOR and the Kleene-TDTs for f (x1 , x2 , x3 ) = x1 x2 ∨ x2 x3 considered in Example 46. Definition 57 Ternary decision diagrams (TDDs) are derived from the corresponding TDTs by a reduction similar to that used for BDDs [196], i.e., by sharing isomorphic subtrees and deleting the redundant information from the TDT.
10.2 Spectral Transform for TDDs Does the spectral interpretation of DDs extend to TDDs? In the spectral interpretation of TDDs, we use the following definitions [240].
10.2. Spectral Transform for TDDs
∧ 0 1 e
0 0 0 0
1 0 1 1
183
e 0 1 e
Table 10.2. AND as addition.
· 0 1 e
0 0 0 e
1 0 1 e
e e e e
Table 10.3. AND as multiplication.
Let B = {0, 1} and T = {B ∪ u}, where u is the value showing an unknown input in a switching function f . Lemma 1 In B, ⊕, · , for any z ∈ B, z · 0 = 0, and z ⊕ 0 = z, where ⊕ denotes the EXOR, and “·” denotes the AND. Definition 58 We formally extend B, ⊕, · to T ∪ {e}, ∗, · , where for any z ∈ T , z · e = e, z ∗ e = z.
(10.1) (10.2)
In this definition, “∗” denotes addition and “·” denotes multiplication. When ∗ is the AND, the same operation is used for both addition and multiplication, if it is performed in B. However, they are different operations in T ∪ {e}. That is, in {0, 1, e}, the AND as the addition is defined by Table 10.2, while the AND as the multiplication is defined by Table 10.3. Therefore, we use two different symbols, “∧” and “·” to distinguish the AND performed as the addition and the multiplication, respectively. Some spectral transforms define decision diagrams (DDs) in the sense that they determine the way in which a given function f is assigned to the DDs. Different DDs are defined by using different spectral transforms [241]. As noted above, TDDs are generalizations of the BDD. Different TDDs are derived for different assignments of the operation to ∗. The same consideration extends to the spectral interpretation of TDDs. By changing the way of calculating the spectral transform, we have different TDDs. This means, that for the ∗ operation, we can choose either the AND, the OR, the EXOR or the Alignment [121]. To define the spectral transform for TDDs, we first consider the spectral interpretation of BDDs. Thanks to the recursive structure of decision trees (DTs), it is enough to provide the spectral interpretation of a node. In the matrix notation, extension to the complete DT is easily done through the Kronecker product of the basic matrices describing a node.
184
10. Spectral Interpretation of Ternary Decision Diagrams
In a BDD, the outgoing edges of a node point to subfunctions f0 and f1 of f . These subfunctions are coefficients in the Shannon expansion f = xi f0 ⊕ xi f1 . Therefore, to assign f to a BDD node, we decompose f into coefficients in the Shannon expansion. In the matrix notation, we have
1 0 f0 , where I(1) = . f = I(1) f1 0 1 Conversely, to determine f represented by a BDD node, we again use the Shannon expansion. In practice, that means we simply follow the labels at the edges. That is obvious, since in Sasao’s notation [187], the labels are xi and xi for the edges pointing to f0 and f1 , respectively. We use the following definition to provide the spectral interpretation for determination of f from the BDD node. Definition 59 Let Q be an (r × s) matrix. The left inverse matrix for Q is a (s × r) matrix Q−1 , such that Q−1 Q = I, where I is the (s × s) identity matrix. The right inverse is defined similarly. If the left and right inverses are identical, i.e., if Q−1 Q = QQ−1 = I, then Q−1 is the inverse of Q. In the matrix notation, we determine f represented by a BDD node as
f0 , where Is (1) = xi xi . f = Is (1) f1 Note that Is (1) is the symbolic notation for I(1), since the columns of I(1) correspond to the values of xi and xi . I(1) is a self-inverse matrix. Thus, Is (1) is the left inverse of I(1). In this case, the left inverse is equal to the right-inverse, and we say Is (1) is the inverse for I(1). As shown in Fig. 10.1, the outgoing edges of a node in a TDD point to f0 , f1 , and f0 ∗ f1 . A node in a TDD is described by a (3 × 2) matrix: ⎡ ⎤ 1 e E(1) = ⎣ e 1 ⎦ . (10.3) 1 1 Note that if f is represented by F = [f0 , f1 ]T , then ⎤ ⎡ ⎤ ⎡
1 e f0 f0 E(1)F = ⎣ e 1 ⎦ = ⎣ f1 ⎦ , f1 1 1 f0 ∗ f1 for any assignment of an operator to ∗. By the analogy to the case of BDDs, to determine f represented by a TDD node, we use a left inverse of E(1).
10.2. Spectral Transform for TDDs
185
f S3 0
1
S3 0
0 0 OR EXOR 0 Kleene 0 AND
2
S3
1 2
0 0 0 0
S3
1
S3 0
0 0 0 0
0
0 0 0 0
0
S3
1 2
1 1 1 1
2
0
0 1 1 u
0 0 0 0
S3
1 2
0 1 1 u
0 1 1 u
0
1 1 1 1
2
S3
1 2
1 1 1 1
S3
1
1 1 0 1
0
0 0 0 0
S3
1 2
1 1 1 1
0
0 1 1 u
0
0 1 1 u
S3
1 2
1 1 0 1
1
0 1 1 u
0
0 1 1 u
S3
1 2
0 1 1 u
2
0
0 1 0 u
0 0 0 0
S3
1 2
1 1 0 1
0 1 0 u
0
0 1 1 u
Figure 10.2. AND, EXOR, and Kleene-TDT of f in Example 85.
Lemma 2 The left inverse of E(1) in T ∪ {e}, ∗, · is
1 0 e . E(1)−1 = 0 1 e Proof. We should prove that E(1)−1 E(1) = I(1). Note that =
1 0 e 0 1 e
⎡
⎤ 1 e ⎣ e 1 ⎦ 1 1
1·1∗0·e∗e·1 1·e∗0·1∗e·1 0·1∗1·e∗e·1 0·e∗1·1∗e·1
From 1·1∗0·e∗e·1
= 1 ∗ e ∗ e since (10.1), = 1 ∗ e since (10.2), = 1 since (10.2),
and 1 · e ∗ 0 · 1 ∗ e · 1 = e ∗ 0 ∗ e since (10.1), = e ∗ 0 since (10.2), = 0 since (10.2), it follows that E(1)−1 is the left inverse of E(1). Written in symbolic notation E(1)−1 is given by
Es (1)−1 = xi xi e .
.
1 2
0 1 1 u
0 1 0 u
186
10. Spectral Interpretation of Ternary Decision Diagrams
Thus, Es (1)−1 produces the expansion rule f = xi f0 ⊕ xi f1 ⊕ e(f0 ∗ f1 ). Different assignments of the operation to ∗ produce expansion rules used in different TDDs [186, 189].
10.3 Extended Reed-Muller Transform What is the extended Reed-Muller transform? From the spectral interpretation of TDD nodes, the spectral transform for TDDs is defined as follows: Definition 60 The extended truth-vector Fe of the truth-vector F is given by Fe = E(n)F,
(10.4)
where E(n) =
n
E(1),
i=1
and ⊗ denotes the Kronecker product. In the calculation of (10.4), the “·” is used for multiplication, and the “∗” is used for addition. The extended Reed-Muller (ERM) transform is the transform defined by the matrix E(n). In that setting, E(1) is denoted as the basic ERMtransform matrix. Definition 61 The truth-vector F is determined from the extended truthvector Fe as F = E−1 (1)Fe ,
(10.5)
where E−1 (1) =
n
E−1 (1).
i=1
The relations (10.4) and (10.5) form the ERM-transform pair.
10.4 ERM-Transform for EXOR-TDDs The ERM-transform defined by (10.4) and its inverse transform (10.5) apply to all of the TDDs shown in Section 10.1. However, in the case of EXOR-TDDs, some simplifications can be performed thanks to the properties of the EXOR.
10.4. ERM-Transform for EXOR-TDDs
⎡
⎤ 1 0 ⎣ 0 1 ⎦
I(1)
⎡ ⎣
⎤
⎤
⎡
⎦
1 1
⎣ 0 1 ⎦ 1 1
R(1)
R(1)
1 0
⎡
1 ⎣ 0 1
187
⎤ 0 1 ⎦ 1
E(1)
Table 10.4. Relationships among I(1), R(1), R(1) and E(1).
In E(1)−1 , the elements of the third column are chosen to be e to anulate the third row in E(1). In EXOR-TDDs, the same can be done if we assume that e = 0 ∈ B, since 0 ⊕ 0 = 1 ⊕ 1 = 0 and (10.1) and (10.2) are also satisfied. In this case, the spectral transform for EXOR-TDDs can be defined in B, ⊕, · . Note that, E(1)−1 for EXOR-TDDs is a singular matrix. However, again thanks to the mentioned property of the EXOR, 0 can be interchanged by 1, if the first two columns are permuted. That means, in E(1)−1 , xi , xi , 0 are replaced by their complements xi , xi , and 1, and the resulting ERM-transform ⎡ preserves ⎤ its properties. In that way, for
1 0 0 1 1 . EXOR-TDDs, we have E(1) = ⎣ 0 1 ⎦, where E(1)−1 = 1 0 1 1 1 Table 10.4 shows that E(1) for EXOR-TDD involves the basic identical transform I(1), the basic positive Reed-Muller transform R(1), and the basic negative polarity Reed-Muller transform matrix R(1). In symbolic notation, E−1 (1) for EXOR-TDDs is given by
xi xi 1 . E−1 s (1) = Thus, for EXOR-TDT, the node in Fig. 10.1 represents ⎡ ⎤
1 0
f0 ⎣ ⎦ 0 1 xi xi 1 f = f1 1 1
(10.6)
= E−1 (1)E(1)F = xi f0 ⊕ xi f1 ⊕ 1 · (f0 ⊕ f1 ). Note that the constant nodes in the EXOR-TDT represent the extended truth-vector Fe of f . Example 86 Fig. 10.3 shows an EXOR-TDT for n = 2 [197]. The extended truth-vector is Fe = [f00 , f01 , f02 , f10 , f11 , f12 , f20 , f21 , f22 ]T .
188
10. Spectral Interpretation of Ternary Decision Diagrams
f x1 0
x2 0
1
2
1
x2
x2 0
2
f00 f01 f02
1
2
2
0 1
f10 f11 f12 f20 f21 f22
Figure 10.3. EXOR-TDT for n = 2.
This EXOR-TDT represents f
= x1 x2 f00 ⊕ x1 x2 f01 ⊕ x1 f02 ⊕ x1 x2 f10 ⊕x1 x2 f11 ⊕ x1 f12 ⊕ x2 f20 ⊕ x2 f21 ⊕ f22 = x1 x2 f00 ⊕ x1 x2 f01 ⊕ x1 (f00 ⊕ f01 ) ⊕x1 x2 f10 ⊕ x1 x2 f11 ⊕ x1 (f10 ⊕ f11 ) ⊕x2 (f00 ⊕ f10 ) ⊕ x2 (f01 ⊕ f11 ) ⊕(f00 ⊕ f01 ⊕ f10 ⊕ f11 ).
In matrix notation, Fe is derived as
Fe
⎡ ⎤ ⎡ ⎤⎞ f00 1 0 1 0 ⎢ f01 = E(1)F = ⎝⎣ 0 1 ⎦ ⊗ ⎣ 0 1 ⎦⎠ ⎢ ⎣ f10 i=1 1 1 1 1 f11 ⎡ ⎤ 1 0 0 0 ⎢ 0 1 0 0 ⎥ ⎥ ⎢ ⎢ 1 1 0 0 ⎥⎡ ⎤ ⎥ ⎢ ⎢ 0 0 1 0 ⎥ f00 ⎥ ⎢ f01 ⎥ ⎢ ⎥⎢ ⎥ = ⎢ ⎢ 0 0 0 1 ⎥ ⎣ f10 ⎦ ⎢ 0 0 1 1 ⎥ ⎥ ⎢ ⎢ 1 0 1 0 ⎥ f11 ⎥ ⎢ ⎣ 0 1 0 1 ⎦ 1 1 1 1 2
=
⎛⎡
⎤ ⎥ ⎥, ⎦
[q0 , q1 , q2 , q3 , q4 , q5 , q6 , q7 , q8 ]T ,
where q0 = f00 , q1 = f01 , q2 = f00 ⊕ f01 , q3 = f10 , q4 = f11 , q5 = f10 ⊕ f11 , q6 = f00 ⊕ f10 , q7 = f01 ⊕ f11 , q8 = f00 ⊕ f01 ⊕ f10 ⊕ f11 .
10.4. ERM-Transform for EXOR-TDDs
189
In the matrix calculations, the AND is used for multiplication and the EXOR is used for addition. The EXOR-TDT in Fig. 10.3 shows the function
f = ( x1
x1
1
⊗
x2
x2
1 )(E(1) ⊗ E(1))F.
Note that Example 86 shows a new canonical representation of the nvariable switching functions using 3n products.
Remark 30 EXOR-TDT is the graphical representation of the function expansion for f in terms of the extended basis determined by
n
Xe (n) =
Xi (1),
i=1
where
Xi (1) =
xi
xi
1
.
Example 87 For n = 3, the extended basis Xe is determined as
Xe (3) =
⎡
⎢ = ⎢ ⎣ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
x1
x1
⊗
0 1 0 0 0 1 0 0
0 0 0 1 0 0 0 0
0 0 1 1 0 0 0 0
1 0 1 0 0 0 0 0
1
1 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0
x2
⊗
E(1) 0 E(1) E(1) 0 0 E(1) E(1) 0 E(1) 0 0 0 E(1) 0 0 0 0 0 E(1) 1 1 0 0 0 0 0 0
x2
x3 1 ⎤ E(1) E(1) ⎥ ⎥ E(1) ⎦ E(1)
0 1 0 0 0 0 0 0
1
0 1 0 1 0 0 0 0
1 1 1 1 0 0 0 0
1 0 0 0 1 0 0 0
x3
1 1 0 0 1 1 0 0
0 0 1 0 0 0 1 0
0 0 0 1 0 0 0 1
0 0 1 1 0 0 1 1
1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1
1 1 1 1 1 1 1 1
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎦
190
10. Spectral Interpretation of Ternary Decision Diagrams
Example 88 For n = 3, extended function fe is given by
⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ Fe = (E(1) ⊗ E(1) ⊗ E(1)) F = ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
f000 f001 f000 ⊕ f001 f010 f011 f010 ⊕ f011 f000 ⊕ f010 f001 ⊕ f011 f000 ⊕ f001 ⊕ f010 ⊕ f011 f100 f101 f100 ⊕ f101 f110 f111 f110 ⊕ f111 f100 ⊕ f110 f101 ⊕ f111 f100 ⊕ f101 ⊕ f110 ⊕ f111 f000 ⊕ f100 f001 ⊕ f101 f000 ⊕ f001 ⊕ f100 ⊕ f101 f010 ⊕ f110 f011 ⊕ f111 f010 ⊕ f011 ⊕ f110 ⊕ f111 f000 ⊕ f010 ⊕ f100 ⊕ f110 f001 ⊕ f011 ⊕ f101 ⊕ f111 q
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
where q = f000 ⊕ f001 ⊕ f010 ⊕ f011 ⊕ f100 ⊕ f101 ⊕ f110 ⊕ f111 .
Remark 31 EXOR-TDT represents f in the form of an AND-EXOR expressions derived by the application of SS-expansion to the variables in f . Elements of the ERM-spectrum are coefficients in the SS-expressions for f .
SS-expression is a redundant representation for a given function f ; however, it may offer advantages in minimization of the representation for f , if used as a starting expression for optimization by application of heuristic local transforms used in minimization of FPRMs and GRMs [191].
10.5. ERM-Transform for Other TDDs
191
10.5 ERM-Transform for Other TDDs The next example illustrates the spectral interpretation of AND-TDDs. Spectral interpretations for other TDDs are done by using Remarks 32 to 36. Example 89 Consider the three-variable function f = x1 x2 ⊕ x2 x3 with the truth-vector F = [0, 0, 0, 1, 1, 1, 0, 1]T . The extended truth-vector for the AND-TDT for this function is calculated as follows: ⎛⎡
Fe
⎤ ⎡ ⎤ ⎡ 1 e 1 e 1 = ⎝⎣ e 1 ⎦ ⊗ ⎣ e 1 ⎦ ⊗ ⎣ e 1 1 1 1 1 ⎤ ⎡ 1·0 ⎥ ⎢ 1·0 ⎥ ⎢ ⎥ ⎢ 1·0∧1·0 ⎥ ⎢ ⎥ ⎢ 1·0 ⎥ ⎢ ⎥ ⎢ 1·1 ⎥ ⎢ ⎥ ⎢ 1·0∧1·1 ⎥ ⎢ ⎥ ⎢ 1·0∧1·0 ⎥ ⎢ ⎥ ⎢ 1·0∧1·1 ⎥ ⎢ ⎢ 1·0∧1·0∧1·0∧1·1 ⎥ ⎥ ⎢ ⎥ ⎢ 1·1 ⎥ ⎢ ⎥ ⎢ 1·1 ⎥ ⎢ ⎥ ⎢ 1·1∧1·1 ⎥ ⎢ ⎥ ⎢ 1·0 ⎥ ⎢ ⎥ ⎢ = ⎢ 1·1 ⎥ ⎥ ⎢ 1·0∧1·1 ⎥ ⎢ ⎥ ⎢ 1·1∧1·0 ⎥ ⎢ ⎥ ⎢ 1·1∧1·1 ⎥ ⎢ ⎢ 1·1∧1·1∧1·0∧1·1 ⎥ ⎥ ⎢ ⎥ ⎢ 1·0∧1·1 ⎥ ⎢ ⎥ ⎢ 1·0∧1·1 ⎥ ⎢ ⎢ 1·0∧1·0∧1·1∧1·1 ⎥ ⎥ ⎢ ⎥ ⎢ 1·0∧1·0 ⎥ ⎢ ⎥ ⎢ 1·1∧1·1 ⎥ ⎢ ⎢ 1·0∧1·1∧1·0∧1·1 ⎥ ⎥ ⎢ ⎢ 1·0∧1·0∧1·1∧1·0 ⎥ ⎥ ⎢ ⎣ 1·0∧1·1∧1·1∧1·1 ⎦ w =
⎤⎞ e 1 ⎦⎠ F 1
[0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]T ,
192
10. Spectral Interpretation of Ternary Decision Diagrams
where w = 1 · 0 ∧ 1 · 0 ∧ 1 · 0 ∧ 1 · 1 ∧ 1 · 1 ∧ 1 · 1 ∧ 1 · 0 ∧ 1 · 1. In this case, we use two different symbols, · and ∧, in the equation. However, the AND is used for both multiplication and addition. In the above equation, if ∧ is replaced by , then we have the extended truth-vector for the Kleene-TDT. Instead, if we use the OR, then we have the extended truth-vector for the OR-TDT. Fig. 10.1 shows the extended truth-vectors for the AND-TDT, the OR-TDT, the EXOR-TDT, and the Kleene-TDT for f . Examples 86 and 89 imply the followings: Remark 32 From (10.5), the TDT for f is a graphical representation of the expansion of f with respect to the set of functions defined by columns of E−1 (n). These functions are described by elements of E−1 s (n). Remark 33 The number of elements in the truth-vector F of an n-variable function is 2n , while the number of elements in the extended truth-vector Fe is 3n . E−1 (n) is a (2n × 3n ) matrix. The functions represented by the columns of E−1 (n) form an extended basis for f and a basis for fe . By extending the considerations in [214], we have the following: Remark 34 A TDD of f is the multi-terminal ternary decision diagram (MTTDD) of fe , if fe is considered as a three-valued function. Remark 35 Fe is the spectrum of f with respect to E(n). Thus, TDDs are spectral transform DDs (STDDs) [243]. Note that STDDs are a general concept offering an alternative explanation and uniform interpretation for assigning f to various DDs. Remark 36 The spectral transform defined by E(n) produces different TDTs depending on the operations ∗ in the calculation of Fe . 1. If ∗ is the AND, then we have the extended truth-vector for ANDTDTs. 2. If ∗ is the OR, then we have the extended truth-vector for OR-TDTs. 3. If ∗ is the EXOR, then we have the extended truth-vector for EXORTDTs. 4. If ∗ is the Alignment operation, then we have the extended truth-vector for Kleene-TDTs. The vector of values in constant nodes for the TDTs will be called as the spectrum. Therefore, the extended truth-vectors Fe for AND, OR, EXOR and Kleene-TDTs are also called the AND, OR, EXOR, and Kleene spectrum, respectively. We denote them uniformly as TDD-spectra.
10.6. Calculation of TDD-Spectrum
193
10.6 Calculation of TDD-Spectrum E(n) is factored as E(n) =
n
Ej (n);
and ; Ej (n) =
i=1
n
Eij (1),
j=1
where Π denotes the matrix multiplication and ⎧ ⎨ E(1), j = i, I3 , j > i, Eij (1) = ⎩ j < i. I2 , Example 90 For n = 3, E(3) = E1 E2 E3 , where E1 (3) = E(1) ⊗ I3 ⊗ I3 , E2 (3) = I2 ⊗ E(1) ⊗ I3 , E3 (3) = I2 ⊗ I2 ⊗ E(1). With this factorization, the extended spectrum Fe can be calculated through BDDs in the same way as the spectra of other Kronecker product representable spectral transforms [196]. Thus, for the BDD representing f , Fe is calculated by using Procedure 1 given later. In this procedure, the deleted nodes in the TDD are considered through the cross points defined as follows. Procedure 1 (Calculation of Fe ) 1. Descend the BDD level by level starting from the constant nodes up to the root node. 2. At each node and cross point, do the calculation described by E(1) over the subfunctions represented by the nodes or cross points. Example 91 Consider the function f in Examples 46 and 85, whose BDD is shown in Fig. 5.3 illustrating the reduction of DDs. The EXOR spectrum of this function f is ⎤ ⎡ ⎛⎡ ⎤ ⎡ ⎤⎞ 1 0 1 0 1 0 Fe = ⎝⎣ 0 1 ⎦ ⊗ ⎣ 0 1 ⎦ ⊗ ⎣ 0 1 ⎦⎠ F, 1 1 1 1 1 1 where F is the truth-vector for f , thus F = [0, 0, 0, 1, 1, 1, 0, 1]T . For an EXOR-TDD of f , ⊕ is used for ∗ as follows: 1. For nodes and cross points for x3 : ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 0 0 1 ⎣ 0 ⎦, ⎣ 1 ⎦, ⎣ 1 ⎦. 0 1 0
194
10. Spectral Interpretation of Ternary Decision Diagrams
2. For nodes for ⎡ ⎡ ⎤ ⎡ 0 0 ⎢ ⎣ 0 ⎦⊕⎣ 0 ⎢ ⎢ 0 0 ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ 0 0 ⎢ ⎢ ⎣ 0 ⎦⊕⎣ 1 ⎢ ⎢ 0 1 ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ 0 0 ⎢ ⎣ ⎣ 0 ⎦⊕⎣ 1 0 1
x2 : ⎤ ⎤
⎡
⎦ ⎥ ⎥ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎥=⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎣ ⎥ ⎦ ⎦
0 0 0 0 1 1 0 1 1
⎡ ⎡
⎤ ⎡ 1 ⎢ ⎣ 1 ⎦⊕⎣ ⎢ ⎢ 0 ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ 0 ⎢ ⎢ ⎣ 0 ⎦⊕⎣ ⎢ ⎢ 0 ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ 1 ⎢ ⎣ ⎣ 1 ⎦⊕⎣ 0
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
3. For the node for x1 : ⎡ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1
⎤
⎡
⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⊕⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎣ ⎤
⎡
⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⊕⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎣ ⎤
⎡
⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⊕⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎣
0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 1 1 0 1
⎤ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
⎡ ⎥ ⎥ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎥ ⎦
0 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 1 1 1 0 0 0 0 1 1 0
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
⎤ ⎤ 0 ⎡ 0 ⎦ ⎥ ⎥ ⎥ ⎢ 0 ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎢ 0 ⎥ ⎢ ⎥=⎢ ⎦ 1 ⎥ ⎢ ⎥ ⎢ 1 ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎣ 0 ⎥ ⎦ ⎦ 1 1
1 1 0 0 1 1 1 0 1
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
10.6. Calculation of TDD-Spectrum
195
Example 92 The Kleene spectrum of the function f (x1 , x2 , x3 ) considered in the previous example, can be calculated as follows: ⎛⎡
⎤ ⎡ ⎤ ⎡ ⎤⎞ 1 e 1 e 1 e Fe = ⎝⎣ e 1 ⎦ ⊗ ⎣ e 1 ⎦ ⊗ ⎣ e 1 ⎦⎠ F. 1 1 1 1 1 1 In this case, is used for the ∗ operation and with the application of e as stated in Definition 58. This spectrum can be calculated over the BDD for f shown in Fig. 5.3 by processing the nodes and cross points with the basic transform matrix for the extended Kleene transform
⎡
⎤ 1 e E(1) = ⎣ e 1 ⎦ , 1 1
which, as noted above, is distinguished from the other extended transforms by the used operations. 1. For f in Fig. 5.3 at the nodes and cross points for x3 : ⎤ 0 ⎣ 0 ⎦, 0
⎡
⎤ 0 ⎣ 1 ⎦, u
⎡
2. Nodes for x2 : ⎡ ⎡ ⎤ ⎡ 0 ⎢ ⎣ 0 ⎦⎣ ⎢ ⎢ 0 ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ e ⎢ ⎢ ⎣ e ⎦⎣ ⎢ ⎢ e ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ 0 ⎢ ⎣ ⎣ 0 ⎦⎣ 0
⎤ ⎤ e ⎡ e ⎦ ⎥ ⎥ ⎥ ⎢ e ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎢ 0 ⎥ ⎢ ⎥=⎢ ⎦ 1 ⎥ ⎢ ⎥ ⎢ u ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎣ 0 ⎥ ⎦ ⎦ 1 u
0 0 0 0 1 u 0 u u
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥, ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
⎡
⎤ 1 ⎣ 1 ⎦. 1
⎡ ⎡
⎤ ⎡ 1 ⎢ ⎣ 1 ⎦⎣ ⎢ ⎢ 1 ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ e ⎢ ⎢ ⎣ e ⎦⎣ ⎢ ⎢ e ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ 1 ⎢ ⎣ ⎣ 1 ⎦⎣ 1
⎤ ⎤ e ⎡ e ⎦ ⎥ ⎥ ⎥ ⎢ e ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎢ 0 ⎥ ⎢ ⎥=⎢ ⎦ 1 ⎥ ⎢ ⎥ ⎢ u ⎥ ⎢ ⎥ ⎢ ⎤ ⎥ ⎢ ⎥ ⎣ 0 ⎥ ⎦ ⎦ 1 u
1 1 1 0 1 u u 1 u
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
196
10. Spectral Interpretation of Ternary Decision Diagrams
3. Node for x1 :
⎡ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
0 0 0 0 1 u 0 u u e e e e e e e e e 0 0 0 0 1 u 0 u u
⎤
⎡
⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎣ ⎤
⎡
⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎣ ⎤
⎡
⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎦ ⎣
e e e e e e e e e 1 1 1 0 1 u u 0 u 1 1 1 0 1 u u 1 u
⎤ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
⎡ ⎥ ⎥ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎣ ⎥ ⎦
0 0 0 0 1 u 0 u u 1 1 1 0 1 u u 1 u u u u 0 1 u u u u
⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥. ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦
Each step of the calculation can be represented by a⎡Kleene-TDD. Compo⎤ 1 e sition of these DDs through the operations E(1) = ⎣ e 1 ⎦ produces the 1 1 Kleene-TDD for f . Fig. 10.4 shows this procedure for f in Example 85. The Kleene-TDTs are the graphical representations of the decomposition of f by using E(1), and this method is essentially the same as that discussed in [186, 197]. The values of f can be read from the TDD by simply descending the corresponding paths from the root node to the constant nodes [186]. The method is especially efficient when we want to determine the function values at some particular points, not the complete truth-vector of f . However, in
10.6. Calculation of TDD-Spectrum
197
x2
x3
0+1+2
2
0 1 x3
1 1
1
1
2
0 1
S3 1
0
E(1)
u
2
0 1
x3 0 1 0
0
0+1+2
calculation of values for edge x3 0: 1 . 0=u 1: 1 . 1=1 2: 1 . u=u
0
E(1)
0
S3
2
2
calculation of values for edge x3 0: 0 . 0=0 1: 0 . 1=u 2: 0 . u=u
S3 2
1
0 1
0+2
1
0
0
2
S3
x2
2
0 1 S3 0
S3 20
1
1+2
E(1) 0
1
0
f S3 calculation of values for edge
1
2
x2 x3 0: 0: 0 . 1=u 1: 0 . 1=u 2: 0 . 1=u
x1
2
0
S3
S3 2
0
x2 x 3 1: shared x2 x3 2: 0: 0 . 1=u 1: u . 1=u 2: u . u=u
1
2
0
S3 0+2
1 S3 0
1
1
1
2
S3
S3
0
1
1+2
1
Figure 10.4. Generation of Kleene-TDD for f in Example 85.
0+2
1
198
10. Spectral Interpretation of Ternary Decision Diagrams
spectral interpretation, the determination of f from fe corresponds to the calculation of the inverse ERM-transform. Therefore, a procedure similar to that for calculation of Fe from F through BDD can be defined to calculate F from Fe through TDD. This procedure calculates (10.5), and E−1 (n) is factorized as n E−1 (n) = E−1 j (n), E−1 j (n)
=
i=1 n
Cij (1),
j=1
where
⎧ −1 ⎨ E (1), I2 , Cij (1) = ⎩ I3 ,
j = i, j > i, j < i.
Example 93 For n = 3, −1 −1 E−1 (3) = E−1 1 (3)E2 (3)E3 (3),
where −1 (1) ⊗ I2 ⊗ I2 , E−1 1 (3) = E −1 E2 (3) = I3 ⊗ E−1 (1) ⊗ I2 , −1 E−1 (1). 3 (3) = I3 ⊗ I3 ⊗ E
Procedure 2 (Calculation of F) 1. Descend the TDD level by level starting from the constant nodes up to the root node. 2. At each node and cross point, do the calculation described by E−1 (1) over the subfunctions represented by the nodes or cross points. If it is performed through a TDD for f , the method results in the BDD for f . Thus, the method is inverse to that for determination of the TDD from the BDD for f [186, 197].
10.7 Calculation of the Weight Vector EXOR-TDDs are useful for determination of the Fixed polarity ReedMuller expression (FPRM) with a minimum number of products [197]. The polarities of function are determined by the polarity vector H = (h1 , . . . , hn ) as xhi i = xi for hi = 1, and xhi i = xi for hi = 0. The procedure to determine minimum FPRM is based on calculation of the extended truth-vector Fe and the weight vector We for f , which is calculated from Fe .
10.7. Calculation of the Weight Vector
199
Definition 62 The weight vector of an n-variable function is a vector with 2n components, where a component at the position a = (a1 , . . . , an ) represents the number of products in the FPRM with the polarity vector H = a. To calculate Fe , we use the direct ERM-transform for EXOR-TDDs and perform calculations with EXOR as the addition and the AND as the multiplication. To calculate We , we use the inverse ERM-transform. However, in this case, we assume that logic elements 0 and 1 in E(n)−1 are interpreted as integers 0 and 1 and perform the calculation in the set of integers −1 (n), then Z. Thus, if E−1 Z (n) denotes the integer-valued counterpart of E We = E−1 Z (n)Fe . Since in the definition of E−1 (1), we have permuted xi and xi , we get the weight vector We with elements in the reverse order. To correct that ordering, we use
1 0 1 E−1 (1) = Z 0 1 1 in the determination of We . An FFT-like algorithm is derived to calculate We by using for E−1 Z (n) the same factorization used for E−1 (n). If it is performed through the EXORTDD for f , the method produces a multi-terminal binary DD (MTBDD) [197] for We . Example 94 Fig. 10.5 shows the EXOR-TDD for f in Example 85, derived by the reduction of the EXOR-TDT in Fig. 10.2. We calculate We as
1 0 1 1 0 1 1 0 1 We = ⊗ ⊗ Fe . 0 1 1 0 1 1 0 1 1 In this case, the addition and multiplication are in Z. 1. For nodes and cross points for x3 : 0 1 1 , , , 0 2 1 2. Nodes for x2 :
⎡
⎤
2 1
,
⎡ 1 + ⎥ ⎢ ⎢ ⎥ ⎢ ⎥ = ⎢ 2 ⎢ ⎢ ⎥ ⎣ 2 ⎦ ⎣ 1 1 4 + 2 2 0 0
1 2
0 0
⎤ ⎥ ⎥, ⎦
.
200
10. Spectral Interpretation of Ternary Decision Diagrams
⎡
⎤
⎡ ⎤ 3 + ⎢ ⎥ ⎢ ⎥ ⎢ 2 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = ⎣ 3 ⎦, ⎣ ⎦ 1 2 3 + 2 1 ⎡ ⎤ ⎡ ⎤ 1 1 2 + ⎢ ⎥ 1 1 ⎢ 2 ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = ⎣ 1 ⎦. ⎣ ⎦ 0 1 1 + 0 1 3. Node for x1 :
1 1
2 1
⎤ ⎡ 2 1 ⎢ ⎢ 2 ⎥ ⎢ 2 ⎢ ⎢ ⎥+⎢ ⎢ ⎣ 2 ⎦ ⎣ 1 ⎢ ⎢ 1 4 ⎢ ⎢ ⎢ ⎡ ⎤ ⎡ ⎢ 2 3 ⎢ ⎢ ⎢ 2 ⎥ ⎢ 2 ⎢ ⎢ ⎥+⎢ ⎣ ⎣ 3 ⎦ ⎣ 1 1 3 ⎡ ⎡
⎤ ⎤
⎡ ⎤ 3 ⎥ ⎥ ⎢ 4 ⎥ ⎥ ⎥ ⎢ ⎥ ⎦ ⎥ ⎢ 3 ⎥ ⎥ ⎢ ⎥ ⎥ ⎢ ⎥ ⎥ ⎥ = ⎢ 5 ⎥. ⎢ 5 ⎥ ⎤ ⎥ ⎢ ⎥ ⎥ ⎢ 4 ⎥ ⎥ ⎢ ⎥ ⎥ ⎥ ⎥ ⎥ ⎣ 4 ⎦ ⎦ ⎦ 4
As is noted in [197], in We , the element at the position (h1 , . . . , hn ) shows the number of products in the FPRM for f with the polarity vector H = (h1 , . . . , hn ). For example, in We for f in Example 85, the first element corresponds to H = (0, 0, 0) and shows that the FPRM with all the variables as positive literals has three products.
10.8 TDDs and Boolean Difference 10.8.1 Boolean difference What is the Boolean difference? In switching theory, the Boolean difference is a notion that should replace the role of differential operators in classical mathematical analysis. For simplicity, we will give a brief answer as follows: Differential operators have been introduced to measure somehow the rate of change and the direction of change of a signal due to a change in its arguments. In order to be precise, it is convenient to consider the function values at points at a small distance δx, thus, at x and x+δx, when δx → ∞. Therefore, a differential operator is defined by (Df )(x) = lim
δx→∞
f (x + δx) − f (x) . δx
10.8. TDDs and Boolean Difference
201
S3
S3
S3
S3
S3
S3
S3
Figure 10.5. EXOR-TDD for f in Example 85.
Thus, this operator, the Newton-Leibniz derivative, expresses how much f (x) changes when x changes for δx. Since the subtraction is in the field of rational numbers, we can determine the direction of the change by the sign of the derivative (Df )(x). In switching theory, a variable x can take the logic values in {0, 1}; therefore, the smallest δx is 1. The addition and subtraction coincide and reduce to logic EXOR. Therefore, an analogue to the Newton-Leibniz derivative can be defined as (∆f )(x) = f (x ⊕ 1) ⊕ f (x). This operator shares some of the properties of differential operators in classical mathematical analysis, however, for the features of EXOR cannot differentiate the direction of change of a switching function from 0 to 1 and vice versa, from 0 to 1. Therefore, it is denoted as the Boolean difference instead of the derivative. The term difference is used since the domain is discrete, although it is a basis for the Boolean differential calculus [262]. Definition 63 The Boolean difference ∆i f of an n-variable switching function f with respect to the i-th variable xi is defined by ∆i f = f0 ⊕ f1 , where f0 and f1 are co-factors of f with respect to xi .
202
10. Spectral Interpretation of Ternary Decision Diagrams
A Boolean difference of higher order k is defined as a recursive application of Boolean differences of the first order with respect to a subset of k variables. It is assumed that the difference of order 0 for f is equal to f [16, 262, 280]. Example 95 (Boolean difference of order k = 2) For a two-variable switching function f (x1 , x2 ) the Boolean differences of all orders with respect to all the variables are ∆0 f ∆1x1
= f, = f (0, x2 ) ⊕ f (1, x2 ),
∆1x2
= f (x1 , 0) ⊕ f (x1 , 1),
∆2x1 ,x2
=
∆1x1 (∆1x2 f ) = f (0, 0) ⊕ f (0, 1) ⊕ f (1, 0) ⊕ f (1, 1).
10.8.2 Boolean difference and polynomial expressions The Newton-Leibniz derivative is related to the Taylor series in classical mathematical analysis. Is there relationship of the Boolean difference to some expansions for switching functions? Since, the definition of Boolean difference says, f0 ⊕ f1 , in the
perform
f0 . We want to work matrix notation it would be written as 1 1 f1 with square matrices as in the case of other operators in the space of func 1 1 tions on dyadic groups, and therefore, we will use the matrix 1 1 to describe the Boolean difference. The following example illustrates the matrix notation for Boolean difference. Example 96 For a two-variable switching function defined by the truthvector F = [f (0), f (1), f (2), f (3)]T , the vector of values of the Boolean difference with respect to the variable x1 can be calculated as
1 1 1 0 ⊗ F ∆1 (f )(x1 , x2 ) = 1 1 0 1 ⎤ ⎤⎡ ⎤ ⎡ ⎡ f (0) ⊕ f (2) f (0) 1 0 1 0 ⎢ 0 1 0 1 ⎥ ⎢ f (1) ⎥ ⎢ f (1) ⊕ f (3) ⎥ ⎥ ⎥⎢ ⎥ ⎢ = ⎢ ⎣ 1 0 1 0 ⎦ ⎣ f (2) ⎦ = ⎣ f (0) ⊕ f (2) ⎦ . f (1) ⊕ f (3) 0 1 0 1 f (3) The first factor matrix in the Kronecker product shows that we perform processing with respect to x1 . The other matrix is therefore chosen as the identity matrix I(1). Since, in the resulting vector, the first two elements are equal to the other two elements this notation conveniently expresses the property of
10.8. TDDs and Boolean Difference
203
the Boolean difference that for an n variable function f (x1 , . . . , xn ), (∆i f )(x) = (∆i f )(x1 , . . . , xn ) is a function independent on xi , since it is defined as the sum of values for f when xi is 0 and 1. Similarly, for the Boolean difference with respect to x2 ,
1 0 1 1 ⊗ F ∆2 (f )(x1 , x2 ) = 0 1 1 1 ⎤ ⎡ ⎤⎡ ⎤ ⎡ f (0) ⊕ f (1) 1 1 0 0 f (0) ⎢ 1 1 0 0 ⎥ ⎢ f (1) ⎥ ⎢ f (0) ⊕ f (1) ⎥ ⎥ ⎥⎢ ⎥ ⎢ = ⎢ ⎣ 0 0 1 1 ⎦ ⎣ f (2) ⎦ = ⎣ f (2) ⊕ f (3) ⎦ . f (3) ⊕ f (3) 0 0 1 1 f (3) Since (∆2 f )(x) is a function that does not depend on x2 , it follows that (∆1 (∆2 f ))(x1 , x2 ) is a constant function and does not depend on either x1 or x2 . In matrix notation, ⎤ ⎤⎡ ⎡ 1 1 0 0 1 0 1 0 ⎢ 0 1 0 1 ⎥⎢ 1 1 0 0 ⎥ ⎥ ⎥⎢ ∆1 (∆2 (f )) = ⎢ ⎣ 1 0 1 0 ⎦⎣ 0 0 1 1 ⎦F 0 0 1 1 0 1 0 1 ⎡ ⎤ ⎡ ⎤ f (0) ⊕ f (1) ⊕ f (2) ⊕ f (3) 1 1 1 1 ⎢ f (0) ⊕ f (1) ⊕ f (2) ⊕ f (3) ⎥ ⎢ 1 1 1 1 ⎥ ⎢ ⎥ ⎥ = ⎢ ⎣ 1 1 1 1 ⎦ F = ⎣ f (0) ⊕ f (1) ⊕ f (2) ⊕ f (3) ⎦ . f (0) ⊕ f (1) ⊕ f (2) ⊕ f (3) 1 1 1 1 Recall that the PPRM in the Hadamard ordering for two-variable functions is given by f (x1 , x2 ) = r0 ⊕ r1 x2 ⊕ rx1 ⊕ r3 x1 x2 . In matrix notation, the PPRM coefficients r0 , r1 , r2 , and determined as ⎤ ⎡ r0
⎢ r1 ⎥ 1 0 1 0 ⎥= F ⊗ Sr,f = ⎢ ⎣ r2 ⎦ 1 1 1 1 r3 ⎡ ⎡ ⎤ f (0) 1 0 0 0 ⎢ ⎢ 1 1 0 0 ⎥ f (0) ⊕ f (1) ⎢ ⎥ = ⎢ ⎣ 1 0 1 0 ⎦F = ⎣ f (0) ⊕ f (2) f (0) ⊕ f (1) ⊕ f (2) ⊕ f (3) 1 1 1 1
r3 , are
⎤ ⎥ ⎥. ⎦
Comparing the values of the Boolean differences at the point 0 = (0, 0), it follows that r0
=
∆0 (f )(0, 0) = f (0),
r1
=
∆12 (f )(0, 0) = f (0) ⊕ f (1),
204
10. Spectral Interpretation of Ternary Decision Diagrams
r2 r3
= =
∆11 (f )(0, 0) = f (0] ⊕ f (2),
∆2x1 ,x2 (f )(0, 0) = f (0) ⊕ f 819 ⊕ f (2) ⊕ f (3).
Therefore, like Taylor series, f (x1 , x2 ) = (∆0 f )|x=0 ⊕ x2 (∆12 f )|x=0 ⊕ x1 (∆11 f )|x=0 ⊕ x1 x2 (∆21,2 f )|x=0 . Remark 37 The coefficients in Reed-Muller expressions are values of Boolean differences at the point 0 = (0, . . . 0). Relationships between FPRMs and Boolean differences at other points can be easily established, since the complement of a variable xi corresponds to the use of R(1) in the calculation of coefficients in FPRMs.
10.8.3 EXOR-TDDs and Boolean difference PPRMDDs are graphic representations of PPRMs. Therefore, constant nodes in PPRMs show values of Boolean differences at point 0. What about the values of Boolean differences at other points? Some subsets of these values can be read from the corresponding FPRMs. However, all these values can be read from EXOR-TDDs. Since the values of Boolean differences at the point 0 are sufficient to express a function f , the values of Boolean differences at other points of the domain of definition should be read from extended representations for f as EXOR-TDDs. The EXOR-TDDs are defined in terms of EXOR. The third outgoing edge of each node points to the value f2 = f0 ⊕ f1 . From there, the relationship between the EXOR-TDDs and the Boolean difference follows easily. Theorem 6 The elements of Fe for f are the function values of f and the values of all its Boolean differences. Proof. In EXOR-TDTs, the outgoing edges of non-terminal nodes correspond to f0 , f1 , and f2 = f0 ⊕f1 . The same decomposition rule is applied to all the nodes in the DT through the levels in the DT. In that way, in the determination of EXOR-TDT, we calculate the Boolean differences of different orders with respect to all variables in f . In an EXOR-TDT, each path from the root node up to the constant nodes that contains some of the third outgoing edges of non-terminal nodes, points to a Boolean difference of f . This proves the theorem. Remark 38 The set of values of fe is the union of the values of f and the values of all the Boolean differences for f . Example 97 The correspondence between fe and its Boolean differences for n = 3 is given in Table 10.5. This table is related to Table 10.4, showing the basic transform matrices from which these decomposition rules are
10.8. TDDs and Boolean Difference
205
derived. The first column shows the paths in the EXOR-TDT. The other columns show the values for fe , and the Boolean differences.
x 0. 1. 2. 3. 4. 5. 6. 7. 8.
x1 , x2 , x3 000 001 002 010 011 012 020 021 022
fe f000 f001 f000 ⊕ f001 f010 f011 f010 ⊕ f011 f000 ⊕ f010 f001 ⊕ f011 f000 ⊕ f001 ⊕ f010 ⊕ f011
9. 10. 11. 12. 13. 14. 15. 16. 17.
100 101 102 110 111 112 120 121 122
f100 f101 f100 ⊕ f101 f110 f111 f110 ⊕ f111 f100 ⊕ f110 f101 ⊕ f111 f100 ⊕ f101 ⊕ f110 ⊕ f111
18. 19. 20.
200 201 202
f000 ⊕ f100 f001 ⊕ f101 f000 ⊕ f001 ⊕ f100 ⊕ f101
21. 22. 23.
210 211 212
f010 ⊕ f110 f011 ⊕ f111 f010 ⊕ f011 ⊕ f110 ⊕ f111
24.
220
f000 ⊕ f010 ⊕ f100 ⊕ f110
25.
221
f001 ⊕ f011 ⊕ f101 ⊕ f111
26.
222
f000 ⊕ f001 ⊕ f010 ⊕ f011 ⊕f100 ⊕ f101 ⊕ f110 ⊕ f111
∆
∆3 (000) = ∆3 (001) ∆3 (010) = ∆3 (011) ∆2 (000) = ∆2 (010) ∆2 (001) = ∆2 (011) ∆23 (000)∆23 (001) = ∆23 (010) = ∆23 (011) ∆3 (100) = ∆3 (101) ∆3 (110) = ∆3 (111) ∆2 (100) = ∆2 (110) ∆2 (101) = ∆2 (111) ∆23 (100) = ∆23 (101) = ∆23 (110) = ∆23 (111) ∆1 (000) = ∆1 (100) ∆1 (001) = ∆3 (101) ∆23 (000) = ∆23 (001) = ∆23 (100) = ∆23 (101) ∆1 (010) = ∆1 (110) ∆1 (011) = ∆1 (111) ∆23 (010) = ∆23 (011) = ∆23 (110) = ∆23 (111) ∆12 (000) = ∆12 (010) = ∆12 (100) = ∆12 (110) ∆12 (001) = ∆12 (011) = ∆12 (101) = ∆12 (111) ∆123
Table 10.5. Paths in EXOR-TDT, ERM-spectrum, and Boolean differences.
206
10. Spectral Interpretation of Ternary Decision Diagrams
10.9 EXOR-TDTs and KDTs Since in KDDs, constant nodes are a subset of function values and a subset of Reed-Muller coefficients, that are the values of Boolean differences, does it follow that there are relationships between EXOR-TDDs and KDTs? The decomposition rule used to assign a given f to the EXOR-TDD is determined by E(1). Table 10.6 shows that this decomposition rule includes decomposition rules used in KDDs described by Ki , i ∈ {S, pD, nD}. In building up the EXOR-TDD for f , we perform all the possible different combinations of these rules. Therefore, the following remark is possible. Remark 39 EXOR-TDT for f includes all possible KDTs for f . The formal proof of this statement easily follows from Theorem 6, by recalling that KDDs are graphical representations of Kronecker expressions whose coefficients can be expressed in terms of Boolean differences.
SS ⎡
S
⎤ 1 0 ⎣ 0 1 ⎦ 1 1 E(1)
⎤ 1 0 ⎣ 0 1 ⎦ ⎡
pD ⎡ ⎣
1 0
nD ⎤
⎡
⎦
⎣ 0 1
1 1 KS (1)
KpD (1)
⎤ 1 ⎦ 1
KnD (1)
Table 10.6. Decomposition rules.
Example 98 Figs. 10.6 and 10.7 show BDD, functional decision diagrams (FDD) or positive polarity Reed-Muller DD (PRMDD), fixed polarity ReedMuller (FPRMDDs), and KDDs contained in the EXOR-TDT for n = 2. In this figure, f22 = f00 ⊕ f01 ⊕ f10 ⊕ f11 .
10.10 EXOR-TDDs and Kronecker Expressions Since KDDs are contained in EXOR-TDDs, are there relationships between EXOR-TDDs and Kronecker expressions? BDTs represent the disjunctive normal form for f . The values of constant nodes in BDTs are the function values of f . These values can be formally regarded as the Boolean differences of order zero of f . Positive
10.10. EXOR-TDDs and Kronecker Expressions
207
Figure 10.6. KDDs contained in EXOR-TDT for n = 2.
polarity Reed-Muller DTs (PPRMDTs) represent positive polarity ReedMuller (PPRM) expressions for f . The values of constant nodes are the Reed-Muller coefficients. The relationship between the Reed-Muller coefficients and the Boolean difference is obvious, since the pD-decomposition
208
10. Spectral Interpretation of Ternary Decision Diagrams
Figure 10.7. KDDs contained in EXOR-TDT for n = 2 (continued).
rule can be written as f = 1 · f0 ⊕ xi (∆i f ). Similarly, for the nD-decomposition rule, f = 1 · f1 ⊕ xi (∆i f ).
10.10. EXOR-TDDs and Kronecker Expressions
209
Therefore, in the PPRM expression for f , the coefficient assigned to the product term consisting of k variables is equal to the multiple Boolean difference of order k for f with respect to the variables included into the corresponding product term. Fixed polarity Reed-Muller DTs (FPRMDTs) represent Fixed polarity Reed-Muller (FPRMs) expressions. Compared to PPRM expressions, they are defined with respect to the same set of basic functions (columns of the Reed-Muller matrix), however, in different ordering. Therefore, the coefficients in FPRM expressions consists of the same set of Boolean differences as in PPRM expressions. KDDs represent Kronecker expressions for f . They are defined for different assignments of S, pD, and nD decomposition rules. Decomposition by using S rules do not change the function values as the values of constant nodes. Davio rules applied to xi require calculation of the Boolean difference with respect to xi . Therefore, the coefficients in Kronecker expressions are taken in the set that is the union of the set of function values and of its all Boolean differences. Different Kronecker expressions takes different subsets of this set depending on the assignments of the decomposition rules to variables in f . This consideration yields the following remark. Remark 40 From Theorem 6, an EXOR-TDT represents at the same time f , fe , and all Kronecker expressions of f . Complete disjunctive normal form, PPRM, and FPRM expressions are included as particular cases of the Kronecker expressions. From this remark, we can read coefficients in the Kronecker expressions for f by descending the corresponding paths in the EXOR-TDD for f . Example 99 For n = 3, the values of constant nodes in a KDT with the assignment of decomposition rules DTL=(S,pD,nD) are elements of the Kronecker spectrum for the function f defined by the Kronecker transform matrix K(3) = K1 (1) ⊗ K2 (1) ⊗ K3 (1) with K1 (1) = KS (1),K2 (1) = KpD (1), K3 (1) = KnD (1). Therefore,
1 0 1 0 0 1 Kf = ⊗ ⊗ F 0 1 1 1 1 1 ⎤ ⎡ f001 ⎥ ⎢ f000 ⊕ f001 ⎥ ⎢ ⎥ ⎢ f001 ⊕ f011 ⎥ ⎢ ⎢ f000 ⊕ f001 ⊕ f010 ⊕ f011 ⎥ ⎥ ⎢ = ⎢ ⎥ ⎥ ⎢ f101 ⎥ ⎢ f100 ⊕ f101 ⎥ ⎢ ⎦ ⎣ f101 ⊕ f111 f100 ⊕ f101 ⊕ f110 ⊕ f111
210
10. Spectral Interpretation of Ternary Decision Diagrams
The values of these Kronecker coefficients can be read from fe for n = 3 at the decimal indices {1, 2, 7, 8, 10, 11, 16, 17}. These indices written in the ternary coordinates are (001), (002), (021), (022), (101), (102), (121), and (122).
10.10.1
Procedure for reading Kronecker spectra from EXOR-TDT
How can we simply read the coefficients in Kronecker expressions from EXOR-TDDs?
We associate to each decomposition rule S, pD, and nD an ordered set XS = (0, 1), XpD = (0, 2) and XnD = (1, 2), respectively. Assume that 1. The n-tuples where fe is defined are ordered in the lexicographic ordering. 2. The Kronecker spectral coefficients for a specified DTL are ordered in the lexicographic ordering. With these assumptions provided, the following theorem can be formulated. Theorem 7 (Determination of Kronecker expressions from EXOR-TDT) 1. In EXOR-TDT for f , the values at the n-tuples where all variables xi , i = 1, . . . , n take values in XS , are the function values of f . 2. In EXOR-TDT for f , the values at the n-tuples where variables take values in XpD are coefficients of the Reed-Muller spectrum of f . Thus, they are values in PPRMDTs or FDDs. 3. In EXOR-TDT for f , the values at the n-tuples where variables take values in XnD are coefficients of the FPRM with all variables represented by negative literals. Thus, they are values in PFRMDT with all the nodes taken as the nD nodes. 4. In EXOR-TDT for f , the values at the n-tuples where variables take values in Xq , q ∈ {S,pD,nD} are coefficients of the Kronecker spectrum of f for the DTL = (dj = q), j = 1, . . . , n. Proof. In a KDT, the outgoing edges of nodes at which S-decomposition is performed point to the function values f0 and f1 . Thus, the assignment is XS = (0, 1). The outgoing edges of nodes where pD-decomposition is performed point to f0 and f2 . Therefore, the assignment is XpD = (0, 2). For the nodes where nD-decomposition is performed, the outgoing edges point to f1 and f2 . Therefore, the assignment is XnD = (1, 2).
10.10. EXOR-TDDs and Kronecker Expressions
211
The basic matrices used in definition of the Kronecker transforms are those used in the description of the decompositions by S, pD, and nD rules. The coefficients in the Kronecker expressions are elements of the Kronecker spectrum. Therefore, they relate to the rows of basic Kronecker matrices in the same way as is specified by the assignments of elements in XS , XpD , XnD . From there, the theorem is true. Example 100 Table 10.7 shows n-tuples at which fe for n = 3 take values of the Kronecker spectrum for some particular choices of the decomposition rules. The last row in this table shows the corresponding decimal indices. S,S,S 000 001 010 011 100 101 110 111 0,1,3 4,9,10 12,13
pD,pD,pD 000 002 020 022 200 202 220 222 0,2,6 8,18,20 24,26
nD,nD,nD, 111 112 121 122 211 212 221 222 13,14,16 17,22,23 25,26
S,pD,nD 001 002 021 022 101 102 121 122 1,2,7 8,10,11 16,17
nD,nD,S 110 111 120 121 210 211 220 221 12,13,15 16,21,22 24,25
pD,S,pD 000 002 010 012 200 202 210 212 0,2,3 5,18,20 21,23
Table 10.7. Examples of paths determining KDTs contained in EXOR-TDTs.
Although stated for EXOR-TDTs, the theorem applies to EXOR-TDDs, since the reduction rules do not destroy or diminish the information content of a DT [196]. We can read the coefficients in the Kronecker expressions by descending the corresponding paths in the EXOR-TDD from the root node to the constant node whose value is equal to 1. The product terms to which these coefficients are assigned are determined as the product of labels in the edges. If a path in the EXOR-TDD for f does not exist, then the corresponding product term does not appear in the Kronecker expression for f . Thus, the following procedure for reading coefficients in Kronecker expressions from EXOR-TDDs is possible. We use the property that KDDs are graphical representations of Kronecker expressions. As shown in Figs. 10.6 and 10.7, KDDs are subtrees in EXOR-TDD. Thus, the procedure is formulated in terms of EXOR-TDDs and KDDs. Procedure 3 (Reading Kronecker expressions.) 1. Assume that a KDD is determined by the DT L = (d1 , . . . , dn ), di ∈ {S, pD, nD}. 2. To read values of coefficients in this KDD, we descend the paths determined by (Xd1 , . . . , Xdn ), Xi ∈ {XS , XpD , XnD }.
212
10.11
10. Spectral Interpretation of Ternary Decision Diagrams
EXOR-TDTs and Pseudo-KDTs
How about pseudo-KDTs, can they be related to EXOR-TDDs? Definition 64 Pseudo-KDTs (PKDTs) are a generalization of KDTs derived by allowing different decomposition rules for nodes at the same level in KDTs. Pseudo-KDDs (PKDDs) are derived by the reduction of PKDTs. PKDTs and, thus, PKDDs, are specified by extended DTLs enumerating decomposition rules assigned to each node in the DT, respectively DD. The hierarchy among the levels in the DT is expressed by brackets. PKDTs can be obtained as a combination of some KDTs. Since KDTs are subtrees in EXOR-TDT, then PKDTs for a given f are also contained in the EXOR-TDT for f . Example 101 Fig. 10.8 shows examples of five PKDTs contained in EXOR-TDD for n = 2. Table 10.8 shows, in the first column, the extended DTLs for these PKKDTs. In Fig. 10.8, the first PKDT(S,(pD,nD)) is a combination of the first two KDTs in Fig. 10.7, KDT(S,pD) and KDT(S,nD). DTL (S, (pD, nD)) (S, (nD, pD)) (pD, (S, nD)) (pD, (nD, S)) (nD, (S, pD))
Basis [x1 , x1 x2 , x1 , x1 x2 ] [x1 , x1 x2 , x1 , x1 x2 ] [x2 , x2 , x1 , x1 x2 ] [1, x2 , x1 x2 , x1 x2 ] [x2 , x2 , x1 , x1 x2 ]
Table 10.8. DTLs and basic functions in PKDDs.
In spectral interpretation, PKDTs are defined as graphical representations of Fourier series-like expansions of f with respect to non-Kronecker bases. However, these bases can be derived by transformations over rows and columns of Kronecker bases in KDDs [219]. Example 102 Table 10.8 shows, in the second column, the analytic expressions for basic functions used in definition of PKDTs in Example 101. Table 10.9 shows these functions in the matrix form. This is the matrix Td . The column Ti shows the inverse matrices which are used to determine the values of constant nodes in these PKDTs. The recursive structure of a DT is expressed in the matrix representation of the DT through the appearance of some blocks repeating regularly. That becomes apparent if the matrix Td representing basic functions and the inverse matrix Ti are written in symbolic form through the basic Kronecker
10.11.
EXOR-TDTs and Pseudo-KDTs
213
Figure 10.8. Examples of PKDDs contained in EXOR-TDT for n = 2.
matrices. For simplicity, we show just the indices of the basic Kronecker matrices. Example 103 Table 10.10 shows transform matrices used in definition of PKDDs in Example 101 and explains the relationships between the nodes and matrices. For example, the structure of Ti for PKDT(S,(pD,nD)) is
214
10. Spectral Interpretation of Ternary Decision Diagrams
DTL
Td ⎡
(S, (pD, nD))
1 ⎢ 1 ⎢ ⎣ 0 0 ⎡
(S, (nD, pD))
1 ⎢ 1 ⎢ ⎣ 0 0 ⎡
(pD, (S, nD))
1 ⎢ 0 ⎢ ⎣ 1 0 ⎡
(pD, (nD, S))
1 ⎢ 1 ⎢ ⎣ 1 1 ⎡
(nD, (S, pD))
1 ⎢ 0 ⎢ ⎣ 1 0
Ti
0 1 0 0
0 0 1 1
⎤ 0 0 ⎥ ⎥ 1 ⎦ 0
⎡
1 0 0 0
0 0 1 1
⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
⎡
0 1 0 1
0 0 1 1
⎤ 0 0 ⎥ ⎥ 1 ⎦ 0
⎡
1 0 1 0
0 0 1 1
⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
⎡
0 1 0 1
1 1 0 0
⎤ 0 1 ⎥ ⎥ 0 ⎦ 0
⎡
1 ⎢ 1 ⎢ ⎣ 0 0 0 ⎢ 1 ⎢ ⎣ 0 0 1 ⎢ 0 ⎢ ⎣ 0 1 0 ⎢ 1 ⎢ ⎣ 1 0 0 ⎢ 0 ⎢ ⎣ 1 1
0 1 0 0
0 0 0 1
⎤ 0 0 ⎥ ⎥ 1 ⎦ 1
1 1 0 0
0 0 1 1
⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
0 1 1 1
0 0 0 1
⎤ 0 0 ⎥ ⎥ 1 ⎦ 1
1 1 0 1
0 0 1 0
⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
0 0 0 1
1 0 1 1
⎤ 0 1 ⎥ ⎥ 0 ⎦ 1
Table 10.9. Direct and inverse transform matrices used in the definition of PKDTs.
first determined by the S-decomposition rule. This matrix has the diagonal form of KS (1). The blocks in the diagonal correspond to the matrices KpD (1) and Kn (1) to match the decomposition rules used in the related nodes. A similar structure repeats in Ti for this PKDT (recall that this is an inverse matrix for Td ).
10.12
EXOR-TDDs and Pseudo-Kronecker Expressions
From spectral interpretation of DDs, we have the following remark.
10.12.
EXOR-TDDs and Pseudo-Kronecker Expressions
DTL
Td
(S, (pD, nD)) (S, (nD, pD)) (pD, (S, nD))
nD−1 0
S−1 S−1
(pD, (nD, S))
S S
pD−1
0
pD−1 0
nD−1
nD−1 nD−1
(nD, (S, pD))
Ti 0
nD−1 0
215
0 S
pD 0
pD 0 0 nD nD 0 0 pD S nD nD S 0 pD
0 nD 0 S S pD
Table 10.10. Symbolic representation of direct and inverse transform matrices used in definition of PKDTs.
Remark 41 PKDDs are graphical representations of pseudo-Kronecker expressions. Thus, PKDDs represent f in the form of a pseudo-Kronecker expression for f . Since PKDDs are combinations of some KDTs, the same is true for the pseudo-Kronecker expressions. They are combinations of some Kronecker expressions. We select some nodes in KDTs to combine into a PKDT. Similarly, we select some parts in Kronecker expressions to combine into a pseudoKronecker expression for a given f . In both cases, the selection is made in such a way that we always assure a complete set of linearly independent functions. In this way, we ensure the completeness and uniqueness of the representation for a given f . From this consideration, we can read pseudo-Kronecker expressions for f from EXOR-TDDs by using the same procedure as for the Kronecker expressions. However, in this case, we should change the path in each node, depending on the assumed decomposition rule. Example 104 From EXOR-TDT in Fig. 10.8 we read the pseudoKronecker expressions represented by the subtrees for PKDTs by descending the corresponding paths from the root node to the constant nodes. Table 10.11 shows DTLs for PKDTs in Example 101 and the related paths in the EXOR-TDT for n = 2.
216
10. Spectral Interpretation of Ternary Decision Diagrams
DTL (S, (pD, nD)) (S, (nD, pD)) (pD, (S.nD)) (pD, (nD, S)) (nD, (S, pD))
00, 01, 00, 11, 10,
02, 02, 01, 12, 11,
Paths 11, 12 10, 12 21, 22 20, 21 20, 22
Table 10.11. Paths in EXOR-TDT corresponding to PKDTs.
The optimization of pseudo-Kronecker expressions using multiple-place decision diagrams is considered in [181, 182].
10.13
Word-Level TDDs
What are word-level TDDs?
10.13.1
Arithmetic TDDs
Arithmetic-TDDs (Arith-TDDs) are defined in [192] as a word-level generalization of EXOR-TDDs with the interpretation of EXOR as the addition modulo 2. Therefore, the third outgoing edge of a node in the Arith-TDD points to the value f2 = f0 + f1 , where the addition is over integers, in general in C. In matrix notation, the values of constant nodes in Arith-TDDs are determined by using the integer counterpart of the ERM-transform [240]. Definition 65 Integer ERM-transform is the ERM-transform with entries in the basic ERM-transform matrix E(1) interpreted as integers 0 and 1 and with calculations performed over C. We denote this matrix by Ei (1) to show difference with the matrix E(1). Definition 66 Values of constant nodes in an Arith-TDD are elements of the Integer ERM-spectrum Fi = Ei (n)F, where Ei (n) =
n
Ei (1).
i=1
Since the weight functions used in the optimization of FPRMs [197] are integer-valued, they can be represented by Arith-TDDs. Remark 42 An Arith-TDD for f represents f and the weight function wf assigned to f . From Arith-TDD, we can read f and all the prime implicant for f .
10.13.
Word-Level TDDs
217
Remark 43 An Arith-TDT is the union of MTBDT for f and the MTBDT for wf assigned to f . What is the decomposition rule used in the definition of ArithTDDs? The interpretation of the values of constant nodes as Integer ERMcoefficients, allows us to determine an expansion rule which, when recursively applied to variables in given functions, determines Arith-TDDs. Definition 67 The Arith-TDD for a given function f is determined by the recursive application of the expansion rule f=
1 ((−1)xi + (−1)xi f1 + 1 · (f0 + f1 )). 2
In matrix notation, this expansion rule is f=
xi
(−1)
xi
(−1)
1
Ei (1)
f0 f1
.
Such an expansion in terms of exponential functions (−1)r resembles the exponential Fourier series. This statements follows easily if we recall that Fourier analysis on C2n is defined in terms of the discrete Walsh functions wal(q, y), where q is the index, and y the argument of the Walsh function of the index q. Since, (−1)xi = 1 − 2xi , xi ∈ {0, 1}, the Walsh functions of the index q = 2n−i , i = 0, . . . , n − 1 are expressed in terms of switching variables as wal(2n−i , y) = 1 − 2xi . The Walsh functions for other values of q are expressed as products of these basic Walsh (Rademacher) functions [114]. How do we label the edges in Arith-TDDs? If we use the labels for the edges in DDs in terms of switching variables, as is suggested in [187], then Arith-TDDs require us to use labels 1 − 2xi and 1 − 2xi for the first two outgoing edges. As in EXOR-TDDs, the third outgoing edge is labeled by 1. Such labels at the edges are used in fixed polarity Walsh DDs (WDDs) [243]. It follows that Arith-TDDs are a generalization of EXOR-TDDs related to WDDs. However, they are not a TDDs version of WDDs, since the first two outgoing edges point to function values for f , not to the Walsh coefficients for f , as in WDDs. The difference is that in WDDs, labels are 1 and 1 − 2xi and in Arith-TDDs, the labels for the first two outgoing edges are 1 − 2xi and 1 − 2xi , while the third outgoing edge is denoted by 1. Remark 44 Arith-TDDs are defined through a combination of expansions rules used in arithmetic transform DDs (ACDDs) and labels at the edges used in Walsh DDs (WDDs).
218
10. Spectral Interpretation of Ternary Decision Diagrams
This hybrid synthesis of obvious from the following rule used in Arith-TDDs: ⎡
1 1 −1 1 ⎣ 1 1 2 −1
ACDDs and WDDs in Arith-TDDs becomes matrix relation determined by the expansion ⎤
1 0 1 2 0 1 ⎦ 0 1 = = 0 2 0 2 1 1
0 1
.
At the left side of this relation, the left factor is the inverse of a combination of Walsh expansion rules used in WDDs. The right factor is a combination of expansion rules used in EXOR-TDDs, however, with calculations in C.
10.14
Arithmetic Transform TDDs
Can we define TDDs that will be related to ACDDs?
We define arithmetic transform TDDs by the interpretation of EXOR as the subtraction modulo 2 [222]. Definition 68 The arithmetic transform TDD (AC-TDD) for a given function f is derived by the recursive application of the expansion rule f = xi f0 + xi f1 + (−1)xi (−f0 + f1 ), to all the variables in f . We denote this expansion as the arithmetic SS (arSS) expansion rule, since it is an integer-valued counterpart of the SS-expansion rule used in definition of EXOR-TDDs [240]. The multiplicative factor (−1)xi takes into account the change of sign of the arithmetic coefficients calculated with respect to the arpD and arnD expansion rules. Thus, we denote it as the sign alternating factor. Remark 45 An AC-TDD represents a function f and the arithmetic transform coefficients for f for all possible different polarities. From ACTDD, we can read f and all the possible polynomial expressions for f in C(C2n ), since the coefficients in these expressions are taken in the set of function values for f and the set of coefficients in all FPARs for f . Remark 46 Denote by Rw the set of DTs consisting of the MTBDT, ACDT, and all possible word-level KDTs and PKDTs. Then, AC-TDT is the power set P (Rw ) of Rw . Thus, it is the union of all these word-level DTs.
10.14.
Arithmetic Transform TDDs
219
10.14.1 Matrix interpretation of AC-TDDs Matrix expressions for Arith-TDDs correspond directly to those of EXOR-TDDs. The difference is that the calculations are over the field of rational numbers Q instead of over GF (2). Can we derive matrix expressions for AC-TDDs as for EXOR-TDDs?
In matrix notation, the arSS-expansion rule is ⎡ ⎤
1 0
f0 xi ⎣ ⎦ 0 1 . f = xi xi (−1) f1 −1 1 However, thus written, the arSS-expansion rule requires us to change the labels at the edges of third outgoing edges in ACTDDs. We should use the labels (−)xi for the third outgoing edges. However, we want to keep the similarity with the notation in EXOR-TDDs. In EXOR-TDDs, the combination of the S, pD, and nD-expansion rules is possible in a single basic matrix E(1). Thus, we write ⎤ ⎡
1 0
f0 ⎣ ⎦ 0 1 . f = xi xi 1 f1 (−1)xi (−1)xi ⎤ ⎡ 1 0 0 1 ⎦ as the basic We denote the matrix Ea (1) = ⎣ xi xi (−1) (−1) extended arithmetic transform (EAT) matrix. It involves two matrices: ⎡ ⎡ ⎤ ⎤ 1 0 1 0 1 ⎦ E0a (1) = ⎣ 0 and E1a (1) = ⎣ 0 1 ⎦ , −1 1 1 −1 for xi = 0 and xi = 1, respectively. E0a (1) corresponds to the combination of the arS-expansion rule and the arnD-expansions rule. E1a (1) corresponds to the combination of the arSexpansion rule and the arpD-expansions rule. In practical implementations, we always perform the calculation of the values of constant nodes in the AC-TDD by using E1a (1). In reading ARexpressions from AC-TDDs, we take into account the change of sign in the coefficients caused by the use of the arnD-expansion rule through a sign alternating function defined in what follows. Definition 69 Values of constant nodes in AC-TDD for a function f are the elements of the EAT-spectrum for f Ae = E1a (n)F,
220
10. Spectral Interpretation of Ternary Decision Diagrams
TDD
Expansion rule
Transform
EXOR Arith AC
f = xi f0 ⊕ xi fi ⊕ 1 · (f0 ⊕ f1 ) f = 12 ((−1)xi + (−1)xi f0 + 1 · (f0 + f1 )) f = xi f0 + xi f1 + (−1)xi (−f0 + f1 )
E(1) Ei (1) E1a (1)
Table 10.12. Features of EXOR-TDDs, Arith-TDDs, and AC-TDDs.
where E1a (n) =
n
E1a (1).
i=1
10.15
EXOR-TDDs, Arith-TDDs, and AC-TDDs
What are the relationships and differences among EXOR-TDDs, Arith-TDDs, and AC-TDDs? Note that EXOR-TDDs are bit-level DDs, while Arith-TDDs and ACTDDs are word-level DDs. Thus, in calculations with EXOR-TDDs, all the operations are in GF (2), and in Arith-TDDs and AC-TDDs all the operations are in C. Table 10.12 summarizes basic features of EXOR-TDDs, Arith-TDDs, and AC-TDDs. Remark 47 For a given function f , the Integer ERM-spectrum used in Arith-TDD and EAT-spectrum used in AC-TDD for f , calculated modulo 2, produce the ERM-spectrum used in EXOR-TDD for f . Example 105 Fig. 10.9 compares extended truth-vectors in EXOR-TDD, Arith-TDD, and AC-TDD for the majority function of three variables f = x1 x2 ∨ x2 x3 ∨ x3 x1 .
10.15.1
Complexity of EXOR-TDDs, Arith-TDDs, and AC-TDDs
The complexity of a DD is usually expressed by its size defined as the number of nodes used in the DD. For TDDs considered in this paper, the following remark is possible.1 Remark 48 (Complexity of TDDs) 1 This
remark has been provided by Prof. T. Sasao of Kyushu Institute of Technology.
10.16.
ARs and AC-TDDs
221
Figure 10.9. EXOR-TDT, Arith-TDT, and AC-TDT for the majority function for n = 3.
1. For all single-output functions, size(EXOR − T DD) ≤ size(Arith − T DD), size(EXOR − T DD) ≤ size(AC − T DD). 2. For many functions size(AC − T DD) ≤ size(BDD)
size(Arith − T DD), size(EXOR − T DD).
This remark is based on the observation that 1. In Arith-TDDs and AC-TDDs, we may have a considerable number of different constant nodes. 2. In AC-TDDs we use subtraction, and thus, we get the value 0 in determination of f2 for some nodes, when f0 = f1 . In Arith-TDDs, this is impossible, except if both f0 and f1 are 0, since we use addition to determine f2 .
10.16
ARs and AC-TDDs
What are the relationships between arithmetic expressions and AC-TDDs? Determination of FPRMs and Kronecker expressions over GF (2) from EXOR-TDDs is described in [197].
222
10. Spectral Interpretation of Ternary Decision Diagrams
We illustrate the reading of polynomial expressions in C(C2n ) from ACTDDs by the example of few arithmetic pseudo-Kronecker expressions. Such DDs are the most general case, including all other DDs as particular examples. As in the case of bit-level DDs, the assignment of expansion rules to the nodes in an PKACDD is specified by the Extended-DTL. Hierarchy of levels is expressed by brackets, and the nodes at a level are written from right to the left. Extended-DTL (S, (pD, nD)) (S, (nD, pD)) (pD, (S, nD)) (pD, (nD, S)) (nD, (S, pD))
Basic functions [x1 , x1 x2 , x1 , x1 x2 ] [x1 , x1 x2 , x1 , x1 x2 ] [x2 , x2 , x1 , x1 x2 ] [1, x2 , x1 x2 , x1 x2 ] [x2 , x2 , x1 , x1 x2 ]
Table 10.13. Extended-DTLs and basic functions in PKACDDs.
Example 106 Table 10.13 shows basic functions used in the definition of four word-level pseudo-Kronecker DDs for functions of two variables. Table 10.14 specifies these DDs in the matrix notation, where the column of matrices Td define the basic functions used in definition of these TDDs. Matrices Ti are used to calculate values of constant nodes in AC-TDD. In this table, 0 is the zero-matrix of order 2. Fig. 10.10 shows these arithmetic Pseudo-Kronecker DTs over C within an AC-TDT. Application of the nD-expansion rule instead of the pD-expansion rule changes the sign of the corresponding AR-coefficient. In reading different polynomial expressions in C(C2n ) from AC-TDDs determined by using E1a , we perform a correction of the sign of coefficients by using the sign alternating function φ [222].
10.16.1
Sign alternating function
How do we correct the sign of arithmetic coefficients? We denote the basis functions used in definition of a Pseudo-Kronecker DT for a given Extended-DTL by ϕi (w), i = 0, . . . , 2n − 1. Each ϕi (w) is determined as the product of labels at a path from the root node to a constant node. Thus, ϕi (w) = z1 · · · zn , where zi ∈ {xi , xi }, since zi · 1 = zi . We define the dual function for ϕi (w) as ϕdi (w) = z 1 · · · z n . Definition 70 (Sign alternating functions) The sign alternating function (SAF) is defined as φDT L (w) = (−1)ϕw (w) = (−1)z1 · · · (−1)zn . d
If ϕw (w) = 1, then (−1)ϕw (w) = (−1)0 = 1. d
10.16.
Extended-DTL
ARs and AC-TDDs
Td
(S, (pD, nD)) (S, (nD, pD)) (pD, (S, nD)) (pD, (nD, S)) (nD, (S, pD))
nD−1 0
S−1 S−1
0
S nD
nD−1
0
S−1 pD−1 0
nD 0 0 pD
pD−1 0
pD 0 0 nD
pD−1
nD−1 nD−1 S−1 S−1
Ti 0
nD−1 0
223
nD S 0 pD
0 nD 0 S
S pD
Table 10.14. Symbolic representation of direct and inverse transform matrices used in the definition of PKACDTs.
AC-TDD A
0
2
1 A 0 f0 0 (S(pD,nD))
(pD(nD,S)) (nD(S,PD))
f0 1
f0 1 f0 0
-f0 0+f0 1
f1 0
-f0 + 0 f0 1
f0 0
(S(nD,pD)) (pD(S,nD))
1
A
A 0
2
-f0 + 0 f0 1
1
2
f11
-f1 0+f11
f11
-f1 + 0 f11
0 -f0 + 0 f1 0
2 f2 2
-f1 + 0 f11
f1 0
f0 1 f0 1
1 -f0 + 1 f11
-f1 + 0 f11
f2 2
-f0 + -f1 + 0 f1 0 0 f11
-f0 + 0 f0 1 f1 0
f11
-f0 + 0 f1 0
f2 2
Figure 10.10. Examples of PKACDDs contained in AC-TDT for n = 2.
Example 107 For a PKACDD with the Extended-DTL given as (S(pD,nD)), the basic functions are given by ϕ0 (w) = x1 , ϕ1 (w) = x1 x2 , ϕ2 (w)x1 , ϕ3 (w) = x1 x2 . The dual functions are ϕd0 (w) = x1 , ϕd1 (w) = x1 x2 , ϕd2 (w) = x1 , ϕd3 (w) = x1 x2 .
224
10. Spectral Interpretation of Ternary Decision Diagrams
We determine the values of sign alternating function φDT L at a point w as φDT L (w) = (−1)ϕw (w) . In the matrix notation, T
φ(S(pD,nD)) = (−1)x1 |00 (−1)x1 (−1)x2 |01 (−1)x1 |10 (−1)x1 (−1)x2 |11 = =
(−1)0
(−1)0 (−1)0
(−1)0
(−1)0 (−1)1
T
[1, 1, 1, −1]T .
Example 108 Table 10.15 specifies SAFs for AC-TDDs with ExtendedDTLs shown in Table 10.13. Extended-DTL (S, (pD, nD)) (S, (nD, pD)) (pD, (S, nD)) (pD, (nD, S)) (nD, (S, pD))
SAF [1, 1, 1, −1]T [1, −1, 1, 1]T [1, 1, 1, −1]T [1, 1, 1, 1]T [1, 1, −1, −1]T
Table 10.15. SAFs for PKDDs in Example 106.
The sign alternating function expresses the property that unlike operations in GF (2), the addition and subtraction in C does not coincide. Thus, application of arpD to f produces the coefficients f0 and f2 = −f0 + f1 . The application of arnD produces coefficients f1 and −f2 . Example 109 From Fig. 10.10, we read the PKAR-expression for the Extended-DTL given by (S, (pD, nD)) by descending paths 00, 02, 11, and 12. In this way, we read the vector Af = [f00 , −f00 + f01 , f11 , f10 − f11 ]T . This vector multiplied by φ(S,(pD,nD)) provides the vector of coefficients in the PKAR-expression specified by (S, (pD, nD)).
10.17 AC-TDDs for Multi-Output Functions The following example illustrates applications of AC-TDDs in the representation of multi-output switching functions. Example 110 Table 10.16 shows a two-variable two-output function f1 ∗ f0 . We associate to this function the integer equivalent function fZ = 2f1 + f0 . It is given by the vector FZ = [3, 0, 2, 3]T . Fig. 10.11 shows AC-TDD for fZ . From this AC-TDD, we read the PKARs for f1 and f0 for the node assignment (S(pD,nD)) as shown in Fig. 10.11. Thus, we first determine an auxiliary vector Zfz = [3, −3, 3, 1]T . This function multiplied by the
10.18.
Exact Minimization of FPAR-expressions
x1 0 0 1 1
x2 0 1 0 1
f1 1 0 1 1
225
f0 1 0 0 1
Table 10.16. Multi-output function in Example 109.
Figure 10.11. AC-TDT for fz in Example 110.
sign alternating function for the specified PKACDT produces the vector of arithmetic coefficients for f , ⎤ ⎤ ⎡ ⎡ ⎤ ⎡ 3 1 3 ⎢ −3 ⎥ ⎢ 1 ⎥ ⎢ −3 ⎥ ⎥ ⎥ ⎢ ⎥ ⎢ AfZ = Zfz φ(S(pD,nD)) = ⎢ ⎣ 3 ⎦ · ⎣ 1 ⎦ = ⎣ 3 ⎦, −1 −1 1 where · denotes the componentwise multiplication of vectors. Since, ⎡ ⎤ (2 · 1 + 1) ⎢ −(2 · 1 + 1) ⎥ ⎥ AfZ = 2Af1 + Af0 = ⎢ ⎣ (2 · 1 + 1) ⎦ , −(2 · 0 + 1) T
T
we determine Af1 = [1, −1, 1, 0] , and Af0 = [1, −1, 1, −1] . These vectors show coefficients in the PKARs with the node assignment (S(pD,nD)) for f1 and f0 .
10.18
Exact Minimization of FPAR-expressions
How do we determine the minimum FPARs?
It is possible to extend the method for optimization of FPRMs [197] to FPARs by using AC-TDDs instead of EXOR-TDDs. As was noted above,
226
10. Spectral Interpretation of Ternary Decision Diagrams
the weight function used in [197] shows the number of products in the FPRMs for f . Thus, it permits us to choose the minimum FPRM-expression for f . If wf is represented by the weight vector wf , then this vector is determined from the ERM-spectrum Fe for f by an FFT-like algorithm performed over EXOR-TDD for f [197]. This algorithm counts the number of products in all 2n FPRMs simultaneously. For an n-variable function, the algorithm consists of n steps. It takes advantages of the property that in FPRMs all the non-zero coefficients are equal to 1. Therefore, the addition of the coefficients is equal to counting the number of non-zero coefficients, i.e., the number of products in the FPRMs. The spectral interpretation of EXOR-TDDs [219, 240], permits the following interpretation of the algorithm for exact minimization of FPRMs. Since Fe is shown as the values of constant nodes in the EXOR-TDD for f , we calculate wf by performing at each node of the EXOR-TDD the calculations determined by the matrix E(1)r determined as the left inverse
1 0 1 of E(1) over GF (2) with permuted rows. Thus, Er (1) = with 0 1 1 calculations over C [240]. In [3], Er (1) is denoted as the interval slicing transform matrix and it is used in digital filtering. This interpretation allows extension of the algorithm to the exact minimization of FPARs through AC-TDDs. However, in this case, the coefficients in the extended arithmetic vector Ae are integers. Therefore, unlike FPRM-expressions, counting the coefficients of FPAR-expressions is not equal to the addition of these coefficients. Thus, we first assign a characteristic function Vchar(f ) to Ae . We assume that Vchar(f ) is represented by a vector Vchar(f ) . Definition 71 The i-th element of Vchar(f ) is vchar(f ) (i) = 1 if the i-th element of Ae is ae (i) = 0, else vchar(f ) (i) = 0. Vchar(f ) is represented by a AC-TDD(Vchar(f ) ) derived from the AC-TDD for f , AC-TDD(f ) with the values of constant nodes modified as described above. We determine the weight vector showing the number of products in FPARs by performing the operations described by Er (1) at nodes of AC-TDD(Vchar(f ) ). The method is explained by the following example. Example 111 For fZ given by the vector FZ = [3, 0, 2, 3]T , the EATspectrum is given by the vector Ae = [3, 0, −3, 2, 3, 1, −1, 3, 4]T . The characteristic function assigned to Ae is given by the vector Vchar(f ) = [1, 0, 1, 1, 1, 1, 1, 1, 1]T . From (Er (1) ⊗ Er (1)) Vchar(f ) = [4, 3, 4, 4]T , it follows that the minimum FPAR-expression for f is for the polarity (01). It has three product terms, and f is given by f = 3x2 + 3x1 − 4x1 x2 .
10.19.
Word-Level TDDs and Gibbs Derivatives
227
This example suggests the following procedure. Procedure (Minimization of FPARs) 1. Given a function f by a MTBDD(f ). 2. Generate AC-TDD(f ) by performing calculations determined by E1a (1) at each node in the MTBDD(f ). 3. Transform AC-TDD(f ) into AC-TDD(Vchar(f ) ). 4. Generate MTBDD(wf ) by performing calculations determined by Er (1) at each node in AC-TDD(Vchar(f ) ). 5. In MTBDD(wf ), consider paths from the root node to the constant nodes with the minimum values. Products of labels at the edges in these paths determine the polarity vectors H for the minimum FPARs.
10.19
Word-Level TDDs and Gibbs Derivatives
There are bit-level and word-level DDs. Bit-level DDs are related to the Boolean difference. Are there differential operators that may be considered as the word-level counterpart of the Boolean difference? Some relationships between word-level DD and differential operators can be established with respect to the Gibbs derivatives [80]. What are Gibbs derivatives? The Gibbs derivatives are a broad family of differential operators on various groups, continuous and discrete, and over different fields permitting definition of a Fourier transform [212]. Are there Gibbs derivatives for switching functions? Gibbs derivatives were first defined for functions on finite dyadic groups [79], since their introduction was motivated by problems of differentiation of Walsh functions. This derivative is therefore denoted as the dyadic Gibbs derivative or the logic Gibbs derivative [49, 50, 81]. In this setting, the logic Gibbs derivative is defined as a linear operator possessing properties of differential operators corresponding to the properties of the Newton-Leibniz derivative, and having discrete Walsh functions as eigenfunctions. This property permits many generalizations through the following alternative definition of Gibbs derivatives on groups.
228
10. Spectral Interpretation of Ternary Decision Diagrams
Definition 72 (Gibbs derivatives) Consider the space P (G) of functions f : G → P , where G is a finite, not necessarily Abelian group, and P is a field admitting existence of the Fourier transform in P (G). The Gibbs derivatives in P (G) are the linear operators for which F(Df )(w) = φ(w)F(f ), where F is the Fourier transform operator in P (G), Df is the Gibbs derivative of f , and φ(w) is a function in w in P (G). For more details on the definition and properties of Gibbs derivatives we refer the reader to [22, 212, 277]. Fast algorithms for calculation of Gibbs derivatives on finite groups, including methods through DDs, are considered in [244, 245]. For applications in switching theory, it is used in definition of Gibbs derivative G = C2n , and P = C, the dyadic group and complex field, respectively. It should be noted that C(C2n ) may be given the structure of a complex function algebra by introducing the pointwise product of functions through (f · g)(x) = f (x) · g(x), for each f, g ∈ C(C2n ), and x ∈ C2n . The Fourier transform in C(C2n ) is the discrete Walsh transform. Therefore, since for Abelian groups it is often assumed that φ(w) = w, the dyadic Gibbs derivative is defined in the following way. Definition 73 (Dyadic Gibbs derivative) In matrix notation, the dyadic Gibbs derivative is defined as Df = 2−1 W(n)G(n)W(n), where W(n) is the Walsh matrix, and G(n) = Diag{0, 1, . . . , 2n − 1}. Example 112 For n = 2, the dyadic Gibbs derivative of a function f ∈ C(C22 ) is given by the matrix ⎡ ⎤ −3 1 2 0 1 ⎢ 1 −3 0 2 ⎥ ⎥. Df = − ⎢ 0 −3 1 ⎦ 2⎣ 2 0 2 1 −3 For a study of relationships between the Boolean difference and dyadic Gibbs derivatives, it is convenient to define this operator in terms of partial dyadic Gibbs derivatives. Definition 74 (Partial dyadic Gibbs derivatives) The partial dyadic Gibbs derivative of a function f ∈ C(C2n ) with respect to the variable xi is defined by [79] (Di f )(x1 , . . . , xn ) = f (xi ⊕ 1) − f (xi ) = f (xi ) − f (xi ).
10.19.
Word-Level TDDs and Gibbs Derivatives
229
It is obvious that there is a strong relationship between the partial Gibbs derivative Di and the Boolean difference ∆i , as |Di f | = ∆i f, where |q| is the absolute value of q. Definition 75 The dyadic Gibbs derivative of a function f ∈ C(C2n ) is defined by −1
Df (x1 , . . . , xn ) = −2
n
2n−i (Di f )(x1 , . . . , xn ).
i=2
In matrix notation, the partial dyadic Gibbs derivative is represented by the matrix n Di = Aj (1), where Aj =
1 0 . 0 1
j=1
D(1), I(1),
i = j, , and D(1) = i = j,
−1 1 1 −1
, I(1) =
What are properties of the dyadic Gibbs derivatives? The Gibbs derivatives express properties corresponding to those of the Newton-Leibniz derivative, except for the product rule [81]. If f is a switching function with logic values 0 and 1 interpreted as integers 0 and 1, then f can be considered as a particular example of functions in C(C2n ). In this setting, the Boolean difference and the Gibbs derivatives can be considered as differential operators on the Boolean algebra, and the complex function algebra C(C2n ), respectively. Then, the partial Gibbs derivatives of switching functions, under the corresponding interpretation of their values, express properties similar to the properties of the Boolean difference [79]. In [49, 50], the relationships between the Boolean difference and the dyadic Gibbs derivatives were studied using a definition of Gibbs derivatives adapted to switching functions in (0, 1) → (1, −1) encoding. In this definition, for n variable functions n
2(n−i) ∆i f = |Df |.
i=1
Such differential operators were used for design of easily testable logic circuits [49, 50]. Remark 49 For a given f , the values |Df | can be evaluated by adding the values of the function fe at the corresponding n-tuples. For ∆i f , i ∈
230
10. Spectral Interpretation of Ternary Decision Diagrams
2
D2(0) -D2(1)
3
2
3
D2(2) -D2(3)
2
D1(0) -D1(2)
3
2
3
D1(1) -D1(3)
Figure 10.12. AC-TDT and partial Gibbs derivatives for n = 2.
{0, . . . , n}, these are n-tuples where xi = 2, and xj ∈ {0, 1}, where j ∈ {1, . . . , } \ {i}. In terms of EXOR-TDDs, it follows that we perform the addition of the values at constant nodes reachable by the paths consisting of edges whose labels are coordinates of these n-tuples. The previous discussion applies to relationships between dyadic Gibbs derivatives and EXOR-TDDs. What are the relationships between dyadic Gibbs derivatives and AC-TDDs? The relationships between AC-TDDs and partial dyadic Gibbs derivatives are similar to those of EXOR-TDDs and the Boolean differences. The values of partial dyadic Gibbs derivatives are the elements of the EATspectrum; thus, they appear as the values of constant nodes in AC-TDDs determined by the corresponding n-tuples. A difference in these considerations is related to the property that for an n-variable function f , the function ∆i f is a function of (n − 1) variables. That property can be expressed as the even symmetry of ∆i f . This feature follows from definition of EXOR, which can be interpreted either as addition or subtraction in GF (2). Since the dyadic Gibbs derivatives are defined over C, the property that Di f is also a function of (n − 1) variables can be expressed as the odd symmetry. It follows that in AC-TDDs, half of the values of the partial Gibbs derivatives can be read directly, while the other half are these values with the sing reversed, thus, multiplied by −1. This feature will be illustrated by the following example. As noted in definition of the matrix Ea (1), in practical applications, the formalization of the procedure for manipulation with AC-TDDs, and also the reading of the values of partial dyadic Gibbs derivatives, can be performed in terms of the sign alternating functions [222]. Example 113 Fig. 10.12 shows AC-TDD for n = 2 and the values of partial Gibbs derivatives.
10.20.
TDDs and STDT(Q)s
231
What is the difference in reading partial Gibbs derivatives from EXOR-TDDs and AC-TDDs? Unlike EXOR-TDDs, from which we can read the absolute values of partial dyadic Gibbs derivatives, from AC-TDDs we can read the values of Df as Df = 2−1
n
2n−i value(path(xi = 2, q)),
i=1
where ∈ {x1 , . . . , xn } \ {xi }, xq ∈ {0, 1}, value is the value of the constant node where points the path consisting of edges labeled by xi = 2, and the other variables equal 0 and 1, as is explained by the following example. Example 114 For n = 2, the dyadic Gibbs derivative is determined from AC-TDD as ⎡ ⎤ 2value(path(02)) + value(path(20)) ⎢ 2value(path(21)) − value(path(02)) ⎥ ⎥ Df = −2−1 ⎢ ⎣ −2value(path(20)) + value(path(12)) ⎦ . −2value(path(12)) − value(path(21)) Remark 50 TDDs are defined in terms of some operations over the cofactors f0 and f1 that determine the subfunctions rooted at the nodes where point the third outgoing edges of nodes. If these are operations in terms of which some differential operators are defined, the relationships between TDDs and differential operators is straightforward. Recursive application of the decomposition rules to build TDDs corresponds to the recursive calculation of logic differential operators of different orders and with respect to different subsets of variables [225]. Different generalizations of logic differential operators for multiple-valued functions are discussed in [279, 280]. The relationships of these differential operators and DDs for MV functions can be established though these generalizations.
10.20
TDDs and STDT(Q)s
In determining the structure of spectral transforms (STs) used in definition of STDT(Q)s, we assumed that the basis Q, represented by columns of a matrix Q, corresponds to the decomposition assumed for the domain group G. The correspondence is expressed through the Kronecker product structure of Q and the required orders of its submatrices Qi , whose orders are determined by the cardinality of the subgroups Gi . Ternary DTs (TDTs) [189] are an example of DTs on C2n , where we keep the correspondence between Q and the decomposition for G through the
232
F
10. Spectral Interpretation of Ternary Decision Diagrams
Fe I
Figure 10.13. Assignment of f to a TDT.
Kronecker product structure and the number of rows in Q. However, the number of columns in Q is extended from 2n to 3n [240]. Thus, TDTs are DTs defined with respect to the extended basis [240]. Such extensions have proven to be very useful in many applications, since the extension of the basis considerably increases the amount of information about f contained in a TDT for f . In terms of elements of DTs, this extension corresponds to the introduction of the third outgoing edge for each node. This edge points to a value determined by the application of some operation to the values pointed to by the first two edges. Fig. 10.13 shows the assignment of f to a TDT. In this figure, Fe is the extended truth-vector for f [240]. The elements of Fe are spectral coefficients determined with respect to the extended basis used in definition of the TDT. Especially interesting are EXOR-TDTs [188], where the operation used to determine the value pointed by the third outgoing edge is EXOR. Due to that, the EXOR-TDT for some f contains all the possible pseudo-Kronecker AND-EXOR related DTs for f [187]. Thus, Kronecker DTs, fixed polarity Reed-Muller DTs, pseudo-Reed-Muller DTs, and BDT are included as examples. Remark 51 If R is the set of all AND-EXOR related DTs for a given function f , then the EXOR-TDT for f is the power set P(R). Arith-TDD are used in functional decomposition and detection of prime impicants and prime implicates [192]. AC-TDD are used in the detection of arithmetic polynomial expressions over C, representation of multi-output switching functions, and exact minimization of FPARs.
10.21
Summary
1. Spectral interpretation extends to TDDs through the extended ReedMuller (ERM) transform. The values of constant nodes in a TDD are coefficients in the ERM-spectrum fe of f .
10.21.
Summary
233
2. The basic ERM-transform matrix is defined as a combination of basic transform matrices I(1), R(1), and R(1). 3. The columns of a matrix left inverse for the ERM-transform matrix define an extended basis for f and a basis for fe . 4. Spectral interpretation of TDDs permits calculation of the values of constant nodes in a TDD for f through the BDD for f . 5. From EXOR-TDDs, we can determine the values of Boolean differences, which are values of coefficients in Reed-Muller expressions for switching functions. 6. Word-level TDDs are defined as a generalization of EXOR-TDDs for interpretation of EXOR as the addition and the subtraction in GF (2). 7. From AC-TDDs we can determine coefficients in arithmetic expressions for discrete functions in C(C2n ). These values are the values of partial dyadic Gibbs derivatives. 8. Arith-TDDs are used in functional decomposition and detection of prime impicants and prime implicates [192]. AC-TDD are used in detection of arithmetic polynomial expressions over C, representation of multi-output switching functions, and exact minimization of FPARs.
11 Group Theoretic Approach to Optimization of Decision Diagrams
What does the group theoretic approach to Logic Design means? The group theoretic approach to switching theory and logic design dates back to the origin of these fields [124]. It has also been used by some authors in different applications in these areas [198, 268]. Recently, this approach has been used in optimization of decision diagrams and polynomial representations [216, 217, 223, 232, 238]. It consist basically of assuming a group structure for the domain of switching functions. Thus, switching functions are considered as functions on finite dyadic groups C2n . However, some other groups can be also used, which may result in advantages in particular applications. For example, by pairing input variables, (xi , xj ) → Xq , where xi , xj ∈ {0, 1}, and Xq ∈ {0, 1, 2, 3}, a switching function fn of n = 2r variables can be converted into an r-variable four-valued input binary output function fr . In this way, the dyadic group C2 as the domain for binary variables is replaced by the cyclic group of order four C4 for quaternary variables. Thus derived multiple-valued-input two-valued-output functions are useful for simplification of PLAs with input decoders, simplification of multi-output functions, state assignment, code assignment, and design of multi-level logic networks [177, 179, 180, 191]. This approach has been further developed (see, for example, [114, 133]), into spectral techniques for logic synthesis [103, 105], since switching functions are considered as elements of vector spaces on finite groups. The advent in these areas has been periodically reviewed in the literature [116, 117, 154]. The present renewed interest in spectral and essentially
236
11. Group Theoretic Approach to Optimization of Decision Diagrams
BDD [19],MTBDD [32]
x
1 0 0 1
PPRM [187]
x
x
x
x
y
y
y
x+y
WDD [243]
CHTDD [66]
1 1
1 −1
x+y
x -i
y
1 0 1 1
x-y
y
1 i −i −1
i -1
x+iy -ix-y
Table 11.1. Nodes in DDs on C2n .
related group theoretic approach to logic design is dictated by the everincreasing demands of technology and practice which can hardly be met by classical approaches. In particular, spectral techniques may provide for simple and elegant analytic solutions where the traditional approaches are reduced to brute force search methods [117]. At the same time, this approach appears to provide a uniform and consistent theoretic environment for recent achievements in this area, achievements which appear divergent and disperse in many other approaches [220, 239, 241]. Can we use the group theoretic approach to the optimization of decision diagrams? If the cost of a DD-representation is defined as cost(DD) = cost(node) × size(DD) + cost(interconnections), then BDDs and MTBDDs take advantage of having simple nodes which can be realized by (2 × 1) multiplexers. However, there are functions whose BDDs are of an exponential size with regard to the number of node counts. For such functions, other DDs can be formed by using different expansion rules [196], or alternatively, different spectral transforms [219, 241], thereby increasing the complexity of the nodes. Table 11.1 shows examples of few such DDs, the matrix description of the nodes used in these DDs, and the realizations of nodes expressed in the form of signal flow-graphs that are used in description of basic operations in related spectral transforms [243].
11.1. DDs on C4
237
From the logic networks point of view, such DDs map directly into networks consisting of simple two-input modules realizing the operations determined by the matrices describing the nodes. In such networks, the area is proportional to the size and the width of the related DDs. In DDs on C2n , the depth is equal to the number of variables n in the represented functions. The propagation delay is proportional to the depth of the DDs. In many cases, besides the size and depth, the price paid for the simplicity of modules is complexity of interconnections. Therefore, in optimization of DD-representations, some efforts have been devoted to the reduction of the cost of interconnections; this has resulted in planar DDs [194] and DDs with regular layout [164].
11.1 DDs on C4 Why to use DDs on C4 ? In realizations with programmable logic devices, such as LUT FPGAs, realization of any function up to the number of variables equal to the number of the inputs for the LUT, has the same cost. The delay time for interconnections is often larger than that for LUTs. Thus, it is more important to reduce the propagation delay than to reduce the number of LUTs. To reduce the propagation delay, we have to reduce the number of levels in the network, which directly corresponds to the number of levels in the DD. The propagation delay is smaller in networks with regular interconnections and layout. With this motivation, in [193], the quaternary DDs (QDDs) were proposed. QDDs consist of nodes with four outgoing edges corresponding to four-valued decision variables. The switching functions are represented by QDDs through pairing binary variables and encoding each pair with a quaternary variable. In this way, the number of levels in related DDs is reduced from n to n/2 by increasing the number of outgoing edges of nodes from two to four. Multiple-place DDs (MDDs) [263] are a particular example of QDDs, where the mapping performed at each node to assign a given f with four-valued variables to the MDD is the identity transform described by the (4 × 4) identity matrix. Therefore, MDDs are a straightforward generalization of BDDs. Extension of QDDs to represent complex-valued functions on C2n is directly possible. In this case, they are a generalization of MTBDDs and we refer to them as multi-terminal DDs (MTDDs) [220]. The method for optimization of DDs by pairing of variables, i.e., by converting switching functions into four-valued functions, originates in bit-pairing approaches to the optimization of PLAs with decoders [178]. Recently, the method is improved by using dynamic shifting to optimize the MDDs obtained by encoding pairs of binary variables [97]. Further im-
238
11. Group Theoretic Approach to Optimization of Decision Diagrams
provement is proposed in [200], where dynamic variable ordering is used to determine a suitable order of variables before pairing them. At each step of variable ordering, a new pairing adapted to the current order of variables is performed. What are the relationships between MDDs and QDDs? In spectral interpretation, MDDs are the simplest example of QDDs, since they are defined with respect to the identity transform. In [193], a further step toward optimization of QDDs is proposed through the definition of Kronecker and pseudo-Kronecker QDDs. These QDDs are introduced by allowing us to choose freely for each level in Kronecker and for each node in pseudo-Kronecker QDDs, any of 840 essentially different (4 × 4) non-singular binary-valued matrices, thus, matrices (with identical entries) which differ in the order of rows and columns are not distinguished. Table 11.2 shows examples of matrices describing nodes in different QDDs. The identity transform I4 corresponding to MDDs, the Reed-Muller transform of order four R4 , and a combination of them RI/RM are included as particular examples, together with another matrix Q used as an illustrative example in [193]. For this matrix, it was impossible to provide a suitable factorization to derive an acceptable two-step FFT-like algorithm. QDDs defined by using R4 for all the nodes correspond to the optimization of Functional DDs (FDDs) [113] or positive polarity Reed-Muller DDs (PPRMDDs) [187] by pairing of variables. At the same time, thus derived QDDs belong to the broad class of Kronecker QDDs, which can be simply derived from MDDs by performing at each node of the MDD the operations described by the matrix determining the nodes at the corresponding level in the Kronecker QDD in a way described in [227, 251, 252]. Another example of QDDs derived by using any of 840 possible non-singular matrices for nodes is presented in [163]. This variety of possible assignments of matrices to the nodes in a DD, provides for a large choice of different DDs for a given function f . However, as in Kronecker and pseudo-Kronecker DDs on C2n , the key issue in practical applications is the lack of a criterion or an efficient algorithm to choose a suitable combination of matrices for nodes in a QDD for f . Some heuristic to reduce the search space for Kronecker and pseudo-Kronecker QDDs with the minimum number of nodes is proposed in [193]. In the group theoretic approach, QDDs in [193], DDs in [163], and methods for pairing of variables producing MDDs as a particular example of QDDs [200], can be uniformly considered as optimization of DDs by changn/2 ing the domain group for the represented functions from C2n into C4 . If n is an odd number, then the root node is chosen as a node on C2 .
11.2. DDs on Quaternion Groups
MDD ⎡
1 ⎢ 0 ⎢ ⎣ 0 0
0 1 0 0
0 0 1 0
PPRM4 ⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
x y v w
x y v w
⎡
1 ⎢ 1 ⎢ ⎣ 1 1
1 ⎢ 0 ⎢ ⎣ 1 1
x y v w
0 1 0 0
0 0 1 0
0 0 1 1
⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
x x+y x+v x+y+v+w QDD
⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
x y x+v x+y+v+w
0 1 0 1
x y v w
QDDI/RM ⎡
239
⎡
1 ⎢ 1 ⎢ ⎣ 0 1
0 1 1 0
1 0 1 0
x y v w
⎤ 0 0 ⎥ ⎥ 1 ⎦ 0
x+v x+y y+v+w x
Table 11.2. Nodes in DDs on C4n .
11.2 DDs on Quaternion Groups In what follows, the optimization of DDs by changing the domain group structure is further generalized by using non-Abelian groups defined as the direct product of C2 , C4 , and the quaternion group Q2 , each of them possibly raised to some integer power, depending on the number of variables in a given function f . What is the quaternion group? The quaternion group Q2 is generated by two elements say, a and b, and the group identity is denoted by e. If the group operation is written as abstract multiplication, the following relations hold for the group generators: b2 = a2 , bab−1 = a−1 , a4 = e. The unitary irreducible representations of Q8 over C are given in Table 11.3. In this table
1 0 1 0 −1 0 I= ,A = ,B = , 0 1 0 −1 0 1
240
11. Group Theoretic Approach to Optimization of Decision Diagrams
C=
0 −1 1 0
,D =
0 1 1 0
,E =
0 1 −1 0
.
The dual object Γ of Q2 is of the cardinality 5, since there are five irreducible unitary representations of this group. x
R0
R1
R2
R3
R4
0 1 2 3 4 5 6 7
1 1 1 1 1 1 1 1 r0 = 1
1 1 1 1 -1 -1 -1 -1 r1 = 1
1 -1 1 -1 1 -1 1 -1 r2 = 1
1 -1 1 -1 -1 1 -1 1 r3 = 1
I iA −I iB C −iD E iD r4 = 2
Table 11.3. Irreducible unitary representations of Q2 over C.
Definition 76 The direct and inverse Fourier transforms of a function f ∈ P (G) are defined, respectively, by, Sf (w) = rw g
−1
g−1
f (u)Rw (u−1 ),
(11.1)
u=0 K−1
T r(Sf (w)Rw (x)).
(11.2)
In matrix notation, the Fourier transform on Q2 ⎡ 1 1 1 1 1 1 ⎢ 1 −1 1 −1 1 −1 1⎢ −1 1 1 1 1 −1 −1 [Q2 ] = ⎢ 8⎢ ⎣ 1 −1 1 −1 −1 1 2I 2iB −2I 2iA 2E 2iD
is defined by the matrix ⎤ 1 1 1 −1 ⎥ ⎥ −1 −1 ⎥ ⎥. −1 1 ⎦ 2C −2iD
f (x) =
w=0
How does this change of the domain relate to the variables? Fig. 11.1 illustrates this change of the domain groups. In the replacement of C22 by C4 , a subtree consisting of three non-terminal nodes with two outgoing edges is replaced by a node with four outgoing edges [193, 200]. Fig. 11.2 shows this transformation of DDs. In this way, a BDD with n levels is transferred into a QDD with n/2 levels by utilizing the increased functionality of nodes. In a QDD, each node represents a function taking four different values.
11.2. DDs on Quaternion Groups
241
,4,5,6,7 Q2
Figure 11.1. Domain groups.
This replacement reduces the number of variables to be controlled, which reduces the depth and in many cases the size of the DD, and the complexity of interconnections. In these cases, from QDDs, we may produce networks having a regular structure. The price is the increased cost of nodes expressed in the number of edges counted, which in many cases results in the increased width of the QDDs. With this motivation, we propose the use of non-Abelian groups, which permit us to reduce the depth and the width
242
11. Group Theoretic Approach to Optimization of Decision Diagrams
simultaneously, and in many cases also the size of DDs. What could be the advantages of non-Abelian groups and what are relationships between the domain groups and decision diagrams? The advantages of non-Abelian groups in optimization of DDs originate in basic features of group representations for non-Abelian groups, which may be briefly explained as follows: In the group theoretic approach, the recursive structure of DDs originates in the decomposition of the domain group G for represented functions into the direct product of some subgroups Gi ; thus, G = ×ni=1 Gi , where n is the number of variables in f . In BDDs, Gi = C2 , and in QDDs, Gi = C4 for each i. Spectral interpretation shows that for each DD, a given function f is assigned to the DD through a spectral transform on the not necessarily Abelian domain group G for f [219, 243]. In this interpretation, the number of outgoing edges for a node with the decision variable xi taking values in Gi is equal to the cardinality of the dual object Γi for Gi . For Abelian groups, Γi expresses the structure of a group isomorphic with Gi . Therefore, the number of edges is equal to the number of different values xi can take. However, for non-Abelian groups, the dual object consists of group representations Rw whose orders are rw ≥ 1 [101, 237]. Therefore, the cardinality of Γi is always smaller than that of Gi . In particular, the dual object for Q2 consists of four representations Rw of orders rw = 1, w = 0, 1, 2, 3 and a single representation R4 of order r4 = 2. Therefore, an eight-valued variable x ∈ Q2 is represented by a node having five outgoing edges corresponding to Rw , w = 0, 1, 2, 3, 4. Thus, if the Fourier transform on Q2 is used to assign a given f on Q2 to a DD, then this DD reduces to a single non-terminal node with five outgoing edges. The edges point to the Fourier coefficients Sf (w), w = 0, 1, 2, 3, 4, each of them corresponding to a irreducible group representation Rw . Therefore, the coefficient Sf (4) is a (2 × 2) matrix, and thus it is denoted by Sf (4). This matrix can be represented by a node with four outgoing edges, if it is considered as a function on C4 obtained by concatenating the rows or columns of Sf (4). Thus, this function may be given by the vector Sf (4) = (0,0) (0,1) (1,0) (1,1) [Sf (4), Sf (4), Sf (4), Sf (4)]T . Fig. 11.3 shows a transformation from a BDD into a QDD and a Fourier DD on Q2 . Compared to QDDs and optimization by variable pairing, where C2n is n/2 replaced by C4 , by using Q2 , a triplet of binary variables (xi , xj , xk ) is replaced by an eight-valued variable on Q2 . In that way, the domain group C2n for f is replaced by Qk2 , for n = 3k, by C2 Qk2 for n = 3k + 1, and by C4 Qk2 for n = 3k + 2. We denote by R the set of these groups, thus, R = {Qk2 , C2 Qk2 , C4 Qk2 }.
11.2. DDs on Quaternion Groups
243
f f
S2 0 S2 0
1
1 S2 0 1
f(0) f(1) f(2) f(3)
S4 0 1 2 3 f(0) f(1) f(2) f(3)
Figure 11.2. BDD and QDD.
We denote decision diagrams on groups in R as Fourier DDs on nonAbelian groups (FNADDs). In FNADDs, for nodes corresponding to C2 and C4 , we may use the Shannon nodes, in the same way as in BDDs and MTBDDs, or the nodes determined by the basic Walsh (Fourier), W(1) and Vilenkin-Chrestenson (Fourier), VC(1) transform matrices [114]. As in the Abelian case, the Shannon nodes are denoted by S2 and S4 , respectively. Fourier nodes on Q2 are denoted by FNA5 . Table 11.4 specifies the nodes in FNADDs. In the flow-graph describing the nodes on Q2 , the weights at the edges are determined as elements from the rows in Q2 , as is shown at the outputs. Thus, at each output, for the fifth edge, the input z and the weight are (2 × 2) matrices. Fig. 11.4 shows this flow-graph without using matrix notation for the group representations and related Fourier coefficients [115]. It should be noted that in DD-representations we are dealing and manipulating with indices pointing to the nodes, without necessarily taking into account the values of constant nodes. These values are taken into account when we want to determine some concrete function value at a specified point of the domain G. In this case, we use FFT (Fig. 11.4); and in other cases, we are working with indices pointing to the values of constant nodes. Thus, in DDs on Q2 , we use five outgoing edges for FNA5 nodes. Due to that, we may exploit the advantages of reduction of both depth and width offered by group representations of non-Abelian groups where, unlike Abelian groups, the order of group representations rw ≥ 1, w ∈ Γ, where Γ is the dual object for G. Can we define FNADDs in a way similar to that used in BDDs? In a formal way, FNADDs are defined recursively as follows, assuming the Shannon nodes for Abelian subgroups C2 and C4 . A similar definition can be given for the use of nodes defined with respect to the Walsh and Vilenkin-Chrestenson transforms.
244
11. Group Theoretic Approach to Optimization of Decision Diagrams
f 0
S2
1 S2
S2 0
0
1
1
S2
S2
S2
S2
0 1
0 1
0 1
0 1
f(0) f(1) f(2) f(3) f(4) f(5) f(6) f(7)
f S2 0 S4 0 1 2 3
1 S4 0 1 2 3
f(0) f(1) f(2) f(3) f(4) f(5) f(6) f(7)
Figure 11.3. BDD, QDD, and FNADD.
11.2. DDs on Quaternion Groups
Sf(0)
f(0)
Sf(1)
j
Sf(2) j
Sf(3) S S
(0, 0) f
245
f(1) f(2) f(3)
(4)
f(4)
(4)
f(5)
(0, 1) f
(1, 0) Sf (4)
j
f(6)
j
f(7)
(1, 1)
Sf (4) Figure 11.4. FFT on Q2 .
Definition 77 A FNADD is a 1. constant node v labeled by value(v), where value(v) ∈ C. 2. non-terminal node v to which a variable xi ∈ Gi is assigned, Gi ∈ {C2 , C4 , Q2 }, with outgoing edges pointing to two, four, or five other FNADDs, depending on Gi , where v is labeled by index(v), where ⎧ for Gi = C2 , ⎨ {0, 1}, {0, 1, 2, 3} for Gi = C4 , index(v) ∈ ⎩ {w0 , w1 , w2 , w3 , w4 } for Gi = Q2 , and by a matrix which, depending on Gi , may be either the identity matrix I2 , and I4 , or the Walsh and Vilenkin-Chrestenson matrix W(1) and VC(1), and the matrix Q2 of unitary irreducible representations of Q2 . The correspondence between a FNADD and a given function on G ∈ R is determined as follows: Definition 78 An FNADD having a root node v represents a function fv defined recursively as follows: If v is a constant node and the value(v) = c, then fv = c. If v is a non-terminal node, then 1. fv = xi f0 + xi f1 , for Gv = C2 , 3 2. fv = i=0 Ji (xj )f (xj = i), for Gv = C4 , where f (xi = j) denotes f (x1 , . . . , xj−1 , j, xj+1 , . . . , xn ), xj ∈ {0, 1, 2, 3}, and Ji (xj ) i = 0, 1, 2, 3 are characteristic functions defined by 1, if xj = i, Ji (xj ) = 0, otherwise;
246
11. Group Theoretic Approach to Optimization of Decision Diagrams
C2
C4 ⎡
I2 = W(1) =
x y
1 0 0 1
1 1
1 ⎢ 0 I4 = ⎢ ⎣ 0 0
1 −1
x+y x-y
0 1 0 0
0 0 1 0
⎤ 0 0 ⎥ ⎥ 0 ⎦ 1
⎡
⎤ 1 1 1 1 ⎢ 1 i −1 −i ⎥ ⎥ VC(1) = ⎢ ⎣ 1 −1 1 −1 ⎦ 1 −i −1 i x y v w
-1 -1 -1
i -i
x+y+v+w x-y+v-w x+iy-v-iw x-iy-v+iw
Q2 ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ Q2 = ⎢ ⎢ ⎢ ⎢ ⎢ ⎣
x y v w z
⎤ 1 1 1 1 I 1 1 −1 −1 iA ⎥ ⎥ 1 1 1 1 −I ⎥ ⎥ 1 1 −1 −1 iB ⎥ ⎥ 1 −1 1 −1 C ⎥ ⎥ 1 −1 −1 1 −iD ⎥ ⎥ 1 −1 1 −1 E ⎦ 1 −1 −1 1 iD
x+y+v+w+zI x+y-v-w+izA x+y+v+w-zI x+y-v-w+izB x-y+v-w+zC x-y-v+w-izD x-y+v-w+zE x-y-v+w+izD
Table 11.4. Nodes in FNADDs.
3. fv = wi ∈Γi T r(Sf (wi )Rwi (xi )), for Gv = Q2 , where for a matrix Y, T r(Y) denotes the trace of Y,i.e. the sum of elements on the main diagonal in Y. FNADDs are illustrated by the following example. Example 115 The outputs of the 3-bit multiplier may be represented by the integer function fZ given by the truth-vector obtained by the summation
11.2. DDs on Quaternion Groups
247
of outputs multiplied by 2i , i = 0, . . . , 5, [114]: F =
[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 0, 2, 4, 6, 8, 10, 12, 14, 0, 3, 6, 9, 12, 15, 18, 21, 0, 4, 8, 12, 16, 20, 24, 28, 0, 5, 10, 15, 20, 25, 30, 35, 0, 6, 12, 18, 24, 30, 36, 42, 0, 7, 14, 21, 28, 35, 42, 49]T .
If fZ is considered as a function on the finite non-Abelian group G64 = Q2 × Q2 , where Q2 is the quaternion group, the Fourier spectrum of fZ is Sf (w)
1 [49, −7, 28, 0, Sf (4), −7, 1, 4, 0, Sf (9) 4 −28, 4, 16, 0, Sf (14), 0, 0, 0, 0, Sf (19) Sf (20), Sf (21), Sf (22), Sf (23), Sf (24)]T ,
=
where
1 − i −1 + i Sf (4) = Sf (20) = −7 , −1 + i 1+i
1 − i −1 + i , Sf (9) = Sf (21) = −1 + i 1+i
1 − i −1 + i Sf (14) = Sf (22) = 4 , −1 + i 1+i
0 0 Sf (19) = Sf (23) = 0 0 ⎡ −i −1 + i 1 −1 − i ⎢ −1 + i 1 1 + i i Sf (24) = 2 ⎢ ⎣ i 1−i 1 −1 − i −1 + i −1 1 + i i
⎤ ⎥ ⎥. ⎦
We represent the matrix-valued nodes by the MTDTs with nodes having the corresponding number of edges by taking advantages of the properties of the matrix-valued Fourier coefficients. It should be noted that in many cases, matrix-valued Fourier coefficients are symmetric, Hermitean, or skew-Hermitean matrices. In that way we produce the complex-valued Fourier DD representing the 3-bit multiplier. The complexity of representation of the 3-bit multiplier with MTDDs for different decompositions of G64 and complex-valued Fourier DDs on G64 = Q2 × Q2 is compared in Table 11.5. This table shows the depth (d), the number of non-terminal nodes (ntn); the width (w); the minimum (min) and the average number of nodes per levels (av); and the number of constant nodes(cn), the total of nodes, i.e., the size (s), and the maximum number of edges per node (e). Fourier DDs permit the use of nodes with negated edges (FNADD n.e. in Table 11.5). Thanks to that, the number of constant nodes may be con-
248
11. Group Theoretic Approach to Optimization of Decision Diagrams
siderably reduced. In this example, the negative edges cannot be used with MTDDs. Fig. 11.5 shows the MTDD for the 3-bit multiplier for the decomposition G64 = C4 × C4 × C4 . Fig. 11.6 shows FNADD for the 3-bit multiplier with matrix-valued nodes. This mvFNADD is equal to the MTDD on G64 = Q2 × Q2 . Fig. 11.7 shows FNADD with number-valued constant nodes for the 3-bit multiplier for the decomposition G64 = Q2 × Q2 . In this FNADD, matrix-valued nodes in mvFNADD are represented by MTBDDs. Number of MTBDD C26 MTDD C22 × C42 MTDD C4 × C4 × C4 MTDD C8 × C8 FNADD Q2 × Q2 FNADD n. e. Q2 × Q2
non-terminal max min
l
n
av
cn
s
e
5
55
28
2
11
26
81
2
3
20
14
2
6.66
26
46
4
2
18
14
4
9
26
44
4
1
7
7
7
7
26
34
8
2
8
4
4
4
25
33
5
2
8
4
4
4
17
23
5
Table 11.5. Complexity of DD-representation of the 3-bit multiplier, in terms of depth (d), non-terminal nodes (ntn), width (w), minimum (min) and average (av) number of nodes per a level, constant nodes (cn), size (s), and the number of edges (e) of nodes.
11.3 Applications of FNADDs What could be the applications of DDs on non-Abelian groups? As in QDDs and other DDs using large Abelian subgroups in the decomposition of the domain group G for the represented functions, the usage of non-Abelian groups in FNADDs provides for depth reduction, which, in circuit realizations, implies reduced propagation delay. Unlike QDDs and other DDs on Abelian groups, in FNADDs the larger subgroups in the domain group do not necessarily increase the width of the DDs, due to the properties of group representations on non-Abelian groups. In many cases, the reduction in both depth and width also results in a smaller area of the network. Increased functionality of nodes provides
11.3. Applications of FNADDs
249
Figure 11.5. MTDD for the 3-bit multiplier on G64 = C4 × C4 × C4 .
FNA5 w14
w10 w11
FNA5 w2 0
4
2 w21 w2
49
-7
w2
28
3
w20 2
w21 w2 S(4)
1
FNA5
FNA5
FNA5
3
w2
w13
w12
w2 4 w2
4
0
w2
S(9)
3
w21
w2
w20
w22 w23
4 w22 w2
-28
16
w24
w21
S(14)
0
S(24)
Figure 11.6. Matrix-valued FNADD for the 3-bit multiplier on G64 = Q2 × Q2 .
for a better exploitation of basic modules and reduction in the number of modules. It follows that we may design networks with regular structure and simplified interconnections. Because of the smaller number of non-terminal nodes and the reduced ratio of non-terminal and constant nodes, FNADDs may be also useful in calculation procedures and algorithms derived from DD-representations, in which case, each non-terminal node requires a subprocedure, and values of constant nodes are considered as the input data. The reduced depth makes FNADDs useful in applications where it is nec-
250
11. Group Theoretic Approach to Optimization of Decision Diagrams
Figure 11.7. FNADD for the 3-bit multiplier on G64 = Q2 × Q2 .
essary to traverse frequently from the root node to the constant nodes, as in problems of verification and satisfiability [40].
11.3.1 Experimental Results Example 116 Tables 11.6 to 11.9 compare the size (s), the width (w), and the area (a = sw) of shared BDDs (SBDDs) and Fourier DDs (FNADDs) on quaternion groups for adders and multipliers. We also show the number of non-terminal nodes (ncn), the constant nodes (cn), and the percentage of used nodes in the DD of the total nodes in the corresponding decision trees. Example 117 Table 11.10 compares sizes (s) and widths (w) of SBDDs and FNADDs for various benchmark functions. For FNADDs the values of non-terminal nodes (ntn) and constant nodes (cn) are shown separately. Thus, the size of FNADDs is the sum of these two values. This table shows that, besides depth reduction, we get width reduction, except for 5xp1. Except for this function and con1, the area is also reduced. We also show
11.3. Applications of FNADDs
n 2 3 4 5 6
cubes 11 31 75 167 355
ntn 190 55 101 224 475
cn 2 2 2 2 2
size 8 57 103 226 477
SBDD width 21 20 30 62 126
a 168 1140 3090 14012 60102
251
% 22.00 42.86 19.84 10.98 5.81
Table 11.6. SBDDs for adders.
n 2 3 4 5 6
cubes 11 31 75 167 355
ntn 4 6 14 18 21
cv 7 7 14 16 12
FNADD size width 11 2 13 4 28 7 34 7 33 7
a 22 52 196 238 231
% 52.38 31.70 33.73 8.31 4.00
Table 11.7. FNADDs for adders.
n 2 3 4 5 6
cubes 7 32 128 488 939
ntn 17 61 157 471 786
cn 2 2 2 2 2
size 19 63 159 473 788
SBDD width 5 15 39 114 192
a 95 945 6201 53912 151296
% 14.28 11.27 7.51 5.54 2.34
Table 11.8. SBDDs for multipliers.
the ratio between the non-terminal and constant nodes, rn = ntn/cn. In SBDDs, rn = size/2. In FNADDs, rn is quite a bit smaller, which may be convenient, since it usually implies networks with reduced complexity of internal interconnections. That is also convenient in realizations where we may want to reduce the number of modules at the price of an increased
n 2 3 4 5 6
cubes 7 32 128 488 939
ntn 4 9 24 37 45
cv 10 20 42 50 49
FNADD size width 14 2 29 4 66 11 87 17 94 22
a 28 116 726 1479 2068
Table 11.9. FNADDs for multipliers.
% 9.52 9.75 13.25 4.51 2.68
252
f 5xp1 bw con1 rd53 rd73 xor5
11. Group Theoretic Approach to Optimization of Decision Diagrams
s 90 116 20 25 45 11
SBDD w a 25 2250 37 4292 5 100 6 150 10 450 2 22
ntn 39 9 13 7 23 5
cn 128 25 12 14 30 6
s 167 34 25 21 53 11
FNADD w a 18 3006 4 136 6 150 3 63 6 318 2 22
rn 0.35 0.36 1.83 0.50 0.70 0.83
group C2 Q22 C4 Q2 C2 Q22 C4 Q2 W2 Q22 C4 Q2
Table 11.10. SBDDs and FNADDs for benchmark functions.
number of external inputs. For example, in xor5, these are 5.5 and 0.83, respectively.
11.4 Features of DDs on Finite Groups The group theoretic approach to the optimization of DDs can be described as a traverse from a complex DD with simple nodes to a simple DD consisting of nodes with increased functionality, where the functionality of a node is approximately expressed though the number of different functions a node can represent. We interpreted the optimization of DD-representations by using quaternary DDs instead of binary ones through pairing binary variables [193], as the change of the domain groups for the represented functions. The use of larger subgroups in the domain group results in increased functionality of nodes, which provides for reduction of the depth of the DDs. However, in many cases, the width of the DD is increased. Because of the properties of their unitary irreducible group representations, this disadvantage can be overcome by using non-Abelian groups. Instead of an exhaustive search among many possible DDs on the chosen Abelian domain group with large subgroups, we propose to use Fourier DDs on non-Abelian groups to achieve the same depth reduction with a small width and convenient ratio between the non-terminal and constant nodes in the derived DDs. Transition into the spectral domain on non-Abelian groups permits us to represent larger subfunctions with a smaller number of outgoing edges per node compared to Abelian groups. For integer or complex-valued functions, it may provide for reduction of the number of constant nodes, due to the properties of Fourier spectral coefficients. In particular, to represent a three-variable switching function f , BDDs require seven nodes with two edges, QDDs have a node with two edges and two nodes with four edges, and FNADDs on Q2 consists of a node with five edges and a node with four edges. An Abelian group of order 8 requires a single node with eight outgoing edges;
11.5. Summary
253
therefore, there is no possibility for optimization by compromising between the number of nodes and outgoing edges. A library of non-Abelian groups of orders suitable to represent switching and MV functions should provide different FNADDs. In [217], the Fourier DDs on non-Abelian groups are extended to represent matrix-valued functions. The applications are in the representation of switching functions converted into matrix-valued functions by splitting the vector of function values for a given function f into subvectors that are represented as rows or columns of some matrices. Thus derived matrix-valued functions are represented by Fourier DDs on non-Abelian groups with preprocessing (FNAPDDs) [217]. The matrix-valued nodes in FNAPDDs can be represented by MTDDs or STDDs. Therefore, optimization of DD representation for a given f can be performed by choosing the non-Abelian group for FNAPDD(f ), and then by selecting different DDs for matrix-valued constant nodes.
11.5 Summary 1. The optimization of DD-representations by using quaternary DDs instead of binary ones through pairing binary variables is interpreted as the change of the domain groups for the represented functions. 2. The use of larger subgroups in the domain group results in the increased functionality of the nodes, which provides for reduction of depth of DDs. However, in many cases, the width of the DD is increased. Because of the properties of their unitary irreducible group representations, this disadvantage can be overcome by using non-Abelian groups. 3. Instead of an exhaustive search among many possible DDs on the chosen Abelian domain group with large subgroups, we propose to use Fourier DDs on non-Abelian groups to achieve the same depth reduction with a small width and convenient ratio between the nonterminal and constant nodes in the derived DDs. 4. Transition into the spectral domain on non-Abelian groups permits us to represent larger subfunctions with a smaller number of outgoing edges per node compared to Abelian groups. For integer- or complexvalued functions, it may provide for reduction of the number of constant nodes, due to the properties of Fourier spectral coefficients.
12 Closing Remarks
Spectral interpretation of decision diagrams (DDs) exploits abstract harmonic analysis on finite groups to determine the real meaning of DDs formally viewed as data structures. It provides for a unified view to various DDs through the spectral transform DDs (STDDs) [243]. The spectral interpretation of DDs applies to any DD for representation of discrete functions on different, not necessarily Abelian, groups. The group theoretic approach to DDs permits a uniform discussion of different methods for optimization of DDs. Different decomposition rules performed at the nodes to assign a given function f to a DD, can be described as optimization by nodes. Methods for reduction of DDs by manipulating with labels at the edges known as the optimization of DDs by edges. In spectral interpretation, decomposition rules are related to direct spectral transforms, while labels at the edges are interpreted as the inverse in the transform pair. In this interpretation, both optimization approaches can be expressed through spectral methods. Fig. 12.1 is a DD that reviews decision diagrams with respect to domain and range of represented functions and basic features of DDs.
Figure 12.1. DD of decision diagrams.
Range
b
GF(3) GF (3)
Kleene Algebra
C2n
a
Attributed Edges
Domain
c
y
i
EV+
GF(2) GF (2)
d
n
Cp
DD
k
l
w
g
EV* EV*
e
f
AG
h
EV+,* m
NAG
t
j
x
GF(p)
q
v s
Rational Numbers
r
MV
C
Constant Nodes
Floating Point
EV+,* - additive and multiplicative weights
NV n
EV - edge valued NV - number valued MV - matrix valued
EV+ - additive weights EV* - multiplicative weights
NAG - Arbitrary non-Abelian group
AG - Arbitrary Abelian group
a = Kleene TDD b = TDD-U c = BDD, FDD=PPRMDD, FPRMDD, Pseudo-RMDD, KDD, Pseudo-KDD, UDD, AND-TDD, EXOR-TDD, OR-TDD, Prime-TDD d = QDD, Pseudo-QDD e = MDD, MDD-SV MDD-SV,, GFDD, RMFDD f = MTDD, FG g = MTDD h = EVFDD i = EVGFDD, EVRMFDD j = EVBDD k = EVCHDD l = *BMD m = FEVBDD, K*BMD n = nvFNADD, nvFNAPDD q = nvFNADD, nvFNAPDD r = mvFNADD, mvFNAPDD s = mvFNADD, mvFNAPDD t = MTBDD, CHDD, HDD x = MTBDD, ACDD, BMD, KBMD, HDD, HSD, HSTDD, Arith-TDD, AC-TDD y = MDD v = mvEXOR-TDD w = *PHDD
256 12. Closing Remarks
Answered Questions
We have attempted to present answers to the following questions. Some of them require a brief review of basic concepts necessary for understanding the theory presented. The others concern spectral interpretation of various DDs. 1. What is meant by the concept signal?
1
2. How can a signal be processed?
2
3. What is the mathematical model for a signal?
2
4. What is a function?
3
5. What is an algebraic structure?
7
6. What is a group?
8
7. What is a field?
11
8. What if k = 2 for a field?
12
9. What are spectral techniques?
17
10. Why are spectral techniques powerful in signal processing?
17
11. What does ”linearly independent” means?
19
12. Do we know an example of linearly independent functions?
19
13. What is the Kronecker product?
21
14. How do we find Rn −1?
22
258
Answered Questions
15. Is it possible to calculate the coefficients (in polynomial expressions for switching functions) over other fields, for example, the field of rational numbers Q or complex numbers C
24
16. What could be the differences and advantages of ARs compared to PPRMs?
27
17. Where are ARs used?
28
18. What is abstract harmonic analysis?
46
19. What are spectral transforms?
47
20. Why use spectral transforms, and what are their applications?
48
21. Are spectral techniques useful for something?
48
22. What are decision diagrams?
71
23. What are decision trees?
71
24. How do we represent multi-output functions?
77
25. What is spectral interpretation of DDs?
77
26. What are bit-level DDs?
84
27. What are spectral transform DDs?
84
28. Is the order of variables important in DDs?
125
29. What are free BDDs?
130
30. Do FBDDs extend the set of bases used in AND-EXOR related DDs?
133
31. What are the relationships among FBDDs and other bit-level DDs?
135
32. What are the relationships among BDDs and FBDDs?
136
33. What are word-level DDs?
145
34. Is it possible to define DDs in terms of non-Kronecker transforms?
149
35. Can DDs be defined in terms of the Haar transform?
150
36. HSDs are similar, but not the same as STDDs. What are the differences?
152
37. What are the relationships between MTBDDs and HSDs?
152
38. What are the relationships between HSDs and other DDs?
154
Answered Questions
259
39. Can we read the Haar coefficients for different ordering of Haar functions from HSDs?
155
40. How can we define DDs in terms of Haar functions to agree with the definition of STDDs?
156
41. We have another class of STDDs. Are they (HSTDDs) useful for something?
157
42. What are possible distinguishing properties of HSTDDs?
157
43. How can we reduce the number of paths in HSTDDs?
158
44. What are the autocorrelation functions?
159
45. How can we use the autocorrelation functions to reduce the Haar spectrum?
159
46. Is this (reduction of the Haar spectrum) useful in practice?
161
47. Are there some relationships between the number of paths and the number of nodes in DDs?
162
48. What are edge-valued DDs?
167
49. What are the relationships of EVBDDs with the Kronecker decision diagrams?
169
50. What is spectral interpretation of edge-valued DDs?
177
51. What are TDDs?
181
52. Does the spectral interpretation of DDs extend to TDDs?
182
53. What is the extended Reed-Muller transform?
186
54. What is the Boolean difference?
201
55. Is there a relationship between Boolean difference and polynomial expressions for switching functions?
203
56. Is it possible to determine values of the Boolean difference at arbitrary points from PPRMDDs?
205
57. What are the relationships between EXOR-TDDs and KDDs?
207
58. What are the relationships between EXOR-TDDs and Kronecker expressions?
207
59. How can we simply read the coefficients in Kronecker expressions from EXOR-TDDs?
211
60. How about pseudo-KDTs, can they be related to EXOR-TDDs?
213
61. What are word-level TDDs?
217
260
Answered Questions
62. What is the decomposition rule used in the definition of Arith-TDDs?
218
63. How do we label edges in Arith-TDDs?
218
64. Can we define TDDs related to ACDDs?
219
65. Can we derive matrix expressions for AC-TDDs as for EXOR-TDDs?
220
66. What are the relationships and the difference among EXOR-TDDs, Arith-TDDs, and AC-TDDs?
221
67. What are the relationships between arithmetic expressions and AC-TDDs? 222 68. How do we correct the sign of arithmetic coefficients?
224
69. How can we determine the minimum FPARs?
226
70. Are there differential operators that may be considered as word-level counterparts of the Boolean difference and related to word-level DDs?
228
71. What are Gibbs derivatives?
228
72. Are there Gibbs derivatives for switching functions?
228
73. What are properties of dyadic Gibbs derivatives?
228
74. What are the relationships of dyadic Gibbs derivatives and AC-TDDs?
231
75. What is the difference in reading partial Gibbs derivatives from EXOR-TDDs and AC-TDDs?
231
76. What does the group theoretic approach to logic design means? 235 77. Can we use the group theoretic approach to optimization of decision diagrams?
236
78. Why use DDs on C4 ?
237
79. What are the relationships between MDDs and QDDs?
238
80. What is the quaternion group?
239
81. How does this change of the domain relate to the variables?
240
82. What could be the advantages of non-Abelian groups, and what are the relationships between the domain groups and decision diagrams?
242
83. Can we define FNADDs in a way similar to that used in BDDs? 243 84. What could be the applications of DDs on non-Abelian groups? 248
References
[1] Agaev, G.N., Vilenkin, N.Ya., Dzafarli, G.M., Rubinstein, A.I., Multiplicative Systems of Functions and Harmonic Analysis on Zero-Dimensional Groups, Elm Publisher, Baku, 1981. [2] Agayan, S.S., Hadamard Matrices and Their Applications, Springer-Verlag, Berlin, 1985. [3] Agaian, S., Astola, J.T., Egiazarian, K., Binary Polynomial Transforms and Nonlinear Digital Filtering, Marcel Dekker, 1995. [4] Ahmed, N., Rao, K.R., Orthogonal Transform for Digital Signal Processing, Springer-Verlag, Berlin, 1975. [5] Aizenberg, N.N., Trofimljuk, O.T., “Conjunctive transforms for discrete signals and their applications of tests and the detection of monotone functions,” Kibernetika, No.5,K, 1981, in Russian. [6] Aizenberg, N.N., Nutakov, V.D., Krenkelj, T.E., Harbat, Ya.G., “Fresnel functions and Fresnel transforms for linear non-singular transforms,” Radiotehnika i elektronika, No. 4, 1984, 698-704. [7] Akers, S.B., “Binary decision diagrams,” IEEE Trans. on Computers, Vol. C-27, No. 6, 1978, 509-516. [8] Bahar, R.I., Frohm, E.A., Gaona, C.M., Hachtel, G.D., Macii, E., Pardo, A., Somenzi, F., “Algebraic decision diagrams and their applications,” Int. Conf. on CAD, November 1993, 188-191. [9] Beauchamp, K.G., Applications of Walsh and Related Functions with an Introduction to Sequency Theory, Academic Press, Bristol, 1984. [10] Becker, B., Drechsler, R., “Efficient graph based representations of multivalued functions with an application to genetic algorithm,” Proc. 24th Int.
262
[11]
[12]
[13]
[14] [15] [16] [17] [18] [19] [20] [21] [22] [23]
[24]
[25]
[26]
[27] [28]
References Symp. on Multiple-Valued Logic, May 25-27, 1994, Boston Massachusetts, 65-72. Benett, L.A.M., “Synthesis of multioutput logic networks using spectral techniques,” IEEE Proc. Computers, Digit. Techn., Vol. 142, No. 4, 1995, 241-248. Bern, J., Gergov, C.J., Meinel, C., Svobodova, A., “Boolean manipulation with Free BDDs first experimental results,” Proc. European Design and Test Conference’94, 1994, 200-207. Besslich, Ph.W., “Determination of the irredundant forms of a Boolean function using Walsh-Hadamard analysis and dyadic groups,” IEE J. Comput. Dig. Tech., 1, 1978, 143-151. Besslich, Ph.W., “Efficient computuer method for XOR logic design,” Proc. IEE Comput., Digit. Techn., 1983, Vol. 130, 203-206. Blachman, N.M., “Sinusoids versus Walsh functions,” Proc. IEEE, Vol. 62, No. 3, 1974, 346-354. Bochmann, D., Steinbach, B., Logikenwurf mit XBOOLE, Verlag Technik GmbH, Berlin, 1991. Bollig, B., Wegener, I., “Improving the variable ordering of OBDDs is NPcomplete,” IEEE Trans. Comput., Vol. C-45, No. 9, 1996, 993-1002. Brace, K.S., Rudell, R.L., Bryant, R.E., “Efficient implementation of a BDD package,” Proc. Design Automation Conf., 1990, 40-45. Bryant, R.E., “Graph-based algorithms for Boolean functions manipulation,” IEEE Trans. Comput., Vol. C-35, No. 8, 1986, 667-691. Bryant, R.E., Chen, Y.-A., “Verification of arithmetic functions with binary moment diagrams,” May 31, 1994, CMU-CS-94-160. Butzer, P.L., Nessel, R.J., Fourier-Analysis and Approximation, Vol. 1, Birkhauser Verlag, Basel and Stuttgart, 1971. Butzer. P.L., Stankovi´c, R.S. (Eds.), Theory and Applications of Gibbs Derivatives, Matematiˇcki institut, Belgrade, 1990. Chang, C.H., Falkowski, B.J., “Properties and applications of Paired Haar transform,” Proc. Int. Conf. on Information, Communications and Signal Processing (1st ICICS), Singapore, September 9-12, 1997, 48-51. Chang, C.H., Falkowski, B.J., “Generation of quasi-optimal FBDDs though paired Haar spectra,” Proc. of IEEE Int. Symp. on Circuits and Systems, (31st ISCAS), Monterey, California, USA, Vol. VI, June 1998, 167-170. Chang, C.H., Falkowski, B.J., “Adaptive exact optimization of minimaly testable FPRM expansions,” IEE Proc. Comput. Digit. Tech., Vol. 145, No. 6, 1998, 385-394. Chang, C.H., Falkowski, B.J., “Haar spectra based entropy approach to quasi-minimization of FBDDs,” IEE Proc. Comput. Digit. Tech., Vol. 146, No. 1, 1999, 41-49. Chen, J.C., Chen, Y.A., “Equivalence checking of integer multipliers,” Proc. ASP-DAC 2001, 2001, 169-174. Chen, Y.A., Bryant, R.E., “An efficient graph representation for arithmetic circuit verification,” IEEE Trans. on CAD, Vol. 20, No, 12, 2001, 1443-1445.
References
263
[29] Chrestenson, H.E., “A class of generalized Walsh functions,” Pacific J. Math., 5, 1955, 17-31. [30] Clarke, E.M., Fujita, M., Zhao, X., “Hybrid decision daigrams - Overcoming the limitations of MTBDDs and BMDs,” Proc. Int. Conf. Computer-Aided Design, 1995, 159-163. [31] Clarke, E.M., McMillan, K.L., Zhao, X., Fujita, M., Yang, J., “Spectral transforms for large Boolean functions with application to technology mapping,” DAC-1993, June 1993. [32] Clarke, E.M., McMillan, K.L., Zhao, X., Fujita, M., “Spectral transforms for extremely large Boolean functions,” in: Kebschull, U., Schubert, E., Rosenstiel, W., Eds., Proc. IFIP WG 10.5 Workshop on Applications of the Reed-Muller Expansion in Circuit Design, 16-17.9.1993, Hamburg, Germany, 86-90. [33] Clarke, E.M., Fujita, M., Zhao, X., “Multi-terminal decision diagrams and hybrid decision diagrams,” in: [196], 93-108. [34] Cohn, M., “Walsh functions, sequency and Gray codes,” SIAM J. Appl. Math., Vol. 21, No. 3, 1971, 442-447. [35] Cooley, J.W., Tukey, J.W., “An algorithm for the machine calculation of complex Fourier series,” Math. Computation, Vol. 19, 297-301, 1965. [36] Drechsler R., Becker, B., “OKFDDs-algorithms, applications and extensions,” in: [196], 163-190. [37] Drechsler R., Becker, B., “Overview of decision diagrams,” IEE Proc. Comput. Digit. Tech., Vol. 144, No. 3, May 1997, 187-193. [38] Drechsler, R., Becker, B., Rupertz, S., “K∗BMD: A data structure for verification,” Proc. European Design and Test Conf., 1996, 2-8. [39] Derchsler, R., Becker, B., Rupertz, S., “K∗BMDs: A verification data structure,” IEEE Design and Test of Computers, June 1997, 51-59. [40] Drechsler, R., Becker, B., Binary Decision Diagrams, Theory and Implementation, Kluwer Academic Publishers, 1998. [41] Drechsler, R., Jankovi´c, D., Stankovi´c, R.S., “Generic implementation of DD packages in MVL,” Proc. 25th EUROMICRO Conference, Vol. 1, 1999, 352-359. [42] Drechsler, R., Sieling, D., “Binary decsion diagrams in theory and practice,” Int. Journal on Software Tools for Technology Transfer, 3, 2001, 112-136. [43] Drechsler, R., Sarabi, A., Theobald, M., Becker, B., Perkowski, M.A., “Efficient representations and manipulation of switching functions based on Ordered Kronecker functional decision diagrams,” DAC-1994, June 1994, 415-419. [44] Drechsler, B., Stankovi´c, R.S., Sasao, T., “Spectral transforms and wordlevel decision diagrams”, SASIMI-97, 39-44. [45] Drechsler, R., Thorton, M.A., “Fast and efficient equivalence checking based on NAND-BDDs,” Proc. IFIP Int. Conf. on VLSI, Montpelier, France, 2001, 401-405. [46] Dubrova, E.V., Muzio, J.C., “Generalized Reed-Muller canonical form for a multiple-valued algebra,” Multi-Valued Logic Jr., 1996, Vol. 1, 65-84.
264
References
[47] Dubrova, E.V., Miller, D.M., “On disjunctive covers and ROBDD size,” Proc. Pacific Rim Conference on Communication, Computers and Signal Processing, Victoria, B.C., Canada, August 23-25, 1999, 162-164. ˇ “Two Hadamard matrices of order 956 of Goethals-Seidal [48] Djokovi´c, D.Z., type,” Combinatorica, Vol.14, No.3, 1994, 375-377. [49] Edwards, C.R., “The generalized dyadic differentiator and its application to 2-valued functions defined on an n-space,” Proc. IEE, Comput. and Digit. Techn., Vol. 1, No. 4, 1978, 137-142. [50] Edwards, C.R., “The Gibbs dyadic differentiator and its relationship to the Boolean difference,” Comput. and Elect. Engng., Vol. 5, 1978, 335-344. [51] Egiazarian, K., Astola, J., “On generalized Fibonacci cubes and unitary transforms,” Applicable Algebra in Engineering, Communication and Computing, Vol. AAECC 8, 1997, 371-377. [52] Falkowski, B.J., “Properties and ways of calculation of multi-polarity generalized Walsh transform,” IEEE Trans. on Circuits and Systems, Vol. CAS-41, No. 6, 1994, 380-391. [53] Falkowski, B.J., ”A note on the polynomial form of Boolean functions and related topics”, IEEE Trans. on Computers, Vol. 48, No. 8, 1999, 860-864. [54] Falkowski, B.J., “Relations between arithmetic and Haar wavelet transforms in the form of layered Kronecker matrices,” Electronics Letters, Vol. 35, No. 10, 1999, 799-800. [55] Falkowski, B.J., Chang, C.H., “Forward and inverse transformations between Haar spectra and ordered binary decision diagrams of Boolean functions,” IEEE Trans. on Computers, Vol. 46, No. 11, 1997, 1272-1279. [56] Falkowski, B.J., Chang, C.H., “Mutual conversions between generalized Arithmetic expressions and Free binary decision diagrams,” IEE Proc. Circuits, Devices, and Systems, Vol. 145, No. 4, 1998, 219-228. [57] Falkowski, B.J., Chang, C.H., “Hadamard-Walsh spectra characterization of Reed-Muller expansions,” Computers and Electrical Engineering, Vol. 25, No. 2, 1999, 111-134. [58] Falkowski, B.J., Chang, C.H., “Paired Haar spectra computation through operations on disjoint cubes,” IEE Proc. Circuits, Devices and Systems, Vol. 146, No. 3, 1999, 117-123. [59] Falkowski, B.J., Kannurao, S., “Identification of Boolean symmetries in spectral domain of Reed-Muller transform,” Electronics Letters, Vol. 35, No. 16, 1999, 1315-1316. [60] Falkowski, B.J., Kannurao, S., “Algorithm to identify skew symmetries through Walsh transform,” Electronic Letters, Vol. 36, No. 5, 2000, 401-402. [61] Falkowski, B.J., Kannurao, S., “Analysis of disjunctive decomposition of balanced Boolean functions through Walsh spectrum,” IEE Proc. Comput. Digit. Tech., Vol. 148, No. 2, 2001, 71-78. [62] Falkowski, B.J., Perkowski, M.A., “A family of all essential radix-2 addition/subtraction multi-polarity transforms: Algorithms and interpretations in Boolean domain,” Proc. Int. Symp. on Circuits and Systems, (23rd ISCAS), New Orelans, Louisiana, USA, May 1990, 2913-2916.
References
265
[63] Falkowski, B.J., Perkowski, M.A., “One more way to calculate generalized Reed-Muller expansions of Boolean functions,” Int. J. Electronics, Vol. 71, No. 3, 1991, 385-396. [64] Falkowski, B.J., Rahardja, S., “Efficient computation of quateranry fixed polarity Reed-Muller expansions,” IEE Proc. Comput. Digit. Tech., Vol. 142, No. 5, 1995, 345-352. [65] Falkowski, B.J., Rahardja, S., “Complex decision diagrams,” Electronics Letters, Vol. 32, No. 4, 1996, 290-291. [66] Falkowski, B.J., Rahardja, S., “Complex spectral decision diagrams,” Proc. 26th Int. Symp. on Multiple-Valued Logic, Santiago de Campostela, Spain, May 1996, 255-260. [67] Falkowski, B.J., Rahardja, S., “Walsh-like functions and their relations,” IEE Proc. Vision, Image and Signal Processing, Vol. 143, No. 5, 1996, 279-284. [68] Falkowski, B.J., Rahardja, S., “Family of fast linearly independent logic transformations,” IEEE Trans. on Circuits and Systems, Vol. 44, No. 8, 1997, 646-655. [69] Falkowski, B.J. Schaefer, I., Perkowski, M.A., “Generation of adding and arithmetic multi-polarity transforms for incompletely specified Boolean functions,” Int. J. Electronics, Vol. 73, No. 2, 1992, 321-331. [70] Falkowski, B.J., Shmerko, V.P., Yanushkevich, S.N., “Arithmetical logic its status and achievements,” Proc. Int. Conf. on Applications of Computer Systems, Szczecin, Poland, November 1997, 208-223. [71] Falkowski, B.J., Stankovi´c, R.S., “Decision diagrams for representation of discrete functions in VLSI Computer-Aided Design,” Proc. Int. Symp. on IC Technology, Systems and Applications (7th ISIC), Singapore, September 1997, 86-93. [72] Falkowski, B.J., Stankovi´c, R.S., “Spectral interpretation and applications of decision diagrams,” VLSI Design, Int. J. Custom Chip Design, Simulation and Testing, Vol. 11, No. 2, 2000, 85-105. [73] Fine, N.J., “On the Walsh functions,” Trans. Amer. Math. Soc., No. 3, 1949, 372-414. [74] Fourier, J.B., “Theorie analytique de la chaleur,” Euvres 1, see also the Fourier’s paper form 1811 published 1824 in Mem. de l’Acad. des Sci., Paris, (2), 4, 1819/20, 135-55, published 1824. [75] Fujita, M., Kukimoto, Y., Brayton, R.K., “BDD minimization by truth table permutation,” Proc. Int. Symp. on Circuits and Systems, ISCAS’96, May 12-15, 1996, Vol. 4, 596-599. [76] Fujita, M., Matsunaga, Y., Kukuda, T., “On variable ordering of binary decision diagrams for the optimization in multi-level synthesis,” European Conf. on Design Automation, 1991, 50-54. [77] Garaev, M.U., Faradzhev, R.G., “On an analog of Fourier expansion over Galois fields and its applications to problem of generalized sequential machines,” Izv. Akad. Nauk Azerb. SSR, Ser. Fiz. -Techn. i Math. Nauk, No.6, 1-68, 1965.
266
References
[78] Gergov, J., Meinel, C., “Efficient Boolean manipulation with OBDDs can be extended to FBDDs,” IEEE Trans. on Computers, Vol. C-43, No. 10, 1994, 1197-1209. [79] Gibbs, J.E., “Walsh spectrometry a form of spectral analysis well suited to binary digital computation,” NPL DES Repts., National Physical Lab., Teddington, Middlesex, England, 1967. [80] Gibbs, J.E., “Instant Fourier transform,” Electron. Lett., Vol. 13, No. 5, 122-123, 1977. [81] Gibbs, J.E., “Local and global views of differentiation,” in: Butzer, P.L., Stankovi´c, R.S., (Eds.), Theory and applications of Gibbs Derivatives and Applications, Matematiˇcki institut, Beograd, 1990, 1-19. [82] Gibbs, J.E., Ireland, B., Marshall, J.E., “Generalization of the Gibbs derivative,” Colloquium on the Theory and Applications of Walsh Functions, Hatfield, Hertfordshire, 28-29.6.1973, ii+32. [83] Gibbs, J.E., Millard, M.J., “Walsh functions as solutions of a logical differential equation,” NPL DES Repts., National Physical Lab., Teddington, Middlesex, England, 1969. [84] Good, I.J., “The interaction algorithm and practical Fourier analysis,” J. Roy. Statist. Soc., ser. B, Vol. 20, 1958, 361-372, Addendum, Vol. 22, 1960, 372-375. [85] G¨ unther, W., Drechsler, R., “BDD minimization by linear transforms,” in Advanced Computer Systems, 1998, 525-532. [86] G¨ unther, W., Drechsler, R., “Efficient manipulation algorithms for linearly transformed BDDs,” Proc. 4th Int. Workshop on Applications of ReedMuller Expansion in Circuit Design, Victoria, Canada, May 20-21, 1999, 225-232. [87] G¨ unther, W., Drechsler, R., “Minimization of free BDDs,” ASP-DAC’99, Vol. 1, 1999, 323-326. [88] Haar, A., “Zur theorie der orthogonalen Funktionsysteme,” Math. Annal., 69, 1910, 331- 371. [89] Hadamard, M.J., “Resolution d’une question relative aux determinants,” Bull. Sci. Math., A17, 1893, 240-246. [90] Hamaguchi, K., Morita, A., Yajima, S., “Efficient construction of binary moment diagrams for verifying arithmetic circuits,” Int. Conf. ComputerAided Design, 1995, 78-82. [91] Hansen, J.P., Sekine, M., “Synthesis by spectral transformation using Boolean decision diagrams,” Proc. 33th ACM/IEEE Design Automation Conf., Las Vegas, NV, 1996, 248-253. [92] Hansen, J.P, Sekine, M., “Decision diagrams based techniques for the Haar wavelet transform,” Proc. IEEE Int. Conf. on Information, Communications and Signal Processing (1st ICICS), Singapore, Vol. 1, September 1997, 59-63. [93] Harmuth, H.F., “A generalized concept of frequency and some applications”, IEEE Trans., IT-14, No. 3, 1968, 375-382.
References
267
[94] Harmuth, H.F., Transmission of Information by Orthogonal Functions, 2nd ed. Springer-Verlag, New York, 1972. [95] Harmuth, H.F., Sequency Theory, Foundations and Application, Academic Press, New York, 1977. [96] Hasan-Babu, H.Md., Sasao, T., “A method to represent multiple-output switching functions by using binary decision diagrams,” SASIMI’96, Nov. 25, 1996, 212-217. [97] Hasan Babu H.Md., Sasao, T., “Shared multiple-valued decision diagrams for multiple-output functions,” Proc. 29th Int. Symp. on Multiple-Valued Logic, Freiberg im Bereisgau, Germany, May 20-22, 1999, 166-172. [98] Heideman, M.T., Johnson, D.H., Burrus, C.S., “Gauss and the history of the fast Fourier transform,” Archiv for History of Exact Science, Vol. 34, No. 3, 265-277, 1985. Also in: IEEE ASSP Magazine, Vol. 1, No. 4, 14-21, 1984. [99] Heidtmann, K.D., “Arithmetic spectra applied to stuck-at-fault detection for combinatorial networks,” Proc. 2nd Technical Workshop New Directions in IC Testing, 4.1 - 4.13, Winnipeg, April 1987. [100] Heidtmann, K.D., “Arithmetic spectrum applied to fault detection for combinatorial networks,” IEEE Trans. Computers, Vol.40, No.3, March 1991, 320-324. [101] Hewitt, E., Ross, K.A., Abstract Harmonic Analysis, Vol. I, Springer, Berlin, 1963, Vol. II Springer, Berlin, 1970. [102] Ho, P., Perkowski, M.A., “Free Kronecker decision diagrams and their application to Actel 6000 FPGA mapping,” in: European Design Automation Conf., 1994, 8-13. [103] Hurst, S.L., Logical Processing of Digital Signals, Crane Russak and Edward Arnold, London and Basel, 1978. [104] Hurst, S.L., “The Haar transform in digital network synthesis,” Proc. 11th Int.Symp. on Multiple-Valued Logic, 1981, 10-18. [105] Hurst, S.L., Miller, D.M., Muzio, J.C., Spectral Techniques in Digital Logic, Academic Press, Bristol, 1985. [106] Iguchi, Y., Sasao, T., Matsuura, M., “On properties of Kleene TDDs,” ASP-DAC’97, 473-476. [107] Ito, T., “A note on a general expansion of functions of binary variables,” Inf. and Control, 12, 1968, 206-211. [108] Jankovi´c, D., Stankovi´c, R.S., Drechsler, R., “Decision diagram method for calcualtion of pruned Walsh transform,” IEEE Trans. on Comput., Vol. 50, No. 2, 2001, 1478-151. [109] Jennings, G., “Symbolic incompletely specified functions for correct evaluation in the presence of indeterminate input variables,” TwentyEight Annual Hawaii Int. Conf. on System Sciences, HICSS-28, Vol. I, Architecture, January 1995, 23-31. [110] Jin, M., Zhang, Q., “Copy feature of Walsh functions and its applications,” Proc. ISPC’93, Nanjing, China, Oct. 1993.
268
References
[111] Jin, M., Zhang, Q., “Copy theory of signals and its applications,” in: Recent Developments in Abstract Harmonic Analysis with Applications in Signal Processing, Nauka, Belgrade, 1996, 313-328. ¨ [112] Kaczmarz, S., “Uber ein orthogonal system,” Comptes Rendus du I Congres des mathematiciens des pays Slaves, Warsaw, 1929, 189-192. [113] Kebschull, U., Schubert, E., Rosenstiel, W., “Multilevel logic synthesis based on functional decision diagrams,” EDAC 92, 1992, 43-47. [114] Karpovsky, M.G., Finite Orthogonal Series in the Design of Digital Devices, Wiley and JUP, New York and Jerusalem, 1976. [115] Karpovsky, M.G., “Fast Fourier transform over a finite non-Abelian group,” IEEE Trans. on Computers, Vol. C-26, 1977, 1028-1031. [116] Karpovsky, M.G., “Spectral methods for decomposition, design and testing of multiple-valued logic networks,” Proc. 11th Int. Symp. on Multiple-Valued Logic, Oklahoma, USA, May 1981, 10-18. [117] Karpovsky, M.G., Stankovi´c, R.S., Astola, J.T., “Spectral techniques for design and testing of computer hardware,” Proc. TICSP Workshop on Spectral Transforms and Logic Design for Future Digital Systems, SPECLOG-2000, Tampere, Finland, June 2-3, 2000, 1-34. [118] Karpovsky, M.G., Stankovi´c, R.S., Moraga, C., “Spectral techniques in binary and multiple-valued switching theory, A review of results in the decade 1991-2000,” Proc. 31st Int. Symp. on Multiple-Valued Logic, Warsaw, Poland, May 22-24, 2001, 41-46. [119] Keim, M., Martin, M., Drechsler, R., Moliter, P., “Polynomial formal verification of multipliers,” Proc. 15th IEEE VLSI Test Symp., 1997, 150-155. [120] Kline, M., Mathematical Thought from Ancient to Modern Times, Oxford University Press, 1972. [121] Kleene, S.C., Introduction to Mathematics, Wolters-Noordhoff, NorthHolland Publishing, 1952. [122] Komamiya, Y., “Theory of relay networks for the transformation between the decimal and binary system,” Bull. of E.T.L., Vol. 15, No. 8, August 1951, 188-197. [123] Komamiya, Y., “Theory of computing networks,” Researches of E.T.L., No. 526, November 1951, Proc. of the First National Congress for Applied Mathematics, May 1952, 527-532. [124] Komamiya, Y., “Application of Logical Mathematics to Information Theory (Application of Theory of Group to Logical Mathematics),” The Bulletin of the Electrotechnical Laboratory in Japanese Government, April 1953. [125] Komamiya, Y., Theory of Computing Networks, Researches of the Applied Mathematics Section of Electrotechnical Laboratory in Japanese Government, 2 Chome, Nagata-Cho, Chiyodaku, Tokyo, July 10, 1959, pages 40. [126] Kondrfajev, V.N., Shalyto, A.A., “Realizations of a system of the Boolean functions by using arithmetic polynomials,” Automatika and Telemekhanika, No.3, 1993.
References
269
[127] Kozlovski, T., Dagless, E.L., Saul, J.M., “Unified decision diagrams, a representation for mixed AND-OR/EXOR combinational networks,” Proc. IFIP WG10.5 Workshop on Applications of the Reed-Muller Expansions in circuit Design, Reed-Muller’95, August 27-29, 1995, Makuhari, Chiba, Japan, 177-184. [128] Kukharev, G.A., Shmerko, V.P., Yanushkevich, S.N., Technique of Binary Data Parallel Processing for VLSI, Vysheyshaja shcola, Minsk, 1991, Belarus. [129] Kurepa, Dj.R., Ensembles ordonn´ es et ramifi`es, (Th`ese), Paris, 1935, 6+138+2p. [130] Kurepa, Dj.R., “Sets-logics-machines,” Proc. Int. Symp. Theory of Switching, Harvard University, Cambridge, Mass., Pr. 1, April 1957, 137-146. [131] Lai, Y.F., Pedram, M., Vrudhula, S.B.K., “EVBDD-based algorithms for integer linear programming, spectral transformation, and functional decomposition,” IEEE Trans. Computer-Aided Design of Integrated Circuits and Systems, Vol.13, No.8, 1994, 959-975. [132] Lai Y.-T., Sastry, S., “Edge-valued binary decision diagrams for multi-level hierarchical verification,” DAC-92, June 1992, 668-613. [133] Lechner, R., “A transform theory for functions of binary variables,” In Theory of Switching, Harvard Computation Lab., Cambridge, Mass., Progress Rept. BL-30, Sec-X, November 1961, 1-37. [134] Liu, X., “Study of independent functions in logical functions,” Journal of Beijing Institute of Aeronautics and Astronautics, No. 4, 1985, 35-46. [135] Liu, X., “The operation rules of the spectrum for Independent functions,” Proc. 4th Int. Workshop on Spectral Techniques, Beijing, 1990, 1199-1202. [136] Liu, X., “Recurrence relations for the spectrum of Independent functions,” in [256], 261-268. [137] Macii, E., Poncino, M., “Predicting the functional complexity of combinatorial circuits by symbolic spectral analysis of Boolean functions,” Proc. EURO-DAC’95, 294-299. [138] Macii, E., Poncino, M., “Using symbolic Rademacher-Walsh spectral transforms to evaluate the agreement between Boolean functions,” IEE Proc. Comput. Digit. Tech., Vol. 143, No. 1, 1996, 564-68. [139] Malyugin, V.D., “On a polynomial realization of a cortege of Boolean functions,” Repts. of the USSR Academy of Sciences, Vol. 265, No. 6, 1982. [140] Malyugin, V.D., Elaboration of theoretical basis and methods for realization of parallel logical calculations through arithmetic polynomials, Ph.D. Thesis, Inst.of Control, Russian Academy of Science, Moscow, 1988. [141] Malyugin, V.D., Paralleled Calculations by Means of Arithmetic Polynomials, Physical and Mathematical Publishing Company, Russian Academy of Sciences, Moscow, 1997, (in Russian). [142] Malyugin, V.D., Kukharev, G.A., Shmerko, V.P., “Transforms of polynomial forms of Boolean functions,” Inst. of Control Sciences, Moscow, 1986, 1-48.
270
References
[143] Malyugin, V.D., Sokolov, V.V., “Intensive logical calculations,” Automatika and Telemekhanika, No. 4, 1993, 160-167. [144] Malyugin, V.D., Veits, V.A., “Intensive calculations in parallel logic,” Proc. 5th Int. Workshop on Spectral Techniques, 15.-17.3.1994, Beijing, China, 63-64. [145] Marshall, J.E., Ireland, B., “On the prethistory of the Walsh-functions: Circulants, bi-circulants and dyadic group,” Colloquium on the Theory and Applications of Walsh Functions, Hatfield, Hertfordshire, 1975. [146] Meinel, Ch., Somenzi, F., Tehobald, T., “Linear sifting of decision diagrams and its application in synthesis,” IEEE Trans. CAD, Vol. 19, No. 5, 2000, 521-533. [147] Miller, D.M., “Spectral transformation of multiple-valued decision diagrams,” ISMVL-24, May 1994, 89-96. [148] Miller, D.M., Drechsler, R., “On the construction of multiple-valued decision diagrams,” Proc. 32nd Int. Symp. on Multiple-Valued Logic, Boston, Massachusets, USA, May 15-18, 2002, 245-253. [149] Miller, D.M., Muranaka, N., “Multiple-valued decision diagrams with symmetric variable nodes,” ISMVL-26, May 1996, 242-247. [150] Minato, S., “Zero-suppressed BDDs for set manipulation in combinatorial problems,” Proc. 30th ACM/IEEE DAC, June 1993, 272-277. [151] Minato, S., “Graph-based representations of discrete functions,” in: [196], 1-28. [152] Minato, S., Binary Decission Diagrams and Applictions for VLSI Synthesis, Kluwer Academic Publishers, 1996. [153] Minato, S., Ishiura, N., Yajima, S., “Shared binary decision diagrams with attributed edges for efficient Boolean functions manipulation,” Proc. 27th IEEE/ACM DAC, June 1990, 52-57. [154] Moraga, C., “A decade of spectral techniques,” Proc. 21st Int. Symp. on Multiple-Valued Logic, Victoria, Canada, May 1991, 182-188. [155] Muller, D.E., “Application of Boolean algebra to switching circuits design and to error detection,” IRE Trans. Electron. Comp., Vol.EC-3, 1954, 6-12. [156] Muzio, J.C., “Stuck fault sensitivity of Reed-Muller and Arithmetic coefficients,” C. Moraga, Ed., Theory and Applications of Spectral Techniques, Dortmund, 1989, 36-45. [157] Muzio, J.C., Wesselkamper, T.C., Multiple-valued Switching Theory, Adam Hilger, Bristol, 1986. [158] Nechiporuk, E.I., “On the synthesis of networks using linear transformations of variables,” Dokl. AN SSSR. Vol. 123, No. 4, December 1958, 610-612. [159] Paley, R.E.A.C., “A remarkable system of orthogonal functions,” Proc. London Math. Soc., 34, 1932, 241-279. [160] Panda, S., Somenzi, F., “Who are the variables in your neigborhood,” Proc. IEEE Int. Conf. Computer-Aided Design, San Jose´e, CA, 1995, 74-77.
References
271
[161] Panda, S., Somenzi, F., Pleisser, B.F., “Symmetry detection and dynamic variable ordering of decision diagrams,” Proc. IEEE Int. Conf. ComputerAided Design, 1994, 628-631. [162] Perkowski, M.A., “The generalized orthonormal expansions of functions with multiple-valued inputs and some of its applications,” ISMVL-22, May 1992, 442-450. [163] Perkowski, M.A., Jozwiak, L., Drechsler, R., Falkowski, B., “Ordered and shared, linearly-independent, variable-pair decision diagrams,” Proc. Int. Conf. on Information, Communications and Signal Processing (1st ICICS), Singapore, Vol. 1, September, 1997, 261-265. [164] Perkowski, M.A., Pierzchala, E., Drechsler, R., “Ternary and quaternary lattice diagrams for linearly independent logic, multiple-valued logic and analog synthesis,” Proc. Int. Conf. on Information, Communications and Signal Processing (1st ICICS), Singapore, Vol. 1, September, 1997, 269-273. [165] Pichler, F., Das System der sal und cal Funktionen als Erweiterung des Systems der Walsh-Funktionen und die Theorie der sal- und cal-Fourier Transformationen, Ph.D. Thesis, Philosophische Fakultat, Innsbruck Univ., Innsbruck, Austria, 1967. [166] Pichler, F., “Some historical remarks on the theory of Walsh functions and their applications in information engineering,” in: Butzer, P.L., Stankovi´c, R.S., Eds., Theory and applications of Gibbs Derivatives and Applications, Matematiˇcki institut, Beograd, 1990, xxv-xxx. [167] Pontryagin, L.S., Neprerivnie grupi, Ghostehizdat, 1954, (in Russian). [168] Rademacher, H., “Einige S¨ atze von allgemeinen Orthogonalfunktionen”, Math. Annalen, 87, 1922, 122-138. [169] Rahardja, S., Falkowski, B.J., “Classification and graph based representations of switching functions using a novel spectral technique,” Int. J. Electronics, vol. 83, No. 6, 1997, 731-742. [170] Rahradja, S., Falkowski, B.J., “Family of unified Complex Hadamard transforms,” IEEE Trans. Circuits and Systems, Vol. 46, No. 8, 1999, 1094-1100. [171] Rahardja, S., Falkowski, B.J., “Fast linearly independent arithmetic expansion,” IEEE Trans. on Computers, Vol. 48, No. 9, 1999, 991-999. [172] Rahardja, S., Falkowski, B.J., “Application of linearly independent arithmetic transform in testing of digital circuits,” Electronic Letters, Vol. 35, No. 5, 1999, 363-364. [173] Rahardja, S., Falkowski, B.J., “Efficient algorithm to calcualte Reed-Muller expansions over GF (4),” IEE Proc. Circuits, Devices and Systems, Vol. 148, No. 6, 2001, 289-295. [174] Reed, S.M., “A class of multiple error correcting codes and their decoding scheme,” IRE Trans. Inf. Th., Vol. PGIT-4, 1954, 38-49. [175] Rudell, R., “Dynamic variable ordering for ordered binary decision diagrams,” Proc. IEEE Conf. Computer Aided Design, Santa Clara, CA, 1993, 42-47. [176] Rudin, W., Fourier Analysis on Groups, Interscience Publisher, New York, 1960.
272
References
[177] Sasao, T., “An application of multiple-valued logic to a design of programmable logic arrays,” ISMVL-78, 1978, 65-72. [178] Sasao, T., “Input variable assignment and output phase optimization of PLAs,” IEEE Trans. on Computers, Vol. C-33, No. 10, 1984, 879-894. [179] Sasao, T., “Application of multiple-valued logic to a serial decomposition of PLAs,” ISMVL-89, Zougzhan, P.R. China, 1989, 264-271. [180] Sasao, T., “A transformation of multiple-valued input two-valued output functions and its application to simplification of exclusive-OR sum-ofproducts expressions,” ISMVL-91, May 1991, 270-279. [181] Sasao, T., “Optimization of pseudo-Kronecker expressions using multipleplace decision diagrams,” IEICE Trans. Inf. and Syst., Vol. E-76-D, No. 5, 1993, 562-570. [182] Sasao, T., Logic Design and Optimization, Kluwer Academic Publishers, 1993. [183] Sasao, T., Logic Design: Switching Circuit Theory, Kindai, Kaga-ku, 1995. [184] Sasao, T., “EXOR ternary decision diagrams in EXOR logic synthesis,” Kyushu Institute of Technology, Iizuka 820, Japan, Jan. 23, 1995. [185] Sasao, T., “AND-EXOR expressions and their optimizations,” in: [196], 287-312. [186] Sasao, T., “Ternary decision diagrams and their applications,” in: [196], 269-292. [187] Sasao, T., “Representations of logic functions by using EXOR operators,” in: [196], 29-54. [188] Sasao, T., “Ternary decision diagrams and their applications,” in: [196], 269-292. [189] Sasao, T., “Ternary decision diagrams,” Proc. 28th Int. Symp. on MultipleValued Logic, Antigonish, Nova Scotia, Canada, May 28-30, 1997, 241-250. [190] Sasao, T., “Ternary decision diagrams and their applications,” ISMVL-97, May 1997, 241-250. [191] Sasao, T., Switching Theory for Logic Synthesis, Kluwer Academic Publishers, 1999. [192] Sasao, T., “Arithmetic ternary decision diagrams and their applications,” Proc. 4th Int. Workshop on Applications of Reed-Muller Expansion in Circuit Design (Reed-Muller 99), August 20-12, 1999, Victoria, B.C., Canada, 149-155. [193] Sasao, T., Butler, J.T., “A design method for look-up table type FPGA by pseudo-Kronecker expansions,” Proc. 24th Int. Symp. on Multiple-Valued Logic, Boston, Massachusetts, May 25-27, 1994, 97-104. [194] Sasao, T., Butler, J.T., “A method to represent multiple-output functions by using multi-valued decision diagrams,” ISMVL-26, May 1996, 248-254. [195] Sasao, T., Debnath, D., “An exact minimization algorithm for generalized Reed-Muller expressions,” Proc. IEEE Asia-Pacific Conference on Circuits and Systems, 5.-8.12.1994, Taipei, Taiwan. [196] Sasao, T., Fujita, M., (ed.), Representations of Discrete Functions, Kluwer Academic Publishers, 1996.
References
273
[197] Sasao, T., Izuhara, F., “Exact minimization of FPRMs using multi-terminal EXOR-TDDs,” in: [196], 191-210. [198] Sasao, T., Kinoshita, K., “Conservative logic circuits and their universality,” IEEE Trans. on Computers, Vol. C-28, No. 9, 1979, 682-685. [199] Sch¨ afer, I., Falkowski, B.J., Perkowski, M.A., “A fast computer implementation of adding and arithmetic multi-polarity transforms for logic design,” IEEE 34th Midwest Symp. on Circuit and Systems, Monterey, CA, May 1991. [200] Schmiedle, F., Gunther, W., Drechsler, R., “Dynamic re-ecoding during dynamic minimization,” Proc. 30th Int. Symp. on Multiple-Valued Logic, Portland, Oregon, USA, May 23-25, 2000, 239-244. [201] Schebery, J., Mieko, Y., “Hadamard matrices, sequences and block designs,” in: Dinitz, J.H., Stinson, P.R., Eds., Contemporary Design Theory: A Collection of Surveys, Wiley, New York, 1992, 431-560. [202] Sauerhoff, M., Wegener, I., Werchner, R., ”Optimal ordered binary decision diagrams for read-once formulas”, Discrete Applied Mathematics, Vol. 103, 2000, 237-258. [203] Sieling, D., ”On the existence of polynomial time approximation schemes for OBDD minimization”, Proc. STACS’98, Lecture Notes in Computer Sci., Vol. 1373, Springer, Berlin, 1998, 205-215. [204] Shannon, C.E., ”The synthesis of two-levle switching circuits”, Bell Sys. Tech. J., Vol. 28, No. 1, 1949, 59-98. [205] Somenzi, F., ”CUDD Decision Diagram Package”, http://bessie.colorado.edu /∼fabio/CUDD [206] Somenzi, F., Efficient manipulation of decision diagrams”, Int. Journal on Software Tools for Technology Transfer, 3, 2001, 171-181. [207] Srinivasan, A., Kam, T., Malik, Sh., Brayant, R.K., “Algorithms for discrete function manipulation”, in: Proc. Inf. Conf. on CAD, 1990, 92-95. [208] Stankovi´c, M., Jankovi´c, D., Stankovi´c, R.S., “Efficient algorithms for Haar spectrum calculation”, Scientific Review, No. 21-22, 1996, 171-182. [209] Stankovi´c, M., Jankovi´c, D., Stankovi´c, R.S., Falkowski, B.J., ”Calcualtion of the paired haar transform through shared binary decision daigrams”, Proc. Int. Conf. on Information, Communications and Signal Processing (2nd ICICS), Singapore, December 1999, CD publication, Paper 2B2-6. [210] Stankovi´c, M.S., Aizenberg, N.N., “Generalized discrete Gibbs derivatives and related linear equations”, in: P.L. Butzer, R.S. Stankovi´c, (Eds.), Theory and Applications of Gibbs Derivatives, Mathematiˇcki institut, Beograd, 1990, 249-268. [211] Stankovi´c, R.S., “A note on the relation between Reed-Muller expansions and Walsh transform”, IEEE Transactions on Electromagnetic Compatibility, Vol.EMC-24, No.1, 1982, 68-70. [212] Stankovi´c, R.S., ”Gibbs derivatvies”, Numer. Func. Anal. and Optimiz., 15, 1-2, 1994, 169-181.
274
References
[213] Stankovi´c, R.S., “Functional decision diagrams for multiple-valued functions”, Proc. 25th Int. Symp. on Multiple-Valued Logic, Bloomington, Indiana, U.S.A., 22.-26.5.1995, 284-289. [214] Stankovi´c, R.S., “Some remarks about spectral transform interpretation of MTBDDs and EVBDDs,” ASP-DAC’95, 1995, 385-390. [215] Stankovi´c, R.S., “Edge-valued decision diagrams based on partial ReedMuller transforms”, Proc. Reed-Muller Colloquium UK’95, Bristol, England, UK, December 19, 1995, 9/1-9/13. [216] Stankovi´c, R.S., “Fourier decision diagrams for optimization of decision diagrams representations of discrete functions”, Proc. Workshop on Post Binary-Ultra Large Scale Integration, Santiago de Campostela, Spain, 1996, 8-12. [217] Stankovi´c, R.S., “Fourier decision diagrams on finite non-Abelian groups with preprocessing”, Proc. 27-th Int. Symp. on Multiple-Valued Logic, Antigonish, Nova Scotia, Canada, May 28-30, 1997, 281-286. [218] Stankovi´c, R.S., ”Functional decision diagrams for multi-valued functions”, Multi. Val. Logic, Vol. 3, 1998, 195-215. [219] Stankovi´c, R.S., Spectral Transform Decision Diagrams in Simple Questions and Simple Answers, Nauka, Belgrade, 1998. [220] Stankovi´c, R.S., “Some remarks on basic characteristics of decision diagrams”, Proc. 4th Int. Workshop on Applications of Reed-Muller Expansion in Circuit Design, August, 20 - 21, 1999, 139-146. [221] Stankovi´c, R.S., ”Matrix-valued EXOR-TDDs in decomposition of switching functions”, Multiple-Valued Logic, Vol. 7, No. 1-2, 2001, 163-180. [222] Stankovi´c, R.S., ”Word-level ternary decision diagrams and arithmetic expressions”, Proc. 5th Int. Workshop on Applications of Reed-Muller Expansion in Circuit Design, Starkville, Mississippi, USA, August 10-11, 2001, 34-50. [223] Stankovi´c, R.S., ”Non-Abelian groups in optimization of decision diagrams representations of discrete functions”, Formal Methods in System Design, Vol. 18, 2001, 209-231. [224] Stankovi´c, R.S., Astola, J.T., ”Some remarks on linear transform of variables in representation of adders by word-level expressions and spectrtal transform decision diagrams”, Proc. 33rd Int. Symp. on Multiple-Valued Logic, Boston, USA, May 15-18, 2002. [225] Stankovi´c, R.S., Astola, J.T., ”Relationships between logic derivatives and ternary decision daigrams”, Proc. 5th Int. Workshop on Boolean Problems, Fraiburg, Germany, September 19-20, 2002. [226] Stankovi´c, R.S., Dreschler, R., “Circuit design from Kronecker Galois field decision diagrams for multiple-valued functions”, Proc. 27th Int. Symp. on Multiple-Valued Logic, Antigonish, Nova Scotia, Canada, May 1997, 275280. [227] Stankovi´c, R.S., Falkowski, B.J., ”FFT and decision diagrams based methods for calculation of spectral transforms”, Proc. Int. Conf. on Informatics, Communications and Signal Processing (1st ICICS), Singapore, 1997, Vol. 1, 241-245.
References
275
[228] Stankovi´c, R.S., Falkowski, B.J., ”Haar functions and transforms and their generalizations”, Proc. Int. Conf. on Information, Communications and Signal Processing, (1st ICICS), Singapore, September 1997, Vol. 4, 1-5. [229] Stankovi´c, R.S., Falkowski, B.J., ”FFT analysis of Fast tabular technique for Reed-Muller expansions”, Proc. Int. Symp. on IC Technology, Systems and Applications (8th ISIC), Singapore, September 1999, 382-385. [230] Stankovi´c, R.S., Falkowski, B.J., ”Spectral interpretation of fast tabualr technique for fixed polarity Reed-Muller expressions”, Int. J. Electronics, Vol. 87, No. 6, 2000, 641-648. [231] Stankovi´c, R.S., Jankovi´c, D., Moraga, C., “Reed-Muller-Fourier representations versus Galois field representations of four-valued functions”, Proc. Reed-Muller Workshop, Oxford, UK, September 19-20, 1997. [232] Stankovi´c, R.S., Milenovi´c, D., Jankovi´c, D., ”Quaternion groups versus dyadic groups in representations and processing of switching functions”, Proc. 29th Int. Symp. on Multiple-Valued Logic, Freiburg im Bereisgau, Germany, May 1999, 18-23. [233] Stankovi´c, R.S., Moraga, C., “Reed-Muller-Fourier representations of multiple-valued functions over Galois fields of prime cardinality”, in: Kebschull, U., Schubert, E., Rosenstiel, W., Eds., Proc. IFIP WG 10.5 Workshop on Applications of the Reed-Muller Expansion in Circuit Design, 16.-17.9.1993, Hamburg, Germany, 115-124. [234] Stankovi´c, R.S., Moraga, C., “Edge-valued decision diagrams for switching functions based upon the partial Reed-Muller transforms,” Proc. 2nd Int. Conf. Application of Computer Systems, Szczecin, Poland, 8-9.1995, 7-16. [235] Stankov´c, R.S., Moraga, C., “Edge-valued decision diagrams for multiplevalued functions”, Proc. 3rd Int. Conf. Application of Computer Systems, Szczecin, Poland, November, 21-22, 1996. [236] Stankovi´c, R.S., Moraga, C., “Reed-Muller-Fourier representations of multiple-valued functions”, in [256], 205-216. [237] Stankovi´c, R.S., Moraga, C., Astola, J.T., Readings in Fourier Analysis on Finite Non-Abelian Groups, TICSP Series #5, TICSP, Finland, 1999. [238] Stankovi´c, R.S., Moraga, C., Astola, J.T., ”From Fourier expansions to arithmetic-Haar aexpressions on quaternion groups”, Applicable Algebra in Engineering, Communications and Computing, Vol. AAECC 12, 2001, 227-253. [239] Stankovi´c, R.s., Moraga, C., Sasao, T., ”A unifuing approach to edge-valued and arithmetic transform decision diagrams”, Avtomatika i Telemekhanika, [240] Stankovi´c, R.S., Sasao, T., “Spectral Interpretation of TDDs,” SASIMI’97, 1997, 45-50. [241] Stankovi´c, R.S., Sasao, T., “Decision diagrams for discrete functions: Classification and unified interpretation”, ASP-DAC’98, 1998, 349-446. [242] Stankovi´c, R.S., Sasao, T., ”A discussion on the history of research in arithmetic and Reed-Muller expressions”, IEEE Trans. on CAD, Vol. 20, No. 9, 2001, 1177-1179. [243] Stankovi´c, R.S., Sasao, T., Moraga, C., “Spectral transform decision diagrams,” in: [196], 55-92.
276
References
[244] Stankovi´c, R.S., Stankovi´c, M., “Calculation of Gibbs derivatives on finite Abelian groups through decision diagrams”, Journal of Approximation Theory and Its Applications, Vol. 14, No. 4, 1998, 12-25. [245] Stankovi´c, R.S., Stankovi´c, M., Creutzburg, R., ”Foundations for applications of Gibbs derivatives in logic design and VLSI”, VLSI Design, Special Issue Spectral Techniques and Decision Diagrams, Falkowski, B.J., (Guest Editor), Vol. 14, No. 1, 2002, 65-82. [246] Stankovi´c, R.S., Stankovi´c, M., Astola, J.T., Egiazarian, K., “Fibonacci decision diagrams and spectral transform Fibonacci decision diagrams”, Proc. 30th Int. Symp. on Multiple-Valued Logic, Portland, Oregon, USA, May 23-25, 2000, 206-211. [247] Stankovi´c, R.S., Stankovi´c, M., Astola, J.T., Egiazarian, K., Fibonacci Decision Diagrams, TICSP Series # 8, Tampere, 2000. [248] Stankovi´c, R.S., Stankovi´c, M., Astola, J.T., Egiazaraian, K., ”Haar spectral transform decsion diagrams with exact algorithm for minimization of the number of paths”, Proc. 4th Int. Workshop on Boolean Problems, Freiberg, Germany, September 20-21, 2000. [249] Stankovi´c, R.S., Stankovi´c, M., Jankovi´c, D., Spectral Transforms in Switching Theory, Definitions and Calculations, Nauka, Belgrade, 1998. [250] Stankovi´c, R.S., Stankovi´c, M., Moraga, C., “Design of Haar wavelet transforms and Haar spectral transform decision diagrams for multiple-valued functions”, Proc. 31st Int. Symp. on Multiple-Valued Logic, Warzsawa, Poland, May 22-24, 2001, 311-316. [251] Stankovi´c, R.S., Stankovi´c, M., Moraga, C., Sasao, T., “Calculation of Vilenkin-Chrestenson transform coefficients of multiple-valued functions through multiple-place decision diagrams,” Proc. 5th Int. Workshop on Spectral Techniques, March 15-17, 1994, Beijing, China, 107-116. [252] Stankovi´c, R.S., Stankovi´c, M., Moraga, C., Sasao, T., “Calculation of Reed-Muller-Fourier coefficients of multiple-valued functions through multiple-place decision diagrams”, Proc. 24th Int. Symp. on MultipleValued Logic, Boston, Massachusetts, USA, May 1994. [253] Stankovi´c, R.S., Stoji´c, M.R., “A note on the discrete generalized Haar derivative”, Automatika, Vol. 28, No. 3-4, 1987, 117-122. [254] Stoji´c, M.R., Stankovi´c, R.S., “Edge-valued decision diagrams based on partial spectral transforms”, Proc. TELSIKS’95, Niˇs, Yugoslavia, 1995, (in Serbian). [255] Stankov´c, R.S., Stoji´c, M.R., Bogdanovi´c, S.M., Fourier Representation of Signals, Nauˇcna knjiga, Belgrade, 1988, (in Serbian). [256] Stankovi´c, R.S., Stoji´c, M.R., Stankovi´c, M.S., (eds.), Recent Developments in Abstract Harmonic Analysis with Applications in Signal Processing, Nauka and Elektronski fakultet, Belgrade and Niˇs, 1995. [257] Stoji´c, M.R., Stankovi´c, M.S., Stankovi´c, R.S., Discrete Transforms in Applications, Nauka, Beograd, 1993, (in Serbian). [258] Sylvester, J.J., “Thoughts on inverse orthogonal matrices, simulations sign-successions and tessellated parameters in two or more colours, with ap-
References
[259]
[260]
[261]
[262] [263] [264]
[265] [266]
[267]
[268] [269] [270] [271] [272] [273]
[274] [275] [276]
277
plication to Newton’s rule, ornamental tilework and the theory of numbers”, Phil. Mag., 34-4, 461-475. Tachibara, M., “Heuristic algorithms for FBDD node minimization with application to pass-transistor logic and DCVS synthesis”, SASIMI’96, 96101. Tafertshofer, P., Pedram, M., “Factored EVBDDs and their application to matrix representation and manipulation”, CENG Tech. Rept. 94-27, Dept. of EE-Systems, Univ. of Southern California, October 1994. Tan, E.C., Yang, H., ”Fast tabular technique for fixed polarity Reed-Muller logic with inherent parallel processes”, Int. J. Electronics, 1998, Vol. 85, 511-520. Thayse, A., Boolean Differential Calculus, Springer-Verlag, 1980. Thayse, A., Davio, M., Deschamps, J.-P., “Optimization of multiple-valued decision diagrams”, ISMVL-8, 1978, 171-177. The Annals of the Computation Labaratory of Harvard University, Volume XXVII, Synthesis of Electronic Computing and Control Circuits, Cambridge, Massachusetts, 1951. Thomas, L.H., “Using a computer to solve problems in physics”, In: Application of Digital Computers, Boston, Mass., Ginn, 1963. Thornton, M.A., Drechsler, R., G¨ uinther, “Probabilistic equivalence checking using partial Haar spectral diagrams”, Proc. 4th Int. Workshop on Applications of the Reed-Muller Expansion in Circuit Design, August 20-21, 1999, Victoria, B.C., Victoria, Canada, 123-132. Trachtenberg, E.A., “SVD of Frobenius Groups and their use in signal processing”, in Deprettere, E.F., (ed.), SVD and Signal Processing, NorthHolland: Elsevier, 1988. Trachtenberg, E.A., ”Application of Fourier analysis on groups in engineering practice”, in [256], 331-403. Trakhtman, A.M., Trakhtman, V.A., “The frequency of Walsh functions”, Telecommunications and Radio Engng., USSR, 27, No. 12, 1973, 56-58. Trakhtman, A.M., Trakthman, V.A., Basis of the Theory of Discrete Signals on Finite Intervals, Sovetskoe radio, Moscow, 1975, (in Russian). Vilenkin, N.Ya., “Concerning a class of complete orthogonal system”, Izv. Akad. Nauk SSSR, Ser. Math., No. 11, 1947, (in Russian). Vilenkin, N. Ya., “Towards a theory of Fourier integrals on topological groups”, Mathem. Sb., 30, 1952, No. 2, 245-252. Vilenkin, N.Ya., Agaev, G.N., Dˇzafarli, G.M., “Towards a theory of multiplicative orthogonal systems of functions”, DAN Azerb. SSR, 18, No.9, 1962, 3-7. Vrudhula, S.B.K., Pedram, M., Lai, Y.-T., “Edge valued binary decision diagrams,” in: [196], 109-132. Walsh, J.L., “A closed set of orthogonal functions”, Amer. J. Math., 55, 1923, 5-24. Wegener, I., ”Worst case examples for operations over OBDDs”, Information Processing Letters, 74, 2000, 91-94.
278
References
[277] Weiyi, Su., ”Gibbs derivatives and their applications”, Rept. of the Institute of Mathematics, Nanjing University, 91-7, Nanjing, P.R. China, 1991, 45-50. [278] Wiener, N., Paley, R.E.A.C., “Analytic properties of the characters of infinite Abelian groups”, in Verhandlungen des Internat. math. Kongresses, Z¨ urich 1932, Zweiter Band, Seite 95. [279] Yanushkevich, S.N., “Spectral and differential methods to synthesize polynomial forms of MVL-functions on systolic arrays”, Proc. 5th Int. Workshop on Spectral Techniques, 15-17.3.1994, Beijing, China, 78-83. [280] Yanushkevich, S.N., Logic Differential Calculus in Multi-Valued Logic Design, Techn. University of Szczecin Academic Publishers, Poland, 1998. [281] Yanushkevich, S.N., Falkowski, B.J., Shmerko, V.P., ”Spectral linear arithmetic approach for multiple-valued functions, overview of applications in CAD of circuit design”, Proc. Int. Conf. on Information, Communications and Signal Processing (3rd ICICS), Singapore, 2001, CD publication. [282] Yaroslavsky, L., Digital Picture Processing, an Introduction, Springer Verlag, Heidelberg, [283] Yaroslavsky, L., “Transforms in Nature and computers: origin, discrete representation, synthesis and fast algorithms”, Proc. First Int. Workshop on Transforms and Filter Banks, TICSP Series, No. 1, June 1998, 3-29. [284] Yuen, C.K., “Walsh functions and Gray code”, IEEE Trans., Vol.EMC-13, No.3, 1971, 68-73. [285] Yuen, C.K., “Remarks on the ordering of Walsh functions”, IEEE Trans., C-21, No.12, 1972, 1452. [286] Zhegalkin, I.I., “O tekhnyke vychyslenyi predlozhenyi v symbolytscheskoi logykye”, Math. Sb., Vol. 34, 1927, 9-28, (in Russian). [287] Zhegalkin, I.I., “Arifmetizatiya symbolytscheskoi logyky”, Math. Sb., Vol.35, 1928, 311-377, (in Russian). [288] Zhihua, L., Zhang, Q., “Ordering of Walsh functions”, IEEE Trans. on Electromagnetic Compatibility, Vol. EMC-25, No.2, 1983, 115-119. [289] Zhihua, L., Zhang, Q., “Introduction to bridge functions”, IEEE Trans. on Electromagnetic Compatibility, Vol. EMC-25, No.4, 1983, 459-464. [290] Zhang Gongli, Moraga, C., “Orthogonal transforms on finite discrete Abelian groups”, in [256], 293-304. [291] Zhang, Q., “A summary of bridge functions”, Proc. 5th Int. Workshop on Spectral Techniques, March 15-17, 1994, Beijing, China, 128-135. [292] Zhendong, S., Zhang, Q., “The relation of Walsh functions and parts of bridge functions”, J. of Beijing Univ. of Aeronautics and Astronautics, No. 1, 1989.
List of Decision Diagrams
1. Binary DDs (BDDs) [7], [19] 2. Functional DDs (FDDs) [113] or Positive polarity Reed-Muller DDs (PPRMDDs) [187] 3. Fixed polarity Reed-Muller DDs (FPRMDDs) [187] 4. Kronecker DDs (KDDs) [43] 5. Pseudo-Kronecker DDs (PKDDs) [187] 6. Unified DDs (UDDs) [127] 7. EXOR Ternary DDs (EXOR-TDDs) [189], [185], [184] 8. AND Ternary DDs (AND-TDDs) [188] 9. Prime TDDs (PTDDs) [188] 10. Ternary DDs [109] and Kleene-TDDs [106] 11. Arithmetic TDDs (Arith-TDDs) [192] 12. Arithmetic spectral transform TDDs (AC-TDDs) [222] 13. Shared BDDs (SBDDs) [153] 14. Zero-suppressed BDDs (ZBDDs) [150] 15. Multi-terminal binary DDs (MTBDDs) [31] or Arithmetic DDs (ADDs) [8] 16. Shared MTBDDs (SMTBDDs) [194]
280
List of Decision Diagrams
17. Multi-Terminal Multiple-Valued DDs (MTMDDs) [194], [96] 18. Shared Multi-Terminal Multiple-Valued DDs (SMTMDDs) [194]. 19. Binary Moment DDs (BMDDs) [20] or Arithmetic Transform DDs (ACDDs) [243] 20. Walsh transform DDs (WDDs) [243] 21. Spectral Transform DDs (STDDs) [243] 22. Kronecker BMDs (KBMDs) [36] 23. Haar spectral diagrams (HSDs) [92] 24. Haar spectral transform DDs (HSTDDs) [248] 25. Hybrid DDs (HDDs) [33] 26. Complex Hadamard DDs (CHDDs) [66] 27. Edge-Valued Binary DDs (EVBDDs) [132] 28. Edge-Valued Functional DDs (EFDDs) [234] 29. ∗BMDs [20] 30. Multiplicative power hybrid DDs (∗PHDDs) [28] 31. Edge-Valued Walsh DDs (EVWDDs) [254] 32. Edge-Valued Complex Hadamard DDs (EVCHDDs) [66] 33. Factored Edge-Valued Binary DDs (FEVBDDs) [260] 34. K∗BMDDs [36] 35. Multiple-place DDs (MDDs) [263], [207] 36. Multi-Terminal DDs (MTDDs) [147], [251] 37. Multiple-Valued DDs with Symmetric Variables (MDD-SV) [149] 38. Quaternary DDs (QDDs) [193] 39. Pseudo-QDDs [193] 40. Galois field DDs (GFDDs) [213] 41. Reed-Muller-Fourier DDs (RMFDDs) [213] 42. Edge-Valued Galois field DDs (EVGFDDs) [235] 43. Edge-Valued Reed-Muller-Fourier DDs (EVRMFDDs) [215] 44. Kronecker Galois field DDs (KGFDDs) [226] 45. Function Graphs (FGs) [10] 46. Fourier DDs on Abelian Groups (FADDs) [216]
List of Decision Diagrams
281
47. Fourier DDs on non-Abelian Groups (FNADDs) [216] with numbervalued constant nodes (nvFNADDs) and matrix-valued constant nodes (mvFNADDs) 48. Fourier DDs on Finite non-Abelian Groups with Preprocessing (FNAPDDs) [217] with number-valued constant nodes (nvFNAPDDs) and matrix-valued constant nodes (mvFNAPDDs) 49. Matrix-valued EXOR-TDDs (mvEXOR-TDDs) [221] 50. Fibonacci DDs (FibDDs) [246]
Index
A Algebra, 15 Bollean, 15 Algebraic structure, 7 Alignment, 181 AND-EXOR related DDs, 84 Arithmetic decision diagrams (ADDa), 175 Arithmetic expressions, 28 FPAR, 41 PPAR, 41 Arithmetic Ternary DDs (Arith-TDD), 217 Arithmetic transform, 24 Partial, 34 Arithmetic transform DDs (ACDDs), 218 Arithmetic transform related decision diagrams, 172 Arithmetic transform ternary DDs (AC-TDDs), 219 Autocorrelation function, 159 B BDD reduction rule, 74 Binary DDs (BDDs), 72 Binary moment diagrams (BMDs), 93
∗BMDs, 172 Bit-level DDs, 84 Boolean difference, 201 Bridge functions, 61 C Complex Hadamard transform, 106 Complex Hadamard transform DDs (CHTDDs), 93 Complex Walsh transform, 57 Computed Table, 121 D Davio decomposition rule, 79 Negative (nD), 84 Positive (pD), 79 Decision diagrams (DDs), 71 Decision trees (DTs), 71 Direct product, 3 Domain, 3 E Edge-valued binary DDs (EVBDDs), 167 Edge-valued complex Hadamard transform DDs (EVCHTDDs), 173
284
Index
Edge-valued DDs, 167 Edge-valued functional DDs (EVFDDs), 175 Edge-valued STDDs, 177 Extended arithmetic transform (EAT), 220 Extended Reed-Muller transform (ERM), 186
H Haar functions, 41 Haar spectral diagrams (HSD), 150 Haar spectral transform DDs (HSTDDs), 156 Haar transform, 43 Hadamard order, 20 Hybrid decision diagrams (HDDs), 65
F Factored EVBDDs (FEVBDDs), 171 Fibonacci DDs (FibDDs), 111 Field, 11 Galois, 12 Fixed polarity Reed-Muller DDs (FPRMDTs), 84 Fixed polarity transform Arithmetic, 39 Reed-Muller, 38 Walsh, 41 Fixed polarity Walsh transform, 62 Fourier analysis, 18 Fourier DDs FNAPDDs, 253 FNADDs, 243 Fourier series, 18 Fourier transform, 56 Free BDDs (FBDDs), 129 Fresnel functions, 64 Function Binary, 6 Boolean, 6 Galois, 6 Multi-output, 6 Multi-valued, 6 Pseudo-Boolean, 6 Pseudo-logic, 6 Switching, 6 Functional DDs (FDDs), 79
I Identity transform, 238
G Galois field DDs (GFDDs), 93 Generalized BDD reduction rule, 75 Gibbs derivatives, 228 Dyadic, 229 Partial dyadic, 229 Group, 8 Characters, 54 Representations, 18
K Kleene-TDDs, 182 Kronecker ∗BMDs ( K∗BMDs), 173 Kronecker binary moment DDs (KBMDDs), 148 Kronecker DDs (KDDs), 84 Kronecker expressions, 66 Kronecker product, 21 L Lexicographic order, 20 M Mathematical models of signals, 2 Multi-terminal binary DDs (MTBDDs), 77 Multi-terminal DDs (MTDDs), 175 Multiple-place DDs (NDDs), 237 Multiplicative power hybrid DDs (∗PHDDs), 177 N Negative Davio rule, 37 O Ordering Natural, 44 of variables, 125 Paley, 43 Sequential, 41, 44 P Partial transform Kronecker, 36 Partial transforms Arithmetic, 34 Reed-Muller, 34
Index Walsh, 34 Positive Davio expansion rule, 37 Positive Davio tree, 79 Positive polarity Reed-Muller expressions, 20 Positive polarity arithmetic expressions (PPARs), 26 Positive polarity Reed-Muller tree, 79 Positive polarity Walsh expressions (PPW), 30 Pseudo-Kronecker DDs (PKDDs), 84 Pseudo-QDDs, 94 Pseudo-Reed-Muller DDs (PSDRMDDs), 84 Q Quaternary DDs (QDDs), 237 Quaternion group, 100 R Rademacher functions, 59 Range, 3 Reed-Muller functions, 23 Reed-Muller transform, 23 Reed-Muller-Fourier DDs (RMFDDs), 93 Ring, 11 S Shannon expansion (S), 37 Shared BDDs (SBDDs), 77 Shared MTBDDs (SMTBDDs), 280 Shift-copy theory, 61 sign alternating function, 220 Signals, 2 Spectral transform DDs, 119 Spectral transform decision tree (STDT), 92 T Ternary DDs, 181 AC-TDDs, 217 AND-TDDs, 181 Arith-TDDs, 217 EXOR-TDDs, 181 Kleene-TDDs, 181 OR-TDDs, 181
285
U Unique Trable, 120 Unitary irreducible representations, 54 V Vector space, 13 Vileknin-Chrestenson transform, 45 W Walsh DDs (WDDs), 93 Walsh expansion rule, 219 Walsh functions, 28, 57 Walsh transform, 62 Weight vector, 200 Word-level DDs, 104 Z Zero-suppressed reduction rule, 75