Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
100 views

Discrete Structure (Assignment)

The document provides examples of writing logical statements in symbolic form using symbols like ~, ∨, and ∧. It also includes truth tables for various logical statements and examples determining if statements are logically equivalent. Examples are given for using De Morgan's laws, logical equivalence theorems, contrapositives, and valid/invalid argument forms. The document covers topics like symbolic logic, truth tables, logical equivalences, and valid argument forms.

Uploaded by

kripal shrestha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views

Discrete Structure (Assignment)

The document provides examples of writing logical statements in symbolic form using symbols like ~, ∨, and ∧. It also includes truth tables for various logical statements and examples determining if statements are logically equivalent. Examples are given for using De Morgan's laws, logical equivalence theorems, contrapositives, and valid/invalid argument forms. The document covers topics like symbolic logic, truth tables, logical equivalences, and valid argument forms.

Uploaded by

kripal shrestha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

1.

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

b) Let h=“John is healthy”, w=“John is wealthy”, and s=“John is wise”.

i. John is healthy and wealthy but not wise.


Ans. (h ∧ w) ∧ ~s

ii. John is not wealthy but he is healthy and wise.


Ans. ~ w ∧ (h ∧ s)

iii. John is neither healthy, wealthy, nor wise.


Ans. (~h ∧ ~w) ∨ ~s

iv. John is neither wealthy nor wise, but he is healthy.


Ans. (~w ∨ ~s) ∧ h

v. John is wealthy, but he is not both healthy and wise.


Ans. w ∧ (~h ∧ ~s)

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)

2. Write truth tables for statements below:


a) ∼ p ∧ q
Ans.
p q ~p ~p∧ q

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).

4. Use De Morgan’s laws to write negations for the statements below:

a) Hal is a math major and Hal’s sister is a computer science major.


Ans. Hal is not a math major or Hal’s sister is a computer science major.

b) The train is late or my watch is fast.


Ans. The train is not late and my watch is not fast.

c) The connector is loose or the machine is unplugged.


Ans. The connector is not loose and the machine is not unplugged.

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.

e) Sam is an orange belt and Kate is a red belt.


Ans. Sam is not an orange belt or Kate is a red belt.
5. Use Logical Equivalence Theorem to verify the logical equivalences below:

a) (p∧ ∼q) ∨ p ≡ p
Ans. (p∧ ∼q) ∨ p ≡ p ∨ (p∧ ∼q)
≡p

b) ∼(p ∨ ∼q) ∨ (∼p ∧ ∼q) ≡∼ p


Ans. ∼(p ∨ ∼q) ∨ (∼p ∧ ∼q) ≡ (~p ∧ ∼(~q)) ∨ (~p ∧ ~q) De Morgan’s Law
≡ (~p ∧ q) ∨ (~p ∧ ~q) Double negative Law
≡ ~p ∧ (q ∨ ~q) Distributive Law
≡ ~p ∧ t Negation Law
≡ ~p Identity Law
6. Write negations for each of the following statements. (Assume that all variables represent
fixed quantities or entities, as appropriate.)

a) If P is a square, the P is a rectangle.


Ans. If P is not square, P is rectangle.

b) If today is New Year’s Eve, the tomorrow is January.


Ans. If today is not New Year’s Eve, Tomorrow is January.

c) if the decimal expansion of r is terminating, then r is rational.


Ans. If the decimal expansion of r is not terminating, then r is rational.

d) If n is prime, then n is odd or n is 2.


Ans. If n is not odd or n is not 2, then n is not a prime.

7. Rewrite the statements below in if-then form.

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.

a) Being divisible by 3 is necessary condition for this number to be divisible by 9.


Ans. a) If the number is divisible by 9, then it is divisible by 3.
b) If the number is not divisible by 9, then it is not divisible by 3.

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

You might also like