Unit 3
Unit 3
Unit 3
Knowledge
Knowledge is the body of facts and principles. Knowledge can be language, concepts,
procedures, rules, ideas, abstractions, places, customs, and so on. Study of knowledge is called
Epistemology.
Types of knowledge
The types of knowledge include procedural knowledge, declarative knowledge and heuristic
knowledge.
Procedural knowledge
Declarative knowledge
Declarative knowledge is passive knowledge in the form of statements of facts about the world.
For example, mark statement of a student is declarative knowledge.
Heuristic knowledge
Heuristics knowledge are rules of thumb or tricks. Heuristic knowledge is used to make
judgments and also to simplify solution of problems. It is acquired through experience. An expert
uses his knowledge that he has gathered due to his experience and learning.
Knowledge Representation
Knowledge representation and reasoning (KR&R) is a part of artificial intelligence that is solely
dedicated to representing information about the real world in such a form that a computer can
understand and take action accordingly. This leads to solving complex problems, such as
computation, having a dialog in natural language, diagnosing a critical medical condition, etc.
Knowledge representation is not just about storing data in databases; rather, it enables intelligent
machines to learn from human knowledge and experience the same so that a machine can behave
and act like a human.
The different kinds of knowledge that need to be represented in AI include:
Objects
Events
Performance
Facts
Meta-Knowledge
Knowledge-base
Artificial Intelligent Systems usually consist of various components to display their intelligent
behavior. Some of these components include:
Perception
Learning
Knowledge Representation & Reasoning
Planning
Execution
Here is an example to show the different components of the system and how it works:
Example
The above diagram shows the interaction of an AI system with the real world and
the components involved in showing intelligence.
The Perception component retrieves data or information from the environment. with the
help of this component, you can retrieve data from the environment, find out the
source of noises and check if the AI was damaged by anything. Also, it defines how to
respond when any sense has been detected.
Then, there is the Learning Component that learns from the captured data by the
perception component. The goal is to build computers that can be taught instead of
programming them. Learning focuses on the process of self-improvement. In order to
learn new things, the system requires knowledge acquisition, inference, acquisition of
heuristics, faster searches, etc.
The main component in the cycle is Knowledge Representation and Reasoning which
shows the human-like intelligence in the machines. Knowledge representation is all about
understanding intelligence. Instead of trying to understand or build brains from the
bottom up, its goal is to understand and build intelligent behavior from the top-down
and focus on what an agent needs to know in order to behave intelligently. Also, it
defines how automated reasoning procedures can make this knowledge available as
needed.
1. Simple Relational Knowledge - It is the simplest way of storing facts which uses the
relational method. Here, all the facts about a set of the object are set out systematically in
columns. Also, this approach of knowledge representation is famous in database systems where
the relationship between different entities is represented. Thus, there is little opportunity for
inference.
Example:
2. Inheritable Knowledge - In the inheritable knowledge approach, all data must be stored
into a hierarchy of classes and should be arranged in a generalized form or a hierarchal manner.
Also, this approach contains inheritable knowledge which shows a relation between instance and
class, and it is called instance relation. In this approach, objects and values are represented in
Boxed nodes.
Example:
Cricketer(John)
∀x = Cricketer (x) ———-> Athelete (x)s
Logical representation is the basic form of knowledge representation to the machines where a
defined syntax with basic rules is used. This syntax has no ambiguity in the meaning and deals
with prepositions. However, the logical form of knowledge representation acts as the
communication rules. This is the reason it can be used to represent facts to the machines.
This form of knowledge representation looks like most of the programming languages where you
use semantics to forward information. It is a highly logical way of solving problems. However,
the main drawback of this method is the strict nature of the representation. In general, it is tough
to execute and not very efficient sometimes.
Propositional logic in Artificial intelligence
Propositional logic (PL) is the simplest form of logic where all the statements are made by
propositions. A proposition is a declarative statement which is either true or false. It is a
technique of knowledge representation in logical and mathematical form.
Example:
1. a) It is Sunday.
2. b) The Sun rises from West (False proposition)
3. c) 3+3= 7(False proposition)
4. d) 5 is a prime number.
The syntax of propositional logic defines the allowable sentences for the knowledge
representation. There are two types of Propositions:
a. Atomic Propositions
b. Compound propositions
o Atomic Proposition: Atomic propositions are the simple propositions. It consists of a single
proposition symbol. These are the sentences which must be either true or false.
Example:
Example:
Logical Connectives:
Logical connectives are used to connect two simpler propositions or representing a sentence
logically. We can create compound propositions with the help of logical connectives. There are
mainly five connectives, which are given as follows:
Truth Table:
In propositional logic, we need to know the truth values of propositions in all possible scenarios.
We can combine all the possible combination with logical connectives, and the representation of
these combinations in a tabular format is called Truth table. Following are the truth table for all
logical connectives:
Truth table with three propositions:
We can build a proposition composing three propositions P, Q, and R. This truth table is made-
up of 8n Tuples as we have taken three proposition symbols.
Precedence of connectives:
Just like arithmetic operators, there is a precedence order for propositional connectors or logical
operators. This order should be followed while evaluating a propositional problem. Following is
the list of the precedence order for operators:
Precedence Operators
Logical equivalence is one of the features of propositional logic. Two propositions are said to be
logically equivalent if and only if the columns in the truth table are identical to each other.
Let's take two propositions A and B, so for logical equivalence, we can write it as A⇔B. In
below truth table we can see that column for ¬A∨ B and A→B, are identical hence A is
Equivalent to B
Properties of Operators:
o Commutativity:
o P∧ Q= Q ∧ P, or
o P ∨ Q = Q ∨ P.
o Associativity:
o (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
o (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
o Identity element:
o P ∧ True = P,
o P ∨ True= True.
o Distributive:
o P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
o P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
o DE Morgan's Law:
o ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
o ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
o Double-negation elimination:
o ¬ (¬P) = P.
o We cannot represent relations like ALL, some, or none with propositional logic.
Example:
To represent the above statements, PL logic is not sufficient, so we required some more powerful
logic, such as first-order logic.
First-Order logic:
The syntax of FOL determines which collection of symbols is a logical expression in first-order
logic. The basic syntactic elements of first-order logic are symbols. We write statements in short-
hand notation in FOL.
Variables x, y, z, a, b,....
Connectives ∧, ∨, ¬, ⇒, ⇔
Equality ==
Quantifier ∀, ∃
Atomic sentences:
o Atomic sentences are the most basic sentences of first-order logic. These sentences are
formed from a predicate symbol followed by a parenthesis with a sequence of terms.
o We can represent atomic sentences as Predicate (term1, term2, ......, term n).
Consider the statement: "x is an integer.", it consists of two parts, the first part x is the subject
of the statement and second part "is an integer," is known as a predicate.
Universal Quantifier:
Universal quantifier is a symbol of logical representation, which specifies that the statement
within its range is true for everything or every instance of a particular thing.
o For all x
o For each x
o For every x.
Example:
Let a variable x which refers to a cat so all x can be represented in UOD as below:
It will be read as: There are all x where x is a man who drink coffee.
Existential Quantifier:
Existential quantifiers are the type of quantifiers, which express that the statement within its
scope is true for at least one instance of something.
It is denoted by the logical operator ∃, which resembles as inverted E. When it is used with a
predicate variable then it is called as an existential quantifier.
If x is a variable, then existential quantifier will be ∃x or ∃(x). And it will be read as:
Example:
Some boys are intelligent.
It will be read as: There are some x where x is a boy who is intelligent.
Points to remember:
Properties of Quantifiers: