SlideShare une entreprise Scribd logo
1  sur  20
First-Order Logic – Examples
Translate to 1 Order Logic  st


•   Snakes are reptiles.
    (S(x): x is a snake, R(x): x is a reptile)
•   None but the brave deserve the fair.
    (B(x): x is brave, D(x): x deserves the fair)
    (B(x): x is brave, F(x): x is fair, D(x,y): x deserves y)
•   No coat is waterproof, unless it has been specially
    treated.
    (C(x): x is a coat, W(x): x is waterproof, S(x): x has
    been specially treated)
•   No car that is over 10 years old will be repaired if it is
    severely damaged.
    (C(x): x is a car, O(x): x is over 10 years old, R(x): x will
    be repaired, D(x): x is severely damaged)
Solutions
•   Snakes are reptiles.
    ∀x (S(x) → R(x))           Not: ∀x (S(x) ∧ R(x))
•   None but the brave deserve the fair.
    ∀x (D(x) → B(x))
    ∀x (∀y (F(y) ∧ D(x,y)) → B(x))
•   No coat is waterproof, unless it has been
    specially treated.
    ∀x (C(x) → ¬W(x) ∨ S(x))
•   No car that is over 10 years old will be repaired
    if it is severely damaged.
    ∀x (C(x) ∧ O(x) → (D(x) → ¬R(x))
More Translation
•    If anything is damaged, someone will be blamed.
     (D(x): x is damaged, P(x): x is a person, B(x): x is
     blamed)
•    If any bananas are yellow, they are ripe.
     (B(x): x is a banana, Y(x): x is yellow, R(x): x is ripe)
3.   If any bananas are yellow, then some bananas are ripe.
•    Dead men tell no tales.
     (D(x): x is dead, M(x): x is a man, T(x): x is a tale,
     T(x,y): x tells y)
•    There is a store from which everyone buys something.
     (P(x): x is a person, S(x): x is a store, B(x,y,z): x buys y
     from z)
Solutions
•   If anything is damaged, someone will be blamed.
    (∃x D(x)) → ∃y (P(y) ∧ B(y)) or
    ∀x ( D(x) → ∃y (P(y) ∧ B(y)) ) – notice braces
•   If any bananas are yellow, they are ripe.
    ∀x B(x) → (Y(x) → R(x)) or
    ∀x B(x) ∧ Y(x) → R(x)
•   If any bananas are yellow, then some bananas are ripe.
    ∀x B(x) → (Y(x) → ∃y (B(y) ∧ R(y)))
•   Dead men tell no tales.
    ∀x (D(x) ∧ M(x)) → ∀y (T(y) → ¬T(x,y))
•   There is a store from which everyone buys something.
    ∃x (S(x) ∧ ∀y (P(y) → ∃z B(y,z,x)))
Still More Translation
H(x): x is a horse
C(x): x is gentle
T(x): x has been well trained
4. Any horse that is gentle has been well
   trained.
5. Gentle horses have all been well trained.
6. If something is a well-trained horse, then
   it must be gentle.
Prove by Resolution Refutation
•   All athletes are brawny. Shyam is not brawny.
    Therefore, Shyam is not an athlete. A(x), B(x),
    s
•   Dates are edible. Only food items are edible.
    All food items are good. Therefore, all dates
    are good. D(x), E(x), F(x), G(x)

•   All astronauts are brave. Shyam is brave.
    Therefore, Shyam is an astronaut. A(x), B(x), s
Equality in First-Order Logic
   E.g. Brother(A) = B is a statement
   Handling equality in resolution: demodulation
    rule

         x = y, (…z…) ⇒ (…y…)

       Here (…z…) is any sentence containing z where z
        unifies with x
       Then, replace z with y
Measures
   Length(MyScale) = Inches(6) = CM(15)
   ∀x Inches(x) = CM(2.5 * x)

Express: All days have 24 hours.
Parts
   PartOf(AP,India)
   PartOf(head,body)

Express: Every body has 2 legs.
Substances
   ∀x,y (Butter(x)∧PartOf(y,x) → Butter(y))

Express: Every material object is made of
 substances.
Change: Situation Calculus
   Representing change in terms of situations and
    actions
   Add extra “situation argument” to all predicates
    and functions that can change over time.
       E.g. President(Narayanan,S0) ∧ President(Kalam,S1)
   Result situations: From one situation to another.
       E.g. Result(StudyHard(Shyam), S2) = S3
       Represents actions
       E.g. President(Kalam,Result(Nomination, S0))
       E.g. ∀x,s (Undergraduate(x, s) → Graduate(x, Result(
        StudyHard(x), s)))
Express:
   A non-rich person can become rich either
    by working hard or by stealing from a
    bank.

(P(x): x is a person, R(x,s): x is rich in
  situation s, W(x): x worked hard, S(x,y): x
  stole from y, B(x): x is a bank)
Symbolize and Translate
   Any single capital letter is a wff (well-
    formed-formula).
   If P is a wff then ¬P is a wff.
   If P and Q are wffs, then P ∧ Q and P ∨ Q
    are wffs.
   No formula will be regarded as being a wff
    unless its being so follows from this
    definition.
Symbolize and Translate
Preserve the intended meaning.
 One more outburst like that and you will be out
  of class.
 Spiderman is on TV tonight, if you’re interested.

 Well, I like AI and I don’t like AI.

 Any politician can fool some people all the time,
  all people some of the time, but not all people all
  of the time.
Higher-Order Logic
   In first-order logic we can quantify over
    objects but not over relations or functions.
   Higher-order logic allows us to quantify
    over relations and functions
   Example:
        ∀x,y (x = y) ↔ (∀p p(x) ↔ p(y))
   Higher-order logics have strictly more
    expressive power than first-order logic.
E.g. Translate Peano’s Axioms

Based on 3 concepts:

   A constant: zero
   A predicate indicating numbers: N
   A successor function: S
The Axioms
   Zero is a number.
   If x is a number, then successor of x is also a
    number.
   If the successors of two numbers are equal, then
    those two numbers are equal.
   No successor of any number is equal to zero.
   If ϕ (a predicate) applies to zero, then if it can be
    shown that ϕ applies to the successor of any
    number given that it applies to that number, then
    it follows that ϕ applies to all numbers.
In 2 order logic
        nd


   Zero is a number: N(zero)
   If x is a number, then successor of x is also a number:
    ∀x N(x) → N(S(x))
   If the successors of two numbers are equal, then those
    two numbers are equal:
    ∀x,y [ N(x) ∧ N(y) ∧ S(x) = S(y) → x = y ]
   No successor of any number is equal to zero:
    ¬ (∃x N(x) ∧ (S(x) = zero))
   If ϕ (a predicate) applies to zero, then if it can be shown
    that ϕ applies to the successor of any number given that
    it applies to that number, then it follows that ϕ applies to
    all numbers:
    ϕ(zero) ∧ ∀x ( N(x) ∧ (ϕ(x) → ϕ(S(x)))) → ∀x ( N(x) →
    ϕ(x) )
Prove using Resolution Refutation
   Any fish can swim faster than any smaller
    one. Therefore, if there is a largest fish,
    then there is a fastest fish.

    (F(x): x is a fish, L(x,y): x is larger= than y,
    S(x,y): x can swim faster= than y)

Contenu connexe

Tendances

Dynamic programming - fundamentals review
Dynamic programming - fundamentals reviewDynamic programming - fundamentals review
Dynamic programming - fundamentals reviewElifTech
 
Fractional knapsack class 13
Fractional knapsack class 13Fractional knapsack class 13
Fractional knapsack class 13Kumar
 
Aoa amortized analysis
Aoa amortized analysisAoa amortized analysis
Aoa amortized analysisSalabat Khan
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logicSharif Omar Salem
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way PresentationAmira ElSharkawy
 
Лекция 9: Графы. Поиск кратчайшего пути в графе
Лекция 9: Графы. Поиск кратчайшего пути в графеЛекция 9: Графы. Поиск кратчайшего пути в графе
Лекция 9: Графы. Поиск кратчайшего пути в графеMikhail Kurnosov
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logicgiki67
 
Python-File handling-slides-pkt
Python-File handling-slides-pktPython-File handling-slides-pkt
Python-File handling-slides-pktPradyumna Tripathy
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiersraksharao
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 
Red black tree
Red black treeRed black tree
Red black treevinitha96
 
Introduction to advanced python
Introduction to advanced pythonIntroduction to advanced python
Introduction to advanced pythonCharles-Axel Dein
 
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...vikas dhakane
 

Tendances (20)

Dynamic programming - fundamentals review
Dynamic programming - fundamentals reviewDynamic programming - fundamentals review
Dynamic programming - fundamentals review
 
Klee and angr
Klee and angrKlee and angr
Klee and angr
 
Fractional knapsack class 13
Fractional knapsack class 13Fractional knapsack class 13
Fractional knapsack class 13
 
Aoa amortized analysis
Aoa amortized analysisAoa amortized analysis
Aoa amortized analysis
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
Ai lab manual
Ai lab manualAi lab manual
Ai lab manual
 
#3 formal methods – propositional logic
#3 formal methods – propositional logic#3 formal methods – propositional logic
#3 formal methods – propositional logic
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way Presentation
 
Prolog basics
Prolog basicsProlog basics
Prolog basics
 
Лекция 9: Графы. Поиск кратчайшего пути в графе
Лекция 9: Графы. Поиск кратчайшего пути в графеЛекция 9: Графы. Поиск кратчайшего пути в графе
Лекция 9: Графы. Поиск кратчайшего пути в графе
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Python-File handling-slides-pkt
Python-File handling-slides-pktPython-File handling-slides-pkt
Python-File handling-slides-pkt
 
Unit 1 quantifiers
Unit 1  quantifiersUnit 1  quantifiers
Unit 1 quantifiers
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 
Red black tree
Red black treeRed black tree
Red black tree
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
Red black tree
Red black treeRed black tree
Red black tree
 
Introduction to advanced python
Introduction to advanced pythonIntroduction to advanced python
Introduction to advanced python
 
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
I.ITERATIVE DEEPENING DEPTH FIRST SEARCH(ID-DFS) II.INFORMED SEARCH IN ARTIFI...
 
Graph coloring problem
Graph coloring problemGraph coloring problem
Graph coloring problem
 

En vedette

Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12yosser atassi
 
14 pro resolution
14 pro resolution14 pro resolution
14 pro resolutionTianlu Wang
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolutionTianlu Wang
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferencePalGov
 
Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsMustafa Jarrar
 
Jarrar: First Order Logic
Jarrar: First Order LogicJarrar: First Order Logic
Jarrar: First Order LogicMustafa Jarrar
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsMustafa Jarrar
 
Attacks in MANET
Attacks in MANETAttacks in MANET
Attacks in MANETSunita Sahu
 
Practical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & PigPractical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & PigMilind Bhandarkar
 
Deep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceDeep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceLukas Masuch
 

En vedette (13)

Inference in first order logic12
Inference in first order logic12Inference in first order logic12
Inference in first order logic12
 
14 pro resolution
14 pro resolution14 pro resolution
14 pro resolution
 
16 1 predicate resolution
16 1 predicate resolution16 1 predicate resolution
16 1 predicate resolution
 
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inferenceJarrar.lecture notes.aai.2011s.ch9.fol.inference
Jarrar.lecture notes.aai.2011s.ch9.fol.inference
 
Jarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference MethodsJarrar: First Order Logic- Inference Methods
Jarrar: First Order Logic- Inference Methods
 
Jarrar: First Order Logic
Jarrar: First Order LogicJarrar: First Order Logic
Jarrar: First Order Logic
 
Jarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference MethodsJarrar: Propositional Logic Inference Methods
Jarrar: Propositional Logic Inference Methods
 
A petri-net
A petri-netA petri-net
A petri-net
 
Discrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order LogicDiscrete Math Lecture 02: First Order Logic
Discrete Math Lecture 02: First Order Logic
 
Attacks in MANET
Attacks in MANETAttacks in MANET
Attacks in MANET
 
Practical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & PigPractical Problem Solving with Apache Hadoop & Pig
Practical Problem Solving with Apache Hadoop & Pig
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Deep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial IntelligenceDeep Learning - The Past, Present and Future of Artificial Intelligence
Deep Learning - The Past, Present and Future of Artificial Intelligence
 

Similaire à 3 fol examples v2

Similaire à 3 fol examples v2 (20)

Course notes2summer2012
Course notes2summer2012Course notes2summer2012
Course notes2summer2012
 
X02PredCalculus.ppt
X02PredCalculus.pptX02PredCalculus.ppt
X02PredCalculus.ppt
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Use of quantifiers
Use of quantifiersUse of quantifiers
Use of quantifiers
 
Quantification
QuantificationQuantification
Quantification
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
Module_5_1.pptx
Module_5_1.pptxModule_5_1.pptx
Module_5_1.pptx
 
CPSC 125 Ch 1 sec 3
CPSC 125 Ch 1 sec 3CPSC 125 Ch 1 sec 3
CPSC 125 Ch 1 sec 3
 
Computational logic First Order Logic
Computational logic First Order LogicComputational logic First Order Logic
Computational logic First Order Logic
 
Lecture3
Lecture3Lecture3
Lecture3
 
Predicates
PredicatesPredicates
Predicates
 
FOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptxFOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptx
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
Predicate & quantifier
Predicate & quantifierPredicate & quantifier
Predicate & quantifier
 
PredicateLogic (1).ppt
PredicateLogic (1).pptPredicateLogic (1).ppt
PredicateLogic (1).ppt
 
PredicateLogic.pptx
PredicateLogic.pptxPredicateLogic.pptx
PredicateLogic.pptx
 
Knowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptxKnowledge Representation and Reasoning.pptx
Knowledge Representation and Reasoning.pptx
 
Proba stats-r1-2017
Proba stats-r1-2017Proba stats-r1-2017
Proba stats-r1-2017
 
Quantifiers and its Types
Quantifiers and its TypesQuantifiers and its Types
Quantifiers and its Types
 

Plus de Digvijay Singh (14)

Week3 applications
Week3 applicationsWeek3 applications
Week3 applications
 
Week3.1
Week3.1Week3.1
Week3.1
 
Week2.1
Week2.1Week2.1
Week2.1
 
Week1.2 intro
Week1.2 introWeek1.2 intro
Week1.2 intro
 
Networks
NetworksNetworks
Networks
 
Uncertainty
UncertaintyUncertainty
Uncertainty
 
Overfitting and-tbl
Overfitting and-tblOverfitting and-tbl
Overfitting and-tbl
 
Ngrams smoothing
Ngrams smoothingNgrams smoothing
Ngrams smoothing
 
Query execution
Query executionQuery execution
Query execution
 
Query compiler
Query compilerQuery compiler
Query compiler
 
Machine learning
Machine learningMachine learning
Machine learning
 
Hmm viterbi
Hmm viterbiHmm viterbi
Hmm viterbi
 
Multidimensional Indexing
Multidimensional IndexingMultidimensional Indexing
Multidimensional Indexing
 
Bayesnetwork
BayesnetworkBayesnetwork
Bayesnetwork
 

Dernier

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Dernier (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

3 fol examples v2

  • 2. Translate to 1 Order Logic st • Snakes are reptiles. (S(x): x is a snake, R(x): x is a reptile) • None but the brave deserve the fair. (B(x): x is brave, D(x): x deserves the fair) (B(x): x is brave, F(x): x is fair, D(x,y): x deserves y) • No coat is waterproof, unless it has been specially treated. (C(x): x is a coat, W(x): x is waterproof, S(x): x has been specially treated) • No car that is over 10 years old will be repaired if it is severely damaged. (C(x): x is a car, O(x): x is over 10 years old, R(x): x will be repaired, D(x): x is severely damaged)
  • 3. Solutions • Snakes are reptiles. ∀x (S(x) → R(x)) Not: ∀x (S(x) ∧ R(x)) • None but the brave deserve the fair. ∀x (D(x) → B(x)) ∀x (∀y (F(y) ∧ D(x,y)) → B(x)) • No coat is waterproof, unless it has been specially treated. ∀x (C(x) → ¬W(x) ∨ S(x)) • No car that is over 10 years old will be repaired if it is severely damaged. ∀x (C(x) ∧ O(x) → (D(x) → ¬R(x))
  • 4. More Translation • If anything is damaged, someone will be blamed. (D(x): x is damaged, P(x): x is a person, B(x): x is blamed) • If any bananas are yellow, they are ripe. (B(x): x is a banana, Y(x): x is yellow, R(x): x is ripe) 3. If any bananas are yellow, then some bananas are ripe. • Dead men tell no tales. (D(x): x is dead, M(x): x is a man, T(x): x is a tale, T(x,y): x tells y) • There is a store from which everyone buys something. (P(x): x is a person, S(x): x is a store, B(x,y,z): x buys y from z)
  • 5. Solutions • If anything is damaged, someone will be blamed. (∃x D(x)) → ∃y (P(y) ∧ B(y)) or ∀x ( D(x) → ∃y (P(y) ∧ B(y)) ) – notice braces • If any bananas are yellow, they are ripe. ∀x B(x) → (Y(x) → R(x)) or ∀x B(x) ∧ Y(x) → R(x) • If any bananas are yellow, then some bananas are ripe. ∀x B(x) → (Y(x) → ∃y (B(y) ∧ R(y))) • Dead men tell no tales. ∀x (D(x) ∧ M(x)) → ∀y (T(y) → ¬T(x,y)) • There is a store from which everyone buys something. ∃x (S(x) ∧ ∀y (P(y) → ∃z B(y,z,x)))
  • 6. Still More Translation H(x): x is a horse C(x): x is gentle T(x): x has been well trained 4. Any horse that is gentle has been well trained. 5. Gentle horses have all been well trained. 6. If something is a well-trained horse, then it must be gentle.
  • 7. Prove by Resolution Refutation • All athletes are brawny. Shyam is not brawny. Therefore, Shyam is not an athlete. A(x), B(x), s • Dates are edible. Only food items are edible. All food items are good. Therefore, all dates are good. D(x), E(x), F(x), G(x) • All astronauts are brave. Shyam is brave. Therefore, Shyam is an astronaut. A(x), B(x), s
  • 8. Equality in First-Order Logic  E.g. Brother(A) = B is a statement  Handling equality in resolution: demodulation rule x = y, (…z…) ⇒ (…y…)  Here (…z…) is any sentence containing z where z unifies with x  Then, replace z with y
  • 9. Measures  Length(MyScale) = Inches(6) = CM(15)  ∀x Inches(x) = CM(2.5 * x) Express: All days have 24 hours.
  • 10. Parts  PartOf(AP,India)  PartOf(head,body) Express: Every body has 2 legs.
  • 11. Substances  ∀x,y (Butter(x)∧PartOf(y,x) → Butter(y)) Express: Every material object is made of substances.
  • 12. Change: Situation Calculus  Representing change in terms of situations and actions  Add extra “situation argument” to all predicates and functions that can change over time.  E.g. President(Narayanan,S0) ∧ President(Kalam,S1)  Result situations: From one situation to another.  E.g. Result(StudyHard(Shyam), S2) = S3  Represents actions  E.g. President(Kalam,Result(Nomination, S0))  E.g. ∀x,s (Undergraduate(x, s) → Graduate(x, Result( StudyHard(x), s)))
  • 13. Express:  A non-rich person can become rich either by working hard or by stealing from a bank. (P(x): x is a person, R(x,s): x is rich in situation s, W(x): x worked hard, S(x,y): x stole from y, B(x): x is a bank)
  • 14. Symbolize and Translate  Any single capital letter is a wff (well- formed-formula).  If P is a wff then ¬P is a wff.  If P and Q are wffs, then P ∧ Q and P ∨ Q are wffs.  No formula will be regarded as being a wff unless its being so follows from this definition.
  • 15. Symbolize and Translate Preserve the intended meaning.  One more outburst like that and you will be out of class.  Spiderman is on TV tonight, if you’re interested.  Well, I like AI and I don’t like AI.  Any politician can fool some people all the time, all people some of the time, but not all people all of the time.
  • 16. Higher-Order Logic  In first-order logic we can quantify over objects but not over relations or functions.  Higher-order logic allows us to quantify over relations and functions  Example: ∀x,y (x = y) ↔ (∀p p(x) ↔ p(y))  Higher-order logics have strictly more expressive power than first-order logic.
  • 17. E.g. Translate Peano’s Axioms Based on 3 concepts:  A constant: zero  A predicate indicating numbers: N  A successor function: S
  • 18. The Axioms  Zero is a number.  If x is a number, then successor of x is also a number.  If the successors of two numbers are equal, then those two numbers are equal.  No successor of any number is equal to zero.  If ϕ (a predicate) applies to zero, then if it can be shown that ϕ applies to the successor of any number given that it applies to that number, then it follows that ϕ applies to all numbers.
  • 19. In 2 order logic nd  Zero is a number: N(zero)  If x is a number, then successor of x is also a number: ∀x N(x) → N(S(x))  If the successors of two numbers are equal, then those two numbers are equal: ∀x,y [ N(x) ∧ N(y) ∧ S(x) = S(y) → x = y ]  No successor of any number is equal to zero: ¬ (∃x N(x) ∧ (S(x) = zero))  If ϕ (a predicate) applies to zero, then if it can be shown that ϕ applies to the successor of any number given that it applies to that number, then it follows that ϕ applies to all numbers: ϕ(zero) ∧ ∀x ( N(x) ∧ (ϕ(x) → ϕ(S(x)))) → ∀x ( N(x) → ϕ(x) )
  • 20. Prove using Resolution Refutation  Any fish can swim faster than any smaller one. Therefore, if there is a largest fish, then there is a fastest fish. (F(x): x is a fish, L(x,y): x is larger= than y, S(x,y): x can swim faster= than y)