ch1 - Discrete Math
ch1 - Discrete Math
Ch1-2
Table 3. The truth table for the Disjunction (or) of two propositions.
eg. p : "Today is Friday. "
p q pq q : "It’s raining today . "
T T T p q : "Today is Friday
or
T F T
it’s raining
F T T
today. "
F F F
Ch1-4
Def : In the implication p → q , p is called the hypothesis
( 假設 ) and q is called the conclusion ( 結論 ).
Def : Compound propositions ( 合成命題 ) are formed from
existing propositions using logical operators. ( 即 、 、
⊕、 →等 )
Table 6. The truth table for the Biconditional p ↔ q
( p → q and q → p )
( 若且唯若 )
p q p → q q → p p ↔ q“p if and only if q”
T T T T T
“p iff q ”
T F F T F
“If p then q , and
F T T F F
F F T T T conversely.”
Ch1-5
Translating English Sentences
into Logical Expression
Example 9 : How can the following English sentence be
translated into a logical expression ?
“You can access the Internet from campus only if
Ch1-8
ex: Are the following specifications consistent?
“The system is in multiuser state if and only if it is
operating normally. If the system is operating normally,
the kernel is functioning. The kernel is not functioning or
the system is in interrupt mode. If the system is not in
multiuser state, then it is in interrupt mode. The system is
not in interrupt mode.”
Sol:
Let p be “the system is in multiuser state”,
q be “the system is operating normally”,
and r be “the kernel is functioning”.
題目的敘述等同於:
p q, q r, r q, p q, q T
因 q r 需為真,故 r T ,
因 r q 需為真,故 not consistent
Ch1-9
1-2 Propositional Equivalences
Def 1: A compound proposition that is always true
is called a tautology. ( 真理 )
A compound proposition that is always false
is called a contradiction. ( 矛盾 )
Example 1 :
p ﹁ p p
p ﹁p ﹁p
T F T F
F T T F
Def 2: The propositions p and q that have the same
truth values in all possible cases are called
logically equivalent.
The notation p ≡ q ( or p q ) denotes that p and q
are logically equivalent. Ch1-10
Example 2 : Show that ﹁ ( p q ) ≡ ﹁ p ﹁ q
pf : p q ﹁ ( p q ) ﹁ p ﹁ q ﹁ p ﹁ q
T T F F F F
T F F F T F
F T F T F F
F F T T T T
(9) p ﹁ p ≡ T
(10) p ﹁ p ≡ F
(11) p → q ≡ ﹁ p q
Ch1-12
Example 8 : Show ( p q ) → (p q) is a tautology.
pf :
( p q ) → (p q) ≡ ﹁ ( p q ) (p q ) By (11)
≡ ( ﹁ p ﹁ q ) (p q ) By (7)
≡TT
≡T
Exercise : 9 、 11 、 17
Ch1-13
1-3 Predicates and Quantifiers
屬性 數量詞
目標 : 了解 ∀ 及 ∃ 符號
Def : The statement P(x) is said to be the value of the
propositional function P at x .
ex :
P(x) : “ x is greater than 3 “
variable predicate
※ 命題中出現變數 x 時
the domain of x 指的是 x 的範圍
※Quantifiers : ( 數量詞,如 some , any , all 等 )
∀ : universal quantifier ( for all, for every )
∃ : existential quantifier ( there exist, there is, for some )
Ch1-14
Table 1. Quantifiers
Statement When True ? When False ?
∀x P(x) P(x) is true for every There is an x for
x. which P(x) is false.
∃x P(x) There is an x for P(x) is false for every
which P(x) is true. x.
Example 16 : Let P(x) : x2 > 10, when x ∈ Z, x ≤ 4
What is the truth value of ∃x P(x) ?
Sol :
x ∈ {1, 2, 3, 4}
∴ 42 = 16 > 10
∴ ∃x P(x) is true.
Ch1-15
Table 2. Negating Quantifiers.
Negation Equivalent When True ? When False ?
Statement
﹁∃ x ∀x ﹁ P(x) P(x) is false for ∃x, s.t. P(x) is
P(x) every x. true.
﹁∀ x ∃x ﹁ P(x) ∃x, s.t. P(x) is P(x) is true for
P(x) false every x.
Exercise : 11 、 13 、 15 、 53
Ch1-16
補充 : 習題 52
“∃ !” 表示 存在且唯一
∃ !x P(x) 表示 “ There exists a unique x s.t. P(x) is
true.”