SlideShare a Scribd company logo
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
COMPUTATIONAL LOGIC
Dr.J.Faritha Banu
SRM IST- Ramapuram
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Topics Covered in this Presentation are
First Order Logic
Syntax of FL - Alphabet of FL
Well formed Formula
Symbolization of FL
Argument – FL
Parse Tree
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
First Order Logic
 Every statement in predicate logic or first order logic is divided into 2 parts. 1. Subject 2. Predicate
 Example: x is a integer, In this statement x is a subject and is a integer – predicate
 Predicate: properties of an subject which are neither true nor false until the value of the variable is
specified.
 Example: If a positive integer is a perfect square and less than four, then it must be equal to one.
 We may rewrite it as: For each x, if x is a positive integer less than four, and if there exists a positive
integer y such that x is equal to the square of y, then x is equal to one.
 For symbolizing this sentence, we require quantifiers ‘for each’, and ‘there exists’; predicates ‘is a
positive integer’, ‘is less than’, and ‘is equal to’; function symbol ‘square of’; constants ‘four’ and
‘one’, and the variables x,y.
 The logic obtained by extending PL and including these types of symbols is called first order logic
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Syntax of FL - Alphabet of FL
{⊤ ,⊥}, the set of propositional constants,
{ f i
j : i, j ∈ N}, the set of function symbols,
{ f i
j : i, j ∈ N}, ∪{≈}, the set of predicates,
{x0,x1,x2, . . .}, the set of variables,
{¬,∧,∨,→,↔}, the set of connectives,
{∀,∃}, the set of quantifiers, and
{), (, , }, the set of punctuation marks.
The symbol ∀ is called the universal quantifier and the symbol ∃ is called the
existential quantifier.
Any string over the alphabet of FL is an expression (an FL-expression)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Syntax of FL - Alphabet of FL
First-order logic (like natural language) assumes the world
contains: variable Relations, Functions{∀,∃}, the set of
quantifiers, and
Variables : people, houses, numbers, theories, colors, football games,
wars, centuries
Relations: red, round, multistoried , brother of, bigger than, inside,
part of, has color, occurred after, owns, comes between,
Functions: father of, best friend, second half of, one more than,
beginning of
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Well formed Formula
The following is an inductive definition of terms.,
𝑡 ∷= 𝑥𝑖|𝑓𝑖
0
|𝑓𝑖
𝑗
𝑡, 𝑡, … 𝑡 (j times t), where t is a generic term.
We will use terms for defining the (well-formed) formulas. Writing X for a generic
formula, x for a generic variable, and t for a generic term, the grammar for formulas
is:
X ∷= ⊤| ⊥ | (s≈ t) | 𝑃𝑖
0
| 𝑃𝑖
𝑚
(t1, t2, . . . , tm) | ¬X | (X ∧ X) | (X ∨ X) | (X → X)
|(X ↔ X) | ∀xiX | ∃xiX
The formulas in the forms ⊤, ⊥, P i
0 , (s ≈ t), and P i
m (t1, t2, . . . , tm) are called
atomic formulas; and other formulas are called compound formulas.
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
WFF
 The following expressions are formulas:
⊤,
⊥ → ⊤
(f1
0
≈ f5
0
)
P2
1
(f1
1
(x5))
∀x1((P2
1
(f1
1
(x5))
∀x2∃x5(P5
2
(x0, f1
1
(x1)) ↔ P1
3
(x1, x2, x6))
¬∀x1(P5
2
(𝑓1
1
(x2), x3))
 Whereas the following expressions are not formulas:
⊤(x0) - ⊤ , a variable is not allowed to occur in parentheses
𝑓1
0
≈ 𝑓5
0
- formula since ≈ needs a pair of parentheses
𝑓1
0
(𝑓5
0
) - 𝑓1
0
is a 0-ary function symbol and it cannot take an argument.
¬∀x1(P5
2
(𝑓1
0
(x2), x3))
∀x2∃x5(P5
2
(x0, f1
0
(x1)) ↔ P1
3
(x1, x2, x6))
∀x1((P2
1
(f1
2
(x5))
P2
(f1
(x ))
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Usage reduction of parenthesis and subscripts
Drop the outer parentheses from formulas.
Drop the superscripts from the predicates and function symbols
Drop writing subscripts with variables, function symbols and predicates whenever
possible
Omit the parentheses and commas in writing the arguments of function symbols and
predicates provided no confusion arises.
Have precedence rules for the connectives and quantifiers to reduce parentheses
 precedence rules are same as propositional logic with ¬, ∀ , ∃ are equal precedence
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Usage reduction of parenthesis and subscripts
P, Q, R …… as predicates
x, y, z…………….as variables
a , b, c ………… as constants
Example : ∀x2∃x5(P4(x0, f1(x1)) ↔ P1(x2, x5, x1))
∀x∃y(P(z, f(u)) ↔ Q(x, y, u))
∀x∃y(Pzf(u) ↔ Qxyu)
∀x∃y(Pzfu ↔ Qxyu)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Symbolize
Define 𝐿(𝑥) to mean “x is a lecturer”. (unary predicate)
 Alice is a lecturer: 𝐿(Alice)
 Mickey Mouse is not a lecturer: (¬𝐿(Mickey Mouse))
 𝑦 is a lecturer: 𝐿(𝑦)
Define 𝑂(𝑥, 𝑦) to mean “x is older than y”. (binary predicate/relation)
 Alex is older than Sam: 𝑂(Alex, Sam)
 𝑎 is older than 𝑏: 𝑂(𝑎, 𝑏)
Quantifiers
 The universal quantifier ∀: the statement is true for every object in the domain.
 The existential quantifier ∃: the statement is true for one or more objects in the domain.
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Symbolize
All men like cake and pie .
Mx : x is a men Lxc : x likes cake Lxp : x like pie
∀ x ( Mx → (Lxc ∧ Lxp))
All dogs are blue
Dx : X is a dog Bx : x is blue
∀ x ( Dx → Bx)
Some Dogs are blue
Dx : X is a dog Bx : x is blue
∃x (Dx ∧ Bx)
Some men like cake and pie .
Mx : x is a men Lxc : x likes cake Lxp : x like pie
∃x (Mx (Lxc ∧ Lxp))
Such an assignment l, which associates variables to elements of the universe or domain of an
interpretation is called a valuation (or a variable assignment function).
X isdog
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Argument – FL
Bapuji was a saint. Since every saint is an altruist, Therefore was Bapuji was an altruist
Symbolizing in PL
b: Bapuji
Sx: X is an saint
Ax: X is an altruist
Ans : Sb - Bapuji was a saint
 Sb, ∀x (Sx→Ax) ⊨ Ab
Everyone has a father
 Rewrite the sentence as
 Each person, there exists a person who is his father
 Fxy : x is father of y
 Hx: x is a person
 ∀x (Hx → ∃y Fyx)
(for each person x, there exists a person y, y is father of x.)
 ∀x ∃y ( Hx ∧ Fyx) - is not correct way. (Wrong)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Argument – FL
If two persons fight over a third one’s property, then the third one gains.
 Fxyz : x and y fight over z
 Gz : z gains
 p(z) : property of z
 ∀x ∀y ∀z(Fxy p(z) → Gz).
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Exercise on Symbolize
1. “Every student in this class has taken a course in Java.
J(x) denoting “x has taken a course in Java” S(x) denoting “x is a student in this class”
translation is : ∀x (S(x)→ J(x))
or ∀x (Sx→ Jx)
2. “Some student in this class has taken a course in Java.”
∃x (S(x) ∧ J(x))
3. “Some student in this class has visited Mexico.”
Let M(x) denote “x has visited Mexico” and S(x) denote “x is a student in this class,” and U
be all people.
∃x (S(x) ∧ M(x))
4. “Every student in this class has visited Canada or Mexico.”
∀x ((Sx)→ (M(x) ∨ C(x) ))
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Exercise on Symbolize
• “Every house is a physical object”
• “Some physical objects are houses”
• ”Every house has an owner” or, equivalently, “every house is owned by somebody”
• Everybody owns a house”
• “Sue owns a house”
• “Peter does not own a house”
• “Somebody does not own a house”
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Exercise on Symbolize
• “Every house is a physical object” - ∀x(H(x) → PO(x)),
• “Some physical objects are houses” ∃x(PO(x) ∧ H(x))
• ”Every house has an owner” or, equivalently, “every house is owned by somebody”
∀x(H(x) → ∃yO(y, x))
• Everybody owns a house” ∀x∃y(O(x, y) ∧ H(y))
• “Sue owns a house” ∃x(O(Sue, x) ∧ H(x))
• “Peter does not own a house” ¬∃x(O(Peter, x) ∧ H(x))
• “Somebody does not own a house” ∃x∀y(O(x, y) → ¬H(y))
• (Reference : why ∀x use →, ∃x use ∧ https://www.youtube.com/watch?v=h5UTvdcgFHw)
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Parse Tree
P, Q, R …… as predicates
New elements in the parse tree:
 Quantifiers ∀𝑥 and ∃𝑦 have one subtree, similar to the unary connective negation.
 A predicate symbol 𝑃 (𝑡1, 𝑡2, … , 𝑡𝑛) has a node labelled 𝑃 with a sub-tree for each
of the terms 𝑡1, 𝑡2, … , 𝑡𝑛.
A function symbol 𝑓(𝑡1, 𝑡2, … , 𝑡𝑛) has a node labelled 𝑓 with a sub-tree for each of
the terms 𝑡1, 𝑡2, … , 𝑡𝑛.a , b, c ………… as constants
Parse tree for Example 1: ((∀𝑥 (𝑃 (𝑥) ∧ 𝑄(𝑥))) → (¬𝑃 (𝑓(𝑥, 𝑦)) ∨ 𝑄(𝑦)))
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
Parse Tree
 Parse tree for Example 1: ((∀𝑥 (𝑃 (𝑥) ∧ 𝑄(𝑥))) → (¬𝑃 (𝑓(𝑥, 𝑦)) ∨ 𝑄(𝑦)))
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
RAMAPURAM CAMPUS, CHENNAI-600 089
References
1. Arindama Singh," Logics for Computer Science", PHI Learning Private
Ltd,2nd Edition, 2018
2. Wasilewska & Anita, "Logics for computer science: classical and non-
classical", Springer, 2018
3. Huth M and Ryan M, Logic in Computer Science: Modeling and Reasoning
about systems‖, Cambridge University Press, 2005
4. Dana Richards & Henry Hamburger, "Logic And Language Models For
Computer Science", Third Edition, World Scientific Publishing Co. Pte.
Ltd,2018
Computational logic First Order Logic

More Related Content

What's hot

Probability Formula sheet
Probability Formula sheetProbability Formula sheet
Probability Formula sheet
Haris Hassan
 
Complex function
Complex functionComplex function
Complex function
Shrey Patel
 
Real Analysis 2 Presentation (M.Sc Math)
Real Analysis 2 Presentation (M.Sc Math)Real Analysis 2 Presentation (M.Sc Math)
Real Analysis 2 Presentation (M.Sc Math)
Mary Smith
 
Integral Domains
Integral DomainsIntegral Domains
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)
Ikhtiar Khan Sohan
 
Control Synthesis by Sum of Squares Optimization
Control Synthesis by Sum of Squares OptimizationControl Synthesis by Sum of Squares Optimization
Control Synthesis by Sum of Squares OptimizationBehzad Samadi
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrences
Waqas Akram
 
Regular Grammar
Regular GrammarRegular Grammar
Regular Grammar
Ruchika Sinha
 
Power series & Radius of convergence
Power series & Radius of convergencePower series & Radius of convergence
Power series & Radius of convergence
Dhruv Darji
 
Fourier series
Fourier series Fourier series
Fourier series
Pinky Chaudhari
 
Lagrange equation and its application
Lagrange equation and its applicationLagrange equation and its application
Lagrange equation and its application
Mahmudul Alam
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceasimnawaz54
 
fourier series
fourier seriesfourier series
fourier series8laddu8
 
Numerical analysis ppt
Numerical analysis pptNumerical analysis ppt
Numerical analysis ppt
MalathiNagarajan20
 
Hopf Bifurcations and nonlinear dynamics
Hopf Bifurcations and nonlinear dynamicsHopf Bifurcations and nonlinear dynamics
Hopf Bifurcations and nonlinear dynamics
elliptic1
 
Generating functions
Generating functionsGenerating functions
Generating functions
sweetysweety8
 
Flat unit 3
Flat unit 3Flat unit 3
Flat unit 3
VenkataRaoS1
 
Eigen value and eigen vector
Eigen value and eigen vectorEigen value and eigen vector
Eigen value and eigen vector
Rutvij Patel
 
Leaner algebra presentation (ring)
Leaner algebra presentation (ring)Leaner algebra presentation (ring)
Leaner algebra presentation (ring)
Muhammad Umar Farooq
 

What's hot (20)

Probability Formula sheet
Probability Formula sheetProbability Formula sheet
Probability Formula sheet
 
Complex function
Complex functionComplex function
Complex function
 
Real Analysis 2 Presentation (M.Sc Math)
Real Analysis 2 Presentation (M.Sc Math)Real Analysis 2 Presentation (M.Sc Math)
Real Analysis 2 Presentation (M.Sc Math)
 
Integral Domains
Integral DomainsIntegral Domains
Integral Domains
 
Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)Discrete Math Presentation(Rules of Inference)
Discrete Math Presentation(Rules of Inference)
 
Control Synthesis by Sum of Squares Optimization
Control Synthesis by Sum of Squares OptimizationControl Synthesis by Sum of Squares Optimization
Control Synthesis by Sum of Squares Optimization
 
Solving recurrences
Solving recurrencesSolving recurrences
Solving recurrences
 
Topdown parsing
Topdown parsingTopdown parsing
Topdown parsing
 
Regular Grammar
Regular GrammarRegular Grammar
Regular Grammar
 
Power series & Radius of convergence
Power series & Radius of convergencePower series & Radius of convergence
Power series & Radius of convergence
 
Fourier series
Fourier series Fourier series
Fourier series
 
Lagrange equation and its application
Lagrange equation and its applicationLagrange equation and its application
Lagrange equation and its application
 
Lecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inferenceLecture 2 predicates quantifiers and rules of inference
Lecture 2 predicates quantifiers and rules of inference
 
fourier series
fourier seriesfourier series
fourier series
 
Numerical analysis ppt
Numerical analysis pptNumerical analysis ppt
Numerical analysis ppt
 
Hopf Bifurcations and nonlinear dynamics
Hopf Bifurcations and nonlinear dynamicsHopf Bifurcations and nonlinear dynamics
Hopf Bifurcations and nonlinear dynamics
 
Generating functions
Generating functionsGenerating functions
Generating functions
 
Flat unit 3
Flat unit 3Flat unit 3
Flat unit 3
 
Eigen value and eigen vector
Eigen value and eigen vectorEigen value and eigen vector
Eigen value and eigen vector
 
Leaner algebra presentation (ring)
Leaner algebra presentation (ring)Leaner algebra presentation (ring)
Leaner algebra presentation (ring)
 

Similar to Computational logic First Order Logic

Fuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important resultsFuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important results
inventionjournals
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
smarwaneid
 
FOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptxFOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptx
Faiz Zeya
 
Proba stats-r1-2017
Proba stats-r1-2017Proba stats-r1-2017
Proba stats-r1-2017
Arthur Charpentier
 
Basic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptBasic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.ppt
AshfaqAhmed693399
 
Per3 logika
Per3 logikaPer3 logika
The Chase in Database Theory
The Chase in Database TheoryThe Chase in Database Theory
The Chase in Database Theory
Jan Hidders
 
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptdfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
NobitaNobi489694
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic#4 formal methods – predicate logic
#4 formal methods – predicate logic
Sharif Omar Salem
 
Potentialist reflection
Potentialist reflectionPotentialist reflection
Potentialist reflectionjamesstudd
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
MuhammadUmerIhtisham
 
Lecture 2 fuzzy inference system
Lecture 2  fuzzy inference systemLecture 2  fuzzy inference system
Lecture 2 fuzzy inference system
ParveenMalik18
 
Polynomials
PolynomialsPolynomials
Polynomials
VivekNaithani3
 
Presentation of Polynomial
Presentation of PolynomialPresentation of Polynomial
Presentation of Polynomial
RajatUpadhyay20
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - Introduction
Charles Deledalle
 
Concentration inequality in Machine Learning
Concentration inequality in Machine LearningConcentration inequality in Machine Learning
Concentration inequality in Machine Learning
VARUN KUMAR
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
blaircomp2003
 
On Spaces of Entire Functions Having Slow Growth Represented By Dirichlet Series
On Spaces of Entire Functions Having Slow Growth Represented By Dirichlet SeriesOn Spaces of Entire Functions Having Slow Growth Represented By Dirichlet Series
On Spaces of Entire Functions Having Slow Growth Represented By Dirichlet Series
IOSR Journals
 

Similar to Computational logic First Order Logic (20)

Fuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important resultsFuzzy random variables and Kolomogrov’s important results
Fuzzy random variables and Kolomogrov’s important results
 
Chapter 01 - p2.pdf
Chapter 01 - p2.pdfChapter 01 - p2.pdf
Chapter 01 - p2.pdf
 
FOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptxFOLBUKCFAIZ.pptx
FOLBUKCFAIZ.pptx
 
3 fol examples v2
3 fol examples v23 fol examples v2
3 fol examples v2
 
Proba stats-r1-2017
Proba stats-r1-2017Proba stats-r1-2017
Proba stats-r1-2017
 
Basic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.pptBasic Knowledge Representation in First Order Logic.ppt
Basic Knowledge Representation in First Order Logic.ppt
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
The Chase in Database Theory
The Chase in Database TheoryThe Chase in Database Theory
The Chase in Database Theory
 
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.pptdfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
dfgsdfdsgdfgfdgdrgdfgffdhyrthfgnhgjhgdfs.ppt
 
#4 formal methods – predicate logic
#4 formal methods – predicate logic#4 formal methods – predicate logic
#4 formal methods – predicate logic
 
Potentialist reflection
Potentialist reflectionPotentialist reflection
Potentialist reflection
 
Discrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdfDiscrete Structure Lecture #5 & 6.pdf
Discrete Structure Lecture #5 & 6.pdf
 
Lecture 2 fuzzy inference system
Lecture 2  fuzzy inference systemLecture 2  fuzzy inference system
Lecture 2 fuzzy inference system
 
Polynomials
PolynomialsPolynomials
Polynomials
 
Module_5_1.pptx
Module_5_1.pptxModule_5_1.pptx
Module_5_1.pptx
 
Presentation of Polynomial
Presentation of PolynomialPresentation of Polynomial
Presentation of Polynomial
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - Introduction
 
Concentration inequality in Machine Learning
Concentration inequality in Machine LearningConcentration inequality in Machine Learning
Concentration inequality in Machine Learning
 
Predicates and Quantifiers
Predicates and QuantifiersPredicates and Quantifiers
Predicates and Quantifiers
 
On Spaces of Entire Functions Having Slow Growth Represented By Dirichlet Series
On Spaces of Entire Functions Having Slow Growth Represented By Dirichlet SeriesOn Spaces of Entire Functions Having Slow Growth Represented By Dirichlet Series
On Spaces of Entire Functions Having Slow Growth Represented By Dirichlet Series
 

Recently uploaded

Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 

Recently uploaded (20)

Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 

Computational logic First Order Logic

  • 1. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 COMPUTATIONAL LOGIC Dr.J.Faritha Banu SRM IST- Ramapuram
  • 2. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Topics Covered in this Presentation are First Order Logic Syntax of FL - Alphabet of FL Well formed Formula Symbolization of FL Argument – FL Parse Tree
  • 3. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 First Order Logic  Every statement in predicate logic or first order logic is divided into 2 parts. 1. Subject 2. Predicate  Example: x is a integer, In this statement x is a subject and is a integer – predicate  Predicate: properties of an subject which are neither true nor false until the value of the variable is specified.  Example: If a positive integer is a perfect square and less than four, then it must be equal to one.  We may rewrite it as: For each x, if x is a positive integer less than four, and if there exists a positive integer y such that x is equal to the square of y, then x is equal to one.  For symbolizing this sentence, we require quantifiers ‘for each’, and ‘there exists’; predicates ‘is a positive integer’, ‘is less than’, and ‘is equal to’; function symbol ‘square of’; constants ‘four’ and ‘one’, and the variables x,y.  The logic obtained by extending PL and including these types of symbols is called first order logic
  • 4. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Syntax of FL - Alphabet of FL {⊤ ,⊥}, the set of propositional constants, { f i j : i, j ∈ N}, the set of function symbols, { f i j : i, j ∈ N}, ∪{≈}, the set of predicates, {x0,x1,x2, . . .}, the set of variables, {¬,∧,∨,→,↔}, the set of connectives, {∀,∃}, the set of quantifiers, and {), (, , }, the set of punctuation marks. The symbol ∀ is called the universal quantifier and the symbol ∃ is called the existential quantifier. Any string over the alphabet of FL is an expression (an FL-expression)
  • 5. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Syntax of FL - Alphabet of FL First-order logic (like natural language) assumes the world contains: variable Relations, Functions{∀,∃}, the set of quantifiers, and Variables : people, houses, numbers, theories, colors, football games, wars, centuries Relations: red, round, multistoried , brother of, bigger than, inside, part of, has color, occurred after, owns, comes between, Functions: father of, best friend, second half of, one more than, beginning of
  • 6. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Well formed Formula The following is an inductive definition of terms., 𝑡 ∷= 𝑥𝑖|𝑓𝑖 0 |𝑓𝑖 𝑗 𝑡, 𝑡, … 𝑡 (j times t), where t is a generic term. We will use terms for defining the (well-formed) formulas. Writing X for a generic formula, x for a generic variable, and t for a generic term, the grammar for formulas is: X ∷= ⊤| ⊥ | (s≈ t) | 𝑃𝑖 0 | 𝑃𝑖 𝑚 (t1, t2, . . . , tm) | ¬X | (X ∧ X) | (X ∨ X) | (X → X) |(X ↔ X) | ∀xiX | ∃xiX The formulas in the forms ⊤, ⊥, P i 0 , (s ≈ t), and P i m (t1, t2, . . . , tm) are called atomic formulas; and other formulas are called compound formulas.
  • 7. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 WFF  The following expressions are formulas: ⊤, ⊥ → ⊤ (f1 0 ≈ f5 0 ) P2 1 (f1 1 (x5)) ∀x1((P2 1 (f1 1 (x5)) ∀x2∃x5(P5 2 (x0, f1 1 (x1)) ↔ P1 3 (x1, x2, x6)) ¬∀x1(P5 2 (𝑓1 1 (x2), x3))  Whereas the following expressions are not formulas: ⊤(x0) - ⊤ , a variable is not allowed to occur in parentheses 𝑓1 0 ≈ 𝑓5 0 - formula since ≈ needs a pair of parentheses 𝑓1 0 (𝑓5 0 ) - 𝑓1 0 is a 0-ary function symbol and it cannot take an argument. ¬∀x1(P5 2 (𝑓1 0 (x2), x3)) ∀x2∃x5(P5 2 (x0, f1 0 (x1)) ↔ P1 3 (x1, x2, x6)) ∀x1((P2 1 (f1 2 (x5)) P2 (f1 (x ))
  • 8. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Usage reduction of parenthesis and subscripts Drop the outer parentheses from formulas. Drop the superscripts from the predicates and function symbols Drop writing subscripts with variables, function symbols and predicates whenever possible Omit the parentheses and commas in writing the arguments of function symbols and predicates provided no confusion arises. Have precedence rules for the connectives and quantifiers to reduce parentheses  precedence rules are same as propositional logic with ¬, ∀ , ∃ are equal precedence
  • 9. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Usage reduction of parenthesis and subscripts P, Q, R …… as predicates x, y, z…………….as variables a , b, c ………… as constants Example : ∀x2∃x5(P4(x0, f1(x1)) ↔ P1(x2, x5, x1)) ∀x∃y(P(z, f(u)) ↔ Q(x, y, u)) ∀x∃y(Pzf(u) ↔ Qxyu) ∀x∃y(Pzfu ↔ Qxyu)
  • 10. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Symbolize Define 𝐿(𝑥) to mean “x is a lecturer”. (unary predicate)  Alice is a lecturer: 𝐿(Alice)  Mickey Mouse is not a lecturer: (¬𝐿(Mickey Mouse))  𝑦 is a lecturer: 𝐿(𝑦) Define 𝑂(𝑥, 𝑦) to mean “x is older than y”. (binary predicate/relation)  Alex is older than Sam: 𝑂(Alex, Sam)  𝑎 is older than 𝑏: 𝑂(𝑎, 𝑏) Quantifiers  The universal quantifier ∀: the statement is true for every object in the domain.  The existential quantifier ∃: the statement is true for one or more objects in the domain.
  • 11. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Symbolize All men like cake and pie . Mx : x is a men Lxc : x likes cake Lxp : x like pie ∀ x ( Mx → (Lxc ∧ Lxp)) All dogs are blue Dx : X is a dog Bx : x is blue ∀ x ( Dx → Bx) Some Dogs are blue Dx : X is a dog Bx : x is blue ∃x (Dx ∧ Bx) Some men like cake and pie . Mx : x is a men Lxc : x likes cake Lxp : x like pie ∃x (Mx (Lxc ∧ Lxp)) Such an assignment l, which associates variables to elements of the universe or domain of an interpretation is called a valuation (or a variable assignment function). X isdog
  • 12. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Argument – FL Bapuji was a saint. Since every saint is an altruist, Therefore was Bapuji was an altruist Symbolizing in PL b: Bapuji Sx: X is an saint Ax: X is an altruist Ans : Sb - Bapuji was a saint  Sb, ∀x (Sx→Ax) ⊨ Ab Everyone has a father  Rewrite the sentence as  Each person, there exists a person who is his father  Fxy : x is father of y  Hx: x is a person  ∀x (Hx → ∃y Fyx) (for each person x, there exists a person y, y is father of x.)  ∀x ∃y ( Hx ∧ Fyx) - is not correct way. (Wrong)
  • 13. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Argument – FL If two persons fight over a third one’s property, then the third one gains.  Fxyz : x and y fight over z  Gz : z gains  p(z) : property of z  ∀x ∀y ∀z(Fxy p(z) → Gz).
  • 14. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Exercise on Symbolize 1. “Every student in this class has taken a course in Java. J(x) denoting “x has taken a course in Java” S(x) denoting “x is a student in this class” translation is : ∀x (S(x)→ J(x)) or ∀x (Sx→ Jx) 2. “Some student in this class has taken a course in Java.” ∃x (S(x) ∧ J(x)) 3. “Some student in this class has visited Mexico.” Let M(x) denote “x has visited Mexico” and S(x) denote “x is a student in this class,” and U be all people. ∃x (S(x) ∧ M(x)) 4. “Every student in this class has visited Canada or Mexico.” ∀x ((Sx)→ (M(x) ∨ C(x) ))
  • 15. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Exercise on Symbolize • “Every house is a physical object” • “Some physical objects are houses” • ”Every house has an owner” or, equivalently, “every house is owned by somebody” • Everybody owns a house” • “Sue owns a house” • “Peter does not own a house” • “Somebody does not own a house”
  • 16. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Exercise on Symbolize • “Every house is a physical object” - ∀x(H(x) → PO(x)), • “Some physical objects are houses” ∃x(PO(x) ∧ H(x)) • ”Every house has an owner” or, equivalently, “every house is owned by somebody” ∀x(H(x) → ∃yO(y, x)) • Everybody owns a house” ∀x∃y(O(x, y) ∧ H(y)) • “Sue owns a house” ∃x(O(Sue, x) ∧ H(x)) • “Peter does not own a house” ¬∃x(O(Peter, x) ∧ H(x)) • “Somebody does not own a house” ∃x∀y(O(x, y) → ¬H(y)) • (Reference : why ∀x use →, ∃x use ∧ https://www.youtube.com/watch?v=h5UTvdcgFHw)
  • 17. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Parse Tree P, Q, R …… as predicates New elements in the parse tree:  Quantifiers ∀𝑥 and ∃𝑦 have one subtree, similar to the unary connective negation.  A predicate symbol 𝑃 (𝑡1, 𝑡2, … , 𝑡𝑛) has a node labelled 𝑃 with a sub-tree for each of the terms 𝑡1, 𝑡2, … , 𝑡𝑛. A function symbol 𝑓(𝑡1, 𝑡2, … , 𝑡𝑛) has a node labelled 𝑓 with a sub-tree for each of the terms 𝑡1, 𝑡2, … , 𝑡𝑛.a , b, c ………… as constants Parse tree for Example 1: ((∀𝑥 (𝑃 (𝑥) ∧ 𝑄(𝑥))) → (¬𝑃 (𝑓(𝑥, 𝑦)) ∨ 𝑄(𝑦)))
  • 18. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 Parse Tree  Parse tree for Example 1: ((∀𝑥 (𝑃 (𝑥) ∧ 𝑄(𝑥))) → (¬𝑃 (𝑓(𝑥, 𝑦)) ∨ 𝑄(𝑦)))
  • 19. SRM INSTITUTE OF SCIENCE AND TECHNOLOGY RAMAPURAM CAMPUS, CHENNAI-600 089 References 1. Arindama Singh," Logics for Computer Science", PHI Learning Private Ltd,2nd Edition, 2018 2. Wasilewska & Anita, "Logics for computer science: classical and non- classical", Springer, 2018 3. Huth M and Ryan M, Logic in Computer Science: Modeling and Reasoning about systems‖, Cambridge University Press, 2005 4. Dana Richards & Henry Hamburger, "Logic And Language Models For Computer Science", Third Edition, World Scientific Publishing Co. Pte. Ltd,2018