PMAT - 11223 - Lesson 03

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

PMAT 11223 Discrete Mathematics

DISCRETE MATHEMATICS
PMAT 1223
Lesson 03
1.8 PREDICATES
A predicate is a statement about a variable (or variables).
e.g. 𝑥 > 13
𝑥+𝑦 =4
are both predicates.

1.8.1 Notation: 𝑃(𝑥), 𝑃(𝑥, 𝑦) denote predicates of 1 and 2 variables, respectively.


A given predicate may be true or false, depending on the value of the variable.

Example: If 𝑃(𝑥, 𝑦) denotes the statement “ 𝑥 + 𝑦 = 4 ”, i.e.𝑃(𝑥, 𝑦): 𝑥 + 𝑦 = 4, find


the truth values of
i. 𝑃(1,3) True (as 1 + 3 = 4)
ii. 𝑃(−2,2) False (as −2 + 2 = 0 ≠ 4)

1.9 QUANTIFIERS
For a predicate 𝑃(𝑥), there are 2 types of quantifiers.
i. The Universal Quantifier ∀𝑥
∀𝑥: 𝑃(𝑥) means ‘for all 𝑥, 𝑃(𝑥)’, or ‘for every 𝑥, 𝑃(𝑥)’.

ii. The Existential Quantifier ∃𝑥


∃𝑥: 𝑃(𝑥) means ‘there is an 𝑥, such that 𝑃(𝑥)’.
e.g. if 𝑃(𝑥) is ‘𝑥 > 13’, and 𝑥 is a real number, then
∀𝑥: 𝑃(𝑥) is False.
i.e. it is not true that all real numbers are greater than 13, e.g. 𝑃(10) is false.
However,
∃𝑥: 𝑃(𝑥) is True.
i.e. it is true that there is a real number which is greater than 13, e.g. 𝑃(14) is
true.

1.9.1 Example: Determine the truth value of the following, given that 𝑥 is a real number.

i. ∃𝑥: 𝑥 2 = −2 False
𝑥 = ±√−2 is not a real number, i.e. no square of a real number can be negative.

J Munasinghe, Department of Mathematics, University of Kelaniya


1
PMAT 11223 Discrete Mathematics

ii. ∃𝑥: 𝑥 2 = 7 True


𝑥 = √7 is one real number solution as is 𝑥 = −√7.

iii. ∀𝑥: 𝑥 2 + 3 ≥ 0 True


2 2
As 𝑥 ≥ 0, 𝑥 + 3 ≥ 0 for all real numbers.

iv. ∀𝑥: 𝑥 2 ≥ 𝑥 False


1 1
For 𝑥 = 2 , 𝑥 2 = 4, so 𝑥 2 ≥ 𝑥 does not apply for every real number.

1.9.2 NOTE: Truth values can also depend on the ‘universe of discourse’ – the set from which 𝑥
comes.
e.g. In the previous example, if 𝑥 is an integer (instead of a real number), ∃𝑥: 𝑥 2 = 7 is
False, as neither 𝑥 = √7 nor 𝑥 = −√7 is an integer.

1.9.3 SPECIAL UNIVERSES OF DISCOURSE

ℕ, the natural numbers, i.e. 1,2,3, …


ℤ, the integers, i.e. 0, ±1, ±2, ±3, …
𝑎
ℚ, the rational numbers (ratios of integers), i.e. where 𝑎 and 𝑏 are integers with 𝑏 ≠ 0
𝑏
ℝ, the real numbers, i.e. the real number line
Irrational numbers are real numbers which are not rational,
𝑎
e.g. √2, √3, 𝜋, none of which can be written in the form of an exact fraction 𝑏.

1.9.4 Example: Given that 𝑥 is an integer, determine the truth value of,

i. ∃𝑥: 𝑥 2 = −1 False (𝑥 = ±√−1 not an integer)


ii. ∃𝑥: 𝑥 2 = 5 False (𝑥 = ±√5 not an integer)
iii. ∀𝑥: 𝑥 2 + 9 ≥ 0 True (𝑥 2 + 9 ≥ 9 ≥ 0)

1.10 NEGATIONS
The negation of ∀𝑥 𝑃(𝑥) is ~∀𝑥 𝑃(𝑥).
i.e. ‘𝑃(𝑥) is not true for all values of 𝑥’.

e.g. ~∀𝑥: 𝑥 > 3 (for real numbers)


i.e. ‘it is not true that all real numbers are greater than 3’.
This statement can be written as ‘there exists (at least) one real value of 𝑥 which is not
greater than 3’
i.e. ∃𝑥: ~(𝑥 > 3).
J Munasinghe, Department of Mathematics, University of Kelaniya
2
PMAT 11223 Discrete Mathematics

In general,
~∀𝑥 𝑃(𝑥) ≡ ∃𝑥 ~𝑃(𝑥)
Similarly,
~∃𝑥 𝑃(𝑥) ≡ ∀𝑥 ~𝑃(𝑥)

e.g. The negation of ∀𝑥: 𝑥 < 10 is


~∀𝑥: 𝑥 < 10 ≡ ∃𝑥: ~(𝑥 < 10)
or ∃𝑥: 𝑥 ≥ 10

The negation of ∃𝑥: 𝑥 2 = 4 is


~∃𝑥: 𝑥 2 = 4 ≡ ∀𝑥: ~(𝑥 2 = 4 )
or ∀𝑥: 𝑥 2 ≠ 4.

1.11 NESTED QUANTIFIERS


A statement which includes 2 or more of the quantifiers ∀ and ∃ is said to contain nested
quantifiers.

e.g. For 𝑥 and 𝑦 real numbers, ∀𝑥 ∀𝑦: 𝑥 2 + 𝑦 2 ≥ 0 means ‘for all real numbers 𝑥
and 𝑦 , 𝑥 2 + 𝑦 2 ≥ 0.’ This is True (as 𝑥 2 ≥ 0 and 𝑦 2 ≥ 0).

1.11.1 Example: Determine truth value of the following, given that 𝑥 and 𝑦 are real numbers.

i. ∃𝑥 ∃𝑦: 𝑥 + 2𝑦 > 1 True


e.g. if 𝑥 = 2 and 𝑦 = 0, 𝑥 + 2𝑦 = 2 > 1.

ii. ∀𝑥 ∀𝑦: 𝑥 + 2𝑦 > 1 False


e.g. if 𝑥 = 0 and 𝑦 = 0, 𝑥 + 2𝑦 = 0, and the statement is not true for every value of 𝑥
and 𝑦.

iii. ∀𝑥 ∃𝑦: 𝑥𝑦 = 𝑦
i.e. ‘for all real 𝑥, there is a real 𝑦 such that 𝑥𝑦 = 𝑦’.
If 𝑥𝑦 = 𝑦, then 𝑥𝑦 − 𝑦 = 0.
∴ 𝑦(𝑥 − 1) = 0
For this to apply for all 𝑥, 𝑦 must be zero.
∴ 𝑦 = 0, and the statement is True.

iv. ∀𝑦 ∃𝑥: 𝑥𝑦 = 𝑦
i.e. ‘for all real 𝑦, there is a real 𝑥 such that 𝑥𝑦 = 𝑦’.
If 𝑥𝑦 = 𝑦, then 𝑥𝑦 − 𝑦 = 0.
∴ 𝑦(𝑥 − 1) = 0
J Munasinghe, Department of Mathematics, University of Kelaniya
3
PMAT 11223 Discrete Mathematics

For this to apply for all 𝑦, 𝑥 − 1 must be zero.


∴ 𝑥 = 1, and the statement is True.

v. ∀𝑥 ∃𝑦: 𝑥 3 = 𝑦
i.e. ‘for all real 𝑥, there is a real 𝑦 such that 𝑥 3 = 𝑦’.
The statement is True (cubing any real number gives a real number).

vi. ∃𝑦 ∀𝑥: 𝑥 3 = 𝑦
i.e. ‘there is a real 𝑦 such that, for all real 𝑥, 𝑥 3 = 𝑦’.
The statement is False (there is no such real 𝑦 which is the cube of every real number.
i.e. 𝑥 3 does not have a constant value).

1.11.2 NOTE: Order is important – see (v) and (vi) above.

2. METHOD OF PROOF
There are several methods to prove that 𝑝 ⟶ 𝑞 is true.

2.1 DIRECT PROOF


Show that, if 𝑝 is true, then 𝑞 is true.

2.2 INDIRECT PROOF (Proof by Contraposition)


Since 𝑝 ⟶ 𝑞 ≡ ~𝑞 ⟶ ~𝑝, show that, if ~𝑞 is true, then ~𝑝 is true.

Usually, direct proof is used when 𝑝 is simpler than 𝑞. Indirect proof is used when 𝑞 is
simpler than 𝑝.
In proving statements concerning integers, the following conventions are useful.
If 𝑛 is an even integer, then 𝑛 = 2𝑘.
If 𝑛 is an odd integer, then 𝑛 = 2𝑘 + 1. (For some integer k)

2.2.1 Example: Prove

i. If 𝑛 is even, then 𝑛2 + 5𝑛 + 3 is odd.

Proof: For 𝑛 even, 𝑛 = 2𝑘


∴ 𝑛 + 5𝑛 + 3 = (2𝑘)2 + (5 × 2𝑘) + 3
2

= 4𝑘 2 + 10𝑘 + 3
J Munasinghe, Department of Mathematics, University of Kelaniya
4
PMAT 11223 Discrete Mathematics

= 4𝑘 2 + 10𝑘 + 2 + 1
= 2(2𝑘 2 + 5𝑘 + 1) + 1
= 2𝑚 + 1 (Where 𝑚 = 2𝑘 2 + 5𝑘 + 1 ),
which is odd, as required.

2.2.2 NOTE: As 𝑘 is an integer, 𝑚 = 2𝑘 2 + 5𝑘 + 1 is also an integer.


Here,
𝑝: 𝑛 is even, is simpler than
𝑞: 𝑛2 + 5𝑛 + 3 is odd,
and direct proof has been used.

ii. If 3𝑛2 − 2𝑛 + 1 is even, then 𝑛 is odd.

Here,
𝑝: 3𝑛2 − 2𝑛 + 1 is even, is not as simple as
𝑞: 𝑛 is odd,
so indirect proof (~𝑞 ⟶ ~𝑝) is used.
∴ It is required to prove: ‘If 𝑛 is even, then 3𝑛2 − 2𝑛 + 1 is odd’.

Proof: For 𝑛 even, 𝑛 = 2𝑘


∴ 3𝑛 − 2𝑛 + 1 = 3(2𝑘)2 − (2 × 2𝑘) + 1
2

= (3 × 4𝑘 2 ) − 4𝑘 + 1
= 12𝑘 2 − 4𝑘 + 1
= 2(6𝑘 2 − 2𝑘) + 1
= 2𝑚 + 1 (Where 𝑚 = 6𝑘 2 − 2𝑘),
which is odd, as required.

iii. If 𝑛 is odd, then 3𝑛2 − 4𝑛 + 7 is even.

Here,
𝑝: 𝑛 is odd, is simpler than
𝑞: 3𝑛2 − 4𝑛 + 7 is even,
and direct proof is used.

Proof: For 𝑛 odd, 𝑛 = 2𝑘 + 1


∴ 3𝑛2 − 4𝑛 + 7 = 3(2𝑘 + 1)2 − 4(2𝑘 + 1) + 7
= 3(4𝑘 2 + 4𝑘 + 1) − 8𝑘 − 4 + 7
= 12𝑘 2 + 12𝑘 + 3 − 8𝑘 + 3
= 12𝑘 2 + 4𝑘 + 6
= 2(6𝑘 2 + 2𝑘 + 3)
J Munasinghe, Department of Mathematics, University of Kelaniya
5
PMAT 11223 Discrete Mathematics

= 2𝑚 (Where 𝑚 = 6𝑘 2 + 2𝑘 + 3),
which is even, as required.

2.2.3 Example:
i. Attempt direct proof to prove: ‘If 5𝑛 + 3 is odd, then 𝑛 is even’.

Proof: For 5𝑛 + 3 odd, 5𝑛 + 3 = 2𝑘 + 1


∴ 5𝑛 = 2𝑘 − 2
2𝑘 − 2
∴ 𝑛=
5
2𝑘−2
As 𝑛 = is not necessarily an integer, the proof fails.
5

ii. Prove the result by indirect proof. It is required to prove: ‘If 𝑛 is odd, then 5𝑛 + 3 is
even’.

Proof: For 𝑛 odd, 𝑛 = 2𝑘 + 1


∴ 5𝑛 + 3 = 5(2𝑘 + 1) + 3
= 10𝑘 + 5 + 3
= 10𝑘 + 8
= 2(5𝑘 + 4)
= 2𝑚 (Where 𝑚 = 5𝑘 + 4),
which is even, as required.

Some proofs require both direct and indirect techniques.

2.3 ‘IF AND ONLY IF’ PROOFS


To prove 𝑝 ⟷ 𝑞 requires 2 proofs, i.e. 𝑝 ⟶ 𝑞 and 𝑞 ⟶ 𝑝.
In most cases, one proof will be done directly, and the other indirectly,
i.e. 𝑝 ⟷ 𝑞 can be proved by proving 𝑝 ⟶ 𝑞 and ∼ 𝑝 ⟶ ∼ 𝑞(≡ 𝑞 ⟶ 𝑝).

2.3.1 Example: Prove: 𝑛 is odd if and only if 3𝑛2 − 2𝑛 + 5 is even.

Proof:

i. To prove: If 𝑛 is odd, then 3𝑛2 − 2𝑛 + 5 is even.


For 𝑛 odd, 𝑛 = 2𝑘 + 1
∴ 3𝑛2 − 2𝑛 + 5 = 3(2𝑘 + 1)2 − 2(2𝑘 + 1) + 5
J Munasinghe, Department of Mathematics, University of Kelaniya
6
PMAT 11223 Discrete Mathematics

= 3(4𝑘 2 + 4𝑘 + 1) − 4𝑘 − 2 + 5
= 12𝑘 2 + 12𝑘 + 3 − 4𝑘 + 3
= 12𝑘 2 + 8𝑘 + 6
= 2(6𝑘 2 + 4𝑘 + 3)
= 2𝑚 (Where 𝑚 = 6𝑘 2 + 4𝑘 + 3),
which is even, as required.

ii. To prove: If 3𝑛2 − 2𝑛 + 5 is even, then 𝑛 is odd.


i.e. Prove: If 𝑛 is even, then 3𝑛2 − 2𝑛 + 5 is odd. (Indirect proof)

For 𝑛 even, 𝑛 = 2𝑘
∴ 3𝑛2 − 2𝑛 + 5 = 3(2𝑘)2 − (2 × 2𝑘) + 5
= (3 × 4𝑘 2 ) − 4𝑘 + 5
= 12𝑘 2 − 4𝑘 + 4 + 1
= 2(6𝑘 2 − 2𝑘 + 2) + 1
= 2𝑚 + 1 (Where 𝑚 = 6𝑘 2 − 2𝑘 + 2),
which is odd, as required.

J Munasinghe, Department of Mathematics, University of Kelaniya


7

You might also like