Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Binary operations • A binary operation on a set A is nothing more than a function from A × A to A. • In other words, it takes pairs of values from A and converts them into single values from A. • The most familiar of binary operations are addition and multiplication. But, we don’t write: +: × or ×(5, 2) = 10. We write, x+y, and 5 × 2 instead. 13 Definition Definition A binary operation on a nonempty set A is a mapping f form A × A to A. That is f ⊆ A × A × A and f has the property that for each (a, b) ∈ A × A, there is precisely one c ∈ A such that (a, b, c) ∈ f . Notation If f is a binary operation on A and if (a, b, c) ∈ f then we have already seen the notation f (a, b) = c. For binary operations, it is customary to write instead a f b = c, or perhaps a ∗ b = c. Kevin James MTHSC 412 Section 1.4 –Binary Operations Binary operations • For this reason we usually write binary operations infix that is, between their arguments, rather than prefix, before their arguments. • Also, the symbols chosen for binary operations are usually reminiscent of + or × rather than letters like f and g as we did for single variable functions. • For a generic binary operation we will use the symbol . 14 Ex1. (a) Let “+” be the addition operation on Z. +:ZZ Z defined by +(a, b) = a+b Let “” be the multiplication on R. : RR R defined by (a, b) = ab Binary Operation Ex1. (b) :ZZ Z defined by (x, y) = x+y1 (1, 1) = (2, 3) = Then “” is a binary operation on Z. ∆:ZZ Z defined by ∆(x, y) = 1+xy ∆(1, 1) = ∆(2, 3) = Then “∆” is a binary operation on Z. Binary Operation Example Some binary operations on Z are 1 x ∗y =x +y 2 x ∗y =x −y 3 x ∗ y = xy 4 x ∗ y = x + 2y + 3 5 x ∗ y = 1 + xy Kevin James MTHSC 412 Section 1.4 –Binary Operations Ex1. (c) Let “÷” be the division operation on Z. Then ÷(1, 2)=½. (1, 2)ZZ , but ½Z. Thus “÷” is not a binary operation. If we deal with “÷” on R , then “÷” is not a binary operation, either. Because ÷(a , 0) is undefined. But ÷ is a binary operation on R{0}. Binary Operation Ex2. The intersection and union of two sets are both binary operations on the universal set . Binary Operation Operation tables • When we are given a binary operation on a finite set, it is common to specify it in tabular form, sometimes called a Cayley table. • For example, if we take to be the binary operation on {0, 1, 2, 3} defined by a b = min(a, b) the corresponding Cayley table is: 0 1 2 3 0 1 2 3 0 0 0 0 0 1 1 1 0 1 2 2 0 1 2 3 15 Operation tables 0 1 2 3 0 0 0 0 0 1 0 1 1 1 2 0 1 2 2 3 0 1 2 3 • To find a b in such a table we look at the value written in the intersection of the row marked with a (to the left of the vertical bar) and the column marked with b (above the line.) 16 Properties of binary operations Let S be a set, and a binary operation on S. Then: • is associative if, for all a, b, c S: a (b c) = (a b) c • is commutative if, for all a, b S: a b=b a • Note that the operations × and + are both associative and commutative. 17 Example • Consider the operation of subtraction, -, on R. • This operation is certainly not commutative because, for instance: 5-3 3–5 (in fact, pairs of real numbers a and b for which a - b = b - a are rather special!) 18 Example • Nor is it associative: (3 - 5) - 2 = -2 - 2 = -4 3 - (5 - 2) = 3 - 3 = 0 • The commutative and associative properties are universal properties of a binary operation, and so to show that they do not hold requires only a single counterexample (though for subtraction it’s not hard to find many others!) 19 Commutativity and Associativity Definition Suppose that ∗ is a binary operation of a nonempty set A. • ∗ is commutative if a ∗ b = b ∗ a for all a, b ∈ A. • ∗ is associative if (a ∗ b) ∗ c = a ∗ (b ∗ c). Example 1 Multiplication and addition give operators on Z which are both commutative and associative. 2 Subtraction is an operation on Z which is neither commutative nor associative. 3 The binary operation on Z given by x ∗ y = 1 + xy is commutative but not associative. For example (1 ∗ 2) ∗ 3 = 3 ∗ 3 = 10 while 1 ∗ (2 ∗ 3) = 1 ∗ (7) = 8. Kevin James MTHSC 412 Section 1.4 –Binary Operations Identity • Let S be a set, and a binary operation on S. Then: • An element e S is a left identity for , if for all a S: e a=a • An element f S is a right identity for , if for all a S: a f=a 20 Identity Note that on : • 0 is both a left and right identity for addition • 1 is both a left and right identity for multiplication • 0 is a right identity for subtraction, but subtraction has no left identity. 21 Ex4. (a) Let “” be the operation defined as Ex1(b) on Z, x y = x+y1. Then “” is both commutative and associative. Pf: Binary Operation Ex4. (b) Let “∆” be the operation defined as Ex1(b) on Z, x∆y = 1+xy. Then “∆” is commutative but not associative. Pf: Binary Operation Identity Element Definition Let ∗ be a binary operation on a nonempty set A. An element e is called an identity element with respect to ∗ if e ∗x =x =x ∗e for all x ∈ A. Example 1 1 is an identity element for multiplication on the integers. 2 0 is an identity element for addition on the integers. 3 If ∗ is defined on Z by x ∗ y = x + y + 1 Then −1 is the identity. 4 The operation ∗ defined on Z by x ∗ y = 1 + xy has no identity element. Kevin James MTHSC 412 Section 1.4 –Binary Operations Definition: Let : AA A is a binary operation on a nonempty set A and let B A. If xyB, x, y B, then we say B is closed with respect to “”. Binary Operation Ex5. (a) The set S of all odd integers is closed with respect to multiplication. (b) Define :ZZ Z by x y =x+ y. Let B be the set of all negative integers. Then B is not closed with respect to “”, Binary Operation Closure Definition Suppose that ∗ is a binary operation on a nonempty set A and that B ⊆ A. If it is true that a ∗ b ∈ B for all a, b ∈ B, then we say that B is closed under ∗. Example Consider multiplication on Z . The set of even integers is closed under addition. Proof. Suppose that a, b ∈ Z are even. Then there are x, y ∈ Z such that a = 2x and b = 2y . Thus a + b = 2x + 2y = 2(x + y ) which is even. Since a and b were arbitrary even integers, it follows that the set of even integers is closed under addition. Kevin James MTHSC 412 Section 1.4 –Binary Operations Right, Left and Two-Sided Inverses Definition Suppose that ∗ is a binary operation on a nonempty set A and that e is an identity element with respect to ∗. Suppose that a ∈ A. • If there exists b ∈ A such that a ∗ b = e then b is called a right inverse of a with respect to ∗. • If there exists b ∈ A such that b ∗ a = e then b is called a left inverse of a with respect to ∗. • If b ∈ A is both a right and left inverse of a with respect to ∗ then we simply say that b is an inverse of a and we say that a is invertible. Kevin James MTHSC 412 Section 1.4 –Binary Operations Example 1 Consider the operation of addition on the integers. For any integer a, the inverse of a with respect to addition is −a. 2 Consider the operation of multiplication on Z . The invertible elements are 1 and -1 . Fact Suppose that ∗ is a binary operation on a nonempty set A. If there is an identity element with respect to ∗ then it is unique. In the case that there is an identity element and that ∗ is associative then for each a ∈ A if there is an inverse of a then it is unique. Kevin James MTHSC 412 Section 1.4 –Binary Operations Definition: Let A be a nonempty set and let : AA A be a binary operation on A. An element e A is called an (two side) identity element with respect to “” if ex = x = xe, xA. Binary Operation Ex6. (a) The integer 1 is an identity w. r. t. “”, but not w. r. t. “+”. The number 0 is an identity w. r. t. “+”. (b) Let “” be the operation defined as Ex1 (b) on Z, x y = x+y 1. Then Binary Operation Ex6. (continuous) (c) Let “∆” be the operation defined as Ex1 (b) on Z, x∆y = 1+xy. Then the operation has no identity element in Z. Pf: Binary Operation Definition: Let e be the identity element for the binary operation “” on A and a A. If b A such that ab = e (or ba = e) then b is called a right inverse (or left inverse) of a w. r. t. . If both a b = e = b a, then b (denoted by a1) is called an (two-side) inverse of a; a 1 is called an invertible element of a. Binary Operation Note: The identity e and the two-side inverse of an element w. r. t. a binary operation are unique. Pf: Binary Operation Ex7. Let “” be the operation defined as Ex1(b) on Z, x y = x+y 1. Then (2–x) is a twoside inverse of x w. r. t. “”, xZ. Pf: Binary Operation Ex8. (a) Give a binary operation on Z as follow. (a) x y = x Binary Operation Ex8. (b) (b) x y = x+2y. This operation is neither associative, nor commutative. Pf: Binary Operation Ex8. (b) (continuous) (b) x y = x + 2y.This operation has no identity, thus no inverse. Pf: Binary Operation Ex8. (c) (c) x y = x + xy +y. Binary Operation VanWyk’s 103 Section 5.1 Homework Problems 1. Let ∗ be the binary operation defined on the set of natural numbers N = {0, 1, 2, 3, . . . } given by a ∗ b = ab . Is ∗ commutative? Is ∗ associative? 2. Show the following binary operation ∗ on S = {0, 1} is not associative: ∗ 0 1 0 1 0 1 1 1 Hint: 03 . 3. Write the table for left projection on the set S = {a, b, c}. 4. Is the following a table for a commutative binary operation? Why or why not? (a) a a c b b c c b b c a c a a c a a c b b c a b b b c c a c a (b) 5. Give an argument showing the following is a table for an associative binary operation. a b c a b b b b b b b c b b b 6. There are 39 different binary operations on a set with 3 elements. How many commutative binary operations are there on a set with 3 elements? Hint: Use the symmetry of the table. 2 VanWyk’s 103 Section 5.1 Homework Answers 1. ∗ is not commutative since 2 ∗ 3 = 23 = 8, while 3 ∗ 2 = 32 = 9. ∗ is not associative since (2 ∗ 3) ∗ 4 = (23 ) ∗ 4 = 8 ∗ 4 = 84 = (23 )4 = 212 , while 2 ∗ (3 ∗ 4) = 2 ∗ (34 ) = 2 ∗ 81 = 281 . 2. 0 ∗ (0 ∗ 0) = 0 ∗ 1 = 0, while (0 ∗ 0) ∗ 0 = 1 ∗ 0 = 1, so ∗ is not associative. 3. Since α ∗ β = α, here is the table: ∗ a b c a a b c b a b c c a b c 4a. No, since a ∗ c 6= c ∗ a. 4b. Yes, since the table is symmetric about the main diagonal. 5. Since α ∗ β = b, it follows that for all α, β, γ ∈ S, (α ∗ β) ∗ γ = b = α ∗ (β ∗ γ). So ∗ is associative. 6. The answer is 36 . By the symmetry we need for commutativity, the table must look like a b c a x u v b u y w c v w z So there are really only 6 slots we can fill. (Once the 6 on and above the main diagonal are filled in, the 3 below that are determined.) 3