CHP1
CHP1
A sentence or well formed formula wff α is said to be satisfiable if there exist at least one interpretation
for which α is true.
A sentence or well formed formula wff α is said to be unsatisfiable if the value of α is false under all
interpretations.
Inference is the process of deriving new sentences from old ones. Sound inference algorithms derive
only sentences that are entailed: complete algorithms derive all sentences that are entailed.
Propositional logic is a very simple language consisting of proposition symbols and logical connectives.
It can handle propositions that are known true, known false, or completely unknown.
The set of possible models, given a fixed propositional vocabulary, is finite, so entailment can be
checked by enumerating models. Efficient model-checking inference algorithms for propositional logic
include back tracking and local searching methods and can often solve large problems very quickly.
Inference rules are patterns of sound inference that can be used to find proofs. The resolution rule
yields a complete inference algorithm for knowledge bases that are expressed in conjunctive normal
form. Forward chaining and backward chaining are very natural reasoning algorithms for knowledge
bases in Horn form.
When use of Truth Table approach result in wastage of time exploring all possibilities, we need some
other methods to prove validity of the formula directly. Some such methods are:
1. Natural Deduction System
2. Axiomatic System
3. Semantic Tableau Method
4. Resolution Refutation Method
Propositional logic is reasonably effective for certain tasks within an agent, but does not scale to
environments of unbounded size because it lacks the expressive power to deal concisely with time,
space, and universal patterns of relationships among objects.
The Propositional Calculus
1. Atoms: The two distinguished atoms T and F are countably infinite set of characters that begin
with a capital letter. Example: P, Q, R, . . . , P1, P2, ON_A_B …
2. Connectives:
∨ OR
𝖠 AND
→ IMPLIES
¬ NOT
Examples of wffs:
1. (P 𝖠 Q) → ¬P
2. P → ¬P
3. P ∨ P → P
4. (P → Q) → (¬Q → ¬P)
5. ¬¬ P
4. Rules of Inference: Number of ways by which additional wffs can be produced.
Some common inference rules:
1. The wff w2 can be inferred from the wffs w1 and w1 → w2 (modus ponens)
2. The wff w1 𝖠 w2 can be inferred from the two wffs w1 and w2 (𝖠 introduction)
3. The wff w2 𝖠 w1 can be inferred from w1 𝖠 w2 (commutativity of 𝖠)
4. The wff w1 can be inferred from w1 𝖠 w2 (𝖠 elimination)
5. The wff w2 ∨ w1 can be inferred from the single wff w2 (∨ introduction)
6. The wff w1 can be inferred from ¬(¬w1) (¬ elimination)
5. Proof (also called Deduction)
The sequence of wffs {w1, w2, w3, . . . , wn} is called a proof of wn from a set of wffs
δ iff each wi in the sequence is either in δ or can be inferred from a wff (or wffs) earlier in
the sequence by using one of the rules of inference.
P P→ R
Q R
6. Interpretation: An association of atoms with propositions. Atoms have values – True or False.
w1 w2 w1 𝖠 w2 w1 ∨ w2 ¬(¬w1) w1 → w2
True True True True False True
True False False True False False
False True False True True True
False False False False True True
The Propositional Truth Table.
7. Resolution in Propositional Calculus
Several rules of inference can be combined into one rule called Resolution.
Literal: either an atom (positive literal) or negation of atom (negative literal)
Clause: is a set of literals. (s special kind of wff)
Example: {P, Q, ¬R} (equivalent to P ∨ Q ∨ ¬R) is a wff.
Resolution on Clauses:
Resolution Rule for Propositional Calculus:
From { λ } 𝖴 Σ1 and {¬ λ } 𝖴 Σ2 where Σ1 and Σ2 are sets of literals and λ is an atom.
We can infer, Σ1 𝖴 Σ2 called the resolvent of the clauses, and the atom λ is the atom resolved
upon.
The process is called resolution.
Examples:
1. Resolving R ∨ P and ¬P ∨ Q yields R ∨ Q
The two clauses being resolved can be rewritten as the implications: ¬R → P and P → Q.
A rule of inference called chaining applied to these implications yields: ¬R → Q.
Which is equivalent to the resolvent R ∨ Q. Thus, chaining is a special case of resolution.
2. Resolving R and ¬R ∨ P yields P.
Since the second clause is equivalent to R → P. Thus, modus ponens is also a special case of
resolution.
3. Resolving R ∨ Q ∨ R ∨ S with ¬P ∨ Q ∨ W on P yields Q ∨ R ∨ S ∨ W. Note that
only oneinstance of Q appears in the resolvent.
4. Resolving P ∨ Q ∨ ¬R with P ∨ W ∨ ¬Q ∨ R on Q yields P ∨ ¬R ∨ R ∨ W.
Resolving them on R yields P ∨ Q ∨ ¬Q ∨ W.
In this case, since both ¬R ∨ R and Q ∨ ¬Q have value True, the value of each of
these resolvents is True. In this example, we must resolve either on Q or on R – not
on bothsimultaneously, that is, P ∨ W is not a resolvent of two clauses!
8. Converting Arbitrary wffs to Conjunction of Clauses
Any wff in the propositional calculus can be converted to an equivalent conjunction of clauses.
A wff written as a conjunction of clauses is said to be in conjunctive normal form (CNF).
A wff written as a disjunction of conjunction of literals is said to be in disjunctive normal form
(DNF).
Example:
1. wff: ¬(P → Q) ∨ (R → P)
Step 1: Eliminate implication signs by using the equivalent form using ∨:
¬ (¬P ∨ Q) ∨ (R ∨ P)
Step 2: Reduce the scopes of ¬ signs by using De Morgan’s laws and by eliminating double ¬
signs:
(P 𝖠 ¬Q) ∨ (¬R ∨ P)
Step 3: Convert to CNF by using the associative and distributive laws. First,
(P 𝖠 ¬R ∨ P) 𝖠 (¬Q ∨ ¬R ∨ P) then,
(P 𝖠 ¬R ) 𝖠 (¬Q ∨ ¬R ∨ P)
A conjunction of clauses (that is, the CNF form of a wff) is usually expressed as a set of
clauses (with conjunction of the clauses implied); thus,
{ (P 𝖠 ¬R ), (¬Q ∨ ¬R ∨ P)}
9. Resolution Refutations
A resolution refutation for proving an arbitrary wff w, from a set of wffs δ.
Proceed as follows:
1. Convert wffs in δ to clause from – a (conjunctive) set of clauses.
2. Convert the negation of the wff to be proved w, to clause form
3. Combine the clauses resulting from steps 1 and 2 into a single set T.
4. Iteratively apply resolution to the clauses in T and add the results to T either until there are
no more resolvents that can be added or until the empty clause is produced.
Example: Robot lifting a block
Consider a robot that is able to lift a block, if that block is liftable, and if the robot’s battery
power source is adequate. If both these conditions are satisfied, then when the robot tries to lift
a block it is holding, its arm moves. We represent the above conditions by binary-valued
features:
x1 (BAT_OK)
x2 (LIFTABLE)
x3 (MOVES)
¬BAT_OK ∨
¬MOVES
¬BAT_OK
BAT_OK
Nil
Boolean Function
Definition:
Let B = {0, 1}. Then Bn = {(x1, x2, . . . , xn) | xi ∈ to B for 1≤ i ≤ n} is the set of all possible n-tuples of 0s
and 1s. The variable x is called a Boolean Variable if it assumes values only from B, that is, it its’ only
possible values are 0 and 1. A function from Bn to B is called Boolean Function of Degree n.
Example:
A Boolean Function of degree two is a function from a set with four elements, namely, pairs of elements
from B = {0, 1} to B, a set of two elements. Hence, there are 16 different Boolean Functions of degree
two, example, F(xy) = F10 = xy’.
Boolean Algebra
Boolean algebra provides the operations and the rules for working with the set {0, 1}.
Operations include complementation (¬ ), sum (∨), and product (𝖠).
Examples: 1.0 + (0 + 1)’ = 0; (T F) ∨ ¬ (T F) = F;
(T T) ∨ ¬ F = T; (1.1) + 0’ =1
Boolean Identities
Identity Name
x’’ = x Law of double compliments
x + x =x Idempotent
x.x = x
x +0 = x Identity
x.1 = x
x+1=1 Domination
x.0 = 0
x+y=y+x Commutative
xy = yx
x + (y + z) = (x + y) + z Associative
X(y + z) = xy + xz Distributive
x +yz = (x +y)(y + z)
(xy)’ = x’ + y’ DeMorgan’s
(x + y)’ = x’y’
x + xy = x Absorption
x(x +y) = x
x + x’ = 1 Unit property
x.x’ = 0 Zero property
Quine – Mc Clusky Method
1. Express each minterm in n variables by a bit string of length n with a 1 in the ith position of xi
occurs and a 0 in this position if xi’ occurs.
2. Group the bit strings according to the number of 1s in them.
3. Determine all products in n-1 variables that can be formed by taking the Boolean sum of
minterms in the expression. Minterms that can be combined are represented by bit strings that
differ in exactly one position. Represent these products in n-1 variables with strings that have a
1 in the ith position if xi occurs in the product, a 0 in this position if xi’ occurs, and a dash in this
position if there is no literal involving xi in the product.
4. Determine all products in n-2 variables that can be formed by taking the Boolean sum of the
products in n-1 variables found in the previous step. Products in n-1 variables that can be
combined are represented by bit strings that have a dash in the same position and differ in
exactly one position.
5. Continue combining Boolean products in fewer variables as long as possible.
6. Find all the Boolean products that arose that were not used for to form a Boolean product in
one fewer literal.
7. Find the smallest set of these Boolean products such that sum of these products represent the
Boolean functions. This is done by forming a table showing which minterms are covered by
which products. Every minterm must be covered by at least one product. The first step in using
this table is to find all essential prime implicants. Each essential prime implicant must be
included because is the only prime implicant that covers one of the minterms. Once we have
found essential prime implicants, we can simplify the table by eliminating the column for
minterms covered by this prime implicant. Furthermore, we can eliminate any prime implicants
that cover a subset of minterms covered by another prime implicant. Moreover, we can
eliminate from the table the column for a minterm if there is another minterm that is covered
by a subset of all the prime implicants that cover this minterm. This process of identifying
essential prime implicants that must be included, followed by eliminating redundant prime
implicants and identifying minterms that can be ignored, is iterated until the table does not
change. At this point we use a backtracking procedure to find the optimal solution which we
compare to the best solution found so far at each step.
Given:
Term Bit String Number of 1s
wxyz’ 1110 3
wx’yz 1011 3
w’xyz 0111 3
wx'yz’ 1010 2
w'xy’z 0101 2
w'x’yz 0011 2
w'x’y’z 0001 1
A language that refers to Objects in the world and Propositions about the world.
Components:
1. Object Constants: strings of alphanumeric characters. Example: Aw3.
2. Function Constants: strings of alphanumeric characters beginning always with a lower case
letter and superscripted by their arity. Example: distanceBetween2, times2.
3. Relation Constants: strings of alphanumeric characters beginning with a capital letter and
superscripted by their arity. Example: B153, clear1.
4. Connectives and delimiters: 𝖠, ∨, ¬, →
(, ), [, ], ,
Terms:
1. An object constant is a term.
2. A function constant of arity n, followed by n terms in parentheses and separated by commas, is
a term. This type of term is called a functional expression. Example: fatherOf(john, Bill), times(4,
plus(3,6)).
Wffs:
1. Atoms: a relation constant of arity n followed by n terms in parantheses and separated by
commas is an atom (atomic formula). A relation constant of arity 0 omits the parantheses. An
atom is a wff. Example: P(A, B, C, D), Q.
2. Propositional wffs: any expression formed out of predicate-calculus wffs in the same way that
the propositional calculus forms wffs out of other wffs is a wff, called a propositional wff.
Example:[Greaterthan(7, 2) 𝖠 Lessthan(15, 41)] ∨ P.
Semantics:
Worlds
1. The world can have infinite number of objects (individuals) in it.
2. Functions on individuals: we can have an infinite number of functions of all arities that map m
tuples of individuals into individuals. Example: A function that maps a person into his/her father.
3. Relations over individuals: the individuals can participate in an arbitrary number of relations.
These will each have arities. (A relation of arity 1 is called property).
Interpretations:
Interpretation of an expression is an assignment that maps object constants into objects in the
world, n-ary function into n-ary functions, and n-ary relation constants into n-ary relations.
These assignments are called denotations of their corresponding predicate-calculus expressions.
The set of objects to which object constant assignments are made is called domain of the
interpretation.
Example: Blocks World
Individuals: A, B, C, and Floor
Relations: On, Clear
B
A Representation in predicate calculus: A, B, C, Fl
Binary Constant: On
C
Floor Unary Relation Constant: Clear
Quantification
Quantification over variable symbols gives the predicate calculus the expressive power. Quantification
over relation and function symbols are not allowed in First-Order Predicate Calculus. Higher-Order
Predicate Calculii allow quantification over relation and function symbols.
1. Variable symbols: strings P1, f(x, Bob, C17)
2. ∀ Universal Quantifier
∃ Existential Quantifier
3. (∀ξ)w and (∃ξ)w are wffs.
(Qξ)w: closed wff (closed sentence) Q: either ∀ or ∃
Wff w is said to be within the scope of quantification. Variable symbol ξ is quantified over.
Rules of Inference
1. Universal Instantiation (UI)
From (∀ξ) w(ξ), infer w(α), where w(ξ) is any wff with variables ξ, α is any constant symbol, and
w(α) is w(ξ) with α substituted for ξ throughout w.
Example: from (∀x) P(x, f(x), B) infer P(A, f(A), B).
2. Existential Generalization (EG)
From w(α), infer (∃ξ) w(ξ), where w(α) is a wff containing a constant symbol α, and w(ξ) is a form
with ξ replacing every occurrence of α throughout w.
Example: From (∀x) Q(A, g(A), x) infer (∃y) (∀x) Q(y, g(y), z)
3. Include propositional-calculus rules of inference
1. modem ponens
2. 𝖠 introduction and elimination
3. ∨ introduction
4. ¬ elimination
5. Resolution
2. Every package in room 27 is smaller than one of the packages in room 29.
(∃y)(∀ ){[package(x) 𝖠 Package(y) 𝖠 Inroom(x, 27) Inroom(y, 29)] → Smaller(x,
y)](∀ )(∃y){[package(x) 𝖠 Package(y) 𝖠 Inroom(x, 27) Inroom(y, 29)] →
Smaller(x, y)]
Figure 1. A Configuration Table 1. Mapping between Predicate Calculus Figure 2. A set of Formulas
of Blocks World and the World. embodying knowledge
Prolog
Prolog is an acronym for Programming in Logic by Alain Colmeraur, 1970 (Univ. of France). David H. D. Warren
(Scotland) wrote first compiler. It is a declarative language and is an approximate implementation of logic
programming language on a sequential machine. Logic program is a set of clauses. Prolog views set of clauses as a
sequence of Horn Clauses. A Horn Clause is a clause with at most one positive literal. PARALOG , concurrent Prolog,
GHC are based on parallel execution.
In Prolog, the Horn clauses function as statements of the language and are written in the following formats:
Facts: λh :-
The literals in goals and in the bodies of rules are ordered lists, and this order plays an important role in execution
of a Prolog program.
Prolog program is expressed in terms of program clauses (rules and facts) and the goals are solved using these
clauses. An interpreter is a program that can take another program as input. An interpreter is known as meta
interpreter for a language if it is written in the same language. A meta interpreter for Prolog may be used for
generation of Proof Tree. Prolog interpreter uses the resolution refutation method. If it succeeds in refuting
(contradiction), the goal is said to be a logical consequence of the Prolog program. Both recursive and iterative
programming can be attempted in Prolog. Prolog uses the following control strategies:
1. Forward movement
2. Unification (Matching)
3. Backtracking – Deep Backtracking, and Shallow Backtracking
Recursive Data Types are implemented in Prolog. Linked Lists and Binary Trees can be implemented.
The inference over Prolog clauses consists of attempting to ‘prove’ a goal clause and is performed by executing a
Prolog program. Such a Proof is achieved by resolution-like operations performed on Prolog facts, goals, and rules.
Each resolution is performed between a goal and either a fact or a rule:
1. A goal can resolve with a fact by unifying the fact with one of the literals in the goal. We call this
literal the one resolved upon. The resolvent is a new goal consisting of a list of all of the substitution
instances of the other literals in the original goal written in the same order as in original goal. The
substitution instances are obtained by applying the mgu of the unification to all of these other
literals.
2. A goal can resolve with rule by unifying the head of the rule with one of the literals in the goal. The
resolvent is a new goal formed by appending the list of substitution instances of all of the literals in
the body of the rule to the front of the list of substitution instances of all of the other (non-resolved-
upon) literals in the goal.
Prolog handles two major issues:
1. Choosing the first sub goal from the resolvent. (Uses depth-first strategy while satisfying sub goals in the
resolvent. Order of rules and goals are significant and lead to different results with different orders)
2. Choosing the first clause that matches when the clauses are sequentially searched from top to bottom in
the program.
Issues in Prolog
1. Redundancy – generation of same solution many times
2. Termination – fails to find the solution using depth first strategy with infinite branch that does not
terminate computation.
Syntax
1. Rules and facts are terminated by a full stop (.)
2. Prolog goal (query) is written after the symbol ?- and terminated by full stop (.). A goal may be simple or
conjunction of sub goals.
3. Variable names must start with uppercase alphabets and may be constituted by letters, numerals, and the
underscore symbol ( _ ).
4. Constants may be in the form of integers (such as 4), symbols (such as mary), and strings (‘This is a
string’). Strings are always enclosed within single quotes.
5. Function and Predicate names must start with lower case alphabets and are formed using lowercase
letters, numerals, and the underscore symbol ( _ ).
6. All the rules and facts of the same predicate name should appear together in the program.
A Prolog program for proving that the arm moves, given AND-OR PROOF TREE
that the block is liftable and the battery is charged:
BAT_OK LIFTABLE
Fact2 Fact3
BAT_OK LIFTABLE
Assignment:
1. Study Reference Manual and prepare a summary note not exceeding two pages bringing out salient
features offered in SWI Prolog version 7.4, January 2017, University of Amsterdam.
2. Write a Prolog program and print the solution using the notes provided on Four disc Towers-of-Hanoi on
the reverse of this page.
Simple Prolog Programs
cs.toranto.edu
likes(mary,food).
likes(mary,wine).
likes(john,wine).
likes(john,mary).
| ?- likes(mary,food).
yes.
| ?- likes(john,wine).
yes.
| ?- likes(john,food).
no.
James I
|
|
+ + +
| |
Charles I Elizabeth
| |
| |
+----------+------------+ |
| | | |
Catherine Charles II James II Sophia
|
|
|
George I
female(catherine).
female(elizabeth).
female(sophia).
parent(charles1, james1).
parent(elizabeth, james1).
parent(charles2, charles1).
parent(catherine, charles1).
parent(james2, charles1).
parent(sophia, elizabeth).
parent(george1, sophia).
| | |
xxx | |
xxxxx | |
xxxxxxx | |
Here's a sample:
% move(N,X,Y,Z) - move N disks from peg X to peg Y, with peg Z being the
% auxilliary peg
%
% Strategy:
% Base Case: One disc - To transfer a stack consisting of 1 disc from
% peg X to peg Y, simply move that disc from X to Y
% Recursive Case: To transfer n discs from X to Y, do the following:
Transfer the first n-1 discs to some other peg X
Move the last disc on X to Y
Transfer the n-1 discs from X to peg Y
move(1,X,Y,_) :-
write('Move top disk from '),
write(X),
write(' to '),
write(Y),
nl.
move(N,X,Y,Z) :-
N>1,
M is N-1,
move(M,X,Z,Y),
move(1,X,Y,_),
move(M,Z,Y,X).
?- move(3,left,right,center).
Move top disk from left to right
Move top disk from left to center
Move top disk from right to center
Move top disk from left to right
Move top disk from center to left
Move top disk from center to right
Move top disk from left to right
yes
4. An example using lists:
size([],0).
size([H|T],N) :- size(T,N1), N is N1+1.
% or size([_|T],N) :- size(T,N1), N is N1+1.
| ?- size([1,2,3,4],N).
N = 4
yes
| ?- size([bill,ted,ming,pascal,nat,ron],N).
N = 6
yes
| ?- size([a, [b, c, d], e, [f | g], h], N).
N = 5
yes
sumlist([],0).
ssumlist([H|T],N) :- sumlist(T,N1), N is N1+H.
member(X,[X|_]).
member(X,[_|T]) :- member(X,T).
reverse(List, Reversed) :-
reverse(List, [], Reversed).
| ?- myreverse([a,b,c,d],X).
no
| ?- myreverse([a,b,c,d],[d,b,c,a]).
no
| ?- myreverse([a,b,c,d],[d,c,b,a]).
yes
If wff w is not logically entailed by a Δ (set of wffs), the resolution refutation procedure might never
terminate. Thus resolution cannot be used as a full decision procedure.
It can be shown that there is no other method that will always tell us that a wff w does not logically
follow from a set of wffs Δ when it doesn’t. Because of this fact, we say that the predicate calculus is
semi-decidable. Semi-decidability makes the predicate calculus inherently intractable. Even on problems
for which resolution refutation terminates, the procedure is NP-hard. Although many reasoning
problems can be formulated as problems of resolution refutation, the method is intractable for very
large problems.
With relaxation on three properties above, a less expressive language than the predicate calculus is
sufficient for many applications. Reasoning using Horn clauses is more efficient. Horn clauses form the
basis of the programming language Prolog.
1. If there is at least one negative literal and a single positive literal, the Horn clause can be written
as an implication whose antecedent is a conjunction of positive literals and whose consequent is
a single positive literal. Such a clause is called a rule.
2. There may be no negative literal in the clause, in which case, we write it as an implication whose
antecedent is empty and whose consequent is a single positive literal. Such a clause is called a
fact.
3. There may be no positive literal in the clause, in which case, we write it as an implication whose
consequent is empty and whose antecedent is a list of positive literals. Such a clause is called a
goal.
Semantic Nets
The main idea behind semantic nets is that the meaning of a concept comes from the ways in which it is
connected to other concepts. In a semantic net, information is represented as a set of nodes connected
to each other by a set of labeled arcs, which represent relationships among the nodes.
Mammal
isa
has-part
Person Nose
instance
uniform-code team
Blue Roger Manchester
Figure 1. An example Semantic Net. An additional relation has-part(Roger, Nose) is derived using
Inheritance.
Give Book
instance instance
agent object
John EV7 BK23
beneficiary
Mary
Person
Isa: Mammal
Cardinality: 6, 000, 000, 000
*handed: Right
Adult-Male
Isa: Person
Cardinality: 2, 000, 000, 000
*handed: 5-10
ML-Baseball-Player
Isa: Adult-Male
Cardinality: 624
*height: 6-1
*bats: equal to handed
Fielder
Isa: ML-Baseball-Player
Cardinality: 376
*batting-average: .262
Pee-Wee-Reese
Instance: Fielder
Height: 5-10
Bats: Right
ML-Baseball-Team
Isa: Team
Cardinality: 26
*team-size: 24
Brooklyn-Dodgers
Instance: ML-Baseball-Team
Team-size: 24
Manager: Leo-Durocher
AI programs that achieve expert level competence in solving problems by bringing to bear a body of
knowledge are called knowledge-based systems or expert systems.
Expert User
User Interface
Knowledge
acquisition
subsystem
Explanation
Subsystem
Knowledge Engineer
In many applications, the system has access only to uncertain rules, and the user may also not be
able to answer questions with certainty.
Example: MYCIN system [Shortliffe 1976] – bacterial infections diagnosis
Rule 300
If:
1. The infection which requires therapy is meningitis, and
2. The patient does have evidence of serious skins or soft tissue infection, and
3. Organisms were not seen on the stain of the culture, and
4. The type of the infection is bacterial
Then:
There is evidence that the organism (other than those seen on cultures or smears) which might
be
causing the infection is staphylococcus-coag-pos (0.75); streptococcus-group-a (0.5).
The numbers 0.75 and 0.5 in MYCIN above represent the certainty or strength of a rule. They are
used by the system in computing the certainty of conclusions.
Shell: The E.S shell simplifies the process of creating a knowledge base. It is the shell that
actually processes the information entered by a user relates it to the concepts contained in the
knowledge base and provides an assessment or solution for a particular problem. Thus E.S
shell provides a layer between the user interface and the computer O.S to manage the input
and output of the data. It also manipulates the information provided by the user in conjunction
with the knowledge base to arrive at a particular conclusion.
Domain: Eating
Facts:
Rough Form Proper Form
Eating good food keeps health Ramu eats good food
Ramu is healthy
Siva eats good food
Siva is healthy
Rajani eats good food
Rajani is healthy
John eats good food
John is healthy
Eating when hungry makes life better Ramu eats when hungry
Rajani eats when hungry
Eating food makes us survive Siva is alive
Ramu is alive
John is alive
Eating food makes us grow Ramu grows
Rajani grows
Eating food more than required leads to obesity Jhonny eats more food
Prabhu eats more food
Jhonny is obese
Prabhu is obese
Obesity leads to bad health Prabhu is not healthy
Jhonny is not healthy
Gulping food without chewing leads to bad health Srinu gulps food to eat
Srinu does not chew food to eat
Ramu chews food to eat
Siva chews food to eat
Jhonny gulps food to eat
Prabhu gulps food to eat
Eating natural food keeps body and mind healthy Ramu eats natural food
Siva eats natural food
Rajani eats natural food
Not eating any food for days is dangerous to life Jhanavi is not eating food for some days
Raghava is not eating food for some days
Eating junk materials is dangerous to life Madhav eats junk material
Raghava eats junk material
Junk materials are not food Junk materials are not food
Wheat is good food Wheat is food
Rice is food
Cereals are food
Tobacco is junk material Tobacco is junk material
Pan Masala is junk material
Cocaine is junk material
Vegetables are good food Vegetables are good food
Fruits are good food Fruits are good food
Apple is a fruit Apple is a fruit
Banana is a fruit
Orange is a fruit
Beans is a vegetable Beans is a vegetable
Brinjal is a vegetable
Tomato is a vegetable
Person Eats Food Health
What When How Quantity Alive Leads to
Death
G B H NH C G N R MR Healthy Not Dangerous
Healthy
Ramu Apple H C R T
Siva Beans H C R T
Rajani Wheat H C R T
John Oranges H C R T
Jhonny Rice NH MR T
Prabhu Tobacco NH C MR T
Srinu H N T
Jhanhavi H N T
Raghava Pan H C MR T
Masala
Madhav Cocaine G R T
G: Good Food B: Bad Food H: Hungry NH: Not Hungry C: Chews G: Gulps N: No Food for Many Days R: Required Quantity
MR: More than Required Quantity T: True
Table 1. Summary of Facts for development of Rules
Expert User
User Interface
Knowledge
acquisition
subsystem
Explanation
Subsystem
Knowledge Engineer