Sunteți pe pagina 1din 3

GOH MING HOCK (G6458711R)

DITEM1022A

Mathematics for Computing


Homework 2-Logic
1) Let p, q, and r be the propositions
p : You get an A on the final exam
q : You do every exercise in this book
r : You get an A in the class.
Write these propositions using p, q, and r and logical connectives
a) You get an A in the class, but you do not do every exercise in this book.
p Ù¬q

b) You get an A on the final, you do every exercise in this book, and you get
an A in the class.
pÙqÙr

c) To get an A in the class, it is necessary for you to get an A on the final.


r  p

d) You get an A on the final, but you don’t do every exercise in this book;
nevertheless, you get an A in this class.
p Ù¬q Ù r

2) State the converse, contra positive, and inverse of the following conditional
statement.
“If it snows today, I will Ski tomorrow”
P= If it snows today
Q= I will Ski tomorrow
Converse = q ==> p (I will ski tomorrow if it snows today)
Contra positive = ¬ q ==> ¬ p (I will not ski tomorrow if it does not snow
today)
Inverse = ¬ p ==> ¬ q (If it does not snow today, I will not ski tomorrow)
GOH MING HOCK (G6458711R)
DITEM1022A

3) Construct a truth table for each of these compound propositions


a) (pÙq) Ú ¬r

p q r ¬r pÙq (pÙq) Ú ¬r

T T T F T T
T T F T T T
T F T F F F
T F F T F T
F T T F F F
F T F T F T
F F T F T T
F F F T T T

b) (p  q) Ù ( ¬ p  r)

p q r ¬p pq ¬pr (p  q) Ù ( ¬ p  r)
T T T F T T T
T T F F T T T
T F T F F T F
T F F F F T F
F T T T T T T
F T F T T F F
F F T T T T T
F F F T T F F

4) Use the truth table to verify the distributive laws.


GOH MING HOCK (G6458711R)
DITEM1022A

5) Determine whether ¬(p  q )  p is a tautology.

S-ar putea să vă placă și