0% found this document useful (0 votes)
2 views6 pages

Midterm Exam Answer

The document is a midterm exam for Discrete Math covering various topics including truth tables, logical propositions, and proofs related to odd integers. It includes questions requiring the construction of truth tables, evaluation of logical statements, and proofs using direct and contradiction methods. The answers provided demonstrate the application of logical reasoning and mathematical principles.

Uploaded by

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

Midterm Exam Answer

The document is a midterm exam for Discrete Math covering various topics including truth tables, logical propositions, and proofs related to odd integers. It includes questions requiring the construction of truth tables, evaluation of logical statements, and proofs using direct and contradiction methods. The answers provided demonstrate the application of logical reasoning and mathematical principles.

Uploaded by

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

Midterm Exam: Discrete Math (CSCI-241 and COSC-241)

1.

Figure 1. Basic Logic gate

Ans: !(¬𝒑 ∨ ¬𝒓) ∧ ¬𝒒* ∨ (¬𝒑 ∧ (𝒒 ∨ 𝒓)

2. How many rows appear in a truth table for each of these compound propositions?
Ans:
a) 4
b) 8
c) 64
d) 32

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

Ans:

4. What is the value of x after each of these statements is encountered in a computer


program, if x = 1 before the statement is reached?

Ans:

a) x=2
b) x =1
c) x =2
d) x=1
e) x=2
5. Determine the truth value of each of these statements if the domain of each variable
consists of all real numbers.

Ans:
!
a) This preposition is True because there is a real number x = √2 for that √2 = 2.
b) The preposition is False because there is no real number that 𝑥 ! = -1. The 𝑥 ! is
always positive.
c) The preposition is True 2 is bigger than 1 and 𝑥 ! is always positive so 𝑥 ! + 2 is
bigger than 1 for all real number.
d) The preposition is False because not for all of real number that make 𝑥 ! ≠ 𝑥.
For example, a real number x = 1 cannot make the statement 𝑥 ! ≠ 𝑥 true,
because 1! = 1

6. …Express

Ans:

a)
• ¬!∀𝑥(−2 < 𝑥 < 3)* = ¬(∀𝑥)¬(−2 < 𝑥 < 3) = ∃𝑥(3 ≤ 𝑥 ≤ −2)
• ∃x such that x ≤−2 or x ≥ 3
b)
• ¬!∀𝑥(0 ≤ 𝑥 < 5)* = ¬!∀𝑥) ¬(0 ≤ 𝑥 < 5)* = ∃𝑥(5 ≤ 𝑥 < 0)
• ∃x such that x < 0 or x ≥ 5

c)

• ¬(∃𝑥(−4 ≤ 𝑥 ≤ 1)) = ¬∃𝑥¬(−4 ≤ 𝑥 ≤ 1) = ∀𝑥(1 < 𝑥 < −4


• ∀x, x < −4 or x > 1

d)

• ¬(∃𝑥(−5 < 𝑥 < −1)) = ¬(∃𝑥¬(−5 < 𝑥 < −1)) = ∀𝑥(−1 ≤ 𝑥 ≤ −5)
• ∀x, x ≤ −5 or x ≥ −1

7. Express

Ans:
¬( ∀𝑥∃𝑦𝑃(𝑥, 𝑦) ∨ ∀𝑥∃𝑦𝑄(𝑥, 𝑦)) = ¬( ∀𝑥∃𝑦𝑃(𝑥, 𝑦)) ∧ ¬(∀𝑥∃𝑦𝑄(𝑥, 𝑦))
= ¬∀𝑥¬∃𝑦¬𝑃(𝑥, 𝑦)) ∧ ¬∀𝑥¬∃𝑦¬𝑄(𝑥, 𝑦)
= ∃𝑥∀𝑦 ¬𝑃(𝑥, 𝑦) ∧ ∃𝑥∀𝑦¬𝑄(𝑥, 𝑦)

8. Prove that if n is a positive integer, then n is odd if and only if 5n + 6 is odd.

Ans:

• Proof by using Direct Proof

Prove n is odd ⇒5n+6 is odd

If n is odd, then:

n = 2k+1

Substituting into 5n+6

5n+6 = 5(2k+1)+6 = 10k + 5 + 6 = 10k + 11

Since 10k + 11 = 2(5k+5) + 1, it is odd.


• Proof by using contradiction
We assume that nnn is odd, but 5n+65n + 65n+6 is even.

Since nnn is odd, we can write it as:

n= 2k+1,for some integer k

5n+6 = 5(2k+1) + 6 =10k + 5 +6 = 10k+11

Since 10k+11 =2(5k+5)+1, it is clealry odd.

We assumed that 5n+6 is even, but we derived that it is odd. This contradiction shows that our
assumption is false, meaning if n is odd, then 5n+6 must be odd.

9.

10+31+20+14+9+27
10.

Ans:

You might also like