COURSEINTRODUCTION
1
ANJANI GUPTA
Assistant Professor, VIPS Engineering [email protected]
B.Tech (AIML B)
August -2025
Principles of Artificial Intelligence
AIML -207
Syllabus
8
Introduction To AI
Artificial Intelligence is composed of two wordsArtificialandIntelligence,
where Artificial defines"man-made,"and intelligence defines"thinking
power", hence AI means"a man-made thinking power.“
"It is a branch of computer science by which we can create intelligent
machines which can behave like a human, think like humans, and able to
make decisions."
It is believed that AI ,there were Mechanical men in early days which can
work and behave like humans.
Why Artificial Intelligence?
With the help of AI, you can create such software or devices which can solve
real-world problems very easily and with accuracy such as health issues,
marketing, traffic issues, etc.
With the help of AI, you can create your personal virtual Assistant, such as
Google Assistant, Siri, etc.
With the help of AI, you can build such Robots which can work in an
environment where survival of humans can be at risk.
AI opens a path for other new technologies, new devices, and new
Opportunities.
Goals of Artificial Intelligence
Replicate human intelligence
Solve Knowledge-intensive tasks
An intelligent connection of perception and action
Building a machine which can perform tasks that requires human intelligence such as:
◦Proving a theorem
◦Playing chess
◦Plan some surgical operation
◦Driving a car in traffic
Creating some system which can exhibit intelligent behavior, learn new things by
itself, demonstrate, explain, and can advise to its user.
goals
-
>
-
>
-
>
-
Advantages of Artificial Intelligence
High Accuracy with less errors:AI machines or systems are prone to less errors
and high accuracy as it takes decisions as per pre-experience or information.
High-Speed:AI systems can be of very high-speed and fast-decision making,
because of that AI systems can beat a chess champion in the Chess game.
High reliability:AI machines are highly reliable and can perform the same action
multiple times with high accuracy.
Useful for risky areas:AI machines can be helpful in situations such as defusing
a bomb, exploring the ocean floor, where to employ a human can be risky.
Digital Assistant:AI can be very useful to provide digital assistant to the users
such as AI technology is currently used by various E-commerce websites to show
the products as per customer requirement.
Useful as a public utility:AI can be very useful for public utilities such as a self-
driving car which can make our journey safer and hassle-free, facial recognition
for security purpose, Natural language processing to communicate with the human
in human-language, etc.
>
-
-
>
-
>
-
>
-
>
Disadvantages of Artificial Intelligence
High Cost:The hardware and software requirement of AI is very costly as it requires lots of
maintenance to meet current world requirements.
Can't think out of the box:Even we are making smarter machines with AI, but still they
cannot work out of the box, as the robot will only do that work for which they are trained, or
programmed.
No feelings and emotions:AI machines can be an outstanding performer, but still it does not
have the feeling so it cannot make any kind of emotional attachment with human, and may
sometime be harmful for users if the proper care is not taken.
Increase dependency on machines:With the increment of technology, people are getting
more dependent on devices and hence they are losing their mental capabilities.
No Original Creativity:As humans are so creative and can imagine some new ideas but still
AI machines cannot beat this power of human intelligence and cannot be creative and
imaginative.
Application of AI
Artificial Intelligence (AI) at Present
"It is the ability of machines or computer-controlled robot to perform
task that are associated with intelligence." So, AI is computer science,
which aims to develop intelligent machines that can mimic human behaviour.
Based on capabilities, AI can be divided into three types that are:
Narrow AI: It is capable of completing dedicated tasks with intelligence.
Thecurrent stage of AI is narrow AI.
General AI: Artificial General Intelligence or AGI defines the machines that
can show human intelligence.
Super AI: Super AI refers to self-aware AI with cognitive abilities that
surpass that of humans. It is a level where machines can do any task that a
human can do with cognitive properties.
A
Iatpresent
Future of Artificial Intelligence
The future ofArtificial Intelligenceis bright in India, with many
organizations opting for AI automation.
Automation in operational vehicles has created a buzz in the
logistics industry as it is expected that
automatedtrucks/vehiclesmay soon be used.
Due to the bright scope of Artificial Intelligence in the future, the
number of AI start-ups is expected to increase in the coming years.
future
Jobs in AI
Computational Philosopher- A computational philosopher concerned with teaching
human ethics and values in AI algorithms. For example, if a robot is being developed for
household chores, it should be designed to listen and follow orders from its employer.
Robot Personality Designer- A dedicated Robot Personality Designer designs the
digital personality of a machine/robot.
Robot Obedience Trainer- A robotic obedience trainer teaches the machine/robot to
follow instructions and obey obstacles. With more and more robots being introduced in
homes, military strategies, etc., the future of Artificial Intelligence is bright.
Autonomous Vehicle Infrastructure Designer- An autonomous vehicle designer
develops digital interfaces that help them work independently. The scope of a bright
artificial intelligence future can fuel the development of autonomous vehicles in various
industries.
Algorithmic Trainer / Click Worker- They work with AI algorithms and train them to
recognize instructions, emotions, moods, images, speech, etc. They train AI algorithms
to interact with their surroundings and take appropriate actions autonomously.
Continue…………
AI Cyber Security Expert- An AI Cyber Security expert develops algorithms that can
identify the theft/risk associated with the system and take actions to eliminate it
autonomously. As new types of cyber attacks evolve every day, AI is being used in cyber
security to detect them. The future of Artificial Intelligence (AI Cyber Security) is also
bright in the Asia Pacific region.
According to a report published by Forbes, AI job opportunities are continuously increasing
at74%annually. It is a no-brainer that today, AI is one of the most in-demand technologies,
and it has an impact in almost every field. As a result, the demand for AI professionals
continues to grow. As the number of job opportunities increases, it is the best time to explore
your career in AI.
Future impact of AI in different sectors
Healthcare:
AI will play a vital role in the healthcare sector for diagnosing diseases quickly and more accurately. New
drug discovery will be faster and cost-effective with the help of AI. It will also enhance the patient
engagement in their care and also makeease appointment scheduling, bill paying, with fewer errors.
However, apart from these beneficial uses, one great challenge of AI in healthcare is to ensure its adoption
in daily clinical practices.
Cyber security:
Undoubtedly, cyber security is a priority of each organization to ensure data security. There are some
predictions that cyber security with AI will have below changes:
With AI tools, security incidents will be monitored.
Identification of the origin of cyber-attacks with NLP.
Automation of rule-based tasks and processes with the help of RPA bots.
However, being a great technology, it can also be used as a threat by attackers. They can use AI in a non-
ethical way by using automated attacks that may be intangible to defend.
Continue………..
Transportation:
The fully autonomous vehicle is not yet developed in the transportation sector, but
researchers are reaching in this field. AI and machine learning are being applied in the
cockpit to help reduce workload, handle pilot stress and fatigue, and improve on-time
performance. There are several challenges to the adoption of AI in transportation,
especially in areas of public transportation. There's a great risk of over-dependence on
automatic and autonomous systems.
E-commerce:
Artificial Intelligence will play a vital role in the e-commerce sector shortly. It will
positively impact each aspect of the e-commerce sector, ranging from user experience
to marketing and distribution of products. We can expect e-commerce with automated
warehouse and inventory, shopper personalization, and the use of chatbots in future.
Continue………
Employment:
Nowadays, employment has become easy for job seekers and simple for
employers due to the use of Artificial Intelligence. AI has already been used
in the job search market with strict rules and algorithms that automatically
reject an employee's resume if it does not fulfil the requirement of the
company. It is hoping that the employment process will be driven by most
AI-enabled applications ranging from marking the written interviews to
telephonic rounds in the future.
Languages used in Artificial Intelligence
1. Python
Pythonis one of the most powerful and easy programming languages that anyone can start
to learn. Python is initially developed in the early stage of 1991. Python also comes with
some default sets of standards libraries and also provides better community support to its
users. Further, Python is a platform-independent language and also provides an extensive
framework for Deep Learning, Machine Learning, and Artificial Intelligence.
Python is also a portable language as it is used on various platforms such asLinux,
Windows, Mac OS, and UNIX.
Python is an ideal programming language used for Machine Language, Natural Processing
Language (NLP), and Neural networks, etc. Due to the flexible nature of Python, it can be
used for AI development. It contains various pre-existing libraries such asPandas, SciPy
and nltk, etc. Further, Python also contains simple syntax and easy coding, which makes
Python the first choice of AI developers and programmers.
Languages used in Artificial Intelligence
Features of Python
It is easy to learn than any other programming language.
It is also a dynamically-typed language.
Python is an Object-oriented language.
It provides extensive community support and a framework for ML and DL.
Open-source.
Large standard sets of libraries.
Interpreted language.
Languages used in Artificial Intelligence
2. Java
Similar to Python, Java is also a platform-independent language as it can also be easily implemented on
various platforms. Further, Java is an object-oriented and scalable programming language. The best thing
about Java is once it is written and compiled on one platform, then you do not need to compile it again and
again. This is known as WORA (Once Written Read/Run Anywhere) principle.
Features of Java
Portability
Cross-platform.
Easy to learn and use.
Easy-to-code Algorithms.
Built-in garbage collector.
Better user interaction.
Easy to debug
Languages used in Artificial Intelligence
3. Prolog
Prologis one of the oldest programming languages used for Artificial Intelligence
solutions. Prolog stands for "Programming in Logic", which was developed by French
scientist Alain Colmerauer in 1970.
For AI programming in Prolog, developers need to define the rules, facts, and the end
goal. After defining these three, the prolog tries to discover the connection between
them.
Prolog may not be a great programming language to build something big, but it's a great
language to study and think about problems in more logical ways rather than procedural.
Features of Prolog
Supports basic mechanisms such as
Pattern Matching,
Tree-based data structuring, and
Automatic backtracking.
Prolog is a declarative language rather than imperative.
Languages used in Artificial Intelligence
4. Lisp
Lisp was originally created as a practical mathematical notation for programs but eventually became a top choice of
developers in the field of AI.
Although Lisp programming language is the second oldest language after Fortran, it is still being used because of its
crucial features.
, it has various deficiencies, such as lack of well-known libraries, not so-human-friendly syntax, etc. Due to this
reason, it is not preferred by the programmers.
Features of LISP
The program can be easily modified, similar to data.
Make use of recursion for control structure rather than iteration.
Garbage Collection is necessary.
We can easily execute data structures as programs.
An object can be created dynamically.
Languages used in Artificial Intelligence
5. R
Ris one of the great languages for statistical processing in programming. However, R
supports free, open-source programming language for data analysis purposes. It may
not be the perfect language for AI, but it provides great performance while dealing with
large numbers.
Features of R programming
R is an open-source programming language, which is free of cost, and also you can add
packages for other functionalities.
R provides strong & interactive graphics capability to users.
It enables you to perform complex statistical calculations.
It is widely used in machine learning and AI due to its high-performance capabilities.
Languages used in Artificial Intelligence
6. Julia
Julia is one of the newer languages on the list and was created to focus on performance computing in scientific and technical fields. Julia
includes several features that directly apply to AI programming.
Features of Julia
Common numeric data types.
Arbitrary precision values.
Robust mathematical functions.
Tuples, dictionaries, and code introspection.
Built-in package manager.
Dynamic type system.
Ability to work for both parallel and distributed computing.
Macros and metaprogramming capabilities.
Support for multiple dispatches.
Support for C functions.
Languages used in Artificial Intelligence
7. C++
C++ languagehas been present for so long around, but still being a top and popular
programming language among developers. It provides better handling for AI models
while developing.
Although C++ may not be the first choice of developers for AI programming, various
machine learning and deep learning libraries are written in the C++ language.
Features of C++
C++ is one of the fastest languages, and it can be used in statistical techniques.
It can be used with ML algorithms for fast execution.
Most of the libraries and packages available for Machine learning and AI are written in
C++.
It is a user friendly and simple language.
AI Agents
Artificial Intelligence is defined as the study of rational agents.
A rational agent may take the form of a person, firm, machine,
or software to make decisions.
AnAIsystem is made up of an agent and its environment.
Agents work in their environment, and the environment may
include other agents
/actuators
.
AI Agents
The structure of Intelligent Agents, we must be familiar withthe
architectureandagentprograms. Architecture is the machinery on which the
agent executes. It is a device with sensors and actuators, for example, a robot
car, a camera, a PC. An agent program is an implementation of an agent
function. An agent function concept is a map from the sequence (the history of
all that an agent has considered to date).
agent = architecture + agent program
The human agent has eyes, ears, and other organs that act as sensors, and
hands, feet, mouth, and other body parts act as actuators.
AI Agents Characteristic
“An agent is a computer software system whose characteristics are “:
Situatedness
When an Agent receives some form of sensory input from its environment, it then performs some
actions that change its environment in some way.
Autonomy
An agent is able to act without direct intervention from humans or other agents. This type of agent
has almost complete control over it own actions and internal state.
Adapitvity
it is capable of reacting flexibly to changes within its environment. It is able to accept goal directed
initiatives when appropriate and is also capable of learning from it's own experiences, environment
and interaction with others.
Sociability
The agent is capable of interacting in a peer-to-peer manner with other agents or humans.
Design Considerations
One of the most important aspects of intelligent agents is the design of the actual agent. The agent
needs to be able to fulfill the tasks that are required from it, i.e. to achieve its goals.
The Nature of Environments
The most famous artificial environment is the Turing test environment, in which a
real and other artificial agents are tested on an equal basis. This is a very
challenging environment as it is extremely difficult for a software agent to perform
side-by-side with a human.
Turing Test
The success of a system's intelligent behavior can be measured with the Turing
test.
Two persons and a machine to be evaluated participate in the test. One of the two
persons plays the role of the examiner. Each of them is sitting in different rooms.
The examiner is unaware of who is a machine and who is a human. He inquires by
typing the questions and sending them to both intelligences, for which he receives
typed responses.
The purpose of this test is to fool the tester. If the tester fails to determine the
response of the machine from the human response, the machine is said to be
intelligent.
Types of Agents
Simple reflex agent:
Simple reflex agents ignore the rest of the concept history and act only based on the current concept.
The agent function is based on the condition-action rule. A condition-action rule is a rule that maps a state,
that is, a condition, to an action. If the condition is true, then action is taken; otherwise, not.
This agent function succeeds only when the environment is fully observable.
The problems with simple reflex agents are:
Very limited intelligence.
There is no knowledge of the non-perceptual parts of the state.
It is usually too large to generate and store.
If a change occurs in the environment, the rules collection needs to be updated.
Ex: Vacuum Cleaner
Types of Agents
Model-based reflex agents:
It works by searching for a rule whose position matches the current state. A model-based agent can handle a partially observable environment using a model about the world.
Updating the state requires information about:
how the world develops independently of the agent, and
How the agent's actions affect the world.
Ex:-Self-Driving Car
Types of Agents
Goal-based agents
These types of agents make decisions based on how far they are currently from their goals
(details of desired conditions). Their every action is aimed at reducing its distance from
the target. This gives the agent a way to choose from a number of possibilities, leading to a
target position. The behavior of a target-based agent can be easily changed.
Ex: Driverless Car
Types of Agents
Utility-based agents
The agents which are developed having their end uses as building blocks are called utility-based
agents. When there are multiple possible alternatives, then to decide which one is best, utility-based
agents are used. They choose actions based on apreference (utility)for each state.
Utility describes how"happy"the agent is. Ex: Home Thermostat
Types of Agents
Learning Agent:
A learning agent in AI is the type of agent that can learn from its past
experiences or it has learning capabilities. It starts to act with basic
knowledge and then is able to act and adapt automatically through
learning.
A learning agent has mainly four conceptual components, which are:
Learning element: It is responsible for making improvements by learning
from the environment
Critic:The learning element takes feedback from critics which describe
how well the agent is doing with respect to a fixed performance standard.
Performance Element: It is responsible for selecting external action.
Problem Generator:This component is responsible for suggesting
actions that will lead to new and informative experiences.
UNIT-1
AI Search Techniques
?
Menistic
BFS
DFS
(Heuristic)
②
T
&
&
T
I
1
④
Pos
–
-
AtF-HtE
3
+
7
+
2
+1
=
13
A
-
B
=
D
6+2+7
=
13
A+
B
+C 6+3
+
5
=
14
A
+
B
=
6+8
=
14
A
+
F
=
3+6
=
9
A
-
F
+
G
3
+
1+5
=
9
AtF-H
3
+
7
+
3
=
13
A
+
F
+
G
+
13+
1+
3+1
=
8
A
-
F
+
G
+
+
+
- 3+1
+
3
+3
=
10
”
”
,
S
OR
ND
⑨
~
?
6+
R
y
+
4
(
o
And
pq
B
pes
Statespace
search
:
processusedinAtinwhichstates
of
an
instance
are
consideredwithintentionof
finding
a
goal
state
with
desiredproperty
.
SEND
&
E
#MORE
MONEY
+
108
-
BASE
=
83
A-
EAT
829
G
+
&19
A
20038
so
ME
②2134+
-
10168
CROSS
96233
+
ROADS
#62523
DANGER
158116
*
unitf
L
KNOWLEDGE
REPRESENTATION
UNIT -2
ros
Knowledge Representation
•Knowledge representation in AI is responsible for representing information about the
real world so that a computer can understand and can utilize this knowledge to solve
the complex real world problems such as diagnosis a medical condition or
communicating with humans in natural language.
What to Represent:
•Object: All the facts about objects in our world domain. E.g., Guitars contains strings,
trumpets are brass instruments.
•Events: Events are the actions which occur in our world.
•Performance: It describe behavior which involves knowledge about how to do
things.
•Meta-knowledge: It is knowledge about what we know.
•Facts: Facts are the truths about the real world and what we represent.
•Knowledge-Base: The central component of the knowledge-based agents is the
knowledge base. It is represented as KB. The Knowledgebase is a group of the
Sentences (Here, sentences are used as a technical term and not identical with the
English language).
Knowledge Representation
•Knowledge: Knowledge is awareness or familiarity gained by experiences of facts,
data, and situations. Following are the types of knowledge in artificial intelligence:
Types of knowledge
1. Declarative Knowledge:
•Declarative knowledge is to know about something.
•It includes concepts, facts, and objects.
•It is also called descriptive knowledge and expressed in declarative sentences.
•It is simpler than procedural language.
2. Procedural Knowledge
•It is also known as imperative knowledge.
•Procedural knowledge is a type of knowledge which is responsible for knowing how
to do something.
•It includes rules, strategies, procedures, agendas, etc.
3. Meta-knowledge:
•Knowledge about the other types of knowledge is called Meta-knowledge
Knowledge Representation
4. Heuristic knowledge:
•Heuristic knowledge is representing knowledge of some experts in a filed or subject.
•Heuristic knowledge is rules of thumb based on previous experiences, awareness of
approaches, and which are good to work but not guaranteed.
5. Structural knowledge:
•Structural knowledge is basic knowledge to problem-solving.
•It describes relationships between various concepts such as kind of, part of, and
grouping of something.
•It describes the relationship that exists between concepts or objects.
Cycle of Knowledge Representation in AI
•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
Knowledge Representation
•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.
•The Planning and Execution components depend on the analysis of knowledge
representation and reasoning. Here, planning includes giving an initial state,
finding their preconditions and effects, and a sequence of actions to achieve a
state in which a particular goal holds. Now once the planning is completed, the
final stage is the execution of the entire process.
Knowledge Representation Techniques
•Logical representation is a language with some concrete rules which deals with
propositions and has no ambiguity in representation. Logical representation means
drawing a conclusion based on various conditions.
•Logical representation can be categorised into mainly two logics:
Propositional Logics
Predicate Logics
•. Each sentence can be translated into logics using syntax and semantics.
Syntax:
•Syntaxes are the rules which decide how we can construct legal sentences in the logic.
•It determines which symbol we can use in knowledge representation.
•How to write those symbols.
Semantics:
•Semantics are the rules by which we can interpret the sentence in the logic.
•Semantic also involves assigning a meaning to each sentence.
Knowledge Representation Techniques
Advantages of logical representation:
•Logical representation enables us to do logical reasoning.
•Logical representation is the basis for the programming languages.
Disadvantages of logical Representation:
•Logical representations have some restrictions and are challenging to work with.
•Logical representation technique may not be very natural, and inference may not be so
efficient.
2. Semantic Network Representation
•Semantic networks are alternative of predicate logic for knowledge representation.
In Semantic networks, we can represent our knowledge in the form of graphical
networks. This network consists of nodes representing objects and arcs which
describe the relationship between those objects.
•This representation consist of mainly two types of relations:
IS-A relation (Inheritance)
Kind-of-relation
Knowledge Representation Techniques
Example:
•Jerry is a cat.
•Jerry is a mammal
•Jerry is owned by Priya.
•Jerry is brown colored.
•All Mammals are animal
Knowledge Representation Techniques
Drawbacks in Semantic representation:
•Semantic networks take more computational time at runtime as we need to traverse
the complete network tree to answer some questions.
•These types of representations are inadequate as they do not have any equivalent
quantifier, e.g., for all, for some, none, etc.
•Semantic networks do not have any standard definition for the link names.
•These networks are not intelligent and depend on the creator of the system.
Advantages of Semantic network:
•Semantic networks convey meaning in a transparent manner.
•These networks are simple and easily understandable.
3. Frame Representation
•A frame is a record like structure which consists of a collection of attributes and its
values to describe an entity in the world. Frames are the AI data structure which
divides knowledge into substructures by representing stereotypes situations. It consists
of a collection of slots and slot values. These slots may be of any type and sizes. Slots
have names and values which are called facets.
Slots Filters
Title Artificial Intelligence
Genre Computer Science
Author Peter Norvig
Edition Third Edition
Year 1996
Page 1152
Knowledge Representation Techniques
•Frames are derived from semantic networks and later evolved into our modern-day
classes and objects. A single frame is not much useful. Frames system consist of a
collection of frames which are connected
Advantages of frame representation:
•The frame representation is comparably flexible and used by many applications in AI.
•It is very easy to add slots for new attribute and relations.
•It is easy to include default data and to search for missing values.
Disadvantages of frame representation:
•In frame system inference mechanism is not be easily processed.
•Frame representation has a much generalized approach.
4. Production Rules
•Production rules system consist of (condition, action) pairs which mean, "If condition
then action". It has mainly three parts:
•The set of production rules
•Working Memory
•The recognize-act-cycle
Knowledge Representation Techniques
•In production rules agent checks for the condition and if the condition exists then
production rule fires and corresponding action is carried out.. This complete process is
called a recognize-act cycle.
Example:
•IF (at bus stop AND bus arrives) THEN action (get into the bus)
•IF (on the bus AND paid AND empty seat) THEN action (sit down).
Advantages of Production rule:
•The production rules are expressed in natural language.
•The production rules are highly modular, so we can easily remove, add or modify an
individual rule.
Disadvantages of Production rule:
•Production rule system does not exhibit any learning capabilities, as it does not store
the result of the problem for the future uses.
•During the execution of the program, many rules may be active hence rule-based
production systems are inefficient.
pass
Propositional logic In Artificial intelligence
•Proposition is a declarative statement which is either true or false. It is a technique of
knowledge representation in logical and mathematical form.
Facts about propositional logic:
•Propositional logic is also called Boolean logic as it works on 0 and 1.
•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.
•Propositional logic consists of an object, relations or function, and logical
connectives. These connectives are also called logical operators.
•The propositions and connectives are the basic elements of the propositional logic.
•Connectives can be said as a logical operator which connects two sentences.
•A proposition formula which is always true is called tautology, and it is also called a
valid sentence.
•A proposition formula which is always false is called Contradiction.
•Statements which are questions, commands, or opinions are not propositions such as
"Where is Rohini", "How are you", "What is your name", are not propositions.
Types of Propositions
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:
•a) 2+2 is 4, it is an atomic proposition as it is a true fact.
•b) "The Sun is cold" is also a proposition as it is a false fact.
Compound proposition:
•Compound propositions are constructed by combining simpler or atomic propositions,
using parenthesis and logical connectives.
•Example:
•a) "It is raining today, and street is wet."
•b) "Ankit is a doctor, and his clinic is in Mumbai."
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:
Logical Connectives
Truth Table
•We can combine all the possible combination with logical connectives, and the
representation of these combinations in a tabular format is called Truth table.
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
•First Precedence
•Parenthesis
•Second Precedence
•Negation
•Third Precedence
•Conjunction(AND)
•Fourth Precedence
•Disjunction(OR)
•Fifth Precedence
•Implication
•Six Precedence
•Biconditional
Logical equivalence:
•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.
Propositional logic In Artificial intelligence
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)
Propositional logic In Artificial intelligence
•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.
Limitations of Propositional logic:
•We cannot represent relations like ALL, some, or none with propositional logic.
•All the girls are intelligent.
•Some apples are sweet.
•Propositional logic has limited expressive power.
①If
itishumid
,
thenitis
hot.not-X
- W
numid-y
Y-
X Jaining
-
2②
If
itisnothhumid
,
thenitisn't
raining.
(x1y)
-Z
All
,
someX
no
propositional
log
in
-
First-Order Predicate logic(FOPL)
•It is an extension to propositional logic.
•First-order logic is also known as Predicate logic or First-order predicate logic.
•First-order logic does not only assume that the world contains facts like propositional
logic but also assumes the following things in the world:
•Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus,
•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
•Function: Father of, best friend, third inning of, end of, ......
•As a natural language, first-order logic also has two main parts:
Syntax
Semantic
Syntax of 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.
pazulos
First-Order Predicate logic(FOPL)
Constant 1, 2, A, John, Mumbai, cat,....
Variables x, y, z, a, b,....
Predicates Brother, Father, >,....
Function sqrt, LeftLegOf, ....
Connectives ∧, ∨, ¬, ⇒, ⇔
Equality ==
Quantifier ∀, ∃
First-Order Predicate logic(FOPL)
Atomic sentences:
•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.
•We can represent atomic sentences as Predicate (term1, term2, ......, term n).
•Example: Ravi and Ajay are brothers: => Brothers(Ravi, Ajay).
Chinky is a cat: => cat (Chinky).
Complex Sentences:
•Complex sentences are made by combining atomic sentences using connectives.
First-order logic statements can be divided into two parts:
•Subject: Subject is the main part of the statement.
•Predicate: A predicate can be defined as a relation, which binds two atoms together
in a statement.
Example:
•"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.
First-Order Predicate logic(FOPL)
Quantifiers in First-order logic:
•These 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:
•Universal Quantifier, (for all, everyone, everything)
•Existential quantifier, (for some, at least one).
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.
•The Universal quantifier is represented by a symbol ∀, which resembles an inverted
A.
• In universal quantifier we use implication "→".
•If x is a variable, then ∀x is read as:
•For all x
•For each x
•For every x.
First-Order Predicate logic(FOPL)
Example:
•All man drink coffee.
•∀x man(x) → drink (x, coffee).
•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.
•In Existential quantifier we always use AND or Conjunction symbol (∧).
•If x is a variable, then existential quantifier will be ∃x or ∃(x). And it will be read
as:
•There exists a 'x.'
•For some 'x.'
•For at least one 'x.‘
Example:
•Some boys are intelligent.
First-Order Predicate logic(FOPL)
•∃x: boys(x) ∧ intelligent(x)
•It will be read as: There are some x where x is a boy who is intelligent.
Notes:
•The main connective for universal quantifier ∀ is implication →.
•The main connective for existential quantifier ∃ is and ∧.
knowledge-engineering
•The process of constructing a knowledge-base in first-order logic is called as
knowledge- engineering. In knowledge-engineering, someone who investigates a
particular domain, learns important concept of that domain, and generates a formal
representation of the objects, is known as knowledge engineer.
Inference in First-Order Logic
•Inference in First-Order Logic is used to deduce new facts or sentences from existing
sentences
to
psolst
UNIFICATION IN AI
•Unification in AI is the process of making two logical
expressions identical by determining a suitable substitution
of variables
•It is a key operation in first-order logic and is widely used in
automated reasoning, inference engines, and logic
programming to resolve logical statements systematically.
•In AI, unification plays an essential role in theorem proving,
where it helps match hypotheses with conclusions in logical
deductions.
•In logic programming languages like Prolog, unification
enables the system to match rules and facts to queries,
allowing efficient pattern matching and rule evaluation.
•Unification is a process of making two different logical atomic
expressions identical by finding a substitution. Unification depends on the
substitution process.
•It takes two literals as input and makes them identical using substitution.
Let Ψ
1
and Ψ
2
be two atomic sentences and ? be a unifier such that, Ψ
1
? =
Ψ
2
?, then it can be expressed as UNIFY(Ψ
1
, Ψ
2
).
Example:
Find the MGU for Unify{King(x), King(John)}
•Let Ψ
1
= King(x), Ψ
2
= King(John),
•Substitution θ = {John/x} is a unifier for these atoms and applying this
substitution, and both expressions will be identical.
•The UNIFY algorithm is used for unification, which takes two atomic
sentences and returns a unifier for those sentences (If any exist).
•Unification is a key component of all first-order inference algorithms.
•It returns fail if the expressions do not match with each other.
•The substitution variables are called Most General Unifier or MGU.
EXAMPLES OF UNIFICATION IN PREDICATE
LOGIC
•Consider two logical expressions in predicate logic:
Parent(X, Mary).
Parent(John, Mary).
•To unify these expressions, we find a substitution that makes them
identical. Here, substituting X = John results in:
Parent(John, Mary) = Parent(John, Mary)
•Since the expressions are now identical, unification is successful. This
process allows AI systems to infer new knowledge and establish
logical relationships, making it fundamental in knowledge-based
reasoning and automated decision-making.
CONDITIONS FOR UNIFICATION
1.IDENTICAL CONSTANTS MUST MATCH
Two constants can only be unified if they are exactly the same. If the
constants are different, unification fails.
Example:
“apple” = “apple” (valid unification)
“apple” ≠ “banana” (invalid unification)
2. Variables Can Be Replaced with Constants or Other Variables
A variable can take the value of a constant or another variable to
achieve unification.
Example:
If X = “red”, then color(X) becomes color(“red”), making the
expressions identical.
3. Function Terms Must Match
•When unifying functions, the function names and the number of
arguments must be the same. Variables within the function can be
substituted to complete the unification.
•Example:
f(a, X) = f(a, b) is unified with X = b, making both expressions identical.
•4. Cannot Create Cycles in Substitutions
•Unification should not lead to infinite recursion by assigning a
variable to an expression that contains itself.
•Example:
X = f(X) creates an infinite cycle and is not allowed in unification.
UNIFICATION ALGORITHM
•Number of Arguments in both expressions must be identical.
•Unification will fail if there are two similar variables present in the same expression.
Algorithm: Unify(Ψ
1
, Ψ
2
)
•Step. 1: If Ψ
1
or Ψ
2
is a variable or constant, then:
•a) If Ψ
1
or Ψ
2
are identical, then return NIL.
•b) Else if Ψ
1
is a variable,
•a. then if Ψ
1
occurs in Ψ
2
, then return FAILURE
•b. Else return { (Ψ
2
/ Ψ
1
)}.
•c) Else if Ψ
2
is a variable,
•a. If Ψ
2
occurs in Ψ
1
then return FAILURE,
•b. Else return {( Ψ
1
/ Ψ
2
)}.
•d) Else return FAILURE.
•Step.2: If the initial Predicate symbol in Ψ
1
and Ψ
2
are not same, then return
FAILURE.
•Step. 3: IF Ψ
1
and Ψ
2
have a different number of arguments, then return FAILURE.
•Step. 4: Set Substitution set(SUBST) to NIL.
Unification Algorithm
Step. 5: For i=1 to the number of elements in Ψ
1
.
a) Call Unify function with the ith element of Ψ
1
and ith element of Ψ
2
, and put the result into S.
b) If S = failure then returns Failure
c) If S ≠ NIL then do,
a. Apply S to the remainder of both L1 and L2.
b. SUBST= APPEND(S, SUBST).
Step.6: Return SUBST.
Implementation of the Algorithm
Step.1: Initialize the substitution set to be empty.
Step.2: Recursively unify atomic sentences:
Check for Identical expression match.
•If one expression is a variable v
i
, and the other is a term t
i
which does not contain variable v
i
,
then:
•Substitute t
i
/ v
i
in the existing substitutions
•Add t
i
/v
i
to the substitution setlist.
•If both the expressions are functions, then function name must be similar, and the number of
arguments must be the same in both the expression.
•For each pair of the following atomic sentences find the most general unifier (If exist).
a)
,
)
,
(b)
,
a))
*
Al
unification
?
A2
-&
Sub-21withg(b)
[f(b)(2)
&
(a),
)
,
O(
,
g(F(b)
,
a)
, )
*
Sub
(ote)
&
(a),)
.
O
,
a)
, )
unified
-
What is an Inference Engine?
•An inference engine is the reasoning part of an Artificial Intelligence
(AI) system or an Expert System.
•It applies rules (knowledge base) to the given facts (data) to derive
new information or make decisions.
Components of an Expert System
•Knowledge Base – stores facts and rules.
Example:
Rule: IF patient has fever AND cough → THEN possible flu
Fact: Patient has fever
•Inference Engine – the brain of the system. It decides:
Which rules to apply?
In what order?
What conclusions to derive?
•User Interface – communicates with the user.
Types of Inference in AI
•Forward Chaining (Data-driven)
•Start with facts → apply rules → reach a conclusion.
•Example:
•Fact: Patient has fever
•Rule: IF fever AND cough → flu
•Add new fact if cough is true → conclude flu.
•Backward Chaining (Goal-driven)
•Start with a hypothesis → work backwards to check if facts support it.
•Example:
•Goal: Does patient have flu?
•Check rules → IF fever AND cough → flu
•Ask user if patient has fever & cough → if yes → conclude flu.
Example in Prolog (Tiny Inference Engine)
% Facts
fever(john).
cough(john).
% Rules
flu(X) :- fever(X), cough(X).
% Query
?- flu(john).
Output: true → inference engine concludes John has flu.
INFERENCE ENGINE
•The inference engine is the component of the intelligent system in artificial intelligence,
which applies logical rules to the knowledge base to infer new information from known
facts. The first inference engine was part of the expert system. Inference engine
commonly proceeds in two modes, which are:
•Forward chaining
•Backward chaining
Horn Clause and Definite clause:
•Horn clause and definite clause are the forms of sentences, which enables knowledge
base to use a more restricted and efficient inference algorithm. Logical inference
algorithms use forward and backward chaining approaches, which require KB in the
form of the first-order definite clause.
•Definite clause: A clause which is a disjunction of literals with exactly one positive
literal is known as a definite clause or strict horn clause.
•Horn clause: A clause which is a disjunction of literals with at most one positive
literal is known as horn clause. Hence all the definite clauses are horn clauses.
Example:
(¬ p V ¬ q V k). It has only one positive literal k.
•It is equivalent to p ∧ q → k.
Forward Chaining
•Forward chaining is also known as a forward deduction or forward reasoning method
when using an inference engine. Forward chaining is a form of reasoning which start
with atomic sentences in the knowledge base and applies inference rules (Modus
Ponens) in the forward direction to extract more data until a goal is reached.
•The Forward-chaining algorithm starts from known facts, triggers all rules whose
premises are satisfied, and add their conclusion to the known facts. This process
repeats until the problem is solved.
Properties of Forward-Chaining:
•It is a down-up approach, as it moves from bottom to top.
•It is a process of making a conclusion based on known facts or data, by starting from
the initial state and reaches the goal state.
•Forward-chaining approach is also called as data-driven as we reach to the goal using
available data.
•Forward -chaining approach is commonly used in the expert system, such as CLIPS,
business, and production rule systems.
Forward Chaining
•"As per the law, it is a crime for an American to sell weapons to hostile nations.
Country A, an enemy of America, has some missiles, and all the missiles were
sold to it by Robert, who is an American citizen."Prove that "Robert is criminal.“
•Facts Conversion into FOL:
•American (p) ∧ weapon(q) ∧ sells (p, q, r) ∧ hostile(r) → Criminal(p) ...(1)
•Owns(A, T1) ......(2)
Missile(T1) .......(3)
•?p Missiles(p) ∧ Owns (A, p) → Sells (Robert, p, A) ......(4)
•Missile(p) → Weapons (p) .......(5)
•Enemy(p, America) →Hostile(p) ........(6)
•Enemy (A, America) .........(7)
•American(Robert). ..........(8)
Backward Chaining
•Backward-chaining is also known as a backward deduction or backward reasoning
method when using an inference engine. A backward chaining algorithm is a form of
reasoning, which starts with the goal and works backward, chaining through rules to
find known facts that support the goal.
•Properties of backward chaining:
•It is known as a top-down approach.
•Backward-chaining is based on modus ponens inference rule.
•In backward chaining, the goal is broken into sub-goal or sub-goals to prove the facts
true.
•It is called a goal-driven approach, as a list of goals decides which rules are selected
and used.
•Backward -chaining algorithm is used in game theory, automated theorem proving
tools, inference engines, proof assistants, and various AI applications.
•The backward-chaining method mostly used a depth-first search strategy for proof.
S. No.Forward ChainingBackward Chaining
1.Forward chaining starts from known facts and applies inference rule to extract more data
unit it reaches to the goal.
Backward chaining starts from the goal and works
backward through inference rules to find the
required facts that support the goal.
2.It is a bottom-up approach It is a top-down approach
3.Forward chaining is known as data-driven inference technique as we reach to the goal
using the available data.
Backward chaining is known as goal-driven
technique as we start from the goal and divide into
sub-goal to extract the facts.
4.Forward chaining reasoning applies a breadth-first search strategy.Backward chaining reasoning applies a depth-first
search strategy.
5.Forward chaining tests for all the available rules Backward chaining only tests for few required
rules.
6.Forward chaining is suitable for the planning, monitoring, control, and interpretation
application.
Backward chaining is suitable for diagnostic,
prescription, and debugging application.
7.Forward chaining can generate an infinite number of possible conclusions.Backward chaining generates a finite number of
possible conclusions.
8.It operates in the forward direction. It operates in the backward direction.
9.Forward chaining is aimed for any conclusion. Backward chaining is only aimed for the required
data.
Reasoning
•"Reasoning is a way to infer facts from existing data." It is a general process of
thinking rationally, to find valid conclusions.
Types of Reasoning
•1. Deductive reasoning:
•Deductive reasoning is deducing new information from logically related known
information. It is the form of valid reasoning, which means the argument's conclusion
must be true when the premises are true.
•Deductive reasoning is a type of propositional logic in AI, and it requires various rules
and facts. It is sometimes referred to as top-down reasoning, and contradictory to
inductive reasoning.
•In deductive reasoning, the truth of the premises guarantees the truth of the
conclusion.
•Premise-1: All the human eats veggies
•Premise-2: Suresh is human.
•Conclusion: Suresh eats veggies.
Reasoning
•The general process of deductive reasoning is given below:
2. Inductive Reasoning:
•Inductive reasoning is a form of reasoning to arrive at a conclusion using limited sets
of facts by the process of generalization. It starts with the series of specific facts or
data and reaches to a general statement or conclusion.
•Inductive reasoning is a type of propositional logic, which is also known as
cause-effect reasoning or bottom-up reasoning.
•In inductive reasoning, we use historical data or various premises to generate a
generic rule, for which premises support the conclusion.
•In inductive reasoning, premises provide probable supports to the conclusion, so the
truth of premises does not guarantee the truth of the conclusion.
•Example:
•Premise: All of the pigeons we have seen in the zoo are white.
•Conclusion: Therefore, we can expect all the pigeons to be white
Reasoning
3. Abductive reasoning:
•Abductive reasoning is a form of logical reasoning which starts with single or multiple
observations then seeks to find the most likely explanation or conclusion for the
observation.
•Abductive reasoning is an extension of deductive reasoning, but in abductive
reasoning, the premises do not guarantee the conclusion.
•Example:
•Implication: Cricket ground is wet if it is raining
•Axiom: Cricket ground is wet.
•Conclusion It is raining.
Reasoning
4. Common Sense Reasoning
•Common sense reasoning is an informal form of reasoning, which can be gained
through experiences.
•Common Sense reasoning simulates the human ability to make presumptions about
events which occurs on every day.
•It relies on good judgment rather than exact logic and operates on heuristic
knowledge and heuristic rules.
•Example:
•One person can be at one place at a time.
•If I put my hand in a fire, then it will burn.
•The above two statements are the examples of common sense reasoning which a
human mind can easily understand and assume.
Reasoning
5. Monotonic Reasoning:
•In monotonic reasoning, once the conclusion is taken, then it will remain the same
even if we add some other information to existing information in our knowledge
base. In monotonic reasoning, adding knowledge does not decrease the set of
prepositions that can be derived. Example:
•Earth revolves around the Sun.
•It is a true fact, and it cannot be changed even if we add another sentence in
knowledge base like, "The moon revolves around the earth" Or "Earth is not round,"
etc.
Advantages of Monotonic Reasoning:
•In monotonic reasoning, each old proof will always remain valid.
•If we deduce some facts from available facts, then it will remain valid for always.
Disadvantages of Monotonic Reasoning:
•We cannot represent the real world scenarios using Monotonic reasoning.
•Since we can only derive conclusions from the old proofs, so new knowledge from
the real world cannot be added.
Reasoning
6. Non-monotonic Reasoning
•In Non-monotonic reasoning, some conclusions may be invalidated if we add some
more information to our knowledge base.
•Example: Birds can fly
•Penguins cannot fly
•Pitty is a bird
•So from the above sentences, we can conclude that Pitty can fly.
•However, if we add one another sentence into knowledge base "Pitty is a penguin",
which concludes "Pitty cannot fly", so it invalidates the above conclusion.
Advantages of Non-monotonic reasoning:
•In Non-monotonic reasoning, we can choose probabilistic facts or can make
assumptions. Also used in Robot Navigation.
Disadvantages of Non-monotonic Reasoning:
•In non-monotonic reasoning, the old facts may be invalidated by adding new
sentences.
•It cannot be used for theorem proving.
Based on Nature of Logic
1.Deductive Reasoning
1.From general rules → specific conclusion.
2.Example:
1.Rule: All humans are mortal.
2.Fact: Socrates is a human.
3.Conclusion: Socrates is mortal.
2.Inductive Reasoning
1.From specific cases → general conclusion.
2.Example:
1.Fact: Sun rose today, yesterday, and day before.
2.Conclusion: Sun rises every day. (probabilistic, not guaranteed).
3. Abductive Reasoning
•From incomplete facts → best possible explanation.
•Example:
•Fact: Patient has fever.
•Possible reasons: flu, infection, malaria.
•Choose most likely explanation (flu).
4. Non-monotonic Reasoning
•Conclusions can change when new knowledge is added.
•Example:
•Rule: Birds can fly.
•Fact: Tweety is a bird → Tweety can fly.
•New fact: Tweety is a penguin → Tweety cannot fly.
PROLOG EXAMPLE
% Knowledge Base
human(socrates).
human(plato).
mortal(X) :- human(X).
% Query
?- mortal(socrates).
% Answer: true
Resolution
•Resolution is a theorem proving technique that proofs by contradictions. It was
invented by a Mathematician John Alan Robinson in the year 1965.
•Resolution is used, if there are various statements are given, and we need to prove a
conclusion of those statements. Unification is a key concept in proofs by resolutions.
Resolution is a single inference rule which can efficiently operate on the conjunctive
normal form or clausal form.
•Clause: Disjunction of literals (an atomic sentence) is called a clause. It is also known
as a unit clause.
•Conjunctive Normal Form: A sentence represented as a conjunction of clauses is
said to be conjunctive normal form or CNF.
The resolution inference rule:
•.
•Where l
i
and m
j
are complementary literals.
•This rule is also called the binary resolution rule because it only resolves exactly
two literals.
Resolution
Steps for Resolution:
•Conversion of facts into first-order logic.
•Convert FOL statements into CNF
•Negate the statement which needs to prove (proof by contradiction)
•Draw resolution graph (unification).
Example:
•John likes all kind of food.
•Apple and vegetable are food
•Anything anyone eats and not killed is food.
•Anil eats peanuts and still alive
•Harry eats everything that Anil eats.
Prove by resolution that:
•John likes peanuts.
Resolution
•Step-1: Conversion of Facts into FOL
Step-2: Conversion of FOL into CNF
•Eliminate all implication (→) and rewrite
•∀x ¬ food(x) V likes(John, x)
•food(Apple) Λ food(vegetables)
•∀x ∀y ¬ [eats(x, y) Λ ¬ killed(x)] V food(y)
•eats (Anil, Peanuts) Λ alive(Anil)
Resolution
•∀x ¬ eats(Anil, x) V eats(Harry, x)
•∀x¬ [¬ killed(x) ] V alive(x)
•∀x ¬ alive(x) V ¬ killed(x)
•likes(John, Peanuts).
•Move negation (¬)inwards and rewrite
•∀x ¬ food(x) V likes(John, x)
•food(Apple) Λ food(vegetables)
•∀x ∀y ¬ eats(x, y) V killed(x) V food(y)
•eats (Anil, Peanuts) Λ alive(Anil)
•∀x ¬ eats(Anil, x) V eats(Harry, x)
•∀x ¬killed(x) ] V alive(x)
•∀x ¬ alive(x) V ¬ killed(x)
•likes(John, Peanuts).
•Rename variables or standardize variables
•∀x ¬ food(x) V likes(John, x)
•food(Apple) Λ food(vegetables)
•∀y ∀z ¬ eats(y, z) V killed(y) V food(z)
•eats (Anil, Peanuts) Λ alive(Anil)
Resolution
•∀w¬ eats(Anil, w) V eats(Harry, w)
•∀g ¬killed(g) ] V alive(g)
•∀k ¬ alive(k) V ¬ killed(k)
•likes(John, Peanuts).
•Eliminate existential instantiation quantifier by elimination.
In this step, we will eliminate existential quantifier ∃, and this process is known
as Skolemization. But in this example problem since there is no existential quantifier
so all the statements will remain same in this step.
•Drop Universal quantifiers.
In this step we will drop all universal quantifier since all the statements are not
implicitly quantified so we don't need it.
•¬ food(x) V likes(John, x)
•food(Apple)
•food(vegetables)
•¬ eats(y, z) V killed(y) V food(z)
•eats (Anil, Peanuts)
•alive(Anil)
Resolution
•¬ eats(Anil, w) V eats(Harry, w)
•killed(g) V alive(g)
•¬ alive(k) V ¬ killed(k)
•likes(John, Peanuts).
•Distribute conjunction ∧ over disjunction ¬.
This step will not make any change in this problem.
•Step-3: Negate the statement to be proved
•In this statement, we will apply negation to the conclusion statements, which will be
written as ¬likes(John, Peanuts)
•Step-4: Draw Resolution graph:
•Now in this step, we will solve the problem by resolution tree using substitution. For
the above problem, it will be given as follows:
Procedural Knowledge
•Procedural Knowledge also known as Interpretive knowledge, is the
type of knowledge in which it clarifies how a particular thing can be
accomplished. It is not so popular because it is generally not used. It
emphasize how to do something to solve a given problem.
Declarative Knowledge
•Declarative Knowledge also known as Descriptive knowledge, is the
type of knowledge which tells the basic knowledge about something
and it is more popular than Procedural Knowledge. It
emphasize what to do something to solve a given problem. Let's see
it with an example:
106565
r
(P
+
a)v(Q
+
P)istore
.
avP
I
under-true
all
Pg14(32
Pand
P-G
isgiven
tobe
true
,
then
we
lifethat's
is
true
-
MODUSTOLLENS
S
ing
and
~
P
+
~D
are
given
to
be
true
,
the
up
istrue
.