Read-Once Functions Revisited and the Readability Number of a Boolean Function

Read-Once Functions Revisited and the Readability Number of a Boolean Function

Electronic Notes in Discrete Mathematics 22 (2005) 357–361 www.elsevier.com/locate/endm Read-Once Functions Revisited and the Readability Number of a...

126KB Sizes 1 Downloads 11 Views

Electronic Notes in Discrete Mathematics 22 (2005) 357–361 www.elsevier.com/locate/endm

Read-Once Functions Revisited and the Readability Number of a Boolean Function Martin Charles Golumbic 1 Caesarea Rothschild Institute and Department of Computer Science University of Haifa, Mt. Carmel, Haifa 31905, Israel

Aviad Mintz 2 Caesarea Rothschild Institute University of Haifa, Mt. Carmel, Haifa 31905, Israel

Udi Rotics 3 School of Computer Science and Mathematics Netanya Academic College, P.O. Box 120, 42100 Netanya, Israel

Abstract In this paper, we present the first polynomial time algorithm for recognizing and factoring read-once functions. The algorithm is based on algorithms for cograph recognition and a new efficient method for checking normality. Its correctness is based on a classical characterization theorem of Gurvich which states that a positive Boolean function is read-once if and only if it is normal and its co-occurrance graph is P4 -free. We also investigate the problem of factoring certain non-read-once functions. In particular, we show that if the co-occurrence graph of a positive Boolean function f is a tree, then the function is read-twice. We then extend this further proving 1571-0653/$ – see front matter © 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.endm.2005.06.076

358

M.C. Golumbic et al. / Electronic Notes in Discrete Mathematics 22 (2005) 357–361

that if f is normal and its corresponding graph is a partial k-tree, then f is a read 2k function and a read 2k formula for F for f can be obtained in polynomial time. Keywords: read-once functions, boolean functions, k-trees, cographs, normal functions.

1

Introduction

A Boolean function f is called a read-once function if it has a (logically equivalent) factored form F(≡ f ) in which each variable appears exactly once. The factored form F is called a read-once formula for f . For example, the function f ≡ F1 = aq + acp + ace is a read-once function since it can be factored into the read-once formula f ≡ F2 = a(q + c(p + e)). Read-once functions have interesting special properties [2], [7], [11], [13], [15], and according to [16] account for a large percentage of functions which arise in real circuit applications. Read-once functions have also gained recent interest in the field of computational learning theory [1], [3], [6]. Read-once functions were first introduced by Hayes [12], where he described an algorithm for identifying and factoring fanout-free functions based on adjacency of the function variables, however its algorithm suffers from high complexity. Peer and Pinter [16] also gave an exponential time factoring algorithm for read-once functions. whose non-polynomial complexity is due to the need for repeated calls to a routine that converts sum-of-products boolean function representation to a product-of-sums boolean function representation, or vice-versa. Let f be a positive Boolean function over the variable set V = {x1 , x2 , ..., xn }. The co-occurrence graph of f , denoted G(f ) = (V, E), has vertex set V the same as the variables, and there is an edge (xi , xj ) in E if xi and xj occur together (at least once) in some prime implicant of f . A Boolean function f is called normal if every clique in its co-occurrence graph is contained in a prime implicant of f . Finally, a cograph is a graph which contains no induced chordless path P4 on four vertices, see [4], [5], [7]. In this paper, we present the first polynomial time algorithm for recognizing and factoring read-once functions. The algorithm is based on algorithms for cograph recognition and a new efficient method for checking normality. 1 2 3

Email: [email protected] Email: [email protected] Email: [email protected]

M.C. Golumbic et al. / Electronic Notes in Discrete Mathematics 22 (2005) 357–361

359

The idea for this method was proposed by the authors in [9] as a subroutine for the lower levels of recursion in the general factoring algorithm of [8], [14]. Its correctness is based on the following classical characterization theorem due to Gurvich [10], [11]: Theorem 1.1 A positive Boolean function f is read-once if and only if its co-occurrence graph G(f ) is P4 -free and f is normal. We provide details of our algorithm, proving the following. Theorem 1.2 Determining whether a given Boolean function f is read-once and, if so, providing a read-once formula for f can be done in O(pn2 ) time, where p is the number of prime implicants of f and n is the variables. Suppose a given function f is not a read-once function. We then may want to obtain a factored formula which has a small number of repetitions of the variables. For example, where each variable appears at most twice, i.e., a read-twice formula. We call a formula F read m if each variable appears at most m times in F. A function f is defined to be a read m function if it has an equivalent read m formula F(≡ f ). The readability of a function f is the smallest number m such that f is a read m function. In general determining the readability of a function might be quite difficult, since to the best of our knowledge it is not known whether there is a polynomial time algorithm which given a function f decides whether f is a read m function or not, for some fixed m ≥ 2. Therefore, we propose investigating restrictions of the general problem to special cases identified by the structure of the co-occurrance graph G(f ). As a first step in this direction, we show the following results: Theorem 1.3 Let f be a positive Boolean function whose co-occurrence graph G(f ) is a tree. Then f is a read-twice function and a read-twice formula for f can be obtained in O(n2 ) time. Theorem 1.4 Let f be a positive Boolean function which is normal and such that G(f ) is a partial k-tree. Then f is a read 2k function and a read 2k formula which is logically equivalent to f can be obtained in polynomial (O(nk+1)) time. These results naturally suggest the question of studying other graph classes. For example, is it true that for the classes of P4 -sparse and distance hereditary graphs (both are natural extensions of cographs) the readability of the corresponding formulas are unbounded? In other words, is it true that there

360

M.C. Golumbic et al. / Electronic Notes in Discrete Mathematics 22 (2005) 357–361

is no fixed k such that every normal function f is a read k function, even if G(f ) is a P4 -sparse graph (resp. a distance hereditary graph)? Another important question is whether there is a polynomial time algorithm which given a normal function f checks whether f is a read k function, for fixed k.

References [1] D. Angluin, L. Hellerstein and M. Karpinski. Learning read-once formulas with queries. J. ACM, 40:185-210, 1993. [2] E. Boros, V. Gurvich and P.L. Hammer. Read-once decompositions of positive boolean functions. Rutcor Research Report RRR 01/24-94, 1994. [3] N. Bshouty, T.R. Hancock, and L. Hellerstein. Learning boolean read-once formulas with arbitrary symmetric and constant fan-in gates. J. Comput. System Sci., 50:521–542, 1995. [4] D. Corneil, H. Lerchs, and L. Burlingham. Complement reducible graphs. Discrete Applied Mathematics, 3:163–174, 1981. [5] D. Corneil, Y. Perl, and L. Stewart. A linear recognition algorithm for cographs. SIAM Journal of Computing, 14:926–934, November 1985. [6] S.A. Goldman, M.J. Kearns and R.E. Schapire. Exact identification of read-once formulas using fixed points of amplification functions. SIAM J. Computing, 22(4):705-726, 1993. [7] M.C. Golumbic. Algorithmic graph theory and perfect graphs. Academic Press, New York, 1980. Second edition, Annals of Discrete Mathematics 57, Elsevier, Amsterdam, 2004. [8] M.C. Golumbic and A. Mintz. Factoring logic functions using graph partitioning. In Proc. IEEE/ACM Int. Conf. Computer Aided Design, November 1999, pages 195–198, 1999. [9] M.C. Golumbic, A. Mintz and U. Rotics. Factoring and recognition of read-once functions using cographs and normality. In Proc. of the 38th Design Automation Conf. (DAC 2001), pages 109–114, 2001. [10] V.A. Gurvich, On repetition-free Boolean functions, Uspekhi Mat. Nauk. 32 (1977) 183–184, (in Russian), also, On read-once Boolean functions, Russian Math. Surveys 32 (1977) 183–184.

M.C. Golumbic et al. / Electronic Notes in Discrete Mathematics 22 (2005) 357–361

361

[11] V. Gurvich. Criteria for repetition-freeness of functions in the algebra of logic. Soviet Math. Dokl., 43(3):721–726, 1991. [12] J. P. Hayes. The fanout structure of switching functions. J. of the ACM, 22:551–571, 1975. [13] M. Karchmer, N. Linial, I. Newman, M. Saks, and A. Wigderson. Combinatorial characterization of read-once formulae. Discrete Math., 114:275–282, 1993. [14] A. Mintz and M.C. Golumbic, Factoring Boolean functions using graph partitioning, Discrete Applied Math. (2005) to appear. [15] I. Newman. On read-once boolean functions. In Boolean Function Complexity: Selected Papers from LMS Symp. Durham, July 1990, pages 24–34, 1990. [16] J. Peer and R. Pinter. Minimal decomposition of boolean functions using nonrepeating literal trees. In IFIP, November 1995, 1995.