Discrete Mathematics

1.1 Propositional logic

1.Proposition

1.Def: A declarative sentence that is either true or false ,but not both.

ex1: x+1=2
Sol: This is not a proposition, cuz when x=1,it’s true while other x makes it false.

2.propositional variables : letters like (p,q,r,s) can denote a propositon

2.logic operators:

1.negation operator: ¬ \neg ¬
2.conjunction: ∧ \land
3.disjunction ∨ \lor
can be divided into [ exclusive OR and inclusive OR]
exclusive or , either q or p can be true ,but not both
inclusive or , either q or p be true ,and namely they can both be true
4.conditional statement: → \to
ways to express implication
if p then q ; p implies q ; if p ,q ; p only if q ; p is sufficient for q;
q is necessary for p ; q if p ; q whenever p ; q unless ¬ \neg ¬ p

p only if q may be the most confusing one:
note that p only if q says that p cannot be true when q is not true.That is when p is true ,q is false the statement is wrong. When p is false whatevear q is true ,cuz the statement only cares about the truth value of p.

5.bioconditionals: ↔ \leftrightarrow
common ways to express it
p is necessary and sufficient for q ; if p then q and conversely;
p if and only if q plus the abbreviation ‘iff’ which can denote only and only if .

3. Precedence of Logic operators

Operator Precedence
¬ \neg ¬ 1
∧ \land 2
∨ \lor 3
→ \to 4
↔ \leftrightarrow 5

4. Converse ,Inverse and Contrapostive

converse of p → \to q : q → \to p
inverse of p → \to q: ¬ \neg ¬p → ¬ \to\neg ¬q
contrastive of p → \to q: ¬ \neg ¬q → \to ¬ \neg ¬q
The contrastive of a statement is equivalent to itself.

5.Bit and Bitwise operation

OR AND XOR

1.2 Application of Propositional Logic

1.Boolean Search

2.Logic puzzles

3.Digital circuits

Both Title 2 & 3 can be solved by using truth table

1.3 Propositional equivalences

1.tautology and contradiction

Def : a compound proposition that is always true , no matter what the truth value of the propositional variables involved in , is called a tautology .
The other proposition which is always false is called contradiction.

2.Logical equivalence

(1)Def : if p ↔ \leftrightarrow q is a tautology , then notation p ≡ \equiv q denotes that p and q are logically equivalent.

(2)ways of proving logical equivalence :
i.truth table : if and only if the truth table agrees can prove
Be care that n variables need a 2^n truth table

ii.logical reasoning : by using the proved logical equivalent to prove the unknown one.

(3) important logical equivalance
i. Identity law
p ∧ \land T ≡ \equiv p
p ∨ \lor F ≡ \equiv p
ii.Domination law
p ∨ \lor T ≡ \equiv T
p ∧ \land F ≡ \equiv F
iii.Indepotent law
p ∧ \land p ≡ \equiv p
p ∨ \lor p ≡ \equiv p
iv.Double negation law
¬ ¬ \neg\neg ¬¬p ≡ \equiv p
v.Commutative laws
p ∨ \lor q ≡ \equiv q ∨ \lor p
p ∧ \land q ≡ \equiv q ∧ \land p
vi.Associative laws
(p ∧ \land q) ∧ \land r ≡ \equiv p ∧ \land (q ∧ \land r)
(p ∨ \lor q) ∨ \lor r ≡ \equiv p ∨ \lor (q ∨ \lor r)
vii.Distributive laws
p ∧ \land (q ∨ \lor r) ≡ \equiv (p ∧ \land q) ∨ \lor (p ∧ \land r)
p ∨ \lor (q ∧ \land r) ≡ \equiv (p ∨ \lor q) ∧ \land (p ∨ \lor r)
viii.De morgan’s laws
¬ \neg ¬(p ∨ \lor q) ≡ \equiv ¬ \neg ¬p ∧ \land ¬ \neg ¬q
¬ \neg ¬(p ∧ \land q) ≡ \equiv ¬ \neg ¬p ∨ \lor ¬ \neg ¬q
ix.Absorption laws
p ∨ \lor (p ∧ \land q) ≡ \equiv p
p ∧ \land (p ∨ \lor q) ≡ \equiv p
x.Negation laws
p ∧ \land ¬ \neg ¬p ≡ \equiv F
p ∨ \lor ¬ \neg ¬p ≡ \equiv T
Conditional logic equivalence
xi.
p → \to q ≡ \equiv ¬ \neg ¬p ∨ \lor q
xii.
p → q ≡ ¬p ∨ q
xiii.
p → q ≡ ¬q → ¬p
xiv.
p ∨ q ≡ ¬p → q
xv.
p ∧ q ≡ ¬(p → ¬q)
xvi.
¬(p → q) ≡ p ∧ ¬q
xvii.
(p → q) ∧ (p → r) ≡ p → (q ∧ r)
(p → r) ∧ (q → r) ≡ (p ∨ q) → r
(p → q) ∨ (p → r) ≡ p → (q ∨ r)
(p → r) ∨ (q → r) ≡ (p ∧ q) → r
Bioconditional equivalence
xviii.
p ↔ q ≡ (p → q) ∧ (q → p)
xix.
p ↔ q ≡ ¬p ↔ ¬q
xx.
p ↔ q ≡ (p ∧ q) ∨ (¬p ∧ ¬q)
xxi.
¬(p ↔ q) ≡ p ↔ ¬q

3.Extending use of associative laws

We can use the notation Vnj=1pj for p1V p2 V p3 V…V pn
and ∧ \land nj=1 as well.

4.Proposition Satisfiablity

你可能感兴趣的:(离散数学)