Вы находитесь на странице: 1из 4

Nguyen Dinh Thang - GT00498

Exercise 1. Express the following sentences in propositional expressions. Set your own
propositional variables or predicates if needed.
If I have money I will buy the new Iphone 6s.
Let m = I have money.
s = I will buy the new Iphone 6s.
We have : m s
Passenger can pass the check-in door if the metal detector doesnt make sound.
Let p = Passenger can pass the check-in door.
m = The metal detector makes sound.
We have : m p
Susan has a friend who makes friend with everyone in school.
Let x = x is a Susans friend.
y = a person in school.
M(x , y) = x makes friend with y.
We have : xyM (x, y)
Patience can check out if and only if the doctor signs a permission document.
Let c = Patience can check out.
s = The doctor signs a permission document.
We have : c s
Every one who doesnt like Donald Trump will vote for the other candidate
Let L(x) = x likes Donald Trump.
V(x,y) = x votes for y who isnt Donald Trump
We have : xL(x) V (x, y)
Exercise 2.

Construct a truth table for each of these compound propositions.

(a) (p q) r
p
T
T
T
T
F
F
F
F

q
T
T
F
F
T
T
F
F

r
T
F
T
F
T
F
T
F

pq
T
T
T
T
T
T
F
F

r
F
T
F
T
F
T
F
T

(p q) r
F
T
F
T
F
T
T
T

(b) (p q) (p q)
p
T
T
F
F

q
T
F
T
F

pq
T
F
T
T

p
F
F
T
T

p q
T
F
T
T

(p q) (p q)
T
T
T
T

Exercise 3. Are p (q r) and q (pr) logically equivalent? Prove your statement


by using laws and verify by using truth table.
p (q r) (p q) (p r)
Using Table 7 , Page 26 (8)
(p q) (p r)
Using Table 7 , Page 26 (3)
p (q (p r))
By the first Associative law
p ((q p) r)
By the first Associative law
(p (q p)) r
By the first Associative law
(p (p q)) r
By the first Commutative law
((p p) q) r
By the first Associative law
(p q) r
By the first Idempotent law
(q p) r
By the first Commutative law
q (p r)
By the first Associative law
q (p r)
By using Table 7, Page 26 (1)
Truth table of p (q r)
p
T
T
T
T
F
F
F
F

q
T
T
F
F
T
T
F
F

r
T
F
T
F
T
F
T
F

q
F
F
T
T
F
F
T
T

q r
T
F
T
T
T
F
T
T

p (q r)
T
F
T
T
T
T
T
T

Truth table of q (p r)
p
T
T
T
T
F
F
F
F

q
T
T
F
F
T
T
F
F

r
T
F
T
F
T
F
T
F

p
F
F
F
F
T
T
T
T

p r
T
F
T
F
T
T
T
T

q (p r)
T
F
T
T
T
T
T
T

Exercise 4. Translate these sentences into English where B(x) is x is a teen boy, G(x)
is x is a teen girl, V(x) is x likes video games, L(x, y) is x likes y, and the domain
consists of all teenagers.
a. x(G(x) V (x))
Every teen girl doesnt like video games.
b. x(G(x) V (x))
There are some teen girls who like video games.
c. x(B(x) V (x))
Every teen boy likes video games.
d. (G(x) V (x)) (yB(y) L(y, x))
If there is a girl who likes video games , then every teen boy loves her.
Exercise 5. For these sets of premises, what rules of inference used to obtain the conclusion from the premises.
There is a person who has read a book but doesnt remember it
Everyone have read a book
Conclusion: There is a person who doesnt remember a book
Let R(x) = x has read a book.
M(x) = x remembers it.
Step

Reason

1. x(R(x) M (x))

Premise

2. R(a) M (a)

Existential instantiation from 1

3. M (a)

Simplification from 2

4. xR(x)

Premise

5. R(a)

Universal instantiation from 4

6. M (a)

Simplification from 3 and 5

7. xM (x)

Existential generalization from 6

Exercise 6. Write you own at least 4 premises. Use rules of inferences to get a conclusion
from these hypothesis.
If I have a motorbike, I will go to FPT University to join Halloween event.
If I do not have a motorbike , I will stay at home.
If I stay at home , I will study Discrete Mathematics.
If I study Discrete Mathematics , I will do Discrete Mathematics exam better.
Conclusion: If I will not go to Fpt University to join Halloween event , I will do
Discrete Mathematics exam better .
3

Let m = I have a motorbike.


f = I will go to FPT University to join Halloween event
h = I will stay at home.
d = I will study Discrete Mathematics.
b = I will do Discrete Mathematics exam better.
Step
1.m f
2. f m
3.m h
4.f h
5.h d
6.f d
7.d b
8.f b

Reason
Premise
Table 7 , Page 26 (2) from 1.
Premise
Hypothetical syllogism from 2 and 3.
Premise
Hypothetical syllogism from 4 and 5.
Premise.
Hypothetical syllogism from 6 and 7.

Exercise 7. - Pigeonhole Principle : If k is a positive integer and k + 1 or more objects


are placed into k boxes , then there is at least one box containing two or more of the objects.
- It is called with another name : Dirichlet drawer principle.Although , it is quite simple
but it is used a lot in real life. By using it in many different cases ,we can easily point
the existence out without giving any specific measurement. We have many examples to
illustrate this such as :
+ There are 193 countries in the world. Therefore , in any group of 194 people, there must
be at least 2 people coming from a same country.
- We also have an extended principle from that , it is called : The Generalized Pigeonhole
Principle : If N objects are placed into k boxes, then there is at least one box containing at
least dN/ke objects.
This principle can be used in Information technology such as :
We have code :
+ int[] a = new int[10];
for(i = 0; i 11 ; i++)
a[i] = i;
The code above will be error , because array a[] just has 10 elements , but our loop repeats 11 times , so the array doesnt have enough empty spaces to contain values of i.
Exercise 8. Show the relations among these terms: induction, recursive definition, recursive algorithm.

Вам также может понравиться