Fuzzy Logic and Approximate Reasoning

download Fuzzy Logic and Approximate Reasoning

of 72

Transcript of Fuzzy Logic and Approximate Reasoning

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    1/72

    Thesis Number:

    Fuzzy Logic and ApproximateReasoning

    Abdul Khaliq and Amais Ahmad

    This thesis is presented as part of Degree of Master of Sciences inMathematical Modelling and Simulation

    Blekinge Institute of Technology2010

    School of Engineering

    Department of Mathematics and Sciences

    Blekinge Institute of Technology, Sweden

    Supervisor: Elisabeth Rakus-Andersson

    Examiner: Elisabeth Rakus-Andersson

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    2/72

    Contact Information:

    Author:

    Abdul Khaliq and Amais Ahmademail: [email protected], [email protected]

    Supervisor:

    Elisabeth Rakus-AnderssonDepartment of Mathematics and SciencesSchool of Engineering, BTHBlekinge Institute of Technology, Swedenemail: [email protected]

    Examiner:

    Elisabeth Rakus-AnderssonDepartment of Mathematics and Sciences

    School of Engineering, BTHBlekinge Institute of Technology, Swedenemail: [email protected]

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    3/72

    Abstract

    Two of the most exemplary capabilities of the human mind are the capabilityof using perceptions (human knowledge) in purposeful ways and the capabilityof approximating perceptions by statements in natural language. Understanding

    these capabilities and emulating them by linguistic approximation is the crux ofour thesis. There has been a rapid growth in the number and variety of applica-tions of fuzzy logic. In a narrow sense, fuzzy logic is a logical system which is anextension of multivalued logic and is intended to serve as logic of approximatereasoning. But in a wider sense, fuzzy logic is more or less synonymous with thetheory of fuzzy sets. In classical logic the propositional value of a statement iseither true (1) or false (0) but in lukasiewicz logic we gave value as a truthfulnessto a certain proposition between [0, 1]. As a generalization of many valued logic,fuzzy logic was established in order to deal with those fuzzy propositions and tounderlie approximate reasoning. We have calculated the fuzzy truth values andcompare the results of different operations (conjunction, disjunction etc) with theapproach to Baldwins (1979) and with the help of modus ponens law (If p qand p then q.).

    There are many chemical reactions that are very sensitive and a little changein temperature and particle size can create serious problems. We have developedthe idea of approximate reasoning and fuzzy logic to find the approximate valueof reaction rate with the given conditions by means of the extended modus po-nens law. The methodology is very simple and can be applied to several otherchemical reactions in the similar way by connecting AND and OR operations.The result Q can be found by the fuzzy relation equation Q = P o R where

    o is the max-min composition ofP and R operation. Result Q for the certainsituation is in the form of fuzzy set, in which we choose the value with maximummembership degree.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    4/72

    iv

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    5/72

    Acknowledgements

    We would like to thank to our dear ALLAH who gave us this ability and chanceto understand and learn the in-depth knowledge of science and technology atBlekinge Institute of Technology, BTH. We would like to show our gratitude

    to our honorable thesis supervisor Prof. Dr.Elisabeth Rakus Andersson for herguidance, feedback and support throughout our thesis work. We will also expressour deepest gratitude to all the teachers who let us understand the real aspect ofmathematics, and for letting us learn more about Mathematical Modelling andsimulation. We would like to thank our program manager Dr.Raisa Khamitovafor giving us his valuable time in sorting out issues related with our subjects andassignments.

    Last but not least, we also express our deepest gratitude to our beloved par-ents, for always having encouraged us and supported us in every possible waythroughout our studies both financially and moral.

    Abdul Khaliq and Amais Ahmad2010, Sweden

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    6/72

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    7/72

    Contents

    Abstract iii

    Acknowledgements v

    List of Figures xi

    1 Classical Logic 1

    1.1 Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.1.1 Examples of Logic . . . . . . . . . . . . . . . . . . . . . . 1

    1.1.2 Logic on Higher Level . . . . . . . . . . . . . . . . . . . . 2

    1.2 Classical Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    1.2.1 Symbols Used in Classical Logic . . . . . . . . . . . . . . . 3

    1.2.2 Basic Operations on Classical Truth Values . . . . . . . . . 3

    1.2.3 Truth Table . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    1.2.4 Example of Basic Classical Logical Operations . . . . . . . 4

    2 Lukasiewicz Logic 5

    2.1 3-Valued Lukasiewicz Logic . . . . . . . . . . . . . . . . . . . . . 5

    2.1.1 Operations on 3-Valued Lukasiewicz Truth Expressions . . 6

    2.1.2 Truth Table for 3-Valued Lukasiewicz Logic . . . . . . . . 6

    2.1.3 Example of Basic Operations in 3-valued Lukasiewicz Logic 6

    2.1.4 The Guiding Principles of the System of 3-valued LukasiewiczLogic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.1.5 Model Operators . . . . . . . . . . . . . . . . . . . . . . . 7

    2.1.6 Example of Model Operators . . . . . . . . . . . . . . . . 8

    2.1.7 Modalities in Classical Logic . . . . . . . . . . . . . . . . . 8

    2.1.8 Comparison of 3-valued Lukasiewicz Logic and ClassicalLogic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2.2 Many-valued Generalization of the 3-Valued Lukasiewicz Logic . . 9

    2.2.1 Division of Unit Interval . . . . . . . . . . . . . . . . . . . 9

    2.2.2 4-valued Lukasiewicz Logic . . . . . . . . . . . . . . . . . . 10

    2.2.3 Example of 4-valued Lukasiewicz Logic . . . . . . . . . . . 11

    vii

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    8/72

    2.2.4 Example of Comparison between Classical and LukasiewiczLogic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    2.2.5 Example of many-valued Lukasiewicz Logic . . . . . . . . . 13

    3 Fuzzy Logic 15

    3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.1.1 Fuzzy Set . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.1.2 Example of Fuzzy Set . . . . . . . . . . . . . . . . . . . . . 15

    3.2 Distinguished Features of Fuzzy Logic . . . . . . . . . . . . . . . . 163.3 The Truth Value Set of Fuzzy Logic . . . . . . . . . . . . . . . . . 17

    3.3.1 Comparison of Linguistic Fuzzy Truth Values and Numer-ical Lukasiewicz Truth Values . . . . . . . . . . . . . . . . 18

    3.3.2 Operations on Fuzzy Truth Values . . . . . . . . . . . . . 183.3.3 Extension Principle for Fuzzy Sets . . . . . . . . . . . . . 18

    3.4 Use of Extension Principle for the Operations on Fuzzy Truth Values 213.4.1 Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.4.2 Example of Negation . . . . . . . . . . . . . . . . . . . . . 223.4.3 Conjunction . . . . . . . . . . . . . . . . . . . . . . . . . . 223.4.4 Example of Conjunction . . . . . . . . . . . . . . . . . . . 233.4.5 Disjunction . . . . . . . . . . . . . . . . . . . . . . . . . . 233.4.6 Example of Disjunction . . . . . . . . . . . . . . . . . . . . 233.4.7 Implication . . . . . . . . . . . . . . . . . . . . . . . . . . 243.4.8 Example of Implication . . . . . . . . . . . . . . . . . . . . 24

    3.4.9 Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . 253.4.10 Example of Equivalence . . . . . . . . . . . . . . . . . . . 25

    3.5 Baldwin Approach to Fuzzy Truth Values . . . . . . . . . . . . . 263.5.1 Fuzzy Truth Value Sets in Baldwin Approach . . . . . . . 263.5.2 Negations in Baldwin Approach . . . . . . . . . . . . . . . 273.5.3 Graphical Baldwin Approach to Fuzzy Truth Values . . . . 28

    3.6 Linguistic Approximation . . . . . . . . . . . . . . . . . . . . . . 283.6.1 Example of Linguistic Approximation . . . . . . . . . . . . 29

    3.7 Modus Ponens Law with Fuzzy truth-values . . . . . . . . . . . . 29

    4 Approximate Reasoning 354.1 Classical IF-THEN Rule . . . . . . . . . . . . . . . . . . . . . . . 36

    4.1.1 Example of Classical IF-THEN Rule . . . . . . . . . . . . 364.2 Fuzzy IF-THEN Rule . . . . . . . . . . . . . . . . . . . . . . . . . 36

    4.2.1 Example of Linguistic Fuzzy sets . . . . . . . . . . . . . . 374.3 Models for Approximations . . . . . . . . . . . . . . . . . . . . . . 374.4 Schematic Procedure . . . . . . . . . . . . . . . . . . . . . . . . . 384.5 Basic Rules of Inference . . . . . . . . . . . . . . . . . . . . . . . 38

    4.5.1 Example of Modus Ponens . . . . . . . . . . . . . . . . . . 394.5.2 Example of Modus Tollens . . . . . . . . . . . . . . . . . . 39

    viii

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    9/72

    ix

    4.6 Generalized Modus Ponens or Fuzzy Rule of Inference . . . . . . . 404.7 Rules of Finding Fuzzy Relation R . . . . . . . . . . . . . . . . . 41

    4.7.1 Rule of max-min . . . . . . . . . . . . . . . . . . . . . . . 414.7.2 Binary Rule . . . . . . . . . . . . . . . . . . . . . . . . . . 414.7.3 Lukasiewicz Rule . . . . . . . . . . . . . . . . . . . . . . . 414.7.4 Min-Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.7.5 Example of Finding Fuzzy Relation R . . . . . . . . . . . . 424.7.6 Example of Fuzzy Modus Ponens . . . . . . . . . . . . . . 434.7.7 Conjunction Form of the Antecedent . . . . . . . . . . . . 44

    5 Approximate Reasoning in Chemical Reactions 47

    6 News 53

    6.1 Latest News . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    7 Conclusion 57

    Bibliography 59

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    10/72

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    11/72

    List of Figures

    2.1 Comparison of classical and Lukasiewicz logic . . . . . . . . . . . 12

    3.1 Fuzzy set of apartment rent . . . . . . . . . . . . . . . . . . . . . 163.2 Baldwin approach to fuzzy truth values . . . . . . . . . . . . . . . 28

    4.1 Fuzzy sets of temperature domain . . . . . . . . . . . . . . . . . . 364.2 Linguistic fuzzy sets . . . . . . . . . . . . . . . . . . . . . . . . . 37

    xi

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    12/72

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    13/72

    Chapter 1

    Classical Logic

    1.1 Logic

    We all give reasons in our daily life. We try to figure out what is so, reasoning onthe basis of what we already know. We try to persuade others that something isso by giving them reasons. Logic is the study of what counts as a good reason forwhat, and why. It is all about reasons. Every day we consider possibilities, wethink about what follows from different alternatives and we weigh up competingpositions or options. To understand good reasoning we must have an idea of thekinds of things we reason about. Logic concerns itself with reasons for believing

    something instead of something else.

    In everyday situations arguments are dialogues between people. In logic we donot study all of the features of these dialogues. We concentrate on the proposi-tions people express when they give reasons for things. For us an argument is alist of propositions, called the premises, followed by a word such as therefore orso and then another proposition called the conclusion [1].

    Logic is the study of valid arguments. It is a systematic approach todistinguish valid arguments from invalid arguments. It is an instinc-

    tive art. It has one or more premises and a conclusion. In advancingan argument one claim that premise or premises that support the de-cision or give any help to readers to make conclusion.

    1.1.1 Examples of Logic

    Example 1

    1. Rome is the capital of Italy, and this plane lands in Rome; so the planelands in Italy.

    1

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    14/72

    2 Chapter 1. Classical Logic

    2. Moscow is the capital of the USA; so you cant go to Moscow without goingto the USA.

    Conclusion: The first piece of reasoning is fine; but second is pretty hopeless,and does not give any one with an elementary knowledge of geography. The sec-ond premise is simply false.

    Example 2

    1. x< y

    2. y is a small value.

    Conclusion: Therefore x is also a small value.

    Example 3

    1. David is a man.

    2. All men are tall.

    Conclusion: Therefore David is tall.

    In each case the claim before so is called premise and the claim after is calledconclusion.

    1.1.2 Logic on Higher Level

    On higher level, Logic is a science which developed out of the self awareness ofthinkers. Logic is of value to all individuals bettering their daily reasoning pro-cesses and thus their efficacy in dealing with their lives and their work. It helpsyou to arrive at the solution of problems more rapidly and efficiently.

    Logic teaches us to pursue and verify knowledge. It is based on an acknowl-edgement of the possibility of human error but also implies our ability to correct

    errors where veracity or falsity is hard to establish. It tells us at least how rea-sonable or forced our judgments are. Logic is concerned with the formalities ofreasoning without so much regard to its subject matter.

    Example

    1. A is a president of the United States.

    2. A is a son of the president of the United States.

    Conclusion: Therefore, there is someone who is both a president of the UnitedStates and a son of a president of the United States.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    15/72

    Chapter 1. Classical Logic 3

    1.2 Classical Logic

    Classical logic is the simplest of all major logics. Classical logic is logic in whichthere are only two truth values for a statement or proposition, i.e, there are onlytwo possible values that we can assign to certain statements.The truth values are

    1. True (1, yes)

    2. False (0, No)

    A proposition can be true or false but not both at the same time.

    For example

    sun rises in the east is a true statement and has truth value 1.Normally we use 1s and 0s in mathematical classical logic and true, false inpropositional classical logic.

    1.2.1 Symbols Used in Classical Logic

    We use following symbols to connect two truth values in different ways.

    is used for Negation (NOT).

    is used for Conjunction (AND).

    is used for Disjunction (OR).is used for an Implication sign.is used for Equivalence.

    These are the basic notations and all other notations used in classical and otherlogics are derived from these notations.

    1.2.2 Basic Operations on Classical Truth Values

    Operations on propositional classical logic can be described in terms of tables of0s and 1s called truth tables. Truth tables for the classical logic are based upon

    the following basic operations.

    1.p = 1 - p2. pq = max(p, q)3. pq = min(p, q)4. pq = min{1, 1 - p + q}

    where p and q are two propositions and their truthfulness is used as inputs inthe following truth table.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    16/72

    4 Chapter 1. Classical Logic

    1.2.3 Truth Table

    p q

    p p

    q p

    q p

    q0 0 1 0 0 10 1 1 1 0 11 0 0 1 0 01 1 0 1 1 1

    1.2.4 Example of Basic Classical Logical Operations

    Let us consider two propositions

    p = We are sitting in a restaurant

    q = We are taking teaNow according to above operations and truth table we have

    1. p = We are not sitting in a restaurant

    q = We are not taking tea

    2. pq = We are sitting in a restaurant or we are taking tea

    which means that the compound statement is true when one of the p and q orboth p and q will be true.

    3. pq = We are sitting in a restaurant and we are taking teawhich means that the compound statement is true only when both p and q willbe true.

    4. p q = If we are sitting in a restaurant then we are taking teawhich means that the compound statement will be wrong when true statementimplies the wrong one. We can also say that p is a sufficient condition for q or qis a necessary condition for p.

    There should be a relation between premise and conclusion in the implication,e.g, If I fall into the lake then I will get wet.

    We also use implication in theorems,e.g, If ABC is the right triangle with right angle at B then AC2 =AB2 +BC2.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    17/72

    Chapter 2

    Lukasiewicz Logic

    Classical logic works well for mathematical proofs, but it does not describe howwe reason about most nonmathematical matters.For example:

    I will wear a t- shirt tomorrow (or)I will not wear a t-shirt tomorrow.

    Classical logic says one of those is already true. So is my free will just an illusion?We need a logic that can say maybe.

    Lukasiewicz logic is a non-classical, multi-valued logic in which weassign a certain value as a truthfulness of a given statement on aninterval [0, 1].

    In 1920 Lukasiewicz proposed the theory of three valued logic which was gener-alized later on to n-valued (n = 2,3,.....) logic.

    2.1 3-Valued Lukasiewicz Logic

    In 3-valued Lukasiewicz logic we have an intermediate state between true andfalse which can be interpreted as may be true or may be false withnumeric value of 1/2.

    Example

    I will be in America in 2 months........................True (1)And I will not be in America in 2 months............False (0)I May be in America in 2 months................May be (1/2)

    5

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    18/72

    6 Chapter 2. Lukasiewicz Logic

    2.1.1 Operations on 3-Valued Lukasiewicz Truth Expres-

    sions

    P is any statement about which we have to make conclusions whether it is true(T), false (F) or indeterminate (I). And v (p) is a truth value of statement pwhich could be 1, 0 or 1/2.

    We introduce the following operations for two primitive statements p and q dueto Lukasiewiczs suggestions to sample their results in the truth table.

    1. v (p) = 1-v (p)2. v (pq) = max ( v (p) , v(q) ) = v (pq) = v (p)v (q)3. v (pq) = min ( v (p), v (q) ) = v (pq) = v (p)v (q)4. v (pq) = 1[1-v (p) + v (q)] = min [1, 1-v (p) +v (q)]5. v (pq) = min[v (pq), v (qp) ] = v (pq) v (qp)

    2.1.2 Truth Table for 3-Valued Lukasiewicz Logic

    p q/p p pq pq pq pq1 1

    2 0 1 1

    2 0 1 1

    2 0 1 1

    2 0

    1 1 0 1 12

    0 1 1 1 1 12

    0 1 12

    0

    12

    12

    12

    12

    12

    0 1 12

    12

    1 1 12

    12

    1 12

    0 0 1 0 0 0 1 12

    0 1 1 1 0 12

    1

    where p and q are truth values of two different statements and q/p is the valueof q on condition that p. This table is constructed by combining each value of pwith all three values of q. This can be illustrated by the following example.

    2.1.3 Example of Basic Operations in 3-valued Lukasiewicz

    Logic

    Let us take two values of p and q

    p = 1/2 and q = 1so we see the second row in this case.

    p= 1 - 1/2 = 1/2which is shown on the last position in second column.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    19/72

    Chapter 2. Lukasiewicz Logic 7

    pq = min (1/2, 1) = 1/2which is shown on the first position in third column.

    pq = max (1/2, 1) = 1which can be seen on the first position in fourth column.

    pq = min (1, 1 - 1/2 + 1) = min (1, 3/2) = 1which is shown on the first position in fifth column.

    pq = min (pq, qp)where qp = min (1, 1 - 1 + 1/2) = min (1, 1/2) = 1/2sop

    q = min (1, 1/2) = 1/2

    shown on the first position in last column.

    Similarly we can check the results for any other combination of values of p andq.

    2.1.4 The Guiding Principles of the System of 3-valued

    Lukasiewicz Logic

    1. There are to be three truth values (T, I, F or 1, 1/2, 0) so ordered in termof decreasing truthfulness.

    2. The negation of a statement of given truth values is its opposite in truth-fulness.

    3. The truth value of a conjunction is the falsest and of a disjunction the truestof the truth values of its components.

    4. The truth value of p q is the same as that ofp qexcept the truthvalue corresponding to II.

    5. The truth value of pq is to be the same as that of (pq)(qp).

    2.1.5 Model Operators

    Lukasiewicz implemented the idea of Aristotelian logic that proposition regardingfuture contingent matters have a truth status that does not corresponds to eitherof the orthodox truth values of truth and falsity. In carrying out this idea onemust introduce corresponding complications into the truth rules for propositionalconnectives. Lukasiewicz solution to this problem consists of truth tables for anyproposition or statement [2].

    With a view to the future contingency interpretation of the third truth value

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    20/72

    8 Chapter 2. Lukasiewicz Logic

    (I), Lukasiewicz introduced model operators of possibility and necessity(symbolically

    and) into his 3 valued logic. These are to be subject of the truth

    table presented below.v(p) p p

    1 1 11/2 1 0

    0 0 0

    Thus symbolically p is to be true if p is either true or intermediate but is falseif p is definitely false.

    2.1.6 Example of Model OperatorsLet us consider the future prediction about rain, i.e. Tomorrow will be rain.

    Now if this is true (v(p) =1), then there is possibility of rain tomorrow ( p= 1) and also it is necessary ( p = 1) to be true. Otherwise the values v(p) andp will contradict.

    If it is partially true that tomorrow will be rain (v(p) = 1/2), then there isstill possibility of rain (p = 1) but is not necessary ( p = 0) to be true thattomorrow will be rain.

    If it is false that tomorrow will be rain (v(p) = 0), then there is not any possibilityof rain (p = 0) and also not necessary ( p = 0) to be true that tomorrow willbe rain.

    2.1.7 Modalities in Classical Logic

    Truth functional treatment of modalities was not possible in two valued logic.The closest we can come to specifying modalities in classical logic is

    v(p) p p1 1 10 0 0

    And then v(p) p and v(p) p

    So p p will all be logical truths so that model distinctions collapse in 3valued logic however we will have the desirable implications p p and p v(p) and p p without being saddled with their undesirable converses sothat model distinctions are preserved.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    21/72

    Chapter 2. Lukasiewicz Logic 9

    2.1.8 Comparison of 3-valued Lukasiewicz Logic and Clas-

    sical Logic

    Three valued truth table agrees with the two valued ones when only Ts(1s) andFs (0s) are involved as we can see in truth table of 3-valued Lukasiewicz logic.i.e.

    p q/p p pq pq pq pq1 1

    2 0 1 1

    2 0 1 1

    2 0 1 1

    2 0

    1 1 0 1 12

    0 1 1 1 1 12

    0 1 12

    0

    12 12 12 12 12 0 1 12 12 1 1 12 12 1 12

    0 0 1 0 0 0 1 12

    0 1 1 1 0 12

    1

    Lukasiewicz used this 3-Valued Logic as a base to generalize it into n-valuedLukasiewicz Logic.

    2.2 Many-valued Generalization of the 3-Valued

    Lukasiewicz Logic

    It is a logic in which we assign a certain value to a truthfulness of given statementon an interval [0, 1] as in classical logic we assign 0 for false statement and 1for true statement. But sometimes we come across many kinds of true and falsestatements like true, very true, very very true, rather false in our everyday life.Truth-values are real numbers between 0 and 1 for the proposition (say p) and isdenoted by

    v(p) [0, 1]

    As Lukasiewicz generalized his 3-valued logic to many-valued logicso the operations on truth expressions in this case are the same as in3-valued logic case.

    2.2.1 Division of Unit Interval

    Let us divide the interval from 0 to 1 by inserting evenly spaced division pointsfor a total of n points (n2).

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    22/72

    10 Chapter 2. Lukasiewicz Logic

    n Division Division Points (Truth Values)2 1/1,0/1 (1,0)

    3 2/2,1/2,0/2 (1,1/2,0)4 3/3,2/3,1/3,0/3 (1,2/3,1/3,0): : :: : :: : :n 1=(n-1)/(n-1),(n-2)/(n-1),

    ...,2/n-1,1/n-1,0/n-1=0

    Given the propositional connectives based on the arithmetical operations andtaking the members of this series as truth-values, we obtain the series Ln of

    Lukasiewicz many-valued logic. It is readily seen that:

    1. L2 is identical with two valued classical logic.

    2. L3 is identical with 3-valued system of Lukasiewicz.

    So the system of the series will be many valued generalizations both of the clas-sical two valued system (L2) and of the Lukasiewicz (L3).

    Moreover one can take the further possibility of obtaining two infinite valuedsystems as follows

    1. For the systemLs0 we take 0 and 1 together with all the rational numbers(i.e all fractions n/m) between 0 and 1 as truth values.

    2. For the systemLs1 we take all the real numbers from the interval 0 to 1 astruth values.

    So we can construct truth table Ln for any value of n.

    2.2.2 4-valued Lukasiewicz Logic

    Let us consider n = 4, then for L4 the truth table is as follows

    p q/p p pq pq pq pq1 2

    313

    0 1 23

    13

    0 1 23

    13

    0 1 23

    13

    0

    1 1 0 1 23

    13

    0 1 1 1 1 1 23

    13

    0 1 23

    13

    0

    23

    23

    13

    23

    23

    13

    0 1 23

    23

    23

    1 1 23

    13

    23

    1 23

    13

    13

    13

    23

    13

    13

    13

    0 1 23

    13

    13

    1 1 1 23

    13

    23

    1 23

    0 0 1 0 0 0 0 1 23

    13

    0 1 1 1 1 0 13

    23

    1

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    23/72

    Chapter 2. Lukasiewicz Logic 11

    where p and q are truth values of two different statements and q/p is the valueof q on the condition that p. This table is constructed by combining each value

    of p with all four values of q. This can be illustrated by the following example.

    2.2.3 Example of 4-valued Lukasiewicz Logic

    Let us take two values of p and q

    p = 2/3 and q = 1/3so we see the second row in this case.

    p = 1-2/3 = 1/3q = 1-1/3 = 2/3

    pq = min (2/3, 1/3) = 1/3we can see on the third position in third column.

    pq = max (2/3, 1/3) = 2/3we can see on the third position in fourth column.

    pq = min (1, 1-2/3+1/3) = 2/3we can see on the third position in fifth column.

    pq = min (pq, qp)whereqp = min (1, 1-1/3+2/3) = 1sopq = min (2/3, 1) = 2/3we can see this value on the third position in last column.

    We can check the results for the other combinations of the values of p and q ina similar way.

    Similarly we can construct any other truth table for different values of n in Ln.

    2.2.4 Example of Comparison between Classical and Lukasiewicz

    Logic

    Let us consider p = appreciated customers in a a local bank, which is dependedupon the amount of money (SEK) on their accounts.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    24/72

    12 Chapter 2. Lukasiewicz Logic

    Following the data of customer financial situations we evaluate the truth valueof appreciated position in the bank by using classical and Lukasiewicz logic.

    Account No. Deposit in millions v(p) in classical v(p) in Lukasiewicztwo-valued logic multi-valued logic

    001-78 100 1 1167-36 93 1 0.98475-84 79 1 0.80368-02 71 1 0.78745-45 54 1 0.65745-34 41 0 0.39730-17 33 0 0.24

    904-47 27 0 0.15397-01 18 0 0.09376-33 7 0 0.01

    The following graph shows the difference between truth values belonging to dif-ferent logical systems.

    Figure 2.1: Comparison of classical and Lukasiewicz logic

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    25/72

    Chapter 2. Lukasiewicz Logic 13

    2.2.5 Example of many-valued Lukasiewicz Logic

    Let p and q be the statements given as

    p =water level in a damm is highq = it is raining

    Classical logic is failed here because it gives only two values for each of the abovestatements that water level is high [True(1)] or water level is not high [False(0)].Similarly, it is raining [True(1)] or it is not raining [False(0)]. But in this casewater level is high and it is raining but we dont know how much the level ishigh and how much intense the rain is? i.e, what is the truthfulness of the abovestatements p and q. Thats why we use Lukasiewicz logic to precise the giveninformation by assigning the value according to the truthfulness. Suppose thatthe statement p is true in the following sense.

    v(p) = 1i.e water level is very high.v(p) =0.9i.e water level is high.

    v(p) = 0.7i.e. water level is rather high.v(p) =0.5i.e. water level is moderately high.

    Similarly, we can assign values to the statement q according to the reality.

    Now take any two values of both statements.

    water level is rather high with v(p) = 0.7it is raining heavily with v(p) = 0.9

    1. v(p) = water level is not rather high = 1-v(p) = 1-0.7 = 0.3v(q) = it is not raining heavily = 1-v(q) = 1-0.9 = 0.12. v(pq) = water level is rather high or it is raining heavily

    v(pq) = max[v(p), v(q)] = max[0.7, 0.9] = 0.93. v(pq) = water level is rather high and it is raining heavily

    v(pq) = min[v(p), v(q)] = min[0.7, 0.9] = 0.74. v(pq) = if water level is rather high then it is raining heavily

    v(pq) = min[1, 1-v(p) + v(q)] = min[1, 1-0.7+0.9] = min[1, 1.2] = 1

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    26/72

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    27/72

    Chapter 3

    Fuzzy Logic

    3.1 Introduction

    Fuzzy Logic is a logic in which the truth values are fuzzy subsets of the unitinterval with linguistic labels such as

    true, false, not true, very true, quite true, not very true and not very false etc.

    The main difference between Lukasiewicz logic and fuzzy logic is that, in Lukasiewiczlogic truth value for certain statement or proposition is a single value in [0, 1],

    but in fuzzy logic the truth value is fuzzy set of the unit interval.

    3.1.1 Fuzzy Set

    In classical set theory, elements fully belong to set or are fully excluded. But afuzzy set A in universe X is the set whose elements belong to X partially also.The grade of belonging of each element is determined by a membership functionA given by

    A : X[0, 1], where xX

    A finite fuzzy set can be denoted asA = A(x1)/x1+A(x2)/x2+...+A(xn)/xn

    3.1.2 Example of Fuzzy Set

    Let us consider the rent for student apartment. We assume that below $100the rent is not expensive with membership degree 0, and above $250 it is tooexpensive with membership degree 1. Between these two values, an increasingmembership degree can be seen. It is not essential that the membership of rentlinearly increase.

    15

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    28/72

    16 Chapter 3. Fuzzy Logic

    Figure 3.1: Fuzzy set of apartment rent

    3.2 Distinguished Features of Fuzzy Logic

    1. Fuzzy truth values are expressed in linguistic terms.

    2. Imprecise truth tables.

    3. Rules of inference where validity is approximate rather than exact.

    In these aspects fuzzy logic differs significantly from standard logical systemsranging from the classical Aristotelian logic to inductive logics and many valuedlogics with set truth-values. Fuzzy logic is fuzzy extension of a non-fuzzy multi-valued logic [3] which constitutes a base logic for fuzzy logic. In fuzzy logic weactually assign the membership degree to a statement according to the degree oftruthfulness in the interval [0, 1].

    It is convenient to use standard Lukasiewicz logic (which we have explained infirst chapter) as a base logic for fuzzy logic .

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    29/72

    Chapter 3. Fuzzy Logic 17

    3.3 The Truth Value Set of Fuzzy Logic

    The truth value set T of fuzzy logic is assumed to be generated by a context-freegrammar with a semantic rule providing a means of computing the meaning ofeach linguistic truth value in T as a fuzzy subset of [0, 1]. It is a countableset of the form

    T={true, false not true, very true, not very true, more or less true, rather true,not very true, not very false,..., etc}

    Each element of this set represents a fuzzy subset of the truth value set ofLukasiewicz logic i.e. [0, 1]. Thus the meaning of a linguistic truth value

    in T is assumed to be a fuzzy subset of [0,1], more specifically let [4]

    : [0, 1] [0, 1 ] denote the membership function of .Then the meaning of as a fuzzy subset of [0, 1] is expressed by

    =

    10

    (v)/v

    where the integral sign denotes the union of fuzzy singletons (v)/v, signifyingthat the membership of the numerical truth value v with the linguistic truthvalue is(v) or the grade of membership of v in the fuzzy set labeled is(v).

    If the support ofis a finite subset {v1, v2,...,vn} of [0, 1] , may be expressed as

    =1/v1+2/v2+...+n/vn

    e.g,

    True = 0.3/0.6 + 0.5/0.7 + 0.7/0.8 + 0.9/0.9 + 1/1

    As a simple illustration suppose that the meaning of true is defined by

    true(v) =

    0 for 0v ((v )/(1 ))2 for v + 1/21 ((v 1)/(1 ))

    2

    for + 1/2v1where is a value in [0, 1].Then we may write

    true=

    (+1)/2

    ((v )/(1 ))2/v+ 1(+1)/2

    [1 ((v )/(1 ))2]/vIfv1= 0.1, v2= 0.2,...,v11 = 1then true might be written as

    true= 0.3/0.7 + 0.5/0.8 + 0.8/0.9 + 1/1

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    30/72

    18 Chapter 3. Fuzzy Logic

    3.3.1 Comparison of Linguistic Fuzzy Truth Values and

    Numerical Lukasiewicz Truth Values

    At the first time, it may appear that we are moving in a wrong direction, sinceit is certainly easier to manipulate with the real numbers in [0, 1]. The answer istwo-fold.

    1. First, the Lukasiewicz truth-value set is a continuous, whereas that of fuzzylogic is a countable set. More importantly, in most applications to approxi-mate reasoning, a small finite subset of the truth-values of fuzzy logic wouldin general, be sufficient because each fuzzy truth-value represents a fuzzysubset rather than a single element of [0, 1]. Thus, we gain by trading thelarge number of simple Lukasiewicz truth-values for the small number of

    less simple truth-values of fuzzy logic- [5].

    2. The second and related point is that approximate reasoning mostly dealswith propositions which are fuzzy rather than precise, e.g, weather isvery warm, he is looking very good, cake is not very tastyetc.

    Clearly, the fuzzy truth-values of fuzzy logic are more commensurated with thefuzziness of such propositions than the numerical Lukasiewicz truth-values.

    3.3.2 Operations on Fuzzy Truth Values

    So far we have focused our attention on the structure of the truth value set offuzzy logic. We turn next to some of the basic questions relating to the manipu-lation of linguistic fuzzy truth values in interval [0, 1].

    To extend the definition of negation, conjunction, disjunction and implicationin Lukasiewicz logic to those of fuzzy logic it is convenient to employ an exten-sion principle for fuzzy sets which can be stated as follows [6].

    3.3.3 Extension Principle for Fuzzy Sets

    For one variable

    Let us define a function f mapping from X to Y

    f: XYwhere

    X={xi} , xiX, i= 1,2,..., nY={yj} , yjY, j= 1,2,..., m

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    31/72

    Chapter 3. Fuzzy Logic 19

    Let AX be a fuzzy set given by

    A= {xi, A(xi)}where A(xi) are the membership degrees for xi, i=1,2,..., n

    Then we can construct

    f(A) = {f(xi), f(A)(f(xi))} =Bwhere

    f(A)(f(xi)) =maxf(xi)A(xi)

    or we can also write f(A) as

    f(A) = xiXmaxf(xi)A(xi)/f(xi)

    Example

    LetX= {2, 1, 0, 1, 2, 3}

    and A is fuzzy set in X given by

    A= 0.1/ 2 + 0.2/ 1 + 0.3/0 + 0.5/1 + 0.8/2 + 1/3

    and function f is given byy= 2x2 + 1

    then

    f(A)=0.1/9 + 0.2/3 + 0.3/1 + 0.5/3 + 0.8/9 + 1/19

    f(A)=0.3/1+ max(0.2,0.5)/3 + max(0.1,0.8)/9 + 1/19

    f(A)=0.3/1 + 0.5/3 + 0.8/9 + 1/19

    For two variablesLet

    X={xi} , xiX, i= 1,2,..., n

    Y={yj} , yjY, j= 1,2,..., m

    Z={zk} , zkZ, k= 1,2,..., pbe the universal sets.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    32/72

    20 Chapter 3. Fuzzy Logic

    We introduce a two dimensional function

    Z=g(X, Y) or zk=g(xi, yj)

    Now use two fuzzy sets

    A X, A= {xi; A(xi)}B Y, B = {yj; B(yj)}

    then

    g(A, B)Z

    g(A, B) in Z is a picture of function g.where

    g(A, B) =

    (xi,yj)XY

    maxg(xi,yj)min(A(xi), B(yj))/g(xi, yj)

    Example

    Let X and Y be the two universal crisp sets given by

    X=

    {2,4,5

    }, and Y=

    {5,6,7

    }and A, B are two fuzzy sets A Xand B Yrespectively defined by

    A= large number in X = 0.3/2 + 0.7/4 + 1/5B= large number in Y = 0.6/5 + 0.9/6 + 1/7

    For Z X YLet g(x, y) = y-xthen

    g(A, B) = min(0.6,0.3)/3 + min(0.6,0.7)/1 + min(0.6,1)/0 + min(0.9,0.3)/4

    + min(0.9,0.7)/2+(min0.9,1)/1

    g(A, B) = min(1,0.3)/5 + min(1,0.7)/3 + min(1,1)/2g(A, B) = 0.3/3 + 0.6/1 + 0.6/0 + 0.3/4 + 0.7/2 + 0.9/1 + 0.3/5 +

    0.7/3 + 1/2

    g(A, B) = 0.6/0 + max(0.6,0.9)/1 + max(0.7,1)/2 + max(0.3,0.7)/3+ 0.3/4 + 0.3/5

    g(A, B) = 0.6/0 + 0.9/1 + 1/2 + 0.7/3 + 0.3/4 + 0.3/5

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    33/72

    Chapter 3. Fuzzy Logic 21

    3.4 Use of Extension Principle for the Opera-

    tions on Fuzzy Truth ValuesWe apply the extension principle to the definition of negation, conjunction, dis-junction and implication in fuzzy logic. It is expedient to use linguistic fuzzysubsets ,

    i.e, : [0, 1][0, 1] of truth expressions set

    T ={true, false,very true, very false, rather true, maybe true, bit true. etc}

    in which both members of set and their degrees are ranging from 0 to 1.

    Let p and q be propositions (statements) which have logical values describedby the fuzzy sets (p) and (q) where

    (p) =

    (p)(x)/x, x [0, 1](q) =

    (q)(y)/y, y [0, 1].

    We should consider some of fuzzy truth values sets before proceeding further.We state

    1. false = 1/0 + 0.9/0.1 + 0.7/0.2

    2. very False = 1/0 + 1/0.1 + 0.9/0.2

    3. not False = 0.6/0.6 + 0.7/0.7 + 0.8/0.8 + 0.9/0.9 + 1/1

    4. true = 0.7/0.8 + 0.9/0.9 + 1/1

    5. very True = 0.9/0.8 + 1/0.9 + 1/1

    6. fairly True = 1/0.8 + 0.9/0.9 + 0.8/1

    7. moderately true = 0.8/0.4 + 1/0.5 + 0.7/0.6

    8. little True = 1/0.3 + 0.9/0.4 + 0.8/0.5

    9. very very False = 1/0 + 1/0.1 + 0.9/0.2

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    34/72

    22 Chapter 3. Fuzzy Logic

    3.4.1 Negation

    Negation for a certain fuzzy truth value (p) for statement p is denoted by (p)and has the membership function given by(p)(v) = 1- (p)(v) , v [0, 1]

    Here is another type of negation in which we negate the statement p ratherthan the truth value set(p). So the truth value on negate statementp isgiven by the membership degree function

    (p)(v) =(p)(1 v) , v [0, 1]

    3.4.2 Example of Negation

    Let

    p = John is looking good

    Suppose that this statement is moderately true.

    (p) = moderately true = 0.8/0.4 + 1/0.5 + 0.7/0.6

    so by definition

    (p) = not moderately true(p) = 1-0.8/0.4 + 1-1/0.5 + 1-0.7/0.6

    (p) = 0.2/0.4 + 0/0.5 + 0.3/0.6

    Now for the second type of negation we make another calculation.

    Consider the same proposition as in the previous example.

    p= John is not looking goodwith membership values

    (p) = 0.8/1-0.4 + 1/1-0.5 + 0.7/1-0.6(p) = 0.8/0.6 + 1/0.5 + 0.7/0.4

    3.4.3 ConjunctionConjunction between two truth fuzzy expressions (p) and (q) for two proposi-tions p and q is given by

    (p q) =

    (x,y)[0,1][0,1]

    maxmin(x,y)min((p)(x), (q)(y))/min(x, y)

    with

    (p) ={x, (p)(x)}, x[0,1](q) ={y, (q)(y)}, y[0,1]

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    35/72

    Chapter 3. Fuzzy Logic 23

    3.4.4 Example of Conjunction

    Let us consider two fuzzy propositionsp = Clark does exerciseq = Clark is a healthy man

    with fuzzy truth values given by

    (p) = little true = 1/0.3 + 0.9/0.4 + 0.8/0.5(q) = moderately true = 0.8/0.4 + 1/0.5 + 0.7/0.6

    so applying the conjunction formula, we have

    (pq) = min(1,0.8)/min(0.3,0.4) + min(1,1)/min(0.3,0.5) + min(1,0.7)/min(0.3,0.6)+ min(0.9,0.8)/min(0.4,0.4) + min(0.9,1)/min(0.4,0.5) + min(0.9,0.7)/min(0.4,0.6)+ min(0.8,0.8)/min(0.5,0.4) + min(0.8,1)/min(0.5,0.5) + min(0.8,0.7)/min(0.5,0.6)

    (p q) = 0.8/0.3 + 1/0.3 + 0.7/0.3 + 0.8/0.4 + 0.9/0.4 + 0.8/0.4+ 0.8/0.5 + 0.8/0.5 + 0.7/0.5

    (p q) = max(0.8,1,0.7)/0.3 + max(0.8,0.9,0.8)/0.4 + max(0.8, 0.8,0.7)/0.5

    (p

    q) = 1/0.3 + 0.9/0.4 + 0.8/0.5

    so (little true) AND(moderately true) = little true

    3.4.5 Disjunction

    Disjunction between two truth fuzzy expressions (p) and (q) for two proposi-tions p and q is given by

    (p q) =

    (x,y)[0,1][0,1]

    maxmax(x,y)min((p)(x), (q)(y))/max(x, y)

    where

    (pq)=maxmax(x,y)min((p)(x), (q)(y))

    3.4.6 Example of Disjunction

    Apply this formula to the previous example, i.e.

    (p) = little true = 1/0.3 + 0.9/0.4 + 0.8/0.5(q) = moderately true = 0.8/0.4 + 1/0.5 + 0.7/0.6

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    36/72

    24 Chapter 3. Fuzzy Logic

    then

    (pq) = min(1,0.8)/max(0.3,0.4) + min(1,1)/max(0.3,0.5) + min(1,0.7)/max(0.3,0.6)+ min(0.9,0.8)/max(0.3,0.6) + min(0.9,1)/max(0.4,0.4) + min(0.9,0.7)/max(0.4,0.5)+ min(0.8 ,0.8)/max(0.5,0.4) + min(0.8,1)/max(0.5,0.5) + min(0.8,0.7)/max(0.5,0.6)

    (p q) = 0.8/0.4 + 1/0.5 + 0.7/0.6 + 0.8/0.4 + 0.9/0.5 + 0.7/0.6+ 0.8/0.5 + 0.8/0.5 + 0.7/0.6

    (pq) = max(0.8,0.8)/0.4 + max(1,0.9,0.8,0.8)/0.5 + max(0.7,0.7,0.7)/0.6

    (p

    q) = 0.8/0.4 + 1/0.5 + 0.7/0.6 = (q)

    little true ORmoderately true = moderately true

    3.4.7 Implication

    Implication of two fuzzy truth expressions (p) and (q) for propositions p andq is given by

    (p q) =

    (x,y)[0,1][0,1]

    maxmin(1,1x+y)min((p)(x), (q)(y))/min(1, 1 x+y)

    with

    (pq)(v) =maxmin(1,1x+y)min((p)(x), (q)(y))

    3.4.8 Example of Implication

    If we apply the implication operation to the data from the previous example, wewill have

    (p q) = min(1,0.8)/min(1,1.1) + min(1,1)/min(1,1.2)+ min(1,0.7)/min(1,1.3)+ min(0.9,0.8)/min(1,1) + min(0.9,1)/min(1,1.1) + min(0.9,0.7)/min(1,1.2)+ min(0.8 ,0.8)/min(1,0.9) + min(0.8,1)/min(1,1) + min(0.8,0.7)/min(1,1.1)

    (p q) = 0.8/1 + 1/1 + 0.7/1 + 0.8/1 + 0.9/1 + 0.7/1 + 0.8/0.9+ 0.8/1 + 0.7/1

    (p q) = max(0.8,1,0.7,0.8,0.9,0.7,0.8,0.7)/1 + 0.8/0.9

    (p q) = 0.8/0.9 + 1/1

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    37/72

    Chapter 3. Fuzzy Logic 25

    3.4.9 Equivalence

    Equivalence relation is actually minimum of two implication, i.e,

    (p q) = ((p q) (qp))

    3.4.10 Example of Equivalence

    (qp) =

    (x,y)[0,1][0,1]

    maxmin(1,1y+x)min((p)(x), (q)(y))/min(1, 1 y+x)

    (q

    p) = min(1,0.8)/min(1,0.9) + min(1,1)/min(1,0.8)+ min(1,0.7)/min(1,0.7)

    + min(0.9,0.8)/min(1,1) + min(0.9,1)/min(1,0.9) + min(0.9,0.7)/min(1,0.8)+ min(0.8 ,0.8)/min(1,1) + min(0.8,1)/min(1,1) + min(0.8,0.7)/min(1,0.9)

    (q p) = 0.8/0.9 + 1/0.8 + 0.7/0.7 + 0.8/1 + 0.9/0.9 + 0.7/0.80.8/1 + 0.8/1 + 0.7/0.9

    (qp) = 0.7/0.7 + 1/0.8 + 0.9/0.9 + 0.8/1

    and we have

    (p q) = 0.8/0.9 + 1/1

    so equivalence is given by

    (p q) = ((p q) (qp))

    =

    (x,y)[0,1][0,1]

    maxmin(x,y)min((pq)(x), (qp)(y))/min(x, y)

    (p

    q) = min(0.8,0.7)/min(0.9,0.7) + min(0.8,1)/min(0.9,0.8) +

    min(0.8,0.9)/min(0.9,0.9) + min(0.8,0.8)/min(0.9,1) + min(1,0.7)/min(1,0.7)+ min(1,1)/min(1,0.8) + min(1,0.9)/min(1,0.9) + min(1,0.8)/min(1,1)

    (p q) = 0.7/0.7 + 0.8/0.8 + 0.8/0.9 + 0.8/1 + 0.7/0.7 + 1/0.8 +0.9/0.9 + 0.8/1

    (p q) = 0.7/0.7 + max(0.8,1)/0.8 + max(0.8,0.9)/0.9 + 0.8/1

    (p q) = 0.7/0.7 + 1/0.8 + 0.9/0.9 + 0.8/1

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    38/72

    26 Chapter 3. Fuzzy Logic

    3.5 Baldwin Approach to Fuzzy Truth Values

    It was too much difficult to define fuzzy subsets for different linguistic truth valuesand perform all the operations as we discussed in previous section. So Baldwintried to formalize all these fuzzy truth values and found a very convenient wayof describing them [7].

    p-any statement (proposition)(p)-linguistic truth value as fuzzy set

    Let us consider

    (p) = true

    with the membership functiontrue(v) = v

    Then according to Baldwin

    false(v) = 1-v

    verytrue(v) = (true(v))2 = v2

    veryfalse(v) = (false(v))2 = (1 v)2

    rathertrue(v) = (

    true(v)) =v

    ratherfalse(v) = (

    false(v)) =

    1 v

    absolutelytrue(v) =

    1 v= 10 v[0, 1)

    absolutelyfalse(v) =

    1 v= 00 v(0, 1]

    undefined

    (v) = 1 v[0, 1]

    3.5.1 Fuzzy Truth Value Sets in Baldwin Approach

    In Baldwin approach a fuzzy truth value set true used as a base set is given bythe line y = x

    True = 0.0/0 + 0.1/0.1 + 0.2/0.2 + 0.3/0.3 + 0.4/0.4 + 0.5/0.5 +0.6/0.6 + 0.7/0.7+ 0.8/0.8 + 0.9/0.9 + 1/1

    Then according to above formulas

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    39/72

    Chapter 3. Fuzzy Logic 27

    false = (1-0.0)/0 + (1-0.1)/0.1 + (1-0.2)/0.2 + (1-0.3)/0.3 + (1-0.4)/0.4 + (1-0.5)/0.5 + (1-0.6)/0.6 + (1-0.7)/0.7+ (1-0.8)/0.8 +

    (1-0.9)/0.9 + (1-1)/1false = 1.0/0 + 0.9/0.1 + 0.8/0.2 + 0.7/0.3 + 0.6/0.4 + 0.5/0.5 +

    0.4/0.6 + 0.3/0.7+ 0.2/0.8 + 0.1/0.9 + 0/1

    very true = 0.02/0 + 0.12/0.1 + 0.22/0.2 + 0.32/0.3 + 0.42/0.4 +0.52/0.5 + 0.62/0.6 + 0.72/0.7 + 0.82/0.8 + 0.92/0.9 + 12/1

    very true = 0.0/0 + 0.01/0.1 + 0.04/0.2 + 0.09/0.3 + 0.16/0.4 +0.25/0.5 + 0.36/0.6 + 0.49/0.7+ 0.64/0.8 + 0.81/0.9 + 1/1

    very false = 1.02/0 + 0.92/0.1 + 0.82/0.2 + 0.72/0.3 + 0.62/0.4 +0.52/0.5 + 0.42/0.6 + 0.32/0.7 + 0.22/0.8 + 0.12/0.9 + 02/1

    very false = 1.0/0 + 0.81/0.1 + 0.64/0.2 + 0.49/0.3 + 0.36/0.4 +0.25/0.5 + 0.16/0.6 + 0.09/0.7+ 0.04/0.8 + 0.01/0.9 + 0/1

    rather true =

    (0.0)/0.0+

    (0.1)/0.1+

    (0.2)/0.2+

    (0.3)/0.3+(0.4)/0.4+

    (0.5)/0.5+

    (0.6)/0.6+

    (0.7)/0.7+

    (0.8)/0.8+

    (0.9)/0.9 +

    (1)/1rather true = 0/0 + 0.32/0.1 + 0.45/0.2 + 0.55/0.3 + 0.63/0.4 +

    0.71/0.5 + 0.78/0.6 + 0.84/0.7 + 0.89/0.8 + 0.95/0.9 + 1/1

    rather false = (1)/0 + (0.9)/0.1 + (0.8)/0.2 + (0.7)/0.3 +(0.6)/0.4+

    (0.5)/0.5+

    (0.4)/0.6+

    (0.3)/0.7+

    (0.2)/0.8+

    (0.1)/0.9 +

    (0)/1rather false = 1/0 + 0.95/0.1 + 0.89/0.2 + 0.84/0.3 + 0.78/0.4 +

    0.71/0.5 + 0.63/0.6 + 0.55/0.7 + 0.45/0.8 + 0.32/0.9 + 0/1

    Absolute true has the value 1 for 1 and absolute false has the value 1 for 0. Theyare not fuzzy sets.

    3.5.2 Negations in Baldwin Approach

    Negations of fuzzy truth values set according to Baldwin approach are given by

    (p) Negation(p) (p)true false 1-true(v) = 1-v

    very true rather false 1-verytrue(v)= 1-(true(v))

    2

    = 1-v2

    rather true very false 1-rathertrue(v)1-rathertrue(v)

    1-

    true

    (v)

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    40/72

    28 Chapter 3. Fuzzy Logic

    3.5.3 Graphical Baldwin Approach to Fuzzy Truth Values

    Baldwin combined all the fuzzy truth values in a single graph plot shown below

    Figure 3.2: Baldwin approach to fuzzy truth values

    3.6 Linguistic Approximation

    Due to some complication in linguistic truth-value fuzzy sets, we use linguisticapproximations [8].As we know thatp is a fuzzy statement with fuzzy truth value which can be written as

    p= {(x, p(x))}, xX with truth value

    = {(v, (v))}, vV Here we have

    (u = p) =

    after linguistic approximation

    (u = q) = it is that p

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    41/72

    Chapter 3. Fuzzy Logic 29

    3.6.1 Example of Linguistic Approximation

    Let us consider the universe X of speed with standard units, i.e, miles/hourX ={10, 20, 30, 40, 50, 60}

    Let us consider the proposition p as

    p = leopard runs fastp = 0.4/10 + 0.6/20 + 0.7/30 + 0.8/40 + 0.9/50 + 1/60

    with truth-value set

    (p) = quite true

    (p) = 0.7/0.6 + 0.8/0.7 + 1/0.8 + 0.9/0.9 + 0.8/1

    we can combine p and (p) in the following sentence

    Q = It is quite true that leopard runs fast

    given by

    Q= {(x, Q(x))}where

    Q(x) =(p(x))

    So we get

    Q= 0/10 + 0.7/20 + 0.8/30 + 1/40 + 0.9/50 + 0.8/60

    3.7 Modus Ponens Law with Fuzzy truth-values

    Modus ponens law is formulated as an IF...THEN rule and was applied to classical

    two valued logic. This law is given by

    IF pqAND pTHEN q

    or in other form

    (p (p q)) qwhich is a tautology

    i.e. ((p (p q)) q) = true

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    42/72

    30 Chapter 3. Fuzzy Logic

    Here we will discuss this law for fuzzy truth values rather than classical.We will follow the following table to prove this tautology, i.e, all values in last

    column must be true.

    (p) (q) (p q) (p (p q)) ((p (p q)) q)true truetrue falsefalse truefalse false

    Let true and false be given by

    true = 0.6/0.8 + 0.9/0.9 + 1/1false = 1/0 + 0.8/0.1 + 0.6/0.2

    1) First take fuzzy truth-values for two propositions p and q

    (p) = true(q) = true

    (p q) =

    (x,y)[0,1][0,1]

    maxmin(1,1x+y)min((p)(x), (q)(y))/min(1, 1 x+y)

    (p q) = min(0.6,0.6)/min(1,1) + min(0.6,0.9)/min(1,1.1) + min(0.6,1)/min(1,1.2)+ min(0.9,0.6)/min(1,0.9) + min(0.9,0.9)/min(1,1) + min(0.9,1)/min(1,1.1)+ min(1,0.6)/min(1,0.8) + min(1,0.9)/min(1,0.9) + min(1,1)/min(1,1)

    (p q) = 0.6/1 + 0.6/1 + 0.6/1 + 0.6/0.9 + 0.9/1 + 0.9/1 +0.6/0.8 + 0.9/0.9 + 1/1

    (p q) = max(0.6,0.9,1)/1 + max(0.6,0.9)/0.9 + 0.6/0.8

    (p q) = 0.6/0.8 + 0.9/0.9 + 1/1

    Now

    (p (p q)) =

    (x,y)[0,1][0,1]

    maxmin(x,y)min((p)(x), (pq)(y))

    (p(p q)) = min(0.6,0.6)/min(0.8,0.8) + min(0.6,0.9)/min(0.8,0.9)+ min(0.6,1)/min(0.8,1) + min(0.9,0.6)/min(0.9,0.8) + min(0.9,0.9)/min(0.9,0.9)+ min(0.9,1)/min(0.9,1) + min(1,0.6)/min(1,0.8) + min(1,0.9)/min(1,0.9)+ min(1,1)/min(1,1)

    (p (pq))= 0.6/0.8 + 0.6/0.8 + 0.6/0.8 + 0.6/0.8 + 0.9/0.9 +0.9/0.9 + 0.6/0.8 + 0.9/0.9 + 1/1

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    43/72

    Chapter 3. Fuzzy Logic 31

    (p (p q))= 0.6/0.8 + 0.9/0.9 + 1/1

    (p (p q))= true = (p)Finally

    ((p (p q)) q) =(p q)

    ((p (p q)) q) = 0.6/0.8 + 0.9/0.9 + 1/1((p (p q)) q) = true

    Similarly, we can prove for both false truth-valuesi.e.

    (p) = false(q) = false

    2) If we take

    true = 0.6/0.8 + 0.9/0.9 + 1/1false = 1/0 + 0.8/0.1 + 0.6/0.2

    Then

    (p q) = (x,y)[0,1][0,1]

    maxmin(1,1x+y)min((p)(x), (q)(y))/min(1, 1 x+y)

    (p q) = min(0.6,1)/min(1,0.2) + min(0.6,0.8)/min(1,0.3) + min(0.6,0.6)/min(1,0.4)+ min(0.9,1)/min(1,0.1) + min(0.9,0.8)/min(1,0.2) + min(0.9,0.6)/min(1,0.3)+ min(1,1)/min(1,0) + min(1,0.8)/min(1,0.1) + min(1,0.6)/min(1,0.2)

    (p q) = 0.6/0.2 + 0.6/0.3 + 0.6/0.4 + 0.9/0.1 + 0.8/0.2 + 0.6/0.3+ 1/0 + 0.8/0.1 + 0.6/0.2

    (p

    q) = 1/0 + max(0.8,0.9)/0.1 + max(0.6,0.8)/0.2 + 0.6/0.3 +

    0.6/0.4

    (p q) = 1/0 + 0.9/0.1 + 0.8/0.2 + 0.6/0.3 + 0.6/0.4

    (p q) = false

    Now

    (p (p q)) =

    (x,y)[0,1][0,1]

    maxmin(x,y)min((p)(x), (pq)(y))

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    44/72

    32 Chapter 3. Fuzzy Logic

    (p(p q)) = min(0.6,1)/min(0.8,0) + min(0.6,0.9)/min(0.8,0.1) +min(0.6,0.8)/min(0.8,0.2) + min(0.6,0.6)/min(0.8,0.3) + min(0.6,0.6)/min(0.8,0.4)

    + min(0.9,1)/min(0.9,0) + min(0.9,0.9)/min(0.9,0.1) + min(0.9,0.8)/min(0.9,0.2)+ min(0.9,0.6)/min(0.9,0.3) + min(0.9,0.6)/min(0.9,0.4) + min(1,1)/min(1,0)+ min(1,0.9)/min(1,0.1) + min(1,0.8)/min(1,0.2) + min(1,0.6)/min(1,0.3)+ min(1,0.6)/min(1,0.4)

    (p (p q)) = 0.6/0 + 0.6/0.1 + 0.6/0.2 + 0.6/0.3 + 0.6/0.4 +0.9/0 + 0.9/0.1 + 0.8/0.2 + 0.6/0.3 + 0.6/0.4 + 1/0 + 0.9/0.1 +0.8/0.2 + 0.6/0.3 + 0.6/0.4

    (p(p q)) = max(0.6,0.9,1)/0 + max(0.6,0.9)/0.1 + max(0.6,0.8)/0.2+ 0.6/0.3 + 0.6/0.4

    (p (p q)) = 1/0 + 0.9/0.1 + 0.8/0.2 + 0.6/0.3 + 0.6/0.4

    (p (p q)) = false

    Finally

    ((p(p q)) q) =

    (x,y)[0,1][0,1]

    maxmin(1,1x+y)min((p(pq))(x), (q)(y))/min(1, 1x+y)

    ((p

    (p

    q))

    q) = min(1,1)/min(1,1) + min(1,0.8)/min(1,1.1) +

    min(1,0.6)/min(1,1.2) + min(0.9,1)/min(1,0.9) + min(0.9,0.8)/min(1,1)+ min(0.9,0.6)/min(1,1.1) + min(0.8,1)/min(1,0.8) + min(0.8,0.8)/min(1,0.9)+ min(0.8,0.6)/min(1,1) + min(0.6,1)/min(1,0.7) + min(0.6,0.8)/min(1,0.8)+ min(0.6,0.6)/min(1,0.9) + min(0.6,1)/min(1,0.6) + min(0.6,0.8)/min(1,0.7)+ min(0.6,0.6)/min(1,0.8)

    ((p (p q)) q) = 1/1 + 0.8/1 + 0.6/1 + 0.9/0.9 + 0.8/1 +0.6/1 + 0.8/0.8 + 0.8/0.9 + 0.6/1 + 0.6/0.7 + 0.6/0.8 + 0.6/0.9+ 0.6/0.6 + 0.6/0.7 + 0.6/0.8

    ((p (p q)) q) = max(1,0.8,0.6)/1 + max(0.9,0.8,0.6)/0.9 +max(0.8,0.6,)/0.8 + 0.6/0.7

    ((p (p q)) q) = 1/1 + 0.9/0.9 + 0.8/0.8 + 0.6/0.7

    ((p (p q)) q) = true

    Similarly, we can prove for (p)=false and (q)=true

    So we can concluded the following final result for fuzzy linguistic truth-values

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    45/72

    Chapter 3. Fuzzy Logic 33

    (p) (q) (p q) (p (p q)) ((p (p q)) q)true true true true true

    true false false false truefalse true true false truefalse false true false true

    Hence proved that((p (p q)) q) is a tautology for fuzzy truth values also.

    Let us check this law for other fuzzy truth values.

    For example:

    (p) = Little True = 1/0.3 + 0.9/0.4 + 0.8/0.5

    (q) = Very False = 1/0 + 1/0.1 + 0.9/0.2

    (p q) =

    (x,y)[0,1][0,1]

    maxmin(1,1x+y)min((p)(x), (q)(y))/min(1, 1 x+y)

    (p q) = min(1,1)/min(1,0.7) + min(1,1)/min(1,0.8) + min(1,0.9)/min(1,0.9)+ min(0.9,1)/min(1,0.6) + min(0.9,1)/min(1,0.7) + min(0.9,0.9)/min(1,0.8)+ min(0.8,1)/min(1,0.5) + min(0.8,1)/min(1,0.6) + min(0.8,0.9)/min(1,0.7)

    (p q) = 1/0.7 + 1/0.8 + 0.9/0.9 + 0.9/0.6 + 0.9/0.7 + 0.9/0.8 +0.8/0.5 + 0.8/0.6 + 0.8/0.7

    (p q) = max(0.9,0.8)/0.6 + max(1,0.9,0.8)/0.7 + max(1,0.9)/0.8+ 0.9/0.9

    (p q) = 0.9/0.6 + 1/0.7 + 1/0.8 + 0.9/0.9

    Now

    (p

    (p

    q)) = (x,y)[0,1][0,1]

    maxmin(x,y)min((p)(x), (pq)(y))

    (p (p q)) = min(1,0.9)/min(0.3,0.6) + min(1,1)/min(0.3,0.7) +min(1,1)/min(0.3,0.8) + min(1,0.9)/min(0.3,0.9) + min(0.9,0.9)/min(0.4,0.6)+ min(0.9,1)/min(0.4,0.7) + min(0.9,1)/min(0.4,0.8) + min(0.9,0.9)/min(0.4,0.9)+ min(0.8,0.9)/min(0.5,0.6) + min(0.8,1)/min(0.5,0.7) + min(0.8,1)/min(0.5,0.8)+ min(0.8,0.9)/min(0.5,0.9)

    (p(p q))= 0.9/0.3 + 1/0.3 + 1/0.3 + 0.9/0.3 + 0.9/0.4 + 0.9/0.4+ 0.9/0.4 + 0.9/0.4 + 0.8/0.5 + 0.8/0.5 + 0.8/0.5 + 0.8/0.5

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    46/72

    34 Chapter 3. Fuzzy Logic

    (p (p q))= max(0.9,1)/0.3 + 0.9/0.4 + 0.8/0.5

    (p (p q))= 1/0.3 + 0.9/0.4 + 0.8/0.5 = (p)(p (p q))= (p)

    Finally

    ((p (p q)) q) =(p q)

    ((p (p q)) q) = 0.9/0.6 + 1/0.7 + 1/0.8 + 0.9/0.9

    ((p (p q)) q) = rather true

    So Modus ponens law for fuzzy truth value expressions lead to the increasingtruthfulness.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    47/72

    Chapter 4

    Approximate Reasoning

    We have discussed fuzzy logic in previous chapter. The idea of linguistic fuzzymodels imitating the human way of thinking was proposed by Zadeh in his pio-neering work [3].

    The term Approximate reasoning refers to methods and methodolo-gies that enable reasoning with imprecise inputs to obtain meaningfuloutputs.

    Inference in approximate reasoning is in sharp contrast to inference in classicallogic. Inference in approximate reasoning is computation [1] with fuzzy sets thatrepresents the meaning of a certain set of fuzzy propositions. One of the bestknown application areas of fuzzy logic is approximate reasoning. Approximatereasoning with fuzzy sets encompasses a wide variety of inference schemes andhave been readily applied in many fields like decision making, expert systems andfuzzy control. We can optimize the approximate judgment with the help of sys-tem of relational assignment equations based on fuzzy logic in more generalizedform.

    Since fuzzy logic handle approximate information in a very systematic way, it isperfect for controlling nonlinear systems and also for modeling complex systems

    where an inexact model exists or systems where vagueness is common. A typicalfuzzy system consists of a fuzzy rule base, membership functions and an inference.

    Fuzzy logic with approximate reasoning describes relations by if-then rules, suchas, if heating valve is close then temperature is low. The uncertainity in thelinguistic terms (e.g. low temperature) is represented by fuzzy sets.

    Each linguistic fuzzy set in this case shows the temperature range from its oneextreme to the other.

    The smooth outcome of reasoning with fuzzy sets is a kind of interpolation.

    35

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    48/72

    36 Chapter 4. Approximate Reasoning

    Figure 4.1: Fuzzy sets of temperature domain

    4.1 Classical IF-THEN Rule

    If-then rule in classical reasoning is given as

    If antecedent proposition Then consequent proposition.

    Both propositions in this case are classical two valued.

    4.1.1 Example of Classical IF-THEN Rule

    If it is raining thentake the Umbrella

    Now if we know that it is raining, i.e, A is true then we deduce that B is true,i.e, we need to take the umbrella.

    4.2 Fuzzy IF-THEN Rule

    In fuzzy system the antecedent and consequent propositions are fuzzy sets withlinguistic labels.

    The linguistic model with fuzzy sets has been introduced to capture qualitativeknowledge in the form of if-then rule [9].

    If x is Ai Then y isBi, i = 1,2,...,k

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    49/72

    Chapter 4. Approximate Reasoning 37

    where

    x is a linguistic antecedent variableAi are antecedent linguistic labels.

    Similarly

    y is a consequent linguistic variable.Bi are consequent linguistic terms.

    The linguistic terms Ai(Bi) are fuzzy sets.

    4.2.1 Example of Linguistic Fuzzy sets

    This example shows a linguistic variable pressure with three linguistic terms

    high, medium, low. Pressure is in appropriate physical units.

    Figure 4.2: Linguistic fuzzy sets

    4.3 Models for Approximations

    1. Linguistic Fuzzy Model

    In this type of the model both antecedent and consequent are fuzzy propo-sitions.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    50/72

    38 Chapter 4. Approximate Reasoning

    2. Fuzzy Relational Model

    This model is a generalization of the linguistic model in which particu-lar antecedent propositions are associated with several different consequentpropositions through a fuzzy relation [10].

    4.4 Schematic Procedure

    Complicated propositions are difficult to approximate so in approximate reason-ing we use the following scheme.

    A: (u = p)(v = q)B: u = pC: v = ?

    So we have the implication(A) pq as if u is p then v is q(B) and u = p(C) what should be the answer?

    We approximate the conclusion v using implication rule and generalized modusponens. Example

    A: (u=weather is cold)

    (v=Dress warmly)B: u=weather is quite chillyC: v=?

    Here we apply fuzzy rule of inference to find the approximate conclusion v. Con-clusion could be of the form Dress rather warmly.

    4.5 Basic Rules of Inference

    The basic rule of inference is a traditional two valued logical reasoning and itis called Modus Ponens. If we have the implication p

    q of two statements

    p and q in accordance with the present, then we can infer [11] the truth ofstatements based on the q which authenticity p and the implication pq

    So we conclude the following scheme.

    If pqand pThen q

    we can also write in this form

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    51/72

    Chapter 4. Approximate Reasoning 39

    v((p(pq)) q) = true

    4.5.1 Example of Modus Ponens

    Let the sentences p and q are given by

    p = John is in Hospitalq = John is ill

    Now if this is true that John is in hospital then the statement John is ill is alsotrue.

    Similarly the second important rule of inference is modus tollens. It can beshown by the following scheme.

    If pqand qThen p

    we can also write in this form

    ((q (p q)) p) = true

    4.5.2 Example of Modus Tollens

    We can explain the same example here also.

    p = John is ill.q = John is in hospital.

    Now the negation on q is given by

    q= John is not in hospital

    Then we conclude according to modus tollens that

    p= John is not ill

    These are the cases where reasoning is exact (two valued logic) but now we extendthese rules to the case of fuzzy propositions, because in nature human reasoningis approximate rather than exact. We most often deal with situations where thestatements p and q are characterized (in the semantic sense) by some fuzzysets.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    52/72

    40 Chapter 4. Approximate Reasoning

    4.6 Generalized Modus Ponens or Fuzzy Rule

    of InferenceLet us consider X and Y as two Universal crisp sets.

    Let P, Q, S be fuzzy sets created on the basis of fuzzy statements p, q and srespectively with elements from universe X and Y.These fuzzy sets can be written as

    P = (x, iP(x))Q = (y, jQ(y))S = (y, jS(x))

    where

    P X, QY , SYand P X, Q Y

    P and Q are fuzzy sets correspond to general statements andP andQ are similarto P and Q but not necessarily equal to them respectively [7]. Thus the schemeof inference is given as

    If p = P then q = Q Else s = SAnd p = P

    Then q =Q

    whereQ = P (P Q)

    We can also write this rule in these forms

    If p = P(q = Q or s = S)And p = P

    Then q =Q = P (P (QorS))or

    If p =P

    And p = P(q = Q or s = S)Then q =Q = P (P (QorS))where

    P(Q or S) = If p = P then q = Q Else s = Sand P Xand PQXY

    If P then Q Else S is equivalent to a fuzzy relation R XY, where the variouspossible definitions of the fuzzy relations R are given by the following rules.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    53/72

    Chapter 4. Approximate Reasoning 41

    4.7 Rules of Finding Fuzzy Relation R

    There are different approaches to find out the implication fuzzy relation R.

    4.7.1 Rule of max-min

    This rule is given by

    Rmm= (P Q) (P S)with the membership degrees function

    Rmm(x, y) = (P(x)

    Q(y))

    ((1

    P(x))

    S(y))

    It is a term most often used.

    4.7.2 Binary Rule

    Fuzzy relation R in the binary rule is given by

    Rb= (P Q) (P S)

    with membership function

    Rb(x, y) = ((1 P(x)) Q(y)) (P(x) S(y))

    4.7.3 Lukasiewicz Rule

    Fuzzy relation R is given by

    RL= (P Q) (P S)

    with membership degree function

    RL(x, y) = 1

    (1

    P(x) +Q(y))

    (P(x) +S(y))

    4.7.4 Min-Rule

    In this case fuzzy relation R is given by

    Rm= P Q= P Q

    with membership degree fucntion

    Rm(x, y) =P(x) Q(y)

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    54/72

    42 Chapter 4. Approximate Reasoning

    4.7.5 Example of Finding Fuzzy Relation R

    Let us take volume and mass in standard units, i.e, m

    3

    and kg respectively givenby crisp sets

    X = volume ={10, 15, 20, 25}Y = mass ={40, 60, 80, 100}

    Fuzzy conditional sentence may be as follows

    If(x is small enough) Then(y is rather heavy) Else(y is rather light)

    P = x is small enough = 1/10, 0.9/15, 0.5/20, 0.1/25

    Q = y is rather heavy = 0.3/40, 0.6/60, 0.8/80, 1/100

    S = y is rather light = 1/40, 0.7/60, 0.5/80, 0.2/100

    We now perform the operations discussed above to find R by using

    1) Max-min Rule

    40 60 80 10010 0.9 0.7 0.5 0.215 0.5 0.5 0.5 0.5

    20 0.3 0.6 0.8 0.925 0.3 0.6 0.8 1.0

    2) Binary Rule

    40 60 80 10010 0.9 0.7 0.5 0.215 0.5 0.6 0.5 0.520 0.3 0.6 0.8 0.925 0.3 0.6 0.8 1.0

    3) Lukasiewicz Rule

    40 60 80 10010 1.0 0.8 0.6 0.315 0.8 1.0 1.0 0.720 0.4 0.7 0.9 1.025 0.3 0.6 0.8 1.0

    For any fuzzy propositions P X, QY , SY, we have

    Rmm Rb RL

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    55/72

    Chapter 4. Approximate Reasoning 43

    i.e.

    Rmm(x, y) Rb(x, y) RL(x, y)4.7.6 Example of Fuzzy Modus Ponens

    Let us consider two factors Area and Amount of energy with standard phys-ical units, (i.e, m2 and joule (J) respectively) given by crisp sets

    X = Area ={5, 20, 30}Y = Amount of stored energy ={100, 200, 300}

    Now the general statement PX is defined asP = subject is rather big = 0.3/5 + 1/20 + 0.8/30

    The particular statement P which is similar but not equal to P is given by

    P = Solar panel is big = 0.2/5 + 0.9/20 + 1/30

    General conclusion statements are

    Q = Energy production is quite high = 0.4/100 + 0.7/200 + 1/500S = Energy production is quite low = 1/100 + 0.6/200 + 0.2/500

    The particular conclusion statement is going to be evaluated as

    Q = Energy production in solar panel

    We have the following formula

    Q =P (P Q or S)i.e.

    IFSolar panel is big (P)

    ANDthe subject is rather big (P)IMPLIESthe energy production is quitehigh ELSE the energy production is quite low

    Now we can construct the fuzzy relation R X Y using any of the abovemethods.

    Here we are using max-min rule to find R with membership degree

    Rmm(x, y) = (P(x) Q(y)) ((1 P(x)) S(y))so

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    56/72

    44 Chapter 4. Approximate Reasoning

    R = 0.3/5,100 + 0.3/5,200 + 0.3/5,500 + 0.4/20,100 + 0.7/20,200+ 1/20,500 + 0.4/30,100 + 0.7/30,200 + 0.8/30,500 + 0.7/5,100

    + 0.6/5,200 + 0.2/5,500 + 0/20,100 + 0/20,200 + 0/20,500 +0.2/30,100 + 0.2/30,200 + 0.2/30,500

    R = 0.7/5,100 + 0.6/5,200 + 0.3/5,500 + 0.4/20,100 + 0.7/20,200 +1/20,500 + 0.4/30,100 + 0.7/30,200 + 0.8/30,500

    In matrix form

    Rmm(x, y) =

    0.7 0.6 0.30.4 0.7 1.0

    0.4 0.7 0.8

    Now if we want to obtain the final result

    i.e. Q = Energy production in solar panel

    then we have to perform the max-min operation of the composition

    Q =

    0.2 0.9 1.0 0.7 0.6 0.30.4 0.7 1.0

    0.4 0.7 0.8

    Q

    =

    0.4 0.7 0.9

    to reveal the fuzzy set

    Q = 0.4/100 + 0.7/200 + 0.9/500.

    We will choose the value with highest membership degree. In this case 500 hasthe maximum membership degree 0.9, so the approximation of energy productionin given situation is 500.

    4.7.7 Conjunction Form of the Antecedent

    Extended form of antecedent is in conjunction form [12], generally given by

    Ri: Ifp1 isAi1 and p2 isAi2 and, ..., pp is Aip Then y is Bii = 1,2,....k

    A single conjunction ofAi is the cartesian product conjunction of fuzzy sets Aijwith j = 1,2,...,p

    Ai =Ai1 Ai2 ......... Aipwith the membership function

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    57/72

    Chapter 4. Approximate Reasoning 45

    Ai(x1, x2,...,xp) =Ai1(x1) Ai2(x2) ... Aip(xp)

    wherex1X1, x2X2, ..., xpXpX1, X2,...,Xp are universes.

    Example

    Let us consider a simple antecedent with only two conjunctions statements. Firstwe define the universes

    X1 = temperature ={20, 40, 60}X

    2= pressure =

    {5, 10, 15

    }where temperature and pressure are in standard physical units, i.e, centigradeand Pascal respectively.

    Now if the antecedent is of the form

    Ifthe temperature is moderate andpressure is high

    where fuzzy sets are

    A1 = temperature is moderate = 0.3/20 + 1/40 + 0.4/60

    A2 = pressure is high = 0.1/5 + 0.6/10 + 1/15

    Now single conjunction A is given by

    A = temperature is moderate and pressure is high

    A = min(0.3,0.1)/20,5 + min(0.3,0.6)/20,10 + min(0.3,1)/20,15 +min(1,0.1)/40,5 + min(1,0.6)/40,10 + min(1,1)/40,15 + min(0.4,0.1)/60,5+ min(0.4,0.6)/60,10 + min(0.4,1)/60,15

    A = 0.1/20,5 + 0.3/20,10 + 0.3/20,15 + 0.1/40,5 + 0.6/40,10 +

    1/40,15 + 0.1/60,5 + 0.4/60,10 + 0.4/60,15

    5 10 15

    A=204060

    0.1 0.3 0.30.1 0.6 1.0

    0.1 0.4 0.4

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    58/72

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    59/72

    Chapter 5

    Approximate Reasoning in

    Chemical Reactions

    Chemical reactions occur at different rates. These reaction rates depend uponsome key factors. We use fuzzy logic and approximate reasoning in the evaluationof rates at which the chemical reaction is performed, where chemical reactionsare characterized in terms of multiple factors. The method is illustrated by usingimprecise information (conditional propositions and implications). Propositionsinvolve factors on which reactions rate depend, and consequent is the measure ofreactions rate associated with these factors.

    Some methods for the evaluation of reaction rates have appeared in recent years.Here we use approximate reasoning which cover uncertainty and imprecision char-acteristics of evaluation. Impression is non-random rather than statistical nature.We use expressions with linguistic variables as fuzzy sets in the evaluation.

    Chemical reaction some times goes out of the control which can create a seriousproblem with the risk of damage to property and injury to people. During themanufacture, raw material react together and give the product. Such exothermicreaction release energy. Some times with the change of surrounding environment,the reaction rate change and we need to be very careful while performing reac-

    tions. Using fuzzy logic and approximate reasoning, we will evaluate a reactionrate in the given environment and other sensitive conditions.

    There are two key factors on which reaction rates depend. These factors are

    1. Temperature

    2. Particle size

    Basically the reaction rate depends upon the frequency of the collisions betweenparticles. If the collision is frequent than fast will be the rate and vice versa. And

    47

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    60/72

    48 Chapter 5. Approximate Reasoning in Chemical Reactions

    frequency of collision increases with increasing temperature and particle size.

    Each chemical reaction has both maximum and minimum range of rate. Andthe variations from the boundaries can create serious problems. Below the min-imum rate, the reaction will not occur and above the maximum value it is verydangerous.

    Let us consider the values of temperature and particle sizes for a chemical re-action. The universal crisp set X1 is given by

    X1 which defines temperature states-levelsX1 ={T1, T2, T3}

    These levels cover the whole range ofX1 from minimum level T1 to maximumlevelT3.

    Another universe X2 defines particle sizesX2 ={D1, D2, D3, D4}

    These sizes are arranged in ascending order, i.e, D1 corresponds to the minimumand D4 assist maximum size.

    In universe Y, we have the different states of reaction rate. These are the possiblestates of reaction rate for above levels of temperature and particle sizes.

    In Y we define states of reaction rate asY ={F0, F1, F2, F3, F4}

    These states are also stated in ascending order because reaction rate is directlyproportional to the increasing value of temperature and particle size.

    After defining the universes, we define a general situation in chemical reaction.After performing the experiments again and again scientists found many formulaswhich show that the increasing values of temperature and particle size bring theincreasing reaction rate because they effect directly to the number of collisionsper second which then leads to the increased reaction rate. So we are going to ap-

    ply approximate reasoning of the previously discussed types to chemical reactions.

    The general invariant situation [13] is

    If temperature is high and particles size is very large, then reactionrate will be maximum.

    We convert this general statement to relation R after determining fuzzy sets forabove propositions.

    Compare the general statement with implication

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    61/72

    Chapter 5. Approximate Reasoning in Chemical Reactions 49

    If p then q

    Then we getp = temperature is high and particles size is very largeq = reaction rate is maximum

    Here the proposition p is the conjunction of two propositions. Let denote thembyp1 and p2, i.e,

    p =p1andp2 orp =p1 p2

    with

    p1 = temperature is high

    given by fuzzy set P1 as

    P1 = 0.3/T1+ 0.7/T2+ 1/T3where P1 X1

    and

    p2 = particle size is very large

    given by the fuzzy set P2 asP2 = 0/D1+ 0.2/D2+ 0.6/D3+ 1/D4where P2 X2

    and now proposition q is given by the fuzzy set Q as

    Q = 0/F0+ 0.1/F1+ 0.5/F2+ 0.8/F3+ 1/F4where QY

    Now we will find the conjunction P = P1 P2 with membership degree function

    P(Ti, Dj) =min(P1(Ti), P2(Dj))

    where i = 1,2,3and j = 1,2,3,4so

    P =P1 P2P =P(T1, D1)/(T1, D1)+P(T1, D2)/(T1, D2)+P(T1, D3)/(T1, D3)+

    P(T1, D4)/(T1, D4)+P(T2, D1)/(T2, D1)+P(T2, D2)/(T2, D2)+P(T2, D3)/(T2, D3)+P(T2, D4)/(T2, D4)+P(T3, D1)/(T3, D1)+P(T3, D2)/(T3, D2) +P(T3, D3)/(T3, D3) +P(T3, D4)/(T3, D4)

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    62/72

    50 Chapter 5. Approximate Reasoning in Chemical Reactions

    so we get

    P = 0/(T1, D1)+0.2/(T1, D2)+0.3/(T1, D3)+0.3/(T1, D4)+0/(T2, D1)+0.2/(T2, D2)+0.6/(T2, D3)+0.7/(T2, D4)+0/(T3, D1)+0.2/(T3, D2)+0.6/(T3, D3) + 1/(T3, D4)

    In tabular form

    X1 X2 P1(Ti) P2(Dj) P(Ti, Dj)T1 D1 0.3 0.0 0.0T1 D2 0.3 0.2 0.2T1 D3 0.3 0.6 0.3T1 D4 0.3 1.0 0.3

    T2 D1 0.7 0.0 0.0T2 D2 0.7 0.2 0.2T2 D3 0.7 0.6 0.6T2 D4 0.7 1.0 0.7T3 D1 1.0 0.0 0.0T3 D2 1.0 0.2 0.2T3 D3 1.0 0.6 0.6T3 D4 1.0 1.0 1.0

    Now the implication P Q is given by fuzzy relation R. We will find R usingLukasiewicz rule with membership degrees functionR[(Ti, Dj), Fk] = 1 ((1 P(Ti, Dj)) +Q(Fk)) (P(Ti, Dj) + (1 Q(Fk)))where i = 1,2,3 j = 1,2,3,4 k = 0,1,2,3,4

    So calculated R in matrix form is

    F0 F1 F2 F3 F4

    R=

    (T1, D1)(T1, D2)

    (T1, D3)(T1, D4)(T2, D1)(T2, D2)(T2, D3)(T2, D4)(T3, D1)(T3, D2)(T3, D3)(T3, D4)

    1.0 0.9 0.5 0.2 0.00.8 0.9 0.7 0.4 0.2

    0.7 0.8 0.8 0.5 0.30.7 0.8 0.8 0.5 0.31.0 0.9 0.5 0.2 0.00.8 0.9 0.7 0.4 0.20.4 0.5 0.9 0.8 0.60.3 0.4 0.8 0.9 0.71.0 0.9 0.5 0.2 0.00.8 0.9 0.7 0.4 0.20.4 0.5 0.9 0.8 0.60.0 0.1 0.5 0.8 1.0

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    63/72

    Chapter 5. Approximate Reasoning in Chemical Reactions 51

    This is the relation which actually describes the implication of general situation

    concerning a chemical reaction.

    Now we can check the reaction rate for any other values of temperature andparticle size using this relation R and extended modus ponens rule.

    Some times we use smaller size of particles according to availability. So in thatcases we should variate the temperature accordingly to sustain the reaction rateas required.So take a certain situation in this chemical reaction that we have large particlessize and moderate temperature. We denote this statement with p given by

    p = temperature is moderate and particle size is large

    This statement is again a conjunction of two propositions given by

    p =p1 p2where

    p1 = temperature is moderate

    with fuzzy set

    P

    1= 0.6/T1+ 0.9/T2+ 0.4/T3

    and

    p2 = particles size is large

    with fuzzy set

    P2= 0.1/D1+ 0.5/D2+ 1/D3+ 0.7/D4

    So P is given by the membership function given by equation 1.we get

    P = 0.1/(T1, D1)+0.5/(T1, D2)+0.6/(T1, D3)+0.6/(T1, D4)+1/(T2, D1)+0.5/(T2, D2)+0.9/(T2, D3)+0.7/(T2, D4)+1/(T3, D1)+0.4/(T3, D2)+0.4/(T3, D3) + 0.4/(T3, D4)

    Now use extended modus ponens rule to find the conclusion Q, where extendedmodus ponens is given by [3]

    If P

    and P Q (R)Then Q = PR

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    64/72

    52 Chapter 5. Approximate Reasoning in Chemical Reactions

    In our case

    If P1 P2and (P1 P2) QThen Q = (P1 P2) ((P1 P2) Q)

    Now membership degree function in max-min operation P Ris given byQ(Fk) =maxmin(P(Ti, Dj), R((Ti, Dj), Fk))

    so

    Q =

    0.1 0.5 0.6 0.6 0.1 0.5 0.9 0.7 0.1 0.4 0.4 0.4

    1.0 0.9 0.5 0.2 0.00.8 0.9 0.7 0.4 0.20.7 0.8 0.8 0.5 0.30.7 0.8 0.8 0.5 0.31.0 0.9 0.5 0.2 0.00.8 0.9 0.7 0.4 0.20.4 0.5 0.9 0.8 0.60.3 0.4 0.8 0.9 0.71.0 0.9 0.5 0.2 0.00.8 0.9 0.7 0.4 0.2

    0.4 0.5 0.9 0.8 0.60.0 0.1 0.5 0.8 1.0

    Q = [0.6 0.6 0.9 0.8 0.7]

    so in fuzzy set form

    Q = 0.6/F0+ 0.6/F1+ 0.9/F2+ 0.8/F3+ 0.7/F4

    Finally we choose the value of reaction rate with maximum membership degreei.e, F2 with 0.9.

    This shows that the reaction rate has the value around F2.

    This method can be applied to several chemical reactions in which variationin temperature and particles size can create serious problems. So by using thismethod one can find the approximate value of reaction rate.

    This is our idea towards the approximation of reaction rate with only two factorsand small number of levels. We can also extend this idea for more factors andlevels. It can be done by connecting the factors with AND and OR operations.i.e. If P1 = u and P2 = v or P3 = w then Q = z

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    65/72

    Chapter 6

    News

    Fuzzy logic was first proposed by Lotfi A. Zadeh of the University of Californiaat Berkeley United States in a 1965. He elaborated on his ideas in a 1973 paperthat introduced the concept of linguistic variables. Hence it should be possible toimprove the performance of electromechanical controllers by modeling the way ofhandling this type of information. The theory developed slowly at first, but bythe early 1970s it had attracted a small international group of scientists. Thisincluded a number of westerners, mostly mathematicians, and a small number ofJapanese engineers.

    Fuzzy logic has been implemented in many applications including household ap-pliance, consumer-electronic goods, transit systems, automobiles, and industrialprocesses. Many consumer products using fuzzy technology are currently avail-able in Japan, and some are now being marketed in the US and Europe. Otherapplications that have been reported include image analysis incorporating varioushuman inputs, as in theories and research in it [14].

    Although US was the first to introduce fuzzy Logic in different areas of practicalapplications but it is Japan where a leadership was taken in widely implementingthe associated technology in the fields mentioned above. They use this approachin problems that involve knowledge-based decision making. So we can say that

    Japan benefited the global community, industry, academia, and various profes-sions. Approximation is viewed as a capability of an intelligent system. Fuzzylogic is considered as one such approach of approximate reasoning Nikkei Indus-trial News in Japan reported in October 1987 that Toshiba Co. had developed afuzzy logic system for controlling machinery, with the intention of applying it inindustrial products, traffic control, and nuclear energy.

    Embedded systems play an important role in our daily life. They have gainedimportance for productivity and comfort. Industrial control systems, medicalinstruments, transportation vehicles [15], bank machines, washing machines, vac-

    53

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    66/72

    54 Chapter 6. News

    uum cleaners and many other machines now depend on embedded systems. Itappears as if our current civilization is built around embedded systems. Increased

    market demands require embedded systems to be developed even more rapidlythan before. Fuzzy Logic and neural approaches can provide a mechanism ofmaking them more efficient.

    Development of the EMERGE system was begun in 1980. Since that time,EMERGE has undergone a number of transformations. Originally, it was aknowledge-based system utilizing an extended form of production rules that al-lowed disjunctions, conjunctions, and counts EMERGE has been modified to useapproximate reasoning techniques instead of Boolean logic. Computer-assistedmedical decision support systems have been shown to be useful in a number of

    medical applications. One of the important theoretical advances in these systemshas been the incorporation of methods for dealing with uncertain and impreciseinformation. Many techniques including fuzzy logic, belief networks, Bayesiansystems, and approximate reasoning are being implemented in the surgical deci-sions.

    6.1 Latest News

    For the first time that scientists have applied fuzzy logic modeling to the fieldof aging. The process of aging disturbs a broad range of cellular mechanismsin a complex fashion and is not well understood. Cellular biodynamics in agingis a complex control system. Scientists have found a new approach to evaluatea persons risk of cardiovascular disease, stroke, high blood pressure, or heartfailure.

    Signal scattering will always be only approximations to the (time-varying) truesituations. Consequently, the interpretation of the processing results is difficultand relies usually on some kind of human knowledge. Fuzzy logic has helpedovercome similar decision-making difficulties in other disciplines, most notably insystems control like GPS.

    The technique uses fuzzy logic to teach a neural network computer programto analyze patient data and spot correlations that can be translated into a riskfactor for an individual.

    Fuzzy logic based electronic control systems such as automatic transmissions,engine control and Anti-lock Brake Systems (ABS) is being used now in the au-tomotive industry. Intel Corporation is the leading supplier of microcontrollersfor ABS and enjoys a technology agreement with Inform Software Corporationthe leading supplier of Fuzzy Logic tools and systems.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    67/72

    Chapter 6. News 55

    The new system is one of the first to apply fuzzy logic to audio, assigning rules

    to sound wave data and providing a processor with instructions so that it canprioritize information. Software Called MultEQ developed by Chris Kyriakakisis based upon fuzzy logic.

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    68/72

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    69/72

    Chapter 7

    Conclusion

    Multi-valued logic is strictly related with fuzzy set theory and fuzzy logic. Anapproach to approximate reasoning in chemical reactions based upon fuzzy logichas been described in this thesis. The method is very simple and efficient basedupon extended modus ponens which allows to take multiple compound statementsusing AND and OR operations. But we have not considered many intersectionsas well as significant issues. It can be applied to different chemical, fission andfusion reactions including more intersections and unions of antecedent proportionsto get better result. Applications of the method can be made to such areas aspattern recognition, medical diagnosis, Artificial Intelligence and fuzzy control.The importance of such a concept would seem to be important and much research

    is needed in the future.

    57

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    70/72

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    71/72

    Bibliography

    [1] S. W.H.,Logic an introductory course., Amsterdam:North- Holland, 1983.

    [2] R. N., A survery of many-valued logic, inMany-valued logic, Mar. 1969.

    [3] Z. L.A., Fuzzy logic and approximate reasoning. University of CaliforniaBerkeley, 1975.

    [4] H. J.Zimmermann,Fuzzy Set Theory and its Applications, 4th ed. london:Kluwer Academic, 1976.

    [5] M. P.N., Fuzzy logic tech memo 66-3344-1. Bell telephone lab USA, 1969.

    [6] G. J. and M. Gupta., Fuzzy sets and the social nature of truth, inAdvancesin fuzzy set theory and applications., Amsterdam North Holland, 1979.

    [7] B. J.F., A new approach to approximate reasoning using a fuzzy logic.vol. 2, 1979., pp. 309325.

    [8] K. G.J, Some issues of linguistic approximation, vol. 1, IEEE conference,2004.

    [9] Y. R.R, Linguistic models and fuzzy truths int. j, inMan Machine studies,vol. 10, 1978, pp. 483494.

    [10] G. J. K. B. Yuan., selected papers of lofti a. zadeh, in Fuzzy sets, fuzzylogic and fuzzy systems, World scientific publishing, 1996.

    [11] D. Schwartz and G. L. Klir, Applications of fuzzy sets and approximatereasoning, in IEEE conference, 1994.

    [12] M. Mas. and T. .J., A survey on fuzzy implication functions, IEEE Journal,2007.

    [13] C. . de Silva, Application of fuzzy logic and approximate reasoning in pro-cess automation, in IEEE conference, 1997.

    [14] chau and shun, Forecasting exchange rates with fuzzy logic and approximatereasoning, in IEEE conference, 2000.

    59

  • 8/13/2019 Fuzzy Logic and Approximate Reasoning

    72/72

    60 Bibliography