Unit3 &4
Unit3 &4
Unit3 &4
Ex: I is going to school -- Here using of “is” is not acceptable it leads to Syntax
Error.
hkkhkk
Logic Rules Semantic Nets Frame Script
There are 5 types knowledge representation methods are there :
1.Logic :
Logical Representation is a language with some proper rules which deals
with propositions and has no ambiguity in representation.
Propositions means the symbols we use ( AND,OR..)
1.Propositional Logic
2.Predicate Logic
1.Propositional Logic
In propositional logic, we use symbolic variables to represent the logic, and we
can use any symbol for a representing a proposition, such A, B, C, P, Q, R, etc.
Propositions can be either true or false, but it cannot be both
Propositional logic consists of an object, relations or function, and logical
connectives.These connectives are called as Logical Operators
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:
P= Rohan is intelligent,
Q= Rohan is hardworking. → P∧ Q.
Predicate logic (like natural language) does not only assume that the world
contains facts like propositional logic but also assumes the following
things in the world:
o Objects: A, B, people, numbers, colors, wars, theories, squares, pits,
wumpus, ......
o Relations: It can be unary relation such as: red, round, is
adjacent, or n-any relation such as: the sister of, brother of, has
color, comes between
o Function: Father of, best friend, third inning of, end of, ......
Basic Elements of Predicate Logic
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).
Complex Sentences:
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.
Quantifiers in Predicate logic:
Quantifiers are the symbols that permit to determine or identify the range and scope of
the variable in the logical expression. There are two types of quantifier:
1.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.
Example:
All man drink coffee.
It will be read as: There are all x where x is a man who drink coffee
2.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.
Example:
Some boys are intelligent.
It will be read as: There are some x where x is a boy who is intelligent.
Procedural Knowledge:
Declarative Knowledge:
In forward reasoning the left hand sides of the rules are matched against
the current state and right sides are used to generate the new state, until
the goal is reached.
Step 1: Begin building a tree of move sequences by starting with the initial
configuration at the root of the tree.
Step 2: Generate the next level of tree by finding all rules whose left hand
side matches against the root node. The right hand side is used to create
new configurations.
Step 3: Generate the next level by considering the nodes in the previous
level and applying it to all rules whose left hand side match.
2.Backward Reasoning :
In backward reasoning the right hand sides of the rules are matched against the current
state and left sides are used to generate the new state.
Step 1: Begin building a tree of move sequences by starting with the goal node
configuration at the root of the tree.
Step 2: Generate the next level of tree by finding all rules whose right hand side
matches against the root node. The left hand side is used to create new configurations.
Step 3: Generate the next level by considering the nodes in the previous level and
applying it to all rules whose right hand side match it. Then use corresponding left hand
sides to generate the new nodes. Continue until the node that matches the initial
state is generated
3.Semantic Networks :
we can store our knowledge in the form of a graph, with nodes
representing objects in the world, and arrows or links representing
relationships between those objects.
Components:
Lexical components: nodes, links, labels
Structural components: node or link (Directed)
Semantic components: define relation between nodes through link
Procedural components
4.Frames:
Frames are record like structure that have slots & slot values for
an entity.
Ex1:
Employee details
Eswar(
Ex2:
Tweety(
5.Script:
Script is used to represent knowledge
It contains structure similar to frame
It also contain slots
Each slot represent situation or event
o What can happen in a situation
o Which event follows
Example:
1.Going to market ,purchasing and paying bill
2.Going to restuarent , ordering food, paying bill
The components of script includes :
o Entry conditions – These must be satisfied before events
in a script can occur
o Results - Conditions that will be true after events in script
occurs
o Props – Slots representing objects involved in events
o Roles – Persons involved in the events
o Track – Variations on the script , different tracks may share
components of the same script
o Scenes – The sequence of events that occur . Events are
represented in conceptual dependency form .
gt(1,0),gt(2,1),lt(0,1) ………….
Example :
No mortal lives longer than 150 years
Ɐx: Ɐt1: Ɐt2:mortal(x)ꓥborn(x,t1) ꓥ gt(t2-t1,150)->died(x,t2)
Alive means not dead
Ɐt1: Ɐx:alive(x,t1) -> Ꞁdead(x,t1)