AI Chapter Four Updated
AI Chapter Four Updated
• Knowledge base is a set of representation of facts and their relationships called rules
about the world.
• Each fact/rules are called sentences which is represented using a language called
knowledge representation language.
• Declarative approach to building an agent (or other system):
– Tell it what it needs to know (Knowledge base)
– Ask what it knows
• answers should follow from the KB
– Most AI systems are made up of two basic parts
Knowledge base: facts about objects in the chosen domain
Inference mechanism(engine): a set of procedures that are used to examine the
knowledge base in an orderly manner to answer questions, solve problems or make
decisions within the domain
Knowledge Bases Agent
The agent must be able to:
Represent states of the world, actions, etc.
Incorporate new percepts (facts and rules)
Update internal representations of the world
Deduce hidden properties of the world
Deduce appropriate actions
Example of KB written in PROLOG
FACTS
1. female(azieb).
2. male(melaku).
3. female(selam).
4. parent(melaku,selam).
5. parent(azieb,selam).
RULE
1. father(X,Y):-male(X),parent(X,Y).
2. mother(X,Y):-female(X),parent(X,Y).
3. wife(X,Y):-parent(X,Z),parent(Y,Z).
Example
The above example consider a world of human beings and their relationships (gender,
parent, etc). The complete representation of such information is state representation.
Agent should incorporate new percept like if necessary
father(Kebede, selam).
Mother(Tsehay, selam).
Male(kebede).
Agent should update internal representation of the world.
For example, if died(melaku) is given we should modify any fact that tells us about live
history about melaku.
The agent should deduce hidden portion of the world like azieb and selam are beautiful.
Deduce appropriate action to query.
For example, for the query is aster beautiful? The agent will say yes or no.
Knowledge representation
Knowledge representation refers to the technique how to express the available facts and
rules inside a computer so that agent will use it to perform well.
Knowledge representation consists of:
– Syntax (grammar): possible physical configuration that constitute a sentence (fact or
rule) inside the agent architecture.
• For example one possible syntax rule may be every sentence must end with full
stop.
– Semantics (concept): determine the facts in the world to which the sentence refers
• Without semantics a sentence is just a sequence of characters or binary
sequences
• Semantic defines the meaning of the sentence
Knowledge representation
E.g., In the language of arithmetic
– x+2 ≥ y is a sentence;
– x2+y > {} is not a sentence
– x+2 ≥ y is true iff the number x+2 is not less than the number y
– x+2 ≥ y is true in a world where x = 7, y = 1
– x+2 ≥ y is false in a world where x = 0, y = 6
Given clear definition of semantics and syntax of a language, we call that language:
logical language.
Knowledge representation is used to represent part of the world (facts and their
association) into ideal computer system
KB for agent program can be represented using programming language designed for
this purpose like LISP and PROLOG
What is Logic
- Logic is concerned with reasoning and the validity of arguments.
– In general, in logic, we are not concerned with the truth of statements, but rather
with their validity.
– That is to say, although the following argument is clearly logical, it is not something
that we would consider to be true:
All lemons are blue
Eleni is a lemon
– This set of statements is considered to be valid because the conclusion (Eleni is blue)
follows logically from the other two statements, which we often call the premises.
Logic
• Logic in AI is the key idea for KB design, KB representation and inferencing
(reasoning)
• Logic is formal languages use for representing information so that conclusions can be
drawn.
• Logic is the study of the principles of reasoning and arguments towards the truth of a
given conclusion given premises.
• Logic is the systematic study of the general conditions of valid inferences
Logic includes…
1. Formal system of defining the world
• Syntax
• Semantics
2. A proof theory:
– It is Rules for determining all entailments (given the hidden property of the world)
– A set of rules for deducing the entailment of a set of sentences.
Kinds of Logic
In mathematics there are different kinds of logics. Some of these according to order
of their generality are
Prepositional logic
Prepositional logic and its application will be discussed in this now then we will
discusse first order logic
First order logic can be used to design, represent or infer for any environment in the
real world.
Prepositional (Boolean) logic (PL)
Preposition is statement which is either true or false but not both at any time.
A statement is a sentence which is either true or false.
PL uses declarative sentences only
PL doesn’t involve quantifiers.
Not all sentences are statement (interrogatives, imperatives and exclamatory)
Preposition can be conditional or unconditional
Examples
Socrates is mortal
If the winter is severe, students will not succeed.
All are the same iff their color is black
In prepositional logic, symbols represent the whole preposition.
Examples:
M = Socrates is mortal, W = winter is sever, S = students will not succeed
Prepositional (Boolean) logic (PL)
Preposition symbols can be combined using Boolean connectives to generate new preposition
with complex meaning.
Symbols involved in PL:
– Logical constants (TRUE and FALSE)
– Preposition symbols (also called atomic symbols) like M, W, S
– Logical connectives (negation), (conjunction), (disjunction), (bi-implication or
equivalence), (implication) and parenthesis
Rules
– Logical constants and propositional symbols are sentence by them selves.
– Wrapping parenthesis around a sentence yield a sentence like (P V Q)
– Literal are atomic symbols or negated atomic symbols
– Complex sentence can be formed by combining simpler sentences with logical connectors
PL connector priority
Priority of logical connectives from highest to lowest
– Parenthesis
– Negation
– Conjunction
– Disjunction
– Implication
– Bi-implication
General principle of KB agent function
Types of sentence
Given a sentence α, this sentence according to the world considered can be
Valid (tautology)
Invalid (contradiction)
Satisfiable (neither valid nor invalid)
Unsatisfiable (equivalent to Invalid)
Validity (tautology)
A sentence is valid iff it is true under any interpretations in all possible world.
Proof methods: Truth -Tables and Inference Rules
Validity is connected to inference via the Deduction Theorem:
KB ╞ α if and only if (KB α)
Example:
x>4 or x<=4;
Water boils at 100 degree centigrade
Human has two legs (may not be valid)
Books have page number (may not be valid)
Satisfiablility
A sentence is satisfiable iff there is some interpretation in some world for which it is
true.
A set of sentences is satisfiable if there exists an interpretation in which every sentence
is true (it has at least one model).
Proof Methods: Truth-Tables
Every valid sentence is satisfiable
– Example: x+2 = 20
– Every student of AI are in their class
A sentence which is not satisfiable is unsatisfiable (contradiction).
Entailment
Entailment means that one thing follows from another:
It can be represented by ╞ symbol (double turnstyle)
KB ╞ α shows α can be entailed from KB
Knowledge base KB entails sentence α if and only if α is true in all worlds where KB is
true.
E.g., the KB containing “the Giants won” and “the Reds won” entails “Either the
Giants won or the Reds won”
E.g., x+y = 4 entails 4 = x+y
E.g., x+y = 4 entails x= 2 and y = 2
Entailment is a relationship between sentences (i.e., syntax) that is based on semantics
Inference Procedure
An inference procedure is a procedure used as reasoning engine.
It can do:
- Given KB, generate new sentence α that can be entailed by KB and we call the
inference procedure entail α
- Given KB and α, it will prove whether α is entailed by KB or not
KB ├i α means sentence α can be derived from KB by procedure i (|- is called
turnstyle or single turnstyle)
The record of operation of a sound inference procedure is called a proof
Inference Procedure property
Soundness: inference procedure i is said to be sound:
if whenever KB ├i α, it is also true that KB╞ α
Completeness: inference procedure i is said to be complete if whenever KB╞ α, it is also
true that KB ├i α
Soundness of an inference can be established through truth table
for example and inference procedure that entails P from a KB which consists of PQ
& Q is not sound as shown bellow
P Q PQ Remark
1 T T T Q, PQ, & P are true
2 T F F Premises doesn’t satisfied
3 F T T Premises satisfied but not the conclusion
4 F F T Premises doesn’t satisfied
Rules of inference for PL
Soundness of an inference can be established through truth table
Example (P V H) H) P
To prove validity of a sentence, there are a set of already identified patterns called inference rules.
These are:
1. Modes Ponens or implication elimination
2. And Elimination
3. And introduction
4. Or introduction
6. Unit resolution
7. Resolution
Following are some terminologies related to inference rules:
Implication: It is one of the logical connectives which can be represented as P → Q.
It is a Boolean expression.
Converse: The converse of implication, which means the right-hand side proposition
goes to the left-hand side and vice-versa. It can be written as Q → P.
Contrapositive: The negation of converse is termed as contrapositive, and it can be
represented as ¬ Q → ¬ P.
Inverse: The negation of implication is called inverse. It can be represented as ¬ P →
¬ Q.
Rule of inference for propositional logic
Rules of Inerence:- are the templates for constructing valid argument
Inference: deriving conclusion from evidences
What rule is used for the conclusion?
1. If world population continues to grow, then cities will become hopelessly crowed; If
cities become hopelessly overcrowded, then pollution will become intolerable.
Therefore, if world population continues to grow then pollution will become intolerable.
2. Either Yohanes or Thomas was in Ethiopia; Yohanes was not in Ethiopia. Therefore,
Thomas was in Ethiopia.
3. If twelve million children die yearly form starvation, then something is wrong with food
distribution; Twelve million children die yearly form starvation. Therefore, something is
wrong with food distribution.
4. If Japan cares about endangered species, then it has stopped killing whales; Japan has
not stopped killing whales. Therefore, Japan does not care about endangered species.
5. If Napoleon was killed in a plane crash, then Napoleon is dead; Napoleon is dead.
Therefore, Napoleon was killed in a plane crash.
Logical equivalence
Two sentences are logically equivalent iff they have the same truth value in all possible
world
equivalently α ≡ ß iff α╞ β and β╞ α
Prove that (P V H) H) P is valid
Prove S, given that:
(PQ)
(PR)
(QR) S
Forms of Logical expression
There are different standard forms of expressing PL statement. Some of these are:
1. Clausal normal form: it is a set of one or more literals connected with the disjunction
operator (disjunction of literals).
Example ~P Q ~R is a clausal form
2. Conjunctive normal forms (CNF): conjunction of disjunction of literals or conjunction of
clauses.
Example (A B) (C D)
3. Disjunctive normal form (DNF): disjunction of conjunction of literals.
Example (A B) (C D)
4. Horn form: conjunction of literals implies a literal.
Example (A B C D)=>E
5. A BNF (Backnus-Naur Form) grammar of sentences in propositional logic.
Sentence Atomic Sentence Complex Sentence
AtomicSentence True False P Q R …
ComplexSentence (Sentence) Sentence Connective Sentence Sentence
Connective
Inference procedure and normal forms
The inference procedure that we have seen before are all sound
If KB is represented in CNF, the generalized resolution inference procedure is complete
If KB is represented in Horn form, the generalized modes ponens algorithm is complete
It can be proved that every sentence of human language can be represented using logic as
CNF. However, it is not possible in Horn form.
Therefore, CNF is a more powerful representation technique for knowledge
But, Horn form representation of knowledge is easily understandable and convenient. It
also require polynomial time inference procedure.
Generalized Resolution for PL
Given any two clauses A and B, if there are any literal P1 in A which has a
complementary literal P2 in B, delete P1 and P2 from A and B and construct a
disjunction of the remaining clauses.
The clause constructed is called the resolvent of A and B.
– For example, consider the following clauses
A: P Q R
B: ~P Q M
C: ~Q S
From clause A and B, if we remove P and ~P, it resolves into clause
D : Q R Q M Q R M .
If Q of clause D and ~Q of clause C resolved, we get clause
E: R M S
Generalized Resolution for PL
As another example, consider the following clauses
A: P Q R
B: ~P R
C: ~Q
D: ~ R
Note: in order to apply resolution for proving a theory, make sure first all the knowledge is in
its clausal form
Example: Resolution
Prove that r follows from:
(p q) (r s) -(1)
p~s -(2)
p q -(3)
Solution:
Clause (1) in Clausal form
~ (p q) (r s)
{~ p ~ q r s} - (1)
Clause (2) in Clausal form
{~ p ~ s} - (2)
Clause (3) in Clausal form
{p} - (3)
{q} - (4)
Assume not r which {~ r} in Clausal form - (5)
Example: Resolution
Using inference rules: from unit resolution rule of (1) and (5)
{~p ~ q s} - (6) (resolve r with ~r and get resolvent)
from unit resolution of (3) and (6)
{~ q s} - (7) (resolve p with ~p and get resolvent)
from (4) and (7)
{s} - (8) (resolve q with ~q and get resolvent)
from (2) and (8)
{~ p} - (9) (resolve p with ~p and get resolvent)
from (3) and (9)
{} - (10)
Therefore r follows from the original clauses
Converting to CNF
Converting the following sentence to CNF:
a ~bcd
≡ (a ~ b) (c d)
Steps:
1. Remove Implication
~(a ~ b) (c d)
2. Push Negations Inwards
~a ~ ~ b (c d)
3. Eliminate Double Negations
~a b (c d)
4. Push Disjunctions into Conjunctions
(~a b c) (~a b d)
Converting to CNF
Convert the following sentence to CNF:
((a b) c)
Eliminate Implication
≡ (~a b) c
≡ ~(~a b) c
Push Negations Inwards
≡(~~a ~ b) c)
Eliminate Double Negations, apply De Morgans law
≡(a ~ b) c
Push Disjunctions into Conjunctions
≡(a c) (~b c)
Hence (a c) (~b c) is CNF of ((a b) c)
Converting to CNF
Convert the following sentence to CNF:
1. (a ((b c) d))
2. P↔¬(¬P)
3. A↔(B C)
The Wumpus World
The Wumpus world is a simple world example to illustrate the worth of a
knowledge-based agent and to represent knowledge representation.
The Wumpus world is a cave which has 4/4 rooms connected with passageways. So
there are total 16 rooms which are connected with each other.
We have a knowledge-based agent who will go forward in this world. The cave has a
room with a beast which is called Wumpus, who eats anyone who enters the room.
The Wumpus can be shot by the agent, but the agent has a single arrow. In the Wumpus
world, there are some Pits rooms which are bottomless, and if agent falls in Pits, then
he will be stuck there forever.
The exciting thing with this cave is that in one room there is a possibility of finding a
heap of gold. So the agent goal is to find the gold and climb out the cave without fallen
into Pits or eaten by Wumpus. The agent will get a reward if he comes out with gold,
and he will get a penalty if eaten by Wumpus or falls in the pit.
Following is a sample diagram for representing the Wumpus world. It is showing some
rooms with Pits, one room with Wumpus and one agent at (1, 1) square location of the
world.
There are also some components which can help the agent to navigate the cave. These
components are given as follows:
A. The rooms adjacent to the Wumpus room are smelly, so that it would have some stench.
B. The room adjacent to PITs has a breeze, so if the agent reaches near to PIT, then he will
perceive the breeze.
C. There will be glitter in the room if and only if the room has gold.
D. The Wumpus can be killed by the agent if the agent is facing to it, and Wumpus will
emit a horrible scream which can be heard anywhere in the cave.
Sensors:
The agent will perceive the stench if he is in the room adjacent to the Wumpus. (Not
diagonally).
The agent will perceive breeze if he is in the room directly adjacent to the Pit.
The agent will perceive the glitter in the room where the gold is present.
The agent will perceive the bump if he walks into a wall.
When the Wumpus is shot, it emits a horrible scream which can be perceived anywhere in
the cave.
These percepts can be represented as five element list, in which we will have different
indicators for each sensor.
Example if agent perceives stench, breeze, but no glitter, no bump, and no scream then it
can be represented as:
[Stench, Breeze, None, None, None].
Practical Example (The Wompus world)
Goal: Agent wants to move to the square which holds Gold, grab it and come back to the original
square and release it there
Initially agent could be at any of the square
Environment
Squares adjacent to wumpus are smelly(stench)
Squares adjacent to pit are breezy
Glitter iff gold is in the same square
Shooting kills wumpus if agent is facing to it
Shooting uses up the only arrow
Grabbing picks up gold if in same square
Releasing drops the gold in same square
Practical Example (The Wompus world)
Performance measure
Grab gold has score of 1000,
death by pits or wompus score -1000
using the arrow (shooting) score -10 and
the rest ation score -1
Atomic proposition variable for Wumpus Some Propositional Rules for the
world: wumpus world:
Let Pi,j be true if there is a Pit in the room [i, j].
Let Bi,j be true if agent perceives breeze in [i, j], (dead or
alive).
Let Wi,j be true if there is wumpus in the square[i, j].
Let Si,j be true if agent perceives stench in the square [i, j].
Let Vi,j be true if that square[i, j] is visited.
Let Gi,j be true if there is gold (and glitter) in the square [i,
j].
Let OKi,j be true if the room is safe.
Following is the Simple KB for wumpus world when an agent moves from room [1, 1], to room [2,1]:
Here in the first row, we have mentioned propositional variables for room[1,1], which is showing that room
does not have wumpus(¬ W11), no stench (¬S11), no Pit(¬P11), no breeze(¬B11), no gold (¬G11), visited
(V11), and the room is Safe(OK11).
In the second row, we have mentioned propositional variables for room [1,2], which is showing that there is
no wumpus, stench and breeze are unknown as an agent has not visited room [1,2], no Pit, not visited yet,
and the room is safe.
In the third row we have mentioned propositional variable for room[2,1], which is showing that there is no
wumpus(¬ W21), no stench (¬S21), no Pit (¬P21), Perceives breeze(B21), no glitter(¬G21), visited (V21),
and room is safe (OK21).
Prove that Wumpus is in the room (1,3) ?
- We can prove that wumpus is in the room (1, 3) using propositional rules which we have
derived for the wumpus world and using inference rule.
Apply Modus Ponens with ¬S11 and R1:
We will firstly apply MP rule with R1 which is ¬S11 → ¬ W11 ^ ¬ W12 ^ ¬ W21, and ¬S11 which
will give the output ¬ W11 ^ W12 ^ W12.
Prove that Wumpus is in the room (1,3) cont’d
Apply And-Elimination Rule:
- After applying And-elimination rule to ¬ W11 ∧ ¬ W12 ∧ ¬ W21, we will get three statements:
¬ W11, ¬ W12, and ¬W21.
Apply Modus Ponens to ¬S21, and R2:
- By applying Modus Ponens to ¬S21 and R2 which is ¬S21 → ¬ W21 ∧¬ W22 ∧ ¬ W31, which will give
the Output as ¬ W21 ∧ ¬ W22 ∧¬ W31
Prove that Wumpus is in the room (1,3) cont’d
Apply And -Elimination rule:
Now again apply And-elimination rule to ¬ W21 ∧ ¬ W22 ∧¬ W31, We will get three
statements:
¬ W21, ¬ W22, and ¬ W31.
After applying Unit resolution on W13 ∨ W12 ∨ W22, and ¬W22, we will get W13 ∨
W12 as output.
Objects: one, two, three, one plus two; Relation: equals; Function: plus.
(“One plus two” is a name for the object that is obtained by applying the
function “plus” to the objects “one” and “two.” “Three” is another name for
this object.)
“Squares neighboring the wumpus are smelly.”
Example1:
If the object referred by Father(Kaleb) and the object referred to by Ayele are the same,
then
Father(Kaleb ) = Ayele
Predicate symbols
Predicate symbols: are symbols that stands to show a relationship among terms or to
indicate property of a term.
For example:
On(A,B) to mean A is on B (relation between A & B)
Sister(Senait, Biruk) to mean Senaitis sister of Biruk
Female(Azeb) to mean Azeb is female (proprty of azeb being female)
Here ‘On’, ‘Sister’ and Female are predicate symbols, ‘A’, ‘B’, ‘Senait’, ‘Biruk’ and
Azeb are terms.
Atomic sentences
Atomic sentences states the facts of world and is formed from a predicate symbol
followed by a parenthesis list of terms.
Example:
Brother(Ali, Kedir)
An atomic sentence is true if the relation referred to by the predicate symbol holds
between the objects referred to by the arguments.
Complex Sentence
Complex sentences are sentences which is a combination of one or more atomic sentences
with logical connectives
Example:
Older(John,30) Younger(John,30);
represents John is above 30
Brother(Robin,John)
represents Robin is Brother of John
Hana = daughter(brother(mother(Selam))) ;
represents Hana is Selam’s cousin
Existential quantifier
Universal Quantification ()
Universal quantifier defines the domain of a variable in a logical expression to be
any element in the universe.
Example:
x (Student(x) Smart(x)) means “Everyone is a student and everyone is smart”
x(cats(x) Mammals(x)) means “Everything is a cat and every thing is mammal”
This doesn’t agree in concept with the original sentence which is every student is
smart, every cat are mammal respectively.
Existential quantification ()
Existential quantifier defines the domain of a variable in a logical expression to be a non
empty set which is the subset of the universal set.
if y is a variable, then y is read as
There exists a y OR for some y OR for at least one y
Syntax: <variables> <sentence>
one or more variables can be quantified by a single quantifier by separating with comma.
Eg. x,y
Example1: “Some students are smart”
x (student(x) Smart(x))
Example2: “Spot has a sister who is a cat”
x(Sister(x, Spot) Cat(x))
Existential quantification ()
Roughly speaking, is equivalent to the disjunction of instantiations of P
x(student(x) Smart(x)) is equivalent to
(Student(KingJohn) Smart(KingJohn))
(Student(Abera) Smart(Abera))
(Student(MyDog) Smart(MyDog)) ...
x(Sister(x, Spot) Cat(x)) is equivalent to
(Sister(Felix, Spot) Cat(x))
(Sister(Rabicca, Spot) Cat(x))
(Sister(chichu, Spot) Cat(x)) …
Existential quantification ()
Note1: Typically, is the main connective with .
Note2: Avoid the mistake of using as the main connective with :
Example:
• Some students are smart is to mean that there are entities that satisfy the property of both
being a student and smart.
• In the figure, the yellow part indicates the set of such groups
However, x(student(x) Smart(x)) is to means any thing which is either smart or not
a student
Hence this doesn’t infer what we need to say
Examples using Quantifiers
Man(John)
John is a man
x(Man(x) ~Woman(x))
Every man is not a woman (there is no man who is a woman)
x(Man(x) Handsome(x))
Some man are handsome
x(Man(x) y(Woman(y) Loves(x,y)))
Every man has a woman that he loves
y(Woman(y) (x)(Man(x) Loves(x,y)))
There are some woman that are loved by every man
Nested quantifiers
Universal and existential quantifiers can be nested one into another.
It is possible to have one or more quantifier nested in another quantifier
Example1
“For all x and all y, if x is the parent of y then y is the child of x” can be represented as
x,y (Parent(x,y)Child(y,x))
Note: Here x,y means x y
Example2
“There is someone who is loved by everyone
yx Loves(x,y)
Nested quantifiers
Difficulty may arise when two quantifiers are used with the same variable name.
For example
x (Cat(x) x Brother(Richard,x)))
In the sentence above, x in Brother(Richard,x) is existentially qualified and the universal
quantifier has no effect on it.
Rule: To identify which quantifier quantify a variable if the variable is quantified by two
or more of them, the innermost quantifier that mentions it will be choosen.
Examples of Translating English to FOL
1. Every gardener likes the sun.
(x) (gardener(x)likes (x,sun))
2. All purple mushrooms are poisonous
(x) [(mushrooms(x) purple(x)) poisonous(x)]
3. No purple mushroom is poisonous
~(x) (purple(x) mushroom(x) poisonous(x))
4. There are exactly two purple mushrooms
(x)(y) {mushroom (x) purple(x) mushroom(y) purple(y) ~(x=y)
(z)[(mushroom(z) purple(z)) ((x=z)(y=z))]}
5. You can fool some of the people all of the time
(x)(person(x) ( t) (time(t) can-fool(x,t)))
6. Jane is a tall surveyor
Tall(Jane) Surveyor(Jane)
Examples of Translating English to FOL
7. Everybody loves somebody
x y Loves(x,y)
y x Loves(x,y)
8. Nobody loves Jane
x ~Loves(x,Jane)
~y Loves (y,Jane)
9. Everybody has a father
x y Father(y,x)
10. Everybody has a father and mother
x y,z (Father(y,x) Mother(z,x))
12. Whoever has a father has a mother
x y (Father(y,x) z Mother(z,x))
13. Every son of my father is my brother
xy ((MyFather(x) Son(y,x)) MYBrother(y))
Properties of quantifiers (commutativity)
xy is the same as y x
xy is the same as y x
xy is not the same as y x,
Example
x y Loves(x,y) means “There is a person who loves everyone in the world”
y x Loves(x,y) means “Everyone in the world is loved by at least one
person”
Properties of quantifiers (duality)
Quantifier duality refers to the possibility of expressing one quantifier with the other
equivalently
1. What is the limitation of prepositional logic, what is the solution and how the
solution models the world ?
Translating English to FOL
1. Some people like Football.
2. Every man respects his parent.
3. Brothers are siblings.
4. Not all students like both Mathematics and Science.
5. Each student is registered for at least one degree programme.
Conversion exercise into its normal form
6. x (A(x) y B(x,y))
7. ∀Y (∀X (taller(Y,X) V wise(X)) => wise(Y))
1. John and Michael are colleagues
Colleagues (John, Michael)
2. Some boys play cricket.
∃x boys(x) → play(x, cricket).
3. Brothers are siblings.
∀x, y (Brother(x, y) ⇒ Sibling(x, y))
4. Only one student failed in Mathematics.
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y) [¬(x==y) ∧ student(y) →
¬failed (x, Mathematics)].
5. Each student is registered for at least one degree programme’
∀x(Student(x)→∃y(registeredfor(x,y)∧DegreeProgramme(y)))
1. Some people like Football.
∃x: people(x) ∧ likes Football(x)
2. Every man respects his parent.
∀x man(x) → respects (x, parent).
3. Brothers are siblings.
∀x, y (Brother(x, y) ⇒ Sibling(x, y))
4. Not all students like both Mathematics and Science.
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x, Science)].
5. Each student is registered for at least one degree programme’
∀x(Student(x)→∃y(registeredfor(x,y)∧DegreeProgramme(y)))
THANKS!!