500 likes | 657 Views
Clones. & Multiple-Valued Logic. Lucien Haddad ISMVL 2005. We will discuss : Motivation Functions on n variables of the k-valued logic & the projections. Composition of functions What is a Clone ? Why “Clone” ?. Direct Interest for MVLers : Completeness
E N D
Clones & Multiple-Valued Logic Lucien Haddad ISMVL 2005
We will discuss : • Motivation • Functions on n variables of the k-valued logic & the projections. • Composition of functions • What is a Clone ? • Why “Clone” ?
Direct Interest for MVLers :Completeness • Sheffer functions. • Clones and Relations. • Completeness Criterion, in particular for the 2 & 3–valued logic.
Motivation Let A be finite set A, F be a binary function and G be a ternary function on A. Thus F assigns to every ordered pair (a1, a2) a unique F(a1, a2) in A. Similarly G:= (a1,a2,a3) G(a1,a2,a3). Consider the circuit a1 a2 a3 F G G(F(a1,a2),a2,a3)
Example. Let A := {0,1,2}; F(a1,a2) := a1 + 2a2 (mod 3); G(a1,a2,a3) := a1 + a1a2 + a3 (mod 3) Then the ternary function H(a1,a2,a3) := G(F(a1,a2),a2,a3) satisfies H(a1,a2,a3) = a1 + 2a2 +(a1 + 2a2)a2 + a3 (mod 3) =a1 +a1 a2 + 2a2 +2a2 a2 + a3 (mod 3).
In the sequel A := {0,1,…, k-1}, where k 2 . Functions of n variables. For n ³ 1, an n-ary function f on A assigns to every ordered n-tuple (a1,…,an) of A an output f(a1,…,an) in A. Examples. 1- Let n = 4. The function f defined by f(a1,a2,a3,a4) := a1 + 2a2a4 is a 4-ary function on A.
2- For 1 i n, define the n-ary function ei(n) i-th projection by ei(n) (a1,…,an) := ai for all a1,…,an in A. Here are two gates realizing projections: a1 a2 a3 a4 a5 e2(3) a2 a2 e1(4)
Composition of functions. Let G be an n-ary function and F1, F2,…, Fn be n m-ary functions on A. Denote by H := G[F1, F2,…, Fn] the composition of G with F1, F2,…, Fn . H is the m-ary function on A defined by H(a1,a2,…,am) := G[F1(a1,a2,…,am) , …, Fn(a1,a2,…,am) ]
Examples. Let F be a binary function on A. 1 – The unary function F defined by F(a) := F(a,a) can be obtained by composing F with the projections. Indeed F(a) = F(a,a) = F[e1(1)(a), e1(1)(a)] = F[e1(1),e1(1)](a). 2 - We can also obtain the binary function F defined by F(a1,a2) := F(a2,a1) : F(a1,a2) = F(a2,a1) = F[e2(2)(a1,a2), e1(2)(a1,a2)] = F[e2(2),e1(2)](a1,a2).
2- Define the ternary function K := F[e1(3), e2(3)]. Then K(a1,a2,a3) = F[e1(3) (a1,a2,a3) , e2(3) (a1,a2,a3)] = F(a1,a2). Thus we defined a unary function ( F ) and a ternary function [ K ] from the binary function F and some projections. Thus Composing a function with projections allows us to create functions of different arities on A.
3- Let G be a ternary function on A and put H := G[K, e2(3),e3(3)]. Then H(a1,a2,a3) = = G[K(a1,a2,a3),e2(3)(a1,a2,a3),e3(3)(a1,a2,a3)] = G(F(a1,a2),a2,a3). Therefore the ternary function H (defined earlier) can be obtained by composing the functions F, G and some projections.
4 - Consider the set of all functions f on A such that f(0,…,0) = 0. It is clear that ei(n) (0,…,0) := 0 for all i and all n, i.e., all projections belong to that set. Moreover it is not hard to show that composing functions that assign (0,…,0) 0 leads to a function with the same property. Having said all that, what is a clone??
Definition.Let A be a finite set. A set of functions on A 1 - closed under compositions 2- containing all projection functions is called a clone over A.
Why the word “Clone”?? The famous British Group Theorist Philip Hall (1904-1982) used this word for the first time while working on closed sets of functions obtained from functions on a group. He saw an analogy between cell growth and the way one can build functions from the multiplication and the inverse functions on the group.
the ternary function • H(a1,a2,a3) := G(F(a1,a2),a2,a3) Remark. • If a clone, C, contains a binary function F and a ternary function G, then as C is closed under composition and contains all projections, it contains: • the unary function F, • the binary functionF and • the ternary function H := G[K, e2(3),e3(3)]
Examples of clones. Denote by OA(n) the set of all n-ary functions on A and let OA := OA(n) Thus OA is the set of all functions on A. 1 - OA is clone over A. It is the “ largest” clone on A, i.e., every clone on A is contained in it. 2- The set of all projections is a clone over A. It is the “smallest” clone on A, i.e., it is contained in every clone on A.
3 – Let A = {0,1}. The set {f OA | f(0,…,0) = 0} is a clone called the clone of all 0-preserving functions over {0,1}. Generalization. Let A = {0,1,…,k-1} and let B be a subset of A. Then the set Φ:= {f OA| f(a1,a2,…,an) B whenever a1, a2,…, an B} is a clone over A. Notice that Φ = OA for B = { } or B = A.
Why Φ is a clone? Leta1, a2,…, am B. As ei(m) (a1,…,am) := ai B, we have that ei(m) belongs to Φ, i.e., Φ contains all projections. Now let g, f1, f2,…, fmΦ. As f1, f2,…, fm are in Φ, f1(a1,a2,…,am) B, …, fm(a1,a2,…,am) B. Now since g is in Φ, g[f1(a1,a2,…,am) , …, fm(a1,a2,…,am) ] B. Thus g[f1, f2,…, fm] belong to Φ and so Φ is closed under compositions, i.e., Φ is a clone.
4 – Let A = {0,1}. The set {f OA| f(a1,a2,…,an) f(b1,b2,…,bn) whenever a1 b1and a2 b2 and … an bn } is a clone over {0,1} (the clone of all monotonicfunctions). Generalization. Let A = {0,1,…,k-1} and let R be a binary relation on A. The set Φ := {f OA| if (a1, b1) R,…, (an, bn) R, then(f(a1,a2,…,an),f(b1,b2,…,bn)) R } is a clone over A.
5 – Let A = {0,1}. The set {f OA| ifa1= ~ b1,…, an = ~ bnthen f(a1,a2,…,an) = ~ f(b1,b2,…,bn)} is a clone over {0,1} called the clone of all self-dual functions. Generalization. Let A = {0,1,…,k-1}. The set Φ := {f OA| ifa1 b1 and … and an bn , then f(a1,a2,…,an) f(b1,b2,…,bn)} is a clone over A. For example the ternary function defined by g(a1,a2):= 1 + a1 (mod k) belongs to Φ.
Indeed let (a1,a2) and (b1,b2) be such that a1 b1 and a2 b2. Then g(a1,a2) := 1 + a1 and g(b1,b2):= 1 + b1 (mod k). Now as a1 b1 and as a1 , b1 {0,1,…,k-1}, we have that 1 + a1 1 + b1 (mod k), i.e., g(a1,a2)g(b1,b2). Thus the binary function g belongs to the set Φ := {f OA| if a1 b1 and … an bn , then f(a1,a2,…,an) f(b1,b2,…,bn)} .
Problem. Let X be a set of functions on A. What is the set Clo(X) of all functions from OA which can be obtained as finitary compositions of functions from X (and the projections)?
Stated differently, What is the set Clo(X) of all functions on A which can be realized by circuits constructed exclusively from gates realizing functions from X (assuming that we have a potentially unlimited supply of gates of each type f X) ?
Definitions.A set of functions X is (functionally) complete in OA if Clo(X) = OA , i.e., if every function on A can be obtained as compositions of functions from X (and the projections). A function f is Sheffer in OA if the set {f} is complete in OA , i.e., if any function on A can be realized by circuits constructed from the gate realizing f.
The completeness problem was first studied for A = {0,1}. The first general completeness criterion was given by Emile Post in 1921, and was rediscovered many times. It is expressed in terms of the five maximal clones on A = {0,1}.This will be discussed later on.
Examples.1 - Let A = {0,1}. {~,} is complete in OA . Moreover the function f(a1,a2) := 0 if (a1,a2) (0,0) and f(0,0) := 1(“NOR” function); is Sheffer in OA . Generalization. Let A = {0,1,…,k-1}. Define the unary function f(a):= 1 + a (mod k) and the binary function g(a1,a2):= max {a1,a2}. The set {f,g} is complete in OA .
2 - Let A = {0,1}. Define the three binary functions: f1(a1,a2) := min{a1,a2}; f2(a1,a2) := 1 if a1 a2 and f2(a,a) := 0; ( XOR ) f3(a1,a2) := a1a2 , i.e., f3(a1,a2) := 1 if (a1,a2) (1,0) and f3(1,0) := 0. The set {f1,f2,f3} is complete in OA Generalization.Sierpinski 1945 Let A = {0,1,…,k-1}. The set of all binary functions on A is complete in OA .
What is the use of clones in all this ? • Definition. A clone is a maximalclone if it is properly contained in no other clone but OA . • Using results from Universal Algebra, it can be shown that • A set of functions X is complete in OA if and only if X is contained in NO maximal clone over A. • In particular a function f is Sheffer in OA iff it belongs to no maximal clone over A.
The set X is complete if and only if to every maximal clone M in OA, X contains a function f not belonging to M. • So the most general completeness criterion reduces to determine all maximal clones over A. • A general completeness criterion was found by • E. Post (1921) for A= {0,1}; • S. V. Jablonskii (1954) for A = {0,1,2}; • I. G. Rosenberg (1970) for A = {0,1,…, k-1}.
One can describe Clones using relations. • Definition. • An h-ary relation on A is a subset of Ah. • Examples. • Let A = {0,1,2} and Ω := {(0,0),(1,1),(2,2)}. • Ω{(0,1),(1,0)} is an equivalence relation • Ω{(0,1),(1,2),(0,2)} is a partial order relation on A. • - R:= {(a,b,c,d) A4 | a + b = c + d (mod 3)} • is a 4-ary relation on A. Here (1,0,2,2) belongs to R while (1,0,2,0) does not.
We have seen that a function on {0,1} is called monotonic if f(a1,a2,…,an) f(b1,b2,…,bn) whenever a1 b1, a2 b2… and an bn . This can be expressed as: a1a2… an f(a1, a2,…,an) If b1b2… bn Thenf(b1, b2,…,bn)
Definition. We say that the n-ary function f preserves the h-ary relation R if for every matrix (aij) whose columns are all in R the row values of f form an h-tuple belonging to R, i.e., a11 a12 … a1n f(a11 a12 … a1n) If : : : Then : ah1 ah2 … bhn f(ah1 ah2 … ahn) . R R R R
Notation. • Pol(R) := {f OA | f preserves R}. • Fact.Let A be a finite set and R be any relation on A. Then Pol(R) is a clone over A. • Example.Let A = {0,1} and • ρ:={(a,b,c,d) A4 | a+b+c+d = 0 (mod 2)}. • Then Pol(ρ) is the clone of all linearfunctions over A. Thus f Pol(ρ) iff • f(a1, a2,…,an) := β1a1+ β2a2+… + βnan + c • for some β1 ,…,βn, cA and + is mod 2 (E.Post)
Theorem. Let A = {0,1}. There are exactly five maximal clones over A. These are - Pol({0}), the 0-preserving functions; - Pol({1}), the 1-preserving functions; - Pol(), the monotonic functions; - Pol({(0,1),(1,0)}), the self-dual functions; - Pol(ρ), the linear functions.
The completeness criterion due to E. Post: Theorem. A set of function X is complete in {0,1} if and only if to each of the 5 relations above, X contains a function not preserving it. Application 1. The set {~, } is complete. As ~ 0 = 1 and ~ 1 = 0, ~ preserves neither {0} nor {1} . 0 1 but ~ 1 ~ 0, thus ~ Pol(). It is not hard to show that ~is not linear either. As 0 1 = 1 0 = 1, is not self-dual. By the above result {~, } is complete.
Application 2. The NOR function is Sheffer in {0,1}. Indeed let us denote the NOR function by f. From f(0,0) = 1 and f(1,1) = 0, NOR preserves neither {0} nor {1}. As f(1,0) = f(0,1) = 0, NOR is not self-dual. Since f(0,0) = 1 and f(1,0) = 0, NOR is not monotonic. It is not hard to show that NOR is not linear. By the above Theorem NOR is Sheffer in {0,1}. Here is a better proof of this result:
Application 3. An n-ary function f is Sheffer in {0,1} iff f(0,…,0) = 1, f(1,…,1) = 0 and f(a1, a2,…,an) = f(~a1, ~a2,…, ~an) for some a1, a2,…,an {0,1}. The first two conditions give that f is not monotonic and is neither 0 nor 1 preserving. The third condition gives that f is neither self-dual nor linear. This result allows to show that almost 25% of functions are Sheffer on {0,1}.
We turn to the case A = {0,1,…, k-1}. As mentioned earlier Jablonskii established a completeness criterion for {0,1,2} and I.G. Rosenberg for the very general case. It has been reported that the famous Algebraist A.I. Mal’cev had a completeness criterion for A = {0,1,2,3}.
In the Rosenberg classification maximal clones belong to 6 different families; all determined by relations. We will not give their full description here due to lack of space. We rather apply the Rosenberg classification to the case A = {0,1,2}. Put Ω := {(0,0),(1,1),(2,2)}.
Theorem: There are exactly 18 maximal clones over {0,1,2}. These are polymorphs of the following relations: Central relations: B1 := {0}; B2 := {1}; B3 := {2}; B4 := {0,1}; B5 := {0,2}; B6 := {1,2}.
Equivalence relations: E1 :=Ω{(0,1),(1,0)}; E2 :=Ω{(0,2),(2,0)}; E3 :=Ω {(1,2),(2,1)}; E4 :=Ω{(0,1),(1,0),(0,2),(2,0)}; E5 :=Ω{(0,1),(1,0),(1,2),(2,1)}; E6 :=Ω{(0,2),(2,0),(1,2),(2,1)}; Permutation with cycles of prime length:σ:= {(0,1),(1,2),(2,1)}.
Bounded order relations: O1 :=Ω {(0,1),(1,2),(0,2)}; O2 :=Ω {(0,2),(2,1), (0,1)}; O3 :=Ω {(1,0),(0,2),(1,2)}; Prime affine relation: R:= {(a,b,c,d) A4 | a + b = c + d (mod 3)}. h-Regular relation: θ := {(a,b,c) A3 | |{a, b, c}| 2}.
We describe two of these clones. 1 - Let B6 = {1,2}. Then f Pol(B6) iff f(a1 ,…, an) {1, 2} whenever a1,…,an = 1 or 2. Thus the constant function c1(a1,…,an ) := 1 and the function h(a1,a2):= (a1 + a2 (mod 2)) +1 both belong to Pol(B6). However the function g(a1,a2) := a1 + a2 (mod 3) does not belong to Pol(B6) as g(1,2) = 0 {1,2}. One can show that the set Pol(B6){g} is complete in OA.
2 - Let θ := {(a,b,c) A3 | |{a, b, c}| 2}. Thus (0,2,0) θ while (2,0,1) θ. Pol(θ) is called the Slupecki clone on A. It contains all unary and all constant functions on A. A function h belongs to Pol(θ) iff h takes at most two values or it can be defined from a unary function, i.e., h(a1 ,…, an) := φ(ai) for some unary function φ, like for example h(a1 ,a2, a3) := a2 + 1 (mod 3).
Theorem:A set of function X is complete in {0,1,2} if and only if to each of the 18 relations above, X contains a function not preserving it. Remarks: 1- It is not hard to construct, for each of the the 18 relations above, a binary function that do not preserve it. This shows that the set of all binary functions is complete (Sierpinski’s Theorem for the case A = {0,1,2}).
2- We mentioned earlier that the set {f,g} is complete in OA where f(a):= 1 + a (mod k) and g(a1,a2):= max {a1,a2}. This can be verified for A = {0,1,2} using the 18 relations above. For example one can check that f preserves none of the Central relations Bi, none of the Equivalence relations Ei and none of the Order relations Oi.
On the other hand g does not preserve neither σ (permutation), nor R (the p-group) nor θ. To see that g does not preserve θ take 0 0 max(0,0) = 0 1 0 max(1,0) = 1 1 2 max(1,2) = 2 The two columns on the left hand side belong to θ while the column on the right hand side does not. Thus g Pol(θ).
In the same direction: • Clones of … • Partial Functions; • Uniformly Delayed Functions; • Hyperfunctions and • Partial Hyperfunctions
Working with clones… Thanks foryourattention Questions ? Comments?