Unit I Class Final
Unit I Class Final
Reasoning
Syllabus
• 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
• Proof Theory:
– Variations allow or restrict how proofs are constructed.
– Example: Linear logic ensures every piece of information
is used exactly once.
– In linear logic, if you have one ticket for a train, you can use it
exactly once for travel.
In contrast, classical logic allows you to assume you can reuse the
ticket indefinitely, which isn’t realistic in some contexts.
• Model Theory:
– Adjusts truth values assigned to statements.
– Example: Classical FOL uses "true" or "false," while fuzzy
logic uses a range from 0 (false) to 1 (true).
– The light is on" could be 0.5 if it's dimly lit (partially on).
• Ontology:
– Adds predefined concepts to logic for specific domains.
– Example: A calendar app might use temporal logic to handle
concepts like "next Monday" or "5 PM tomorrow"
automatically.
• Metalanguage:
– Logic used to describe or modify other languages.
– Example: Context-free grammar is a subset of FOL used to
define programming languages.
– The rules that define how HTML tags (like <p> or <h1>) are used in a
web page can be described with a metalanguage like XML Schema.
• Typed Logic:
Typed logic simplifies FOL by labeling variables with types.
• Classical FOL: Example:
• (∀x)(trailerTruck(x)⇒eighteenWheeler(x))
• (∀x:TrailerTruck)(∃s:Set)(s@18∧(∀w∈s)(wheel(w)∧part(x,w)))
o Lambda Expression:
o λx.(x+2)
o This means: "A function that takes an input x and returns x+2
o (λx.(x+2))3=3+2=5
o Example: ∀x:TrailerTruck(∃s:Set∧s@18∧(∀w∈s)
(wheel(w)∧part(x,w))).
2. Conceptual Graphs:
o Eliminates variables for readability.
• Key Components:
• Theory of Reference: Connects constants and variables to real-
world entities.
• Theory of Truth: Decides which sentences are correct or
incorrect.
• Example:
• In Alfred Tarski's theory (1935), we have truth tables that show:
• Statement
• Truth Value
• p AND q
• True/False (depends on the truth of 'p' and 'q')
• For example, if p = True and q = True, then p AND q = True.
• 4. Rules of Inference 🔄
• Inference means drawing logical conclusions based on existing
information. A good logic system must have:
• Two Types of Inference:
• Sound Inference ✅
• Ensures that conclusions preserve true statements according to
semantics.
• Non-monotonic Inference ⚠️
• Used in plausible or approximate reasoning but doesn't always preserve
strict truth.
• Example of Inference:
• Modus Ponens (A common inference rule):
– If "If p, then q" and p is true, then q must be true.
• Sentence Example:
• "If it rains, the ground will get wet."
• Inference: If rains = True, then ground_wet = True.
• Unity Amidst Diversity
• Despite the many notations and types of logic developed over time (like
Prolog, Fuzzy Logic, Modal Logic), they all follow these four core features:
• Feature
• Purpose
• Vocabulary
• For symbols representing entities and actions.
• Syntax
• Grammar to combine symbols into sentences.
• Semantics
• Determines meaning and truthfulness.
• Inference
• Rules for logical reasoning and conclusions.
• 🔧 Applications in Technology
• Prolog: Used in AI programming.
• SQL: Used in database queries but still has
logical semantics.
• AI Systems (Frames, Semantic Networks):
Have the same expressive power as first-
order logic.