Algorithmic Foundations 2 Flashcards
(33 cards)
Identity Laws
P ∧ true ≡
P ∨ false ≡
P ∧ true ≡ P
P ∨ false ≡ P
Domination Laws
P ∨ true ≡
P ∧ false ≡
P ∨ true ≡ true
P ∧ false ≡ true
Idempotent Laws
P ∧ P ≡
P ∨ P ≡
P ∧ P ≡ P
P ∨ P ≡ P
Double Negation Law
¬(¬P) ≡ P
Commutative laws
P ∧ Q ≡
P ∨ Q ≡
P ∧ Q ≡ Q ∧ P
P ∨ Q ≡ Q ∨ P
Associative laws
(P ∧ Q) ∧ R ≡
(P ∨ Q) ∨ R ≡
(P ∧ Q ) ∧ R ≡ P ∧ (Q ∧ R)
(P ∨ Q) ∨ R ≡ P ∨ (Q ∨ R)
Distributive Laws
P ∨ (Q ∧ R) ≡
P ∧ (Q ∨ R) ≡
P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R)
P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R)
De Morgan Laws
¬ (P ∧ Q) ≡
¬ (P ∨ Q) ≡
¬ (P ∧ Q) ≡ ¬P ∨ ¬Q
¬ (P ∨ Q) ≡ ¬P ∧ ¬Q
Contradiction and Tautology Laws
P ∧ ¬P ≡
P ∨ ¬P ≡
P ∧ ¬P ≡ false
P ∨ ¬P ≡ true
Implication Law
P → Q ≡
P → Q ≡ ¬P ∨ Q
Exclusive or and Biconditional Laws
P ⊕ Q ≡
P ≡ Q ≡
P ⊕ Q ≡ (P ∨ Q) ∧ ¬(P ∧ Q)
P ≡ Q ≡ (P → Q) ∧ (Q → P)
Quantifier Law One
∀x. ∀y. Q(x, y) ≡
∀x. ∀y. Q(x, y) ≡ ∀y. ∀x. Q(x, y)
Quantifier Law Two
∃x. ∃y. Q(x, y) ≡
∃x. ∃y. Q(x, y) ≡ ∃y. ∃x. Q(x, y)
Quantifier Law Three
¬(∃x. ¬P(x)) ≡
¬(∃x. ¬P(x)) ≡ ∀x. P(x)
Quantifier Law Four
¬(∀x. ¬P(x)) ≡
¬(∀x. ¬P(x)) ≡ ∃x. P(x)
Quantifier Law Five
∀x. (P(x) ∧ Q(x)) ≡
∀x. (P(x) ∧ Q(x)) ≡ ∀x. P(x) ∧ ∀x. Q(x)
Quantifier Law Six
∃x. (P(x) ∨ Q(x)) ≡
∃x. (P(x) ∨ Q(x)) ≡ ∃x. P(x) ∨ ∃x. Q(x)
P ∨ Q means?
P or Q
P ∧ Q means?
P and Q
A fucntion is injective or ‘one-to-one’ if?
|X| ≤ |Y|
informally f maps different elements of X to different elements of Y
A fucntion is surjective or onto if?
|Y| ≤ |X|
informally each value in the codomain has a preimage
∀y. ∃x. (f(x) = y)
If a fucntion is bijecitve then?
Both injective and surjective
|X| = |Y|
Describe what it means for a graph to be connected?
A graph is connected if every pair of vertices is joined by a path.
Describe what it means when a graph is a clique (complete) ?
A graph is complete (a clique) if every pair of vertices is joined by an edge.