Professional Documents
Culture Documents
Introduction
Some method must be used in order to convert
the reasoning into a form suitable for computer
manipulation.
The result is known as symbolic Logic or
Mathematical logic.
It is the system of rules that permit the drawing
of Inferences using a variety of techniques
called as Computational Logic.
Computational Logic
There are 2 kinds of the Computational
Logic
Propositional Logic
Predicate Logic
Propositional Logic
A propositional logic is nothing more than a statement
that is either True(T) or False (F).
In Propositional Logic we use the symbols such as
letters of the alphabets to represent various propositions,
premises, or conclusions. Eg.
A = The mailman comes Monday through Saturday.
B = Today is Sunday
C = The Postman will not come today.
The above is simple but Life problems involve many
interrelated propositions. To form more complex
premises, premises can be combined using logical
connections. These are Designated as “AND, OR, NOT,
IMPLIES, EQUIVALENT”.
Propositional Logic
CONNECTIVE SYMBOL
AND ^, & , п
OR V, U, +
NOT ~
IMPLIES →
If and only if <=>
EQUIVALENT Ξ
1. NOT
A = It is Raining today
Not A = It is not Raining today
A NOT A
T F
F T
AND
The Resulting proposition is true only if both
the Original propositions are True.
D = The Car is Black
E = The car has Six cylinder Engine
F = The Car is Black AND The car has Six
cylinder Engine
F = D AND E (or F=DE)
D E F
F F F
F T F
T F F
T T T
3. OR
The new proposition is true if either one or both of
the original propositions are true.
P = The moon is round.
Q = The star is bright.
R = The moon is round OR The star is bright.
R = P OR Q
P Q R
F F F
F T T
T F T
T T T
4. IMPLIES
It means that if proposition A is true then
Proposition B is also true. The truth of A implies
the Truth of B or:
A→B
Eg.
A = the Cars engine is defective
B = I Cannot drive today.
C = A IMPLIES B.
Another way to explain the IMPLIES is to use an
IF-THEN arrangement. In the above example we
can say that IF the cars engine is defective,
THEN I will not drive today.
IMPLIES
The implies function is a bit difficult to understand.
the first condition says that if A is false and B is False C
is true.
The second is that even the Cars Engine is not
defective, then I cannot drive today. Means you Cannot
drive for some other Reason.
The third says that if A is true
And C is false then A IMPLIES B
Is false. This is the only combination A B C
That gives the false result. It states F F T
that if the Cars Engine is defective,
then I can drive Today. F T T
T F F
T T T
If and only if (⇔)
A ⇔B is bi-conditional logical connective
which is true when p and q are both false or
both are true.
The truth table is as follows:
A B A⇔B
For Example:
OPEN (door)
VARIABLES
In predicate logic, letters may be substituted for the
arguments. The symbols x or y could be used to
designate some object or individual.
For Example:.
Proposition : John Likes Mercedes
Predicate Calculus Expression:
LIKES ( John, Mercedes)
x = john
y = Mercedes
LIKES (x, y)
If variables are used then the stated proposition must be
true for any names substituted for the variables.
VARIABLES and INFERENCES
Using this system a knowledge Base can be
formed. The knowledge can be manipulated to
generate inferences. Here is a simple example:
John Likes Mercedes
Ramon Likes Mercedes
John = x, Mercedes = y, Ramon = z
LIKES (x, y) AND LIKES (z, y) IMPLIES NOT LIKES (x, z)
This expression says that if John Likes Mercedes
and Ramon Likes Mercedes then John Does not Like
Ramon.
INSTANTIATIONS
It is the term given to the process of
assigning the name of a specific individual
or object to a variable.
In the previous example, plugging in John,
Mercedes and Ramon for x, y and z
respectively in the logic expression is a
case of Instantiation.
QUANTIFIRES
It is a symbol that permits you to state the
range or scope of the variables in a logical
expression
Two basic quantifiers are used in logic:
Means “for all” and is a universal
Quantifier.
is an existential Quantifier which means
there Exists.
QUANTIFIERS
For Example:
All Kabulis are Afghan Citizens
Using the Quantifiers this would be expressed as:
(x) [Kabuli (x) Afghan Citizen (x) ]
The “” symbol states that the expression is universally true that is
“for all” values of x, if x is a Kabuli, then it is true that x is also an
Afghan citizen.
Another Example:
some Cars are Red;
this could be stated as :
(x) [ car (x) AND IS RED (x)]
This means that there is a particular car x that
satisfies the expression. There exists an object x that is
a car AND that object is RED.
REASONING WITH LOGIC
Up till now we have shown here is a system of
expressing facts and knowledge in symbolic
form.
We want this knowledge to make some
inferences.
How do we use this knowledge to answer
questions or draw some conclusions?
The simplest rule of inferences is Modus ponens
and the rule says that, “if proposition A and A
IMPLIES B are true, then the proposition B is
true. Expressed logically
[A AND (A B) ] B
EXAMPLE OF MODUS PONENS
[A AND (A B) ] B
A – It is Sunny
B – we will go to PICNIC
A B - If it is sunny we will go to
PICNIC.
We know through our brains but the
computer must be told about simple
inferences like Modus Ponens.
SEMANTIC NETWORKS
The oldest and easiest way of knowledge representation .
They are the graphical depictions of knowledge that show hierarchal
relationship between objects.
Made up of a number of circles and nodes which represent object
and descriptive information about those objects.
Objects can be any items
Books
Cars
Desk
Person
Nodes can also be concepts, events or actions. A concept might be
Ohm’s law; an event, a picnic or election. Etc.
SEMANTIC NETWORKS
The nodes in a semantic net can be
interconnected by links or arcs.
These arcs show the relationship between
objects and descriptive factors.
Some of the most common arcs are of the Is-a
or has-a type.
Isa type is used to show the class relationship; that is,
that an object belongs to a larger class or category of
an object.
Has-a links are used to identify characteristics or
attributes of the object nodes.
Other arcs are used for definitional purposes.
BOY Is a
as Is a Is a HUMAN
H d KAY WOMAN
Goes to C hil
SCHOOL JOE H a
as Is
Ch Has Wife
ild MAN
a
Is
CAR Owns
SAM Is a Works for ACME
A VP
Is a
Sub of
MERCEDES
r
lo
Co
Made In AJAX
SILVER
GERMANY