4/20/24, 5:32 PM Class+Exercises+on+Predicate+Logic+Memo
CMPG 313 Class Exercises
Translate the following syllogistic sentences into predicate logic form
1. All A are B
Soln:
∀𝑥(𝐴(𝑥) → 𝐵(𝑥))
2. No A are B
Soln:
¬∃𝑥(𝐴(𝑥) → 𝑏(𝑥)) or this can also be written as ∀𝑥(𝐴(𝑥) → ¬𝐵(𝑥))
3. Some A are B
Soln:
∃𝑥(𝐴(𝑥) ∧ 𝐵(𝑥))
4. Not all A are B
Soln:
¬∀𝑥(𝐴(𝑥) → 𝐵(𝑥)
5. Some A are B
Soln:
∃𝑥(𝐴(𝑥) ∧ ¬𝐵(𝑥))
Difference between Predicate Logic and Propositional Logic
1. What are the limitation of Predicate logic or First-order logic?
Ans: First-order logic is a powerful language but, as all mathematical
notations, has its weaknesses. For example,
• Predicate logic fails to explain Vague predicates, sentences like ‘this
sentence is false’, future contingent sentences (like there will be a sea
battel tomorrow).
• With predicate logic, it is impossible to define finiteness or countability.
• Any relation which is symmetric and transitive may not be reflexive is
not expressible in predicate logic.
• It is not possible to express reachability in graphs.
about:blank 1/4
4/20/24, 5:32 PM Class+Exercises+on+Predicate+Logic+Memo
• Predicate logic does not include types into the notation itself. Although
one can provide such information using the notation available in predicate
logic, but expressions become more complex.
2. Give five (5) difference between predicate logic and propositional logic
Soln: Already answered in class (See class video on eFundi)
Translation and general form of Predicate expression
1. Briefly explain what is a sentence in predicate logic and then identify which
of the following are sentences in predicate logic
i) Bought (Alex, book)
Soln: This is not a sentence because it has free variable
ii) x=x
Soln: This is not a sentence in predicate logic
iii) ∀𝑥(∃𝑦((𝑦 = 𝑥) → 𝑥 = 𝑦)
Soln:
This is a sentence because it has no free variables
iii) ∀𝑥∀𝑦(𝑥 = 𝑦 → ∀𝑧(𝑅(𝑥, 𝑦) → 𝑅(𝑦, 𝑧)))
Soln:
This is also a sentence
2. Consider the following sentences:
• Prince is a mega star.
• Mega stars are rich.
• Rich people have fast cars.
• Fast cars consume a lot of petrol
ii) Express the above sentences into their predicate forms
Soln:
x: prince
y: megastar
about:blank 2/4
4/20/24, 5:32 PM Class+Exercises+on+Predicate+Logic+Memo
about:blank 3/4
4/20/24, 5:32 PM Class+Exercises+on+Predicate+Logic+Memo
The second occurrence of x is free, where as the variable y is bounded on both
occurrence.
iv) ∀𝑥(𝑅(𝑥, 𝑦) ∧ 𝑅(𝑦, 𝑧) → ∃𝑧(𝑆(𝑥, 𝑧) ∧ 𝑅(𝑧, 𝑦)))
Soln:
The variables y and z are free on first occurrence and then y is free on second
occurrence.
about:blank 4/4