Introduction to fuzzy logic

Similar documents
It rains now. (true) The followings are not propositions.

Propositional Logic Not Enough

Fuzzy Sets and Systems. Lecture 4 (Fuzzy Logic) Bu- Ali Sina University Computer Engineering Dep. Spring 2010

So, we can say that fuzzy proposition is a statement p which acquires a fuzzy truth value T(p) ranges from(0 to1).

Artificial Intelligence Knowledge Representation I

cis32-ai lecture # 18 mon-3-apr-2006

Logic. Propositional Logic: Syntax

Where are we? Operations on fuzzy sets (cont.) Fuzzy Logic. Motivation. Crisp and fuzzy sets. Examples

Reasoning. Inference. Knowledge Representation 4/6/2018. User

Logic and Proofs. (A brief summary)

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Propositional Logic: Review

Logic Overview, I. and T T T T F F F T F F F F

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Introduction to Sets and Logic (MATH 1190)

MAI0203 Lecture 7: Inference and Predicate Calculus

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

Propositional Logic: Syntax

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Introduction to fuzzy sets

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Logic. Propositional Logic: Syntax. Wffs

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

Artificial Intelligence. Propositional logic

THE LOGIC OF COMPOUND STATEMENTS

III. Elementary Logic

CHAPTER 11. Introduction to Intuitionistic Logic

Logic Background (1A) Young W. Lim 12/14/15

(Refer Slide Time: 02:20)

OGIC 2.1 Propositional Calculus

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

MAT 243 Test 1 SOLUTIONS, FORM A

A statement is a sentence that is definitely either true or false but not both.

Propositional logic. First order logic. Alexander Clark. Autumn 2014

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

Logic and Proof. On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes!

Logic, Sets, and Proofs

Resolution (14A) Young W. Lim 8/15/14

Truth-Functional Logic

A Little Deductive Logic

On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes! 26-Aug-2011 MA

Logic and Proofs. (A brief summary)

15414/614 Optional Lecture 1: Propositional Logic

Logic: The Big Picture

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Advanced Topics in LP and FP

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

First Order Logic (1A) Young W. Lim 11/5/13

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17

Steinhardt School of Culture, Education, and Human Development Department of Teaching and Learning. Mathematical Proof and Proving (MPP)

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

02 Propositional Logic

Announcements CompSci 102 Discrete Math for Computer Science

A Little Deductive Logic

CSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

Propositional Logic: Part II - Syntax & Proofs 0-0

Logic (3A) Young W. Lim 11/2/13

Mat 243 Exam 1 Review

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Logical Structures in Natural Language: First order Logic (FoL)

Logic (3A) Young W. Lim 10/31/13

22c:145 Artificial Intelligence

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

PROPOSITIONAL CALCULUS

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Propositional Logic: Logical Agents (Part I)


CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Introduction to Metalogic

Part I: Propositional Calculus

Logic and Proof. Aiichiro Nakano

Chapter 1 Elementary Logic

First Order Logic (1A) Young W. Lim 11/18/13

Rules Build Arguments Rules Building Arguments

Logic. (Propositional Logic)

A. Propositional Logic

Glossary of Logical Terms

Learning Goals of CS245 Logic and Computation

Natural Deduction. Formal Methods in Verification of Computer Systems Jeremy Johnson

2. Use quantifiers to express the associative law for multiplication of real numbers.

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Fuzzy Logic in Narrow Sense with Hedges

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 1

Logic (3A) Young W. Lim 10/29/13

Recall that the expression x > 3 is not a proposition. Why?

KB Agents and Propositional Logic

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

Transcription:

Introduction to fuzzy logic Andrea Bonarini Artificial Intelligence and Robotics Lab Department of Electronics and Information Politecnico di Milano E-mail: bonarini@elet.polimi.it URL:http://www.dei.polimi.it/people/bonarini Introduction to Soft Computing A. Bonarini (bonarini@elet.polimi.it) - 1 of 11

Logic Logic can be used to represent knowledge Propositional logic: truth values for propositions e.g.: The grass is green is true First order predicate logic: truth values for predicates There are variables and quantifiers! e.g.: X : (Green X) is true Second order predicate logic: predicates of predicates e.g.: X,Y : (Believe Y ((Green X) is true)) is false Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 2 of 21

Propositional logic Propositional logics are concerned with propositional (or sentential) operators which may be applied to one or more propositions giving new propositions. Accent on the truth value of propositions, not on their meaning, and on how these truth values are composed A logic is truth functional if the truth value of a compound sentence depends only on the truth values of the constituent atomic sentences, not on their meaning or structure. For such a logic the only important question about propositions is what truth values they may have. In a classical, boolean or two-valued logic every proposition is either true or false and no other feature of the proposition is relevant. Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 3 of 21

Example propositional logic For example, the conjunction of the two sentences: Grass is green Pigs don't fly is the sentence: Grass is green and pigs don't fly The conjunction of two sentences will be true if, and only if, each of the two sentences from which it was formed is true. Other operators are disjunction (OR) and negation (NOT) Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 4 of 21

First order predicate logics Same as propositional logics augmented with the possibility to define predicates on variables => existential and universal quantifiers (Exists, For All) A predicate is a feature of language which you can use to make a statement about something, e.g. to attribute a property to that thing. If you say "Peter is tall", then you have applied to Peter the predicate "is tall". We also might say that you have predicated tallness of Peter or attributed tallness to Peter. Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 5 of 21

Inference In predicate logics it is possible to infer the truth value of a proposition by inferential mechanisms, such as modus ponens E.g.: from All men are mortal and Socrates is a man we can infer that (modus ponens) (proposition) Socrates is mortal (proposition) Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 6 of 21

Representational power of classical logic Aristoteles already had some problems about the validity of classical logic as a knowledge representation tool. For instance, how can we state the truth value of a proposition in the future? E.g.: Tomorrow it will rain? Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 7 of 21

Many-valued logics Three-valued logics : true (1), false (0), and undefined (1/2) Infinite-valued logics: a continuum of truth values (e.g. in [0,1]) E.g., Łukasievicz (1930) logic L 1 T( a) = 1 T(a) T(a b) = min (T(a),T(b)) T(a b) = max (T(a),T(b)) T(a b) = min (1, 1 + T(b) - T(a)) T(a b) = 1 - T(a) -T(b) Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 8 of 21

Similarity and differences between L 1 and L 2 L 1 is isomorfic to the fuzzy set theory with standard operators as the classical L 2 is isomorfic to the set theory Some tautologies valid in L 2 are no longer valid in L 1 Third excluded law (T(a a) = 1) e.g., if the truth value of a is 0.7, truth value of (a a)is max{0.7, (1-0.7)} = 0.7 Non-contraddiction law (T(a a) = 0) e.g., if the truth value of a is 0.7, truth value of (a a)is min{0.7, (1-0.7)} = 0.3 Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 9 of 21

The liar paradox I m a liar This sentence is a paradox in classical logic since no formula can have the same truth value of its negation This may not be so in many-valued logics. In Łukasiewicz logic, for instance, it can be that the truth value of φ is 0.5, and that of φ is the same, so the proposition is consistent with the axioms, and it is no longer a paradox. Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 10 of 21

Fuzzy logic Fuzzy logic is an infinite-valued logic, with truth values in [0,1] Propositions are expressed as A is L, where: A is a linguistic variable L is a label denoting a fuzzy set E.g., Temperature is HIGH Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 11 of 21

Linguistic variable A linguistic variable is defined by a 5-tuple: (X, T(X), U, G, M) X = name of the variabile T(X) = set of terms for X (linguistic values), each corresponding to a fuzzy variable denoted by T(X) and ranging on U U = universe of discourse defined on a base variable u G = syntactic rule to generate the interpretation X of each value u M = semantic rule to associate to X its meaning E.g.: X is a linguistic variable labeled Age. U = [0, 100]. Terms for X are old, middle-age, young The base variable u is the age in years. M is the definition in terms of fuzzy sets of the values of X. G is the fuzzy matching (interpretation) of u. Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 12 of 21

Simple propositions p: X is F X is a linguistic variable F is a fuzzy set, defined on U, which represents a fuzzy predicate μ F (x) is the membership function defining F μ F (x) is interpreted as truth value of the proposition p T(p) =μ F (x) Therefore, the truth value of the proposition P is a fuzzy set defined on [0, 1] Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 13 of 21

An example p: temperature is high X μ μ(x) 0.75 high T(p) 0.75 30 x μ(x) Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 14 of 21

Degrees of truth and probability Degrees of truth are often confused with probabilities. They are conceptually distinct: fuzzy truth represents membership in vaguely defined sets, not likelihood of some event or condition. To illustrate the difference, consider this scenario: Bob is in a house with two adjacent rooms: the kitchen and the dining room. In many cases, Bob's status within the set of things "in the kitchen" is completely plain: he's either "in the kitchen" or "not in the kitchen". What about when Bob stands in the doorway? He may be considered "partially in the kitchen". Quantifying this partial state yields a fuzzy set membership. With only his little toe in the dining room, we might say Bob is 0.99 "in the kitchen", for instance. No event (like a coin toss) will resolve Bob to being completely "in the kitchen" or "not in the kitchen", as long as he's standing in that doorway. Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 15 of 21

Fuzzy modifiers Fuzzy modifiers modify truth values x is Young means (x is Young) is true It can be modified as: x is very Young is true x is Young is very true x is very Young is very true Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 16 of 21

Examples of fuzzy modifiers μ very a (x) = μ a (x) 2 μ fairly a (x) = μ a (x) 1/2 μ(x) μ a (x) μ fairly a (X) x μ very a (X) Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 17 of 21

Kind of modifiers Strong modifiers m(a) <= a for each a in [0, 1] They make the predicate stronger, so they reduce the truth of the proposition Weak modifiers m(a) >= a for each a in [0, 1] They make the predicate weaker, so they increase the truth of the proposition Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 18 of 21

Properties of fuzzy modifiers They have to satisfy these properties: m(0)=0 and m(1)=1 m is a continuous function if m is strong m -1 is weak, and the other way round Given another modifier g, the composition of g and m and viceversa are modifiers, too, and,if both are strong (weak), so is their composition Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 19 of 21

Qualified, non-conditional propositions p: (X is F) is S S is a fuzzy truth qualifier F is a fuzzy set P is truth qualified Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 20 of 21

Example p: Tina is Young is very true X μ S μ(x) 0.85 Young T(p) 0.76 True Very True 22 x 0.85 μ(x) Introduction to Fuzzy Logic A. Bonarini (bonarini@elet.polimi.it) - 21 of 21