Introduction to First order logic .pptx

sanasayyad2112 53 views 16 slides Sep 18, 2024
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

This ppt is about FIRST ORDER LOGIC , which is one of the important topic in context to AI


Slide Content

First Order Logic PRESENTED BY Sana Sayyad -4317 Rahul Rana -4322 Vansh Mehta -4326 Vivek Rai-4327 Rohit Rana -4328

Introduction to First Order Logic (FOL) FOL is another way of knowledge representation in AI , It is an extension to propositional logic. Also known as Predicate Logic or First Order Predicate Logic. First Order Logic ,Like Natural Language has well defined Syntax Semantic

Key Aspect How objects interact or relate Quantifiers are use to express the quantities without giving an exact number The entities in the domain of discourse. John Object Relation Quantifier Eg . John Lives in Paris LivesIn(John,Paris) E.g. All , Some, many ,none etc.

Syntax of First Order Logic Constant 3 variable x Function It could be anything like sqrt. Connectives ∧, ∨, ¬, ⇒, ⇔ Equality == Predicates and Quantifier The syntax of first-order logic specifies the rules for constructing valid expressions, including terms and formulas.

Predicates First-order logic statements can be divided into two parts: SUBJECT Subject is the main part of the statement. PREDICATE A predicate can be defined as a relation.

TYPES It must be true for all elements in the specific domain Existential Quantifier ( ∃ ) There must be at least one value such that statement becomes true Quantifiers Universal Quantifier ( ∀ )

Determining the Domain Domain of Discourse Specifies the range of the quantifiers Defines the possible objects Example Domain could be all natural numbers Or all people living in a city

Semantic of FOL An Semantic of a FOL assigns a notation to all symbols It also determines a domain, that specifies the range of the quantifiers. Each term is assigned an object, each predicate is assigned a property of objects, and each sentence is assigned a truth value. In this way, the FOL provides meaning to the terms, the predicates, and formulas of the language .

Truth Value of FOL Truth values are used in First-Order Logic (FOL) to evaluate and analyze the correctness of statements or sentences. Example: For the statement "John is tall," knowing the truth value helps us understand if John actually has the property of being tall. Negation (¬): Flips the truth value of a sentence. Conjunction (∧): True if both sentences are true. Conditional (→): True unless the first part is true and the second part is false. Biconditional (↔): True if both parts are either true or false together.

Examples

Knowledge Engineering in FOL Introduction to Knowledge Engineering in FOL: Knowledge Engineering involves the systematic process of building a knowledge base using First Order Logic (FOL) . FOL provides a structured and formal method to represent knowledge and reasoning in a way that mimics human logical thought processes. Purpose: The goal is to create a system that can reason, make decisions, and solve problems based on the knowledge encoded using FOL.

Knowledge Engineering Definition: Knowledge Engineering is the process of constructing a knowledge base using First Order Logic (FOL) . Objective: The main goal is to represent knowledge in a structured form that a system can use to perform reasoning, make decisions, and solve complex problems. Key Aspects: Involves defining the domain of discourse , specifying the rules , and encoding the facts using FOL. It’s critical to ensure that the knowledge base is both accurate and comprehensive to support effective reasoning.

Steps Involved 1) Identify the Task: Objective: Determine the problem that needs to be represented and solved. Action: Clearly define the scope and objectives of the task to ensure the knowledge base will address the right issues. 2) Assemble the Relevant Knowledge: Objective: Gather all necessary facts, rules, and information relevant to the task. Action: Collect and organize information from various sources to ensure a comprehensive knowledge base. 3) Decide on Vocabulary: Objective: Choose the predicates, functions, and constants to represent the knowledge. Action: Select the specific terms and symbols that will be used in the knowledge base to represent objects, relationships, and functions. This ensures consistency and clarity in how knowledge is encoded. 4) Encode General Knowledge: Objective: Define general rules and facts that apply broadly across the domain of discourse. Action: Formulate and encode statements that are universally true within the domain, using the chosen vocabulary. These rules form the foundation of the knowledge base.

Steps Involved 5) Encode Specific Problem Instances Objective: Add specific facts related to the current problem. Action: Input detailed instances or scenarios that need to be addressed by the knowledge base. These are usually specific cases or examples that the system will encounter. 6) Query the Knowledge Base: Objective: Use FOL to ask questions and retrieve information. Action: Develop queries to test the knowledge base's accuracy and functionality. This step ensures that the system can retrieve and process information correctly. 7)Debugging and Maintenance: Objective: Continually refine the knowledge base to ensure accuracy and efficiency. Action: Regularly check for errors, update information, and optimize the knowledge base for better performance over time.

Knowledge Representation Using FOL Objects: Represented by constants or variables Facts: Express relationships or properties of objects.Example:` IsMother (Mary, John)`. Rules: Encode logical implications. Example: Ɐx (Human(x) → Mortal(x)). Queries: Ask about the truth of statements. Example: Is there an x such that `Loves(x, Mary)`?

Examples Family Relationships: Encode family trees, parent-child relationships, and more. Geographical Knowledge: Encode locations, distances, and regions. Medical Knowledge: Encode symptoms, diagnoses, and treatments.
Tags