Discrete Structure (Assignment)
Discrete Structure (Assignment)
Write the statement below in symbolic form using the symbols ~, ∨ and ∧ and the indicated
letters to represent component statements.
a) Juan is a math major but not a computer science major. (m=“Juan is a math major”, c=“Juan
is a computer science major”)
Ans. m ∧ ~c
c) Either this polynomial has degree 2 or it has degree 3 but not both. (n=“This
polynomial has degree 2”, k=“This polynomial has degree 3”)
Ans. (n ∨ k) ∧ ~(n ∧ k)
T T F F
T F F F
F T T T
F F T F
b) p ∧ (q ∧ r)
Ans.
p q r q∧r p ∧ (q ∧ r)
T T T T T
T F T F F
F T F F F
F F F F F
c) ∼ (p ∧ q) ∨ (p ∨ q)
Ans.
p q p∧q ~(p ∧ q) p∨q ∼ (p ∧ q) ∨ (p ∨ q)
T T T F T T
T F F T T T
F T F T T T
F F F T F T
d) p ∧ (∼ q ∨ r)
Ans.
p q r ~q ~q ∨ r p ∧ (~q ∨ r)
T T T F T T
T F T T T T
F T F F F F
F F F T T F
3. Determine whether the statements forms below are logically equivalent. In each case,
construct a truth table and include a sentence justifying your answer.
a) p ∨ (p ∧ q) and p
Ans.
p q p∧q p ∨ (p ∧ q)
T T T T
T F F T
F T F F
F F F F
Since the truth tables of p ∨ (p ∧ q) and P have the same truth table values. Therefore,
according to the logical equivalence. p ∨ (p ∧ q) ≡ P
b) p ∨ t and t
Ans.
p t p∨t
T T T
T F T
F T T
F F F
Since the truth tables of p ∨ t and t don’t have the same truth table values. Therefore, according
to the logical equivalence p ∨ t ≢ t
c) (p ∧ q) ∧ r and p ∧ (q ∧ r)
Ans.
p q r p∧q (p ∧ q) ∧ r q∧r p ∧ (q ∧ r)
T T T T T T T
T T F T F F F
T F T F F F F
T F F F F F F
F T T F F T F
F T F F F F F
F F T F F F F
F F F F F F F
Since, the truth tables of (p ∧ q) ∧ r and p ∧ (q ∧ r) have the same truth table values. Therefore
according to the logical equivalence (p ∧ q) ∧ r ≡ p ∧ (q ∧ r).
d) This computer program has a logical error in the first ten lines or it is being run with an
incomplete data set.
Ans. This computer program doesn’t have a logical error in the first ten lines and it is not being
run with an incomplete data set.
a) (p∧ ∼q) ∨ p ≡ p
Ans. (p∧ ∼q) ∨ p ≡ p ∨ (p∧ ∼q)
≡p
a) Catching the 8:05 bus is a sufficient condition for my being on time for work.
Ans. If I catch the 8:05 bus then I’ll be on time for work.
b) Having two 45◦angle is sufficient condition for this triangle to be a right triangle.
Ans. If a triangle has two 45◦ angle, then it is a right triangle.
8. Use the contrapositive to rewrite the the statements below in the if-then form in two ways.
b) Doing homework regularly is a necessary condition for Jim to pass the course.
Ans. a) If Jim wants to pass the course, then he needs to do his homework regularly.
b) If Jim does not do his homework regularly, then he won’t pass the course.
9. Use the logical equivalences p → q ≡∼ p ∨ q to rewrite the given statement froms without
using the symbol →and, use the logical equivalence p ∨ q ≡∼ (∼ p∧ ∼ q) to rewrite each
statement for using only ∧and ∼.
a) p ∧ ∼ q → r
Ans. p ∧ q → r ≡ ~(p ∧ ~q) ∨ r
b) p ∨ ∼ q → r ∨ q
Ans. p ∨ ∼ q → r ∨ q ≡ ~(p ∧ ~q) ∨ (r ∨ q)
≡ (~p ∧ ~(~q) ∨ (r ∨ q)) by De Morgan’s law
≡ (~p ∧ q) ∨ (r ∨ q) by Double negative law
10. Use truth table to determine whether the argument forms below are valid. Indicate which
columns represent the premises and which represent the conclusion.
a) p→q
q→p
∴p∨q
Premises
Ans. Conclusion
p q p→q q→p p∨q
T T T T T
T F F T T
F T T F T
F F T T F
Since, the Conclusion in Highlighted rows have false values, the statement is invalid.
b) pVq
p →∼ q
p→r
∴r Premises
Ans. Conclusion
p q r ~p pvq p →∼ q p→r r
T T T F T F T T
T T F F T F F F
T F T T T T T T
T F F T T T F F
F T T F T T T T
F T F F T T T F
F F T T F T T T
F F F T F T T F
Since, the conclusion in Highlighted rows has false values, the statement is invalid.
11. A set of premises and a conclusion are given below. Use the valid arguments forms to
deduce the conclusion from the premises, giving a reason for each step. Assume all variables
are statement variables.
a) p∨q
q→r
p∧s→t
∼r
∼q→u∧s
∴t
Ans.
S.N Steps Reasons
1 p∨q Premise 1
2 q→r Premise 2
3 ∼r Premise 4
4 ~q Modus Tollens on 2 and 3
5 p Elimination on 1 and 4
6 p∧s→t Premise 3
7 p→t Specialization on 6
8 t Modus Ponens on 5 and 7
b) ∼p∨q→r
s∨∼q
∼t
p→t
∼ p ∧ r →∼ s
∴∼q
Ans.
S.N Steps Reasons
1 ∼p∨q→r Premise 1
2 s∨∼q Premise 2
3 ∼t Premise 3
4 p→t Premise 4
5 ~p Modus Tollens on 3 and 4
6 ∼ p ∧ r →∼ s Premise 5
7 ~p →∼ s Specialization on 6
8 ~s Modus Ponens on 5 and 7
9 ~q Elimination on 2 and 8