fuzzy logic and binary logic
DESCRIPTION
Fuzzy Logic, Binary LogicTRANSCRIPT
��������������� ����������������������������������������������������� ����� ���������
�������������������� ���������!���"������������ �������������# �����������������$�����%�&� ������������������������!�������������!����������'����(� ��������������)�����!�)��
��������� ��� ��������*�����������$������������)��)�������� ��������%����������������� ���������������+(��� ��� ����������� ����' "��
����,�-�$�����������+����.������������� �-�!���������
) ����+���������/���-+��� ����� ����� ���)����� ��� ����
�� ����������������������-�*��������� �%������� +�������� ����������������-+(����������� ��-�!������!���������
�������������"�� ����� ����������+(���������������-�!������������������ �� �0���� ' "�����,� ����� ������������������������������������������� ����������� ��������� ���� �������������0����������������������������������� ����������� ����������+*�����������)��������0����!�������
���������-�!� �������' "�����,�����"���������������
+!�����������������������!�������������������� ����� �������������� ����������������� ��-+$����1-�!�����+' "�����,� �� ��������� � � ,,�
��)��-�$������%������+!������ ��� 2 ��� ���� �� ��� 0�� ��� 3�
�������� ��������������4����������������������-�' "�����,������+!������������������������������� ���������� ��0�� ��4�5�����������������������0�� �
4�36�)���������� � ��� ������4���3�-+���� �� ��� ����� ���� ��� ��
����1-�!���"���� �� ����' "�����,��������+* ������!����
���� �� � �������� ���"�� �"�� &�����&������7���� ���"���������� �1-+8���� ������9-+:����0���������1-+������!�) ������������������6-+*���������������������������������-+�����������������"��� ���"��&�����-' "�����,� ������ ����������� ��
����0�����������)�������+����� ���"����1-+;�� ��35��������!�������-+<�����(���������������=������
�����������"���"��&������&�������35���������� ���!���������� ���0�� ����4�35��� ,,����)��-+(������ 2 ��� ����)� ���� ������� !�
���������������)�-' "�����,� )���������� ����� +8��
����������!����������������0��������%������������������ ��������� �������������������'�������"�� � ���� ������������=!������)���8���������������=����������������������!������������)��������������%�����1�!�������� ���������������>������������������������ ���(��� ����������������� ���0�������������$������ ���0�� ���� �������4����3����$������������ ���0�� �����������������3 ? ��-+*������!������� ���)��������-+;��� !�� $� �� �� ��� ���� ����)����
���$�� �� ������� ��� ��� �� ��� 0�� �� ��4��;����0��������:����3 ? 4�@ 3���3 ? 3 @ 4������������� ���0�� �����$��������������� ���0�� ��������$���3 ? ��-
� ��������� ����
334�������*��������� ;����� �������������
�������������������� � ��!��*������
���������� ���� ��� ������� ��������������������������� ��������������������� ��!"��!�������� ����#���$�%�& ����#��� ��'������������'�����(� ����� �������"
��$�&����% ������� �)�*����)� �����&� ���������&�� " � ��!�� �&����! �&� ����#��� � �����+�����!��#�� � � ����%�&$�
Copyright 1993 Scientific American, Inc.
+8���!�����-+A)����:���������� �����������=���
������������$�����$�������)� ���������� �� ��� 0�� �� ��� $� �� 3 ? ��� (���������������������%�������������!��� @4������$������� �������� @ 3 ? 4 @ 3��;��� � @ 3�� ���� $� ������ �� ����� � @ 3 ?3 @ 4��:����������������������-!� )�0�� ��� �� ��������)� �����
+' "��������� �0�������������� ���������������� ��)� ���� ��) �)�� ��������� 0� ���������)�-������"����+��� ���# ���� ,,����)�
������������������������ ����������� ����� @ 3 ? �� �������� @ 4�5��*��� ���������� �������������������������� ���� ��� �0�����)� ���"�� � �.���B� ���������������������0��� ������� ,,����)��-�$��������������������� ��"�����*��������������"��"��������"�����0����� )�)������������������ ��!�������������+������ � ����� ���������1-�$���
��� ��"���� ' "�����,� ���� � � �� ������"�� ��!�������������+'������������� ������ *����� ��� ��� !� ��0�� �������������$����C������� ���0�� ���������������0����$������C����� �����C������$����������*���������������)�� ���0�� ���� ��������
� @ � ����$
� @ 3 ? � ����C �
(�������"��������� ��� ���� ������ ��4����3��# ������������ � ������ ��� � � ,,�� ��)��� � @ � @ 4�5�� *������ ���� ������ ����� �� �� ������� ����������������������%��������-+$��������-�' "�����,������+# ���
)����� ������������������������0�� ����� ��)������� �))���������������������������������)���0���� ��<�����������$����"�<��� � ���������������������������������*����D0���������:���B��"����*����#���"�!�� ���0���� �� �"� ������ ������������%�������������������-!������*���������� ��������"�� ,,����+8�����"�� ���B� �"�������������
���*���������������������������)�������) ��������������")� ���0�����# ����E���F�����(������ F�-+8�� �� ����� !� "��� �����-� *�������
�������������+:������������������������� ��)�� ���������� ,,�)�������������)�� �������1-' "�����,����"���� ��������+���
����� ������)������������� ��)������������������������1�(���������������������������� ������0����� ������������������� ���0�� ���(������0���0�� ��������� ����0�����)������)��&����������$�����%��������'������ ����������$�� =���� ��������� �� ��������������!����������� ������������� ��0�� ���� @ 3 ? ���# �������!���� ��������
�����0��������������������������������������������0�������� ������������������� ���0�� ���� ← 3 ? ���!���� ����� ��������$������������ ������ ���0�� ��� ����$��������������� ������������������ ��� 0�� �� �� 3 ? ��� ���� �%������� ��� ���������� ����")������$�����G4��������� ������������ @ 4�G��������0����� ��������������� @ 4�H�������� �� ������ ����� � @ 4�G� �)�� � ����� �)��� �� .��� ��� ������� �� ��0�� �����������)������������ �������������0�� ���4�G����4�H��(�������������������%������� @ 4����3�� ��������������� ����4��3��4��3� � � ������������ ������E�����������)������) ������$�������������$����� ������$������������$����� ������ � � ��(�����)��������������������������%��������� ���� ����������������������� ���0�� ��-+;��� @ 4�5� �� �������� 0�� �� ����
������� ����� ��� �� ���������-� $����� ����+$���������:��������7 �����$�����%
���� �� �����������������������)���������
� ← �
� ← 3 ? ��
* ������ �� � ������ � �� �� ������)� @ 4�G��� @ 4�I��(����� ��.������0�������� @ 4�I��� @ 4�H��;�� ��������0������������ @ 4�H��� @ 4�J������������� @4�J��� @ 4�G��;��� ������0���)0���� @4�G��� @ 4�I������� ���� ��"��������� ���������!��������������������� �6 �������� ����������� @ 4�5��� @ 4�5������0�����)������� ���)���-+8"����!���� �������-�!������+# ������
� � �����������1-' "�����,������������0�������� ��
+#������ !� ��� �%���� ������ !�� ��� �������������-���������+!���� ��������������� ����������������������� ��������!��� ������������� ������������ ����� ,,���� ���0�� ���������� ���������)��������������K��������������� L��;����� )�������� ���������������"�������������������������$������� ���0��� ��3 ? � ��$������� ���0�� �����*������� �� ���"����������������������� ��0�� ���������������� � ������������-+!����"�����%������-�*������������+8"���� * ������ !� ���� $����� �� ��
)���� )������� ���� �� �� ��� �� � ��"������1-+8�����6� � ��M4��������-�*�����
���������$�����)�0���������������"�+������ �������� � ����� ����� �� ������������������������-�!�)�0�������0�����������"�+����'���������� ��������������*�� !�
���� �� �� ��� 0�� �� � @ 4�M�� * ������ !��"�������������� � ��������������*��* ������!� ��������������(��=*���344��������� ���������� �������������(1-
����������
n classical logic, a statementhas a truth value of either 1
for true or 0 for false. The state-ment “the sun is shining” has atruth value of 0 if it is cloudy. Ingeneral, statement P has a truthvalue p equal to 1 or 0. In fuz-zy logic, a statement can have atruth value of between 1 and 0. Ifa cloud obscures a quarter of thesun, then statement P has a valueof 0.25.
In fuzzy logic, like the classicaltheory, the truth value of a state-ment will change when applyingthe operators NOT, AND, OR, IM-PLIES and IF AND ONLY IF.
NOT-P has a truth value of 1 – p.EXAMPLE: If the sun is shiningwith a truth value of 0.25, thenthe sun is NOT shining with atruth value of 0.75.
P AND Q has a truth value equalto the lesser of p and q where qis the truth value of statement Q.EXAMPLE: The sun is shining witha truth value of 0.25, AND Jane is getting tan with a truth valueof 0.10.The value of the example is 0.10.
P OR Q has a truth value equal tothe greater of p and q.EXAMPLE: The sun is shining witha truth value of 0.25, OR Jane is getting tan with a truth valueof 0.10.The value of the example is 0.25.
P IMPLIES Q has a truth valueequal to the lesser of 1 and1 – p + q.EXAMPLE: If the sun is shiningwith a truth value of 0.25, thenJane is getting tan with a truthvalue of 0.10.The value of the example is 0.85.
P IF AND ONLY IF Q has a truthvalue equal to 1 – | p – q |, thatis, one minus the absolute valueof p minus q.EXAMPLE: The sun is shining witha truth value of 0.25 IF ANDONLY IF Jane is getting tan with atruth value of 0.10.The value of the example is 0.85.
�
*��������� ;����� �������������������333Copyright 1993 Scientific American, Inc.
!� ��� )��� ���� ��������� +������ ����������� ��� 344� ������� �� �� ������8��������*��� ��� ��344���������� ��������0�����������������������-+A)���� (��� ��)���� ��� �� ��� ��� ��
���������(���������� � ��*����������������� ����� ���0�� �����*��������� �� ��� 0�� �� ���� ���� ��� *� �� (������� @ 4�M�� ������0�� �������(���������������������3��*��(����� �� �� ���������%�������������������0�� ����F������1�(�������� ��� ������������������������������������������� �������#��� ������������F��� ��4�N��(����������������%����4�N��(������������� ���������%����4�M�-+��������� �������*���������� �1-' "�����,���������������+B� ���
������������������"���(��������������������������� ���0�� �����*����4�5�� �������� ���0�� ����4�M��(����F�������4�3��������������������� ��������������������� ���0�� ����4�O��#��� ����� ����������� ���������)� ��34������������ ����O4����������������-+;���;����!�������*���M4�������
�� ���!�����0�� ���344���������)���*�������� ���0�� ���� �����0�� ���3�!�0��)�����-+<�����!�)�������� ������!���0���
���������$������� ���0�� ��� �������������C������ �������� ���������������� ���0�� �����$���� ��� ′��(��������) �������0��2 ��� ������� )������������ ���0�� �����C���� @ 3 ? P � ? � ′ P�������P � P����������� ��� ���0�� ����� Q�� ������� ����� ������0���?� ���� ���)��0�R��'���������������������������������� ���-' "�����,���� )���������������
+:��� !� ���������� ������ !� ����� ���&������'�������������&�
�������������������������������� ����������� ������������
!������� ���0�� ����� ��������� ����� ��������������� ���0�� �����3 ? ��*� �� ���� ���������� ���� ���� ��� �� ��0�� ����3 ? P ? Q3 ? R P @ 3 ? P 3 ? J P�!�������������������������������
← 3 ? P 3 ? J P
��� ��������������� ���� �� ���0�� ���&��������������)�0�� ������� ���� @4�3JGM5��������� ������ �����0��0��� ����B� ����.�������������������;�� ������� !� ��� ������� �� � ����� ��� �������� ���F����������� ������ ������������ ��������������������������������������������������4����3��!������������������������������� �
← 3 ? P 4�OOOOOO ? J P�
B� �����0��� ���0���������� �� �����E���F�������������������6���� ��
���E��E��������)���������� ������ ����������������������������������������������)�����������������"� )����)����������� ��� ������������!���� � �����������0�� �����4�3JGMN��������� �)������F�������)��-' "�����,� �� ����� +:�%�� ������ �
����&������7 �����������0��0����������������
!� ���������������"��������
"!�"��������������� ���������
!������������"���� �� ���������������������(�������������
� ← 3 ? P � ? � P
� ← 3 ? P � ? Q3 ? � R P�
(�� ���� ����� �� ������ �� � ������� �������������0�� ���������Q��� R @ Q4�J��4�OR��������� ������ �����0����������0�� ����(�"���� ������������������������������������������B� �)�����)���������������������������������������������������������!������������� �)��������)�����������.�������������K�������������������������������# L��(����������������� ����������������� �� �� ��������������)��"��������������������)�����(��������������������������%���������������������� ��� ������4����3��(�������������������������Q��� R���0�������������)�Q4�4R��������� ��������������� ��������������������� ��������)��� ��������������������0�� ���(����������Q��� R��������������������������������������� � ��������������� ����(�� ������� �� � ��� ��� ���� �� ���������0�� ��2 ������)�������3�K�������������������������������# L�-+!� �)�����������-�*������������
+B� ���"���������������� )���0��0���������)������� ���0�� �������������������������������������������0�������������������������(����� ���������������������� �������������������������������������(�������������������������� ���%�������������������������������������������������� ��� �������������)��������������������������� �������������)����������������������������������������-+!����������������.�������������
���� ����0�����������������������&�������'�����
����������� ������� ������������������������� �$��������������������� ������
!�� ,,����)���������������������������������2���0��=0������������)������ ����������� ���0�� ���*����"�� � ����������������������������
����������� ������� �������������������������%���� �$���������������������� �������
(������������������������������
� ← 3 ? Q� ? Q3 ? � RRJ�
�������0����������������
� ← M� Q3 ? �R�
&�����������������������������)�����������������6��������������������'�)����'����!���������������6������-;����)��������$�����%�&� ��������
���' "�����,����!����"���� ����������������!�����,���!����� ������� ���� ������")�� ���%���������� � ,�,����)���� ������ ����� !� ���� ���)�������� ��"� ��� 0���� �������� � �����+' "�����������0������������ �������)�.�������1-+�����-���������+�������<������
� ���������)0�����)��������������������������������%��������)��� �����) ��� �������F������������������������������ ����������� (���� ������������� �� ����������0����������������� ������ ��� ����� ���� ����� �� ����������������)0��������������������(����������� �������������)�����������S ���<T���������� ��������������� ����� �����������������!����������������������������� F����������-+*��!������&������� ��������)�
��������6�;��,)9�# �����������������������!� ��� ����0�����)��� 2 ��������������� �1-+!��!���0���0������������ ��!���"����
)����������"������������������)���)� �����-U ���������� ������ ����������
���� �"��� ��� �� �)��� �)��)� ���,������ ' "�����,� ��� � �0��� !���"��� ������")����.������������� ���+*�������������)���������������� �������������� 1-
33J������*��������� ;����� �������������
�DA(��A�A�;7!:<
7��� <� $�� 7���1�(�� ����������� &�����!��*��������#����#���"�����3OO4�
$������ &�����:�� !�����������*���������� $ ����<����������$����"� <��� �&��� V���� J5�� :��� 5���)���N5O?NOG>�7���� ���3OO3�
*����A�������� � &���� �� �����'������A����� A���� WOJ?43��$�����"�<����<�� ������'�)�����������*��������7������������$���������*�D�:�B�����*����#���"��3OOJ�
&������ !������������������� *����������� $ ����&����� '������������� *���� ;��������<����������$����"�<����'���������� (������� Q������R�
)
Copyright 1993 Scientific American, Inc.