AM601PC: KNOWLEDGE REPRESENTATION AND REASONING
B.Tech. III Year II Sem.
UNIT - I
The Key Concepts: Knowledge, Representation, Reasoning, Why knowledge
representation and reasoning, Role of logic Logic: Historical background, Representing
knowledge in logic, Varieties of logic, Name, Type, Measures, Unity Amidst diversity.
What is KRR (Knowledge Representation and Reasoning)?
Knowledge Representation and Reasoning (KRR) is a field in artificial intelligence (AI) that
focuses on how to represent information in a way that a computer system can use to make
decisions with human-like reasoning. Knowledge representation involves structuring
information in a form that a computer can understand.
Reasoning refers to the process of drawing conclusions, making inferences, and solving
problems based on the information in the knowledge graph. With a reasoning engine, these
logical operations can be performed on the represented knowledge to derive new information.
Note: In artificial intelligence (AI), perception is the process of using sensors to interpret and
understand the world around a machine
Knowledge, Representation, and Reasoning
Knowledge: Representation: Reasoning:
1. Refers to the 1. Involves structuring and 1. The process of drawing
information and facts organizing knowledge in conclusions, making
about the world that a a way that computers can inferences, or solving
system needs to perform store, process, and use. problemsusing the
tasks effectively. 2. Common methods represented knowledge.
2. This includes data, rules, include logical 2. This could involve
concepts, relationships, statements, graphs, deduction (logical
and general understanding semantic networks, reasoning), induction
of the domain or problem. ontologies, or frames. (generalization), or
3. Example: Knowing that 3. Example: Representing abduction (hypothesis
"water boils at 100°C" or a family tree with nodes generation).
"a car has four wheels." (individuals) and edges 3. Example: Given "All
(relationships). humans are mortal" and
“Ram is human,"
reasoning concludes,
“Ram is mortal."
Why KRR?
KRR systems are more expressive than traditional databases so make it easier to model complex
knowledge. Greater flexibility in the way data is structured makes KRR ideal to represent real world
relationships and concepts.
Reasoning transforms this data into valuable information, both to the benefit of performance and
insights that can be extracted. With incremental reasoning this happens automatically which allows
for any new changes and updates to the database to be handled effortlessly and optimally, saving time
and maintenance costs.
The synergy between knowledge representation and reasoning is crucial in building systems that can
understand, infer, and act upon information in a structured and rule-based manner.
Why Knowledge Representation?
• Adaptability: Useful for open-ended tasks where the system can't know all tasks in advance.
• Easy Extension: Adding new information automatically extends system behavior and
dependencies.
• Error Debugging: Faults can be traced back to incorrect beliefs in the KB, simplifying
troubleshooting.
• Explainability: System behavior is justifiable by linking actions to represented knowledge
(e.g., grass is green because vegetation is green).
• Allows assimilation of new knowledge, like reading facts about geography, which can be
reused across different tasks.
Why Reasoning?
• Logical Inference: Reasoning computes new beliefs by inferring from represented
facts. o For example, combining Patient X’s allergies with known relationships allows
the system to deduce new allergic conditions.
• Computational Issues: Reasoning is sometimes logically incomplete or unsound due
to limitations in computation speed and efficiency.
• Conceptual Trade-offs: Sometimes reasoning includes reasonable assumptions not
strictly tied to represented facts (e.g., assuming Tweety flies even without explicit
evidence).
• Inconsistency Handling: In a system with multiple sources of data, incomplete
reasoning is useful until contradictions are resolved.
Examples of Knowledge-Based Systems
• Knowledge Representation enables AI systems to be interpretable, purposeful, and
functionally aligned with human understanding and reasoning processes.
Example: A Smart Home AI System
• Knowledge Base (KB) contains symbolic representations:
• Facts: "If the temperature is below 18°C, turn on the heater."
• Beliefs: "People like a warm living room."
• Goals: "Maintain a comfortable room temperature."
• How it Shapes Actions and Reasoning:
o The system checks the current temperature.
o Based on its knowledge, it decides to turn on the heater automatically to meet the goal
of a warm living room.
Explain types of Knowledge in AI?
AI systems rely on different types of knowledge to function efficiently. Each type serves a
specific role in reasoning, decision-making, and problem-solving. Below are the primary
types of knowledge used in AI:
1. Declarative Knowledge
What it is: This type of knowledge refers to facts or statements that describe the world, often
in the form of “knowing what.” It is static and doesn’t involve actions or procedures.
Example: “Paris is the capital of France” is a piece of declarative knowledge.
2. Structural Knowledge
What it is: This type of knowledge deals with the relationships between entities or concepts,
organizing knowledge into structures like hierarchies or networks.
Example: Understanding that a dog is a type of animal and a poodle is a type of dog reflects
structural knowledge.
3. Procedural Knowledge
What it is: Procedural knowledge describes “how” to perform tasks or solve problems. It is
dynamic and action-oriented, focusing on processes and methods.
Example: Knowing how to solve a mathematical equation or how to bake a cake are
examples of procedural knowledge.
4. Meta Knowledge
What it is: Meta knowledge is knowledge about knowledge. It refers to understanding which
knowledge to use in a particular situation or context.
Example: In a medical diagnostic system, knowing which symptoms to prioritize when
diagnosing a disease is an example of meta knowledge.
5. Heuristic Knowledge
What it is: Heuristic knowledge consists of experience-based rules of thumb or best practices
that help in making decisions quickly without complete information.
Example: A heuristic might be “If a website loads slowly, refresh the page” — it’s not
always guaranteed to work, but it’s often useful.
Explain Cycle of Knowledge Representation in AI.
The AI Knowledge Cycle represents the continuous process through which AI systems
acquire, process, utilize, and refine knowledge.
1. Knowledge Acquisition: AI gathers data from various sources, including structured
databases, unstructured text, images, and real-world interactions. Techniques such as machine
learning, natural language processing (NLP), and computer vision enable this acquisition.
2. Knowledge Representation: Once acquired, knowledge must be structured for efficient
storage and retrieval. Represented through methods explained above:
3. Knowledge Processing & Reasoning: AI applies logical inference, probabilistic models,
and deep learning to process knowledge. This step allows AI to:
• Draw conclusions (deductive and inductive reasoning)
• Solve problems using heuristic search and optimization
• Adapt through reinforcement learning and experience
4. Knowledge Utilization: AI applies knowledge to real-world tasks, including decision-
making, predictions, and automation. Examples include:
• Virtual assistants understanding user queries
• AI-powered recommendation systems suggesting content
• Self-driving cars making real-time navigation decisions
5. Knowledge Refinement & Learning: AI continuously updates its knowledge base
through feedback loops. Techniques like reinforcement learning, supervised fine-tuning, and
active learning help improve accuracy and adaptability. This ensures AI evolves based on
new data and experiences.
What are the applications of Knowledge Representation in AI?
Knowledge representation is applied across various domains in AI, enabling systems to
perform tasks that require human-like understanding and reasoning. Some notable
applications include:
Expert
Systems
Natural Language
Robotics Applications of Processing (NLP)
Knowledge
Representation
Semantic Cognitive
Web Computing
Expert Systems: These systems use knowledge representation to provide advice or make
decisions in specific domains, such as medical diagnosis or financial planning.
Natural Language Processing (NLP): Knowledge representation is used to understand and
generate human language, enabling applications like chatbots, translation systems, and
sentiment analysis.
Robotics: Robots use knowledge representation to navigate, interact with environments, and
perform tasks autonomously.
Semantic Web: The Semantic Web relies on ontologies and other knowledge representation
techniques to enable machines to understand and process web content meaningfully.
Cognitive Computing: Systems like IBM's Watson use knowledge representation to process
vast amounts of information, reason about it, and provide insights in fields like healthcare and
research.
What is Logic in Knowledge Representation and Reasoning?
In knowledge representation and reasoning, logic provides a formal and structured way to
represent knowledge and reason about it, enabling AI systems to make inferences and
decisions based on facts and rules.
• Formal Representation:
Logic uses symbols, syntax, and semantics to express knowledge in a precise and
unambiguous way, allowing computers to process and manipulate information effectively.
• Inference and Reasoning:
Logic provides rules and methods for drawing conclusions from existing knowledge,
enabling AI systems to infer new information and make decisions based on the available
facts.
Types of Logic:
• Propositional Logic: Deals with propositions (statements) and their relationships (e.g., "It is
raining" or "The sky is blue").
• First-Order Logic (FOL): Allows representing objects and their properties, relationships,
and functions, enabling more complex knowledge representation.
• Higher-Order Logic: Extends FOL by allowing quantification over predicates and functions,
enabling even more expressive knowledge representation.
Note:
Propositional logic - A proposition is a statement that is either true or false.
Examples: –
Exp 1. Pitt is located in the Oakland section of Pittsburgh.
• (T)
Exp 2. 5 + 2 = 8.
• (F)
Exp 3. It is raining today.
• (either T or F)
What are the basic logical connectives in propositional logic?
The basic logical connectives are AND (∧), OR (∨), NOT (¬), IMPLIES (→), and IF AND ONLY IF (↔).
What is First-order logic?
First-order logic is a powerful language that develops information about the objects in an easier way and can also express the
relationship between those objects.
First-order logic—also called predicate logic, predicate calculus, quantificational logic is a collection of formal systems
used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantified variables over non-
logical objects, and allows the use of sentences that contain variables
What are Quantifiers in Predicate Logic?
Quantifiers are the quantity defining terms which are used with the predicates. Quantifiers contain a statement type of
formula, whose value (truth value) may depend on other variables values.
Types of Quantifiers
There are two types of quantifiers:
1. Universal Quantifier
The universal quantifier is used to define the whole subject population under the predicate. It can be used anywhere where
the phrases like: 'for all', 'for each', 'for every' are used.
The symbol '∀' is used to represent universal Quantifier. To combine the universal quantifier with the predicate and the
subject, implication sign, '→' is used.
Example:
∀x: Boy(x) → like(x,Apple)
The above statement says that: 'All boys like apple'.
2. Existential Quantifier
The Existential Quantifier is used at the places where only some part of the subject's population is to be defined under the
predicate. It can be used at all the places where the following phrases are used: 'There exist', 'For some', 'For at least', etc.
The Existential Quantifier is represented by the symbol '∃'. To combine the Existential quantifier with the predicate and the
subject, the conjunction symbol, '^' is used.
Example:
∃x: Boy(x) ^ like(x,apple)
More example:
1. All birds fly.
∀x bird(x) →fly(x).
2. Every man respects his parent.
∀x man(x) → respects (x, parent).
3. Some boys play cricket.
∃x boys(x) → play(x, cricket).
4. Not all students like both Mathematics and Science.
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x, Science)].
5. Only one student failed in Mathematics.
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y) [¬(x==y) ∧ student(y) → ¬failed (x, Mathematics)].
The Role of Logic in Knowledge Representation and Reasoning (KRR)
Logic is a powerful tool for structuring knowledge and reasoning in AI. First-Order Logic
(FOL) is a key method, but other approaches also exist. Understanding both what knowledge
means (knowledge level) and how computers handle it (symbol level) is crucial for
effective AI systems.
The Role of Logic in Knowledge Representation and Reasoning (KRR)
1. Why Logic Matters for KRR
o Logic helps us understand relationships between facts (called entailment)
and how to reason using rules and truth conditions.
o It ensures that knowledge is structured clearly so that computers can use it
effectively.
2. First-Order Logic (FOL)
o FOL is a formal language used to represent knowledge, created by Gottlob
Frege.
o It is widely used in AI because it allows us to express complex ideas about
objects and their relationships.
3. FOL is Just the Beginning
o While FOL is a great starting point, there are other logical systems that can
represent knowledge differently and might be more useful in some cases.
4. Beyond Logic
o Logic is useful, but it can’t handle everything.
o Some reasoning methods (like probabilistic reasoning) go beyond pure logic
to deal with uncertainty and incomplete knowledge.
5. Adequacy at Each Level
o There are two levels to consider when working with logic in AI:
▪ Knowledge Level: How well does the language represent facts and
reasoning rules?
▪ Symbol Level: How efficiently can the computer process and compute
the knowledge?
6. Using Logic for Analysis
o FOL is useful for analyzing knowledge at the knowledge level, helping us
understand the structure of information without worrying about technical
details for now.
7. The Knowledge Level (Newell’s Idea)
o AI researcher Allen Newell proposed that we can look at knowledge in two
ways:
▪ Knowledge Level: What knowledge is represented and how we reason
with it.
▪ Symbol Level: How computers actually store and process that
knowledge using algorithms.
Historical Background of Knowledge Representation and Logic
1. The Ancient Philosophers and Knowledge
• Socrates (5th century B.C.) questioned what people claimed to know, using a
method of questioning (dialectic) to test their ideas about Truth, Beauty, and Justice.
• Plato (his student) helped establish epistemology, the study of knowledge and how
we justify it.
• Socrates' questioning had serious consequences—he was sentenced to death for
challenging accepted beliefs.
2. Aristotle’s Contributions to Logic
• Aristotle moved from just studying knowledge to figuring out how to represent it
logically.
• He created many terms still used today (e.g., category, hypothesis).
• His ideas were later translated into Latin and influenced modern technical vocabulary.
3. Aristotle’s Syllogism (Logical Deduction)
• Syllogism is a logical way to deduce conclusions from two given statements
(premises).
• Example:
o Major Premise: All mammals have hearts.
o Minor Premise: A dog is a mammal.
o Conclusion: Therefore, a dog has a heart.
• Aristotle also created formal rules for logical reasoning, which still influence modern
logic and programming.
4. Scholastic Logic (Medieval Period)
• Scholars in the Middle Ages expanded Aristotle’s logic. They classified logical
statements using letters:
o A (All A is B), I (Some A is B), E (No A is B), O (Some A is not B).
• They developed patterns for valid reasoning, such as:
o Barbara (AAA) → All A is B, All B is C, Therefore, All A is C.
o Celarent (EAE) → No A is B, All B is C, Therefore, No A is C.
5. The Tree of Porphyry and Semantic Networks
• Porphyry (3rd century) created a tree-like diagram to show how categories relate
(e.g., a human is a type of living thing).
• This hierarchical structure is used in AI today for organizing data (e.g., in semantic
networks and ontologies).
6. Ramon Lull’s Automated Reasoning (13th Century)
• He built mechanical devices to automate logical reasoning, an early step toward AI
and computation.
Mathematical Logic and Modern Developments
7. Leibniz’s Logic and Numbers (17th Century)
• Gottfried Leibniz applied mathematics to logic.
• He assigned prime numbers to concepts and used multiplication to test
relationships.
o Example:
▪ Human = 10,374, Body = 6
▪ Since 10,374 is divisible by 6 → Humans are bodies.
▪ But it is not divisible by 66 (Mineral) → Humans are not minerals.
8. Boolean Algebra (19th Century)
• George Boole developed Boolean algebra, the foundation of modern digital
computing.
• It uses binary operations (true/false, 1/0) and logical operators:
o AND (∧), OR (∨), NOT (¬), XOR.
• Used in: Circuit design, computer science, and AI reasoning.
9. Frege’s Begriffsschrift (Conceptual Notation, 1879)
• Gottlob Frege introduced a formal logical system that led to modern predicate
logic.
• Key contributions:
o Quantifiers (∀ = for all, ∃ = there exists).
o Logical connectives (e.g., implication →).
o Function-argument distinction, which became essential for modern AI and
programming.
10. Representing Knowledge in AI: T-Box and A-Box
• AI systems use two types of knowledge representation:
o T-Box (Terminology Box): Defines categories and rules.
▪ Example: Person ⊆ Mammal (A person is a mammal).
o A-Box (Assertion Box): Contains specific facts.
▪ Example: John ∈ Person (John is a person).
Final Thought
From ancient philosophers to modern AI, logic has been the foundation of understanding
and representing knowledge. Today, its principles are used in computer science, machine
learning, and AI systems for decision-making and reasoning.
Representing Knowledge in Logic
1. Logic as a Universal Language
o Think of logic as a way to express knowledge using rules and symbols.
o Leibniz’s idea: He wanted to create a "universal language" that could solve
problems using logic.
o Reality: Modern logic helps us store and analyze knowledge on computers,
but not everything can be perfectly represented in logic.
Example:
o Fact: "Every cat is a mammal."
o In logic: If something is a cat, then it is a mammal.
o (∀x)(cat(x)⇒mammal(x))
2. Propositional Logic (Basic Logic)
o Uses simple symbols (like P, Q, R) to represent facts.
o Advantage: Simple to use.
o Disadvantage: Doesn't show relationships between things.
Example:
o "Every truck has 18 wheels."
o In logic: Just P (It doesn't explain what a truck is or what wheels are).
3. Subject and Predicate (Breaking Sentences into Parts)
o Subject: What we are talking about.
o Predicate: What we are saying about it.
Example:
o "All trailer trucks are 18-wheelers."
o "Some Peterbilt trucks are trailer trucks."
o Conclusion: Some Peterbilt trucks are 18-wheelers.
4. Predicate Logic (More Detailed)
o Uses variables and quantifiers to describe things in detail.
o Example:
▪ "Every truck has 18 wheels."
▪ In logic: (∀x)(truck(x)⇒hasWheels(x,18))
▪ Meaning: If x is a truck, then it has 18 wheels.
5. Ontologies (Organizing Knowledge)
o Ontology: A structured way to classify objects and their relationships.
o Predicates:
▪ Domain-specific (e.g., truck(x), wheel(y)) – These depend on the
topic.
▪ General (e.g., partOf(x, y)) – Used for many topics.
Example:
o A truck has a trailer and 18 wheels.
o In logic:
(∀x)((truck(x)∧(∃y)(trailer(y)∧partOf(x,y)))⇒(∃s)(set(s)∧count(s,18)∧(∀w)(m
ember(w,s)⇒(wheel(w)∧partOf(x,w))))
o Meaning: If something is a truck and has a trailer, it also has a set of 18
wheels.
6. Logic in Other Fields (Like Music!)
o Not everything is best represented using logic.
o Example: Music notation is better for writing melodies.
o But logic can still help computers analyze music.
Example in Logic:
o Melody: "Frère Jacques"
o Logic representation:
(∃x1)(∃x2)(tone(x1,G)∧duration(x1,1)∧next(x1,x2)∧tone(x2,A))
o Meaning: The first note is G, followed by A.
7. EC Logic (Simplified Representation)
o Uses only existence (∃) and AND (∧) for simpler knowledge representation.
o Works well in databases but cannot handle negation or general rules.
Example:
o Fact: "A tritone interval sounds dissonant."
o In logic: (∀x)(∀y)((tone(x,B)∧next(x,y))⇒¬tone(y,F))
o Meaning: If one note is B and the next is F, it is dissonant.
Verities of Logic
Verities of Logic
1. Classical Logic
2. Non-Classical Logic
(a) Propositional Logic (PL) (a) Modal Logic
(b) First-Order Logic (FOL)
(b) Temporal Logic
(c) Higher-Order Logic
(HOL) (c) Epistemic Logic
3. Probabilistic & (d) Deontic Logic
Fuzzy Logic
4. Non-Monotonic
(a) Probabilistic & Default Logic
Logic
(a) Default Logic
(b) Fuzzy Logic
(b) Circumscription
5. Description
Logic (DL) (c) Autoepistemic Logic
1. Classical Logic (Traditional Logic)
This is the basic form of logic used in AI. It follows strict rules of truth and reasoning.
(a) Propositional Logic (PL) → Uses true/false statements.
Example:
If it rains → The ground is wet.
Logic: Rain → Wet Ground
(b) First-Order Logic (FOL) / Predicate Logic → Adds variables and relationships.
Example:
"All humans are mortal."
Logic: ∀x (Human(x) → Mortal(x))
(c) Higher-Order Logic (HOL) → More advanced, allows logic over entire functions or
properties.
Example:
"All humans share a common property."
Logic: ∃P ∀x (Human(x) → P(x))
2. Non-Classical Logic (Modified Classical Logic)
These logics go beyond classical logic to handle uncertainty, beliefs, time, and contradictions.
(a) Modal Logic → Deals with possibility (◇) and necessity (□).
Example:
"It is possible that it will rain tomorrow."
Logic: ◇Rain(Tomorrow)
(b) Temporal Logic → Includes time-based reasoning.
Example:
"Eventually, the robot will reach the goal."
Logic: ◊Goal(Robot)
(c) Epistemic Logic → Used in multi-agent systems (reasoning about what others know).
Example:
"Agent A knows that Agent B does not know X."
Logic: KA ¬KB(X)
(d) Deontic Logic → Used for ethics and legal reasoning (permissions, obligations).
Example:
"You are obligated to pay taxes."
Logic: O(PayTaxes)
3. Probabilistic & Fuzzy Logic (Handling Uncertainty)
These logics deal with real-world scenarios where things are not just black or white.
(a) Probabilistic Logic → Uses probability to express uncertainty.
Example:
"There is a 90% chance it will rain tomorrow."
Logic: P(Rain) = 0.9
(b) Fuzzy Logic → Deals with "degrees of truth" instead of just true/false.
Example:
"The room is warm."
Logic: Warm(Room) = 0.7 (70% warm)
Used in: AI systems like air conditioning, robotics.
4. Non-Monotonic & Default Logic (Handling Changing Knowledge)
These logics allow us to change assumptions when new information comes in.
(a) Default Logic → Assumes things by default unless proven wrong.
Example:
"Birds typically fly." (Penguins are an exception.)
(b) Circumscription → Makes minimal assumptions unless stated otherwise.
Example:
"If an animal is not explicitly said to be a bird, assume it is not a bird."
(c) Autoepistemic Logic → Allows an agent to reason about its own knowledge.
Example:
"I believe that I do not know X."
5. Description Logic (DL)
A specialized logic used for ontologies (organizing and categorizing knowledge).
Example:
"A human is a type of mammal, and mammals are animals."
Used in: Semantic Web (e.g., OWL - Web Ontology Language).
Name, Type and Measure
1. Names
A name refers to a specific individual.
Example: "Clyde" is the name of a particular elephant.
A sentence like "Clyde is an elephant" connects the name (Clyde) with its type (Elephant).
Core Idea: Names directly identify individuals, whereas types classify them into broader
categories.
2. Types
A type is a general category that includes multiple entities.
Example: "Elephant" refers to the species, not a specific elephant.
In typed logic, types are represented with variables:
Formula: ('∀x:Cat') ('∀y:Fish') like(x,y)
Meaning: For every cat (x) and every fish (y), x likes y.
Purpose: Types group entities into categories rather than identifying individuals.
3. Measures
Measures represent quantitative properties like salary, height, and weight.
Example:
"An actor might choose a salary of $20 million" → The measure here is salary ($20 million),
not a name like Fred.
Why are measures important?
In computing, confusing measures with individuals can cause errors.
Example:
"Tom and Sue have the same salary" → This means their salaries are identical, not that they
share one pay check.
In databases and programming, distinguishing measures from individual entities helps avoid
incorrect assumptions about data storage and retrieval.
Exercise 1: Sentence: "Titanic is a ship that weighs 52,000 tons."
Name: Titanic (a specific ship)
Type: Ship (a category of watercraft)
Measure: 52,000 tons (weight)
Exercise 2: Sentence: "Mount Everest is a mountain with a height of 8,848 meters."
Name: Mount Everest (a specific mountain)
Type: Mountain (a category of landforms)
Measure: 8,848 meters (height)
Exercise 3 Sentence: "Ferrari is a car brand, and the latest model costs $300,000."
Name: Ferrari (a specific car brand)
Type: Car (a category of vehicles)
Measure: $300,000 (price)
Exercise 4 Sentence: "Apple is a company, and its revenue last year was $400 billion."
Name: Apple (a specific company)
Type: Company (a category of businesses)
Measure: $400 billion (revenue)
Unity Amidst Diversity in Logic
Logic is used to represent and reason about knowledge. Even though there are different types
of logic, they all share four basic features. Let's break them down in simple terms.
1. Vocabulary (Symbols Used in Logic)
Think of this as the "alphabet" of logic. It includes:
• General symbols (e.g., AND ∧, OR ∨, NOT ¬)
• Names of things (e.g., "Tom" represents a specific person)
• Variables (e.g., x, y for unknowns)
• Punctuation (e.g., parentheses, commas for grouping)
Example:
• In "Tom likes apples,"
o "Tom" = A specific person (constant)
o "likes" = A relationship between "Tom" and "apples"
2. Syntax (Grammar Rules in Logic)
Just like language has grammar rules, logic has rules for forming valid statements.
Example:
• Correct: "p AND q" (written as p ∧ q)
• Incorrect: "AND p q" (wrong order)
Syntax ensures logical statements are structured properly so they make sense.
3. Semantics (Meaning of Statements)
Semantics defines what statements actually mean and whether they are true or false.
Example (Truth Table for AND ∧):
p q p∧q
TT T
TF F
FT F
FF F
This means "p AND q" is true only if both p and q are true.
4. Inference (Drawing Logical Conclusions)
Inference is how we use logic to reach conclusions.
Two Types of Inference:
1 Sound Inference (Always True Conclusions)
• Example: Modus Ponens Rule
o If it rains, the ground will be wet.
o It is raining.
o Conclusion: The ground is wet.
2 Non-Monotonic Inference (Reasoning with Uncertainty)
• Example:
o "Birds can fly" (but penguins are birds and can't fly).
o Sometimes, conclusions need to be updated with new information.
Conclusion: Different Logics, Same Foundation
Even though different logic systems exist (e.g., Prolog, Fuzzy Logic, Modal Logic), they all
follow these four principles:
Feature Purpose
Vocabulary Defines symbols and names
Syntax Sets grammar rules for valid statements
Semantics Determines the meaning of statements
Inference Helps in drawing logical conclusions
These principles make logic powerful and useful in AI, databases (SQL), and intelligent
systems.