0% found this document useful (0 votes)
15 views

TD2 Logic

The document contains exercises from a discrete mathematics course on logic and Boolean operations. It includes problems involving truth tables, logical equivalences using quantifiers, sets and relations, and bitwise operations on sets. Some examples are determining the truth values of logical statements involving quantifiers over integers, proving logical statements using contradiction, and performing bitwise operations on sets represented as bit strings.

Uploaded by

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

TD2 Logic

The document contains exercises from a discrete mathematics course on logic and Boolean operations. It includes problems involving truth tables, logical equivalences using quantifiers, sets and relations, and bitwise operations on sets. Some examples are determining the truth values of logical statements involving quantifiers over integers, proving logical statements using contradiction, and performing bitwise operations on sets represented as bit strings.

Uploaded by

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

Antonine University

Year : 2023 - 2024 Discrete Mathematics First Semester

Chapter 2 - Logic and Boolean operations

Exercise 1 Let p, q and r be propositions. Write the truth table of the following compound
propositions:

1. (p ∧ q) ∨ ¬(p → q)

2. (p ∧ q) ∧ (p ↔ r) ∧ (q → r).

Exercise 2 Let p and q be propositions. Show that

1. if q is false then (p ∨ q) ↔ p is a tautology.

2. if q is true then (p ∧ q) ↔ p is a tautology.

Exercise 3 Let p, q and r be propositions. Without using truth table, prove that the following
compound propositions are tautologies:

1. [¬p ∧ (p ∨ q)] → q

2. [(p ∧ q) ∨ (p ∧ ¬q)] ↔ p

3. [p ∧ (p → q)] → q

4. [(p ∨ r) → (q ∨ r)] ↔ [p → (q ∨ r)]

5. [p → (q → r)] ↔ [(p ∧ q) → r]

Exercise 4 Let p(x) = “x ≤ 5”, q(x) = “x + 1 is odd” and r(x) = “x > 0” be three statements
defined on Z.

1. Give the truth values of the following compound propositions:

• q(2) ⊕ ¬(r(−5))
• ¬[p(−4) ∨ q(−3)]
• q(3) ∨ [p(3) ∨ ¬(r(3))]
• p(2) → [q(2) → r(2)]
• [p(2) ∧ q(2)] → r(2)
• p(0) → [¬(q(−1)) ↔ r(1)]

2. Determine the values of x for which the statement [p(x) ∧ q(x)] ∧ r(x) is True.

3. Give the truth value of the following propositions:

• ∃ x ∈ Z; [p(x) ∧ r(x)]
• ∀ x ∈ Z, [p(x) ∨ q(x)]
• ∃ x ∈ Z; ¬[p(x) ∨ r(x)]

Exercise 5 Write the following propositions in terms of quantifiers.

1. The square of every real number is greater than or equal to zero.


2. The addition is commutative on the set of real numbers.

3. There exists a natural number whose product with every real number is zero.

Exercise 6 Give the truth value of the following propositions. Justify your answer. Then, write
their negation.

1. ∀ x ∈ R, (x + 1)2 > 0.

2. (∃ x ∈ R; x + 1 = 0) and (∃ x ∈ R; x + 2 = 0).

3. ∀ x ∈ R, (x2 > 0 or x ≤ 0).

4. (∀ x ∈ R, x2 > 0) or (∀ x ∈ R, x ≤ 0).

5. ∀ x ∈ Z, if x is odd then x is prime.

6. ∀ x ∈ Z, x is even if and only if 2x is even.

Exercise 7 1. Let n ∈ Z. Prove by contraposition that if n3 + 5 is odd then n is even.

2. Let A and B be sets such that A ⊕ B = A. Prove by contradiction that B = ∅.


a b
3. Let a, b ∈ R+ . Show by contradiction that if = then a = b.
1+b 1+a

Exercise 8 Suppose that the universal set U = {5, 6, 7, 8, 9, 10, 12, 19, 21, 33, 90}.

1. What bit string represents the subset A of all prime numbers? Call it “a”.

2. What bit string represents the subset B of all odd integers? Call it “b”.

3. Find the bitwise NOT of each string “a” and “b”.

4. Deduce A and B.

5. Find the bitwise AND, the bitwise OR and the bitwise XOR of strings “a” and “b”.

6. Deduce A ∪ B, A ⊕ B and A ∩ B.

You might also like