Boolean Algebra cont The digital abstraction Theorem: Absorption - - PowerPoint PPT Presentation
Boolean Algebra cont The digital abstraction Theorem: Absorption - - PowerPoint PPT Presentation
Boolean Algebra cont The digital abstraction Theorem: Absorption Law For every pair of elements a , b
Theorem: Absorption Law For every pair of elements a , b B,
- 1. a + a · b = a
- 2. a · ( a + b ) = a
Proof: (1)
ab a ab a
- 1
- b
a
- 1
- 1
- b
a 1
- a
a
- Identity
Commutativity Distributivity Identity Theorem: For any a B, a + 1 = 1 (2) duality.
Theorem: Associative Law In a Boolean algebra, each of the binary operations ( + ) and ( · ) is associative. That is, for every a , b , c B,
- 1. a + ( b + c ) = ( a + b ) + c
- 2. a · ( b · c ) = ( a · b ) · c
- c
b a c b a A
- c
b c b a a c b a A
- Distributivity
- c
b a a a c b a
- ac
ab aa
- ac
a
- a
- ac
b a a
- Commutativity
Distributivity Distributivity Absorption Law Absorption Law
ac ab a
- Idempotent Law
Proof: (1) Let
- c
b c b a a c b a A
- c
c b a b c b a c b c b a
- c
b a b b c b a
- bc
b a b
- bc
bb ba
- b
ba
- ba
b
- b
- bc
b ba
- Commutativity
Distributivity Distributivity Idempotent Law Absorption Law Commutativity Absorption Law
- c
c b a b c b a c b c b a
- c
Putting it all together:
- c
b c b a a c b a A
- c
c b a b c b a a c b a
- c
b a
- c
b a
- Same transitions
· before +
- c
b a c c b a b a A
- c
b a c c b a b c b a a
- c
b a
- c
b a c b a A
- (2) Duality
Also,
Theorem 11: DeMorgan’s Law For every pair of elements a , b B,
- 1. ( a + b )’ = a’ · b’
- 2. ( a · b )’ = a’ + b’
Proof: (1) We first prove that (a+b) is the complement of a’·b’. Thus, (a+b)’ = a’·b’ By the definition of the complement and its uniqueness, it suffices to show: (i) (a+b)+(a’b’) = 1 and (ii) (a+b)(a’b’) = 0. (2) Duality (a·b)’ = a’+b’
- b
b a a b a b a b a
- b
b a a a b
- b
b a a a b
- 1
1
- a
b 1 1
- 1
- Distributivity
Commutativity Associativity a’ and b’ are the complements of a and b respectively Theorem: For any a B, a + 1 = 1 Idempotent Law
- b
a b a b a b a
- b
b a a b a
- b
b a a a b
- b
b a a a b
- b
b a a a b
- a
b
- Commutativity
Distributivity Commutativity Associativity Commutativity a’ and b’ are the complements of a and b respectively Theorem: For any a B, a · 0 = 0 Idempotent Law
Algebra of Sets
Consider a set S. B = all the subsets of S (denoted by P(S)).
- ,
, S P M
“plus” set-union
- “times” set-intersection
Additive identity element – empty set Ø Multiplicative identity element – the set S. Complement of X B:
X S X \
Theorem: The algebra of sets is a Boolean algebra.
Proof: By satisfying the axioms of Boolean algebra:
- B is a set of at least two elements
For every non empty set S: |B| 2.
- S
P S ,
- Closure of (
- ) and ( ) over B (functions ) .
B B B
- .
, S Y X
- definition
by ) (S P X definition by ) (S P Y definition by ) ( and S P Y X S Y X
- definition
by ) ( and S P Y X S Y X
- A1. Cummutativity of (
- ) and (
).
- Y
x X x x Y X
- r
:
- X
x Y x x X Y
- r
:
An element lies in the union precisely when it lies in one of the two sets X and Y. Equally an element lies in the union precisely when it lies in one of the two sets X and Y. Hence, Y X X Y
X Y Y X
- Y
x X x x Y X
- and
:
- X
x Y x x X Y
- and
: X Y Y X
- A2. Distributivity of (
- ) and (
).
- Z
X Y X Z Y X
- .
Z Y X x
- X
x Z Y x
- Z
x Y x
If ,
Y x X x Y x Y X x
- Y
X x
- Z
X x
- Z
X Y X x
- Let
and
- r
We have and . Hence, If ,
Z x X x Z x Z X x
- We have
and . Hence,
- r
- Z
X Y X Z Y X
- This can be conducted in the same manner as
- .
We present an alternative way: Definition of intersection
X Y X
- X
Z X
- and
- X
Z X Y X
- Also, definition of intersection
Y Y X
- definition of union
Z Y Y
- Z
Y Y X
- Similarly,
Z Y Z X
- Z
Y Z X Y X
- *
**
- Z
Y X Z X Y X
- Taking (*) and (**) we get,
- Z
X Y X Z Y X
- Distributivity of union over intersection can be conducted in the same manner.
- Z
X Y X Z Y X
- A3. Existence of additive and multiplicative identity element.
X X X S X
- .
X X S S X S X
- .
identity additive
- identity
tive multiplica
- S
- A4. Existence of the complement.
X S X B X \ .
- S
X X S X S X B X
- \
\ .
- X
X S X S X B X \ \ .
Algebra of sets is Boolean algebra. All axioms are satisfied
Dual transformation - Recursive definition: Dual: expressions expressions base: 0 1 1 a a , a B\{0,1} recursion step: Let E1 and E2 be Boolean expressions. Then, E1’ [dual(E1)]’ ( E1 + E2 ) [ dual(E1) · dual(E2) ] ( E1 · E2 ) [ dual(E1) + dual(E2) ] Boolean expression - Recursive definition: base: 0 , 1 , a B – expressions. recursion step: Let E1 and E2 be Boolean expressions. Then, E1’ ( E1 + E2 ) ( E1 · E2 )
Proof: Let f ( x1 , x2 , … , xn ) be a Boolean expression. We show that applying the complement on the whole expression together with replacing each variable by it’s complement, yields the dual transformation definition.
Let fd be the dual of a function f ( x1 , x2 , … , xn ) Lemma: In switching algebra, fd = f’ ( x1’ , x2’ , … , xn’ )
Induction basis: 0 , 1 – expressions.
- x
f
- n
x x x f , , , 2
1
- n
x x x f , , , 2
1
- 1
- x
f
d
f x f
- 1
- d
f x f
- 1
Induction hypothesis: Lemma holds for Boolean expressions: E1 and E2 .
That is:
- n
n n
x x x E x x x E x x x E , , , , , , , , ,
2 1 2 2 1 1 2 1
- n
n n
x x x E x x x E x x x E , , , , , , , , ,
2 1 2 2 1 1 2 1
- Induction step: show that it is true for
E1’ ( E1 + E2 ) ( E1 · E2 )
- d
n d n
E x x x E E x x x E
, 2 2 1 2 , 1 2 1 1
, , , , , ,
- hypothesis
induction
- n
d n d
x x x E x x x E , , , , , ,
2 1 , 2 2 1 , 1
- Law
Morgan De'
- n
n
x x x E x x x E
- ,
, , , , ,
2 1 2 2 1 1
- If
then,
- n
d
x x x E , , ,
2 1
- x
E x E x E
- 2
1
- x
E x E x E
- 2
1
- hypothesis
induction
- x
E x E
d d
- ,
2 , 1
- Law
Morgan De'
- x
E x E
- 2
1
If then,
x Ed
- x
E x E
- 1
- If
x E x E
- 1
then,
- x
E
1
- x
E d
- ,
1
x Ed
- hypothesis
induction
Definition: A function f is called self-dual if f = fd Lemma: For any function f and any two-valued variable A, the function g = Af + A’fd is a self-dual.
Proof: (holds for any Boolean algebra)
- d
f A Af dual g dual
- d
f A dual Af dual
- d
f dual A dual f dual A dual
- f
A f A
d
- f
f A A f A
d d
- d
d
f A f f A A
- Dual definition
Distributivity Commutativity
- d
d
f A f f A A
- d
d
ff fA f A A A
- d
d
ff fA f A
- d
d
ff fA f A
- d
d
ff f A Af
- Notice that the above expression has the form:
ab + a’c +bc where “a” =A, “b”=f, “c” = fd. Distributivity
d d
ff fA f A A A
- Commutativity
A’ is the complement of A Identity Commutativity
We now prove a stronger claim:
c a ab bc c a ab B c b a
- .
, , 1 1 1 bc c a ab bc c a ab
- a
a bc c a ab
- 1
1 a bc bca c a ab
- 1
1 cb a abc c a ab
- 1
1 1 1 c a cb a ab abc
- 1
1
- b
c a c ab 1 1 c a ab
- c
a ab
- Identity
a’ is the complement of a Distributivity Commutativity Commutativity Distributivity Theorem: For any a B, a + 1 = 1 Identity
d d
ff f A Af
- d
f A Af dual g dual
- d
f A Af
- c
a ab bc c a ab
- For example:
cv b f
- v
c b fd
- v
c b a cv b a g
- self-dual
Easier proof (1) for switching algebra only: (using dual properties)
d d
ff f A Af
- d
f A Af dual g dual
- Switching algebra
1 and
- d
f f and 1
- d
f f
OR
- d
ff
- d
f A Af
d
f A Af
- Identity
A = 0
d d
ff f f g dual
- )
(
d d
ff f f
- 1
d d
ff f f
- f
f f f
d d
- d
f
- d
f
- d
d
f f f g
- 0’ = 1
Identity Commutativity Absorption Law Theorem: For any a B, a · 0 = 0 Identity Easier proof (2) for switching algebra only: (case analysis)
d d
ff f A Af
- d
f A Af dual g dual
A = 1
d d
ff f f g dual
- 1
1 ) (
- f
- f
f f g
d
- 1
1
- 1
, 1 , :
- f
decreasing monotone x f
- ,
in decreasing strictly x f
- 1
, in increasing strictly
- x
f
Example of a transfer function for an inverter
- .
,
- x
f x
- .
1 ,
- x
f x
- 0,
interval in the concave x f
- ,1
interval in the convex is
- x
f x f x f
- 1
- f
- 1
- f
- 1
1
- f
continuous
x f 1 . !
1 1
- x
f x
- 1
. !
2 2
- x
f x
- 1
1
slope = -1 slope = -1
x x f
1
x
2
x
1 1
- ut
high
V
, in high
V
,
- ut
low
V
, in low
V
,
slope = -1 slope = -1
x x f
- ut
low in low in high
- ut
high
V V V V
, , , ,
- true only if:
BUT, this is not always the case. For example:
1 1
- x
x f
- ut
high
V
, in high
V
,
- ut
low
V
, in low
V
,
slope = -1 slope = -1
- ut
high in high
V V
, ,
- Moreover, in this example it can be proved that no threshold values exist,
which are consistent with definition 3 from lecture notes.
Using the assumption:
- 2
1
such that : point a exists there x x f x x x x
- f (x) = x
1 1 slope < -1
x x f
1
x
x
2
x
, , , ,
: start with x V V V V
- ut
low in low in high
- ut
high
- x
- x
- x
f
- x
f
y
- x
- x
y
: set
- ,
,
x V V
in high in high
- ,
,
x V V
in low in low
- ,
,
x f V f V
in low
- ut
high
- ,
,
x f V f V
in high
- ut
low
x
- x
- x
f
- x
f
y
- x
- x
y
- x
f
- x
- x
f
- x
f (x) = x
1 1 slope < -1
x x f
1
x
x
2
x
- ,
x V
in high
- ,
x V
in low
- ,
x V
- ut
high
- ,
x V
- ut
low
- 1
, 2
min x x x x
- true if:
- 1
, 2
min set x x x x
- f (x) = x
1 1 slope < -1
x x f
1
x
x
2
x
- ut
high
V
, in high
V
,
- ut
low
V
, in low
V
,
slope = -1 slope = -1
- ut
low in low in high
- ut
high
V V V V
, , , ,