0% found this document useful (0 votes)
89 views24 pages

Rule-Based Knowledge Representation in AI

AI

Uploaded by

nirmal2404620
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views24 pages

Rule-Based Knowledge Representation in AI

AI

Uploaded by

nirmal2404620
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UNIT 3

1] Knowledge and Reasoning:


Knowledge and Reasoning refers to the area of AI that focuses on how intelligent systems
represent, store, and use knowledge to solve problems and make decisions. It involves
encoding facts about the world and applying logic-based or rule-based reasoning to infer
new knowledge or reach conclusions.
Goals of KR Systems
 Represent facts about the world.
 Allow for reasoning (deduce new facts).
 Support decision-making and problem-solving.
 Enable learning and updating of knowledge.
Properties of Good KR Systems

Property Description

Representational Adequacy Ability to represent all kinds of


knowledge

Inferential Adequacy Ability to derive new knowledge

Inferential Efficiency Support for efficient reasoning

Acquisitional Efficiency Ease of acquiring new knowledge

Types of Knowledge in AI

Type Example

Declarative Facts (e.g., "Paris is the capital of France")


Knowledge

Procedural Knowledge How-to (e.g., "How to ride a bike")

Meta Knowledge Knowledge about knowledge

Heuristic Knowledge Rules of thumb or best guesses

Semantic Knowledge Relationships (e.g., "A cat is a mammal")

Components of KR&R:
 Ontologies: Provide a structured framework of knowledge, defining a set of concepts
and categories that represent a subject.
 Rules: Govern the logical framework within which AI systems operate to derive
reasoned conclusions.
 Semantics: Offer a deeper understanding of data through meaningful interpretation
and association.
Techniques of Knowledge Representation
Various techniques underpin the functionality of KR&R systems, each serving unique
purposes:
 Logical Representation: Utilizes formal logic to define relationships between entities
in a clear and structured manner. It enables deductive reasoning capabilities and
supports the verification of inferred conclusions.
 Semantic Networks: Employ graphical notations to represent relational knowledge,
facilitating an intuitive method of depicting associations among concepts.
 Frames and Scripts: Use templated structures to represent typical scenarios,
allowing systems to anticipate standard events and act accordingly.
 Rule-Based Systems: Leverage sets of conditional statements to direct the inference
engine in making decisions, mimicking the expert-level decision-making process.
Reasoning Techniques
Reasoning is the method by which AI applies logic to the knowledge base to derive new
information or make decisions:
 Deductive Reasoning: Derives explicit conclusions from known facts or premises,
providing a reliable method for enhancing certainty within specific contexts.
 Inductive Reasoning: Builds broader generalizations from specific observations,
crucial for adapting to new scenarios.
 Abductive Reasoning: Involves forming hypotheses that explain observed
phenomena, essential for diagnostic systems.
Advantages
 Improved Decision-Making: Systems can make logical decisions using stored
knowledge and reasoning mechanisms.
 Explainability: Rule-based reasoning is often transparent and explainable to humans.
 Reusability: Knowledge bases can be reused across multiple applications.
 Scalability: Once the knowledge base grows, systems can solve increasingly complex
problems.
Limitations
 Knowledge Acquisition Bottleneck: Collecting and encoding expert knowledge is
time-consuming and labour-intensive.
 Rigidity: Hard-coded knowledge may not adapt well to new or unseen scenarios.
 Scalability Challenges: Reasoning over large knowledge bases can become
computationally expensive.
 Uncertainty Handling: Traditional logic-based systems struggle with incomplete or
probabilistic information (unlike probabilistic reasoning models like Bayesian
networks).
2] Key Issues in Knowledge Representation
1. Representation Accuracy
 The way knowledge is encoded must accurately reflect the real-world concepts and
relationships.
 Challenge: Ambiguity in natural language or incomplete data can make
representation difficult.
 Example: "Bank" can refer to a financial institution or the side of a river.
2. Inferencing Efficiency
 The reasoning mechanism must be efficient enough to handle large and complex
knowledge bases.
 Challenge: Logic-based systems can become computationally expensive as the
number of facts/rules grows.
 Example: A system with thousands of medical rules may slow down if not optimized.
3. Representational Adequacy
 The KR system should be capable of representing all kinds of knowledge: facts, rules,
procedures, concepts, and heuristics.
 Challenge: Some formats (like propositional logic) may not be expressive enough for
complex scenarios.
4. Handling Incomplete or Uncertain Knowledge
 Real-world knowledge is often incomplete, inconsistent, or uncertain.
 Challenge: Classical logic systems struggle to handle uncertainty; probabilistic
models or fuzzy logic may be needed.
 Example: Diagnosing a disease without all test results.
5. Scalability and Maintainability
 As knowledge grows, the system should scale and allow for updates without breaking
existing functionality.
 Challenge: Adding new knowledge should not require restructuring the entire system.
 Example: Updating drug interaction rules in a medical system.
6. Consistency and Redundancy
 The knowledge base should avoid contradictions and unnecessary duplications.
 Challenge: Conflicting rules can cause incorrect reasoning.
 Example: One rule says "All birds fly"; another says "Penguins are birds and do not
fly."
7. Reasoning with Time and Change
 The KR system must support temporal reasoning — understanding how facts change
over time.
 Challenge: Many traditional systems assume a static world.
 Example: "John is a student" may not be true in the future.
8. Expressiveness vs. Efficiency Trade-off
 A more expressive representation may allow rich modeling but at the cost of speed
and computational resources.
 Challenge: Balance needs to be maintained.
 Example: First-order logic is more expressive than propositional logic but slower in
inference.

3] Representations and Mappings


What is Representation?
In AI, representation refers to the way knowledge, data, and facts about the world are
structured and stored so that machines (agents) can reason, infer, and solve problems.
A good representation should:
 Reflect real-world entities and their relationships.
 Be computationally effective.
 Allow for reasoning and inference.

What is Mapping?
Mapping is the process of translating knowledge from the real-world domain into a formal
structure (representation scheme) that a computer can understand and manipulate.
Example:
 Real-world concept: "John is the father of Alice"
 Mapping to logic: Father(John, Alice)
 Mapping to semantic network: A node for "John", a node for "Alice", with an edge
labeled "Father"

🎯 Importance of Representations and Mappings


 Serve as the interface between human knowledge and computer processes.
 Determine how efficiently an AI system can store, retrieve, and reason about
knowledge.
 Affect system performance, accuracy, and scalability.

🔑 Features of Good Representation


 Representational Adequacy: Ability to represent all kinds of knowledge.
 Inferential Adequacy: Support derivation of new knowledge.
 Inferential Efficiency: Enable reasoning to be performed efficiently.
 Acquisition Efficiency: Easy to acquire and add new knowledge.
Common Representation Schemes and Their Mappings
Representation
Mapped As Description
Scheme

True/False
Propositional Logic Simple facts with no internal structure.
propositions

Predicate Logic
Predicates, quantifiers Express relationships, rules, and general facts.
(FOL)

Graph (nodes and


Semantic Networks Concepts as nodes; relationships as links.
edges)

Slot-filler representation (like objects with


Frames Object-like structures
attributes).

Production Rules IF-THEN rules Rule-based logic: used in expert systems.

Formal hierarchy and taxonomy of


Ontologies Classes and properties
knowledge.

4] Approaches to Knowledge Representation:


1. Logical Representation
Description:
Uses formal logic to represent facts and rules. The most common forms are Propositional
Logic and First-Order Predicate Logic (FOPL).
Features:
 Based on mathematical logic
 Consists of facts, rules, and inference mechanisms
 Uses connectives like AND, OR, NOT, IMPLIES
Real-Life Example:
In a home automation system:
 IsDark(Room1) → TurnOn(Light1)
 "If Room1 is dark, then turn on Light1"
Advantages:
 Precise and unambiguous
 Powerful inference mechanisms
Limitations:
 Difficult to scale to large, real-world domains
 Rigid and requires complete knowledge

2. Semantic Network Representation


Description:
Represents knowledge in a graph structure with nodes (objects/concepts) and edges
(relationships).
Features:
 Easy to visualize
 Good for representing hierarchical relationships
Real-Life Example:
In a biology textbook:
 "A sparrow is a bird" → Sparrow → is-a → Bird
 "Birds can fly" → Bird → can → Fly
Advantages:
 Intuitive and visual
 Suitable for inheritance and taxonomy
Limitations:
 Ambiguity in relationship semantics
 Not ideal for complex logical reasoning

3. Frame-Based Representation
Description:
Knowledge is stored in structured objects (frames). Each frame has slots (attributes) and
values (data or links).
Features:
 Similar to objects in OOP
 Supports default values and inheritance
Real-Life Example:
In a hotel booking system:
Frame: HotelRoom
- Type: Deluxe
- BedSize: King
- AC: Yes
- PricePerNight: ₹5000
Advantages:
 Organizes information neatly
 Allows inheritance of common properties
Limitations:
 Not suited for complex logical operations
 More structure-dependent than logic-based

4. Production Rules (Rule-Based Systems)


Description:
Represents knowledge as a set of IF-THEN rules. Used extensively in expert systems.
Features:
 Easy to encode human expert knowledge
 Highly modular
Real-Life Example:
In a medical diagnosis system:
 IF temperature > 102 AND has cough THEN suspect = Flu
Advantages:
 Human-readable
 Easy to update individual rules
Limitations:
 Rule explosion (too many rules)
 Difficult to resolve conflicts among rules

5. Ontological Representation
Description:
Uses ontologies to define a formal structure of concepts and relationships in a specific
domain.
Features:
 Encoded in standards like OWL or RDF
 Widely used in the Semantic Web
Real-Life Example:
In a university system:
 Ontology includes: Student, Course, Professor, Enrollment
 Relationships: teaches(Professor, Course), enrolled(Student, Course)
Advantages:
 Enables rich semantic queries
 Great for data interoperability
Limitations:
 Complex to build
 Requires domain expertise

🧩 Comparison Summary
Approach Best For Example Domain

Logical Formal reasoning & proofs Law-based AI systems

Semantic Networks Hierarchical data & visual relations Taxonomy, Ontologies

Frame-based Object-attribute data modeling Hotel, Patient records

Rule-based Decision-making & diagnosis Expert systems, Finance

Ontological Structured domain knowledge sharing Semantic Web, Healthcare


Mapping Between KR Systems
Mapping refers to converting knowledge from one representation form to another to enable
interoperability between AI systems.
From → To Explanation
Semantic Relationships (e.g., is-a, has) become slots and attributes in a frame.
Network → Example: "Car is-a Vehicle" becomes a frame with a parent class.
Frame

B → A ⇒ B). This enables formal reasoning.


Production Rule IF-THEN rules are converted to logical implications (e.g., IF A THEN
→ Logic

Logic → Predicates and functions map to classes, individuals, and


Ontology relationships in an ontology (e.g., FOPL predicate HasWings(Bird) →
Ontology class "Bird" with property "HasWings").
Purpose of Mapping:
 Allows different systems to understand each other’s knowledge
 Facilitates integration of rule-based systems, ontologies, and logic engines
✅ Advantages of Knowledge Representation in AI
 Enables Machine Reasoning
Allows machines to make logical inferences and draw conclusions (e.g., expert
systems diagnosing diseases).
 Supports Explainable AI
Representations like rules and frames provide human-readable paths for decision-
making.
 Facilitates Decision Support Systems
Structured knowledge helps in supporting users (e.g., doctors, engineers) in making
informed decisions.
 Allows Modularity and Scalability
KR systems can be designed as modular blocks that grow over time and integrate
with new knowledge easily.
⚠️Challenges in Knowledge Representation
 Ambiguity in Natural Language
Human language is often vague, contextual, or polysemous (multiple meanings).
 Incomplete or Uncertain Knowledge
Real-world scenarios rarely provide complete information (e.g., sensor data in
robotics may be noisy or missing).
 Scalability for Large Systems
Representing all knowledge in large domains (like medicine or law) requires massive
data and reasoning capability.
 Contextual Reasoning
Same knowledge may have different meanings in different contexts. KR systems must
adapt to changing situations.
🧩 Applications of Knowledge Representation
 Expert Systems
Use rule-based or case-based knowledge to provide recommendations (e.g., MYCIN
for medical diagnosis).
 Natural Language Processing (NLP)
Understanding meaning, intent, and grammar relies on semantic knowledge and
ontologies.
 Medical Diagnosis
Systems use symptoms, lab results, and historical knowledge to aid diagnosis
(structured as frames or rules).
 Robotics
Robots use spatial, sensory, and task-related knowledge to navigate and act
intelligently.
 Semantic Search Engines
Enhance search capabilities by understanding concepts and relationships, not just
keywords (e.g., Google Knowledge Graph).

5] Introduction to Predicate Logic


Predicate Logic, also known as First-Order Logic (FOL), is a formal language used to
represent objects, properties of objects, and relations among them. Unlike Propositional
Logic, which deals with whole sentences (true/false values), Predicate Logic allows finer-
grained expression using quantifiers, variables, and functions.
It is foundational to many areas of AI, including expert systems, natural language
understanding, and planning systems.
🧩 Key Concepts and Elements
Component Description Example

Constants Specific names of objects or entities John, Paris, 5

Variables General placeholders for objects x, y, z

Predicates Properties or relationships between entities Loves(John, Mary), IsTall(x)

Functions Map input values to output objects FatherOf(John) = David

Quantifiers Express generality or existence ∀x, ∃y

Connectives Logical operators ¬, ∧, ∨, ⇒, ⇔


🧠 How Predicate Logic Works in AI
Predicate logic is used to build knowledge bases and support logical inference. Here’s how:
1. Representation of Facts
Facts are stated as atomic predicate expressions:
 Doctor(John)
 Loves(John, Mary)
2. Rules and Implications
Define relationships and derive new knowledge:
 ∀x (Doctor(x) ⇒ HasDegree(x))
 ∀x (Human(x) ⇒ Mortal(x))
3. Inference Mechanisms
Apply logical deduction to answer queries or prove statements:
 Known: Human(Socrates)
 Rule: ∀x (Human(x) ⇒ Mortal(x))
 Deduce: Mortal(Socrates)

🔄 Types of Predicate Logic Usage in AI


a. Rule-Based Expert Systems
 Encode medical or legal knowledge

∀x (Fever(x) ∧ Rash(x) ⇒ HasDisease(x, Measles))


 Example:

b. Semantic Web and Ontologies


 Define structured relationships between concepts

∀x (Cat(x) ⇒ Animal(x))
 Example:

c. Planning and Robotics


 Represent preconditions and effects

∀x (At(x, Room1) ∧ DoorOpen ⇒ CanEnter(x, Room2))


 Example:

📘 Real-Life Example: Medical Diagnosis System


Objective: Use logic to diagnose diseases
Facts:
 Fever(Patient1)
 Rash(Patient1)
Rule:
 ∀x (Fever(x) ∧ Rash(x) ⇒ HasMeasles(x))
Query:
 Does Patient1 have measles?
Result:
 Using inference: HasMeasles(Patient1) is true

✅ Advantages of Predicate Logic


 Expressiveness: Can model complex relationships beyond true/false statements
 Formality: Precise and mathematical; no ambiguity
 Reusability: Can use general rules across many problems
 Powerful Inference: Enables derivation of implicit knowledge from known facts

⚠️Limitations of Predicate Logic


 Computationally Expensive: Inference in FOL is semi-decidable; may not terminate
 Data Requirements: Requires well-structured and fully-specified knowledge
 No Uncertainty Handling: Cannot model probability, vagueness (needs probabilistic
logic or fuzzy logic)
 Complexity Increases Rapidly: As the number of predicates and rules grows

🧰 Tools and Systems Using Predicate Logic


 Prolog: A logic programming language based on FOL
 Ontology Editors (e.g., Protégé): Represent knowledge in OWL using FOL
principles
 Automated Theorem Provers: Prove properties of logical systems
 Planning Systems (e.g., STRIPS, PDDL): Use logic to define world states and
actions
6] Representing Simple Facts in Logic (Knowledge Representation in AI)
Representing simple facts is the foundation of logic-based knowledge representation in
artificial intelligence. These are atomic statements that declare truths about the world. They
form the building blocks of more complex logical reasoning systems and expert knowledge
bases.
What Are Simple Facts?
Simple facts are atomic, indivisible logical statements that describe:
 Properties of objects
 Relationships between objects
 Existence of entities
They are usually expressed in Predicate Logic (First-Order Logic), where a predicate
applies to one or more constants or variables.

🧩 Structure of a Simple Fact


A simple fact is typically written as:
Predicate(Constant1, Constant2, ..., ConstantN)
Where:
 Predicate → Describes a relationship or property
 Constants → Specific objects/entities in the domain
Example:
 Father(John, Mike) → "John is the father of Mike"
 IsRed(Rose) → "The rose is red"
 LivesIn(Sam, London) → "Sam lives in London"
These are interpreted as true statements in the knowledge base unless otherwise specified.

🔄 Logical Form of Simple Facts


Here’s how simple facts relate to logical components:
Logic Element Description Example

Constant A named individual John, Paris, Car1

Predicate A function expressing a property IsTall, Loves, Owns

Fact A predicate applied to constants Loves(John, Mary)


Facts can be unary (one argument), binary, or n-ary.
🧠 Knowledge Base Example: School Domain
Let’s say we are building a system for school administration.
Facts:
 Student(Alice)
 Teacher(MrSmith)
 Teaches(MrSmith, Math)
 EnrolledIn(Alice, Math)
 Age(Alice, 14)
These represent basic, unambiguous facts about the entities.

🔍 Querying Facts
You can use inference or matching to check facts.
Example Query:
Is Alice enrolled in Math?
We look up:
EnrolledIn(Alice, Math)
→ Returns true if present in the knowledge base.

💡 Real-Life Example: Travel Booking System


Facts:
 City(Paris)
 Flight(Indigo123, Paris, London)
 Passenger(John)
 Booked(John, Indigo123)
These facts represent:
 Existence of cities
 Flights between cities
 Users and their bookings
This allows an AI system to reason and answer questions like:
 "Is there a flight from Paris to London?"
 "Has John booked any flight?"

✅ Advantages of Representing Simple Facts


 Clarity: Easy to understand, modular representation
 Flexibility: New facts can be added without changing the structure
 Inference Ready: Supports logical reasoning (deduction)
 Machine-Readable: Structured format enables AI-based decision-making

⚠️Limitations
 No Uncertainty Handling: Facts are either true or false (can’t express "maybe")
 No Temporal Aspects: Cannot represent facts that change over time (unless
extended)
 No Implicit Meaning: Requires explicit definitions and cannot infer meaning from
context
🔧 How It's Used in AI
Use Case Example

Expert Systems Facts about symptoms, treatments, diagnoses

Chatbots Facts about user preferences or profiles

Robotics Facts about object locations, tasks

NLP Systems Facts about named entities and relations

Search Engines Facts to power knowledge graphs and answers

7] Representing Instance and ISA Relationships in AI


Understanding how objects, classes, and their hierarchical relationships are represented is
key to building intelligent systems. Two critical concepts used in knowledge representation
are:
 Instance Relationships (object is an example of a class)
 ISA Relationships (a class is a subtype of another class)
These form the foundation for ontologies, semantic networks, frame-based systems, and
logic-based reasoning.

🔍 1. What is an Instance Relationship?


An instance relationship connects a specific object to a general class.
Definition:
An instance is a single example or member of a class.
Notation:
InstanceOf(Tom, Human)
This means “Tom is an instance of the class Human.”
Examples:
 InstanceOf(Rover, Dog) → Rover is a dog.
 InstanceOf(Paris, City) → Paris is a city.
 InstanceOf(Earth, Planet) → Earth is a planet.

🧬 2. What is an ISA Relationship?


The ISA relationship connects one class to a more general class. It's used to build class
hierarchies or taxonomies.
Definition:
"Class A ISA Class B" means that all instances of A are also instances of B.
Notation:
ISA(Dog, Animal)
This means “Every dog is an animal.”
Examples:
 ISA(City, Location) → All cities are locations.
 ISA(Car, Vehicle) → Every car is a vehicle.
 ISA(Planet, CelestialObject) → Every planet is a celestial object.

🧱 3. Hierarchical Structure
Instance and ISA relationships together help create semantic hierarchies and inheritance
structures in AI systems.
Example: Animal Hierarchy
ISA(Dog, Mammal)
ISA(Mammal, Animal)
InstanceOf(Rover, Dog)
Here:
 Rover is a specific dog (instance).
 Dog is a type of Mammal (ISA).
 Mammal is a type of Animal (ISA).
This allows systems to infer facts like:
 Rover is a Mammal
 Rover is an Animal
(Using transitive inheritance)

🧠 4. Why Are These Relationships Important?


Feature Explanation

Generalization Helps AI systems generalize facts from specific to general

Inheritance Lower classes or instances inherit properties from higher classes

Reasoning Enables inference, classification, and rule-based reasoning

Modularity New classes and instances can be added without disrupting the hierarchy

5. Implementation in AI Systems
These relationships are used in:
 Semantic Networks → Nodes (objects/classes) connected with ISA and InstanceOf
 Ontologies (e.g., OWL) → Define class hierarchies and instance data for semantic
web
 Frame-based Systems → Use slots like class, superclass, and instance
 Logic Programming (e.g., Prolog) → Expressed as rules and facts
Prolog Example:
isa(dog, mammal).
isa(mammal, animal).
instance(rover, dog).
This supports queries like:
?- isa(rover, animal). % Inferred: Yes.

🌐 6. Real-Life Examples
a) Medical Diagnosis System
 InstanceOf(PatientX, Human)
 ISA(Human, Mammal)
 ISA(DiabeticPatient, Patient)
The system can reason that PatientX is a Mammal, and that all diabetic patients have health
risks.
b) E-commerce Product Catalog
 InstanceOf(iPhone15, Smartphone)
 ISA(Smartphone, Electronics)
 ISA(Electronics, Product)
Now, the system can recommend accessories for iPhone15, Smartphones, or Products.

✅ Advantages
 Supports structured knowledge
 Enables reasoning and inference
 Encourages reusability and scalability
 Makes hierarchies and relationships explicit

⚠️Limitations
 Over-simplification: Real-world concepts may not always fit clean hierarchies
 Ambiguity: Some entities can belong to multiple classes
 Contextual Variations: Same instance may have different meanings in different
domains

8] What are Computable Functions?


Definition
A computable function is a function for which there exists a finite algorithm or procedure
(e.g., a Turing machine or program) that can produce the output for any valid input in a finite
amount of time.
It describes what can be computed mechanically by an algorithm.
Formal View
 Let f:N→Nf: \mathbb{N} \rightarrow \mathbb{N}f:N→N be a function from natural
numbers to natural numbers.
 fff is computable if there is a Turing machine TTT that halts for every input xxx and
returns f(x)f(x)f(x).

⚙️Examples of Computable Functions

These are all algorithmically defined and solvable by a computer program.

❗ Non-Computable Functions
Some problems cannot be computed by any algorithm.
Example:
 Halting Problem: No general algorithm can determine whether a given program halts
on all inputs.

🔍 What are Predicates?


Definition
A predicate is a logical expression that evaluates to true or false based on the input values.
Think of predicates as boolean-valued functions.
Notation
 Unary predicate: P(x)P(x)P(x)
 Binary predicate: Q(x,y)Q(x, y)Q(x,y)
Examples:
 P(x)="x is even"P(x) = \text{"x is even"}P(x)="x is even"
 Q(x,y)="x is greater than y"Q(x, y) = \text{"x is greater than
y"}Q(x,y)="x is greater than y"

🔄 Relationship Between Predicates and Computable Functions


 A predicate is computable if there exists an algorithm that can determine whether
the predicate is true for given inputs.
 Computable predicates can be used in logical inference, AI rules, decision-making
systems, etc.

🧠 Application in AI
Area Use of Computable Functions/Predicates

Knowledge Representation Encode rules and conditions using predicates

Search Algorithms Use conditions to guide traversal (e.g., goal state reached)

Expert Systems Rules use predicates to infer new facts

Prolog Programming Purely built on logical predicates and relations

✅ Advantages
 Formal logic can be implemented in AI systems
 Verifiability: Computable functions and predicates can be tested
 Flexibility: Used in various forms (e.g., rules, decision trees, Prolog)

⚠️Limitations
 Not all problems are computable
 Logical systems can become complex and slow if not optimized
 Expressiveness is limited in basic predicate logic (no fuzzy or probabilistic
reasoning)

📌 Key Concepts to Remember


Concept Meaning

Computable Function A function that a computer can compute in finite steps

Predicate A logical function returning true/false

Decidable Problem A problem for which a computable predicate exists

Turing Machine Abstract model used to define computability

Recursive Function Another term for total computable functions

9] Resolution (in Propositional and Predicate Logic)


✳️Definition:
Resolution is a rule of inference used primarily in automated theorem proving and logic
programming, particularly in propositional and first-order logic. It works by refuting the
negation of a statement and deducing a contradiction to prove the original statement.
How Resolution Works:
 Based on proof by contradiction.
 Converts all statements into Conjunctive Normal Form (CNF) (i.e., a conjunction of
clauses).
 Applies resolution rule to eliminate contradictory literals from two clauses and
derive new information.
 If the empty clause (⊥) is derived, the original statement is proved true.
🧱 Steps:
1. Convert premises and the negation of the conclusion into CNF.
2. Use unification to match literals across clauses.
3. Apply the resolution rule to derive new clauses.
4. Repeat until either the empty clause is found (success) or no new clause can be
derived (failure).
📌 Example:
Given:
1. P ∨ Q
2. ¬Q ∨ R

To prove: P ∨ R
Negate the goal: ¬(P ∨ R) → ¬P ∧ ¬R
Add to premises:
3. ¬P
4. ¬R

Apply resolution:
- From (1) and (3): Q
- From (2) and Q: R
- From R and (4): contradiction → proof complete
✅ Applications:
 Prolog language
 Theorem provers (e.g., resolution-based SAT solvers)
 Verifying logical entailments

✅ 2. Natural Deduction
✳️Definition:
Natural Deduction is a proof system that mimics how humans naturally reason using rules of
inference to derive conclusions from premises in a structured and logical way.
🔁 Key Idea:

connectives (∧, ∨, ¬, →).


 Build a proof tree or derivation using introduction and elimination rules for logical

Introduction rules help introduce a logical operator (e.g., ∧-introduction: from A and
B, infer A ∧ B).

 Elimination rules help remove or apply connectives (e.g., ∧-elimination: from A ∧


B, infer A or B).
🧱 Common Inference Rules:
📌 Example Proof:
To prove:
From: A → B, A
Derive: B
Steps:
1. A → B (Premise)
2. A (Premise)
3. B (From 1 and 2 by Modus Ponens)
This is a simple and valid natural deduction.

🆚 Comparison: Resolution vs Natural Deduction


Feature Resolution Natural Deduction

Refutation-based (proof by
Method Direct reasoning through inference rules
contradiction)

Structure Clause-based logic Proof tree or line-by-line derivation

Simplicity Simpler for automation More intuitive for human reasoning

Usage SAT solvers, logic programming Formal proofs, mathematical logic


📍 Real-World Use Cases
 Resolution:
o Used in AI search problems, SAT solvers, Prolog
o Example: Verifying correctness of circuits, automated planning
 Natural Deduction:
o Used in logic courses, formal verification
o Example: Proving properties in math (e.g., if n is even → n² is even)

You might also like