Functional completeness

Last updated

In logic, a functionally complete set of logical connectives or Boolean operators is one that can be used to express all possible truth tables by combining members of the set into a Boolean expression. [1] [2] A well-known complete set of connectives is { AND, NOT }. Each of the singleton sets { NAND } and { NOR } is functionally complete. However, the set { AND, OR } is incomplete, due to its inability to express NOT.

Contents

A gate (or set of gates) that is functionally complete can also be called a universal gate (or a universal set of gates).

In a context of propositional logic, functionally complete sets of connectives are also called (expressively) adequate. [3]

From the point of view of digital electronics, functional completeness means that every possible logic gate can be realized as a network of gates of the types prescribed by the set. In particular, all logic gates can be assembled from either only binary NAND gates, or only binary NOR gates.

Introduction

Modern texts on logic typically take as primitive some subset of the connectives: conjunction (); disjunction (); negation (); material conditional (); and possibly the biconditional (). Further connectives can be defined, if so desired, by defining them in terms of these primitives. For example, NOR (the negation of the disjunction, sometimes denoted ) can be expressed as conjunction of two negations:

Similarly, the negation of the conjunction, NAND (sometimes denoted as ), can be defined in terms of disjunction and negation. Every binary connective can be defined in terms of , which means that set is functionally complete. However, it contains redundancy: this set is not a minimal functionally complete set, because the conditional and biconditional can be defined in terms of the other connectives as

It follows that the smaller set is also functionally complete. (Its functional completeness is also proved by the Disjunctive Normal Form Theorem.) [4] But this is still not minimal, as can be defined as

Alternatively, may be defined in terms of in a similar manner, or may be defined in terms of :

No further simplifications are possible. Hence, every two-element set of connectives containing and one of is a minimal functionally complete subset of .

Formal definition

Given the Boolean domain B = {0, 1}, a set F of Boolean functions fi : BniB is functionally complete if the clone on B generated by the basic functions fi contains all functions f : BnB, for all strictly positive integers n ≥ 1. In other words, the set is functionally complete if every Boolean function that takes at least one variable can be expressed in terms of the functions fi. Since every Boolean function of at least one variable can be expressed in terms of binary Boolean functions, F is functionally complete if and only if every binary Boolean function can be expressed in terms of the functions in F.

A more natural condition would be that the clone generated by F consist of all functions f : BnB, for all integers n ≥ 0. However, the examples given above are not functionally complete in this stronger sense because it is not possible to write a nullary function, i.e. a constant expression, in terms of F if F itself does not contain at least one nullary function. With this stronger definition, the smallest functionally complete sets would have 2 elements.

Another natural condition would be that the clone generated by F together with the two nullary constant functions be functionally complete or, equivalently, functionally complete in the strong sense of the previous paragraph. The example of the Boolean function given by S(x, y, z) = z if x = y and S(x, y, z) = x otherwise shows that this condition is strictly weaker than functional completeness. [5] [6] [7]

Characterization of functional completeness

Emil Post proved that a set of logical connectives is functionally complete if and only if it is not a subset of any of the following sets of connectives:

Post gave a complete description of the lattice of all clones (sets of operations closed under composition and containing all projections) on the two-element set {T, F}, nowadays called Post's lattice, which implies the above result as a simple corollary: the five mentioned sets of connectives are exactly the maximal clones.

Minimal functionally complete operator sets

When a single logical connective or Boolean operator is functionally complete by itself, it is called a Sheffer function [8] or sometimes a sole sufficient operator. There are no unary operators with this property. NAND and NOR, which are dual to each other, are the only two binary Sheffer functions. These were discovered, but not published, by Charles Sanders Peirce around 1880, and rediscovered independently and published by Henry M. Sheffer in 1913. [9] In digital electronics terminology, the binary NAND gate (↑) and the binary NOR gate (↓) are the only binary universal logic gates.

The following are the minimal functionally complete sets of logical connectives with arity 2: [10]

One element
{↑}, {↓}.
Two elements
, , , , , , , , , , , , , , , , ,
Three elements
, , , , ,

There are no minimal functionally complete sets of more than three at most binary logical connectives. [10] In order to keep the lists above readable, operators that ignore one or more inputs have been omitted. For example, an operator that ignores the first input and outputs the negation of the second can be replaced by a unary negation.

Examples

Note that an electronic circuit or a software function can be optimized by reuse, to reduce the number of gates. For instance, the "AB" operation, when expressed by ↑ gates, is implemented with the reuse of "A ↑ B",

X ≡ (AB); ABXX

In other domains

Apart from logical connectives (Boolean operators), functional completeness can be introduced in other domains. For example, a set of reversible gates is called functionally complete, if it can express every reversible operator.

The 3-input Fredkin gate is functionally complete reversible gate by itself – a sole sufficient operator. There are many other three-input universal logic gates, such as the Toffoli gate.

In quantum computing, the Hadamard gate and the T gate are universal, albeit with a slightly more restrictive definition than that of functional completeness.

Set theory

There is an isomorphism between the algebra of sets and the Boolean algebra, that is, they have the same structure. Then, if we map boolean operators into set operators, the "translated" above text are valid also for sets: there are many "minimal complete set of set-theory operators" that can generate any other set relations. The more popular "Minimal complete operator sets" are {¬, } and {¬, }. If the universal set is forbidden, set operators are restricted to being falsity (Ø) preserving, and cannot be equivalent to functionally complete Boolean algebra.

See also

Related Research Articles

First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantified variables over non-logical objects, and allows the use of sentences that contain variables, so that rather than propositions such as "Socrates is a man", one can have expressions in the form "there exists x such that x is Socrates and x is a man", where "there exists" is a quantifier, while x is a variable. This distinguishes it from propositional logic, which does not use quantifiers or relations; in this sense, propositional logic is the foundation of first-order logic.

<span class="mw-page-title-main">Logical conjunction</span> Logical connective AND

In logic, mathematics and linguistics, and is the truth-functional operator of conjunction or logical conjunction. The logical connective of this operator is typically represented as or or (prefix) or or in which is the most modern and widely used.

<span class="mw-page-title-main">Logical connective</span> Symbol connecting sentential formulas in logic

In logic, a logical connective is a logical constant. Connectives can be used to connect logical formulas. For instance in the syntax of propositional logic, the binary connective can be used to join the two atomic formulas and , rendering the complex formula .

The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. It deals with propositions and relations between propositions, including the construction of arguments based on them. Compound propositions are formed by connecting propositions by logical connectives representing the truth functions of conjunction, disjunction, implication, equivalence, and negation. Some sources include other connectives, as in the table below.

<span class="mw-page-title-main">Sheffer stroke</span> Logical operation

In Boolean functions and propositional calculus, the Sheffer stroke denotes a logical operation that is equivalent to the negation of the conjunction operation, expressed in ordinary language as "not both". It is also called non-conjunction, or alternative denial, or NAND. In digital electronics, it corresponds to the NAND gate. It is named after Henry Maurice Sheffer and written as or as or as or as in Polish notation by Łukasiewicz.

<span class="mw-page-title-main">De Morgan's laws</span> Pair of logical equivalences

In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician. The rules allow the expression of conjunctions and disjunctions purely in terms of each other via negation.

In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or — in philosophical logic — a cluster concept. As a normal form, it is useful in automated theorem proving.

In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction of one or more clauses, where a clause is a disjunction of literals; otherwise put, it is a product of sums or an AND of ORs. As a canonical normal form, it is useful in automated theorem proving and circuit theory.

<span class="mw-page-title-main">Exclusive or</span> True when either but not both inputs are true

Exclusive or, exclusive disjunction, exclusive alternation, logical non-equivalence, or logical inequality is a logical operator whose negation is the logical biconditional. With two inputs, XOR is true if and only if the inputs differ. With multiple inputs, XOR is true if and only if the number of true inputs is odd.

Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, systems of intuitionistic logic do not assume the law of the excluded middle and double negation elimination, which are fundamental inference rules in classical logic.

<span class="mw-page-title-main">Logical NOR</span> Binary operation that is true if and only if both operands are false

In Boolean logic, logical NOR, non-disjunction, or joint denial is a truth-functional operator which produces a result that is the negation of logical or. That is, a sentence of the form (p NOR q) is true precisely when neither p nor q is true—i.e. when both p and q are false. It is logically equivalent to and , where the symbol signifies logical negation, signifies OR, and signifies AND.

<span class="mw-page-title-main">Commutative property</span> Property of some mathematical operations

In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a property of arithmetic, e.g. "3 + 4 = 4 + 3" or "2 × 5 = 5 × 2", the property can also be used in more advanced settings. The name is needed because there are operations, such as division and subtraction, that do not have it ; such operations are not commutative, and so are referred to as noncommutative operations. The idea that simple operations, such as the multiplication and addition of numbers, are commutative was for many years implicitly assumed. Thus, this property was not named until the 19th century, when mathematics started to become formalized. A similar property exists for binary relations; a binary relation is said to be symmetric if the relation applies regardless of the order of its operands; for example, equality is symmetric as two equal mathematical objects are equal regardless of their order.

In logic, a truth function is a function that accepts truth values as input and produces a unique truth value as output. In other words: the input and output of a truth function are all truth values; a truth function will always output exactly one truth value, and inputting the same truth value(s) will always output the same truth value. The typical example is in propositional logic, wherein a compound statement is constructed using individual statements connected by logical connectives; if the truth value of the compound statement is entirely determined by the truth value(s) of the constituent statement(s), the compound statement is called a truth function, and any logical connectives used are said to be truth functional.

In digital electronics, a NAND gate (NOT-AND) is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate. A LOW (0) output results only if all the inputs to the gate are HIGH (1); if any input is LOW (0), a HIGH (1) output results. A NAND gate is made using transistors and junction diodes. By De Morgan's laws, a two-input NAND gate's logic may be expressed as , making a NAND gate equivalent to inverters followed by an OR gate.

Henry Maurice Sheffer was an American logician.

<span class="mw-page-title-main">Logical equality</span>

Logical equality is a logical operator that corresponds to equality in Boolean algebra and to the logical biconditional in propositional calculus. It gives the functional value true if both functional arguments have the same logical value, and false if they are different.

A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, Boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arguments, that is, for each combination of values taken by their logical variables. In particular, truth tables can be used to show whether a propositional expression is true for all legitimate input values, that is, logically valid.

In mathematical logic, minimal axioms for Boolean algebra are assumptions which are equivalent to the axioms of Boolean algebra, chosen to be as short as possible. For example, an axiom with six NAND operations and three variables is equivalent to Boolean algebra:

References

  1. Enderton, Herbert (2001), A mathematical introduction to logic (2nd ed.), Boston, MA: Academic Press, ISBN   978-0-12-238452-3 . ("Complete set of logical connectives").
  2. Nolt, John; Rohatyn, Dennis; Varzi, Achille (1998), Schaum's outline of theory and problems of logic (2nd ed.), New York: McGraw–Hill, ISBN   978-0-07-046649-4 . ("[F]unctional completeness of [a] set of logical operators").
  3. Smith, Peter (2003), An introduction to formal logic, Cambridge University Press, ISBN   978-0-521-00804-4 . (Defines "expressively adequate", shortened to "adequate set of connectives" in a section heading.)
  4. Howson, Colin (1997). Logic with trees: an introduction to symbolic logic. London ; New York: Routledge. p. 41. ISBN   978-0-415-13342-5.
  5. Wesselkamper, T.C. (1975), "A sole sufficient operator", Notre Dame Journal of Formal Logic, 16: 86–88, doi: 10.1305/ndjfl/1093891614
  6. Massey, G.J. (1975), "Concerning an alleged Sheffer function", Notre Dame Journal of Formal Logic, 16 (4): 549–550, doi: 10.1305/ndjfl/1093891898
  7. Wesselkamper, T.C. (1975), "A Correction To My Paper" A. Sole Sufficient Operator", Notre Dame Journal of Formal Logic, 16 (4): 551, doi: 10.1305/ndjfl/1093891899
  8. The term was originally restricted to binary operations, but since the end of the 20th century it is used more generally. Martin, N.M. (1989), Systems of logic, Cambridge University Press, p. 54, ISBN   978-0-521-36770-7 .
  9. Scharle, T.W. (1965), "Axiomatization of propositional calculus with Sheffer functors", Notre Dame J. Formal Logic, 6 (3): 209–217, doi: 10.1305/ndjfl/1093958259 .
  10. 1 2 Wernick, William (1942) "Complete Sets of Logical Functions," Transactions of the American Mathematical Society 51: 11732. In his list on the last page of the article, Wernick does not distinguish between ← and →, or between and .
  11. "NAND Gate Operations" at http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/nand.html
  12. "NOR Gate Operations" at http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/nor.html