SlideShare una empresa de Scribd logo
1 de 12
Matching and Proof search in Prolog
OVERVIEW Matching Occurs check Programming with matching Proof search Examples
MATCHING The basic idea for a Two terms match is: The two terms are equal or if they contain variables that can be instantiated in such a way that the resulting terms are equal. If term1 and term2 are constants, then term1 and term2 match if and only if they are the same atom, or the same number.
MATCHING If term1 is a variable and term2 is any type of term, then term1 and term2 match and term1 is instantiated to term2.  Similarly, if term2 is a variable and term1 is any type of term, then term1 and term2 match, and term2 is instantiated to term1. If term1 and term2 are complex terms, then they match if and only if: ,[object Object]
b. All their corresponding arguments match
c. and the variable instantiations are compatible.Two terms match if and only if it follows from the previous three clauses that they match.
The occurs check Consider the following query: father(X) = X. ,[object Object],Pick any term and instantiate X to the term you picked.  For ex: if you instantiate X to father(father(butch)), the left hand side becomes father(father(father(butch))), and the right hand side becomes father(father(butch)). Obviously these don't match. SICStus Prolog or SWI returns the answer like: X = father(father(father(father(father(father(...)))))))))) The dots are indicating that there is an infinite nesting of father functors.
Programming with matching Matching plays a key role in Prolog proof search  and this alone makes it vital. Matching can then be used to pull out the information you want. Ex: The following two line knowledge base defines two predicates, namely vertical/2 and horizontal/2, which specify what it means for a line to be vertical or horizontal respectively. vertical(line(point(X,Y),point(X,Z))). horizontal(line(point(X,Y),point(Z,Y))).
The definition of vertical/1 simply says that a line that goes between two points that have the same x-coordinate is vertical. The definition of vertical/1 simply says that a line that goes between two points that have the same x-coordinate is vertical. Ex:  vertical(line(point(1,1),point(1,3))). yes vertical(line(point(1,1),point(3,2))). no
Proof search Consider the following Knowledge Base: f(a). f(b). g(a). g(b). h(b). k(X) :- f(X),g(X),h(X). On posing the query k(X).  Prolog returns k(b)
Proof search Prolog reads the knowledge base, and tries to match k(X) with either a fact, or the head of a rule. It searches the knowledge base top to bottom, and carries out the matching, if it can, at the first place possible.  Here there is only one possibility,  it must match k(X) to the head of the rule: k(X) :- f(X),g(X),h(X).
Examples: the original query now reads k(_G348) and Prolog knows that is: k(_G348) :- f(_G348),g(_G348),h(_G348). The query says: `I want to find an individual that has property k'. The rule says,`an individual has property k if it has properties f, g, and h'. So if Prolog can find an individual with properties f, g, and h, it will have satisfied the original query. So Prolog replaces the original query with the following list of goals: f(_G348),g(_G348),h(_G348).

Más contenido relacionado

La actualidad más candente

Time advance mehcanism
Time advance mehcanismTime advance mehcanism
Time advance mehcanismNikhil Sharma
 
Cause effect graphing technique
Cause effect graphing techniqueCause effect graphing technique
Cause effect graphing techniqueAnkush Kumar
 
unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programminghodcsencet
 
Non- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptxNon- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptxsampathkumar912515
 
Dealing with inconsistency
Dealing with inconsistencyDealing with inconsistency
Dealing with inconsistencyRajat Sharma
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaAmar Myana
 
Software engineering : Layered Architecture
Software engineering : Layered ArchitectureSoftware engineering : Layered Architecture
Software engineering : Layered ArchitectureMuhammed Afsal Villan
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp) Archana432045
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6Kirti Verma
 
Class and object_diagram
Class  and object_diagramClass  and object_diagram
Class and object_diagramSadhana28
 
weak slot and filler structure
weak slot and filler structureweak slot and filler structure
weak slot and filler structureAmey Kerkar
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMvikas dhakane
 
Notes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphicsNotes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphicsNANDINI SHARMA
 
Dynamic programming 2
Dynamic programming 2Dynamic programming 2
Dynamic programming 2Roy Thomas
 

La actualidad más candente (20)

Time advance mehcanism
Time advance mehcanismTime advance mehcanism
Time advance mehcanism
 
Compiler Design Unit 4
Compiler Design Unit 4Compiler Design Unit 4
Compiler Design Unit 4
 
Cause effect graphing technique
Cause effect graphing techniqueCause effect graphing technique
Cause effect graphing technique
 
unit-4-dynamic programming
unit-4-dynamic programmingunit-4-dynamic programming
unit-4-dynamic programming
 
Non- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptxNon- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptx
 
Dealing with inconsistency
Dealing with inconsistencyDealing with inconsistency
Dealing with inconsistency
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebula
 
Software engineering : Layered Architecture
Software engineering : Layered ArchitectureSoftware engineering : Layered Architecture
Software engineering : Layered Architecture
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
 
Semi join
Semi joinSemi join
Semi join
 
Water jug problem ai part 6
Water jug problem ai part 6Water jug problem ai part 6
Water jug problem ai part 6
 
Class and object_diagram
Class  and object_diagramClass  and object_diagram
Class and object_diagram
 
Deductive databases
Deductive databasesDeductive databases
Deductive databases
 
weak slot and filler structure
weak slot and filler structureweak slot and filler structure
weak slot and filler structure
 
Context free grammar
Context free grammarContext free grammar
Context free grammar
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Notes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphicsNotes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphics
 
Script
ScriptScript
Script
 
Query processing
Query processingQuery processing
Query processing
 
Dynamic programming 2
Dynamic programming 2Dynamic programming 2
Dynamic programming 2
 

Destacado

PROLOG: Arithmetic Operations In Prolog
PROLOG: Arithmetic Operations In PrologPROLOG: Arithmetic Operations In Prolog
PROLOG: Arithmetic Operations In PrologDataminingTools Inc
 
Facebook Privacy Settings Tutorial (2015)
Facebook Privacy Settings Tutorial (2015)Facebook Privacy Settings Tutorial (2015)
Facebook Privacy Settings Tutorial (2015)cwjun94
 
Facebook Privacy Setting Tutorial
Facebook Privacy Setting Tutorial Facebook Privacy Setting Tutorial
Facebook Privacy Setting Tutorial KARMUN1295
 
After 55 facebook_tutorial
After 55 facebook_tutorialAfter 55 facebook_tutorial
After 55 facebook_tutorialTammy Fry, Ph.D.
 
PilotLabs IBS - Facebook analysis rankings
PilotLabs IBS - Facebook analysis rankingsPilotLabs IBS - Facebook analysis rankings
PilotLabs IBS - Facebook analysis rankingsBjorn M
 
Facebook Tutorial Video
Facebook Tutorial VideoFacebook Tutorial Video
Facebook Tutorial VideoMaggie Ansell
 
Tutorial on twitter in the lmc
Tutorial on twitter in the lmcTutorial on twitter in the lmc
Tutorial on twitter in the lmcmicheleobrien
 
Creating facebook page tutorial 2014
Creating facebook page tutorial 2014 Creating facebook page tutorial 2014
Creating facebook page tutorial 2014 Jaymar Villamor
 
Conversion Tracking Tutorial
Conversion Tracking TutorialConversion Tracking Tutorial
Conversion Tracking TutorialNick ONeill
 
Facebook 101 personal usage
Facebook 101 personal usageFacebook 101 personal usage
Facebook 101 personal usageKristi Kirkland
 
Facebook privacy setting
Facebook privacy settingFacebook privacy setting
Facebook privacy settingJia Wen
 
Infographic: UK social media usage - Facebook
Infographic: UK social media usage - FacebookInfographic: UK social media usage - Facebook
Infographic: UK social media usage - FacebookHarris Interactive UK
 
Facebook tutorial
Facebook tutorialFacebook tutorial
Facebook tutorialKFCPRB
 
Facebook Usage Stats
Facebook Usage StatsFacebook Usage Stats
Facebook Usage StatsNeiman Outlen
 
Facebook Timeline Tutorial by Leapdog
Facebook Timeline Tutorial by Leapdog Facebook Timeline Tutorial by Leapdog
Facebook Timeline Tutorial by Leapdog Leapdog Marketing Inc
 
An Exploratory Study of Problematic Facebook Use Using Qualitative Methods
An Exploratory Study of Problematic Facebook Use Using Qualitative Methods An Exploratory Study of Problematic Facebook Use Using Qualitative Methods
An Exploratory Study of Problematic Facebook Use Using Qualitative Methods Tracii Ryan
 
Twitter tutorial
Twitter tutorialTwitter tutorial
Twitter tutorialKate Newton
 

Destacado (20)

PROLOG: Arithmetic Operations In Prolog
PROLOG: Arithmetic Operations In PrologPROLOG: Arithmetic Operations In Prolog
PROLOG: Arithmetic Operations In Prolog
 
Facebook Privacy Settings Tutorial (2015)
Facebook Privacy Settings Tutorial (2015)Facebook Privacy Settings Tutorial (2015)
Facebook Privacy Settings Tutorial (2015)
 
Facebook Privacy Setting Tutorial
Facebook Privacy Setting Tutorial Facebook Privacy Setting Tutorial
Facebook Privacy Setting Tutorial
 
After 55 facebook_tutorial
After 55 facebook_tutorialAfter 55 facebook_tutorial
After 55 facebook_tutorial
 
PilotLabs IBS - Facebook analysis rankings
PilotLabs IBS - Facebook analysis rankingsPilotLabs IBS - Facebook analysis rankings
PilotLabs IBS - Facebook analysis rankings
 
Facebook Tutorial Video
Facebook Tutorial VideoFacebook Tutorial Video
Facebook Tutorial Video
 
Tutorial on twitter in the lmc
Tutorial on twitter in the lmcTutorial on twitter in the lmc
Tutorial on twitter in the lmc
 
Tutorial on Twitter
Tutorial on TwitterTutorial on Twitter
Tutorial on Twitter
 
Creating facebook page tutorial 2014
Creating facebook page tutorial 2014 Creating facebook page tutorial 2014
Creating facebook page tutorial 2014
 
Facebook Tutorial
Facebook TutorialFacebook Tutorial
Facebook Tutorial
 
Facebook tutorial
Facebook tutorialFacebook tutorial
Facebook tutorial
 
Conversion Tracking Tutorial
Conversion Tracking TutorialConversion Tracking Tutorial
Conversion Tracking Tutorial
 
Facebook 101 personal usage
Facebook 101 personal usageFacebook 101 personal usage
Facebook 101 personal usage
 
Facebook privacy setting
Facebook privacy settingFacebook privacy setting
Facebook privacy setting
 
Infographic: UK social media usage - Facebook
Infographic: UK social media usage - FacebookInfographic: UK social media usage - Facebook
Infographic: UK social media usage - Facebook
 
Facebook tutorial
Facebook tutorialFacebook tutorial
Facebook tutorial
 
Facebook Usage Stats
Facebook Usage StatsFacebook Usage Stats
Facebook Usage Stats
 
Facebook Timeline Tutorial by Leapdog
Facebook Timeline Tutorial by Leapdog Facebook Timeline Tutorial by Leapdog
Facebook Timeline Tutorial by Leapdog
 
An Exploratory Study of Problematic Facebook Use Using Qualitative Methods
An Exploratory Study of Problematic Facebook Use Using Qualitative Methods An Exploratory Study of Problematic Facebook Use Using Qualitative Methods
An Exploratory Study of Problematic Facebook Use Using Qualitative Methods
 
Twitter tutorial
Twitter tutorialTwitter tutorial
Twitter tutorial
 

Similar a PROLOG: Matching And Proof Search In Prolog

Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningSagacious IT Solution
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicPalGov
 
Propositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logicPropositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logicpendragon6626
 
Novel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithmNovel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithmijfcstjournal
 
AI_session 22 inference and unification.pptx
AI_session 22 inference and unification.pptxAI_session 22 inference and unification.pptx
AI_session 22 inference and unification.pptxAsst.prof M.Gokilavani
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdfsmarwaneid
 
The h-Integrability and the Weak Laws of Large Numbers for Arrays
The h-Integrability and the Weak Laws of Large Numbers for ArraysThe h-Integrability and the Weak Laws of Large Numbers for Arrays
The h-Integrability and the Weak Laws of Large Numbers for ArraysCrescent University Abeokuta
 
The law of non-contradiction in the combined calculus of sentences, situation...
The law of non-contradiction in the combined calculus of sentences, situation...The law of non-contradiction in the combined calculus of sentences, situation...
The law of non-contradiction in the combined calculus of sentences, situation...Victor Gorbatov
 
Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...
Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...
Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...QUESTJOURNAL
 
Some Operation Equation and Applications
Some Operation Equation and ApplicationsSome Operation Equation and Applications
Some Operation Equation and ApplicationsIJMER
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.pptTejasAditya2
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introductionyashirraza123
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)SHUBHAM KUMAR GUPTA
 

Similar a PROLOG: Matching And Proof Search In Prolog (20)

Knowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and ReasoningKnowledge Representation, Inference and Reasoning
Knowledge Representation, Inference and Reasoning
 
Jarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logicJarrar.lecture notes.aai.2011s.ch7.p logic
Jarrar.lecture notes.aai.2011s.ch7.p logic
 
Propositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logicPropositional logic is a good vehicle to introduce basic properties of logic
Propositional logic is a good vehicle to introduce basic properties of logic
 
Novel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithmNovel analysis of transition probabilities in randomized k sat algorithm
Novel analysis of transition probabilities in randomized k sat algorithm
 
AI_session 22 inference and unification.pptx
AI_session 22 inference and unification.pptxAI_session 22 inference and unification.pptx
AI_session 22 inference and unification.pptx
 
eatonmuirheadsoaita
eatonmuirheadsoaitaeatonmuirheadsoaita
eatonmuirheadsoaita
 
DM(1).pptx
DM(1).pptxDM(1).pptx
DM(1).pptx
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
AI Lab Manual.docx
AI Lab Manual.docxAI Lab Manual.docx
AI Lab Manual.docx
 
The h-Integrability and the Weak Laws of Large Numbers for Arrays
The h-Integrability and the Weak Laws of Large Numbers for ArraysThe h-Integrability and the Weak Laws of Large Numbers for Arrays
The h-Integrability and the Weak Laws of Large Numbers for Arrays
 
01bkb04p.ppt
01bkb04p.ppt01bkb04p.ppt
01bkb04p.ppt
 
The law of non-contradiction in the combined calculus of sentences, situation...
The law of non-contradiction in the combined calculus of sentences, situation...The law of non-contradiction in the combined calculus of sentences, situation...
The law of non-contradiction in the combined calculus of sentences, situation...
 
Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...
Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...
Using Mathematical Foundations To Study The Equivalence Between Mass And Ener...
 
Some Operation Equation and Applications
Some Operation Equation and ApplicationsSome Operation Equation and Applications
Some Operation Equation and Applications
 
Canonical correlation
Canonical correlationCanonical correlation
Canonical correlation
 
Predicates
PredicatesPredicates
Predicates
 
1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt1606751772-ds-lecture-6.ppt
1606751772-ds-lecture-6.ppt
 
Discreate structure presentation introduction
Discreate structure presentation introductionDiscreate structure presentation introduction
Discreate structure presentation introduction
 
Logic
LogicLogic
Logic
 
Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)Predicate logic_2(Artificial Intelligence)
Predicate logic_2(Artificial Intelligence)
 

Más de DataminingTools Inc

AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceAI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceDataminingTools Inc
 
Data Mining: Text and web mining
Data Mining: Text and web miningData Mining: Text and web mining
Data Mining: Text and web miningDataminingTools Inc
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataData Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataDataminingTools Inc
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsData Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsDataminingTools Inc
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisDataminingTools Inc
 
Data warehouse and olap technology
Data warehouse and olap technologyData warehouse and olap technology
Data warehouse and olap technologyDataminingTools Inc
 

Más de DataminingTools Inc (20)

Terminology Machine Learning
Terminology Machine LearningTerminology Machine Learning
Terminology Machine Learning
 
Techniques Machine Learning
Techniques Machine LearningTechniques Machine Learning
Techniques Machine Learning
 
Machine learning Introduction
Machine learning IntroductionMachine learning Introduction
Machine learning Introduction
 
Areas of machine leanring
Areas of machine leanringAreas of machine leanring
Areas of machine leanring
 
AI: Planning and AI
AI: Planning and AIAI: Planning and AI
AI: Planning and AI
 
AI: Logic in AI 2
AI: Logic in AI 2AI: Logic in AI 2
AI: Logic in AI 2
 
AI: Logic in AI
AI: Logic in AIAI: Logic in AI
AI: Logic in AI
 
AI: Learning in AI 2
AI: Learning in AI 2AI: Learning in AI 2
AI: Learning in AI 2
 
AI: Learning in AI
AI: Learning in AI AI: Learning in AI
AI: Learning in AI
 
AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligenceAI: Introduction to artificial intelligence
AI: Introduction to artificial intelligence
 
AI: Belief Networks
AI: Belief NetworksAI: Belief Networks
AI: Belief Networks
 
AI: AI & Searching
AI: AI & SearchingAI: AI & Searching
AI: AI & Searching
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
Data Mining: Text and web mining
Data Mining: Text and web miningData Mining: Text and web mining
Data Mining: Text and web mining
 
Data Mining: Outlier analysis
Data Mining: Outlier analysisData Mining: Outlier analysis
Data Mining: Outlier analysis
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence dataData Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence data
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlationsData Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlations
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysisData Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
 
Data warehouse and olap technology
Data warehouse and olap technologyData warehouse and olap technology
Data warehouse and olap technology
 
Data Mining: Data processing
Data Mining: Data processingData Mining: Data processing
Data Mining: Data processing
 

Último

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
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 convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

PROLOG: Matching And Proof Search In Prolog

  • 1. Matching and Proof search in Prolog
  • 2. OVERVIEW Matching Occurs check Programming with matching Proof search Examples
  • 3. MATCHING The basic idea for a Two terms match is: The two terms are equal or if they contain variables that can be instantiated in such a way that the resulting terms are equal. If term1 and term2 are constants, then term1 and term2 match if and only if they are the same atom, or the same number.
  • 4.
  • 5. b. All their corresponding arguments match
  • 6. c. and the variable instantiations are compatible.Two terms match if and only if it follows from the previous three clauses that they match.
  • 7.
  • 8. Programming with matching Matching plays a key role in Prolog proof search and this alone makes it vital. Matching can then be used to pull out the information you want. Ex: The following two line knowledge base defines two predicates, namely vertical/2 and horizontal/2, which specify what it means for a line to be vertical or horizontal respectively. vertical(line(point(X,Y),point(X,Z))). horizontal(line(point(X,Y),point(Z,Y))).
  • 9. The definition of vertical/1 simply says that a line that goes between two points that have the same x-coordinate is vertical. The definition of vertical/1 simply says that a line that goes between two points that have the same x-coordinate is vertical. Ex: vertical(line(point(1,1),point(1,3))). yes vertical(line(point(1,1),point(3,2))). no
  • 10. Proof search Consider the following Knowledge Base: f(a). f(b). g(a). g(b). h(b). k(X) :- f(X),g(X),h(X). On posing the query k(X).  Prolog returns k(b)
  • 11. Proof search Prolog reads the knowledge base, and tries to match k(X) with either a fact, or the head of a rule. It searches the knowledge base top to bottom, and carries out the matching, if it can, at the first place possible. Here there is only one possibility, it must match k(X) to the head of the rule: k(X) :- f(X),g(X),h(X).
  • 12. Examples: the original query now reads k(_G348) and Prolog knows that is: k(_G348) :- f(_G348),g(_G348),h(_G348). The query says: `I want to find an individual that has property k'. The rule says,`an individual has property k if it has properties f, g, and h'. So if Prolog can find an individual with properties f, g, and h, it will have satisfied the original query. So Prolog replaces the original query with the following list of goals: f(_G348),g(_G348),h(_G348).
  • 13. Graphical representation X= _G348 K(x) f(_G348), g(_G348), h(_G348)
  • 14. Visit more self help tutorials Pick a tutorial of your choice and browse through it at your own pace. The tutorials section is free, self-guiding and will not involve any additional support. Visit us at www.dataminingtools.net