Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A.

Similar presentations


Presentation on theme: "Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A."— Presentation transcript:

1 Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A where p i is a positive integer R j is a relation on A c i is an element of A EXAMPLE  Z, +,  Z is a set of integers + is addition operation  is “less than or equal to” relation

2 Lattice Algebra Lattice Algebra – defined by the tuple:  A, ,  Where: A is a non-empty set , are binary operations And, the Following Axioms Hold: a  a = a a a = a (Idempotence) a  b = b  a a b = b a (Commutativity) a  (b  c) = (a  b )  c a (b c) = (a b) c (Associativity) a  (a b) = a a (a  b) = a (Absorption) a,b,c  A

3 Distributive Lattice Algebra A Lattice Algebra plus the Following Distributive Laws Hold: a  (b c) = (a  b ) (a  c) a (b  c) = (a b)  (a c) Complemented Distributive Lattice Algebra 1) maximal element = 1 2) minimal element = 0 3) For any a  A if  x a  A such that a x a = 0 4) For any a  A if  x a  A such that a  x a = 1 A Complemented Distributive Algebra is a Boolean Algebra

4 Distributive Lattice Examples a (b  c) = (a b)  (a c)? a 1 = a (a b)  (a c) = b  0 = b No, non-distributive lattice! 1 0 a c 1 0 b a No complement c is complement of a c is complement of b

5 Boolean Algebra  B, ,,, 0, 1  0, 1  B is a unary operation over B , are binary operations over B 0 is the “identity element” wrt  1 is the “identity element” wrt Ordered Set Lattice Dist. Lattice Boolean Algebra

6 Boolean Algebra Postulates  B, ,,, 0, 1  0, 1  B For arbitrary elements a,b,c  B the Following Postulates Hold: Absorption a  (a b) = a a (a  b) = a Associativity a  (b  c) = (a  b )  c a (b c ) = (a b) c Commutativity a  b = b  a a b = b a Idempotence a  a = a a a = a Distributivity a  (b c) = (a  b) (a  c) a (b  c) = (a b)  (a c) Involution a = a Complement a  a = 1 a a = 0 Identity a  0 = a a 1 = a a  1 = 1 a 0 = 0 DeMorgan’s a  b = a b a b = a  b

7 Huntington’s Postulates  B, ,,, 0, 1  0, 1  B All Previous Postulates may be Derived Using: Commutativity a  b = b  a a b = b a Distributivity a  (b c) = (a  b) (a  c) a (b  c) = (a b)  (a c) Complement a  a = 1 a a = 0 Identity a  0 = a a 1 = a If Huntington’s Postulates Hold for an Algebra then it is a Boolean Algebra

8 DeMorgan’s Theorem  B, ,,, 0, 1  0, 1  B Theorem: Let F(x 1, x 2,…,x n ) be a Boolean expression. Then, the complement of the Boolean expression F(x 1, x 2,…, x n ) is obtained from F as follows: 1) Add parentheses according to order of operation 2) Interchange all occurrences of  with 3) Interchange all occurrences of x i with x i 4) Interchange all occurrences of 0 with 1 EXAMPLE F = a  ( b c ) F = a ( b  c ) a  (b c ) = a ( b  c )

9 Principle of Duality  B, ,,, 0, 1  0, 1  B Interchanging all occurrences of  with and/or interchanging all occurrences of 0 with 1 in an identity, results in another identity that holds. A is a Boolean expression and A D is the Dual of A 0 D =11 D =0 A, B and C are Boolean Expressions if A = B  C then A D = B D C D if A = B C then A D = B D  C D if A = B then A D = B D

10 Logic (Switching) Functions B ={0, 1} The set of all mappings B n  B for B ={0,1} can be represented by Boolean expressions and are called “two- valued logic functions” or “switching functions”. The set B n contains 2 n elements The total number of mappings or functions is The notation we use is f: B n  B f can also be described through the use of an expression

11 Multi-dimensional Logic Functions f:B n  B m B={0,1} f is a vector of functions f i : B n  B where I = 1 to m B n represents the set of all elements in the set formed by n applications of the Cartesian Product B  B  …  B B n can also be interpreted geometrically as an n -dimensional hypercube The geometrical representations are referred to as “cubical representations” Each element in B n is represents a geometric coordinate a discrete hyperspace

12 Cubical Representation Consider f:B 3  B B={0,1} The domain of f is a hypercube of dimension n = 3 The range of f is a hypercube of dimension n = 1 01 (0,0,0) (1,0,0) (1,0,1) (1,1,1) (0,1,1) (0,1,0) (0,0,1) (1,1,0) NOTE: These are (sideways) Hasse Diagrams for B 3 and B 1 !!! f

13 Some Definitions variable – A symbol representing an element of B x i  B literal – x i or x i if x i =0 then x i =1 if x i =1 then x i =0 product – a Boolean expression composed of literals and the  operator (e.g. x 1  x 3  x 4 ) NOTE: when two literals appear next to each other, the  operation is “assumed” to be present (e.g. x 1 x 3 x 4 ) cube – another term for a product minterm – an element of B n for f:B n  B such that f = 1 j -cube – a product composed of n-j literals f(x 1, x 2,…,x n ) – a function f: B n  B f(x 1, x 2,…, x n ) – a multi-dimensional function f : B n  B m

14 Functions and Expressions  B, +,,, 0, 1  B ={0, 1} A specific function may be defined by an expression EXAMPLE: Consider the Boolean algebra defined above. Each operation can be given a name and defined by a personality matrix or table. The table contains the operation result for each element in B  B for a binary operation and for each element in B for a unary operation. +01 001 111  01 000 101 01 10 NAME is ORNAME is ANDNAME is NOT EXAMPLE: A function f: B 3  B can be specified by an expression over some Boolean algebra. f(x 1, x 2, x 3 ) = x 1 + x 1 x 2 x 3

15 Geometric Interpretation of a Function  B, +,,, 0, 1  B ={0, 1} f( x 1, x 2, x 3 ) = x 1 + x 1 x 2 x 3 01 (0,0,0) (1,0,0) (1,0,1) (1,1,1) (0,1,1) (0,1,0) (0,0,1) (1,1,0) f f 1 denotes the “on-set” of the function f “on-set” is a set of cubes in the domain of f for which f = 1 f 1 ={x 1, x 1 x 2 x 3 } x1x1 x3x3 x2x2

16 Geometric Description of a Function  B, +,,, 0, 1  B ={0, 1} f ( x 1, x 2, x 3 ) = x 1 + x 1 x 2 x 3 (0,0,0) (1,0,0) (1,0,1) (1,1,1) (0,1,1) (0,1,0) (0,0,1) (1,1,0) x1x1 x3x3 x2x2 f =  (0,1,2,3,6) where each value represents a 0 -cube Each cube in f 1 ={x 1, x 1 x 2 x 3 } “covers” 1 or more 0 -cubes x 1 covers {000, 001, 010, 011}x 1 is a 2 -cube x 1 x 2 x 3 covers {110}x 1 x 2 x 3 is a 0 -cube

17 Geometric Description (cont)  B, +,,, 0, 1  B ={0, 1} f (x 1, x 2, x 3 ) = x 1 + x 1 x 2 x 3 = x 1 + x 2 x 3 (0,0,0) (1,0,0) (1,0,1) (1,1,1) (0,1,1) (0,1,0) (0,0,1) (1,1,0) x1x1 x3x3 x2x2 minterm – any 0 -cube that is covered by any element in f 1 “don’t care” is a variable that is not present in a cube in f 1 don’t care is denoted by “-” f 1 ={x 1 --, x 1 x 2 x 3 }={ - x 2 x 3, x 1 - x 3, x 1 x 2 x 3 } x 2 and x 3 are don’t cares in cube x 1 (0,0,0) (1,0,0) (1,0,1) (1,1,1) (0,1,1) (0,1,0) (0,0,1) (1,1,0)

18 Cube Sets f 1 is a set of all cubes for which f = 1 (on-set) f 0 is a set of all cubes for which f = 0 (off-set) f DC is a set of all cubes for which f = don’t care(DC-set) f is “completely specified” if any two of f 0, f 1 or f DC are given f is “incompletely specified” proper subsets are given for f 0, f 1 or f DC f 1 is said to be a “cover” for f


Download ppt "Algebra Algebra – defined by the tuple:  A, o 1, …, o k ; R 1, …, R m ; c 1, …, c k  Where: A is a non-empty set o i is the function, o i : A p i  A."

Similar presentations


Ads by Google