Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Math 209

Fuzzy Logic

Spring 2009

Fuzzy logic is a type of logic used in articial intelligence. It is referred to as a multi-valued logic, as, instead of having two values (true and false), there are a continuum of possible truth values. In fuzzy logic, every proposition is a statement that is assigned a number between 0 (false) and 1 (true) (we may call such a statement a fuzzy proposition). The number assigned indicates degree of truth. For example, the statement A room temperature of 120 F is too hot is a statement that all people would agree with, so it would have a truth value of 1, whereas the statement A room temperature of 75 F is too hot may have a truth value of 0.6, since many (but by no means all) people would agree. In this latter case, we may write that the proposition p : A room temperature of 120 F is too hot has a truth value of (p) = 0.6 (note that we will use (p) to denote the truth value of p). 1. One major reason for the emergence of fuzzy logic deals with the existence of paradoxes in logic. (a) Assuming the standard two-valued logic that we discussed in class, discuss the truth value of the statement this statement is false. Is the statement a proposition? Justify your answer.
Solution. Let p denote the statement this statement is false. If p is true, then the wording of the

statement would require it to be false, which is impossible. Likewise, if p is false, it must therefore also be true. We conclude that p can be neither true nor false, and therefore, not a proposition.

(b) Working in fuzzy logic, do you think the statement this statement is false is a fuzzy proposition?
Solution. Again let p denote the given statement. We must decide if p can be assigned a truth value. Clearly, we cannot have (p) = 0 or (p) = 1. Is there a compromise? What if (p) = 0.5? In fact, if we decide that what the statement is truly saying is the statement p has a truth value of 1 p, the truth value of p must be 0.5, which would make it a fuzzy proposition.

2. We may dene basic logical operators in fuzzy logic, just as we do in conventional logic. If p and q are fuzzy propositions, we may dene compound propositions as follows. (p) = 1 (p) (p q) = min{(p), (q)} (that is, the lesser of the two truth values). (p q) = max{(p), (q)} (that is, the greater of the two truth values). (p q) = min{1, 1 (p) + (q)} (p q) = 1 |(p) (q)| (|(p) (q)| means the absolute value of (p) (q)) Suppose that the statement Sam is happy has truth value 0.7 and the statement Dana is happy has truth value 0.4. Find the truth values of the following statements. (a) Dana is not happy
Solution. For the rest of this assignment, p with represent the fuzzy proposition Sam is happy and q will be the statement Dana is happy. Thus, we have (p) = 0.7 and (q) = 0.4. The statement here is merely (q) = 1 (q) = 1 0.4 = 0.6

(b) Sam and Dana are happy


Solution. This is p q, so (p q) = min{(p), (q)} = min{0.7, 0.4} = 0.4

(c) Sam is happy, or Dana is happy

Wodarz

1 of 3

H04

Math 209

Fuzzy Logic

Spring 2009

Solution. This is p q, so (p q) = max{(p), (q)} = max{0.7, 0.4} = 0.7

(d) Neither Sam nor Dana is happy


Solution. (p q), resulting in ((p q)) = 1 (p q) = 1 max{(p), (q)} = 1 max{0.7, 0.4} = 1 0.7 = 0.3

(e) If Sam is happy, then Dana is happy


Solution. p q has a truth value of (p q) = min{1, 1 (p) + (q)} = min{1, 1 0.7 + 0.4} =

min{1, 0.7} = 0.7

(f) If Dana is happy, then Sam is happy


Solution. q p has a truth value of (q p) = min{1, 1 (q) + (p)} = min{1, 1 0.4 + 0.7} = min{1, 1.3} = 1

(g) If Dana is not happy, then Sam is not happy


Solution. q p has a truth value of (q p) = min{1, 1 (q) + (p)} = min{1, 1 (1 (q)) + (1 (p))} = min{1, 1 (1 0.4) + (1 0.7)} = min{1, 1 0.6 + 0.3} = min{1, 0.7} = 0.7

(h) Sam is happy if and only if Dana is happy


Solution. p q has a truth value of (p q) = 1|(p)(q)| = 1|0.70.4| = 1|0.3| = 10.3 = 0.7

(i) If either Sam or Dana is happy, then Dana is happy


Solution. (p q) q has a truth value of ((p q) q) = min{1, 1 (p q) + (q)} = min{1, 1

max{p, q} + (q)} = min{1, 1 max{0.7, 0.4} + 0.4} = min{1, 1 0.7 + 0.4} = min{1, 0.7} = 0.7

3. We may consider two compound propositions to be logically equivalent if identical inputs always give coinciding output truth values. (a) Do De Morgans Laws hold for fuzzy logic?
Solution. Notice that the truth value of (p q) is 1 min{p, q}. Thus, it is either 1 p or 1 q. Which

one? Well, since were subtracting o the lesser of p and q, the result must be the greater of 1 p and 1 q, or max{1 p, 1 q}, which is the truth value of p q. Similarly, the truth value of (p q) is 1 max{p, q} = min{1 p, 1 q}, which is the truth value of p q. We conclude that de Morgans Laws hold.

(b) Is it true that a fuzzy proposition p q and its contrapositive are logically equivalent?

Wodarz

2 of 3

H04

Math 209

Fuzzy Logic

Spring 2009

Solution. Since the truth value of q p is min{1, 1 (1 q) + (1 p)}, and the latter simplies to 1 p + q, the two are logically equivalent.

(c) In two valued logic, p p is a tautology. Is this true in fuzzy logic?


Solution. No, since (p (p)) = max{p, 1 (p)}, which is only 1 if either (p) = 1 or (p) = 0.

References
[1] Kenneth H. Rosen. Discrete Mathematics and Its Applications, 4th Edition. WCB/McGraw-Hill, 1999 [2] Ian Stewart. Mathematical Recreations, Scientic American. February 1993

Wodarz

3 of 3

H04

You might also like