Artificial Intelligence
Artificial Intelligence
Artificial Intelligence
Logic:
Logic is a method of reasoning process in which conclusion are
drawn from premises using rule of inference. It is one way of
representing facts. The language of logic is appealing because it
immediately suggests a powerful way of deriving new knowledge from
old. In this formalism, we can conclude that a new statement is true by
proving that it follows from the statements that are already known.
1. Propositional Logic
2. First Order Predicate Logic
3. Higher Order Predicate Logic
4. Fuzzy Logic
Propositional Logic:
For example:
P: it is hot
Q: it is humid
R: it is raining
i) QP
ii) (P^Q) ¬R
Inference Rules:
1. Modus Ponens:
The Modus Ponens rule is one of the most important rules of inference,
and it states that if P and P → Q is true, then we can infer that Q will be
true. It can be represented as:
Example:
2. Modus Tollens:
The Modus Tollens rule state that if P→ Q is true and ¬ Q is true, then
¬ P will also true. It can be represented as:
Example
Statement-1: "If I am sleepy then I go to bed" ==> P→ Q
Statement-2: "I do not go to the bed."==> ~Q
Statement-3: Which infers that "I am not sleepy" => ~P
3. Hypothetical Syllogism:
Statement-1: If you have my home key then you can unlock my home.
P→Q
Statement-2: If you can unlock my home then you can take my money.
Q→R
Conclusion: If you have my home key then you can take my money.
P→R
4. Disjunctive Syllogism:
The Disjunctive syllogism rule state that if P∨Q is true, and ¬P is true,
then Q will be true. It can be represented as:
Example:
5. Addition:
The Addition rule is one the common inference rule, and it states that If
P is true, then P∨Q will be true.
Example:
7. Conjunction:
The conjunction rule states that if P is True and Q is True then P^Q
will also be true.
P, Q
P^Q
NOTE:- Tautology is a formula or assertion that is true in every possible
interpretation. For e.g. ¬ (¬p)p , the formula is true in every possible
interpretation.
Semantic Network:
· One node has no parent; it is called the root node. Other nodes have
exactly one parent.
Inheritance:
Multiple Inheritances:
father(david)
price(apple)
Propositional logic assumes the world contains facts that are true or
false. FOPL not only assumes that the world contains facts like
propositional logic but also assumes the following things in the world:
Examples:
Frames:
1. Object:
An object is an instance of class as like object oriented
programming. Every real world entity is represented as an
object which is the instance of the entity (class). i.e. if
person is the entity then Ram, Bob etc are its instances
(objects).
2. Slots:
The slot defines the relationship between the object and the
slot values (fillers) or other object. It is like the edge in a
semantic network.