+ All Categories
Home > Documents > petrik_masters_thesis

petrik_masters_thesis

Date post: 07-Apr-2018
Category:
Upload: atul-kumar-singh
View: 221 times
Download: 0 times
Share this document with a friend

of 101

Transcript
  • 8/4/2019 petrik_masters_thesis

    1/101

    Design of Many-Valued Logical Circuits

    Milan Petrk 1

    Center for Machine Perception, Department of Cybernetics

    Faculty of Electrical Engineering, Czech Technical University

    Technicka 2, 166 27 Prague 6, Czech Republic

    [email protected]

    February 8, 2004

    1 Work supported by grant 201/02/1540 of the Grant Agency of the Czech Republicand CEEPUS net SK-042.

  • 8/4/2019 petrik_masters_thesis

    2/101

    Abstract

    In this work we generalize the problem of logical circuit design to the many-

    valued logic with a finite number of logical values. We divide the problem totwo main parts.In the first part we describe the design of disjunctive and conjunctive normal

    forms and, above all, their minimization using Svoboda maps. We also discussthe question of minimal functionally complete sets of operations and we findsuch a set containing two logical operations.

    In the second part we introduce many-valued memory circuits based on ageneralization of the R-S memory circuit using gates implementing many-valuedSheffer, resp. Pierce, operation.

    In the appendix we introduce two programs relating to this topic. ProgramMVQuine expresses a many-valued logical function defined by a table of valuesin a disjunctive normal form based on the standard conjunction, the standarddisjunction, Kronecker delta and all logical constants. Program MVSim is a

    simulator designed for demonstration which produces a time graph of the valuesof input, output and inner signals of a many-valued logical circuit. The logicalcircuit is defined in a text file by a language designed for this purpose.

  • 8/4/2019 petrik_masters_thesis

    3/101

    Anotace

    Tato prace se zabyva zobecnenm problemu navrhu logickych obvodu pro vce-hodnotove logiky s konecnym poctem logickych hodnot. Problem je zde rozdelen

    do dvou hlavnch cast.V prvn casti je popsan zpusob navrhu disjunktivnch a konjunktivnch

    normalnch forem a predevsm jejich minimalizace pomoc Svobodovych map.V souvislosti s normalnmi formami je take diskutovana otazka minimalityuplnych mnozin logickych operac a nalezena nejmens takova mnozina ob-sahujc dve logicke operace.

    V druhe casti jsou studovany vcehodnotove klopne obvody zalozene na zo-becnen R-S klopneho obvodu s pouzitm hradel implementujcch vcehodnotovouShefferovu resp. Pierceovu operaci.

    V prloze jsou dale popsany dva programy souvisejc s touto problematikou.Program MVQuine vyjadruje vcehodnotovou logickou funkci definovanou tab-ulkou hodnot v disjunktivn normaln forme zalozene na standardn konjunkci,standardn disjunkci, Kroneckerove delta a vsech logickych konstantach. Pro-

    gram MVSimje simulator pro demonstracn ucely schopny vyprodukovat casovygraf prubehu signalu na vstupu, vystupu i uvnitr vcehodnotoveho logickehoobvodu, ktery je definovan v textovem souboru jazykem vytvorenym k tomutoucelu.

  • 8/4/2019 petrik_masters_thesis

    4/101

    Declaration

    I declare that this thesis is a result of my own work and I used only sources that

    are listed in the bibilography.I argee with its use in the meaning of the Czech Copyright Law no. 121/2000,

    60.

    Prague, February 8, 2004 Milan Petrk

    1

  • 8/4/2019 petrik_masters_thesis

    5/101

    Acknowledgements

    I would like to express my thanks to professor Mirko Navara for his help andassistance in all kinds of problems that appeared throughout my work on thediploma thesis.

    2

  • 8/4/2019 petrik_masters_thesis

    6/101

    Contents

    1 Introduction 5

    2 Normal forms 7

    2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 Disjunctive normal forms . . . . . . . . . . . . . . . . . . . . . . 82.3 Conjunctive normal forms . . . . . . . . . . . . . . . . . . . . . . 12

    3 Svoboda maps 173.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.2 Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.3 Svoboda maps and standard operations . . . . . . . . . . . . . . 18

    3.3.1 Disjunctive normal forms . . . . . . . . . . . . . . . . . . 183.3.2 Conjunctive normal forms . . . . . . . . . . . . . . . . . . 21

    3.4 Svoboda maps and Lukasiewicz operations . . . . . . . . . . . . . 253.4.1 Disjunctive normal forms . . . . . . . . . . . . . . . . . . 253.4.2 Conjunctive normal forms . . . . . . . . . . . . . . . . . . 29

    3.5 Lukasiewicz equivalence . . . . . . . . . . . . . . . . . . . . . . . 333.6 Svoboda maps, Lukasiewicz equivalence and Lukasiewicz operations 35

    3.6.1 Disjunctive normal forms . . . . . . . . . . . . . . . . . . 353.6.2 Conjunctive normal forms . . . . . . . . . . . . . . . . . . 42

    3.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

    4 Functionally complete sets of operations 504.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.2 Lukasiewicz operations . . . . . . . . . . . . . . . . . . . . . . . . 504.3 Sheffer operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 524.4 Pierce operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    5 Memory elements 565.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.2 Memory elements designed by Svoboda maps . . . . . . . . . . . 575.3 Memory elements based on the R-S circuit . . . . . . . . . . . . . 59

    5.3.1 Two-valued R-S circuit and R-S latch . . . . . . . . . . . 595.3.2 Many-valued R-S circuit . . . . . . . . . . . . . . . . . . . 605.3.3 Unstable and invalid states of the many-valued R-S circuit 615.3.4 Memory elements based on the many-valued R-S circuit . 66

    5.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

    3

  • 8/4/2019 petrik_masters_thesis

    7/101

    6 Conclusion 71

    A MVQuine, version 0.1 74A.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74A.2 Many-valued Quine-McCluskey method . . . . . . . . . . . . . . 74

    A.2.1 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . 74A.2.2 Complexity of the algorithm . . . . . . . . . . . . . . . . 80

    A.3 Usage of the program . . . . . . . . . . . . . . . . . . . . . . . . 81A.3.1 Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . 81A.3.2 Running the program . . . . . . . . . . . . . . . . . . . . 82A.3.3 Format of input files . . . . . . . . . . . . . . . . . . . . . 83

    A.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

    B MVSim, version 0.3 85B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

    B.2 Compilation of the program . . . . . . . . . . . . . . . . . . . . . 85B.3 Input file defining a logical circuit . . . . . . . . . . . . . . . . . . 86

    B.3.1 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . 86B.3.2 Definition of a gate . . . . . . . . . . . . . . . . . . . . . . 86B.3.3 Definition of a gate delay . . . . . . . . . . . . . . . . . . 88

    B.4 Simulation of an R-S latch . . . . . . . . . . . . . . . . . . . . . . 89B.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

    4

  • 8/4/2019 petrik_masters_thesis

    8/101

    Chapter 1

    Introduction

    As an alternative to the classical two-valued logic, many-valued or fuzzy logichas been suggested as a tool which allows to express better the way of humanreasoning and deduction1. Besides highly nontrivial mathematical results, itbrought quite successful applications, especially in fuzzy control. Thereforethe development of special hardware for faster implementations of fuzzy logicbecame topical. One of possible approaches is the use of many-valued logicalcircuits.

    Many-valued logical circuits have a number of advantages in comparison totwo-valued circuits. First of all, it is a higher density of information; if we use e.g.the four-valued logic instead of the two-valued one, the sizes of buses as well asthe size of memory reduce to one half keeping the same amount of information.This hangs together with higher speed information transfer. Despite of manypossibilities of its realization, one inevitably encounters a problem of design ofmany-valued logical circuits from their smallest parts, logical gates.

    In the classical two-valued logic we talk about the design of a combinationallogic, i.e. logical circuits where each combination of values of the input portsuniquely determines the combination of values of the output ports. These out-put values depend only on the input values and nothing else. The problem ofcombinational logic design is closely related to mathematical logic, logical func-tions and their expressing in normal forms using finite sets of operations calledfunctionally complete sets of operations. As standard tools for expressing logi-cal functions in normal forms and their minimization, Karnaugh and Svobodamaps2, the Quine-McCluskey3 method and other tools are used.

    Here we deal with the generalization of this problem to the case of many-valued logic, admitting more than two (but finitely many) logical values. The

    problem of expressing a many-valued function in a normal form has been alreadystudied4 and one of the possibilities we summarize here in Chapter 2. We areinterested in the problem of their minimization. Our aim is to introduce toolsfor the many-valued logic as strong as the minimization tools in the two-valuedlogic. We want to express any many-valued logical function in a minimizednormal form using a finite set of many-valued operations. For this purpose we

    1See [5, 8, 10]2See [12, 11]3See [12, 11]4See [7, 14]

    5

  • 8/4/2019 petrik_masters_thesis

    9/101

    generalize the tool of Svoboda maps; we disallow Karnaugh maps since theirgeneralization to the many-valued logic is not possible. In Appendix A we show

    a possibility of generalization of the Quine-McCluskey method, another tool forexpressing logical function in a minimized normal form.

    Another problem hanging together with the problem of combinational logicoptimization is the problem of minimality of functionally complete sets of oper-ations. In Chapter 4 we try to find such a set as small as possible.

    In the logical circuit design, memory elements play a very important rolebeside the combinational logic. Without them the synchronous logical circuitdesign, the design of sequential circuits implementing final state automata etc.would not be possible. Therefore in Chapter 5 we show the design of many-valued memory elements based on a generalization of the R-S circuit knownfrom the two-valued logic.

    6

  • 8/4/2019 petrik_masters_thesis

    10/101

    Chapter 2

    Normal forms

    2.1 Introduction

    The basic problem in designing of combinational logic is to express any logicalfunction by logical gates realizing simple logical operations connected togetherin a logical circuit. This problem can be transformed into a problem of findingnormal forms which are standardized expressions composed by a finite set oflogical operations.

    In the two-valued case every logical function can be expressed by a disjunc-tive or conjunctive normal form composed by the operations of conjunction,disjunction and negation; the disjunctive normal form is a disjunction of con-

    junctions of literals, the conjunctive normal form is a conjunction of disjunctionsof literals, where a literal is a negation of a variable or the variable itself.

    Studies about expressing many-valued functions in normal forms and opti-mization have been already introduced1. In our work we take an inspirationfrom Dubrova [7]; in this section we summarize briefly the basics and give somealgorithms to find normal forms.

    We assume that the set of truth values is a finite totally ordered set, P. Asonly the order of truth values is important, without any loss of generality we shallrepresent them by rational numbers as follows: P= {0, 1n1 , 2n1 , . . . , n2n1 , 1}.A logical variable may attain values from P.Definition 2.1 (many-valued logical function) Anm-variable n-valued log-ical function, is a mapping f: Pm P.

    Definition 2.2 (functionally complete set of operations) A setA of func-

    tions over P is functionally complete if it is possible to define anym

    -variablelogical function over Pas a composition of functions from A.

    Definition 2.3 (normal form) A normal form is a standardized logical ex-pression with defined structure and such that every logical function can be ex-pressed in the normal form.

    Definition 2.4 For a set of truth values P, a literal of a many-valued variable1See [14, 7]

    7

  • 8/4/2019 petrik_masters_thesis

    11/101

    b is a unary operation defined by

    bS = 1 iff b S,

    0 otherwise.

    where S P.

    Remark 2.5 The notions of fuzzy operations we use are mostly taken from [13].

    Definition 2.6 A fuzzy conjunction is a binary operation . : P P Pthatsatisfies for every a,b,c P:

    a . b = b . aa . (b . c) = (a . b) . c

    b

    c

    a

    .b

    a

    .c

    a . 1 = a

    Definition 2.7 A fuzzy disjunction is a binary operation.: P P Pthat

    satisfies for every a,b,c P:

    a. b = b . a

    a. (b . c) = (a . b) . c

    b c a . b a . ca

    . 0 = aProposition 2.8 Each logical variable b satisfies:

    1. b . 0 = 0

    2. b. 1 = 1

    Proof According to Definition 2.6, resp. Definition 2.7:

    1. b . 0 1 . 0 = 0

    2. b. 1 0 . 1 = 1

    2.2 Disjunctive normal forms

    Reducing the set S in the expression of a literal bS to a singleton we get thedefinition of Kronecker delta.

    Definition 2.9 Kronecker delta is a binary operation : P P {0, 1}

    (a, b) = [a = b] =

    1 iff a = b,0 iff a = b.

    8

  • 8/4/2019 petrik_masters_thesis

    12/101

    Remark 2.10 In the sequel, we shall use the notation [a = b] for Kroneckerdelta instead of the notation (a, b) since it makes the expressions more readable.

    For the purpose of this section we will need only this type of literal. Thusby a literal of a many-valued variable b we will mean here an expression [b = ],where Pis a constant.Proposition 2.11 Each logical variable c attaining values inP= {1, 2, . . . , n}satisfies:

    [c = 1]. [c = 2]

    . . . . . [c = n] = 1Proof As the set {1, 2, . . . , n} contains all values which c may attain, thenone of the Kronecker delta functions in the expression

    [c = 1]. [c = 2]

    . . . . . [c = n]

    attains 1, as well as the whole expression.

    Definition 2.12 A P-term2 is an expression

    . [a1 = 1] . [a2 = 2] . . . . . [am = m]

    where [a1 = 1] . . . [am = m] are literals of logical variables a1, a2, . . . , am, and Pis a constant.

    The expression [a1 = 1]. [a2 = 2]. . . .. [am = m] will be called the bodyof the P-term.

    A minterm is a P-term that contains all logical variables.

    Proposition 2.13 The only possible evaluations of a P-term are (iff a1 =1, a2 = 2, . . ., am = m) and 0 (otherwise). This holds for any fuzzy

    conjunction . and fuzzy disjunction..

    Proof If all equalities in the literals are satisfied, the body of the P-term isevaluated by 1 and the whole P-term equals . If any of the equalities is violated,the body of the P-term, as well as the whole P-term, becomes 0.

    Proposition 2.14 (distributivity of P-terms) For any fuzzy conjunction.and fuzzy disjunction

    . two P-terms satisfy:

    . [a1 = 1] . . . . . [am = m] . . [a1 = 1] . . . . . [am = m]= .

    [a1 = 1] . . . . . [am = m]

    . [a1 = 1] . . . . . [am = m]

    iff i = i at least for one i 1, 2, . . . , m.2A product term; this notation comes from the two-valued logic (see [12]) denoting a term

    composed by operations of logical product (i.e. logical conjunction).

    9

  • 8/4/2019 petrik_masters_thesis

    13/101

    Proof We denote the bodies of the P-terms by:

    = [a1 = 1] . . . . . [am = m] = [a1 = 1] . . . . . [am = m]

    Since i = i at least for one i 1, 2, . . . , m, and can never both attainvalue 1. Let us now discuss all possible combinations of values that and canattain:

    = 0, = 0:( . )

    . ( . ) = ( . 0). ( . 0) = 0

    . 0 = 0 . (

    . ) = . (0. 0) = . 0 = 0

    = 0, = 1:(

    .)

    .

    (

    .) = (

    .0)

    .

    (

    .1) = 0

    .

    =

    . (. ) = . (0

    . 1) = . 1 =

    = 1, = 0:This situation is dual to the previous case.

    Theorem 2.15 Every m-variable n-valued logical function, f(a1, a2, . . . , am),may be uniquely described by a table of values as follows:

    a1 a2 . . . am f(a1, a2, . . . , am)1,1 1,2 . . . 1,m 12,1 2,2 . . . 2,m 2

    ... ... . . . ... ...l,1 l,2 . . . l,m l

    For the i-th row of the table, i = 1, . . . , l, we construct the minterm

    i = i . [a1 = i,1] . [a2 = i,2] . . . . . [am = i,m]The expression

    1. 2

    . . . . . lhas the same evaluation as f(a1, a2, . . . , am); this holds for any fuzzy conjunc-

    tion . and fuzzy disjunction..

    Proof The i-th row of the table corresponds to the evaluation a1 = i,1, a2 =

    i,2, . . . , am = i,m, the corresponding minterm attains the value i, all otherminterms are zero (Prop. 2.13). According to Definition 2.7 the whole DNFattains the value i in this case. This holds for any i, so the proof is complete.

    The expression in Theorem 2.15 has a standardized structure and we areable to transform any logical function to it. Thus, according to Definition 2.3,this is an example of a normal form.

    By analogy of the expression with the two-valued disjunctive normal formwe can now define the notion of a many-valued disjunctive normal form.

    10

  • 8/4/2019 petrik_masters_thesis

    14/101

  • 8/4/2019 petrik_masters_thesis

    15/101

    .

    1 . [b = 0] . [a = 1/2].

    1 . [b = 1] . [a = 1/2]We simplify this expression using distributivity (Proposition 2.14) and wedistribute 1/

    2over the first three P-terms:

    f(a, b) =

    1/2.

    [b = 0] . [a = 1] .[b = 1/2]. [a = 1] .[b = 1] . [a = 1]

    .

    1 . [b = 0] . [a = 1/2] . 1 . [b = 1] . [a = 1/2]

    Kronecker deltas in the expression

    ([b = 0] . [a = 1]). ([b = 1/

    2] . [a = 1])

    . ([b = 1] . [a = 1])

    can attain only values 0 and 1. Due to the fact that the fuzzy conjunction and

    disjunction are generalizations of the two-valued conjunction and disjunction,we can simplify this expression using two-valued distributivity:

    f(a, b) =

    1/2.

    [a = 1] .

    [b = 0]. [b = 1/

    2]

    . [b = 1] =1

    .

    1 . [b = 0] . [a = 1/2] . 1 . [b = 1] . [a = 1/2]

    According to Proposition 2.11, the expression [b = 0]. [b = 1/

    2]

    . [b = 1] equals 1.Thus the whole expression may be simplified to

    f(a, b) =

    1/2. [a = 1]

    .

    1 . [b = 0] . [a = 1/2].

    1 . [b = 1] . [a = 1/2]

    2.3 Conjunctive normal forms

    Reducing Sin the expression of a literal xS to a complement of a singleton weget the definition of the negated Kronecker delta.

    Definition 2.19 Negated Kronecker delta is a binary operation : P P {0, 1}

    (a, b) = [a = b] =

    1 iff a = b,0 iff a = b.

    Remark 2.20 In the sequel, we shall use the notation [a = b] for negated Kro-necker delta instead of (a, b).

    For the purpose of this section we will need only this type of literal. Thusby a literal of a many-valued variable b we will mean here an expression [b = ],where Pis a constant.Proposition 2.21 Each logical variable c attaining values inP= {1, 2, . . . , n}satisfies:

    [c = 1] . [c = 2] . . . . . [c = n] = 0

    12

  • 8/4/2019 petrik_masters_thesis

    16/101

    Proof As the set {1, 2, . . . , n} contains all values which c may attain, thenone of the negated Kronecker delta functions in the expression

    [c = 1] . [c = 2] . . . . . [c = n]

    attains 0, as well as the whole expression.

    Definition 2.22 An S-term3 is an expression

    . [a1 = 1]

    . [a2 = 2]. . . . . [am = m]

    where [a1 = 1] . . . [am = m] are literals of logical variables a1, a2, . . . , am, and Pis a constant.

    The expression [a1 = 1]. [a2 = 2]

    . . . . . [am = m] will be called the bodyof the S-term.

    A maxterm is an S-term that contains all logical variables.

    Proposition 2.23 The only possible evaluations of an S-term are (iff a1 =1, a2 = 2, . . . , am = m) and 1 (otherwise). This holds for any fuzzy con-

    junction. and fuzzy disjunction..

    Proof If all equalities in the literals are satisfied, the body of the S-term isevaluated by 0 and the whole S-term equals . If any of the equalities is violated,the body of the S-term, as well as the whole S-term, becomes 1.

    Proposition 2.24 (distributivity of S-terms) For any fuzzy conjunction.and fuzzy disjunction

    .

    two S-terms satisfy:

    .[a1 = 1]

    .[a2 = 2].. . . .[am = m]

    .

    .[a1 = 1]

    .[a2 = 2].. . . .[am = m]

    = .

    [a1 = 1].[a2 = 2]

    .. . . .[am = m].

    [a1 = 1].[a2 = 2]

    .. . . .[am = m]

    iff i = i at least for one i 1, 2, . . . , m.Proof We denote the bodies of the S-terms by:

    = [a1 = 1]. . . . . [am = m]

    = [a1 = 1]. . . . . [am = m]

    Since i = i at least for one i 1, 2, . . . , m, and can never both attainvalue 0. Let us now discuss all possible combinations of values that and canattain:

    = 1, = 1:(

    . ) . (. ) = ( . 1) . (

    . 1) = 1 . 1 = 1

    . ( . ) = . (1 . 1) =

    . 1 = 13A sum term; this notation comes from the two-valued logic, as well as the P-term, denoting

    a term composed by operations of logical sum (i.e. logical disjunction).

    13

  • 8/4/2019 petrik_masters_thesis

    17/101

    = 1, = 0:(

    .

    )

    .(

    .

    ) = (

    .

    1)

    .(

    .

    0 = 1

    . =

    . ( . ) =

    . (1 . 0) = . 0 =

    = 0, = 1:This situation is dual to the previous case.

    Theorem 2.25 We have anm-variable n-valued logical functionf(a1, a2, . . . , am),described by a table:

    a1 a2 . . . am f(a1, a2, . . . , am)1,1 1,2 . . . 1,m 1

    2,1 2,2 . . . 2,m 2...

    .... . .

    ......

    l,1 l,2 . . . l,m l

    For the i-th row of the table, i = 1, . . . , l, we construct the maxterm

    i = i. [a1 = i,1]

    . [a2 = i,2]. . . . . [am = i,m]

    The expression1 . 2 . . . . . l

    has the same evaluation as f(a1, a2, . . . , am); this holds for any fuzzy conjunc-

    tion.

    and fuzzy disjunction.

    .

    Proof The i-th row of the table corresponds to the evaluation a1 = i,1, a2 =i,2, . . . , am = i,m, the corresponding maxterm attains the value i, all othermaxterms are 1 (Prop. 2.23). According to Definition 2.6 the whole CNF attainsthe value i in this case. This holds for any i, so the proof is complete.

    The expression in Theorem 2.25 has a standardized structure and we areable to transform any logical function to it. Thus, according to Definition 2.3,this is an example of a normal form.

    By analogy of the expression with the two-valued conjunctive normal formwe can now define the notion of a many-valued conjunctive normal form.

    Definition 2.26 (many-valued conjunctive normal form) A many-valued

    conjunctive normal form, a conjunctive normal form or CNF for short, is a con- junction of any number of S-terms. S-term is a disjunction of any number ofliterals headed by a logical constant (Definition 2.22). The constant may beommited if equals 0.

    Remark 2.27 The resulting expression in Theorem 2.25 is a conjunctive nor-mal form.

    Example 2.28 (construction of CNF from table) Let us now express the function from Example 2.18 in a conjunctive normal form.

    14

  • 8/4/2019 petrik_masters_thesis

    18/101

    row no. b a f(a, b) maxterm

    1 0 0 0 0.

    [b

    = 0]

    .

    [a

    = 0]

    2 0 1/2

    1 1 . [b = 0] . [a = 1/2]

    3 0 1 1/2

    1/2

    . [b = 0] . [a = 1]4 1/2 0 0 0

    . [b = 1/2]. [a = 0]

    5 1/2

    1/2

    0 0. [b = 1/

    2]

    . [a = 1/2]

    6 1/2

    1 1/2

    1/2

    . [b = 1/2]

    . [a = 1]7 1 0 0 0

    . [b = 1] . [a = 0]8 1 1/

    21 1

    . [b = 1] . [a = 1/2]

    9 1 1 1/2

    1/2

    . [b = 1] . [a = 1]

    Table 2.3: Table of values of a three-valued function f(a, b) with the correspond-ing maxterms.

    Solution For each row of the table, we construct the corresponding maxterm(Table 2.3).

    Due to Proposition 2.8, maxterms with coefficient 1 are always equal to 1and may be omitted; then the CNF achieves the following form:

    f(a, b) =

    0. [b = 0] . [a = 0]

    .

    0. [b = 1/

    2]

    . [a = 0]

    .

    0. [b = 1] . [a = 0]

    .1/2

    . [b = 0] . [a = 1]

    .1/2

    . [b = 1/2

    ]. [a = 1]

    .1/2

    . [b = 1] . [a = 1]

    .0

    . [b = 1/2]

    . [a = 1/2]

    We simplify this expression using distributivity (Proposition 2.24):f(a, b) =

    0

    .

    [b = 0] . [a = 0]

    .

    [b = 1/2]

    . [a = 0]

    .

    [b = 1] . [a = 0]

    .1/2

    .

    [b = 0] . [a = 1]

    .

    [b = 1/2

    ]. [a = 1]

    .

    [b = 1] . [a = 1]

    .

    0. [b = 1/

    2]

    . [a = 1/2]

    The first two expressions consist just of negated Kronecker deltas which canattain only values 0 and 1. Due to this fact we can simplify the whole expression

    using the two-valued distributivity:

    f(a, b) = 0.

    [a = 0] .

    [b = 0] . [b = 1/2] . [b = 1] =0

    . 1/2.

    [a = 1] .

    [b = 0] . [b = 1/2] . [b = 1] =0

    .

    0. [b = 1/

    2]

    . [a = 1/2]

    15

  • 8/4/2019 petrik_masters_thesis

    19/101

    According to Proposition 2.21, the expression [b = 0] . [b = 1/2] . [b = 1] equals 0.

    Thus the whole expression may be simplified to

    f(a, b) =

    0. [a = 0]

    .1/2

    . [a = 1]

    .

    0. [b = 1/

    2]

    . [a = 1/2]

    Corollary 2.29 For the case of ann-valued logic, P=

    0, 1n1 ,2

    n1 , . . . ,n2n1 , 1

    ,

    the sets . ,

    ., , 0, 1n 1 ,

    2

    n 1 , . . . ,n 2n 1 , 1

    . ,., , 0, 1

    n

    1

    ,2

    n

    1

    , . . . ,n 2n

    1

    , 1

    are functionally complete sets of operations.

    16

  • 8/4/2019 petrik_masters_thesis

    20/101

    Chapter 3

    Svoboda maps

    3.1 Introduction

    The most natural way to express graphically an n-valued m-variable logicalfunction is an m-dimensional discrete cube with the edge side length equalto n. Unfortunately this method becomes unusable with m > 2 since it isuncomfortable to draw such a cube on a two-dimensional paper. For this purposeSvoboda and Karnaugh maps have been invented in the two-valued logic; theyare nothing but a decomposition of an m-dimensional discrete cube to a two-dimensional rectangular array of cells; each cell represents the evaluation ofthe function f(a1, . . . , am) for one of 2

    m possible evaluations of m input logicalvariables a1, . . . , am.

    The disjunctive, resp. conjunctive, normal form of a function is obtained by

    grouping neighboring cells with value 1, resp. 0, into loops and expressing thecorresponding terms. Karnaugh and Svoboda maps differ only in the orderingof values of input variables; Karnaugh maps use the Gray code and Svobodamaps use the incremental code. This makes the loops in Karnaugh maps moreconnected (and the design more intuitive, in particular for small numbers ofinput variables).

    Unfortunately, a generalization of Karnaugh maps to the many-valued logicis not possible. The reason is that the Gray code used in Karnaugh maps hasno analogy in the many-valued logic. Nevertheless, we can use Svoboda mapswith incremental code.

    In the previous section we used general fuzzy disjunction and conjunction toexpress disjunctive, resp. conjunctive, normal forms from tables of values. Thisgeneralization was possible since in this case the normal form is composed of

    minterms, resp. maxterms, and for each evaluation of the input variables valueof only one of them may become different from 0, resp. 1.

    For the maps the situation is different; the terms are constructed by loopingvalues in the map and these loops can intersect as more than one term can havedifferent value than 0, resp. 1. For this reason we must specify which type offuzzy disjunction and conjunction we use.

    17

  • 8/4/2019 petrik_masters_thesis

    21/101

    210 1 210 1

    21

    0

    1

    21

    0

    1

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    21

    0 1

    0 0 0 1 1 1

    0

    1

    0

    0

    0

    1

    1

    1

    a

    b

    d c

    f(a,b,c,d)

    1

    1

    1

    1

    1

    1

    1

    1

    1

    0 0

    0

    0

    00

    0 0

    0

    00

    0

    0 0

    0 0

    0 0 0

    0 0 0

    0 0

    0 0 0

    0 0 0

    0 0

    0 0 0

    00

    1 2 3 4

    Figure 3.1: Example of a Svoboda map of a three-valued function f(a,b,c,d).

    3.2 Loops

    In Figure 3.1 you can see an example of a Svoboda map for a three-valued four-variable function f(a,b,c,d) where some cells are connected to loops. Values ofthe cells in loops are usually (but not necesarilly) constant and the loop forms a(discrete) k-dimensional cube, where k m, with edge of length n; we can alsosay that the input variables which delimit the position of the loop can attaineither all the values from Por just one value. In our example the Svoboda mapcontains four loops, the first is delimited by b = 0, c = 1, and d = 1, the second

    by a = 1 and b = 0, the third by a = 0 and c = 1/2 and the fourth by b = 1.

    3.3 Svoboda maps and standard operations

    The most intuitive possibility of designing minimized normal forms using Svo-boda maps is to use the standard fuzzy operations.

    Definition 3.1 (standard operations) The standard fuzzy conjunction anddisjunction are special cases of the fuzzy conjunction and disjunction (Defini-tions 2.6, 2.7) defined as follows:

    The standard conjunction: S

    : P P P

    a S

    b = min(a, b)

    The standard disjunction:S: P P P

    aS b = max(a, b)

    3.3.1 Disjunctive normal forms

    In Figure 3.2 we can see two examples of loops in a Svoboda map. The positionof the loop in the first map defining a function f(a, b) is given by a which equals

    18

  • 8/4/2019 petrik_masters_thesis

    22/101

    14 4

    24

    3

    43

    42

    14

    42

    14 4

    24

    3

    43

    42

    14

    43

    43

    43

    43

    43

    b

    a10

    1

    0 0 0 0 0 0

    00000

    0 0 0 0 0

    0

    000

    00

    00

    0

    b

    a10

    0

    1

    0 0 0 0 0

    00000

    0 0 0 0 0

    00000

    f(a,b) g(a,b)

    Figure 3.2: Examples of loops in a Svoboda map for DNF with standard oper-ations and Kronecker delta.

    14 4

    24

    3

    43

    42

    14

    14

    14

    14

    14

    43

    43

    43

    43

    43

    b

    a10

    0

    1

    0 0 0 0

    0

    0

    00

    0

    000

    0 0

    00

    h(a,b)

    Figure 3.3: Example of two crossing loops in a Svoboda map for DNF withstandard operations and Kronecker delta.

    3/4

    and by b equal to 3/4. The value of the loop is 2/

    4. To express the P-term

    corresponding to to this loop we first express the literals which are [a = 3/4] and[b = 3/

    4]. The P-term is then given by the standard conjunction of the literals

    and the value of the loop:

    f(a, b) = 2/4S

    [a = 3/4] S

    [b = 3/4]

    The loop in the map of a function g(a, b) is a case of a loop where the inputvariable a is irrelevant; when b equals 2/

    4, the output value is always 3/

    4. The

    literal corresponding to this fact is [b = 2/4], the value of the loop is 3/

    4, and the

    corresponding P-term is:

    g(a, b) = 3/4S

    [b = 2/4]

    When we cover a map by more than one loop, we can express the correspond-ing P-terms individually and then connect them using the standard disjunctionS. This works well when the loops do not cross each other, but when they do,

    19

  • 8/4/2019 petrik_masters_thesis

    23/101

    the situation is a little bit more complicated as shown in Figure 3.3, where thedisjunctive normal form of the function consists of two terms:

    h(a, b) = (1/4S

    [a = 3/4

    ])S (3/

    4S

    [b = 3/4])

    As you can see, in the place of loop crossings the output value is given bythe maximum of the values of the crossing loops.

    Let us now demonstrate this method on an example.

    14 4

    24

    3

    43

    42

    14

    43

    43

    43

    43

    43

    14

    14

    14

    42

    42

    421 4

    10

    0

    1

    1

    0 0 0 0

    0

    0

    0 0 0

    0 0

    1

    x

    y

    f(x,y)

    Figure 3.4: Example of finding DNF with standard operations and Kroneckerdelta in a Svoboda map.

    Example 3.2 We have a five-valued two-variable logical function f(x, y) de-fined by a Svoboda map shown in Figure 3.4. Let us express this function by asimplified disjunctive normal form using the operations of standard conjunction,standard disjunction and Kronecker delta.

    Solution To express the function in a disjunctive normal form we are going torepeat the following three steps until the map contains only zero values:

    1. Find the largest possible loops that do not contain zero value; it does notmatter if they cross each other. The value of each loop is the lowest valuein the loop.

    2. Express the corresponding P-terms.

    3. Replace the lowest values in the loops by zero values.

    The result is the standard disjunction of the P-terms given by the loops.

    Let us show now this algorithm on our example:

    We find the largest possible loops (Figure 3.5a). The terms given by theseloops are:

    1/4S

    [y = 1/4]

    2/4S

    [x = 3/4]

    3/4S

    [y = 1]

    20

  • 8/4/2019 petrik_masters_thesis

    24/101

    14 4

    24

    3

    43

    42

    14

    43

    43

    43

    43

    43

    14

    14

    14

    42

    42

    421

    4

    14 4

    24

    3

    43

    42

    14

    1

    10

    0

    1

    1

    0 0 0 0

    0

    0

    0 0 0

    0 0

    1

    10

    0

    1

    0 0 0

    0

    0

    0 0 0

    0 0 0

    0

    0 0

    0

    0

    0

    0

    0 0 0 0 0

    1

    x

    y y

    xa) b)

    Figure 3.5: Example of finding DNF with standard operations and Kroneckerdelta in a Svoboda map: a - finding the largest loops, b - replacing the lowestvalues by 0.

    1/4S

    [x = 1/4] S

    [y = 3/4

    ]

    Then we replace the lowest values in the loops by 0 (Figure 3.5b).We repeat the three steps finding the largest possible loops as shown in

    Figure 3.5b and we get the terms:

    1 S

    [x = 1/4] S

    [y = 1/4]

    1 S

    [x = 3/4] S

    [y = 1/4]

    After replacing the lowest values in the loops by 0 the map contains onlyzero values and the result is:

    f(x, y) =1/4S

    [y = 1/4]S2/4S

    [x = 3/4]S3/4S

    [y = 1]

    S1/4S

    [x = 1/4] S

    [y = 3/4

    ]S

    1 S

    [x = 1/4] S

    [y = 1/4]S

    1 S

    [x = 3/4] S

    [y = 1/4]

    3.3.2 Conjunctive normal forms

    For conjunctive normal forms the S-terms are constructed the same way asP-terms for disjunctive normal forms. The only difference comes with the op-erations: the standard conjunction is replaced by the standard disjunction andliterals are composed using the negated Kronecker delta. In Figure 3.6 we cansee two examples of loops. The corresponding S-terms are:

    f(a, b) = 2/4

    S [a = 2/4]S [b = 0]

    g(a, b) = 1/4

    S [a = 3/4

    ]

    21

  • 8/4/2019 petrik_masters_thesis

    25/101

    14 4

    24

    3

    43

    42

    14

    42

    14 4

    24

    3

    43

    42

    14

    14

    14

    14

    14

    14

    b

    1

    1

    0 1 1

    11

    1 1

    11

    1 1 1

    1

    1

    1 1

    1 1

    1

    11

    1 1

    11

    a0

    b

    a10

    0

    1

    1

    1

    1 1

    1

    1

    1

    1 1 1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    f(a,b) g(a,b)

    Figure 3.6: Examples of loops in a Svoboda map for CNF with standard oper-ations and Kronecker delta.

    14 4

    24

    3

    43

    42

    14

    42

    42

    42

    42

    43

    43

    43

    43

    42

    b

    a10

    0

    1

    1

    1

    1

    1

    1

    1 1

    1

    11

    1 1

    11

    1 1

    h(a,b)

    Figure 3.7: Example of two crossing loops in a Svoboda map for CNF withstandard operations and Kronecker delta.

    When two loops cross each other, then the value in the place of the crossingis given by the minimum of the crossing loops. In Figure 3.7 you can see anexample of two crossing loops. The conjunctive normal form of this function is:

    h(a, b) =2/4

    S [a = 2/4]

    S

    3/4

    S [b = 2/4]

    Example 3.3 We have a five-valued two-variable logical function f(x, y) de-fined by a Svoboda map shown in Figure 3.8. Let us express this function by asimplified conjunctive normal form using the operations of standard conjunction,standard disjunction and negated Kronecker delta.

    Solution To express the function in a conjunctive normal form we are goingto repeat the following three steps until all cells in the map become 1.

    1. Find the largest possible loops that do not contain value 1; it does notmatter if they cross each other. The value of each loop is the highest valuein the loop.

    22

  • 8/4/2019 petrik_masters_thesis

    26/101

    14 4

    24

    3

    43

    42

    14

    14

    14

    14

    43

    43

    43

    10

    0

    1 1 1 1

    111

    1 1 1

    0

    0

    0

    0

    0 0

    0

    0

    0

    0

    x

    y

    f(x,y)

    Figure 3.8: Example of finding CNF with standard operations and Kroneckerdelta in a Svoboda map.

    2. Express the corresponding S-terms.

    3. Replace the highest values in the loops by value 1.

    The result is the standard conjunction of the S-terms given by the loops.

    14 4

    24

    3

    43

    42

    14

    14

    14

    14

    43

    43

    43

    14

    14

    14

    14 4

    24

    3

    43

    42

    14

    1

    10

    0

    1 1 1 1

    111

    1 1 1

    0

    0

    0

    0

    0

    0

    0

    10

    0

    1

    1 1

    1 1

    1

    111

    1 1 1

    1 1 1

    1

    1

    1

    1

    1

    1

    1

    1

    0

    0

    x

    y

    x

    y

    a) b)

    Figure 3.9: Example of finding DNF with standard operations and Kroneckerdelta in a Svoboda map: a - finding the largest loops, b - replacing the highestvalues by 1.

    Let us show now this algorithm on our example:

    We find the largest possible loops (Figure 3.9a). The S-terms given by theseloops are:

    1/4

    S [y = 0]

    3/4

    S [y = 3/4]

    0 S [x = 2/4]

    23

  • 8/4/2019 petrik_masters_thesis

    27/101

    1/4

    S [x = 1]

    Then we replace the highest values in the loops by 1 (Figure 3.9b).We repeat the three steps finding the largest possible loops as shown in

    Figure 3.9b and we get the terms:

    0 S [x = 1] S [y = 0]

    0 S [x = 1] S [y = 3/4]

    After replacing the highest values in the loops by 1 all the cells in the mapcontain value 1 and the result is:

    f(x, y) =1/4

    S [y = 0]

    S

    3/4

    S [y = 3/4]

    S

    0S [x = 2/

    4]

    S

    1/4

    S [x = 1]

    S0 S [x = 1] S [y = 0] S 0 S [x = 1] S [y = 3/4]

    24

  • 8/4/2019 petrik_masters_thesis

    28/101

    3.4 Svoboda maps and Lukasiewicz operations

    Another possibility of expressing many-valued functions in normal forms is touse the Lukasiewicz operations.

    Definition 3.4 (Lukasiewicz operations) The Lukasiewicz fuzzy conjunctionand disjunction are special cases of the fuzzy conjunction and disjunction (Def-initions 2.6, 2.7) defined as follows:

    The Lukasiewicz conjunction: L

    : P P Pa L

    b = max(a + b 1, 0)

    The Lukasiewicz disjunction (bounded sum):L: P P P

    aL

    b = min(a + b, 1)

    3.4.1 Disjunctive normal forms

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    42

    43

    43

    43

    43

    43

    b

    a10

    1

    0 0 0 0 0 0

    00000

    0 0 0 0

    0

    000

    00

    00

    0

    b

    a10

    0

    1

    0 0 0 0 0

    0 0 0 0 0

    00000

    f(a,b) g(a,b)

    0

    0 0 0 0 0

    Figure 3.10: Examples of loops in a Svoboda map for DNF with Lukasiewiczoperations and Kronecker delta.

    P-terms are constructed the same way as it was in the case of the standardoperations, just the standard conjunction, resp. disjunction, is replaced by theLukasiewicz conjunction, resp. disjunction. The P-terms corresponding to the

    loops in Figure 3.10 are:f(a, b) = 2/

    4L

    [a = 2/4] L

    [b = 2/4]

    g(a, b) = 3/4L

    [b = 1/4]

    In Figure 3.11 there is an example of two crossing loops; the value in theplace of the loop intersection is given by the bounded sum of the values of thecrossing loops (Definition 3.4):

    h(a, b) = (2/4L

    [a = 0])L (1/

    4L

    [b = 1/4])

    L (3/4L

    [b = 3/4])

    25

  • 8/4/2019 petrik_masters_thesis

    29/101

    14 4

    24

    3

    43

    42

    14

    14

    14

    14

    144

    3

    42

    42

    42

    43

    43

    43

    43

    b

    a10

    0

    1

    0 0 0

    0

    00

    00

    0

    h(a,b)

    0

    0

    0

    1

    Figure 3.11: Example of two crossing loops in a Svoboda map for DNF withLukasiewicz operations and Kronecker delta.

    Remark 3.5 In the cell with coordinates a = 0, b =3

    /4 the sum of the valuesof the crossing loops is greater than 1, but due to the definition of the boundedsum it is 1. This will be later used for optimization of the disjunctive normal

    forms and the cell will be called overloaded.

    14 4

    24

    3

    43

    42

    14

    43

    43

    43

    43

    42

    42

    42

    42

    43

    14

    14

    14

    14 4

    3

    10

    0

    1

    x

    y

    f(x,y)

    1

    11

    11

    1

    0 0

    00

    1

    Figure 3.12: Example of finding DNF with Lukasiewicz operations and Kro-necker delta in a Svoboda map.

    Example 3.6 We have a five-valued two-variable logical function f(x, y) de-fined by a Svoboda map shown in Figure 3.12. Let us express this function by asimplified disjunctive normal form using the operations of Lukasiewicz conjunc-tion, Lukasiewicz disjunction and Kronecker delta.

    Solution To find the disjunctive normal form we first mark the cells with value

    1. This is becausedue to the bounded sumthese cells may be overloaded,i.e., the sum of the loops crossing in these cells may be greater than 1 (seeRemark 3.5).

    Then we repeat the following three steps until all cells in the map containvalue 0.

    1. Find the largest possible loops that do not contain zero value and do notcross each other. The value of each loop is the lowest value in the loop.We ignore the overloaded cells.

    2. Express the corresponding P-terms.

    26

  • 8/4/2019 petrik_masters_thesis

    30/101

    3. Subtract the value of each loop from its cells.

    The result is the Lukasiewicz disjunction of the P-terms given by the loops.

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    14

    14

    14

    14

    43

    43

    43

    43

    42

    42

    42

    42

    43

    43

    14

    14

    14

    14

    42

    42

    42

    42

    43

    43

    43

    43

    43

    43

    10

    0

    1

    10

    0

    x

    y y

    xa) b)

    1

    1

    1

    1

    1

    1

    1

    0 0

    00

    1

    1

    11

    1

    11

    0 0

    00

    Figure 3.13: Example of finding DNF with Lukasiewicz operations and Kro-necker delta in a Svoboda map: a - marking overloaded cells, b - finding thelargest loops.

    Let us show now this algorithm on our example:

    First we mark the overloaded cells by underlining them (Figure 3.13a), then

    we find the largest possible loops that do not cross each other (Figure 3.13b).The terms given by these loops are:

    1/4L

    [x = 2/4]

    2/4L

    [x = 3/4]

    3/4L

    [x = 1]

    We subtract the value of each loop from its cells (Figure 3.14c) and we repeatthe three steps finding the largest possible loops (Figure 3.14d). Note that wenow ignore the underlined values. We get the terms:

    1/4

    L[y = 2/

    4]

    2/4L

    [y = 3/4]

    3/4L

    [y = 1]

    We continue subtracting the values of the loops from their cells (Figure 3.15e)and we cover the rest of the non-zero cells by loops (Figure 3.15f) which give usthe terms:

    2/4L

    [x = 2/4] L

    [y = 2/4

    ]

    27

  • 8/4/2019 petrik_masters_thesis

    31/101

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    14

    14

    43

    43

    42

    42

    42

    42

    43

    42

    42

    42

    14

    14

    14

    14

    14

    43

    43

    42

    42

    42

    42

    43

    42

    42

    42

    14

    14

    14

    10

    0

    1

    10

    0

    x

    y y

    x

    0 0

    00

    0

    0

    0 0

    00

    0 0

    00

    0

    0

    0 0

    00

    c) d)

    Figure 3.14: Example of finding DNF with Lukasiewicz operations and Kro-necker delta in a Svoboda map: c - subtracting the value of each loop from itscells, d - finding the largest loops.

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    42

    42

    42

    42

    10

    0

    1

    10

    0

    x

    y y

    x

    0 0

    00

    0

    0

    0 0

    00

    0 0

    00

    0 0 0

    0 0 0

    0

    00

    0 0

    00

    0

    0

    0 0

    00

    0 0

    00

    0 0 0

    0 0 0

    0

    00

    e) f)

    Figure 3.15: Example of finding DNF with Lukasiewicz operations and Kro-necker delta in a Svoboda map: e - subtracting the value of each loop from itscells, f - finding loops.

    2/4 L [

    x=

    3/4] L [

    y=

    2/4]

    After subtracting the loop values from their cells the map contains only zerovalues and the resulting disjunctive normal form given by the loops is:

    f(x, y) =1/4L

    [x = 2/4]L2/4L

    [x = 3/4]L3/4L

    [x = 1]L1/4L

    [y = 2/4]

    L2/4L

    [y = 3/4]L3/4L

    [y = 1]L2/4L

    [x = 2/4

    ]L

    [y = 2/4]L2/4L

    [x = 3/4]L

    [y = 2/4]

    28

  • 8/4/2019 petrik_masters_thesis

    32/101

    3.4.2 Conjunctive normal forms

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    14

    14

    14

    14

    14

    b

    1

    1

    0 1 1

    1

    1 1

    11

    1 1 1

    1

    1

    1 1

    1 1

    1

    11

    1 1

    11

    a0

    b

    a10

    0

    1

    1

    1

    1

    1

    1

    1 1

    1

    1

    1

    1

    1

    1

    1

    1

    f(a,b) g(a,b)

    1 1

    1

    1

    1

    1

    0

    Figure 3.16: Examples of loops in a Svoboda map for CNF with Lukasiewiczoperations and negated Kronecker delta.

    14 4

    24

    3

    43

    42

    14

    43

    43

    43

    43

    42

    42

    421

    4

    14

    14

    14

    14

    b

    a10

    0

    1

    1

    1

    1

    1 1

    1

    1 11

    h(a,b)

    1 1 1

    0

    Figure 3.17: Example of two crossing loops in a Svoboda map for CNF withLukasiewicz operations and negated Kronecker delta.

    S-terms are constructed the same way as it was in the case of the stan-dard operations, just the standard disjunction are replaced by the Lukasiewiczdisjunction. The S-terms corresponding to the loops in Figure 3.16 are:

    f(

    a, b) = 0

    L

    [a

    = 0]L

    [b

    =1/4]

    g(a, b) = 1/4

    L [a = 1/4

    ]

    In the case of loop crossing, the value in the intersection is given by theLukasiewicz conjunction (Definition 3.4) of the values of the crossing loops.Figure 3.17 shows the function:

    h(a, b) = (1/4

    L [a = 0]) L

    (3/4

    L [a = 2/4])

    L(3/4

    L [b = 3/4])

    29

  • 8/4/2019 petrik_masters_thesis

    33/101

    Remark 3.7 The cell with coordinates a = 0, b = 3/4

    is an example of an over-loaded cell for the case of conjunctive normal forms. Lukasiewicz conjunction ofthe values of the loops is 0 although the expression a + b 1 from Definition 3.4gives a value less than 0. This will be used for optimization as well as in theprevious case.

    14 4

    24

    3

    43

    42

    14

    42

    42

    42

    42

    42

    42

    42

    14

    14

    14

    14

    14

    43

    10

    0

    1

    x

    y

    f(x,y)

    1 1

    1

    1 11

    1

    0 0

    0

    0

    0

    Figure 3.18: Example of finding CNF with Lukasiewicz operations and negatedKronecker delta in a Svoboda map.

    Example 3.8 We have a five-valued two-variable logical function f(x, y) de-fined by a Svoboda map shown in Figure 3.18. Let us express this function bya simplified conjunctive normal form using the operations of Lukasiewicz con-

    junction, Lukasiewicz disjunction and negated Kronecker delta.

    Solution First we mark the cells with value 0. As in the disjunctive normal

    forms, these cells may be overloaded (Remark 3.7).Then we are going to repeat the following three steps until all cells in themap contain value 1.

    1. Find the largest possible loops that do not contain value 1 and do notcross each other. The value of each loop is the highest value in the loop.We ignore the overloaded cells.

    2. Express the corresponding S-terms.

    3. Add the negated value of each loop to its cells.

    The result is the Lukasiewicz conjunction of the S-terms given by the loops.

    Let us show now this algorithm on our example:

    First we mark the overloaded cells by underlining them (Figure 3.19a), thenwe find the largest possible loops that do not cross each other (Figure 3.19b).The terms given by these loops are:

    2/4

    L [x = 1/4]

    1/4

    L [x = 2/4]

    30

  • 8/4/2019 petrik_masters_thesis

    34/101

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    42

    42

    42

    42

    42

    42

    42

    14

    14

    14

    14

    14

    43

    11

    1

    1 11

    1

    0 0 0

    00

    42

    42

    42

    42

    42

    42

    42

    14

    14

    14

    14

    14

    43

    11

    1

    1 11

    1

    0 0 0

    00

    10

    0

    1

    10

    0

    x

    y y

    xa) b)

    Figure 3.19: Example of finding CNF with Lukasiewicz operations and negatedKronecker delta in a Svoboda map: a - marking overloaded cells, b - finding thelargest loops.

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    42

    42

    42

    42

    14

    14

    43

    42

    42

    43

    43

    42

    42

    42

    42

    14

    14

    43

    42

    42

    43

    43

    10

    0

    1

    10

    0

    x

    y y

    x

    11

    1

    1 11

    1

    0

    1

    1

    1 1

    1

    111

    1

    1 11

    1

    0

    1

    1

    1 1

    1

    1

    c) d)

    Figure 3.20: Example of finding CNF with Lukasiewicz operations and negatedKronecker delta in a Svoboda map: c - adding the negated value of each loopto its cells, d - finding the largest loops.

    We add the negated value of each loop to its cells (Figure 3.20c) and werepeat the three steps, finding the largest possible loops (Figure 3.20d). We getthe terms:

    1/4

    L [y = 1/4]

    2/4

    L [y = 2/4]

    We add the negated values of the loops to their cells (Figure 3.21e) and wecover the rest of the cells by loops (Figure 3.21f) which give us the terms:

    2/4

    L [x = 0] L [y = 0]

    31

  • 8/4/2019 petrik_masters_thesis

    35/101

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    42

    43

    43

    42

    43

    43

    10

    0

    1

    10

    0

    x

    y y

    x

    11

    1

    1 11

    1

    1

    1

    1 1

    1

    1

    1

    1

    1 1 1

    111

    1

    11

    1

    1 11

    1

    1

    1

    1 1

    1

    1

    1

    1

    1 1 1

    111

    1

    e) f)

    Figure 3.21: Example of finding CNF with Lukasiewicz operations and negatedKronecker delta in a Svoboda map: e - adding the negated value of each loopto its cells, f - finding loops.

    3/4

    L [x = 3/4]L [y = 1/

    4]

    3/4

    L [x = 3/4]L [y = 3/

    4]

    Once again we add negated values of the loops to their cells. After this stepall cells in the map contain value 1 and the resulting conjunctive normal formgiven by the loops is:

    f(x, y) =2/4

    L [x = 1/4

    ] L

    1/4

    L [x = 2/4

    ] L

    1/4

    L [y = 1/4] L

    2/4

    L [y = 2/4]

    L

    2/4

    L [x = 0] L [y = 0]

    L

    3/4

    L [x = 3/4

    ]L [y = 1/

    4]

    L

    3/4

    L [x = 3/4]L [y = 3/

    4]

    32

  • 8/4/2019 petrik_masters_thesis

    36/101

  • 8/4/2019 petrik_masters_thesis

    37/101

    The negated Lukasiewicz equivalence is a binary operation: P P P:

    [a b] = 1 [a b] = |a b| = (a L

    b) L (a L

    b)

    Proposition 3.11 For every logical variable b the following equalities hold:

    1. [b 1] = b2. [b 0] = b3. [b 1] = b

    4. [b 0] = b

    Proof Logical variable b attains values from the interval [0, 1] which meansthat

    |1

    b

    |= 1

    b and

    |0

    b

    |=

    (0

    b) = b.

    1. [b 1] = 1 |1 b| = 1 1 + b = b2. [b 0] = 1 |0 b| = 1 b = b3. [b 1] = |1 b| = 1 b = b4. [b 0] = |0 b| = b

    34

  • 8/4/2019 petrik_masters_thesis

    38/101

    3.6 Svoboda maps, Lukasiewicz equivalence and

    Lukasiewicz operations3.6.1 Disjunctive normal forms

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14 4

    3

    43

    43

    43

    42

    42

    42

    42

    42

    42

    42

    14

    14

    14

    14

    14

    14

    14

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    43

    42

    42

    42

    421

    4

    14

    14

    14

    14

    14

    14

    a10

    1

    0

    b

    a10

    1

    1

    0

    b

    10

    0

    1

    b

    a10

    0

    1

    b

    a

    f(a,b) g(a,b)

    00

    0

    0

    0 0 00 0

    0000

    0 0

    0

    0 0

    0

    Figure 3.23: Example of loops in a Svoboda map for DNF with Lukasiewiczoperations and Lukasiewicz equivalence.

    If we express a term similarly as in the method described in Section 3.4.1, re-placing the operation of Kronecker delta by the operation of Lukasiewicz equiv-alence gives a term which affects its neighboring cells, too. Figure 3.23 showstwo examples of functions expressed by single terms:

    f(a, b) = [a 3/4] L

    [b 2/4]

    g(a, b) = 3/4L

    [a 3/4] L

    [b 2/4]

    As you can see, the term of the function f(a, b) creates a pyramid withvalue 1 in the place given by a = 3/4 and b =

    2/4. The neighboring cells have

    linearly decreasing values. When we include a constant in a term, as it is shown

    in the map of the function g(a, b), all the values will decrease constantly (exceptfor the lower bound 0).

    The case of terms where one of the variables (b) is irrelevant shows Fig-ure 3.24 defining the functions:

    h(a, b) = [a 3/4]

    i(a, b) = 3/4L

    [a 3/4]

    Since the terms behave differently than in the previous methods, we mustchange the notion of a loop as well. In this section, by a loop we mean the whole

    35

  • 8/4/2019 petrik_masters_thesis

    39/101

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    42

    42

    42

    42

    42

    14

    14

    14

    14

    14

    1

    1

    1

    1

    1

    14 4

    24

    3

    43

    42

    14

    10

    0

    1

    b

    a

    14 4

    24

    3

    43

    42

    14

    42

    42

    42

    42

    42

    14

    14

    14

    14

    14

    14

    14

    14

    14

    14

    b

    a

    10

    1

    0

    b

    a

    10

    0

    1

    h(a,b) i(a,b)

    a10

    1

    0

    b

    0

    0

    0

    0

    0 0

    0

    0

    0

    0

    Figure 3.24: Example of loops in a Svoboda map for DNF with Lukasiewiczoperations and Lukasiewicz equivalence.

    pyramid as shown in the previous examples. The value of a loop is the valuein its top. In Svoboda maps we will denote only tops of loops.

    14 4

    24

    3

    43

    42

    14

    42

    42

    42

    42

    14

    14

    14

    14

    14

    14

    14

    14

    42

    42

    42

    42

    43

    43

    43

    43

    14 4

    24

    3

    43

    42

    14

    b

    a10

    0

    1

    1

    a10

    1

    0

    b

    j(a,b)

    0 0

    00

    Figure 3.25: Example of two crossing loops in a Svoboda map for DNF withLukasiewicz operations and Lukasiewicz equivalence.

    In the case of loop crossing the resulting value is given by the Lukasiewiczdisjunction of the values given by the terms as shown in Figure 3.25 for a mapdefining the function:

    j(a, b) = (2/4L

    [a 3/4

    ])L (2/

    4L

    [b 3/4])

    36

  • 8/4/2019 petrik_masters_thesis

    40/101

    14 4

    24

    3

    43

    42

    14

    14

    14

    43

    43

    43

    43

    42

    42

    42

    42

    42

    43

    42

    14

    14

    14

    14

    42

    10

    0

    1

    x

    y

    f(x,y)

    1

    1

    1

    1

    0

    0 0

    Figure 3.26: Example of finding DNF with Lukasiewicz operations and Luka-siewicz equivalence in a Svoboda map.

    Example 3.12 We have a five-valued two-variable logical function f(x, y) de-fined by a Svoboda map shown in Figure 3.26. Let us express this function by asimplified disjunctive normal form using the operations of Lukasiewicz conjunc-tion, Lukasiewicz disjunction and Lukasiewicz equivalence.

    Solution Since we are using Lukasiewicz operations, we first mark the cellswith value 1; these cells are overloaded and behave the same way as in themethod described in Section 3.4.1.

    Then we repeat the following three steps until all cells in the map containvalue 0.

    1. Find the largest possible loop with the highest possible value that does

    not contain zero value. Note that this is a very problematic step of thealgorithm. We have to find a loop in a form of a pyramid as it has beenshown in Figures 3.23 and 3.24 and none of the values of the loop mayexceed the corresponding value in the map except the overloaded cellswhich are ignored. This step is very unclear and it is not always obviouswhere to find the loop.

    2. Express the corresponding P-term.

    3. Subtract the values of the loop from the corresponding cells.

    The result is the Lukasiewicz disjunction of the P-terms given by the loops.

    Let us show now this algorithm on our example:

    We mark the overloaded cells (Figure 3.27a) and find the largest possibleloop (Figure 3.27b). The P-term given by the loop is:

    3/4L

    [x 1]

    Then we subtract the loop from the map and find the next largest possibleloop (Figure 3.28c) which gives us the term:

    2/4L

    [y 3/4]

    37

  • 8/4/2019 petrik_masters_thesis

    41/101

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1 1 4 1 4

    43

    43

    43

    43

    42

    42

    42

    42

    42

    43

    42

    14

    14

    14

    14

    42

    14

    14

    43

    43

    43

    43

    42

    42

    42

    42

    42

    43

    42

    14

    14

    14

    14

    42

    10

    0

    1

    10

    0

    x

    y y

    xa) b)

    1

    1

    1

    1

    0

    0 0

    1

    1

    1

    1

    0

    0 0

    Figure 3.27: Example of finding DNF with Lukasiewicz operations and Luka-siewicz equivalence in a Svoboda map: a - marking overloaded cells, b - findingthe largest loop.

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    42

    14

    14

    4242

    14

    14

    42

    14

    1 4

    14

    14

    14

    14

    14

    4242

    0 0 0 0 0

    0 0 0 0 0

    0 0 0 0 0

    0 0 0 0 0

    10

    0

    1

    10

    0

    x

    y y

    x

    00

    0 0 0 0 0

    000 0 0 0

    c) d)

    Figure 3.28: Example of finding DNF with Lukasiewicz operations and Luka-siewicz equivalence in a Svoboda map: c,d - subtracting loop from the map andfinding the largest loop.

    Now there is only one cell in the map with value 2/4

    which is different from0. This can be covered by two equal loops, both with value 1/

    4(Figure 3.28d):

    1/4L

    [x 1/4

    ] L

    [y 0]1/4L

    [x 1/4

    ] L

    [y 0]After subtracting the latter loop twice, all the cells in the map contain value

    0 and the resulting disjunctive normal form is:

    f(x, y) =3/4L

    [x 1]L2/4L

    [y 3/4

    ]

    38

  • 8/4/2019 petrik_masters_thesis

    42/101

    L1/4L

    [x 1/4] L

    [y 0]L1/4L

    [x 1/4

    ] L

    [y 0]

    14 4

    24

    3

    43

    42

    14

    14

    14

    42

    42

    42

    43

    43

    43

    43

    10

    0

    1

    x

    y

    f(x,y)

    1

    1

    1

    1

    1

    1111

    1

    1

    1

    1

    1 1

    0

    Figure 3.29: Svoboda map defining a five-valued Lukasiewicz disjunction.

    Example 3.13 Let us use this method to express the Lukasiewicz disjunctionin a DNF for the case of the five-valued logic as shown in Figure 3.29.

    Solution

    14 4

    24

    3

    43

    42

    14

    14

    14

    42

    42

    42

    43

    43

    43

    43

    10

    0

    1

    x

    y

    1

    1

    1

    1

    1

    1111

    1

    1

    1

    1

    1 1

    0

    Figure 3.30: Example of finding DNF with Lukasiewicz operations and Luka-siewicz equivalence in a Svoboda map for a five-valued Lukasiewicz disjunction.

    To find the DNF we cover the Svoboda map by loops as shown in Figure 3.30.

    f(x, y) = 1 L [x 1]L 1 L [y 1]

    Due to Definition 2.6 and Theorem 3.11 this expression can be simplified to:

    f(x, y) = xL y

    Example 3.14 Let us use this method to express the Lukasiewicz conjunctionin a DNF for the case of the five-valued logic as shown in Figure 3.31.

    39

  • 8/4/2019 petrik_masters_thesis

    43/101

    14 4

    24

    3

    43

    42

    14

    43

    43

    42

    42

    42

    14

    14

    14

    14

    10

    0

    1

    x

    y

    f(x,y)

    1

    0 0 0 0 0

    0 0 0 0

    0 0 0

    0 0

    0

    Figure 3.31: Svoboda map defining a five-valued Lukasiewicz conjunction.

    14 4

    24

    3

    43

    42

    14

    43

    43

    42

    42

    42

    14

    14

    14

    14

    10

    0

    1

    x

    y

    1

    0 0 0 0 0

    0 0 0 0

    0 0 0

    0 0

    0

    Figure 3.32: Example of finding DNF with Lukasiewicz operations and Lukasie-wicz equivalence in a Svoboda map for a five-valued Lukasiewicz conjunction.

    SolutionTo find the DNF we cover the Svoboda map by a loop as shown in Fig-

    ure 3.32. We get the expression:

    f(x, y) = 1 L

    [x 1] L

    [y 1]

    Due to Definition 2.6 and Theorem 3.11 this expression can be simplified to:

    f(x, y) = x L

    y

    Example 3.15 Let us use this method to express the standard disjunction in aDNF for the case of the five-valued logic as shown in Figure 3.33.

    SolutionIn Figure 3.34 there are two possible ways to cover the Svoboda map; both

    of them give a correct although different result:

    f(x, y) =

    1 L

    [x 1]L

    1 L

    [x 0] L

    [y 1]

    f(x, y) =

    1 L

    [y 1]L

    1 L

    [x 1] L

    [y 0]

    40

  • 8/4/2019 petrik_masters_thesis

    44/101

    14 4

    24

    3

    43

    42

    14

    14

    14

    42

    42

    43

    43

    14 4

    2

    42

    42

    43

    43

    43

    43

    43

    10

    0

    1

    x

    y

    f(x,y)

    1

    1

    1

    1

    1

    1111

    0

    Figure 3.33: Svoboda map defining a five-valued standard disjunction.

    14 4

    24

    3

    43

    42

    14

    14

    14

    42

    42

    43

    43

    14 4

    2

    42

    42

    43

    43

    43

    43

    43

    10

    0

    1

    x

    y

    1

    1

    1

    1

    1

    1111

    0

    14 4

    24

    3

    43

    42

    14

    14

    14

    42

    42

    43

    43

    14 4

    2

    42

    42

    43

    43

    43

    43

    43

    10

    0

    1

    x

    y

    1

    1

    1

    1

    1

    1111

    0

    a) b)

    Figure 3.34: Example of finding DNF with Lukasiewicz operations and Luka-siewicz equivalence in a Svoboda map for a five-valued standard disjunction.

    Due to Definition 2.6 and Theorem 3.11 these expressions can be simplifiedto:

    f(x, y) = xL (x

    Ly)

    f(x, y) = yL (x

    Ly)

    Note that the equality of these two expressions corresponds to the famous

    Lukasiewicz axiom (y

    Lx)

    Lx = (x

    Ly)

    Ly, where x

    Ly = x

    L

    y (see [10]).

    Remark 3.16 The standard conjunction cannot be expressed by this method assimply as the previous three operations. Nevertheless, it can be expressed by aconjunctive normal form discussed in Section 3.6.2.

    Corollary 3.17 For the case of ann-valued logic, P=

    0, 1n1 ,2

    n1 , . . . ,n2n1 , 1

    ,

    the set L

    ,L, , 0, 1

    n 1 ,2

    n 1 , . . . ,n 2n 1 , 1

    41

  • 8/4/2019 petrik_masters_thesis

    45/101

    is a functionally complete set of operations.

    3.6.2 Conjunctive normal forms

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    14

    42

    42

    42

    42

    42

    42

    42

    14 4

    2

    42

    42

    42

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    14

    14

    14

    a

    10

    1

    0

    b

    a10

    1

    0

    b

    10

    0

    1

    b

    a10

    0

    1

    b

    a

    f(a,b) g(a,b)

    0

    11

    1

    1 1

    1 1 1 1

    1 1

    1

    11

    1

    111

    1

    Figure 3.35: Example of loops in a Svoboda map for CNF with Lukasiewiczoperations and negated Lukasiewicz equivalence.

    Analogically as in the previous case (Section 3.6.1) we will express termssimilarly as in the method described in Section 3.4.2. We replace the operationof negated Kronecker delta by the operation of negated Lukasiewicz equivalencewhich gives us terms which affect their neighboring cells as well. Figure 3.23shows two examples of functions expressed by single terms:

    f(a, b) = [a 2/4]L [b 1/

    4]

    g(a, b) = 1/4

    L [a 2/4]L [b 1/

    4]

    As you can see, the terms behave analogically as in the previous case; thefunction f(a, b) creates a pyramid with 0 in the top; the neighboring cells havelinearly increasing values. If we include a constant in a term, then this constant

    is added to all values in the term as shown in the case of function g(a, b).The case of terms where one of the variables (a) is irrelevant is shown inFigure 3.36. It defines the functions:

    h(a, b) = [b 1/4]

    i(a, b) = 2/4

    L [b 1/4]

    Analogically by a loop we mean the whole pyramid as shown in Fig-ures 3.36 and 3.36. The value of a loop is the value in its top. In Svobodamaps we will denote only tops of loops.

    42

  • 8/4/2019 petrik_masters_thesis

    46/101

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14 4

    2

    43

    43

    1

    1

    14

    14

    42

    43

    0

    14

    14

    42

    43

    0

    14

    14

    42

    43

    0

    14

    14

    42

    43

    0

    14

    14

    42

    43

    0 42

    43

    43

    1

    1

    42

    43

    43

    1

    1

    42

    43

    43

    1

    1

    42

    43

    43

    1

    1

    a10

    1

    0

    b

    a

    10

    1

    0

    b

    10

    0

    1

    b

    a

    10

    0

    1

    b

    a

    h(a,b) i(a,b)

    Figure 3.36: Example of loops in a Svoboda map for CNF with Lukasiewiczoperations and negated Lukasiewicz equivalence.

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    42

    43

    43

    14

    14

    14

    14

    42

    42

    42

    42

    42

    42

    43

    43

    43

    43

    42

    43

    43

    b

    a10

    0

    1

    a10

    1

    0

    b

    j(a,b)

    1 1

    0

    11

    Figure 3.37: Example of two crossing loops in a Svoboda map for CNF withLukasiewicz operations and negated Lukasiewicz equivalence.

    In the case of two loops crossing, the resulting value is given by the Lu-kasiewicz conjunction of the values given by the terms. Figure 3.37 shows anexample of a function which can be expressed by two terms:

    j(a, b) = (2/4

    L [a 3/4

    ]) L

    (2/4

    L [b 3/4])

    Example 3.18 We have a five-valued two-variable logical function f(x, y) de-fined by a Svoboda map shown in Figure 3.38. Let us express this function by

    43

  • 8/4/2019 petrik_masters_thesis

    47/101

    14 4

    24

    3

    43

    42

    14

    14

    14

    14

    14

    14

    42

    42

    42

    42

    42

    42

    43

    43

    43

    43

    43

    43

    42

    10

    0

    1

    x

    y

    f(x,y)

    0

    00

    0

    1

    1 1

    Figure 3.38: Example of finding CNF with Lukasiewicz operations and negatedLukasiewicz equivalence in a Svoboda map.

    a simplified conjunctive normal form using the operations of Lukasiewicz con- junction, Lukasiewicz disjunction and negated Lukasiewicz equivalence.

    Solution First we mark the cells with value 0 as overloaded; these cells behavethe same way as in the method described in Section 3.4.2

    Then we repeat the following three steps until all cells in the map containvalue 1.

    1. Find the largest possible loop with the lowest possible value that doesnot contain value 1. Note that as in the previous method this is a veryproblematic step with the dual problems.

    2. Express the corresponding S-term.

    3. Add negated values of the loop to the values of the corresponding cells.

    The result is the Lukasiewicz conjunction of the S-terms given by the loops.

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    14

    14

    14

    14

    1

    4

    42

    42

    42

    42

    4

    2

    42

    43

    43

    43

    43

    43

    4

    3

    14

    14

    14

    14

    1

    4

    42

    42

    42

    42

    4

    2

    42

    43

    43

    43

    43

    43

    4

    3

    42

    42

    10

    0

    1

    10

    0

    x

    y y

    xa) b)

    0

    00

    0

    1

    1 1

    0

    00

    0

    1

    1 1

    Figure 3.39: Example of finding CNF with Lukasiewicz operations and negatedLukasiewicz equivalence in a Svoboda map: a - marking overloaded cells, b -finding the largest loop.

    44

  • 8/4/2019 petrik_masters_thesis

    48/101

    Let us show now this algorithm on our example:

    We mark the overloaded cells (Figure 3.39a) and find the largest possibleloop (Figure 3.39b). The S-term given by the loop is:

    1/4

    L [x 1]

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    1

    42

    42

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    43

    42

    42

    42

    42

    10

    0

    1

    10

    0

    x

    y y

    x

    1

    1 1

    111

    1 1 1 1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    1

    c) d)

    Figure 3.40: Example of finding CNF with Lukasiewicz operations and negatedLukasiewicz equivalence in a Svoboda map: c,d - adding negated value of theloop to the map cells and finding the largest loop.

    Then we add negated values of the loop to the corresponding cells and findthe next largest possible loop (Figure 3.40c) which gives us the term:

    2/4

    L [y 1/4]

    Now there is only one cell in the map with a value 2/4

    which is different from1. This can be covered by two equal loops, both with value 1/

    4(Figure 3.40d):

    1/4

    L [x 1/4]L [y 3/

    4]

    1/4

    L

    [x 1/

    4]L

    [y 3/

    4]

    After adding the negated value of the latter loop to the corresponding celltwice, all the cells in the map contain value 1 and the resulting conjunctivenormal form is:

    f(x, y) =1/4

    L [x 1]

    L

    2/4

    L [y 1/4

    ]

    L

    1/4

    L [x 1/4]L [y 3/

    4]

    L

    1/4

    L [x 1/4

    ]L [y 3/

    4]

    45

  • 8/4/2019 petrik_masters_thesis

    49/101

    14 4

    24

    3

    43

    42

    14

    14

    14

    42

    42

    42

    43

    43

    43

    43

    10

    0

    1

    x

    y

    1

    1

    1

    1

    1

    1111

    1

    1

    1

    1

    1 1

    0

    Figure 3.41: Example of finding CNF with Lukasiewicz operations and negatedLukasiewicz equivalence in a Svoboda map for a five-valued Lukasiewicz dis-

    junction.

    Example 3.19 Let us use this method to express the Lukasiewicz disjunction from Figure 3.29 in a conjunctive normal form.

    SolutionTo find the CNF we cover the Svoboda map by a loop as shown in Figure 3.41.

    f(x, y) = 0L [x 0] L [y 0]

    Due to Definition 2.7 and Theorem 3.11 this expression can be simplified to:

    f(x, y) = xL y

    Example 3.20 Let us use this method to express the Lukasiewicz conjunction from Figure 3.31 in a conjunctive normal form.

    Solution

    14 4

    24

    3

    43

    42

    14

    43

    43

    42

    42

    42

    14

    14

    14

    14

    10

    0

    1

    x

    y

    1

    0 0 0 0 0

    0 0 0 0

    0 0 0

    0 0

    0

    Figure 3.42: Example of finding CNF with Lukasiewicz operations and negatedLukasiewicz equivalence in a Svoboda map for a five-valued Lukasiewicz con-

    junction.

    To find the CNF we cover the Svoboda by loops as shown in Figure 3.42.

    f(x, y) =

    0L [x 0]

    L

    0L [y 0]

    46

  • 8/4/2019 petrik_masters_thesis

    50/101

    Due to Definition 2.7 and Theorem 3.11 this expression can be simplified to:

    f(x, y) = x L y

    14 4

    24

    3

    43

    42

    14

    43

    43

    42

    42

    14

    14

    14

    14

    14

    14

    14

    42

    42

    42

    43

    10

    0

    1

    x

    y

    f(x,y)

    1

    0 0 0 0 0

    0

    0

    0

    0

    Figure 3.43: Svoboda map defining a five-valued standard conjunction.

    Example 3.21 Let us use this method to express the standard conjunction fromFigure 3.43 in a conjunctive normal form.

    Solution

    14 4

    24

    3

    43

    42

    14

    14 4

    24

    3

    43

    42

    14

    43

    43

    42

    42

    14

    14

    14

    14

    14

    14

    14

    42

    42

    42

    43

    43

    43

    42

    42

    14

    14

    14

    14

    14

    14

    14

    42

    42

    42

    43

    a) b)10

    0

    1

    x

    y

    10

    0

    1

    x

    y

    1

    0 0 0 0 0

    0

    0

    0

    0 1

    0 0 0 0 0

    0

    0

    0

    0

    Figure 3.44: Example of finding CNF with Lukasiewicz operations and negated

    Lukasiewicz equivalence in a Svoboda map for a five-valued standard conjunc-tion.

    In Figure 3.44 there are two possible ways to cover the Svoboda map; bothof them give a correct although different result:

    f(x, y) =

    0L [x 0]

    L

    0L [x 1] L [y 0]

    f(x, y) =

    0L [y 0]

    L

    0L [x 0] L [y 1]

    47

  • 8/4/2019 petrik_masters_thesis

    51/101

    Due to Definition 2.7 and Theorem 3.11 these expressions can be simplifiedto:

    f(x, y) = x L

    (x L y)

    f(x, y) = y L

    (xL y)

    Remark 3.22 The standard disjunction cannot be expressed by this method assimply as the previous three operations.

    Corollary 3.23 For the case of ann-valued logic, P=

    0, 1n1 ,2

    n1 , . . . ,n2n1 , 1

    ,

    the set

    L,L

    ,, 0,

    1

    n 1,

    2

    n 1, . . . ,

    n 2n 1

    , 1is a functionally complete set of operations.

    48

  • 8/4/2019 petrik_masters_thesis

    52/101

    3.7 Conclusion

    We have shown three possible ways how to use Svoboda maps to find minimizeddisjunctive and conjunctive normal forms for many-valued logical functions.Analogically we could introduce the method with the Lukasiewicz equivalenceand the standard operations but this method is neither very interesting norimportant since it is not able to express all logical functions.

    The methods with Kronecker delta are much more flexible than those withfuzzy equivalence, they allow to express any logical function easily and thealgorithm finding the normal form is clear. Nevertheless, the results given bythese methods can be very complex, consisting of many terms. Elegant resultsare obtained when the function is almost constant.

    The methods with fuzzy equivalence can be very efficient in some cases,especially when the values increase or decrease constantly on the map. However,in other cases the solution can be more complex than those using Kroneckerdelta, especially if the functions change very quickly. Annoying feature of thesemethods is the problematic finding of loops.

    49

  • 8/4/2019 petrik_masters_thesis

    53/101

    Chapter 4

    Functionally complete sets

    of operations

    4.1 Introduction

    In Chapter 2 and Chapter 3 we have shown some functionally complete sets of

    operations for the case of an n-valued logic, P=

    0, 1n1 ,2

    n1, . . . , n2

    n1, 1

    :

    1. A1 =. ,

    ., , 0, 1n1 , 2n1 , . . . , n2n1 , 1

    2. A2 =. ,

    ., , 0, 1n1 , 2n1 , . . . , n2n1 , 1

    3. A3 = L, L, , 0, 1n1 , 2n1 , . . . , n2n1 , 14. A4 =

    L

    ,L,, 0, 1n1 , 2n1 , . . . , n2n1 , 1

    Nevertheless, these sets are very large; each of them contains three many-

    valued operations and all constants from the set P.In hardware design it is convenient to work with functionally complete sets of

    operations which are as small as possible. The advantage of small sets is obviousif we consider that for each operation in the set we must have its hardwarerealization. Note that the logical constants should not be the main problemsince their implementation is easy and cheap.

    In this chapter we simplify the sets with the Lukasiewicz operations upto three operations. We also introduce the many-valued Sheffer and Pierce

    operation which allow us to express functionally complete sets of operationswith only two operations.

    4.2 Lukasiewicz operations

    Proposition 4.1 For the case of ann-valued logic, P=

    0, 1n1 ,2

    n1 , . . . ,n2n1 , 1

    where n 3, the sets

    A5 =

    L

    ,L, , 1

    n 1

    50

  • 8/4/2019 petrik_masters_thesis

    54/101

    A6 = L,L, , 1

    n

    1

    A7 =

    L

    ,L, , 1

    n 1

    A8 =

    L

    ,L,, 1

    n 1

    are functionally complete sets of operations.

    ProofAll constants in the sets A1, A2, A3 and A4 can be expressed by the lowest

    non-zero constant 1n1 Pand the Lukasiewicz operations L andL:

    0 =

    1

    n 1 L1

    n 1i

    n 1 =1

    n 1L 1

    n 1L . . . L 1

    n 1 i times

    where i {1, 2, . . . , n 1}

    Proposition 4.2 For the case of ann-valued logic, P=

    0, 1n1 ,2

    n1, . . . , n2

    n1, 1

    where n 3, the setsA9 =

    L

    , ,1

    n 1

    A10 = L, , 1n 1

    are functionally complete sets of operations.

    Proof The operation in the set A7 can be expressed by the operations L

    ,L

    and (see Definition 3.10):

    [a b] = (a L

    b)L (a

    Lb)

    One of the operations L

    andL can be expressed using de Morgan laws which

    hold for the Lukasiewicz operations and the standard negation1.

    aL b = a

    Lb

    a L

    b = aL b

    1See [13]

    51

  • 8/4/2019 petrik_masters_thesis

    55/101

    4.3 Sheffer operation

    The Sheffer operation comes from the two-valued logic where it represents afunctionally complete set of operations and is used to replace all operations indisjunctive normal forms as we shall show in Example 4.4.

    Definition 4.3 The two-valued Sheffer operation is defined as the negation ofthe two-valued conjunction:

    The two-valued Sheffer operation: : {0, 1}m {0, 1}

    (a1, a2, . . . , am) =

    0 iff a1 = a2 = . . . = am = 1,1 otherwise.

    Example 4.4 Replace all operations in the expression (a b) + (c d) by theSheffer operation.

    Solution Due to the involution a = a and de Morgan laws we can transformthe expression to:

    (a b) + (c d) = (a b) + (c d) = (a b) (c d) = ((a, b), (c, d))

    The negated variable b can be expressed as (b, b):

    ((a, b), (c, d)) = ((a, (b, b)), (c, d))

    A many-valued Sheffer operation can be defined as a many-valued negationof a many-valued conjunction. In particular, we will use two cases of a many-valued Sheffer operation.

    Definition 4.5 The standard Sheffer operation is defined as the standard nega-tion of the standard conjunction. The Lukasiewicz Sheffer operation is definedas the standard negation of the Lukasiewicz conjunction.

    The standard Sheffer operation: S

    : Pm P

    S

    (a1, a2, . . . , am) = a1 S

    a2 S

    . . . S

    am = 1 min(a1, a2, . . . , am)

    The Lukasiewicz Sheffer operation: L

    : Pm P

    L

    (a1, a2, . . . , am) = a1 L

    a2 L

    . . . L

    am = min(m a1 a2 . . . am, 1)

    Proposition 4.6 For the case of ann-valued logic, P=

    0, 1n1 ,2

    n1 , . . . ,n2n1 , 1

    ,

    the set

    A11 =

    S

    , , 0,1

    n 1 ,2

    n 1 , . . . ,n 2n 1 , 1

    is a functionally complete set of operations.

    52

  • 8/4/2019 petrik_masters_thesis

    56/101

    Proof We take the set A1, where we replace the general operations by thestandard operations. Using the standard Sheffer operation we can express the

    standard negation:

    S

    (a, a) = 1 min(a, a) = 1 a = a

    The standard conjunction can be expressed as the standard negation of thestandard Sheffer operation:

    a S

    b = S

    (a, b)

    The standard disjunction can be expressed using de Morgan laws:

    aS b = a

    Sb

    Proposition 4.7 For the case of ann-valued logic, P=

    0, 1n1 ,2

    n1, . . . , n2

    n1, 1

    where n 3, the setsA12 =

    L

    , ,n 2n 1

    A13 =

    L

    , , n 2n 1

    are functionally complete sets of operations.

    Proof We take the set A1, where we replace the general operations by the Lu-kasiewicz operations and the set A3. All constants in the sets can be expressedby the Lukasiewicz Sheffer