{"id":227,"date":"2018-07-13T10:52:16","date_gmt":"2018-07-13T10:52:16","guid":{"rendered":"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=227"},"modified":"2019-05-16T05:32:45","modified_gmt":"2019-05-16T05:32:45","slug":"using-fuzzy-logic-frames-and-semantic-netfor-knowledge-representation","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/chapter\/using-fuzzy-logic-frames-and-semantic-netfor-knowledge-representation\/","title":{"rendered":"Using Fuzzy logic, Frames and Semantic Netfor knowledge representation"},"content":{"raw":"<div><span style=\"float: right;\"><a href=\"https:\/\/youtu.be\/Fki2Bs0btNU\" target=\"_blank\" rel=\"noopener\"><img src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a>\r\n<\/span><\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Introduction<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">In this module we will see three more methods for knowledge representation, fuzzy logic, frames and semantic net. All of them extends the basic method of knowledge representation by providing solution to one or the other problem. Fuzzy logic help solve the problem of imprecision in data while frames represent the object and class representation and relationship, especially the inheritance issue. Semantic net describers and reasons with relations between various objects. Frames are used extensively while deploying AI based solutions using C++ and Java. Real world problem solutions requires to extends the singleton fame like structure to a frame system which is a collection of multiple frames connected to each other by some relation. The semantic net represents how each entity is connected with another and how one can reason by traveling over that link.<\/p>\r\n&nbsp;\r\n\r\n<strong>The need for Fuzzy logic<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">In 26th module we have seen the issues with representing knowledge in predicate logic. One of the issue is the idea of relative degree of membership. Young teacher and young politician are two phrases using same word \u201cyoung\u201d but very different range of age for being young. Whenever human expert provides way to solve problems, we get similar issues. For example if we ask a housewife the rules for instructing washing machine how to wash clothes we might receive following instructions.<\/p>\r\n&nbsp;\r\n\r\n\u201cIf cloths are dirty use more washing powder\u201d\r\n\r\n\u201cIf cloths are heavier, rinse more\u201d\r\n\r\n\u201cIf cloths are dirty, use hot water\u201d\r\n\r\n\u2026.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">How can we model such statements in a computer program? Please understand the complexity. What do we mean by dirty? With 10 grams of dust, or 20 or what? Or heavy? 5 kilos? 7? 8? What? In fact these rules are quite general and should work for any values between any valid and acceptable numbers. For an example a 7 kg washing machine might accept any weight from 1 to 7. Dirtiness might be decided on a scale of 1 to 10. The washing powder might have four scales, half a spoon to two spoons and so on.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">A logical answer to this problem is do somehow relate the weight value to some scale representing heaviness, dirtiness to a scale of 0 to 10 (or something similar) and so on and find out how these things are related and decide the amount of washing powder to be used or use rinsing cycles or choose program or use the temperature of the water to be used for washing.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">We need to augment predicate logic or whatever method we are using for knowledge representation using fuzzy logic to enable this. Here is some information on fuzzy logic and fuzzy sets.<\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\n<strong>Fuzzy sets and fuzzy logic<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">The conventional sets are sometimes denoted as crisp sets as the boundary between a member and a non-member is well laid out. For example a class student or class teacher are crisp classes. If you are a member or you aren\u2019t. Unlike that, the set like young student or fast car or heavy cloths aren\u2019t that precise about membership. A student with age 10 is definitely young but what about 25? 35? In fact you can say that the association with class \u201cyoung\u201d is reducing as the student gets older. You do not have an age value where student suddenly ceased to be a member of class young. You can also see that while we are discussing politicians, the range changes, a politician with an age of 50 is considered \u201cyoung\u201d unlike a student.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Take the example of a fast car. A car with the speed of 150 kmph is definitely fast but what about 80kmph? Again, like young, while we are discussing car racing championship, 150 might not belong to a set of a fast car.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">We routinely place objects into such classes where the meaning is well understood but the boundaries are not well defined. Rather the boundaries are fuzzy. Some objects are definitely members while some other objects are partial members. The membership criteria changes as per context given. There is a gradual change from a member to a non-member.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Such sets are known as fuzzy sets. If you look closely at the discussion that we had about washing machines, the sets like \u201cdirty\u201d, \u201cheavy\u201d, \u201crinse\u201d are all fuzzy sets. Dealing with such sets requires different processing than conventional crisp sets. The fuzzy logic (or fuzzy reasoning) is a detailed mathematical model for representing fuzzy classes and related operations<a href=\"#page2\">1<\/a>.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">The extent to which an object is a member of a class is denoted by a quantity called membership grades. A membership grade is a value between 0 and 1. An object with membership grade 1 is definitely a member of a class while an object with membership grade 0 is definitely not. Any other value indicates how far that object is a member of that class. For example membership grade for a student with age 10 is 1 while membership grade for a student with age 35 may be 0.4. This values, like certainty factors, is based on expert\u2019s intuition and judgement. There is a difference though between a CF value and a membership grade. When we encounter two statements as follows. First, the rule has some uncertainty, the data is certain (if the patient has malaria, he has, if he does not have, he does not have it), we are uncertain about the rule being true. In the second case, the data is uncertain, the rule is perfectly certain, we are uncertain about degree to which our data matches the rule.<\/p>\r\n&nbsp;\r\n\r\nIf the patient has fever, there is a suggestive evidence (0.7) that he has malaria If the cloths are dirty, rinse more.\r\n\r\nUsing multiple Fuzzy Sets to implement rule\r\n\r\n&nbsp;\r\n\r\nWhat if the washing machine is running a typical wash program and encounters following rule\r\n\r\n&nbsp;\r\n\r\n<em>If the cloths are dirtier than normal, and also heavier than normal, pick up more washing powder and choose a longer rinse cycle.<\/em>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">While this rule was being deliberate upon, the value of dirtiness is determined as 7.6 (from a scale of 0 to 10) while value of heaviness is determined as 4.25 by washing machine sensors. We need to execute the rule. The rule looks like one written in predicate logic but with values that will\u00a0determine the amount of washing powder and longevity of the rinse cycle requires more processing before the rule is applied.<\/p>\r\n\r\n<ul>\r\n \t<li><em>1 The fuzzy logic is well designed mathematical model for dealing with fuzzy sets. The model itself is not fuzzy at it might seem from the name \u201cFuzzy logic\u201d<\/em><\/li>\r\n<\/ul>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">The membership grade is mentioned as \u03bc for both sets Dirty and Heavy in figure 28.1. The values 0.8 and 0.7 are membership grades determined by using a technique popularly known as interpolation. It is an easy job if the observed value is an index in the table. For example if we have 7, we can decide the dirtiness membership grade as 0.6 or if the value is 8 we decide the membership grade value is 0.9. It gets little more complex when the value is not an exact index value. The interpolation is a mathematical process to determine the value in such cases. It is basically an answer to a question if 7 is 0.6 and 8 is 0.9 than what is the value of 7.6?<a href=\"#page3\">2 <\/a>Thus we have obtained membership grade value for both dirtiness and heaviness of the cloths.<\/p>\r\n<img class=\"size-full wp-image-408 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.1.png\" alt=\"\" width=\"423\" height=\"303\" \/>\r\n\r\nNow the program has to determine the amount of washing powder to be used with amount of rinse cycle. In fact this can be achieved by usi ng tables mentioned in figure 28.2.\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-407 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.2.png\" alt=\"\" width=\"431\" height=\"296\" \/>\r\n<div>\r\n\r\nOut of two values (0.8 for dirtiness, and 0.7 for heaviness), we will take higher value that is 0.8<sup>3<\/sup>\r\n<p style=\"text-align: justify;\"><em><sup>2<\/sup> Another way to look at this is by drawing a graph based on the values given in table and find out intersection on X axis for a given Y value. Interpolation is the same process which does not require graph drawing.<\/em><\/p>\r\n<p style=\"text-align: justify;\"><em><sup>33<\/sup> Why, because of that value is fuzzier than the other one. In other words, if the cloths are dirty and also heavy, and dirty demands 1.5 spoons of washing powder while heavy needs 2.0, obviously 2.0 table spoon is what preferred.<\/em><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\"><span style=\"font-size: 1em;\">Now we pick up the value for both Washing Powder and Rinse Cycle, either directly picking up or using that membership grade. That gives us 1.5 spoon washing powder while 6 Rinse cycles.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\nThe washing machine program executes accordingly.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">There is a lot of other things to be said for fuzzy logic. One important branch of computer science is dealing with fuzzy neuro controllers. We will not discuss it further.<\/p>\r\n&nbsp;\r\n\r\n<strong>Frames<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Frames are one of the oldest methods of knowledge representation using object oriented fashion. The discussion about frames is quite similar to any language supporting object oriented programming. A frame can represent a class as well as an object (but only one of them by one frame). A class does not have physical existence (it does not occupy memory) while an object has physical existence (it occupies memory). A frame (thus the class as well as objects) is represented as a collection of some attribute-value pairs. Attributes are both, data as well as methods. Here is an example of a frame representing a class and representing an object in figure 28.3. The frame IndianCricketer represents a class and Frame M S Dhoni represents an object of the class IndianCricketer. The attributes like Name, Age etc represents data members. CalcRank() is a method and thus Ranking is a function member. Interesting methods are if-needed and if-added which are available for most, if not all, attributes. The if- needed method is invoked if the value of that attribute is needed but not available while if-added is kind of a trigger. Whenever value of that attribute is available this trigger gets executed for further action. Whatever is to be done is represented by a function member. If needed is quite similar to a constructor function.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Those who have some understanding about object oriented programming can find the discussing quite similar to a discussion on how Java or C++ objects are defined and used. Frames are little loosely structured as both; the class as well as the object; uses the same structure. Also, unlike Java, frame do support and expect multiple inheritance. In our case, the class IndianCricketer is a multiply inherited class. It inherits both from a class called Cricketer as well as Indian. ISA is a well-known concept in frames indicating inheritance.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Though ISA sounds ironic, the idea is basically a subset relationship. When a Class1 has an ISA relationship with another class Class2, it is basically a subset of that class. We will find many such classes in surrounding. For example a Bike class and a Two-wheeler class, Indian class and Person class, Bowler class and a cricketer class. MCA-student class and a student class and so on. The word ISA or isa or is-a is derived from the fact that such relationship can be easily ascertained by testing if a statement involving both classes joined by \u201cis a\u201d is really a true statement.<\/p>\r\n&nbsp;\r\n\r\nA bike is a two wheeler.\r\n\r\n&nbsp;\r\n\r\nAn MCA student is a student.\r\n\r\n&nbsp;\r\n\r\nAn Indian is a person.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">The ISA indicates subset of relationship while Instance of indicates membership relation. When the instance of relationship is provided, usually an object is identified as a member of the class. For example in above case, the frame M S Dhoni is connected with two classes, IndianCricketer and CSK using instance of relationship. Thus this frame is an instance of two classes at the same point of time.<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<strong>Frame Systems<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">A singleton frame is of little use. A collection of frames, popularly known as a frame system is used for reasoning. Multiple frames are connected by many ways. Two of them are already discussed; viz. ISA and instance of. There are many other ways of doing so. The relations many a times generated based on requirement. For example if you want to find out surname of frame called Aradhya. There is a slot but the value is not provided. You will have to follow father-of link to find out surname attribute value available with father. If you find the father-of link connects to Abhishek and find out the surname is filled by value \u201cBachchan\u201d you will get the value to be filled for this frame<a href=\"#page5\">4<\/a>. If such queries are expected, you must have father of link implemented by providing that attribute which points to that class or object.<\/p>\r\n\r\n<table class=\"aligncenter\" border=\"1\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Frame: Indian Cricketer<\/td>\r\n<td style=\"width: 307.063px;\">Frame: M S Dhoni<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">ISA: Cricketer<\/td>\r\n<td style=\"width: 307.063px;\">Instance of : IndianCricker<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">ISA: Indian<\/td>\r\n<td style=\"width: 307.063px;\">Instance of : CSK<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Name<\/td>\r\n<td style=\"width: 307.063px;\">MahendrasinghDhoni<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Age<\/td>\r\n<td style=\"width: 307.063px;\">36<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Bats<\/td>\r\n<td style=\"width: 307.063px;\">right<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Balls<\/td>\r\n<td style=\"width: 307.063px;\">right<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Balls played<\/td>\r\n<td style=\"width: 307.063px;\">12000<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">If needed : - GetBallsPlayed()<\/td>\r\n<td style=\"width: 307.063px;\">11500<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">If added: - CalclulateAverage()<\/td>\r\n<td style=\"width: 307.063px;\">20<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Runs scored<\/td>\r\n<td style=\"width: 307.063px;\">01<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Overs balled<\/td>\r\n<td style=\"width: 307.063px;\">95<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Wickets taken<\/td>\r\n<td style=\"width: 307.063px;\">105<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Strike rate<\/td>\r\n<td style=\"width: 307.063px;\"><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Average<\/td>\r\n<td style=\"width: 307.063px;\"><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">If-Needed: CalculateAverage()<\/td>\r\n<td style=\"width: 307.063px;\"><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">Ranking: CalcRank()<\/td>\r\n<td style=\"width: 307.063px;\"><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">\u2026\u2026\u2026..<\/td>\r\n<td style=\"width: 307.063px;\"><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 345.063px;\">\u2026..<\/td>\r\n<td style=\"width: 307.063px;\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p style=\"text-align: center;\"><em>Figure 28.3 A frame representing a class and a frame representing an object.<\/em><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Similarly, if a query is asked, what is the value of colour of the jersey M S Dhoni wears? For which you will have to travel the instance of link (or sometimes it is denoted by team) link. Interestingly if you travel through one link representing India you will get value \u201cBlue\u201d but if you travel another link \u201cCSK\u201d you will get value \u201cYellow\u201d. When you get two different answers while travelling through two different links it is a hard problem to solve unless we have clearer context. Such a problem occurs because of multiple inheritance issue and such a hierarchy is known as entangled hierarchy.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">There are many ways Frames are implemented, even specific languages were designed and used. In most cases, general purpose languages like Java and C++ are preferred though for two reasons. First<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\"><em>4 For a serious representation, you may get the value of Married, Gender slots, for Gender value = Female and Married = true, the surname is derived from Husband link and parent\u00a0<span style=\"text-align: initial; font-size: 1em;\">it is easier for programmers to code and second, it is easier to integrate the solution with production like systems.<\/span><\/em><\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n\r\n<strong>Semantic Networks<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">Semantic network or semantic net for short is a method of connecting objects in a semantic way. Computer science has many methods for connecting objects like ER diagram, DFD, Activity Diagram and so on. Semantic Net is quite general method which represents objects and connectors. Here is one example depicted in figure 28.4.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">If you closely look at 28.4, you can understand that it describes objects and some relation between those objects. For example two objects, Mumbai and Sachin are connected with each other by a relation called Hometown; Sachin and Anjali are connected to each other using relation Wife<a href=\"#page6\">5 <\/a>and so on. Most relations are either isa or instance of though. You can see that this is an idea which complements frames. An individual object is defined and expressed using a frame, the inter-object connection is defined and expressed using semantic nets. In fact most systems are defined in both ways together.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">If you compare predicate logic representation with semantic net, you can easily get the idea that relations are predicate names and the connecting objects are arguments. For example Wife (Sachin, Anjali) describes relation Wife with two arguments, i.e. names of husband and wife.<\/p>\r\n&nbsp;\r\n\r\n<strong>The importance of indicating objects<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">An interesting point comes to fore when a statement like \u201cSachin gave his bat to Sarfaraz\u201d is to be modelled. Though it would look like to be represented as shown in figure 25.5 it is really not a very good idea.<\/p>\r\n<img class=\"aligncenter wp-image-339 size-full\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-65-e1533299525522.png\" alt=\"\" width=\"492\" height=\"279\" \/>\r\n<div style=\"text-align: center;\">Figure 28.4 A sample semantic net describing some facts about Sachin, the cricketer<\/div>\r\n<div><img class=\"size-full wp-image-409 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.3.png\" alt=\"\" width=\"426\" height=\"53\" \/><\/div>\r\n<div>\r\n<div style=\"text-align: center;\">Figure 25.5 Incorrect way to draw semantic net<\/div>\r\n<p style=\"text-align: justify;\">What is wrong with this representation? There are two problems. First, the bat is not an object, it is a class. Sachin cannot give class bat to Sarfaraz, he can only give one of the objects of a given class. Second, we also have one more statement, Dravid gave his bat to Jay. The representation looks like figure 25.6. This representation is quite confusing. Who has given bat to whom? It is not at all clear.<\/p>\r\n\r\n<\/div>\r\n<img class=\"aligncenter wp-image-340 size-full\" style=\"text-indent: 16px;\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-66-e1533299568136.png\" alt=\"\" width=\"342\" height=\"145\" \/>\r\n<div style=\"text-align: center;\">Figure 28.6 Problem with representation depicted in 25.5<\/div>\r\n&nbsp;\r\n\r\nCheck how the problem is solved in 28.7 by providing individual object which are instances of a class bat.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">The major use of semantic net is to get answers to queries related to relations between objects. For example if you ask, \u201cHas Sachin anything to do with a Paediatrician?\u201d The answer can be sought by travelling through two different links, form objet Sachin and from class Paediatrician (both represented as nodes in the diagram, thus we are finding if there is some path exists between these two nodes under consideration). The search find some intersecting point, in this case, Anjali and the system answer\u2019s back that Sachin\u2019s wife is a paediatrician. This search, quite logically so, is named intersection search. You can again compare this discussion with predicate logic and understand that the intersection search is nothing but the inference process that we had with predicate logic.<\/p>\r\n\r\n<div>\r\n\r\n<img class=\"size-full wp-image-410 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.4.png\" alt=\"\" width=\"441\" height=\"187\" \/>\r\n<div style=\"text-align: center;\">Figure 28.7 Solution to the problem depicted in 28.6<\/div>\r\n&nbsp;\r\n\r\n<strong>Representing quantification<\/strong>\r\n\r\n&nbsp;\r\n\r\nComparing with predicate logic, you might ask a question. How do we represent universal and existential quantification in semantic net? Let us take two statements we have introduced in module 24.\r\n\r\n<\/div>\r\n<ol>\r\n \t<li>All of the players are physically fit<\/li>\r\n \t<li>Some of the players are singers<\/li>\r\n<\/ol>\r\n&nbsp;\r\n<p style=\"text-align: justify;\">For representing statement comprising of, one method to represent is called partitioned semantic net which is shown in the figure 28.8. The S is a generic idea which represents statements made about something. We assume that the statement that we made is one of that set. S, the statement that we made, has two links for any statement which is universally quantified. All variables which are universally quantified is partitioned inside another box which\u2200 is connected using a Form link. The variable which is universally quantified is connected using link. You can see that such box does not \u2203exists, and neither of the links exist for the case depicted in 28.9. We have another link named instead.<\/p>\r\n<img class=\"size-full wp-image-341 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-67.png\" alt=\"\" width=\"647\" height=\"429\" \/>\r\n<p style=\"text-align: justify;\"><span style=\"text-align: justify; font-size: 1em;\">What is the significance of fit being part of semantic net box and Physically Fit being out? We mention here that the players which are universally quantified by the variable P here, are physically fit, are part of the universal quantification and thus are determined by the variable P but, the overall class of physically fit is not quantified by this statement. Thus are shown as two different entities. Obviously the class fit is a subset of Physically Fit and thus shown connected by isa link.<\/span><\/p>\r\n\r\n<div>\r\n\r\n&nbsp;\r\n\r\nWe have chosen a typical method of representing quantification, it will not invalidate some other method to do so.\r\n\r\n&nbsp;\r\n\r\n<strong>Summary<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify;\">In this module we have seen three more methods of knowledge representation; i.e. using fuzzy logic, frames and semantic nets in brief. Fuzzy logic is a well-designed mathematical system for representing fuzzy sets and provide operations over them. Concepts like dirty cloths, young teacher etc. are represented using fuzzy logic. Multiple fuzzy sets are required to be consulted for executing\u00a0<span style=\"font-size: 1em;\">rules written by experts dealing with fuzzy sets. A membership grade value determines the amount of membership of an element and thus the amount of reaction. Frames are object oriented way to represent knowledge preferred due to proliferation of object oriented knowledge representation by current general purpose languages. Frame systems are multiple frames connected to each other by various relations, most special ones are is-a and instance of. Semantic nets are ways of modelling such relations between objects and provide answers to queries using intersection search. The idea of a class and an object and the difference between them is very important for successfully implementing and reasoning using frames and semantic nets.<\/span><\/p>\r\n&nbsp;\r\n\r\n<\/div>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td><strong>you can view video on Using Fuzzy logic, Frames and Semantic Netfor knowledge representation<\/strong><\/td>\r\n<td><a href=\"https:\/\/youtu.be\/Fki2Bs0btNU\" target=\"_blank\" rel=\"noopener\"><img class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>","rendered":"<div><span style=\"float: right;\"><a href=\"https:\/\/youtu.be\/Fki2Bs0btNU\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"epgp books\" width=\"75px\" height=\"75px;\" \/><\/a><br \/>\n<\/span><\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Introduction<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">In this module we will see three more methods for knowledge representation, fuzzy logic, frames and semantic net. All of them extends the basic method of knowledge representation by providing solution to one or the other problem. Fuzzy logic help solve the problem of imprecision in data while frames represent the object and class representation and relationship, especially the inheritance issue. Semantic net describers and reasons with relations between various objects. Frames are used extensively while deploying AI based solutions using C++ and Java. Real world problem solutions requires to extends the singleton fame like structure to a frame system which is a collection of multiple frames connected to each other by some relation. The semantic net represents how each entity is connected with another and how one can reason by traveling over that link.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>The need for Fuzzy logic<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">In 26th module we have seen the issues with representing knowledge in predicate logic. One of the issue is the idea of relative degree of membership. Young teacher and young politician are two phrases using same word \u201cyoung\u201d but very different range of age for being young. Whenever human expert provides way to solve problems, we get similar issues. For example if we ask a housewife the rules for instructing washing machine how to wash clothes we might receive following instructions.<\/p>\n<p>&nbsp;<\/p>\n<p>\u201cIf cloths are dirty use more washing powder\u201d<\/p>\n<p>\u201cIf cloths are heavier, rinse more\u201d<\/p>\n<p>\u201cIf cloths are dirty, use hot water\u201d<\/p>\n<p>\u2026.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">How can we model such statements in a computer program? Please understand the complexity. What do we mean by dirty? With 10 grams of dust, or 20 or what? Or heavy? 5 kilos? 7? 8? What? In fact these rules are quite general and should work for any values between any valid and acceptable numbers. For an example a 7 kg washing machine might accept any weight from 1 to 7. Dirtiness might be decided on a scale of 1 to 10. The washing powder might have four scales, half a spoon to two spoons and so on.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">A logical answer to this problem is do somehow relate the weight value to some scale representing heaviness, dirtiness to a scale of 0 to 10 (or something similar) and so on and find out how these things are related and decide the amount of washing powder to be used or use rinsing cycles or choose program or use the temperature of the water to be used for washing.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">We need to augment predicate logic or whatever method we are using for knowledge representation using fuzzy logic to enable this. Here is some information on fuzzy logic and fuzzy sets.<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Fuzzy sets and fuzzy logic<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">The conventional sets are sometimes denoted as crisp sets as the boundary between a member and a non-member is well laid out. For example a class student or class teacher are crisp classes. If you are a member or you aren\u2019t. Unlike that, the set like young student or fast car or heavy cloths aren\u2019t that precise about membership. A student with age 10 is definitely young but what about 25? 35? In fact you can say that the association with class \u201cyoung\u201d is reducing as the student gets older. You do not have an age value where student suddenly ceased to be a member of class young. You can also see that while we are discussing politicians, the range changes, a politician with an age of 50 is considered \u201cyoung\u201d unlike a student.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Take the example of a fast car. A car with the speed of 150 kmph is definitely fast but what about 80kmph? Again, like young, while we are discussing car racing championship, 150 might not belong to a set of a fast car.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">We routinely place objects into such classes where the meaning is well understood but the boundaries are not well defined. Rather the boundaries are fuzzy. Some objects are definitely members while some other objects are partial members. The membership criteria changes as per context given. There is a gradual change from a member to a non-member.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Such sets are known as fuzzy sets. If you look closely at the discussion that we had about washing machines, the sets like \u201cdirty\u201d, \u201cheavy\u201d, \u201crinse\u201d are all fuzzy sets. Dealing with such sets requires different processing than conventional crisp sets. The fuzzy logic (or fuzzy reasoning) is a detailed mathematical model for representing fuzzy classes and related operations<a href=\"#page2\">1<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">The extent to which an object is a member of a class is denoted by a quantity called membership grades. A membership grade is a value between 0 and 1. An object with membership grade 1 is definitely a member of a class while an object with membership grade 0 is definitely not. Any other value indicates how far that object is a member of that class. For example membership grade for a student with age 10 is 1 while membership grade for a student with age 35 may be 0.4. This values, like certainty factors, is based on expert\u2019s intuition and judgement. There is a difference though between a CF value and a membership grade. When we encounter two statements as follows. First, the rule has some uncertainty, the data is certain (if the patient has malaria, he has, if he does not have, he does not have it), we are uncertain about the rule being true. In the second case, the data is uncertain, the rule is perfectly certain, we are uncertain about degree to which our data matches the rule.<\/p>\n<p>&nbsp;<\/p>\n<p>If the patient has fever, there is a suggestive evidence (0.7) that he has malaria If the cloths are dirty, rinse more.<\/p>\n<p>Using multiple Fuzzy Sets to implement rule<\/p>\n<p>&nbsp;<\/p>\n<p>What if the washing machine is running a typical wash program and encounters following rule<\/p>\n<p>&nbsp;<\/p>\n<p><em>If the cloths are dirtier than normal, and also heavier than normal, pick up more washing powder and choose a longer rinse cycle.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">While this rule was being deliberate upon, the value of dirtiness is determined as 7.6 (from a scale of 0 to 10) while value of heaviness is determined as 4.25 by washing machine sensors. We need to execute the rule. The rule looks like one written in predicate logic but with values that will\u00a0determine the amount of washing powder and longevity of the rinse cycle requires more processing before the rule is applied.<\/p>\n<ul>\n<li><em>1 The fuzzy logic is well designed mathematical model for dealing with fuzzy sets. The model itself is not fuzzy at it might seem from the name \u201cFuzzy logic\u201d<\/em><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">The membership grade is mentioned as \u03bc for both sets Dirty and Heavy in figure 28.1. The values 0.8 and 0.7 are membership grades determined by using a technique popularly known as interpolation. It is an easy job if the observed value is an index in the table. For example if we have 7, we can decide the dirtiness membership grade as 0.6 or if the value is 8 we decide the membership grade value is 0.9. It gets little more complex when the value is not an exact index value. The interpolation is a mathematical process to determine the value in such cases. It is basically an answer to a question if 7 is 0.6 and 8 is 0.9 than what is the value of 7.6?<a href=\"#page3\">2 <\/a>Thus we have obtained membership grade value for both dirtiness and heaviness of the cloths.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-408 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.1.png\" alt=\"\" width=\"423\" height=\"303\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.1.png 423w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.1-300x215.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.1-65x47.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.1-225x161.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.1-350x251.png 350w\" sizes=\"auto, (max-width: 423px) 100vw, 423px\" \/><\/p>\n<p>Now the program has to determine the amount of washing powder to be used with amount of rinse cycle. In fact this can be achieved by usi ng tables mentioned in figure 28.2.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-407 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.2.png\" alt=\"\" width=\"431\" height=\"296\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.2.png 431w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.2-300x206.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.2-65x45.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.2-225x155.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.2-350x240.png 350w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/p>\n<div>\n<p>Out of two values (0.8 for dirtiness, and 0.7 for heaviness), we will take higher value that is 0.8<sup>3<\/sup><\/p>\n<p style=\"text-align: justify;\"><em><sup>2<\/sup> Another way to look at this is by drawing a graph based on the values given in table and find out intersection on X axis for a given Y value. Interpolation is the same process which does not require graph drawing.<\/em><\/p>\n<p style=\"text-align: justify;\"><em><sup>33<\/sup> Why, because of that value is fuzzier than the other one. In other words, if the cloths are dirty and also heavy, and dirty demands 1.5 spoons of washing powder while heavy needs 2.0, obviously 2.0 table spoon is what preferred.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 1em;\">Now we pick up the value for both Washing Powder and Rinse Cycle, either directly picking up or using that membership grade. That gives us 1.5 spoon washing powder while 6 Rinse cycles.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p>The washing machine program executes accordingly.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">There is a lot of other things to be said for fuzzy logic. One important branch of computer science is dealing with fuzzy neuro controllers. We will not discuss it further.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Frames<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Frames are one of the oldest methods of knowledge representation using object oriented fashion. The discussion about frames is quite similar to any language supporting object oriented programming. A frame can represent a class as well as an object (but only one of them by one frame). A class does not have physical existence (it does not occupy memory) while an object has physical existence (it occupies memory). A frame (thus the class as well as objects) is represented as a collection of some attribute-value pairs. Attributes are both, data as well as methods. Here is an example of a frame representing a class and representing an object in figure 28.3. The frame IndianCricketer represents a class and Frame M S Dhoni represents an object of the class IndianCricketer. The attributes like Name, Age etc represents data members. CalcRank() is a method and thus Ranking is a function member. Interesting methods are if-needed and if-added which are available for most, if not all, attributes. The if- needed method is invoked if the value of that attribute is needed but not available while if-added is kind of a trigger. Whenever value of that attribute is available this trigger gets executed for further action. Whatever is to be done is represented by a function member. If needed is quite similar to a constructor function.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Those who have some understanding about object oriented programming can find the discussing quite similar to a discussion on how Java or C++ objects are defined and used. Frames are little loosely structured as both; the class as well as the object; uses the same structure. Also, unlike Java, frame do support and expect multiple inheritance. In our case, the class IndianCricketer is a multiply inherited class. It inherits both from a class called Cricketer as well as Indian. ISA is a well-known concept in frames indicating inheritance.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Though ISA sounds ironic, the idea is basically a subset relationship. When a Class1 has an ISA relationship with another class Class2, it is basically a subset of that class. We will find many such classes in surrounding. For example a Bike class and a Two-wheeler class, Indian class and Person class, Bowler class and a cricketer class. MCA-student class and a student class and so on. The word ISA or isa or is-a is derived from the fact that such relationship can be easily ascertained by testing if a statement involving both classes joined by \u201cis a\u201d is really a true statement.<\/p>\n<p>&nbsp;<\/p>\n<p>A bike is a two wheeler.<\/p>\n<p>&nbsp;<\/p>\n<p>An MCA student is a student.<\/p>\n<p>&nbsp;<\/p>\n<p>An Indian is a person.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">The ISA indicates subset of relationship while Instance of indicates membership relation. When the instance of relationship is provided, usually an object is identified as a member of the class. For example in above case, the frame M S Dhoni is connected with two classes, IndianCricketer and CSK using instance of relationship. Thus this frame is an instance of two classes at the same point of time.<\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><strong>Frame Systems<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">A singleton frame is of little use. A collection of frames, popularly known as a frame system is used for reasoning. Multiple frames are connected by many ways. Two of them are already discussed; viz. ISA and instance of. There are many other ways of doing so. The relations many a times generated based on requirement. For example if you want to find out surname of frame called Aradhya. There is a slot but the value is not provided. You will have to follow father-of link to find out surname attribute value available with father. If you find the father-of link connects to Abhishek and find out the surname is filled by value \u201cBachchan\u201d you will get the value to be filled for this frame<a href=\"#page5\">4<\/a>. If such queries are expected, you must have father of link implemented by providing that attribute which points to that class or object.<\/p>\n<table class=\"aligncenter\">\n<tbody>\n<tr>\n<td style=\"width: 345.063px;\">Frame: Indian Cricketer<\/td>\n<td style=\"width: 307.063px;\">Frame: M S Dhoni<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">ISA: Cricketer<\/td>\n<td style=\"width: 307.063px;\">Instance of : IndianCricker<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">ISA: Indian<\/td>\n<td style=\"width: 307.063px;\">Instance of : CSK<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Name<\/td>\n<td style=\"width: 307.063px;\">MahendrasinghDhoni<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Age<\/td>\n<td style=\"width: 307.063px;\">36<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Bats<\/td>\n<td style=\"width: 307.063px;\">right<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Balls<\/td>\n<td style=\"width: 307.063px;\">right<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Balls played<\/td>\n<td style=\"width: 307.063px;\">12000<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">If needed : &#8211; GetBallsPlayed()<\/td>\n<td style=\"width: 307.063px;\">11500<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">If added: &#8211; CalclulateAverage()<\/td>\n<td style=\"width: 307.063px;\">20<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Runs scored<\/td>\n<td style=\"width: 307.063px;\">01<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Overs balled<\/td>\n<td style=\"width: 307.063px;\">95<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Wickets taken<\/td>\n<td style=\"width: 307.063px;\">105<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Strike rate<\/td>\n<td style=\"width: 307.063px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Average<\/td>\n<td style=\"width: 307.063px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">If-Needed: CalculateAverage()<\/td>\n<td style=\"width: 307.063px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">Ranking: CalcRank()<\/td>\n<td style=\"width: 307.063px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">\u2026\u2026\u2026..<\/td>\n<td style=\"width: 307.063px;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 345.063px;\">\u2026..<\/td>\n<td style=\"width: 307.063px;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\"><em>Figure 28.3 A frame representing a class and a frame representing an object.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Similarly, if a query is asked, what is the value of colour of the jersey M S Dhoni wears? For which you will have to travel the instance of link (or sometimes it is denoted by team) link. Interestingly if you travel through one link representing India you will get value \u201cBlue\u201d but if you travel another link \u201cCSK\u201d you will get value \u201cYellow\u201d. When you get two different answers while travelling through two different links it is a hard problem to solve unless we have clearer context. Such a problem occurs because of multiple inheritance issue and such a hierarchy is known as entangled hierarchy.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">There are many ways Frames are implemented, even specific languages were designed and used. In most cases, general purpose languages like Java and C++ are preferred though for two reasons. First<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><em>4 For a serious representation, you may get the value of Married, Gender slots, for Gender value = Female and Married = true, the surname is derived from Husband link and parent\u00a0<span style=\"text-align: initial; font-size: 1em;\">it is easier for programmers to code and second, it is easier to integrate the solution with production like systems.<\/span><\/em><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Semantic Networks<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">Semantic network or semantic net for short is a method of connecting objects in a semantic way. Computer science has many methods for connecting objects like ER diagram, DFD, Activity Diagram and so on. Semantic Net is quite general method which represents objects and connectors. Here is one example depicted in figure 28.4.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">If you closely look at 28.4, you can understand that it describes objects and some relation between those objects. For example two objects, Mumbai and Sachin are connected with each other by a relation called Hometown; Sachin and Anjali are connected to each other using relation Wife<a href=\"#page6\">5 <\/a>and so on. Most relations are either isa or instance of though. You can see that this is an idea which complements frames. An individual object is defined and expressed using a frame, the inter-object connection is defined and expressed using semantic nets. In fact most systems are defined in both ways together.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">If you compare predicate logic representation with semantic net, you can easily get the idea that relations are predicate names and the connecting objects are arguments. For example Wife (Sachin, Anjali) describes relation Wife with two arguments, i.e. names of husband and wife.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>The importance of indicating objects<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">An interesting point comes to fore when a statement like \u201cSachin gave his bat to Sarfaraz\u201d is to be modelled. Though it would look like to be represented as shown in figure 25.5 it is really not a very good idea.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-339 size-full\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-65-e1533299525522.png\" alt=\"\" width=\"492\" height=\"279\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-65-e1533299525522.png 492w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-65-e1533299525522-300x170.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-65-e1533299525522-65x37.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-65-e1533299525522-225x128.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-65-e1533299525522-350x198.png 350w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/p>\n<div style=\"text-align: center;\">Figure 28.4 A sample semantic net describing some facts about Sachin, the cricketer<\/div>\n<div><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-409 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.3.png\" alt=\"\" width=\"426\" height=\"53\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.3.png 426w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.3-300x37.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.3-65x8.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.3-225x28.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.3-350x44.png 350w\" sizes=\"auto, (max-width: 426px) 100vw, 426px\" \/><\/div>\n<div>\n<div style=\"text-align: center;\">Figure 25.5 Incorrect way to draw semantic net<\/div>\n<p style=\"text-align: justify;\">What is wrong with this representation? There are two problems. First, the bat is not an object, it is a class. Sachin cannot give class bat to Sarfaraz, he can only give one of the objects of a given class. Second, we also have one more statement, Dravid gave his bat to Jay. The representation looks like figure 25.6. This representation is quite confusing. Who has given bat to whom? It is not at all clear.<\/p>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-340 size-full\" style=\"text-indent: 16px;\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-66-e1533299568136.png\" alt=\"\" width=\"342\" height=\"145\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-66-e1533299568136.png 342w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-66-e1533299568136-300x127.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-66-e1533299568136-65x28.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-66-e1533299568136-225x95.png 225w\" sizes=\"auto, (max-width: 342px) 100vw, 342px\" \/><\/p>\n<div style=\"text-align: center;\">Figure 28.6 Problem with representation depicted in 25.5<\/div>\n<p>&nbsp;<\/p>\n<p>Check how the problem is solved in 28.7 by providing individual object which are instances of a class bat.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">The major use of semantic net is to get answers to queries related to relations between objects. For example if you ask, \u201cHas Sachin anything to do with a Paediatrician?\u201d The answer can be sought by travelling through two different links, form objet Sachin and from class Paediatrician (both represented as nodes in the diagram, thus we are finding if there is some path exists between these two nodes under consideration). The search find some intersecting point, in this case, Anjali and the system answer\u2019s back that Sachin\u2019s wife is a paediatrician. This search, quite logically so, is named intersection search. You can again compare this discussion with predicate logic and understand that the intersection search is nothing but the inference process that we had with predicate logic.<\/p>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-410 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/28.4.png\" alt=\"\" width=\"441\" height=\"187\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.4.png 441w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.4-300x127.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.4-65x28.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.4-225x95.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/28.4-350x148.png 350w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/p>\n<div style=\"text-align: center;\">Figure 28.7 Solution to the problem depicted in 28.6<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Representing quantification<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Comparing with predicate logic, you might ask a question. How do we represent universal and existential quantification in semantic net? Let us take two statements we have introduced in module 24.<\/p>\n<\/div>\n<ol>\n<li>All of the players are physically fit<\/li>\n<li>Some of the players are singers<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">For representing statement comprising of, one method to represent is called partitioned semantic net which is shown in the figure 28.8. The S is a generic idea which represents statements made about something. We assume that the statement that we made is one of that set. S, the statement that we made, has two links for any statement which is universally quantified. All variables which are universally quantified is partitioned inside another box which\u2200 is connected using a Form link. The variable which is universally quantified is connected using link. You can see that such box does not \u2203exists, and neither of the links exist for the case depicted in 28.9. We have another link named instead.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-341 aligncenter\" src=\"http:\/\/itp6.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-67.png\" alt=\"\" width=\"647\" height=\"429\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-67.png 647w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-67-300x199.png 300w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-67-65x43.png 65w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-67-225x149.png 225w, https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-content\/uploads\/sites\/31\/2018\/07\/Untitled-67-350x232.png 350w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/p>\n<p style=\"text-align: justify;\"><span style=\"text-align: justify; font-size: 1em;\">What is the significance of fit being part of semantic net box and Physically Fit being out? We mention here that the players which are universally quantified by the variable P here, are physically fit, are part of the universal quantification and thus are determined by the variable P but, the overall class of physically fit is not quantified by this statement. Thus are shown as two different entities. Obviously the class fit is a subset of Physically Fit and thus shown connected by isa link.<\/span><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p>We have chosen a typical method of representing quantification, it will not invalidate some other method to do so.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Summary<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\">In this module we have seen three more methods of knowledge representation; i.e. using fuzzy logic, frames and semantic nets in brief. Fuzzy logic is a well-designed mathematical system for representing fuzzy sets and provide operations over them. Concepts like dirty cloths, young teacher etc. are represented using fuzzy logic. Multiple fuzzy sets are required to be consulted for executing\u00a0<span style=\"font-size: 1em;\">rules written by experts dealing with fuzzy sets. A membership grade value determines the amount of membership of an element and thus the amount of reaction. Frames are object oriented way to represent knowledge preferred due to proliferation of object oriented knowledge representation by current general purpose languages. Frame systems are multiple frames connected to each other by various relations, most special ones are is-a and instance of. Semantic nets are ways of modelling such relations between objects and provide answers to queries using intersection search. The idea of a class and an object and the difference between them is very important for successfully implementing and reasoning using frames and semantic nets.<\/span><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<table>\n<tbody>\n<tr>\n<td><strong>you can view video on Using Fuzzy logic, Frames and Semantic Netfor knowledge representation<\/strong><\/td>\n<td><a href=\"https:\/\/youtu.be\/Fki2Bs0btNU\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-120\" src=\"http:\/\/epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/2018\/11\/download.png\" alt=\"\" width=\"36\" height=\"36\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"author":4,"menu_order":28,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["prof-bhushan-trivedi"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-227","chapter","type-chapter","status-publish","hentry","contributor-prof-bhushan-trivedi"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/pressbooks\/v2\/chapters\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/wp\/v2\/users\/4"}],"version-history":[{"count":7,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/pressbooks\/v2\/chapters\/227\/revisions"}],"predecessor-version":[{"id":489,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/pressbooks\/v2\/chapters\/227\/revisions\/489"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/pressbooks\/v2\/chapters\/227\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/wp\/v2\/media?parent=227"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/pressbooks\/v2\/chapter-type?post=227"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/wp\/v2\/contributor?post=227"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/itp6\/wp-json\/wp\/v2\/license?post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}