Algorithm Search⌘K

Definitioncore

Unate function

Also called monotone in each variable.

A Boolean function that is, in each variable, either nondecreasing or nonincreasing. Tautology and complement are easy for unate covers.

A Boolean function is unate in a variable xx if, as xx goes from 0 to 1 with the other inputs fixed, the value only goes up in all cases, or only goes down in all cases. It is positive unate in xx in the first case and negative unate in the second. A function is unate if it is unate in every variable. Otherwise it is binate in some variable, like x1⊕x2x_1 \oplus x_2. A positive unate function, unate in the positive sense in every variable, is what most mathematicians call a monotone function. That is why "monotone in each variable" and "monotone" are not the same: the first allows a different direction for each variable, while many authors use the second only for the positive case. Unate covers are easy: a unate cover is a tautology only if it has the cube with no literal. The unate recursive paradigm and Espresso are built on this fact.

Definition

Let f:{0,1}n→{0,1}f : \{0,1\}^n \to \{0,1\} and let fxif_{x_i} and fxˉif_{\bar{x}_i} be its cofactors by xi=1x_i = 1 and xi=0x_i = 0. Write g≤hg \le h when g(a)≤h(a)g(a) \le h(a) for every point aa.

  • ff is positive unate in xix_i if fxˉi≤fxif_{\bar{x}_i} \le f_{x_i}.
  • ff is negative unate in xix_i if fxi≤fxˉif_{x_i} \le f_{\bar{x}_i}.
  • ff is unate in xix_i if one of these holds, and binate in xix_i otherwise.
  • ff is unate if it is unate in each of its variables. It is positive unate if it is positive unate in each variable.

A function that does not depend on xix_i is both positive and negative unate in xix_i.

Unate cover. A cover CC, a set of cubes, is unate in xix_i if xix_i does not appear in CC both as xix_i and as xˉi\bar{x}_i. In positional notation, the column ii of CC does not hold both a 0 and a 1. The cover is unate if it is unate in every variable.

Facts.

  1. A unate cover gives a unate function. If no cube of CC has the literal xˉi\bar{x}_i, then every cube of the cofactor CxˉiC_{\bar{x}_i} is also a cube of CxiC_{x_i}, so fxˉi≤fxif_{\bar{x}_i} \le f_{x_i}.
  2. The converse is false for covers. The cover {x1,xˉ1x2}\{x_1, \bar{x}_1 x_2\} is binate in x1x_1, but its function x1+x2x_1 + x_2 is positive unate. Every unate function has some unate cover, for example the sum of its primes, by fact 3.
  3. Primes of a unate function. If ff is positive unate in xix_i, no prime of ff has the literal xˉi\bar{x}_i. Proof: let p=xˉiqp = \bar{x}_i q be a prime, where qq has no literal of xix_i. Take a point aa of qq with ai=1a_i = 1, and let a′a' be aa with ai=0a_i = 0. Then a′∈pa' \in p, so f(a′)=1f(a') = 1, and f(a)≥f(a′)=1f(a) \ge f(a') = 1 because ff is positive unate in xix_i. So qq is an implicant, and it contains pp strictly, which is not allowed.
  4. Tautology of a unate cover. A unate cover CC is a tautology (the constant 1) exactly when it holds the cube with no literal. Proof: if it does not, build a point aa: set ai=0a_i = 0 when xix_i appears in CC, ai=1a_i = 1 when xˉi\bar{x}_i appears, and ai=0a_i = 0 when neither does. Each cube of CC has a literal, and each literal of CC is false at aa. So CC is 0 at aa.
  5. Every prime is essential. If ff is completely specified and unate, each prime pp is essential, so the sum of all primes is the unique minimum sum of products. Proof for the positive case: by fact 3, pp is a product of positive literals. Let aa be the point with ai=1a_i = 1 exactly for the variables of pp. Any prime qq that contains aa is also positive, so its variables are among those of pp, so q⊇pq \supseteq p, and then q=pq = p since pp is prime. The negative and mixed cases are the same after renaming xix_i to xˉi\bar{x}_i.
  6. Unate covering. A product of sums of positive literals, like the Petrick function of a prime table, is a positive unate function. This is why the covering step of two-level minimization is called the unate covering problem. It is the set cover problem. When negative literals also occur, the problem becomes the binate covering problem.

Fact 4 gives a test in O(nm)O(nm) time for a unate cover of mm cubes. For a general cover the test is hard. A cover CC is a tautology exactly when the CNF that De Morgan's law gives for Cˉ\bar{C} is not satisfiable, and every CNF arises this way, so the tautology of a general cover is co-NP-complete.

Examples and non-examples

  • Unate. f=x1+xˉ2x3f = x_1 + \bar{x}_2 x_3 is positive unate in x1x_1 and x3x_3 and negative unate in x2x_2. The cover is unate, and by fact 4 it is not a tautology: the point a=(0,1,0)a = (0, 1, 0) makes it 0.
  • Monotone. The majority x1x2+x1x3+x2x3x_1 x_2 + x_1 x_3 + x_2 x_3 and every threshold function with positive weights are positive unate. A threshold function with mixed signs is unate. The converse fails: x1x2+x3x4x_1 x_2 + x_3 x_4 is positive unate but is not a threshold function.
  • Binate. x1⊕x2x_1 \oplus x_2 is binate in both variables. The multiplexer sˉa+sb\bar{s} a + s b is binate in ss and positive unate in aa and bb.
  • A binate cover of a tautology. {x1,xˉ1}\{x_1, \bar{x}_1\} is a tautology with no cube free of literals. Fact 4 needs the cover to be unate.
  • Counts. Of the 16 functions of two variables, 14 are unate; only x1⊕x2x_1 \oplus x_2 and its complement are not. For three variables, 104 of the 256 functions are unate, and 20 are positive unate. For four, 2170 of 65536 are unate and 168 are positive unate. The number of positive unate functions is the Dedekind number.
  • Don't-cares break fact 5. Let F={11}F = \{11\} and D={01,10}D = \{01, 10\} over x1x2x_1 x_2. Both FF and F∪DF \cup D are positive unate. The primes are x1x_1 and x2x_2, each covers the one on-set point, neither is essential, and there are two minimum covers.
  • A large complement. The complement of the positive unate function x1y1+⋯+xkykx_1 y_1 + \cdots + x_k y_k is negative unate. Its primes are the 2k2^k cubes zˉ1⋯zˉk\bar{z}_1 \cdots \bar{z}_k with each zi∈{xi,yi}z_i \in \{x_i, y_i\}, and by fact 5 all of them are needed. So a unate cover of kk cubes can have a complement with 2k2^k cubes.
  • Cofactor and Shannon expansion. The definition compares the two cofactors. Splitting a binate cover by the Shannon expansion on a binate variable makes the parts closer to unate.
  • Unate recursive paradigm. Tautology, complement and containment for covers, by splitting until each part is unate.
  • Espresso. Uses unate tautology and complement in each of its steps.
  • Prime implicant. Fact 5 says that for unate functions the primes are the answer.
  • Set cover and the binate covering problem. The unate and the binate cases of covering with a product of sums.
  • Zero-suppressed BDD. Stores sets of cubes such as unate covers in a compact way.

References

  1. Robert K. Brayton, Gary D. Hachtel, Curtis T. McMullen and Alberto L. Sangiovanni-Vincentelli, Logic Minimization Algorithms for VLSI Synthesis, Kluwer, 1984, Chapter 3, Decomposition and Unate Functions, Section 3.3, Unate Functions, and Section 3.5, Unate Complementation
  2. Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, Chapter 7, Two-Level Combinational Logic Optimization (unate covers, tautology and complementation)
  3. Gary D. Hachtel and Fabio Somenzi, Logic Synthesis and Verification Algorithms, Kluwer, 1996, Chapter 5, Heuristic Minimization of Two-Level Circuits

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/HABH4Y/text.yaml