SlideShare a Scribd company logo
Knowledge Engineering in First-Order Logic
(Example- The Domain Of Electronic Circuits)
Steps of Knowledge Engineering process
(Example- The Domain Of Electronic Circuits)
Steps Of Knowledge Engineering Process
Identify the task
Assemble the
relevant
knowledge
Decide on a
vocabulary
Encode general
knowledge about
the domain.
Encode a
description of the
specific problem
instance
Pose queries to the
inference
procedure
Debug the
knowledge base.
Example-The domain of electronic circuits
Identify the task :
 There are many reasoning tasks associated
with digital circuits. At the highest level, we
will examine the functionality circuit.
 For example, does the circuit in actually add
properly? (circuit verification)
 Input/output of certain gates?
 At the second level we will examine circuit’s
structure.
 For example, what are all the gates
connected to the first input terminal? Does
the circuit contain feedback loops?
Assemble the relevant knowledge
 We need to know how the gates transform their input signals.
 There are four types of gates: AND, OR, and XOR gates have two input terminals,
and NOT gates have one. All gates have one output terminal. Circuits, like gates,
have input and output terminals.
 Irrelevant knowledge: Factors such as the size, shape, color, or cost of the various
components are irrelevant to our analysis.
Decide on a vocabulary
 The next step is to choose functions, predicates, and constants to represents circuits , terminals
signals and gates.
 First, we need to be able to distinguish gates from each other and from other objects. Each
gate is represented as an object named by a constant, about which we assert that it is a gate
with, say, Gate(X1).
 The behavior of each gate is determined by its type: one of the constants AND, OR, XOR, or
NOT. Because a gate has exactly one type, a function is appropriate: Type(X1) = XOR.
Circuits, like gates, are identified by a predicate: Circuit(C1).
 Next we consider terminals, which are identified by the predicate Terminal(x). A gate or
circuit can have one or more input terminals and one or more output terminals. We use the
function In(1, X1) to denote the first input terminal for gate X1. A similar function Out is used
for output terminals. The function Arity(c, i, j) says that circuit c has i input and j output
terminals.
 The connectivity between gates can be represented by a predicate, Connected, which takes two
terminals as arguments, as in Connected(Out(1, X1),In(1, X2)).
 Finally, we need to know whether a signal is on or off. We therefore introduce as objects two
signal values, 1 and 0, and a function Signal(t) that denotes the signal value for the terminal t.
Encode general knowledge of the domain
These are all the axioms we will need:
1. If two terminals are connected, then they have the same signal:
∀ t1, t2 Terminal(t1) ∧ Terminal(t2) ∧ Connected(t1, t2) ⇒ Signal(t1) = Signal(t2)
2. The signal at every terminal is either 1 or 0:
∀ t Terminal(t) ⇒ Signal(t)=1 ∨ Signal(t)=0 .
3. Connected is commutative:
∀ t1, t2 Connected(t1, t2) ⇔ Connected(t2, t1) .
4. There are four types of gates:
∀ g Gate(g) ∧ k = Type(g) ⇒ k = AND ∨ k = OR ∨ k = XOR ∨ k = NOT .
5. An AND gate’s output is 0 if and only if any of its inputs is 0:
∀ g Gate(g) ∧ Type(g) = AND ⇒ Signal(Out(1, g)) = 0 ⇔ ∃ n Signal(In(n, g)) = 0 .
6. An OR gate’s output is 1 if and only if any of its inputs is 1:
∀ g Gate(g) ∧ Type(g) = OR ⇒ Signal(Out(1, g)) = 1 ⇔ ∃ n Signal(In(n, g)) = 1 .
Encode general knowledge of the domain
7. An XOR gate’s output is 1 if and only if its inputs are different:
∀ g Gate(g) ∧ Type(g) = XOR ⇒ Signal(Out(1, g)) = 1 ⇔ Signal(In(1, g)) ≠ Signal(In(2, g)) .
8. A NOT gate’s output is different from its input:
∀ g Gate(g) ∧ (Type(g) = NOT) ⇒ Signal(Out(1, g)) ≠ Signal(In(1, g)) .
9. The gates (except for NOT) have two inputs and one output.
∀ g Gate(g) ∧ Type(g) = NOT ⇒ Arity(g, 1, 1) .
∀ g Gate(g) ∧ k = Type(g) ∧ (k = AND ∨ k = OR ∨ k = XOR) ⇒ Arity(g, 2, 1)
10. A circuit has terminals, up to its input and output arity, and nothing beyond its arity:
∀ c, i, j Circuit(c) ∧ Arity(c, i, j) ⇒
∀ n (n ≤ i ⇒ Terminal(In(c, n))) ∧ (n>i ⇒ In(c, n) = Nothing) ∧
∀ n (n ≤ j ⇒ Terminal(Out(c, n))) ∧ (n>j ⇒ Out(c, n) = Nothing)
11. Gates, terminals, signals, gate types, and Nothing are all distinct.
∀ g, t Gate(g) ∧ Terminal(t) ⇒
g ≠ t ≠ 1 ≠ 0 ≠ OR ≠ AND ≠ XOR ≠ NOT ≠ Nothing .
12. Gates are circuits. ∀ g Gate(g) ⇒ Circuit(g)
Encode the specific problem instance
Circuit C1 with the following description.
 First, we categorize the circuit and its component gates:
Circuit(C1) ∧ Arity(C1, 3, 2)
Gate(X1) ∧ Type(X1) = XOR
Gate(X2) ∧ Type(X2) = XOR
Gate(A1) ∧ Type(A1) = AND
Gate(A2) ∧ Type(A2) = AND
Gate(O1) ∧ Type(O1) = OR
 Then, we show the connections between them:
Connected(Out(1, X1),In(1, X2)) Connected(In(1, C1),In(1, X1))
Connected(Out(1, X1),In(2, A2)) Connected(In(1, C1),In(1, A1))
Connected(Out(1, A2),In(1, O1)) Connected(In(2, C1),In(2, X1))
Connected(Out(1, A1),In(2, O1)) Connected(In(2, C1),In(2, A1))
Connected(Out(1, X2), Out(1, C1)) Connected(In(3, C1),In(2, X2))
Connected(Out(1, O1), Out(2, C1)) Connected(In(3, C1),In(1, A2))
Pose queries to the inference procedure
 In this step we will find all the possible sets of values of all the terminals for the
adder circuit.
 What combinations of inputs would cause the first output of C1 (the sum bit) to be
0 and the second output of C1 (the carry bit) to be 1?
 ∃ i1, i2, i3 Signal(In(1, C1)) = i1 ∧ Signal(In(2, C1)) = i2 ∧ Signal(In(3, C1)) = i3
∧ Signal(Out(1, C1)) = 0 ∧ Signal(Out(2, C1)) = 1 .
 This is a simple example of circuit verification.
Debug the knowledge base
 We can perturb the knowledge base in various ways to see what kinds of erroneous
behaviours emerge.
 For example, suppose we forget to assert that 1 ≠ 0. Suddenly, the system will be
unable to prove any outputs for the circuit, except for the input cases 000 and 110.
We can pinpoint the problem by asking for the outputs of each gate.
Developing a knowledge base in first-order logic requires a careful process
of analyzing the domain, choosing a vocabulary, and encoding the axioms
required to support the desired inferences.
Thanks For
Watching
Reference:
Artificial Intelligence
A Modern Approach Third Edition
Peter Norvig and Stuart J. Russell
Subscribe
Like
Share
Thanks for watching
If you have a question, you can reach me via e-mail at omega.teched@gmail.com
Social Media Handles:
omega.teched
megha_with
megha-sharma24
OMega TechEd

More Related Content

What's hot

Logics for non monotonic reasoning-ai
Logics for non monotonic reasoning-aiLogics for non monotonic reasoning-ai
Logics for non monotonic reasoning-ai
ShaishavShah8
 
5 csp
5 csp5 csp
5 csp
Mhd Sb
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
Ramla Sheikh
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
Dr. C.V. Suresh Babu
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
Manjula V
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
Amar Jukuntla
 
Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2
DigiGurukul
 
Rule based system
Rule based systemRule based system
Rule based system
Dr. C.V. Suresh Babu
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
Yasir Khan
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
Jismy .K.Jose
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
Megha Sharma
 
weak slot and filler
weak slot and fillerweak slot and filler
Ai lab manual
Ai lab manualAi lab manual
Ai lab manual
Shipra Swati
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
vikas dhakane
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
Mukesh Tekwani
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
vikas dhakane
 
Push down automata
Push down automataPush down automata
Push down automata
Somya Bagai
 
Inference engine
Inference engineInference engine
Inference engine
Abhishek Pachisia
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
Mohammad Ilyas Malik
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
Amey Kerkar
 

What's hot (20)

Logics for non monotonic reasoning-ai
Logics for non monotonic reasoning-aiLogics for non monotonic reasoning-ai
Logics for non monotonic reasoning-ai
 
5 csp
5 csp5 csp
5 csp
 
Knowledge representation In Artificial Intelligence
Knowledge representation In Artificial IntelligenceKnowledge representation In Artificial Intelligence
Knowledge representation In Artificial Intelligence
 
Hill climbing algorithm
Hill climbing algorithmHill climbing algorithm
Hill climbing algorithm
 
L03 ai - knowledge representation using logic
L03 ai - knowledge representation using logicL03 ai - knowledge representation using logic
L03 ai - knowledge representation using logic
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2Artificial Intelligence Notes Unit 2
Artificial Intelligence Notes Unit 2
 
Rule based system
Rule based systemRule based system
Rule based system
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
 
Unification and Lifting
Unification and LiftingUnification and Lifting
Unification and Lifting
 
weak slot and filler
weak slot and fillerweak slot and filler
weak slot and filler
 
Ai lab manual
Ai lab manualAi lab manual
Ai lab manual
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
 
Push down automata
Push down automataPush down automata
Push down automata
 
Inference engine
Inference engineInference engine
Inference engine
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 

Similar to Knowledge Engineering in FOL.

2009 worldfinalproblemset
2009 worldfinalproblemset2009 worldfinalproblemset
2009 worldfinalproblemset
Luca Zannini
 
6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt
naghamallella
 
basic logic gate presentation date23.ppt
basic logic gate presentation date23.pptbasic logic gate presentation date23.ppt
basic logic gate presentation date23.ppt
naghamallella
 
logic gates By ZAK
logic gates By ZAKlogic gates By ZAK
logic gates By ZAK
Tabsheer Hasan
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptx
AravindaAKumar1
 
Chapter 5 boolean algebra
Chapter 5 boolean algebraChapter 5 boolean algebra
Chapter 5 boolean algebra
Praveen M Jigajinni
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
WilliamJosephat1
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
RithinA1
 
Logic gates
Logic gatesLogic gates
Logic gates
Oscar Ospina Romero
 
Logic gates 1
Logic gates 1Logic gates 1
Logic gates 1
Oscar Ospina Romero
 
class xi pptx-1.pptx
class xi pptx-1.pptxclass xi pptx-1.pptx
class xi pptx-1.pptx
PriyanshuGumber1
 
Logic gates
Logic gatesLogic gates
BOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.pptBOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.ppt
dhanamalathieee
 
Convolutional codes
Convolutional codesConvolutional codes
Convolutional codes
Abdullaziz Tagawy
 
9. logic gates._rr
9. logic gates._rr9. logic gates._rr
9. logic gates._rr
Arriz San Juan
 
Digital logic
Digital logicDigital logic
Digital logic
Madhu Bala
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
kavitha muneeshwaran
 
OR, AND, NOT Gates
OR, AND, NOT GatesOR, AND, NOT Gates
OR, AND, NOT Gates
Md. Nazmus Saqib Khan
 
Chapter 2 Boolean Algebra.pptx
Chapter 2 Boolean Algebra.pptxChapter 2 Boolean Algebra.pptx
Chapter 2 Boolean Algebra.pptx
HazardRhenz1
 
chapter-3-logic-gates.pdf
chapter-3-logic-gates.pdfchapter-3-logic-gates.pdf
chapter-3-logic-gates.pdf
study material
 

Similar to Knowledge Engineering in FOL. (20)

2009 worldfinalproblemset
2009 worldfinalproblemset2009 worldfinalproblemset
2009 worldfinalproblemset
 
6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt6_2019_04_09!08_59_48_PM logic gate_.ppt
6_2019_04_09!08_59_48_PM logic gate_.ppt
 
basic logic gate presentation date23.ppt
basic logic gate presentation date23.pptbasic logic gate presentation date23.ppt
basic logic gate presentation date23.ppt
 
logic gates By ZAK
logic gates By ZAKlogic gates By ZAK
logic gates By ZAK
 
assignment_mathematics.pptx
assignment_mathematics.pptxassignment_mathematics.pptx
assignment_mathematics.pptx
 
Chapter 5 boolean algebra
Chapter 5 boolean algebraChapter 5 boolean algebra
Chapter 5 boolean algebra
 
Lecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptxLecture 04-Digital logic gates.pptx
Lecture 04-Digital logic gates.pptx
 
chapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptxchapter 3 Boolean algebra (2).pptx
chapter 3 Boolean algebra (2).pptx
 
Logic gates
Logic gatesLogic gates
Logic gates
 
Logic gates 1
Logic gates 1Logic gates 1
Logic gates 1
 
class xi pptx-1.pptx
class xi pptx-1.pptxclass xi pptx-1.pptx
class xi pptx-1.pptx
 
Logic gates
Logic gatesLogic gates
Logic gates
 
BOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.pptBOOLEAN ALGEBRA & LOGIC GATES.ppt
BOOLEAN ALGEBRA & LOGIC GATES.ppt
 
Convolutional codes
Convolutional codesConvolutional codes
Convolutional codes
 
9. logic gates._rr
9. logic gates._rr9. logic gates._rr
9. logic gates._rr
 
Digital logic
Digital logicDigital logic
Digital logic
 
Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
OR, AND, NOT Gates
OR, AND, NOT GatesOR, AND, NOT Gates
OR, AND, NOT Gates
 
Chapter 2 Boolean Algebra.pptx
Chapter 2 Boolean Algebra.pptxChapter 2 Boolean Algebra.pptx
Chapter 2 Boolean Algebra.pptx
 
chapter-3-logic-gates.pdf
chapter-3-logic-gates.pdfchapter-3-logic-gates.pdf
chapter-3-logic-gates.pdf
 

More from Megha Sharma

Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)
Megha Sharma
 
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Megha Sharma
 
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUCModel Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Megha Sharma
 
Model Evaluation Matrix: Accuracy, precision and recall
Model Evaluation Matrix: Accuracy, precision and recallModel Evaluation Matrix: Accuracy, precision and recall
Model Evaluation Matrix: Accuracy, precision and recall
Megha Sharma
 
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Megha Sharma
 
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), HistogramVisualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Megha Sharma
 
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
Megha Sharma
 
Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.
Megha Sharma
 
Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.
Megha Sharma
 
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Megha Sharma
 
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Megha Sharma
 
Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.
Megha Sharma
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learning
Megha Sharma
 
Association Rule mining
Association Rule miningAssociation Rule mining
Association Rule mining
Megha Sharma
 
Bellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - IIBellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - II
Megha Sharma
 
Reinforcement learning in Machine learning
 Reinforcement learning in Machine learning Reinforcement learning in Machine learning
Reinforcement learning in Machine learning
Megha Sharma
 
E-M Algorithm
E-M AlgorithmE-M Algorithm
E-M Algorithm
Megha Sharma
 
Entropy and information gain in decision tree.
Entropy and information gain in decision tree.Entropy and information gain in decision tree.
Entropy and information gain in decision tree.
Megha Sharma
 
Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.
Megha Sharma
 
If statements in C
If statements in CIf statements in C
If statements in C
Megha Sharma
 

More from Megha Sharma (20)

Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)Data Management Activities, Extraction, Transformation and Loading (ETL)
Data Management Activities, Extraction, Transformation and Loading (ETL)
 
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.Descriptive Statistics: Mean, Median Mode and Standard Deviation.
Descriptive Statistics: Mean, Median Mode and Standard Deviation.
 
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUCModel Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
Model Evaluation Matrix: Confusion Matrix, F1 Score, ROC curve AUC
 
Model Evaluation Matrix: Accuracy, precision and recall
Model Evaluation Matrix: Accuracy, precision and recallModel Evaluation Matrix: Accuracy, precision and recall
Model Evaluation Matrix: Accuracy, precision and recall
 
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
Visualization Techniques- Box plot, Line Chart, Scatter plot, Bar chart.
 
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), HistogramVisualization Techniques ,Exploratory Data Analysis(EDA), Histogram
Visualization Techniques ,Exploratory Data Analysis(EDA), Histogram
 
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...Data Preprocessing- Data transformation,  Scaling, Normalization, Standardiza...
Data Preprocessing- Data transformation, Scaling, Normalization, Standardiza...
 
Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.Data Science- Data Preprocessing, Data Cleaning.
Data Science- Data Preprocessing, Data Cleaning.
 
Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.Data Preprocessing- Feature Selection and Merging.
Data Preprocessing- Feature Selection and Merging.
 
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
Different types of data. Qualitative, Quantitative, Ordinal, Nominal, Discret...
 
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.Data Science comparison with AI, ML, BI, and data warehousing, data mining.
Data Science comparison with AI, ML, BI, and data warehousing, data mining.
 
Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.Data Science Introduction, Application of Data Science.
Data Science Introduction, Application of Data Science.
 
Ensemble learning
Ensemble learningEnsemble learning
Ensemble learning
 
Association Rule mining
Association Rule miningAssociation Rule mining
Association Rule mining
 
Bellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - IIBellman's equation Reinforcement learning - II
Bellman's equation Reinforcement learning - II
 
Reinforcement learning in Machine learning
 Reinforcement learning in Machine learning Reinforcement learning in Machine learning
Reinforcement learning in Machine learning
 
E-M Algorithm
E-M AlgorithmE-M Algorithm
E-M Algorithm
 
Entropy and information gain in decision tree.
Entropy and information gain in decision tree.Entropy and information gain in decision tree.
Entropy and information gain in decision tree.
 
Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.Types of Machine Learning. & Decision Tree.
Types of Machine Learning. & Decision Tree.
 
If statements in C
If statements in CIf statements in C
If statements in C
 

Recently uploaded

BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 

Recently uploaded (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 

Knowledge Engineering in FOL.

  • 1. Knowledge Engineering in First-Order Logic (Example- The Domain Of Electronic Circuits)
  • 2. Steps of Knowledge Engineering process (Example- The Domain Of Electronic Circuits)
  • 3. Steps Of Knowledge Engineering Process Identify the task Assemble the relevant knowledge Decide on a vocabulary Encode general knowledge about the domain. Encode a description of the specific problem instance Pose queries to the inference procedure Debug the knowledge base.
  • 4. Example-The domain of electronic circuits Identify the task :  There are many reasoning tasks associated with digital circuits. At the highest level, we will examine the functionality circuit.  For example, does the circuit in actually add properly? (circuit verification)  Input/output of certain gates?  At the second level we will examine circuit’s structure.  For example, what are all the gates connected to the first input terminal? Does the circuit contain feedback loops?
  • 5. Assemble the relevant knowledge  We need to know how the gates transform their input signals.  There are four types of gates: AND, OR, and XOR gates have two input terminals, and NOT gates have one. All gates have one output terminal. Circuits, like gates, have input and output terminals.  Irrelevant knowledge: Factors such as the size, shape, color, or cost of the various components are irrelevant to our analysis.
  • 6. Decide on a vocabulary  The next step is to choose functions, predicates, and constants to represents circuits , terminals signals and gates.  First, we need to be able to distinguish gates from each other and from other objects. Each gate is represented as an object named by a constant, about which we assert that it is a gate with, say, Gate(X1).  The behavior of each gate is determined by its type: one of the constants AND, OR, XOR, or NOT. Because a gate has exactly one type, a function is appropriate: Type(X1) = XOR. Circuits, like gates, are identified by a predicate: Circuit(C1).  Next we consider terminals, which are identified by the predicate Terminal(x). A gate or circuit can have one or more input terminals and one or more output terminals. We use the function In(1, X1) to denote the first input terminal for gate X1. A similar function Out is used for output terminals. The function Arity(c, i, j) says that circuit c has i input and j output terminals.  The connectivity between gates can be represented by a predicate, Connected, which takes two terminals as arguments, as in Connected(Out(1, X1),In(1, X2)).  Finally, we need to know whether a signal is on or off. We therefore introduce as objects two signal values, 1 and 0, and a function Signal(t) that denotes the signal value for the terminal t.
  • 7. Encode general knowledge of the domain These are all the axioms we will need: 1. If two terminals are connected, then they have the same signal: ∀ t1, t2 Terminal(t1) ∧ Terminal(t2) ∧ Connected(t1, t2) ⇒ Signal(t1) = Signal(t2) 2. The signal at every terminal is either 1 or 0: ∀ t Terminal(t) ⇒ Signal(t)=1 ∨ Signal(t)=0 . 3. Connected is commutative: ∀ t1, t2 Connected(t1, t2) ⇔ Connected(t2, t1) . 4. There are four types of gates: ∀ g Gate(g) ∧ k = Type(g) ⇒ k = AND ∨ k = OR ∨ k = XOR ∨ k = NOT . 5. An AND gate’s output is 0 if and only if any of its inputs is 0: ∀ g Gate(g) ∧ Type(g) = AND ⇒ Signal(Out(1, g)) = 0 ⇔ ∃ n Signal(In(n, g)) = 0 . 6. An OR gate’s output is 1 if and only if any of its inputs is 1: ∀ g Gate(g) ∧ Type(g) = OR ⇒ Signal(Out(1, g)) = 1 ⇔ ∃ n Signal(In(n, g)) = 1 .
  • 8. Encode general knowledge of the domain 7. An XOR gate’s output is 1 if and only if its inputs are different: ∀ g Gate(g) ∧ Type(g) = XOR ⇒ Signal(Out(1, g)) = 1 ⇔ Signal(In(1, g)) ≠ Signal(In(2, g)) . 8. A NOT gate’s output is different from its input: ∀ g Gate(g) ∧ (Type(g) = NOT) ⇒ Signal(Out(1, g)) ≠ Signal(In(1, g)) . 9. The gates (except for NOT) have two inputs and one output. ∀ g Gate(g) ∧ Type(g) = NOT ⇒ Arity(g, 1, 1) . ∀ g Gate(g) ∧ k = Type(g) ∧ (k = AND ∨ k = OR ∨ k = XOR) ⇒ Arity(g, 2, 1) 10. A circuit has terminals, up to its input and output arity, and nothing beyond its arity: ∀ c, i, j Circuit(c) ∧ Arity(c, i, j) ⇒ ∀ n (n ≤ i ⇒ Terminal(In(c, n))) ∧ (n>i ⇒ In(c, n) = Nothing) ∧ ∀ n (n ≤ j ⇒ Terminal(Out(c, n))) ∧ (n>j ⇒ Out(c, n) = Nothing) 11. Gates, terminals, signals, gate types, and Nothing are all distinct. ∀ g, t Gate(g) ∧ Terminal(t) ⇒ g ≠ t ≠ 1 ≠ 0 ≠ OR ≠ AND ≠ XOR ≠ NOT ≠ Nothing . 12. Gates are circuits. ∀ g Gate(g) ⇒ Circuit(g)
  • 9. Encode the specific problem instance Circuit C1 with the following description.  First, we categorize the circuit and its component gates: Circuit(C1) ∧ Arity(C1, 3, 2) Gate(X1) ∧ Type(X1) = XOR Gate(X2) ∧ Type(X2) = XOR Gate(A1) ∧ Type(A1) = AND Gate(A2) ∧ Type(A2) = AND Gate(O1) ∧ Type(O1) = OR  Then, we show the connections between them: Connected(Out(1, X1),In(1, X2)) Connected(In(1, C1),In(1, X1)) Connected(Out(1, X1),In(2, A2)) Connected(In(1, C1),In(1, A1)) Connected(Out(1, A2),In(1, O1)) Connected(In(2, C1),In(2, X1)) Connected(Out(1, A1),In(2, O1)) Connected(In(2, C1),In(2, A1)) Connected(Out(1, X2), Out(1, C1)) Connected(In(3, C1),In(2, X2)) Connected(Out(1, O1), Out(2, C1)) Connected(In(3, C1),In(1, A2))
  • 10. Pose queries to the inference procedure  In this step we will find all the possible sets of values of all the terminals for the adder circuit.  What combinations of inputs would cause the first output of C1 (the sum bit) to be 0 and the second output of C1 (the carry bit) to be 1?  ∃ i1, i2, i3 Signal(In(1, C1)) = i1 ∧ Signal(In(2, C1)) = i2 ∧ Signal(In(3, C1)) = i3 ∧ Signal(Out(1, C1)) = 0 ∧ Signal(Out(2, C1)) = 1 .  This is a simple example of circuit verification.
  • 11. Debug the knowledge base  We can perturb the knowledge base in various ways to see what kinds of erroneous behaviours emerge.  For example, suppose we forget to assert that 1 ≠ 0. Suddenly, the system will be unable to prove any outputs for the circuit, except for the input cases 000 and 110. We can pinpoint the problem by asking for the outputs of each gate. Developing a knowledge base in first-order logic requires a careful process of analyzing the domain, choosing a vocabulary, and encoding the axioms required to support the desired inferences.
  • 12. Thanks For Watching Reference: Artificial Intelligence A Modern Approach Third Edition Peter Norvig and Stuart J. Russell Subscribe Like Share Thanks for watching
  • 13. If you have a question, you can reach me via e-mail at omega.teched@gmail.com Social Media Handles: omega.teched megha_with megha-sharma24 OMega TechEd