Unit 1 SC
Unit 1 SC
Unit 1 SC
The main objective of knowledge representation is to draw the conclusions from the
knowledge, but there are many issues associated with the use of knowledge
representation techniques.
1. Important attributes
2. Relationships among attributes
3. Choosing the granularity of representation
4. Representing sets of objects.
5. Finding the right structure as needed
Connectives and the truth tables of compound prepositions are given below:
Consider 'p' and 'q' are two prepositions then,
p ¬p
0 1
1 0
2. Conjunction (p ∧ q) indicates that p and q both and are enclosed in parenthesis. So,
p and q are called conjuncts .
Truth table for conjunction:
p q p∧q
0 0 0
0 1 0
1 0 0
1 1 1
p q p∨q
0 0 0
0 1 1
1 0 1
1 1 1
4. Implication (p ⇒ q) consists of a pair of sentences separated by the ⇒ operator and
enclosed in parentheses. The sentence to the left of the operator is called as an
antecedent, and the sentence to the right is called as the consequent.
Truth table for implication:
p q p⇒q
0 0 1
0 1 1
1 0 0
1 1 1
p q p⇔q
0 0 1
0 1 0
1 0 0
1 1 1
Properties of Operators:
○ Commutativity:
○ P∧ Q= Q ∧ P, or
○ P ∨ Q = Q ∨ P.
○ Associativity:
○ (P ∧ Q) ∧ R= P ∧ (Q ∧ R),
○ (P ∨ Q) ∨ R= P ∨ (Q ∨ R)
○ Identity element:
○ P ∧ True = P,
○ P ∨ True= True.
○ Distributive:
○ P∧ (Q ∨ R) = (P ∧ Q) ∨ (P ∧ R).
○ P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R).
○ DE Morgan's Law:
○ ¬ (P ∧ Q) = (¬P) ∨ (¬Q)
○ ¬ (P ∨ Q) = (¬ P) ∧ (¬Q).
○ Double-negation elimination:
○ ¬ (¬P) = P.
Quantifiers
The variable of predicates is quantified by quantifiers. There are two types of
quantifier in predicate logic − Universal Quantifier and Existential Quantifier.
Universal Quantifier
Universal quantifier states that the statements within its scope are true for every value
of the specific variable. It is denoted by the symbol ∀
∃
Example − "Some people are dishonest" can be transformed into the propositional
form
∃xP(x) where P(x) is the predicate which denotes x is dishonest and the universe of
discourse is some people.
Nested Quantifiers
If we use a quantifier that appears within the scope of another quantifier, it is called
nested quantifier.
Example
∀ a∃bP(x,y)where P(a,b) denotes a+b=0
Monotonic Reasoning
● Monotonic Reasoning is the process that does not change its direction or can say
that it moves in the one direction.
● Monotonic Reasoning will move in the same direction continuously means it will
either move in increasing order or decrease.
● But since Monotonic Reasoning depends on knowledge and facts, It will only
increase and will never decrease in this reasoning.
Example:
Sun rises in the East and sets in the West.
Non-monotonic Reasoning
● Non-monotonic Reasoning is the process that changes its direction or values as
the knowledge base increases.
● It is also known as NMR in Artificial Intelligence.
● Non-monotonic Reasoning will increase or decrease based on the condition.
● Since Non-monotonic Reasoning depends on assumptions, It will change itself
with improving knowledge or facts.
Example:
Consider a bowl of water, If we put it on the stove and turn the flame on it will
obviously boil hot and as we will turn off the flame it will cool down gradually.
Monotonic
Non-Monotonic Reasoning
Reasoning
Forward Reasoning
Forward reasoning is a process in artificial intelligence that finds all the possible
solutions of a problem based on the initial data and facts. Thus, the forward reasoning
is a data-driven task as it begins with new data. The main objective of the forward
reasoning in AI is to find a conclusion that would follow. It uses an opportunistic type
of approach.
Forward reasoning flows from incipient to the consequence. The inference engine
searches the knowledge base with the given information depending on the
constraints. The precedence of these constraints have to match the current state.
Backward Reasoning
Backward reasoning is the reverse process of the forward reasoning in which a goal or
hypothesis is selected and it is analyzed to find the initial data, facts, and rules.
Therefore, the backward reasoning is a goal driven task as it begins with conclusions
or goals that are uncertain. The main objective of the backward reasoning is to find
the facts that support the conclusions.
The initial conditions are set such that they satisfy all the sub-goals. Also, the
established states are matched to the initial state provided. If the condition is fulfilled,
the goal is the solution, otherwise the goal is rejected. Therefore, backward reasoning
follows bottom-up technique.
Frames
• A frame is an artificial intelligence data structure used to divide knowledge into
substructures by representing "stereotyped situations.
• " Frames are the primary data structure used in artificial intelligence frame language.
Scripts
• A script is a structured representation describing a stereotyped sequence of events in
a particular context.
• Scripts are used in natural language understanding systems to organize a knowledge
base in terms of the situations that the system should understand.
NLP
Natural Language Processing (NLP) refers to AI method of communicating with an
intelligent systems using a natural language such as English.
Processing of Natural Language is required when you want an intelligent system like
robot to perform as per your instructions, when you want to hear decision from a
dialogue based clinical expert system, etc.
The field of NLP involves making computers to perform useful tasks with the natural
languages humans use. The input and output of an NLP system can be −
● Speech
● Written Text
Components of NLP
There are two components of NLP as given −
It involves −
● Text planning − It includes retrieving the relevant content from knowledge base.
● Sentence planning − It includes choosing required words, forming meaningful
phrases, setting tone of the sentence.
● Text Realization − It is mapping sentence plan into sentence structure.
NLP Terminology
○ Phonology − It is study of organizing sound systematically.
○ Morphology − It is a study of construction of words from primitive
meaningful units.
○ Morpheme − It is primitive unit of meaning in a language.
○ Syntax − It refers to arranging words to make a sentence. It also involves
determining the structural role of words in the sentence and in phrases.
○ Semantics − It is concerned with the meaning of words and how to
combine words into meaningful phrases and sentences.
○ Pragmatics − It deals with using and understanding sentences in different
situations and how the interpretation of the sentence is affected.
○ Discourse − It deals with how the immediately preceding sentence can
affect the interpretation of the next sentence.
○ World Knowledge − It includes the general knowledge about the world.
Steps in NLP
There are general five steps −
Semantic Analysis − It draws the exact meaning or the dictionary meaning from
the text. The text is checked for meaningfulness. It is done by mapping syntactic
structures and objects in the task domain. The semantic analyzer disregards
sentence such as “hot ice-cream”.
NPL Application:
● Spam detection:
● Machine translation:
● Virtual agents and chatbots:
● Social media sentiment analysis:
● Text summarization: