0% found this document useful (0 votes)
191 views

Practice Questions Logic

The document contains practice questions on logic. It provides examples of translating sentences to First Order Logic (FOL) and rewriting propositions symbolically. It also contains examples of using FOL to express statements and problems checking validity through truth tables. The goal is to practice skills in symbolic logic including translation between natural language and formal logic representations.

Uploaded by

Shoaib Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
191 views

Practice Questions Logic

The document contains practice questions on logic. It provides examples of translating sentences to First Order Logic (FOL) and rewriting propositions symbolically. It also contains examples of using FOL to express statements and problems checking validity through truth tables. The goal is to practice skills in symbolic logic including translation between natural language and formal logic representations.

Uploaded by

Shoaib Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Practice Questions on Logic

1. Translate each of the following sentences into First Order Logic (FOL).

(a) Not all cars have carburetors


¬∀x [car(x) → carburetors(x)] or
∃x [car(x) ∧ ¬carburetors(x)]

(b) Some people are either religious or pious


∃x (R(x) ⊕ P (x)) ≡ ∃x ¬(R(x) ↔ P (x)) or
¬∀x [R(x) ↔ P (x)] or
∃x((R(x) ∧ ¬P (x)) ∨ (¬R(x) ∧ P (x))

(c) No dogs are intelligent


∀x (dog(x) → ¬Intelligent(x)) or
¬∃x (dog(x) ∧ Intelligent(x))

(d) All babies are illogical


∀x (baby(x) → illogical(x)) or
¬∃x (baby(x) ∧ ¬illogical(x))

(e) Every number is either negative or has a square root


∀x ¬(negative(x) ↔ sqroot(x)) or
¬∃x (negative(x) ↔ sqroot(x)) or
∀x((negative(x) ∧ ¬sqroot(x)) ∨ (¬negative(x) ∧ sqroot(x))

(f) Some numbers are not real


∃x¬Real(x) or ¬∀x Real(x)

(g) Every connected and circuit-free graph is a tree


∀x [(conn(x) ∧ ¬cir(x)) → tree(x)] or
¬∃x [(conn(x) ∧ ¬cir(x)) ∧ ¬tree(x)]

(h) Not every graph is connected


¬∀x connected(x) or ∃x ¬connected(x)

(i) All that glitters is not gold


∀x [glitter(x) → ¬gold(x)] or
¬∃x [glitter(x) ∧ gold(x)]

(j) Not all that glitters is gold


¬∀x(glitter(x) → gold(x)) or
∃x(glitter(x) ∧ ¬gold(x)).

(k) There is a barber who shaves all men in the town who do not shave themselves
∃x [Barber(x) ∧ ∀y [man(y) ∧ ¬shaves(y, y)] → shaves(x, y)]

1
(l) There is no business like show business
∀x [(business(x) ∧ (x 6= show business)) → ¬like(x, show business)]

2. Rewrite each proposition symbolically, given that the universe of discourse is a set of real numbers

(a) For each integer x, there exist an integer y such that x + y = 0


∀x [int(x) → ∃y (int(y) ∧ (x + y = 0))]

(b) There exist an integer x such that x + y = y for every integer y


∃x [int(x) ∧ ∀y (int(y) → (x + y = y))]

(c) For all integers x and y, x.y = y.x


∀x ∀y [[int(x) ∧ int(y)] → x.y = y.x]

(d) There are integers x and y such that x+y=5


∃x ∃y [(int(x) ∧ int(y)) ∧ (x + y = 5)]

3. Using FOL, express the following


(a) Every student in this class has taken exactly two mathematics course at this school
∀x [stud(x) → ∃y1 ∃y2 (y1 6= y2 ∧ math(y1 ) ∧ math(y2 ) ∧ taken(x, y1 ) ∧ taken(x, y2 )∧
∀y3 (y3 6= y1 ∧ y3 6= y2 ∧ math(y3 ) → ¬taken(x, y3 )) )] or

∀x (stud(x) → mathcount(x) = 2)

(b) Someone has visited every country in the world except Libya
∃x [person(x) ∧ ∀y (country(y) ∧ y 6= Libya → visited(x, y))]
Some text books use iff for ’except’. Then,
∃x [person(x) ∧ ∀y (country(y) ∧ y 6= Libya ↔ visited(x, y))]

∃x [person(x) ∧ ∀y (country(y) → [notvisited(x, y) ↔ (y = Libya)])]


∃x [person(x) ∧ ∃!y (country(y) ∧ [notvisited(x, y) ↔ (y = Libya)])]
∃x [person(x) ∧ ∀y (country(y) → (visited(x, y) ↔ (y 6= Libya)))]

(c) No one has climbed every mountain in the Himalayas


∀x (person(x) → ¬ ∀ y(M ountain(y) → Climb(x, y))
¬ ∃x (person(x) ∧ ∀ y(M ountain(y) → Climb(x, y))
∀x (person(x) → ∃ y(M ountain(y) ∧ ¬Climb(x, y))

4. Check the validity: Every computer science student takes discrete mathematics. Neetha is taking
discrete mathematics. Therefore, Neetha is a computer science student.
The given conclusion is false. The following Venn diagram is a counter example for the given conclu-
sion.
5. Check the validity: If it does not rain or it is not foggy then the sailing race will be held and life saving
demonstrations will go on. If the sailing race is held, then the trophy will be awarded. The trophy was
not awarded. Therefore, it rained.
The conclusion is TRUE by the following argument.

2
DM

Comp.
Sci Neetha

premise ¬R ∨ ¬F → S ∧ D ... (1)


premise S→T ... (2)
premise ¬T ... (3)
1 ¬R ∨ ¬F → S ... (4)
4, 2 ¬R ∨ ¬F → T ... (5)
5 ¬T → ¬(¬R ∨ ¬F ) ... (6)
6, 3 ¬(¬R ∧ ¬F ) ... (7)
7 R∧F ... (8)
8 R

6. Prove or Disprove: All doctors are college graduates. Some doctors are not golfers. Hence, some golfers
are not college graduates.

premise : ∀x(Doctor(x) → Grad(x))


premise : ∃x(Doctor(x) ∧ ¬Golf (x))
conclusion : ∃x(Golf (x) ∧ ¬Grad(x))

The given conclusion is false. The following Venn diagram is a counter example for the given conclu-
sion.
Graduates

Doctor Golfers

7. Using FOL: express the following


(a) All boys in the class are at least as tall as Mr.Sharma whereas Mr.Sharma is taller than some
girls in the class.

∀x (Boys(x) → Atleast-tall(x, Sharma)) ∧∃y (Girls(y)∧ taller(Sharma, y))

(b) In the array A with 100 integer elements, the first fifty numbers are in increasing order and the
last fifty are in decreasing order.

(∀i(1 ≤ i ≤ 49) → [A[i] ≤ A[i + 1]]) ∧ (∀i(51 ≤ i ≤ 99) → [A[i] ≥ A[i + 1]])

(c) It is not the case that all blueline buses are bad. Some persons who drive blueline buses are not
certified drivers.

¬∀x (Bluelinebus(x)).

3
∃x (Person(x)∧ Drives(x, bluelinebus) ∧¬ Certified(x))

8. The attack will succeed only if the enemy is taken by surprise or the position is weakly defended. The
enemy will not be taken by surprise unless he is overconfident. The enemy will not be overconfident if
the position is weakly defended. Therefore, the attack will not succeed.

Let, A represents attack will succeed.


E represents enemy is taken by surprise.
W represents the position is weakly defended.
O represents he is overconfident.
The given statement can be written as follows:

premise : A→E∨W
premise : ¬O → ¬E
premise : W → ¬O
Conclusion : ¬A

Using Truth Table, we can check whether the given conclusion follows from the premises.

a b c
A E W ¬A E∨W W ∧E ¬(W ∧ E) A → (E ∨ W ) a∧b c → ¬A
T T T F T T F T F T
T T F F T F T T T F
T F T F T F T T T F
T F F F F F T F F T
F T T T T T F T F T
F T F T T F T T T T
F F T T T F T T T T
F F F T F F T T T T

The last column says that the given argument is contingency. i.e., the given argument is invalid.
Thus, the conclusion does not follow from the premises.

9. Check the validity of the following implications


(a) P → (Q → R) equivalent to (P → Q) → (P → R)

P Q R Q→R (P → Q) (P → R) (P → Q) → (P → R) P → (Q → R)
T T T T T T T T
T T F F T F F F
T F T T F T T T
T F F T F F T T
F T T T T T T T
F T F F T T T T
F F T T T T T T
F F F T T T T T

4
Refer to the truth table. Hence, P → (Q → R) is equivalent to (P → Q) → (P → R).

(b) [(P → Q) ∨ (R → S)] → [(P ∨ R) → (Q ∨ S)]


From the table, it is clear that [(P → Q) ∨ (R → S)] → [(P ∨ R) → (Q ∨ S)] is a contingency.

(P → Q) (P ∨ R) [(P → Q) ∨ (R → S)]
P Q R S P →Q R→S (P ∨ R) (Q ∨ S) ∨ → →
(R → S) (Q ∨ S) [(P ∨ R) → (Q ∨ S)]
T T T T T T T T T T T
T T T F T F T T T T T
T T F T T T T T T T T
T F T T F T T T T T T
T T F F T T T T T T T
T F T F F F T F F F T
T F F T F T T T T T T
T F F F F T T F T F F
F T T T T T T T T T T
F T T F T F T T T T T
F T F T T T F T T T T
F F T T T T T T T T T
F T F F T T F T T T T
F F T F T F T F T F F
F F F T T T F T T T T
F F F F T T F F T T T

10. Show that the following propositions are valid


(a) [∀xP (x) → Q] equivalent to [∃xP (x) → Q]

∀xP (x) and ∃xP (x) are atomic predicates. Therefore, we can check the validity of the given
proposition using truth table.
From the last two columns we can conclude that given propositions are not equivalent. NOTE:

∀xP (x) Q ∃xP (x) ∀xP (x) → Q ∃xP (x) → Q


0 0 0 1 1
0 0 1 1 0
0 1 0 1 1
0 1 1 1 1
1 0 0(NA) NA NA
1 0 1 0 0
1 1 0(NA) NA NA
1 1 1 1 1

in the above table, ’NA’ is mentioned in some places which means ’not applicable’. That is, when
∀xP (x) is TRUE, ∃xP (x) cannot be FALSE.

(b) ∀x[P → Q(x)] equivalent to [P → ∀xQ(x)]

∀x[P → Q(x)]
↔ ∀x[¬P ∨ Q(x)]

5
↔ [¬P ∨ Q(0)] ∧ [¬P ∨ Q(1)] ∧ [¬P ∨ Q(0)] ∧ . . .
↔ [¬P ∨ (Q(0) ∧ Q(1) ∧ Q(2) ∧ . . .)]
↔ [¬P ∨ (∀xQ(x))]
Hence, the given propositions are equivalent.

11. Everyone who gets admitted into an IIT gets a job. Therefore, if there are no jobs, then nobody gets
admitted into any IIT.

Premise: ∀x(person(x) ∧ (∃y(IIT (y) ∧ admit(x, y))) → (∃z(job(z) ∧ getjob(x, z))))


Conclusion: ∀z(¬(job(z)) → ¬(∃x(person(x) ∧ ∃y(IIT (y) ∧ admit(x, y)))). (or)
¬∃z((job(z)) → ∀x(person(x) ∧ ∃y(IIT (y)) → ¬admit(x, y)).

12. All horses are animals. Therefore, heads of horses are heads of animals. NOTE: ’head’ refers to the
’leader’ of the group.

Premise: ∀x(H(x) → A(x))


Conclusion: ∀x(H(x) ∧ ∃y(H(y) ∧ Head(x, y)) → ∃y(A(y) ∧ Head(x, y))).
13. Write the following in first order logic.
(a) Some boys are sharp and intelligent.
U OD(x): all persons.
Sharp(x): x is sharp.
Boy(x): x is a boy.
Intelligent(x): x is intelligent.

∃x(Sharp(x) ∧ Boy(x) ∧ Intelligent(x))

(b) Not all boys are intelligent.

¬∀x(Boy(x) → Intelligent(x))
or ∃x(Boy(x) ∧ ¬Intelligent(x))

(c) Some students of DM course has cleared JEE main and the rest cleared SAT.
U OD(x): all persons.
ClearJEE(x): x clears JEE main.
ClearSAT (x): x clears SAT.

∃x[Stud(x) ∧ ClearJEE(x) ∧ ∀y(y 6= x → ClearSAT (y))]

(d) Some thing that is white is not always milk, whereas the milk is always white.
U OD(x): things.
W hite(x): x is white.
M ilk(x): x is milk.

∃x(W hite(x) ∧ ¬M ilk(x)) ∧ ∀x(M ilk(x) → W hite(x))

(e) Unless you report to the exam cell before 9 am, you will not be permitted to write quizzes. - Also,
write inverse, converse and contrapositive.
Let P : You report to the exam cell before 9am.

6
Q : You will be permitted to write quizzes.
Therefore the statement is ¬P → ¬Q
Converse: ¬Q → ¬P
If you are not permitted to write quizzes, then you have not reported to the exam cell before 9am.
Inverse: P → Q
If you report to the exam cell before 9am, then you will be permitted to write quizzes.
Contrapositive: Q → P
If you are permitted to write quizzes, then you reported to the exam cell before 9am.

(f) Breakfast is served in mess on all days between 7am and 9am except Sunday. And, on Sundays
it is served till 9.15 am.
U OD(x): days.
Day(x): x is a day of the week.
Breakfast-time-non-sunday(x): Breakfast is served in mess on x between 7am and 9am.
Breakfast-time-sunday(x): Breakfast is served in mess on x till 9.15am.

∀x[(Day(x)∧x 6=SUNDAY) → Breakfast-time-non-sunday(x)] ∧ ∀x((x =SUNDAY) → Breakfast-


time-sunday(x))

(g) The speed of light is not same in all mediums. The speed of light in fiber is 2×108 m/s. Therefore,
there exists at least two mediums having different speed of light.
U OD(x): mediums.
M edium(x): Light travels in medium x.
Speed(x): Speed of light in medium x.
P : Speed of light in fiber is 2 × 108 m/s.

¬∀x∀y[(M edium(x) ∧ M edium(y)) → Speed(x) = Speed(y)] ∧ P


Conclusion:
∃x∃y[M edium(x) ∧ M edium(y) ∧ (x 6= y) ∧ Speed(x) 6= Speed(y)]

(h) Some students have joined IIITDM. There exists a student who has not joined any IIITDM. Not
all students have cleared JEE advanced. Therefore, some students have joined deemed universi-
ties.
U OD(x) : people.
U OD(y) : Educational institutes.
Stud(x): x is a student.
IIIT DM (y) : y is a IIITDM.
JoinIIIT DM (x, y) : x joins IIITDM y.
ClearJEE(x) : x cleared JEE advanced.
JoinDeemed(x) : x joins a deemed university.

∃x[Stud(x) ∧ ∃y(IIIT DM (y) ∧ JoinIIIT DM (x, y))]


∃x[Stud(x) ∧ ∀y(IIIT DM (y) → ¬JoinIIIT DM (x, y))] ∧
¬∀x(Stud(x) → ClearJEE(x))
Conclusion:
∃x(Stud(x) ∧ JoinDeemed(x)).

If we combine the premise and conclusion, then we get;


[∃x[Stud(x)∧∃y(IIIT DM (y)∧JoinIIIT DM (x, y))]∧ ∃x[Stud(x)∧∀y(IIIT DM (y) → ¬JoinIIIT DM (x, y))]
∧ ¬∀x(Stud(x) → ClearJEE(x))
→ ∃x(Stud(x) ∧ JoinDeemed(x)) ]

7
(i) Each student of IIITDM likes either carnatic music or Hindustani music. Further, some students
are athletes, however, they have not represented the institute in inter sports meet. Carnatic music
is a form of meditation. Music club at IIITDM is not that active. Therefore, students of IIITDM
are neither good in sports nor in music.
uod(x) : people
Stud(x) : x is a student.
C(x) : x likes carnatic music.
H(x) : x likes Hindustani music.
Athlete(x) : x is an athlete.
notrep(x) : x has not represented the institute in inter sports meet.
CM : Carnatic music is a form of meditation
M A : Music club at IIITDM is active
S(x) : x is good in sports.
M (x) : x is good in music.

∀x[Stud(x) → ¬(C(x) ↔ H(x))] ∧


∃x[Stud(x) ∧ Athlete(x) ∧ notrep(x)] ∧
CM ∧
¬ MA (in logic ’that’ has no meaning, the statement is accepted as ’not active’)

Conclusion:
∀x(Stud(x) → ¬S(x) ∧ ¬M (x)).

(j) In any group of five people, there are not necessarily three mutual friends or three mutual enemies.
NOTE: any two people are either friends or enemies
P eople(x) : x is a person.
M utualF riends(x, y, z) : x, y, z are mutual friends.
M utualEnemies(x, y, z) : x, y, z are mutual enemies.

¬∀y1 , y2 , y3 , y4 , y5 [(yi 6= yj ,1≤i<j≤5 ∧ ∀1≤k≤5 P eople(yk )) →


{∃1≤u,v,w≤5 ((u 6= v 6= w) ∧ M utualF riends(yu , yv , yw ))∨
∃1≤u,v,w≤5 ((u 6= v 6= w) ∧ M utualEnemies(yu , yv , yw ))} ]

(k) In a group of 10 people, there are either three mutual friends or four mutual enemies, and there
are either three mutual enemies or four mutual friends.
P eople(x) : x is a person.
M utual3F riends(x, y, z) : x, y, z are mutual friends.
M utual3Enemies(x, y, z) : x, y, z are mutual enemies.
M utual4F riends(w, x, y, z) : w, x, y, z are mutual friends.
M utual4Enemies(w, x, y, z) : w, x, y, z are mutual enemies.

∃y1 , y2 , y3 , y4 , y5 , y6 , y7 , y8 , y9 , y10 [yi 6= yj ,1≤i<j≤10 ∧ ∀1≤k≤10 P eople(yk ) ∧


∃1≤u,v,w,x≤10 {(u 6= v 6= w 6= x) ∧ (M utual3F riends(yu , yv , yw ) ⊕ M utual4Enemies(yu , yv , yw , yx )) } ∧
∃1≤u,v,w,x≤10 {(u 6= v 6= w 6= x) ∧ (M utual3Enemies(yu , yv , yw ) ⊕ M utual4F riends(yu , yv , yw , yx )) } ]

14. Are there statements in English that can not be expressed using FOL. Mention at least one, if it exists.
Less formal example: statements that are not propositions
Did you send me an email? (interrogative), Aha! a beautiful course indeed (Exclamatory), Get me a
soft copy of Disc Math text book (Imperative)

8
Formal and rich example: statements that are propositions but still FOL does not exist

Statements that need quantification of sets.


For example: There exist a subset of students in DM class having i-phones.

If one attempts FOL for the above statement, then the expression goes like this;
∃S(S ⊂ U OD ∧ ∀x(S(x) ∧ stud(x) → iphone(x))
However, FOL does not allow quantification with respect to subsets, it only allows quantification with
respect to elements in UOD (atomic variables). The above expression comes under the next level logic,
namely, second order logic.

15. Puzzle to assess Logical Reasoning ability: Five persons A, B, C, D, E are in a compartment
in a train. A, C, E are men and B, D are women. The train passes through a tunnel and when it
emerges, it is found that E is murdered. An inquiry is held, A, B, C, D make the following statements.
Each makes two statements.

A says: I am innocent. B was talking to E when the train was passing through the tunnel.
B says: I am innocent. I was not talking to E when the train was passing through the tunnel.
C says: I am innocent. D committed the murder.
D says: I am innocent. One of the men committed the murder.

Out of 8 statements given above, 4 are true and 4 are false. Who is the murderer. Support your
answer with a precise and concise justification. Note: Each person is making exactly two statements.

Solution: Let the statements given by A be A1 , A2 in order. Similarly, let us denote Bi , Ci , Di , i ∈ {1, 2}
for other statements. Since one of A, B, C, D did the murder, three among A1 , B1 , C1 , D1 are true.
Observe that the statements A2 , B2 are inverse to each other. Therefore one of them is true. It follows
that the four true statements are from A1 , B1 , C1 , D1 , A2 , B2 . Hence, we could conclude that C2 , D2
are false. This implies, D did not commit the murder and none of the men committed the murder.
Further, out of the two women B, D; since D has not committed the murder, we conclude that B is
the murderer.

16. Write the definition of ’row-major’ order in FOL. Note that ’two dimensional arrays’ are stored in
either row major order or column major order. The ’row-major’ order refers to
(i) sorting within the row
(ii) the last element of the first row is smaller than the first element of the second row. In general, the
last element of the ith row is smaller than the first element of the (i + 1)th row.
We shall write the above two statements in FOL as follows; assume 20 rows and 30 columns.
{∀i ∀j [1 ≤ i ≤ 20, 1 ≤ j ≤ 29 → A[i][j] ≤ A[i][j + 1]] ∧ [∀i 1 ≤ i ≤ 19 → A[i][30] ≤ A[i + 1][1]]}

17. Express the following in FOL. Use predicate when necessary. Avoid using predicate when simple
proposition would suffice.

(a) If tomorrow is a holiday, then some students of IIITDM will go home and the rest solve DM
assignment.
P → ∃x(student(x) ∧ gohome(x) ∧ ∀y(y 6= x → solvedm(y)))

9
(b) All students who study at IIITDM are resident of some hostel. However, some students are day
scholars. Although, some students are day scholars, some hostel room is alloted by the hostel office.
∀x(residenthostel(x))∧∃x(dayscholars(x))∧ ∃x(dayscholar(x)∧∃y(hostelroom(y)∧allotment(x, y)))

(c) Unless students sleep at 10 pm, they cannot get up early in the morning. There are students who
sleep at 10 pm but still get up late. In each hostel, there is a student who either sleeps at 10 pm
or does not sleep at all.
∀x(¬sleepat10(x) → ¬getup(x)) ∧ ∃x(sleepat10(x) ∧ getup(x)) ∧ ∀x(hostel(x) → ∃y(student(y) ∧
(sleepat10(y) ⊕ ¬sleep(y))))

18. Prove the following;


(a) (P → Q) ↔ (¬P ∨ Q)

P Q P →Q ¬P ¬P ∨ Q P →Q↔P ∨Q
T T T F T T
T F F F F T
F T T T T T
F F T T T T
(b) ¬(P ↔ Q) ↔ (P ↔ ¬Q)

P Q P ↔Q ¬P ↔ Q ¬Q P ↔ ¬Q ¬(P ↔ Q) ↔ (P ↔ ¬Q)
T T T F F F T
T F F T T T T
F T F T F T T
F F T F T F T
(c) (P → Q) → R 6↔ (P → (Q → R))

P Q R P →Q (P → Q) → R Q→R P → (Q → R) P→Q
(P) (Q)
T T T T T T T T
T T F T F F F T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F T F F T F
F F T T T T T T
F F F T F T T F
(d) ((P → Q) ∧ ¬Q) → (¬P )
P Q P → Q ¬Q (P → Q) ∧ ¬Q ¬P ((P → Q) ∧ ¬Q) → (¬P )
T T T F F F T
T F F T F F T
F T T F F T T
F F T T T T T
19. Identify propositions from the following. If not a proposition, justify, why it is not.

(a) I shall sleep or study

10
Ans: It is not a proposition. The truth value varies depending on the time of the day. During morning,
I shall study is true and sleep is false, together the truth value is true. During evening, I shall
study is false and sleep is also false. Since truth value takes both true and false, it is not a
proposition.
(b) x2 + 5x + 6 = 0 such that x ∈ integers
Ans: The given equation is true for x = −3, −2, and false otherwise. Thus it is not a proposition.
20. Express the following in first order logic (identify the right universe of discourse, predicates before
attempting each question. Think twice and do not oversimplify the problem)
(a) The fundamental law of nature is change.
Ans: The given statement is a simple proposition. P . Note that a proposition is also a predicate. A
predicate without quantification is a proposition. However, one can also write using the following
predicates
UOD(x): {laws of nature}. ∀x(f undamental(x) → change(x))
(b) We cannot help everyone, but everyone can help some one.
Ans: UOD(x,y): {people}
Let help(x, y): x can help y.
We cannot help everyone = There exists a person who helps everyone is false.
We cannot help everyone: ¬∃x ∀y (help(x, y)) ≡ ∀x ∃y ¬ help(x, y)
Everyone can help some one: ∀x ∃y (help(x, y))
∀x ∃y ¬ help(x, y) ∧ ∀x ∃y (help(x, y))
(c) Power does not corrupt people, people corrupt power.
Ans: P: Power does not corrupt people. Q: People corrupt power. P∧Q
Simple proposition would suffice. However, the following predicate also captures the above ex-
pression.
Let corrupt(x, y): x corrupts y.
UOD(x): {people}
∀x (¬ corrupt(power, x) ∧ corrupt(x, power)).
(d) It is nice of somebody to do something.
Ans: UOD(x,y): {people,actions}.
∃x (people(x) ∧ ∃y (thing(y) ∧ Does(x, y) ∧ N ice(x)))
(e) No one who has no complete knowledge of himself will ever have a true understanding of another.
Ans: UOD(x,y): {people}
¬∃x (¬know(x) ∧ ∃y (understand(x, y)))
≡ ∀x (¬know(x) → ¬∃y (understand(x, y)))
≡ ∀x (¬know(x) → ∀y ¬(understand(x, y)))
(f) Thought or thinking is what set human beings apart from other living things.
Ans: UOD(x): set of living beings.
∀x (T hought(x) ∨ T hink(x) → Human(x) ∧ ∀y (¬Human(y) → Distinct(x, y)))

21. Write the definition of ‘Prime number’ in first order logic.


Solution:
Definition of Prime Number : A prime number is a natural number greater than 1 that has no positive
divisors other than 1 and itself.
FOL: ‘x is prime’ is definable in N by (1 < x) ∧ ∀y((y|x) → ((y = 1) ∨ (y = x))), where y|x mean
∃z(y · z = x)

11
(or)

∀x[((1 < x) ∧ ∀y((y|x) → ((y = 1) ∨ (y = x)))) → P rime(x)] ∧ ∀x[((1 < x) ∧ ∃y((y|x) ∧ ((y 6= 1) ∧ (y 6=
x)))) → ¬P rime(x)]
∀x[((1 < x) ∧ ∀y((y|x) → ((y = 1) ∨ (y = x)))) ↔ P rime(x)]
NOTE: any mathematical definition is always written using iff

22. Negate the following: ∀x∃((x > 0 ∧  > 0) ∧ ∀y(y > 0 → x − y ≥ )).
Solution:
∃x∀((x ≤ 0 ∨  ≤ 0) ∨ ∃y(y > 0 ∧ (x − y) < ))

(or)

∃x∀((x > 0 ∧  > 0) → ∃y(y > 0 ∧ (x − y) < ))


23. Prove or Disprove:

(a) ∃x(P (x) ∧ Q(x)) → ∃xP (x) ∧ ∃xQ(x)


Solution:

∃x(P (x) ∧ Q(x)) ... (1)


P roof
F rom 1 : P (a) ∧ Q(a) ... (2) − Existential Instantiation
2: P (a) ... (3)
2: Q(a) ... (4)
3: ∃xP (x) ... (5) − Existential Generalization of (3)
4: ∃xQ(x) ... (6) − Existential Generalization of (4)
3, 4 : ∃xP (x) ∧ ∃xQ(x) QED
(b) ∃xP (x) ∧ ∃xQ(x) → ∃x(P (x) ∧ Q(x))

Solution:
The above implication is false. Counter Example: UOD: N. P (x) : x = 2 and Q(x) : x = 3. The
premise is true and the conclusion is false. Therefore the above statement is false.
24. Prove or Disprove:

(a) [∃xP (x) → ∀xQ(x)] → ∀x[P (x) → Q(x)]


Solution:
[∃xP (x) → ∀xQ(x)]
↔ [¬∃xP (x) ∨ ∀xQ(x)]
↔ [∀x¬P (x) ∨ ∀xQ(x)]
→ [∀x(¬P (x) ∨ Q(x))]
Note: in the above step, we have used ’implication’ not ’equivalence’ operator.
→ [∀x(P (x) → Q(x))]. QED.

(b) ∀x[P (x) → Q(x)] → [∃xP (x) → ∀xQ(x)]


Solution:
The given implication is false. Counter Example: UOD: Set of integers. Let P (x) be the statement
“x is divisible by 4”. Let Q(x) be the statement “x is divisible by 2”. Thus, the premise is true
and the conclusion is false. Therefore the above statement is false.

12
25. Check the validity of the argument.
Some trigonometric functions are periodic. Some periodic functions are continuous. Therefore, some
trigonometric functions are continuous.
Solution:
The given conclusion is false. The following Venn diagram is a counter example for the given conclusion.

Trignometric Periodic Continuous


Function Function Function

26. Check the validity of the argument.


All clear explanations are satisfactory. Some excuses are unsatisfactory. Hence some excuses are not
clear explanations.
Solution:
The conclusion is true by the following argument.

Premise: ∀x(C(x) → S(x)) ... (1)


Premise: ∃x(E(x) ∧ ¬S(x)) ... (2)
1: C(a) → S(a) ... (3) − Universal Instantiation
3: ¬S(a) → ¬C(a) ... (4) − Contrapositive of (3)
2: E(a) ∧ ¬S(a) ... (5) − Existential Instantiation
5: E(a) ... (6)
5: ¬S(a) ... (7)
4, 7 : ¬C(a) ... (8)
6, 8 : E(a) ∧ ¬C(a) ... (9)
9, Conclusion: ∃x(E(x) ∧ ¬C(x)) Existential Generalization.

27. Let the universe of discourse be the set of integers. For each of the following assertions, find a predicate
P which makes the implication false.

• ∀x∃!yP (x, y) → ∃!y∀xP (x, y)


Solution:
Let P (x, y) be the statement x + y = 0. Thus, the truth value of ∀x∃!yP (x, y) is true (Since,
for every integer x there exist an integer −x such that x + (−x) = 0) and the truth value of
∃!y∀xP (x, y) is false (Since, there does not exist an integer y such that ∀x ∈ N, x + y = 0).
Therefore, the implication is false for the given predicate.
• ∃!y∀xP (x, y) → ∀x∃!yP (x, y)
Solution:
Let P (x, y) be the statement x · y = 0. Thus, the truth value of ∃!y∀xP (x, y) is true (Since, there
exist an integer y = 0 such that ∀x ∈ N, x · y = 0) and the truth value of ∀x∃!yP (x, y) is false
(Since, when x = 0, x · y = 0 for all values of y). Therefore, the implication is false for the given
predicate.

28. Prove or Disprove: ∀x(P (x) ∨ Q(x)) → ∀xP (x) ∨ ∃xQ(x)


Solution:

13
Proof by contradiction: Assume on the contrary that the conclusion is False. i.e., include ¬ Conclusion
as part of premise.

premise ∀x (P (x) ∨ Q(x)) ... (1)


premise assumed ¬[∀x P (x) ∨ ∃x Q(x)] ... (2)
2 ¬∀x P (x) ∧ ¬∃x Q(x) ... (3)
3 ∃x ¬P (x) ∧ ∀x ¬Q(x) ... (4)
4 ∃x ¬P (x) ... (5)
EI of 5 ¬P (a) ... (6)
4 ∀x ¬Q(x) ... (7)
U I of 7 ¬Q(a) ... (8)
7, 8 ¬P (a) ∧ ¬Q(a) ... (9)
9 ¬[P (a) ∨ Q(a)] ... (10)
U I of 1 P (a) ∨ Q(a) ... (11)
10, 11 ¬[P (a) ∨ Q(a)] ∧ [P (a) ∨ Q(a)] a contradiction

Therefore our assumption is wrong/False and conclusion is True. Therefore ∀x P (x) ∨ ∃x Q(x) follows
from ∀x (P (x) ∨ Q(x)).

(or)

Premise ∀x(P (x) ∨ Q(x)) → ∀xP (x) ∨ ∃xQ(x)


↔ ¬∀x(P (x) ∨ Q(x)) ∨ (∀xP (x) ∨ ∃xQ(x))
↔ ∃x¬(P (x) ∨ Q(x)) ∨ (∀xP (x) ∨ ∃xQ(x))
↔ ∃x(¬P (x) ∧ ¬Q(x)) ∨ (∀xP (x) ∨ ∃xQ(x))
↔ ((∃x¬P (x)) ∧ (∃x¬Q(x))) ∨ (∀xP (x) ∨ ∃xQ(x))
↔ ((¬∀xP (x)) ∧ (¬∀xQ(x))) ∨ (∀xP (x) ∨ ∃xQ(x))

∀xP (x), ∀xQ(x) and ∃xQ(x) are atomic predicates. Therefore, we can check the validity of the above
proposition using truth table.
A B C D E
∀xP (x) ∀xQ(x) ∃xQ(x) ¬A ¬B ¬A ∧ ¬B A∨C D∨E
1 1 1 0 0 0 1 1
1 1 0 (NA) (NA) (NA) (NA) (NA) (NA)
1 0 1 0 1 0 1 1
1 0 0 0 1 0 1 1
0 1 1 1 0 0 1 1
0 1 0 (NA) (NA) (NA) (NA) (NA) (NA)
0 0 1 1 1 1 1 1
0 0 0 1 1 1 0 1

Since, the last column forms a tautology, the given proposition is true.

29. All lions are animals. Therefore, all heads of lions are heads of animals.
We shall present FOL followed by a proof to establish this claim.

L(x) : x is a lion. A(x) : x is an animal H(x, y) : x is a head of y (head means the leader of the group)

for example, ”x is a head of a lion” in logic ∃y(L(y) ∧ H(x, y))

14
Given: [∀x(L(x) → A(x))] →
[∀x(L(x) ∧ ∃y(L(y) ∧ H(x, y)) → ∃y(A(y) ∧ H(x, y)))]
To prove, we shall follow a proof by contradiction. We shall include the negation of the conclusion for
arguments. Since with just premise, deriving the conclusion is not possible, we have chosen this proof
technique.
Consider ∀x(L(x) → A(x)) ∧ ¬[∀x(L(x) ∧ ∃y(L(y) ∧ H(x, y)) → ∃y(A(y) ∧ H(x, y)))]
We need to show that the above expression is unsatisfiable (False).

¬[∀x(L(x) ∧ ∃y(L(y) ∧ H(x, y)) → ∃y(A(y) ∧ H(x, y)))]

∃x¬((L(x) ∧ ∃y(L(y) ∧ H(x, y))) → ∃y(A(y) ∧ H(x, y)))

∃x((L(x) ∧ ∃y(L(y) ∧ H(x, y))) ∧ ¬(∃y(A(y) ∧ H(x, y))))

E.I with respect to x,

(L(a) ∧ ∃y(L(y) ∧ H(a, y))) ∧ ¬(∃y(A(y) ∧ H(a, y))), for some a

(L(a) ∧ ∃y(L(y) ∧ H(a, y))) ∧ (∀y(¬A(y) ∧ ¬H(a, y)))

E.I with respect to y,

(L(a) ∧ (L(b) ∧ H(a, b))) ∧ (∀y(¬A(y) ∧ ¬H(a, y))), for some b

U.I with respect to y,

(L(a) ∧ (L(b) ∧ H(a, b)) ∧ (¬A(b) ∧ ¬H(a, b))), for any b

Since P ∧ Q is P , drop L(a) from the above expression.


(L(b) ∧ H(a, b)) ∧ (¬A(b) ∧ ¬H(a, b))), for any b

Apply distribution

(L(b) ∧ H(a, b) ∧ ¬A(b)) ∨ (L(b) ∧ H(a, b) ∧ ¬H(a, b))

Note: P ∧ ¬P is false. P ∧ f alse is P . Therefore, the above expression is simplified to

(L(b) ∧ H(a, b) ∧ ¬A(b))


U.I of ∀x(L(x) → A(x)) gives L(b) → A(b). The contrapositive of this is ¬A(b) → ¬L(b). Replace
¬A(b) in the above expression with ¬L(b). Thus, we get,

(L(b) ∧ H(a, b) ∧ ¬L(b)), this is again false.

This shows that our assumption that the conclusion is false is wrong. Therefore, the conclusion follows
from the premise.

15

You might also like