Professional Documents
Culture Documents
http://vustudents.ning.com
Laws of Logic.
1. Cumulative Law
p∧q =q∧ p
p∨q = q∨ p 7. Identity Law
2. Associative Law p ∧t = p
p∨c = p
( p ∧ q ) ∧ r = p ∧ (q ∧ r )
8. Universal Bond Law
( p ∨ q ) ∨ r = p ∨ (q ∨ r )
p∨t =t
3. Distributive Law p ∧c = c
p ∧ (q ∨ r ) = ( p ∧ q ) ∨ ( p ∧ r ) 9. Negation Law
p ∨ (q ∧ r ) = ( p ∨ q ) ∧ ( p ∨ r )
p∨ ~ p = t (Tautology)
4. Idempotent Law p∧ ~ p = c (Contradiction)
~ ( p ∨ q) =~ p ∧ ~ p ~ (~ p) = p
6. Absorption Law
p ∨ ( p ∧ q) = p
p ∧ ( p ∨ q) = p
http://vustudents.ning.com 1
Set Identities.
Let A,B, and C be subsets of a Universal set U. then
1. Idempotent Law:
a. A∪A = A , b. A∩A = A
2. Commutative Law:
a. A∪B = B∪A , b. A∩B = B∩A
3. Associative Law:
a. A ∪ ( B ∪ C ) = ( A ∪ B) ∪ C ,
b. A ∩ ( B ∩ C ) = ( A ∩ B) ∩ C
4. Distributive Law:
a. A ∪ ( B ∩ C ) = ( A ∪ B) ∩ ( A ∪ C ) ,
b. A ∩ ( B ∪ C ) = ( A ∩ B) ∪ ( A ∩ C )
5. Identity Laws:
a. A∪ ∅ = A , b. A∩ ∅ = ∅
c. A∪ U = U , d. A∩ U = A
6. Complement Laws:
a. A ∪ Ac = U , b. A ∩ Ac = ∅
c. Uc = ∅ , d. ∅c = U
7. Double Complement Law:
a. ( Ac )c = A,
8. De-Morgan’s Law:
c c
a. ( A ∪ B ) = Ac ∩ Bc , b. ( A ∩ B ) = Ac ∪ Bc
9. Alternate Representation for Set Difference:
A − B = A ∩ Bc
10. Subset Laws:
a. A ∪ B ⊆ C iff A ⊆ C and B ⊆ C
c. C ⊆ A ∩ B iff C ⊆ A and C ⊆ B
http://vustudents.ning.com 2
11. Absorption Laws:
a. A∪( A∩ B ) = A , b. A∩ ( A∪ B ) = A
Implications(Conditional)& Bi-Conditional
Implication (Conditional) →
1- a. p → q ≡ ~ q → ~ p, b. p → q ≡ ~p ∨ q
2- if p → q , then its inverse is ~ p → ~ q
3- if p→ q , then its converse is q → p
→ operator is not a commutative coz p → q ≠ q → p
4- if p → q , then its contra positive is ~ q → ~ p
so p → q ≡ ~ q → ~ p, so implication is equivalent to its
contra positive.
Bi-Conditional ↔
1- p ↔ q ≡ (p → q) ∧ (q → p)
2- ~p ↔ q ≡ p ↔ ~q
Laws of Logic.
1- Commutative Law : p↔q ≡ q↔p
2- Implication Law: p → q ≡ ~p ∨ q
≡ ~ ( p ∧ ~ q)
3- Exportation Law: ( p∧ q ) → r ≡ p → ( q→ r )
4- Equivalence: p ↔ q ≡ (p → q) ∧ (q → p)
5- Reductio ad absurdum: p → q ≡ ( p ∧ ~ q) → c
http://vustudents.ning.com 3
1.
Solution:
f: R R
g: R R
f(x) = x2 g(x) = 3x + 1
(fog)(x) = f [g(x)]
= f [3x + 1]
= (3x + 1)2
= 9x2 + 6x + 1
(gof)(x) = g [f(x)]
= g [x2]
= 3(x2) + 1
= 3x2 + 1
We observe that fog gof, that is the commutative law does not hold for the composition of
functions.
2.
Solution:
f: R R
f(x) = x2 - 3x + 2
(fof)(x) = f [f(x)]
= f (x2 - 3x + 2)
- 3x2 + 9x - 6 + 2
http://vustudents.ning.com 4
3.
f: R R defined by f(x) = x2 + 3x + 1
g: R R defined by g(x) = 2x - 3
i. fog(x) = f [g(x)]
= f [2x - 3]
= 4x2 - 12x + 9 + 6x - 9 + 1
= 4x2 - 6x + 1
= g [x2 + 3x + 1]
= 2 (x2 + 3x + 1) - 3
= 2x2 + 6x + 2 - 3
= 2x2 + 6x - 1
= f [x2 + 3x + 1]
= g [2x - 3]
= 2 (2x - 3) - 3
= 4x - 6 - 3
= 4x - 9
4.
f: R R defined by f(x) = x + 1
http://vustudents.ning.com 5
g: R R defined by g(x) = x - 1
fog(x) = f [g(x)]
= f (x - 1)
= (x - 1) + 1
=x
= g [x + 1]
= (x + 1) -1
=x
fog = gof = IR
IR(x) = x.
5.
f: N Z0 defined by f(x) = 2x
h: Q R defined by h(x) = 5x + 2
Consider
= h [g (f (x))]
= h [g (2x)]
= h [1/2x]
= 5 * 1/2x + 2
= 5/2x + 2
http://vustudents.ning.com 6
[(hog)of] (x) = (hog) [f(x)]
= (hog) (2x)
= h [g (2x)]
= h (1/2x)
= 5 * 1/2x + 2
= 5/2x + 2
6.
f(x) = x
= f (x)
=x
=x*x
= x2
http://vustudents.ning.com 7
EXAMPLE:
Use the Euclidean algorithm to find gcd(330, 156)
Solution:
1.Divide 330 by 156:
http://vustudents.ning.com 8