1 / 58

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

Read-Once Functions (Revisited) and the Readability Number of a Boolean Function. Martin Charles Golumbic Caesarea Rothschild Institute University of Haifa. Joint work with Aviad Mintz and Udi Rotics. Outline of Talk. Read Once Functions Motivation CoGraphs and CoTrees

walker
Download Presentation

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

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Read-Once Functions (Revisited) and the Readability Number of a Boolean Function Martin Charles Golumbic Caesarea Rothschild Institute University of Haifa Joint work with Aviad Mintz and Udi Rotics

  2. Outline of Talk • Read Once Functions • Motivation • CoGraphs and CoTrees • Graph of a Formula • Normality • Gurvich Theorem • Previous Work of Recognizing Read Once Functions • Our Method for Recognition (the ROF Algorithm) • Complexity of Checking Normality • Results • Advantages and Drawbacks • Conclusions

  3. Read-Once Functions • A Boolean function that has a factored form in which each variable appears only once. Example. A read-once function:

  4. Read-Once Functions • A Boolean function that has a factored form in which each variable appears only once. Example. A read-once function: Example. Not read-once functions: Read-once functions are assumed to be positive.

  5. Our Motivation Factoring using Graph Partitioning ROF • The Read-Once algorithm (so called ROF) is a dedicated factoring subroutine to handle the lower levels of the general factoring algorithm usinggraph partitioning.

  6. Graph of a Boolean Function • Each literal of function F is mapped to a vertex in the graph “co-occurrence” graph =(V,E). • Each prime implicant (minterm, cube) forms a clique in  (not necessarily maximal) . where is a prime implicant.

  7. Graph of a Formula - Example

  8. CoGraphs Recursive Definition: • A single vertex is a cograph. • The disjoint union of cographs is a cograph. • The join of cographs is a cograph, (i.e., adding all edges between them).

  9. CoGraphs Recursive Definition: • A single vertex is a cograph. • The disjoint union of cographs is a cograph. • The join of cographs is a cograph, (i.e., adding all edges between them). CoTree Representation: Leaves are labeled by the vertices. Union nodes labeled by 0 -- or by + Join nodes labeled by 1 -- or by *.

  10. CoTrees (Example) 1 0 0 cograph cotree

  11. CoTrees (Example)

  12. CoGraph Properties • The complement of a CoGraph is also a CoGraph, and • The coTree of G is obtained from the coTree of G by reversing the 0/1 labels of the internal nodes.

  13. CoGraph Properties • The complement of a CoGraph is also a CoGraph, and • The coTree of G is obtained from the coTree of G by reversing the 0/1 labels of the internal nodes. • The complement of a connected CoGraphis disconnected.

  14. CoGraph Properties • The complement of a CoGraph is also a CoGraph, and • The coTree of G is obtained from the coTree of G by reversing the 0/1 labels of the internal nodes. • The complement of a connected CoGraphis disconnected. • Two vertices of a coGraph G are adjacent iff their lowest common ancestor in the coTree is labeled 1.

  15. CoGraph Properties • The complement of a CoGraph is also a CoGraph, and • The coTree of G is obtained from the coTree of G by reversing the 0/1 labels of the internal nodes. • The complement of a connected CoGraphis disconnected. • Two vertices of a coGraph G are adjacent iff their lowest common ancestor in the coTree is labeled 1. • The CoTree is a unique representation of the CoGraph (up to isomorphism – blowing in the wind). Two views: recursive construction recursive decomposition

  16. P4 -free Graphs - A chordless path containing 3 edges and 4 vertices. A -free Graph does not contain any copy of as an induced sub-graph. -free Graphs are equivalent to CoGraphs !

  17. CoGraph Characterization Theorem Theorem. The following conditions are equivalent: • G is a cograph * • G has a cotree representation ** • G is P4 – free • For every subset X of the vertices, |X|>1, either the induced subgraph GX is disconnected or its complement GX is disconnected. * (recursive construction) ** (recursive decomposition) __

  18. Recognizing CoGraphs • A naïve algorithm for recognizing a given coGraph and constructing the coTree: (1) If G is disconnected, make labeled root 0 and continue recursively on each component. (2) If G is connected, make labeled root 1, form the complement and FAIL if it is connected; otherwise continue recursively.

  19. Recognizing CoGraphs • A naïve algorithm for recognizing a given coGraph and constructing the coTree: (1) If G is disconnected, make labeled root 0 and continue recursively on each component. (2) If G is connected, make labeled root 1, form the complement and FAIL if it is connected; otherwise continue recursively. • Complexity of naïve is O(n3), but there are • Linear time algorithms: Corneil,….Habib ….

  20. Recognizing CoGraphs • A naïve algorithm for recognizing a given coGraph and constructing the coTree: (1) If G is disconnected, make labeled root 0 and continue recursively on each component. (2) If G is connected, make labeled root 1, form the complement and FAIL if it is connected; otherwise continue recursively. • Complexity of naïve is O(n3), but there are • Linear time algorithms: Corneil,….Habib …. • The term “cograph” stands for “complement reducible graph” since it can be decomposed using the naïve algorithm.

  21. CoGraph Generation - Example T 1 0 e f g a b T 1 0 c d e f T T 1 2 0 0 g a b c d

  22. CoGraph Generation – Example (Cont. 1) T 0 1 T T 1 2 0 0 b a a b T T 3 4 T 0 1 e f T T 1 2 0 0 g T T 5 7 a b g 1 1 T T T 3 4 6 c d

  23. CoGraph Generation – Example (Cont. 2) T 0 1 T T 1 2 0 0 T T 5 7 a b g 1 1 T T T 3 4 6 T d c 0 c d 1 T T 8 9 T T 1 2 0 0 T T 5 7 a b g 1 1 1 T T T 3 4 6 f e c d e f T T T T 8 9 10 11

  24. CoGraph Generation – Example (Cont. 3)

  25. Recall: Co-occurrence Graph  of a Boolean Function • Each literal of the function F is mapped to a vertex in the graph “co-occurrence” graph =(V,E). • Each prime implicant (minterm, cube) forms a clique in  (not necessarily maximal) . where is a prime implicant.

  26. Graph of a Formula - Example

  27. Extracting a Function from a Graph Before: function to a graph. Now: graph to a function. • For an arbitrary graph , we transform each maximal clique into a prime implicant (minterm) in a b F= abc + ad + df + cef c d e f • Generally, constructing is an NP-Complete problem, since we must find all maximal cliques.

  28. Normality Example: b a c • is normal if mapping it to graph and back to a function will yield the original function, i.e.

  29. Gurvich Theorem is a read-once function. is normal and its graph contains no sub- graph isomorphic to (CoGraph). The graphs and dof the function F and the dual function Fdare complementary. Let be a positive function and let be the graph of . Then the following statements are equivalent: For all prime implicants P and dual prime implicants D, we have |P D| = 1.

  30. Example F = x1x2  x2x3  x3x4  x4x5  x5x1 co-occurrence graph is the chordless 5-cycle C5. - F is normal, but ΓF is not a cograph (has a P4) Fd = x1x2x4  x2x3x5  x3x4x1  x4x5x2  x5x1x3 co-occurrence graph is the complete graph K5. - Fdis not normal, but ΓFdis a cograph (has no P4)

  31. Proposed Method for Recognition Use of Gurvich Theorem andCoGraph recognition algorithm. Checking normality in polynomial complexity. Result: The proposed algorithm has polynomial complexity of where is the formula’s size and is the number of function’s variables (the support).

  32. General Flow Boolean Mapping Formula (SOP, POS) Initial Graph CoGraph Recoginition CoGraph Normality Checking Read-Once Function F Graph  CoTree and Function F

  33. Previous Work on Read Once Recognition • Hayes [1975] – Recognition and factoring of Fanout-Freefunctions based on variables adjacency.* • Peer and Pinter [1995] – Recognition and factoring of Non-Repeatablefunctions based on Non-RepeatableTrees. * *Both algorithms have Non-Polynomial complexity. Additional theoretical work has been done by: Gurvich [1991] Karchmer, Linial, Newman, Saks and Wigderson [1993] Goldman, Kearns and Schapire [1993] Bshouty, Hancock and Hellerstein [1995] Others…

  34. ROF Algorithm • Check that the given formula is positive (or unate). 2) Generate the graph of . • Check if the graph is a CoGraph and generate its CoTree and function . 4) Check if the generated function is normal. Failure during steps 1, 3 or 4 finishes the algorithm.

  35. How do we do it efficiently?

  36. Checking Normality: Is F =F? Compares the input SOP/POS representation of and the generated function (both represented by trees). Represents each tree by an integer vector and then checks for vector equivalence. The vectors are calculated from the leaves up to the root.

  37. Checking Normality Example –The Input Tree

  38. Checking Normality Example –The Generated Tree

  39. Comparing the Vectors For F: the vector represents the prime implicants of F by definition. For F: the vector represents the maximal cliques of the cograph, and hence the prime implicants of F. By sorting the vectors, they can easily be compared.

  40. Complexity Building the co-occurrence graph G is O(ΣNi2) for Ni variables in implicant #i. Testing whether G is a coGraph and building the coTree is O(N2). Checking normality is O(L*N). Result: The proposed algorithm has polynomial complexity of where is the formula’s size and is the number of function’s variables.

  41. Advantages and Drawbacks Advantages • Fast method to recognize read-once functions. • Fast method to factor read-once functions. • Low complexity – Drawbacks • Factors only read-once functions.

  42. Open Questions #1 • What can be said about RECOGNITION if F is given in some other type of representation? • Comment: If F is some other formula (not a DNF or CNF) or if F is represented as a BDD, or whatever, we might have to pay a high price to convert it into a DNF and use the GMR method.

  43. Learning a Read-Once Function • Input: A oracle (black box) to evaluate F at any given point, where F is not known, but IS known to be read-once. • Output: A read-once expression for F. Example: Is (1,1,0,0) true? YES: (1,1,1,0) (1,1,0,1) (1,1,1,1) are all true. NO: (1,0,0,0) (0,1,0,0) (0,0,0,0) are all false.

  44. Learning a Read-Once Function Angluin, Hellerstein, Karpinski (1993): Theorem. The Read-Once Learning problem can be solved using O(n3) time and O(n2) queries. They showed how to build the co-occurrence graph Γ using an oracle.

  45. Related Topics and Applications Readability of a Boolean Function Factoring General Boolean Functions

  46. The Readability Number • What if F is not read-once? • Could it be read-twice? • Readability Number k: The smallest value of k such that F can be factored so that each variable appears at most k times.

  47. The Readability Number Theorem: If F is a normal function and F is a partial k-tree, then F has readability number at most 2k . Moreover, a formula can be constructed in O(nk+1) time. Corollary: If F is a tree, then F is read-twice.

  48. Example: A 2-tree

  49. Open Questions #2 • What other graphs give read-twice functions? • Is our 2k upper bound tight for partial k-trees? • Find other families for which the readability can be determined. Remark. Our 2k method also holds for normal functions for which (F) has an ordering of its vertices v1, v2, … , vn such that vi is adjacent to at most k of v1, v2, … , vi-1 .

  50. Factoring General Boolean Functions Using Graph Partitioning Aviad Mintz Martin C. Golumbic University of Haifa

More Related