* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download x+y
Tensor operator wikipedia , lookup
Linear algebra wikipedia , lookup
Structure (mathematical logic) wikipedia , lookup
Field (mathematics) wikipedia , lookup
Congruence lattice problem wikipedia , lookup
Universal enveloping algebra wikipedia , lookup
Fundamental theorem of algebra wikipedia , lookup
Invariant convex cone wikipedia , lookup
Birkhoff's representation theorem wikipedia , lookup
Canonical normal form wikipedia , lookup
Group (mathematics) wikipedia , lookup
Oscillator representation wikipedia , lookup
Exterior algebra wikipedia , lookup
Homomorphism wikipedia , lookup
Homological algebra wikipedia , lookup
Complexification (Lie group) wikipedia , lookup
Clifford algebra wikipedia , lookup
Heyting algebra wikipedia , lookup
History of algebra wikipedia , lookup
Lecture 2 Chapter 2.1 – 2.5 • 2.2 Basic Definitions Natural Numbers: – None negative integers • • Debate whether to include 0 Set: – A collection of objects, usually having a common property • If S is a set, and x and y are certain elements then: x ∈ S means x is a element of the set S y ∉ S means y is not an element of set S • A set with denumerable number of elements is specified by braces: A = {1, 2, 3, 4} • Element – Any of the distinct objects that make up a set • Postulate/Axiom – A premise or starting point of reasoning • • Theorem – A statement that has been proven on the basis of previously established statements, such as other theorems—and generally accepted statements, such as axioms. A binary operator defined on a set S of elements is a rule that assigns, to each pair of S elements, a unique element from S – Consider: a*b=c • * is a binary operator if it specifies a rule for finding c from the pair (a, b) and also if a, b, c ∈ S • is not a binary operator if a, b ∈ S and if c ∉ S 2.2 Basic Definitions • A field is an example of an algebraic structure – An algebraic structure consists of one or more sets closed under one or more operations, satisfying some axioms. – An axiom is a statement or proposition on which an abstractly defined structure is based. • Field – A set of elements, together with two binary operators (addition and multiplication with the latter excluding zero) , each having the properties of Closure, Associativity, Commutativity, Identity, Inverse, and both operator combining to give Distributivity. 2.2 Basic Definitions • The postulates of a mathematical system form the basic assumptions from which it is possible to deduce the rules. The most common postulates are as follows though not all apply to boolean algebra. • Closure Postulate: – A set S is closed with respect to a binary operator if, for every pair of elements of S, the binary operator specifies a rule for obtaining a unique element of S. • The set of natural numbers S = {1, 2, 3, 4, …} is closed w.r.t. the binary operator + by the rules of arithmetic addition since for any a, b ∈ N, there is a unique c ∈ N such that a + b = c. • The set of natural numbers N = {1, 2, 3, 4, …} is not closed w.r.t. the binary operator - by the rules of arithmetic subtraction since for any a, b ∈ N, there is a c ∉ N 2 – 3 = -1 and 2, 3 ∈ N but (-1) ∉ N 2.2 Basic Definitions • Associative Law: – A binary operator * on a set S is said to be associative if: (x * y) * z = x * (y * z) for all x, y, z, ∈ S Satisfied by: (x · y) · z = x · (y · z) (x + y) + z = x + (y + z) • Commutative Law: – A binary operator * on a set S is said to be commutative if: x * y = y * x for all x, y, ∈ S Satisfies by: x· y = y· x x+y = x+y 2.2 Basic Definitions • Identity Element: – A set S is said to have an identity element w.r.t. a binary operation * on S if there exists an element e ∈ S with the property that: e * x = x * e = x for all x ∈ S additive identity element: denoted by 0 x + 0 = 0 + x = x for any x ∈ S multiplicative identity element: denoted by 1 x · 1 = 1 · x = 1 for any x ∈ S – Note: The set of natural number N = {1, 2, 3, …} has no identity element since 0 does not belong to the set • Inverse – A set S is having the identity element e w.r.t. a binary operator * is said to have an inverse whenever, for every x ∈ S, there exists an element y ∈ S such that x*y = e Additive Inverse: For every a in S, there exists an element −a in S, such that a + (−a) = 0. Multiplication Inverse: For any a in S other than 0, there exists an element a−1 in S, such that a · a−1 = 1. 2.2 Basic Definitions • Distributive Law: – If * and · are two binary operators on a set S, * is said to be distributive over · whenever x * (y · z) = (x * y) · (x *z) – Distributivity of multiplication over addition: For all a, b and c in S, the following equality holds: a · (b + c) = (a · b) + (a · c). 2.2 Basic Definitions • A field is a set of elements, together with two binary operators, each having properties 1-5 and both combining to give property 6. – The set of real numbers, together with the binary operators + and ·, forms the field of real numbers. • The operator and postulates have the following meanings for ordinary algebra: – – – – – – – The binary operator + defines addition The additive identity is 0 The additive inverse defines subtraction The binary operator · defines multiplication The multiplication identity is 1 For a ≠ 0, the multiplicative inverse of a = 1/a defines division (a · 1/a = 1) The only distributive law applicable is that of · over + a · (b + c ) = (a · b) + (a · c) 2.2 Basic Definitions • Is the set of natural numbers a field? Why? No, as there is no negative number(s) to satisfy the Additive Inverse (a + (-a) = 0) • Is the set of integers a field? Why? The integers Z are NOT a field because the only elements in Z that have multiplicative inverses are 1 and -1. It is not true that whenever a is an integer, there is an integer b such that ab = ba = 1. For example, a = 2 is an integer, but the only solution to the equation ab = 1 in this case is b = 1/2. We cannot choose b = 1/2 because 1/2 is not an integer. (Inverse element fails). • Is the set of real numbers a field? Why? Yes, all the field axioms are satisfied 2.3 Axiomatic Definition of Boolean Algebra • In 1937, Claude Shannon founded both digital computer and digital circuit design theory when, as a 21-year-old master's degree student at the Massachusetts Institute of Technology (MIT), he wrote his thesis demonstrating that electrical applications of boolean algebra could construct and resolve any logical, numerical relationship. • His thesis was published in the 1938 issue of the Transactions of the American Institute of Electrical Engineers , and proved that a two-valued Boolean algebra (whose members are most commonly denoted 0 and 1, or false and true) can describe the operation of two-valued electrical switching circuits. • In this work, Shannon proved that boolean algebra and binary arithmetic could be used to simplify the arrangement of the electromechanical relays that were used then in telephone call routing switches. He next expanded this concept, and he also proved that it would be possible to use arrangements of relays to solve problems in Boolean algebra. • In 1904, E.V. Huntington formulated the postulates that formally define Boolean algebra. 2.3 Axiomatic Definition of Boolean Algebra • Would certainly want to minimize the number of mechanical relays used! 2.3 Axiomatic Definition of Boolean Algebra • Boolean algebra is an algebraic structure defined by a set of elements, B, together with two binary operators + and ·, provided that the following postulates are satisfied: 1. 2. (a) The structure is closed with respect to + i.e. for all a, b in S, both a + b are in S (b) The structure is closed with respect to · i.e. for all a, b in S, both a · b are in S (a) The element 0 is an identity element with respect to + x+0 = 0+x = x (b) The element 1 is an identity element with respect to · x·1 = 1·x = x 3. (a) The structure is commutative with respect to + x+y=y+x (b) The structure is commutative with respect to · x·y=y·x 4. (a) The operator · is distributive over + x · (y + z) = (x · y) + (x · z) (b) The operator + is distributive over · x + (y · z) = (x + y) · (x + z) 5. For every element x ∈ B, there exists an element x’ ∈ B called the complement of x such that (a) x + x’ = 1 (b) x · x’ = 0 6. There exist at least two elements x, y ∈ B such that x ≠ y 2.3 Axiomatic Definition of Boolean Algebra • Compare Boolean Algebra with arithmetic and ordinary algebra – The Distributive Law of + over · is valid for Boolean algebra but not for ordinary algebra x + (y · z) = (x + y) · (x + z) – Boolean algebra does not have additive or multiplicative inverses; therefore there are no subtraction or division operations • Subtraction Inverse: a + (−a) = 0 • Multiplicative Inverse: a · a−1 = 1 – Postulate 5 defines the complement operator which is not available in ordinary algebra x + x’ = 1 x · x’ = 0 – Ordinary algebra operates on real numbers, which constitutes an infinite set of elements. Boolean algebra deals with a set B comprised of only two elements, 0 and 1. 2.3 Axiomatic Definition of Boolean Algebra • Two –Valued Boolean Algebra – Defined on a set of two elements, B = {0, 1} with rules for the two binary operators + and⋅as shown in the following operator tables: x y x∙y x y x+y x x’ 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 AND OR NOT 2.3 Axiomatic Definition of Boolean Algebra • Show that the Huntington postulates are valid for the set B = {0, 1} and the two binary operators + and ⋅ – Closed: From binary operator tables, the result of AND, OR, and NOT result in 0 or 1 and 0 ∈ B – Identity Elements: From tables, we see that: 0+0=0 1⋅1=1 – 0+1=1+0=1 1⋅0=0⋅1=0 which establishes the two identity elements, 0 for + and 1 for ⋅ per postulate 2 (x + 0 = x, x ⋅ 1 =x) Identity Commutative Law: (x + y = y + x, xy = yx) • obvious from the binary operator tables x y x∙y x y x+y x x’ 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 AND OR NOT 2.3 Axiomatic Definition of Boolean Algebra – Distributive Law: x⋅(y+z) = (x⋅y)+(x⋅z) x y z y+z x⋅(y+z) x⋅y x⋅z (x⋅y)+(x⋅z) 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 values are the same 2.3 Axiomatic Definition of Boolean Algebra – Distributive Law: x+(y ⋅ z) = (x+y) ⋅ (x+z) x y z y⋅z x+(y⋅z) x+y x+z (x+y) ⋅(x+z) 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 values are the same 2.3 Axiomatic Definition of Boolean Algebra – Postulate 1: (structure closed w.r.t. + and ⋅) • From the complement table x + x’ = 1 since 0 + 0’ = 0 + 1 =1 and 1 + 1’ = 1 + 0 = 1 x ⋅ x’ = 0 since 0 ⋅ 0’ = 0 ⋅ 1 = 0 and 1 ⋅ 1’ = 1 ⋅ 0 = 0 – Postulate 6: (exists at least two elements x, y ∈ B such that x ≠ y) • Whereas the two-valued Boolean algebra has two elements, 1 and 0, with 1 ≠ 0 • Thus a we have defined a two-valued Boolean algebra having a set of two elements, 1and 0, two binary operators equivalent to AND and OR, and a complement operator equivalent to the NOT operator. 2.4 Basic Theorems and Properties of Boolean Algebra • Duality: – The duality principle states that every algebraic expression deducible from the postulates of Boolean algebra remain valid if the operators and identify elements are interchanged – For the two-valued Boolean algebra, the identity elements and the elements of the set B are the same : 1 and 0 – For the dual of an algebraic expression, simply interchange OR and AND operators and replace 1’s with 0’s and 0’s with 1’s 2.4 Basic Theorems and Properties of Boolean Algebra • Basic Postulates and Theorems – The postulates are basic axioms of the algebraic structure and need no proof – The theorems must be proven from the postulates 2.4 Basic Theorems and Properties of Boolean Algebra 2.4 Basic Theorems and Properties of Boolean Algebra 2.4 Basic Theorems and Properties of Boolean Algebra 2.4 Basic Theorems and Properties of Boolean Algebra 2.4 Basic Theorems and Properties of Boolean Algebra 2.4 Basic Theorems and Properties of Boolean Algebra 2.4 Basic Theorems and Properties of Boolean Algebra • Operator Precedence 1. 2. 3. 4. Parentheses NOT AND OR 2.5 Boolean Functions • A Boolean function is described by an algebraic expression and consists of binary variables, the constants 1 and 0, and the logic operation symbols – Consider: F1 = x + y’z F2 = x’y’z + x’yz + xy’ x y z y’z x+y’z x’y’z x’yz xy’ x’y’z + x’yz + xy’ 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 1 1 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 2.5 Boolean Functions F1 = x + y’z y’ y’z 2.5 Boolean Functions F2 = x’y’z + x’yz + xy’ = x’z(y’ + y) = x’z + xy’ x y z x’z xy’ x’z + xy’ x’y’z x’yz xy’ x’y’z + x’yz + xy’ 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 2.5 Boolean Functions 2.5 Boolean Functions • Algebraic Manipulation – Term: A gate is required for each term and each variable within the term is an input to the gate – Literal: A single variable within a term, in complemented or un-complemented form – Reducing the number of terms, number of literals, or both may result in a simpler circuit F2 = x’y’z + x’yz + xy’ has three terms and eight literals F2 = x’z + xy’ has two terms and four literal 2.5 Boolean Functions • Complement of a Function – The complement of function F is F’ and is obtained by the interchange of 0’s with 1’s and 1’s with 0’s in the value of F – The complement of a function may be derived algebraically using DeMorgan’s theorem (A + B)’ = A’B’ theorem 5a (DeMorgan’s) – Extended to three variables (A + B + C)’ = (A + x)’ where x = B + C = A’x’ theorem 5a (DeMorgan’s) = A’(B + C)’ substitute B + C = x = A’(B’C’) theorem 5a (DeMorgan’s) = A’B’C’ theorem 4b (associative) – In General (A + B + C + D + … + F)’ = A’B’C’D’ … F’ (ABCD … F)’ = A’ + B’ + C’ +D’ + … + F’ 2.5 Boolean Functions • Example 2.3 – Find the complement of the previous functions F1 and F2 • F1 = x + y’z F1’ = (x + y’z)’ = x’ ⋅ (y’z)’ = x’ ⋅ y + z’ • F2 = x’y’z + x’yz + xy’ F2’ = (x’y’z + x’yz + xy’)’ = ((x’y’z)’ ⋅ (x’yz)’ ⋅ (xy’))’ = (x + y + z’) ⋅ (x + y’ + z’) ⋅ (x’ + y) = (a + y)(a + y’) ⋅ (x’ +y) = (aa + a(y’ + y) + yy’) ⋅ (x’ + y) = (a + a + 0) ⋅ (x’ + y) = a + (x’ + y) = (x + z’) ⋅ (x’ + y) • F2 = x’z + xy’ F2’ = (x’z + xy’)’ = (x’z)’ ⋅ (xy’)’ = (x + z’) ⋅ (x’ + y) let x + z’ = a recall xx = x, xx’ = 0, recall x + x = x x + x’ = 1 Homework • 2.2 a – c (10 points ea.) • 2.5 (for 2.2 a-c) (10 points ea.) • 2.11a, b (10 points ea.) • 2.14 a-c (10 points ea.) Total of 110 points