0% found this document useful (0 votes)
38 views28 pages

AM601PC Knowledge Representation and Reasoning UNIT-2

JNTUH R-22 CSM

Uploaded by

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

AM601PC Knowledge Representation and Reasoning UNIT-2

JNTUH R-22 CSM

Uploaded by

mohdmuzzammil633
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

UNIT – I

The Key Concepts: Knowledge, Representation, Reasoning, need of knowledge representation and reasoning,
Knowledge based systems, Role of logic Logic: Historical background, Representing knowledge in logic,
Varieties of logic, Name, Type, Measures, Unity Amidst diversity.

Knowledge Representation and Reasoning

Knowledge Representation and Reasoning (KRR) enables computers to understand, organize, and apply
real-world information effectively using rules for accurate decision-making.

Knowledge, Representation, and Reasoning Knowledge:

Refers to the information and facts about the world that a system needs to perform tasks effectively. This
includes data, rules, concepts, relationships, and general understanding of the domain or problem.

Example: Knowing that "water boils at 100°C" or "a car has four wheels."

Representation:

Involves structuring and organizing knowledge in a way that computers can store, process, and use.
Common methods include logical statements, graphs, semantic networks, ontologies, or frames.

Example: Representing a family tree with nodes (individuals) and edges (relationships).

Reasoning:

The process of drawing conclusions, making inferences, or solving problems using the represented
knowledge. This could involve deduction (logical reasoning), induction (generalization), or abduction
(hypothesis generation).

Example: Given "All humans are mortal" and “Ram is human," reasoning concludes, “Ram is mortal."

Components of KRR:
●​ Ontologies (Organized Knowledge) Provide a structured framework of knowledge, defining a set of
concepts and categories that represent a subject.

●​ Example: "A cat is an animal, and animals are living things."

●​ Rules: Govern the logical framework within which AI systems operate to derive reasoned conclusions.

●​ Example: "If it rains, take an umbrella."

●​ Semantics: Offer a deeper understanding of data through meaningful interpretation and association.

Example: Knowing that "Apple" can mean a fruit or a company based on the sentence: "I ate an apple"
vs. "Apple released a new iPhone."

Knowledge in Simple Terms:

What is Knowledge?

Knowledge is when someone (like John) understands and is sure about a fact or idea (like "Mary will
come to the party").

Propositions:

A proposition is a statement that can be either true or false, like "The sky is blue" or "Water boils at
100°C."

Knowing vs. Believing:

●​ Knowing means being sure that something is true.

●​ Believing means thinking something is true, but you might not be completely certain or correct.

Propositional Attitudes:

●​ Verbs like "knows," "hopes," or "doubts" show how someone feels about or relates to an idea or fact.
For example:

o​ "John knows that Mary will come to the party" means John is sure.

o​ "John hopes that Mary will come to the party" means John wants it to happen but isn't sure.

What is Representation?

●​ Representation is the use of one thing (like a symbol, image, or word) to stand for something else,
making it easier to understand, use, or communicate.

Examples:

●​ A drawing of a burger represents a fast-food restaurant.

●​ The number "7" or Roman numeral "VII" represents the concept of the number seven.

Symbols and Propositions:

●​ Symbols (like words, numbers, or drawings) are used to stand for ideas, objects, or facts.

●​ Propositions are the ideas or facts that symbols represent.

Example: The sentence "The sky is blue" is a proposition because it represents the idea or fact that the
sky has a blue color.

Knowledge Representation:

This is a specialized field where symbols are used to represent:

●​ Facts (e.g., "The sky is blue.")

●​ Beliefs (e.g., "I believe it's going to rain.")

Since not all beliefs or knowledge can be directly represented, reasoning is applied. Reasoning helps
connect what is explicitly represented with additional information or conclusions

Definition of Reasoning:

Reasoning is manipulating symbols representing beliefs or facts to form new representations of


knowledge.

●​ Symbols vs. Propositions:

Symbols (like words or numbers) are easier to manipulate than the abstract ideas they represent. This
allows us to move, combine, and rearrange symbols to create new representations.

Analogy with Arithmetic:

Reasoning is similar to binary arithmetic, where we perform operations on symbols.

For example:

In binary addition:

Symbols "1011" + 10 result in "1101".

In reasoning: We can combine sentences like "John loves Mary" and "Mary is coming to the party"
to infer "Someone John loves is coming to the party."

Logical Inference:

Reasoning involves logical inference, where conclusions follow logically from the initial sentences or
facts. facts. a->b->c then a->c

Gottfried Leibniz's Idea:

The philosopher Gottfried Leibniz (17th century) proposed that reasoning is a form of calculation —
but instead of numbers, we manipulate symbols representing propositions.

Here’s an example illustrating Leibniz’s idea that reasoning is like calculation using symbols:

Propositions (Symbols):

Let AAA: All humans are mortal.

Let BBB: Socrates is a human.


Logical Reasoning as Calculation:

Using the rule: If AAA and BBB, then CCC (where CCC: Socrates is mortal), we combine AAA and BBB to
conclude CCC.

2.​ Why Knowledge Representation and Reasoning in AI?

●​ Understanding Behavior

Knowledge helps describe the behavior of complex systems (human or machine) using beliefs, desires,
goals, and intentions.

●​ Intentional Stance

Describing a system’s behavior in terms of beliefs and intentions is often more useful than technical
details (like algorithms). Helps us reason about the system’s actions intuitively rather than focusing on
low-level operations.

Limitations of the Intentional Approach

●​ For simple systems an intentional description is misleading and unnecessary.

●​ If you say, "The vending machine wants to make customers happy," it’s misleading because the
vending machine has no desires or intentions.

●​ In reality, it simply follows a set of programmed rules: "If a customer inserts money and selects a
product, dispense the product. “

Knowledge Representation Hypothesis Example: Smart Door Lock System

●​ Symbolic Representation (for humans):

The system stores a rule like:

"If the correct passcode is entered, unlock the door." This rule can be easily understood by a human
as a meaningful instruction.

●​ Influence on Behavior (system's decision-making):


The system automatically unlocks the door when it detects the correct passcode, following the stored
rule.

Knowledge-Based Systems

In AI, we build knowledge-based systems containing a Knowledge Base (KB) of symbolic


representations. These representations represent facts, beliefs, and goals, shaping the system’s actions
and reasoning.

In Simple Terms:

●​ 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: The system checks the current temperature. Based on its knowledge,
it decides to turn on the heater automatically to meet the goal of a warm living room.

Knowledge-Based Systems

A knowledge-based system uses a Knowledge Base (KB) containing symbolic structures to represent
beliefs and facts. Unlike procedural systems, it separates knowledge representation from execution. In
the second PROLOG example, the system uses rules and facts (e.g., color(snow, white)) to reason and
determine outputs.

Key distinction: A knowledge-based system reasoning relies on stored knowledge, not just procedures.

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.

THE ROLE OF LOGIC

●​ Why Logic Matters for KRR: Logic is important for knowledge representation and reasoning
(KRR) because it helps us understand how knowledge is related (entailment) and how to reason about it
using rules and truth conditions.

●​ First-Order Logic (FOL): The main language we’ll use to represent knowledge is First-Order
Logic (FOL), which was created by Gottlob Frege. FOL is widely used in AI for structuring knowledge.
●​ FOL is Just a Starting Point: FOL is just the beginning. We’ll explore other types of logic and
languages for representing knowledge, which may have different forms and meanings.

●​ Beyond Logic: While logic is useful for reasoning, there are other ways of reasoning that go
beyond what logic alone can handle.

●​ Adequacy at Each Level: At the knowledge level, we care about how well the language
represents knowledge and its reasoning rules. At the symbol level, we focus on how efficiently the system
can process and compute the knowledge.

●​ Using Logic for Analysis: First-Order Logic is ideal for analyzing knowledge systems at the
knowledge level, and in the next chapter, we’ll look at it in more detail, without worrying about
computational issues for now.

●​ The Knowledge Level (Newell’s Idea): Allen Newell suggests we can understand knowledge
systems at two levels:

●​ Knowledge level: Focuses on how knowledge is represented and what its rules of reasoning are.

●​ Symbol level: Deals with the technical side, like the computer architecture and algorithms used to
process the knowledge.

3.​ Historical Background

●​ Knowledge and representation have been central to philosophical debates for over two millennia.

●​ In the 5th century B.C., Socrates challenged common beliefs about knowledge by claiming to
know little and questioning others who asserted knowledge about topics like Truth, Beauty, and Justice.

●​ Socrates’ dialectical method (questioning) was carried on by his student, Plato, who helped
establish epistemology, the study of knowledge and its justification.

●​ Epistemology was not just a theoretical pursuit; in Socrates' case, it had real-life
consequences—he was condemned to death for his questioning of accepted beliefs, which led to
accusations of impiety and corruption.
Terminology.

●​ Aristotle's Contribution: Aristotle shifted philosophy's focus from the nature of knowledge to the
practical problem of representing it, laying the groundwork for many fields, including logic, ethics, and
biology.

●​ Terminology Invention: Aristotle invented and defined terms to represent knowledge across
various fields, creating the foundational vocabulary for modern technical discourse.

●​ Greek and Latin Influence: Many terms Aristotle coined in Greek (e.g., category, metaphor,
hypothesis) were later translated into Latin, which further influenced English terminology.

●​ Everyday Usage: Words like category and quality, originally coined by Aristotle and later
Latinized, have become common in everyday language, far beyond their philosophical origins.

Syllogism

●​ Aristotle’s Syllogism: Aristotle invented the syllogism, a three-part logical pattern to deduce
conclusions from premises. Example: "All broad-leafed plants are deciduous. All vines are broad-leafed
plants. Therefore, all vines are deciduous.“

●​ Major and Minor Premises: A syllogism combines two premises—major (general statement) and
minor (specific statement)—to reach a conclusion.

●​ Formal Logic: Aristotle formalized syllogisms with rules of inference, using variables to represent
general terms in logical deductions.

●​ Systematic Analysis: Aristotle's method involved systematic analysis, introducing formal rules to
convert one logical pattern into another while maintaining truth.

●​ Legacy in Modern Logic: Modern symbolic logic and programming languages still use
Aristotle’s approach of stylized natural language and variables for reasoning.

Here’s a simple example of a syllogism:

1.​ Major Premise: All mammals have hearts.

2.​ Minor Premise: A dog is a mammal.


3.​ Conclusion: Therefore, a dog has a heart.

SCHOLASTIC LOGIC

●​ Propositions and Vowels: Scholastics used four types of propositions, labeled with vowels: A (All
A is B), I (Some A is B), E (No A is B), O (Some A is not B).

●​ Basic Syllogism Patterns: They created patterns for valid syllogisms, like Barbara (AAA),
Celarent (EAE), Darii (AII), and Ferio (EIO), each with specific logical structures.

●​ Logical Hierarchies: Patterns like Barbara and Darii show how properties are inherited, while
Celarent and Ferio identify category exclusiveness or inconsistencies.

●​ Scholastic Innovations: The Scholastics, especially Peter of Spain, expanded on Aristotle’s logic,
influencing later developments in language and modal logic.

●​ Semantic Networks: Semantic networks are graphic representations of knowledge, developed in


AI to visually organize information. The first semantic network appeared in the third century by
Porphyry, showing Aristotle's categories as a hierarchy of genus (supertype) and species (subtype).

●​ Tree of Porphyry: Porphyry’s network, known as the Tree of Porphyry, categorized substances
and species, with "substance" as the highest genus and "human" as a species. It defined categories using
genus (general class) and differentiae (specific features).

●​ Inheritance and AI: The concept of inheritance, used in AI and object- oriented systems, builds
on this method. For example, Living Thing is a material substance, and Human is a rational, sensitive
living thing. This inheritance system is fundamental to how AI systems define categories.

●​ Ramon Lull’s Automated Reasoning: In the 13th century, Ramon Lull invented mechanical
devices for automated reasoning. His system, Ars Magna, merged logic and theology, expanding on
Porphyry’s tree by adding Ens (Being) as the supertype of Substance.
MATHEMATICAL LOGIC

●​ Leibniz’s Innovations: Leibniz, a 17th-century philosopher and mathematician, used mathematics


to formalize logic, creating a system of binary arithmetic and applying it to syllogistic reasoning.

●​ Universal Characteristic: Leibniz assigned prime numbers to basic concepts (e.g., Substance =
2, Material = 3) and used multiplication to represent composite concepts (e.g., Human = 2 × 3 × 7 × 13 ×
19 = 10,374).

●​ Reasoning with Numbers: Leibniz tested relationships between categories by dividing their
numbers. For example, since Human's number is divisible by Body's number, all humans are bodies, but
not minerals (as Human’s number is not divisible by Mineral’s).

●​ Limitations: While Leibniz’s system worked well for universal affirmative syllogisms (Barbara
type), it couldn't represent logical operations like negation, disjunction, or implication, limiting its
scope.

Example:

●​ "All humans are bodies": Since 10,374 (Human) is divisible by 6 (Body), all
humans are bodies.

●​ "No humans are minerals": 10,374 (Human) is not divisible by 66 (Mineral), so no


humans are minerals.

T-Box and A-Box

T-Box (Terminological Box):

Represents the schema or structure of knowledge. Contains concepts (classes) and their
relationships (ontology). Defines rules and constraints, such as subclass relationships,
domain/range of properties, and axioms.

Example in ontology:

▪​ Person ⊆ Mammal (A person is a type of mammal).

Box (Assertional Box):

Represents the facts or data about specific instances. Contains assertions about
individuals based on the T-Box. Links individuals to concepts and properties.

Example:

o​ John ∈ Person (John is an instance of the class Person).

o​ hasAge(John, 30) (John has the age 30).

Boolean Algebra

Definition:

A branch of algebra that deals with binary variables and logical operations. Developed by
George Boole in the mid-19th century.

●​ Basic Operations:

o​ AND (⋀ or ∧): Intersection/Conjunction.

o​ OR (⋁ or ∨): Union/Disjunction.

o​ NOT (¬): Negation.

o​ XOR: Exclusive OR.

o​ NOR, NAND, etc.: Combinations of NOT with OR/AND

Frege's Begriffsschrift

​ Begriffsschrift (Conceptual Notation):Introduced by Gottlob Frege in 1879 as


a formal language for pure thought. Aimed to represent logical reasoning with rigor and
clarity, like mathematics. Considered the precursor to predicate logic and modern formal
systems.

Key Features:

o​ Quantifiers: Introduced the notions of "for all" (∀∀∀) and "there exists"
(∃∃∃).

o​ Logical Connectives: Defined negation, implication, etc.

o​ Function-Argument Analysis: Distinguished between functions and arguments,


forming the basis for modern logic.

Algebraic Notation

Definition: A concise method of expressing mathematical expressions, equations, or logical


structures using symbols and variables.

Types:

o​ Classical Algebraic Notation: Using x,y,zx, y, zx,y,z, and operators like +,−,∗,/+, -,
*, /+,−,∗,/.

o​ Logic Algebraic Notation: Boolean operations, predicate logic (P(x)→Q(x)P(x) →


Q(x)P(x)→Q(x)).

o​ Abstract Algebra Notation: Groups, rings, fields with operations like (a∗b)−1(a *
b)^{-1}(a∗b)−1.

4.​ Representing Knowledge in Logic

1.​ Logic as a Universal Language

●​ Leibniz's Goal: Create a universal language using mathematical principles to


represent all knowledge and resolve disputes.

●​ Modern Logic: Achieves this partially, as it can represent any precise, factual
information in a computable form.

●​ Limitation: If knowledge cannot be expressed in logic, it cannot be represented on a


computer either.

Example:

Fact: Every cat is a mammal.

Logic: For every xx, if xx is a cat, then xx is a mammal:

(∀x)(cat(x)⇒mammal(x)).

2.​ Propositional Logic (Simplest Form)

Represents knowledge using single symbols or letters.

●​ Advantage: Simple and abstracts away details.

●​ Disadvantage: Lacks the ability to express internal relationships.

Example:

o​ Sentence: Every trailer truck has 18 wheels.


o​ Logic: PP (No further details about "trailer truck" or "wheels").

o​ Use Case: Good for analyzing patterns, not details.

3.​ Subject and Predicate

●​ Breaks sentences into two parts: Subject (what you're talking about) and Predicate
(what you're saying about it).

●​ Aristotle’s Syllogism: Combines subjects and predicates logically.

Example:

1.​ All trailer trucks are 18-wheelers.

2.​ Some Peterbilt is a trailer truck.

3.​ Therefore, some Peterbilt is an 18-wheeler.

4.​ Predicate Logic (More Detailed Form)

Represents relationships and internal structure using variables and quantifiers (∀\forall: for
all, ∃\exists: there exists).

Example:

o​ Sentence: Every trailer truck has 18 wheels.

o​ Logic:

(∀x)(trailerTruck(x)⇒numberOfWheels(x,18)).

o​ Meaning: For every xx, if xx is a trailer truck, then xx has 18 wheels.

5.​ Ontologies and Predicates

Ontology: A detailed classification of objects and their relationships.

●​ Domain-Dependent Predicates: Specific to the topic (e.g., truck(x)truck(x),


wheel(x)wheel(x)).
●​ Domain-Independent Predicates: General relationships (e.g., part(x,y)part(x, y): xx
has yy as a part).

Example:

o​ Complex Sentence: A trailer truck has a trailer and 18 wheels.

o​ Logic:

(∀x)((truck(x)∧(∃y)(trailer(y)∧part(x,y)))⇒(∃s)(set(s)∧count(s,18)∧(∀w)(member(
w

,s)⇒(wheel(w)∧part(x,w)))).

Meaning: Every truck xxx with a trailer yyy has a set sss of 18 wheels.

6.​ Logic and Other Fields (Music Example)

Logic isn't the only way to represent knowledge; specialized notations (like music) are better
for certain tasks.

Example:

Representing a melody (Frère Jacques) in logic:

(∃x1)(∃x2)(tone(x1,G)∧dur(x1,1)∧next(x1,x2)∧tone(x2,A)).

Musicians prefer traditional notation, but logic is useful for computer analysis.

7.​ Existential-Conjunctive (EC) Logic

●​ Simplifies representation with ∃\exists (existence) and ∧\land (AND).

●​ Used in databases and for analyzing specialized systems.

Limitation: Cannot express generalizations, negations, or alternatives.

Example: Fact: Certain musical intervals (tritones) are dissonant.

o​ Logic: (∀x)(∀y)((tone(x,B)∧next(x,y))⇒¬tone(y,F)).
o​ Meaning: If a note is BB and the next is yy, yy cannot be FF.

Key Takeaways

1.​ Propositional Logic: Simplifies complex sentences but loses details.

2.​ Predicate Logic: Adds details with subjects, predicates, and quantifiers.

3.​ Ontology: Organizes concepts and relationships specific to a domain.

4.​ Special Notations: Logic complements, not replaces, domain-specific tools like
music notation.

5.​ Expressiveness: Logic can represent everything computable but has limitations
when it comes to vague or unquantifiable knowledge.

6.​ Varieties of logic

Classical First-Order Logic (FOL):

Classical FOL, created by Frege and Peirce, is the most widely used logic system. Though
they started with different approaches and notations, their systems converged to express the
same ideas. This highlights that notational differences do not affect logical equivalence.

Variations in Logic:

Logic systems differ in six key areas:

1.​ Syntax: Syntax refers to the way logic is written.

Example: Different symbols like "∃" or "exists" may be used, but the meaning remains the
same.

2.​ Subsets: Some logics simplify FOL by limiting features for efficiency.

Example: Prolog uses a restricted subset of FOL to enhance speed.

3.​ Proof Theory: Variations allow or restrict how proofs are constructed.

Example: Linear logic ensures every piece of information is used exactly once.
4.​ 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).

5.​ Ontology: Adds predefined concepts to logic for specific domains.

Example: Temporal logics include built-in rules for time.

6.​ Metalanguage: Logic used to describe or modify other languages.

Example: Context-free grammar is a subset of FOL used to define programming languages.

Typed Logic:

Typed logic simplifies FOL by labeling variables with types.

Classical FOL: Example: (∀x)(trailerTruck(x)⇒eighteenWheeler(x))

Typed logic becomes even more useful with multiple quantifiers, making expressions clearer
and less error-prone.

Example with 18 wheels:

(∀x:TrailerTruck)(∃s:Set)(s@18∧(∀w∈s)(wheel(w)∧part(x,w)))

This means: "For every trailer truck, there exists a set of 18 wheels, where each wheel is part
of the truck."

The fundamentals of lambda calculus, conceptual graphs, modal logic, and higher-order
logic, illustrating their roles in formal logic and computational systems. Here's a summary of
the key points:

Lambda Calculus

Purpose: A formal system introduced by Alonzo Church to define and evaluate functions
and relations.

Key Features: Lambda calculus uses λ\lambdaλ to define functions and operations.
o​ Scenario: You want to define a function that adds 2 to any number.

o​ Lambda Expression:

λx.(x+2)

This means: "A function that takes an input xxx and returns x+2x

o​ Usage: To add 2 to 3, you apply the function to 3:

(λx.(x+2))3=3+2=5

o​ Church-Rosser Theorem: Ensures consistent results regardless of the order of


expansion or contraction of lambda expressions.

Conceptual Graphs (CGs)

Purpose: A graphical representation of logical statements that eliminates variables for


simplicity.

Components:

o​ Concept boxes (e.g., [TrailerTruck: ∀]) represent types or entities.

o​ Relation circles (e.g., (Part)) represent relationships between entities.

Advantages:

o​ More intuitive than predicate logic for representing natural language.

o​ Allows mappings to and from natural languages and databases.

o​ Supports typed logic, which simplifies inferences via inheritance of properties.

Example: "[TrailerTruck: ∀] → (Part) → [Wheel: {*}@18]" represents "Every trailer


Higher-Order Logic (HOL)

●​ Purpose: Extends first-order logic (FOL) by allowing quantifiers to range over


predicates and relations.

●​ Applications:

o​ Representation of meta-properties like the induction axiom in arithmetic.

Example of second-order logic:

∀P:Predicate(P(0)∧(∀n:Integer)(P(n)⇒P(n+1))⇒∀n:IntegerP(n)).

Comparison of Representations

1.​ Typed Predicate Logic: Uses variables explicitly.

Example: ∀x:TrailerTruck(∃s:Set∧s@18∧(∀w∈s)(wheel(w)∧part(x,w))).

2.​ Conceptual Graphs:

o​ Eliminates variables for readability.


o​ Graphically represents logical structure.

3.​ Knowledge Interchange Format (KIF):

o​ Designed for machine processing, with a restricted syntax. Also Lambda calculus
and conceptual graphs bridge formal logic and natural language.

●​ Modal logic handles nuances like necessity, possibility, and temporal reasoning.

●​ Higher-order logic expands the scope of logical representation by quantifying over


predicates and relations.

●​ Each formalism is tailored for specific tasks: CGs for human readability, KIF for
machine interchange, and lambda calculus for precise functional representation.

Names, Types, and Measures

When logic is applied to mathematics, the constants represent numerals, which act as
names of numbers. But in real-world applications, a broader range of data is needed, such as:

●​ Names of people and things (e.g., Tom, Elephant)

●​ Types of things (e.g., cat, fish)

●​ Measures of things (e.g., height, weight)

Errors often occur in knowledge representation because names, types, and measures are
confused with the things themselves.

Key Concepts

1.​ Names

●​ In logic and knowledge representation, a name refers to a specific individual.

●​ For example, "Clyde" is a specific elephant, a proper name that refers to an entity.

●​ The sentence "Clyde is an elephant" connects a proper name (Clyde) with a type
(Elephant).
Core Idea: Names directly refer to an individual, while types refer to a group or category of
entities.

2.​ Types

●​ A type is a more general category that includes multiple entities.

●​ For example, "Elephant" represents the species, not an individual.

●​ In typed logic, types are represented with variables, such as: Formula:
('lix:Cat)('liy:Fish) like(x,y)

●​ This means: For every cat x and every fish y, x likes y.

Types help in representing categories of entities rather than specific individuals.

3.​ Measures

●​ In real-world knowledge representation, measures often represent quantitative


properties, such as salary, height, weight.

For example:

o​ An actor might choose a salary of $20 million rather than a proper name like Fred.
In computing systems, failing to distinguish measures from individual entities can cause
bugs.

For example:

Tom and Sue have the same salary.

Should imply that their salaries are numerically identical, but not that they share a paycheck.

In databases and programming, such distinctions avoid incorrect assumptions about how
data is stored and retrieved.
Examples of Confusion Between Names, Types, and Measures

1.​ Syllogism Fallacy:

Syllogism Example:

o​ Premise 1: Clyde is an elephant (individual)

o​ Premise 2: "Elephant" is a species (type)

o​ Incorrect Inference: Therefore, Clyde is a species.

This mistake arises because "Clyde" (a name) and "Elephant" (a type) are mixed up.

2.​ Database Errors:

●​ In database systems, aliases (alternative names for individuals) need to be carefully


handled to avoid errors.

Example:

●​ Sam believes that Dr. Jekyll is a gentleman

●​ If Dr. Jekyll = Mr. Hyde (two identities), substituting their names could create
paradoxes

(incorrect logical substitutions).

●​ Surrogates are introduced to prevent such issues. A surrogate ensures every entity
has a

unique identifier, avoiding mistakes caused by shared names.

Formula to Avoid Paradoxes:

believe(Sam, (3s)(hasName(s, "Dr. Jekyll") /\ gentleman(s))). believe(Sam, (3s)(hasName(s,


"Mr. Hyde") /\ gentleman(s))).

This ensures that substituting names doesn't lead to logical errors.


Conclusion

●​ Names refer to specific individuals.

●​ Types refer to categories or groups.

●​ Measures capture quantitative properties.

●​ Confusing these concepts in databases, programming, and logical reasoning leads to

significant errors and system bugs.

●​ Careful differentiation between names, types, and measures ensures proper


knowledge representation and avoids issues in logic, databases, and computer systems.

"Unity amidst Diversity" in Logic

The passage explains how different types of logic have been developed over time. Even with
various notations and approaches, any good logic system must meet four core features. Let's
break down these features with simple terms and examples.

Key Features of a Good Logic System

1.​ Vocabulary ◻

A logic system needs a collection of symbols to represent things. These symbols can be:

●​ Characters/Words (like A, B, X)

●​ Icons/Diagrams

●​ Sounds

●​ These symbols are divided into four groups:


Symbol Type Purpose

Domain-independent symbols General symbols like 'AND (∧)', 'OR


(∨)'.

Domain-dependent constants Symbols representing specific people or


things. (Example:

Tom)

Variables Represent unknowns (Example: x, y)

Punctuation Used to group symbols (Parentheses (),


commas, etc.)

Simple Example:

●​ In the sentence "Tom likes apples",

​ Tom = Domain-dependent constant

​ 'likes' = Relation Symbol

Parentheses () help group these symbols clearly.

2.​ Syntax (Grammar Rules) - Syntax refers to the rules for combining symbols to
form valid sentences. It's like grammar in language, ensuring everything follows a
structured format.

Simple Syntax Rules: Symbols must follow a specific order to form correct sentences.

Example: Logical Sentence

●​ "p AND q" (in logical notation p ∧ q)


o​ Must follow proper order to form valid combinations.

If you follow the syntax, you have well-formed, understandable logical sentences.

3.​ Semantics (Meaning and Truth)

A logic system needs a way to associate symbols with real-world meanings and determine
whether statements are true or false

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:

1.​ Sound Inference Ensures that conclusions preserve true statements according to
semantics.

2.​ 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):

o​ 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.

Conclusion

●​ A knowledge representation system must have symbols, grammar rules,


truth-based semantics, and inference methods.

●​ These four components unify different logics into a coherent system, making it
versatile enough for AI, databases, VLSI chip design, and more.

Understanding these foundational features helps computer scientists, AI experts, and


logicians select the right logic system for any application, balancing expressive power,
efficiency, and readability.

You might also like