100% found this document useful (2 votes)
45 views9 pages

Exercise Logics DM

The document consists of various exercises and answers related to propositions, truth tables, logical equivalences, and negations in propositional logic. It includes tasks such as constructing truth tables, verifying tautologies, and determining the validity of arguments. Additionally, it covers the contrapositive of statements, the truth values of quantified statements, and the construction of combinatorial circuits.

Uploaded by

dollkhann0011
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
45 views9 pages

Exercise Logics DM

The document consists of various exercises and answers related to propositions, truth tables, logical equivalences, and negations in propositional logic. It includes tasks such as constructing truth tables, verifying tautologies, and determining the validity of arguments. Additionally, it covers the contrapositive of statements, the truth values of quantified statements, and the construction of combinatorial circuits.

Uploaded by

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

EXERCISE RELATED TO

PROPOSITIONS AND TRUTH TABLES

QUESTION
Let p be “It is cold” and let q be “It is raining”. Give a simple verbal sentence which
describes each of the
following statements:
(a) ¬p;
(b) p ∧ q;
(c) p ∨ q;
(d) q ∨¬p.

ANSWER:
In each case, translate ∧, ∨, and ∼ to read “and,” “or,” and “It is false that” or “not,”
respectively, and then simplify the English sentence.

(a) It is not cold. (c) It is cold or it is raining.


(b) It is cold and raining. (d) It is raining or it is not cold.

QUESTION
Find the truth table of ¬p ∧ q.

ANSWER:
Construct the truth table of ¬p ∧ q as in Fig.

QUESTION
Verify that the proposition p ∨¬(p ∧ q) is a tautology.

ANSWER:
Construct the truth table of p ∨¬(p ∧ q) as shown in Fig. Since the truth value of p ∨¬(p ∧ q) is
T for
all values of p and q, the proposition is a tautology.
QUESTION
Show that the propositions ¬(p ∧ q) and ¬p ∨¬q are logically equivalent.

ANSWER:
Construct the truth tables for ¬(p ∧ q) and ¬p ∨ ¬q as in Fig. 4-10. Since the truth tables are
the same (bothpropositions are false in the first case and true in the other three cases), the
propositions ¬(p ∧ q) and ¬p ∨ ¬q arelogically equivalent and we can write
¬(p ∧ q) ≡ ¬p ∨¬q.

QUESTION
Consider the conditional proposition p → q. The simple propositions q → p, ¬p → ¬q
and ¬q → ¬p are called, respectively, the converse, inverse, and contrapositive of the
conditional p → q. Which if any of these propositions are logically equivalent to p → q?

ANSWER:
Construct their truth tables as in Fig.. Only the contrapositive ¬q →¬p is logically equivalent to
the original conditional proposition p → q.

QUESTION
Determine the contrapositive of each statement:
(a) If Erik is a poet, then he is poor.
(b) Only if Marc studies will he pass the test.

ANSWER:
(a) The contrapositive of p → q is ¬q →¬p. Hence the contrapositive follows:
If Erik is not poor, then he is not a poet.

(b) The statement is equivalent to: “If Marc passes the test, then he studied.” Thus its
contrapositive is:
If Marc does not study, then he will not pass the test.

QUESTION
Write the negation of each statement as simply as possible:
(a) If she works, she will earn money.
(b) He swims if and only if the water is warm.
(c) If it snows, then they do not drive the car.

ANSWER:
(a) Note that ¬(p → q) ≡ p ∧¬q; hence the negation of the statement is:
She works or she will not earn money.

(b) Note that ¬(p ↔ q) ≡ p ↔¬q ≡ ¬p ↔ q ; hence the negation of the statement is either of the
following:
He swims if and only if the water is not warm.
He does not swim if and only if the water is warm.
(c) Note that ¬(p →¬q) ≡ p ∧¬¬q ≡ p ∧ q. Hence the negation of the statement is:
It snows and they drive the car.

QUESTION
Let A = {1, 2, 3, 4, 5}. Determine the truth value of each of the following statements:
(a) (∃x ∈ A)(x + 3 = 10) (c) (∃x ∈ A)(x + 3 < 5)
(b) (∀x ∈ A)(x + 3 < 10) (d) (∀x ∈ A)(x + 3 ≤ 7)

ANSWER:
(a) False. For no number in A is a solution to x + 3 = 10.
(b) True. For every number in A satisfies x + 3 < 10.
(c) True. For if x0 = 1, then x0 + 3 < 5, i.e., 1 is a solution.
(d) False. For if x0 = 5, then x0 + 3 is not less than or equal 7. In other words, 5 is not a
solution to the given
condition.

QUESTION
Determine the truth value of each of the following statements where U = {1, 2, 3} is
the universal set:
(a) ∃x∀y, x2 < y + 1;
(b) ∀x∃y, x2 + y2 < 12;
(c) ∀x∀y, x2 + y2 < 12.

ANSWER:
(a) True. For if x = 1, then 1, 2, and 3 are all solutions to 1 < y + 1.
(b) True. For each x0, let y = 1; then x2+ 1 < 12 is a true statement.
(c) False. For if x0 = 2 and y0 = 3, then x2+ y2 < 12 is not a true statement.

QUESTION
Let p(x) denote the sentence “x + 2 > 5.” State whether or not p(x) is a propositional
function on each of the following sets:
(a) N, the set of positive integers;
(b) M = {−1,−2,−3, . . .};
(c) C, the set of complex numbers.

ANSWER:
(a) Yes.
(b) Although p(x) is false for every element in M, p(x) is still a propositional function on M.
(c) No. Note that 2i + 2 > 5 does not have any meaning. In other words, inequalities are not
defined for complex numbers.
QUESTION
Negate each of the following statements:
(a) All students live in the dormitories.
(b) All mathematics majors are males.
(c) Some students are 25 years old or older.

ANSWER:
(a) At least one student does not live in the dormitories. (Some students do not live in the
dormitories.)
(b) At least one mathematics major is female. (Some mathematics majors are female.)
(c) None of the students is 25 years old or older. (All the students are under 25.)

QUESTION
Let p denote “He is rich” and let q denote “He is happy.” Write each statement in symbolic
form using p and q. Note that “He is poor” and “He is unhappy” are equivalent to ¬p and ¬q,
respectively.

(a) If he is rich, then he is unhappy. (c) It is necessary to be poor in order to


be happy.
(b) He is neither rich nor happy. (d) To be poor is to be unhappy.

ANSWER:

(a) p→¬q;
(b) ¬p ∧¬q;
(c) q→¬p;
(d) ¬p →¬q.

QUESTION
Find the truth tables for. (a) p ∨¬q; (b) ¬p ∧¬q.

(a) T, T, F, T; (b) F, F, F, T.

QUESTION
Verify that the proposition (p ∧ q)∧¬(p ∨ q) is a contradiction.

ANSWER:
Construct its truth table. It is a contradiction since
its truth table is false for all values of p and q.

QUESTION
Test the validity of each argument:
(a) If it rains, Erik will be sick.
(b) If it rains, Erik will be sick.
It did not rain. Erik was not sick.
Erik was not sick. It did not rain.

ANSWER:
First translate the arguments into symbolic form:
p for “It rains,” and q for “Erik is sick:”
(a) p → q, ¬p $ ¬q
(b) p → q, ¬q $ ¬p
.

QUESTION
Test the validity of the following argument:
If I study, then I will not fail mathematics.
If I do not play basketball, then I will study.
But I failed mathematics.
Therefore I must have played basketball.

ANSWER:

Let
p be “I study,”
q be “I failed mathematics,” and
r be “I play basketball.”
The argument has the form:
p →¬q, ¬r → p,

Construct the truth tables as in Fig. , where the premises p →¬q, ¬r → p, and q are true
simultaneously only in the fifth line of the table, and in that case the conclusion r is also true.
Hence the argument is valid.

QUESTION
Negate each of the following statements:
(a) If the teacher is absent, then some students do not complete their homework.
(b) All the students completed their homework and the teacher is present.
(c) Some of the students did not complete their homework or the teacher is absent.

ANSWER:
(a) The teacher is absent and all the students completed their homework.
(b) Some of the students did not complete their homework or the teacher is absent.
(c) All the students completed their homework and the teacher is present.

QUESTION
Find a counterexample for each statement were U = {3, 5, 7, 9} is the universal set:
(a) ∀x, x + 3 ≥ 7,

(b) ∀x, x is odd,

(c) ∀x, x is prime,

(d) ∀x, |x| = x

ANSWER:

(a) Here 3 is a counterexample.


(b) The statement is true; hence no counterexample exists.
(c) Here 9 is the only counterexample.
(d) The statement is true; hence there is no counterexample.

QUESTION
Construct a combinatorial circuit using inverters, OR gates, and AND gates that produces
the output
(p ∧¬r) ∨ (¬q ∧ r) from input bits p, q, and r.
ANSWER:

p q r ¬q ¬r (p ∧¬r) (¬q ∧ r) (p ∧¬r) ∨ (¬q ∧ r)


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

QUESTION
Construct a combinatorial circuit using inverters, OR gates, and AND gates that produces
the output
((¬p ∨¬r)∧¬q) ∨ (¬p ∧ (q ∨ r)) from input bits p, q, and r.

ANSWER:
Do it by yourself.

QUESTION
Show that ¬(¬p) and p are logically equivalent.
ANSWER:

p ¬p ¬(¬p)
T F T

QUESTION
Use truth tables to verify the commutative laws
a) p ∨ q ≡ q ∨ p.
b) p ∧ q ≡p ∧ q

ANSWER:
a) Make table of p ∨ q and then q ∨ p. Show that they are logically equal.
b) Make table p ∧ q of and then p ∧ q. Show that they are logically equal.
QUESTION
Use truth tables to verify the associative laws
a) (p ∨ q) ∨ r ≡ p ∨ (q ∨ r).
b) (p ∧ q) ∧ r ≡ p ∧ (q ∧ r).

ANSWER:
Make tables
a)

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

p q r (q ∨ r) p ∨ (q ∨r).
T T T T T
T T F T T
T F T T T
T F F F T
F T T T T
F T F T T
F F T T T
F F F F F

Hence proved (p ∨ q) ∨r and p ∨ (q ∨ r). are logically equivalent.


(p ∨ q) ∨ r ≡ p ∨ (q ∨ r).

b. Do it by your self.

QUESTION
Use a truth table to verify the distributive law
p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r).
ANSWER:
Do it by yourself.

QUESTION
Use a truth table to verify the first De Morgan law
¬(p ∧ q) ≡ ¬p ∨¬q.

ANSWER:
Do it by yourself.
QUESTION
Show that each of these conditional statements is a tautology by using truth tables.
a) (p ∧ q) → p
b) p → (p ∨ q)
c) ¬p → (p → q)
d) (p ∧ q) → (p → q)
e) ¬(p → q) → p
f ) ¬(p → q)→¬q

ANSWER:
Tautology means if all answers are TRUE in table.
a)

p q (p ∧ q) (p ∧ q) → p
T T T T
T F F T
F T F T
F F F T

b)

p q (p ∨ q) p → (p ∨ q)
T T T T
T F T T
F T T T
F F F T

c)

p q ¬p (p → q) ¬p → (p → q)
T T T T T
T F T F T
F T F T T
F F F T T

QUESTION
Show that each of these conditional statements is a tautology by using truth tables.
a) [¬p ∧ (p ∨ q)] → q
b) [(p → q) ∧ (q → r)] → (p → r)
c) [p ∧ (p → q)] → q
d) [(p ∨ q) ∧ (p → r) ∧ (q → r)] → r

QUESTION
Show that (p → q) ∧ (q → r) → (p → r) is a tautology.
QUESTION
Show that (p ∨ q) ∧ (¬p ∨ r) → (q ∨ r) is a tautology.
QUESTION
Show that (p → q) → r and p → (q → r) are not logically equivalent.
QUESTION
Show that (p ∧ q) → r and (p → r) ∧ (q → r) are not logically equivalent.
QUESTION
Show that (p → q) → (r → s) and (p → r) → (q → s) are not logically equivalent.
QUESTION

Show that ¬(p ↔ q) and p ↔¬q are logically equivalent.

QUESTION
Showthatp → q and¬q →¬p are logically equivalent.
QUESTION
Showthat¬p ↔ q and p ↔¬q are logically equivalent.
QUESTION
Show that ¬(p ⊕ q) and p ↔ q are logically equivalent.
QUESTION
Show that ¬(p ↔ q) and ¬p ↔ q are logically equivalent.
QUESTION
Showthat (p → q) ∧ (p → r) and p → (q ∧ r) are logically equivalent.
QUESTION
Show that (p → r) ∧ (q → r) and (p ∨ q) → r are logically equivalent.
QUESTION
Showthat (p → q) ∨ (p → r) and p → (q ∨ r) are logically equivalent.
QUESTION
Show that (p → r) ∨ (q → r) and (p ∧ q) → r are logically equivalent.
QUESTION
Showthat¬p → (q → r) and q → (p ∨ r) are logically equivalent.
QUESTION
Show that p ↔ q and (p → q) ∧ (q → p) are logically equivalent.
QUESTION
Showthat p ↔ q and¬p ↔¬q are logically equivalent.

You might also like