Knowledge Representation in Artificial Intelligence

343 views 68 slides Nov 23, 2024
Slide 1
Slide 1 of 68
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68

About This Presentation

AI


Slide Content

Knowledge Representation in Artificial Intelligence Dr. Mehak Saini

Knowledge Representation A knowledge representation system should provide ways of representing complex knowledge and should possess the following characteristics: 1. The representation scheme should have a set of well-defined syntax and semantics. 2. The knowledge representation scheme should have a good expressive capacity. 3. The representation must be efficient, i.e., it should use only limited resources without compromising on the expressive power.

How is a knowledge base different from a database?

1. Propositional Logic

Commonly Used Propositional logic connectives S. no. Name Connective Symbol 1. Conjunction AND & 2. Inclusive disjunction OR V 3. Negation NOT ̄ 4. Material Condition IMPLIES 5. Material biconditional IFF 6. Exclusive disjunction XOR 7. Joint Denial NAND ׀ 8. Disjoint Denial NOR S. no. Name Connective Symbol 1. Conjunction AND & 2. Inclusive disjunction OR V 3. Negation NOT ̄ 4. Material Condition IMPLIES 5. Material biconditional IFF 6. Exclusive disjunction XOR 7. Joint Denial NAND ׀ 8. Disjoint Denial NOR

A B ̄ A ̄B AVB A&B A B A B A+B A ׀ B A B T T F F T T T T F F F F T T F T F T F T T F T F F T T F F F T T F F F T T F F T T F T T A B ̄ A ̄B AVB A&B A+B A ׀ B T T F F T T T T F F F F T T F T F T F T T F T F F T T F F F T T F F F T T F F T T F T T Truth table for logical connectives

Logical Equivalence

Problem: To verify that ((A & (A B)) B) is a tautology  

Commonly used logical Equivalences

What is tautology in propositional logic? A tautology in propositional logic is a formula or statement that is always true, regardless of the truth values of its component propositions. For example, "P ∨ ¬P" (P or not P) is a tautology because it is always true whether P is true or false.   Another example of a tautology in propositional logic is: "(P → Q) ∨ (Q → P)" This means "if P implies Q or Q implies P," which is always true, regardless of the truth values of P and Q.   "(P ∧ True) → P" This means "P and true implies P," which is always true, regardless of the truth value of P.

Statements that are tautologies Statements that are Contradictions

Normal forms in Propositional Logic Conjunctive Normal Form (CNF) Disjunctive Normal Form (DNF) *A formula A is said to be in CNF if it has the form A= & & … & , n≥1 Where … is a disjunction of an atom or negation of an atom *A formula A is said to be in DNF if it has the form A= … V , n≥1 Where … is a conjunction of an atom or negation of an atom  

Conversion Procedure of formula to Normal Form Eliminate implications and biconditionals . 2. Reduce the scope of NOT symbol by the formula ( ̄( ̄A))=A and apply DeMorgan’s theorem to bring the negations before the atoms. 3. Use Distributive laws and other formulae to obtain the normal form.

2. Predicate Logic

Predicate or First order logic A predicate is defined as a relation that binds two atoms together, e.g., Bhaskar likes aeroplanes is represented as LIKES ( Bhaskar , aeroplanes ). Here, LIKES is a predicate that links two atoms “ Bhaskar ” and “ aeroplanes ”. This predicate can be generalized as, LIKES( x,y ) where x and y are variables meaning x likes y.

Main purpose of predicate logic in AI ? The main purpose of predicate logic in AI is to provide a formal framework for representing and reasoning about facts and relationships in a domain. It helps in defining rules, making inferences, and solving problems that involve logical relationships.

What are universal and existential quantifiers Universal Quantifier ( ∀ ): It denotes "for all" or "for every." It implies that a statement applies to all elements within a certain domain. For example, ∀ x P(x) means that the predicate P(x) is true for all x. Existential Quantifier ( ∃ ): It denotes "there exists" or "for some." It implies that there is at least one element in the domain for which the statement is true. For example, ∃ x P(x) means that there exists at least one x for which P(x) is true.

Quantifiers

NORMAL FORMS IN PREDICATE LOGIC In predicate logic normal form is Prenex Normal form. A formula A in predicate logic is said to be in Prenex Normal form if it has the form ( ) ( )… ( ) B Where ( is either a V or 3 and B is a formula without any quantifiers. ( ) ( )… ( ) is called the prefix and B is called matrix of the formula .  

Formulae for Prenex Normal form Conversion

Rules of Inference S. no. Description Rule of Inference 1. 2. 3. 4. 5. Addition Simplification Modus Ponens Modus Tollens Disjunctive Syllogism

Rules of Inference (Contd.)

Describe the rule represented by the following statement in predicate logic: " ∀ x Animal(x) → Eats(x, 'Food')" This statement in predicate logic can be read as: "For all x, if x is an animal, then x eats food." It means that every animal eats food.

Resolution Given any two clauses A and B, if there is a literal P1 in A which has a complementary literal P2 in B, delete P1 and P2 from A and B and construct a disjunction of the remaining clauses. The clause so constructed is called the resolvent of A and B. Example:

Limitations of Logic as knowledge representation Scheme * * * * * *

3. Rule Based System

4. Semantic Networks

Definition Semantic net (or semantic network) in AI is a graphical representation of knowledge that uses nodes to represent objects, concepts, or entities, and edges (links) to represent the relationships between them. It is commonly used to show hierarchical relationships or associations between different elements in a system, aiding in knowledge representation and reasoning.

Semantic Networks A semantic network is a structure for representing knowledge as a pattern of interconnected nodes and arcs. It is defined as a graphical representation of knowledge. The objects under consideration serve as nodes and the relationship with other nodes give the arcs. Nodes in the semantic net can be generic or individual node.

Draw the semantic net for the following information: Alice is a doctor. Alice works at City Hospital. City Hospital is located in New York. Alice drives a red car.

Here’s the answer to the semantic net for the provided information:   1. A node for "Alice" connected to a node labeled "Doctor" with an "is-a" relationship. 2. A node for "Alice" connected to a node labeled "City Hospital" with a "works-at" relationship. 3. A node for "City Hospital" connected to a node labeled "New York" with a "located-in" relationship. 4. A node for "Alice" connected to a node labeled "Red Car" with a "drives" relationship.   Graphically, it looks like this:     This graph represents the relationships and information given in the question.

Draw the semantic net for the following information: John is a professor. John works at Harvard University. Harvard University is located in Boston. John teaches Computer Science.

Here’s the semantic net for the provided information:   1. A node for "John" connected to a node labeled "Professor" with an "is-a" relationship. 2. A node for "John" connected to a node labeled "Harvard University" with a "works-at" relationship. 3. A node for "Harvard University" connected to a node labeled "Boston" with a "located-in" relationship. 4. A node for "John" connected to a node labeled "Computer Science" with a "teaches" relationship.   Graphically, it looks like this:     This graph represents the relationships and information in the question.

Semantic net

Representation of variables in Semantic nets

Hierarchial structure in a network

5 . Frames

Frames A frame can be defined as a data structure that has slots for various objects and a collection of frames consists of expectations for a given situation. Example: Sample frame of a computer centre .

Declarative Frames A frame that merely contains description about objects is called a declarative/factual/ situational frame.

Procedural frame
Tags