Upcoming SlideShare
×

# Schaum – matematica discreta

2,668 views

Published on

Schaum – matematica discreta

Published in: Education, Technology
1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total views
2,668
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
96
0
Likes
1
Embeds 0
No embeds

No notes for slide

### Schaum – matematica discreta

1. 1. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/eFront Matter Preface © The McGraw−HillCompanies, 2004PrefaceDiscrete mathematics, the study of ®nite systems, has become increasinglyimportant as the computer age has advanced. The digital computer is basically a®nite structure, and many of its properties can be understood and interpreted withinthe framework of ®nite mathematical systems. This book, in presenting the moreessential material, may be used as a textbook for a formal course in discrete mathe-matics or as a supplement to all current texts.The ®rst three chapters cover the standard material on sets, relations, and func-tions and algorithms. Next come chapters on logic, vectors and matrices, counting,and probability. We than have three chapters on graph theory: graphs, directedgraphs, and binary trees. Finally there are individual chapters on properties of theintegers, algebraic systems, languages and machines, ordered sets and lattices, andBoolean algebra. The chapter on functions and algorithms includes a discussion ofcardinality and countable sets, and complexity. The chapters on graph theoryinclude discussions on planarity, traversability, minimal paths, and Warshalls andHumans algorithms. The chapter on languages and machines includes regularexpressions, automata, and Turing machines and computable functions. We empha-size that the chapters have been written so that the order can be changed withoutdiculty and without loss of continuity.This second edition of Discrete Mathmatics covers much more material and ingreater depth than the ®rst edition. The topics of probability, regular expressions andregular sets, binary trees, cardinality, complexity, and Turing machines and compu-table functions did not appear in the ®rst edition or were only mentioned. This newmaterial re¯ects the fact that discrete mathematics now is mainly a one-year courserather than a one-semester course.Each chapter begins with a clear statement of pertinent de®nition, principles,and theorems with illustrative and other descriptive material. This is followed by setsof solved and supplementary problems. The solved problems serve to illustrate andamplify the material, and also include proofs of theorems. The supplementary prob-lems furnish a complete review of the material in the chapter. More material hasbeen included than can be covered in most ®rst courses. This has been done to makethe book more ¯exible, to provide a more useful book of reference, and to stimulatefurther interest in the topics.Finally, we wish to thank the sta of the McGraw-Hill Schaums Outline Series,especially Arthur Biderman and Maureen Walker, for their unfailing cooperation.SEYMOUR LIPSCHUTZMARC LARS LIPSONv
2. 2. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004Chapter 1Set Theory1.1 INTRODUCTIONThe concept of a set appears in all mathematics. This chapter introduces the notation and terminol-ogy of set theory which is basic and used throughout the text.Though logic is formally treated in Chapter 4, we introduce Venn diagram representation of setshere, and we show how it can be applied to logical arguments. The relation between set theory and logicwill be further explored when we discuss Boolean algebra in Chapter 15.This chapter closes with the formal de®nition of mathematical induction, with examples.1.2 SETS AND ELEMENTSA set may be viewed as a collection of objects, the elements or members of the set. We ordinarily usecapital letters, A, B, X, Y, . . ., to denote sets, and lowercase letters, a, b, x, y, . . ., to denote elements ofsets. The statement ``p is an element of A, or, equivalently, ``p belongs to A, is writtenp P AThe statement that p is not an element of A, that is, the negation of p P A, is writtenp =P AThe fact that a set is completely determined when its members are speci®ed is formally stated as theprinciple of extension.Principle of Extension: Two sets A and B are equal if and only if they have the same members.As usual, we write A  B if the sets A and B are equal, and we write A T B if the sets are not equal.Specifying SetsThere are essentially two ways to specify a particular set. One way, if possible, is to list its members.For example,A  fa; e; i; o; ugdenotes the set A whose elements are the letters a, e, i, o, u. Note that the elements are separated bycommas and enclosed in braces { }. The second way is to state those properties which characterized theelements in the set. For example,B  fx: x is an even integer, x > 0gwhich reads ``B is the set of x such that x is an even integer and x is greater than 0, denotes the set Bwhose elements are the positive integers. A letter, usually x, is used to denote a typical member of the set;the colon is read as ``such that and the comma as ``and.EXAMPLE 1.1(a) The set A above can also be written asA  fx: x is a letter in the English alphabet, x is a vowelgObserve that b =P A, e P A, and p =P A.(b) We could not list all the elements of the above set B although frequently we specify the set by writingB  f2; 4; 6; . . .g1
3. 3. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004where we assume that everyone knows what we mean. Observe that 8 P B but À7 =P B.(c) Let E  fx: x2À 3x  2  0g. In other words, E consists of those numbers which are solutions of the equationx2À 3x  2  0, sometimes called the solution set of the given equation. Since the solutions of the equation are1 and 2, we could also write E  f1; 2g.(d ) Let E  fx: x2À 3x  2  0g, F  f2; 1g and G  f1; 2; 2; 1; 63g. Then E  F  G. Observe that a set doesnot depend on the way in which its elements are displayed. A set remains the same if its elements are repeated orrearranged.Some sets will occur very often in the text and so we use special symbols for them. Unless otherwisespeci®ed, we will letN  the set of positive integers: 1, 2, 3, . . .Z  the set of integers: . . ., À2, À1, 0, 1, 2, . . .Q  the set of rational numbersR  the set of real numbersC  the set of complex numbersEven if we can list the elements of a set, it may not be practical to do so. For example, we would notlist the members of the set of people born in the world during the year 1976 although theoretically it ispossible to compile such a list. That is, we describe a set by listing its elements only if the set contains afew elements; otherwise we describe a set by the property which characterizes its elements.The fact that we can describe a set in terms of a property is formally stated as the principle ofabstraction.Principle of Abstraction: Given any set U and any property P, there is a set A such that the elements ofA are exactly those members of U which have the property P.1.3 UNIVERSAL SET AND EMPTY SETIn any application of the theory of sets, the members of all sets under investigation usually belong tosome ®xed large set called the universal set. For example, in plane geometry, the universal set consists ofall the points in the plane, and in human population studies the universal set consists of all the people inthe world. We will let the symbolUdenote the universal set unless otherwise stated or implied.For a given set U and a property P, there may not be any elements of U which have property P. Forexample, the setS  fx: x is a positive integer, x2 3ghas no elements since no positive integer has the required property.The set with no elements is called the empty set or null set and is denoted byDThere is only one empty set. That is, if S and T are both empty, then S  T since they have exactly thesame elements, namely, none.1.4 SUBSETSIf every element in a set A is also an element of a set B, then A is called a subset of B. We also saythat A is contained in B or that B contains A. This relationship is writtenA B or B A2 SET THEORY [CHAP. 1
4. 4. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004If A is not a subset of B, i.e., if at least one element of A does not belong to B, we write A B or B ] A.EXAMPLE 1.2(a) Consider the setsA  f1; 3; 4; 5; 8; 9g B  f1; 2; 3; 5; 7g C  f1; 5gThen C A and C B since 1 and 5, the elements of C, are also members of A and B. But B A since someof its elements, e.g., 2 and 7, do not belong to A. Furthermore, since the elements of A, B, and C must alsobelong to the universal set U, we have that U must at least contain the set f1; 2; 3; 4; 5; 6; 7; 8; 9g.(b) Let N, Z, Q, and R be de®ned as in Section 1.2. ThenN Z Q R(c) The set E  f2; 4; 6g is a subset of the set F  f6; 2; 4g, since each number 2, 4, and 6 belonging to E alsobelongs to F. In fact, E  F. In a similar manner it can be shown that every set is a subset of itself.The following properties of sets should be noted:(i) Every set A is a subset of the universal set U since, by de®nition, all the elements of A belong to U.Also the empty set D is a subset of A.(ii) Every set A is a subset of itself since, trivially, the elements of A belong to A.(iii) If every element of A belongs to a set B, and every element of B belongs to a set C, then clearlyevery element of A belongs to C. In other words, if A B and B C, then A C.(iv) If A B and B A, then A and B have the same elements, i.e., A  B. Conversely, if A  B thenA B and B A since every set is a subset of itself.We state these results formally.Theorem 1.1: (i) For any set A, we have D A U.(ii) For any set A, we have A A.(iii) If A B and B C, then A C.(iv) A  B if and only if A B and B A.If A B, then it is still possible that A  B. When A B but A T B, we say A is a proper subset of B.We will write A B when A is a proper subset of B. For example, supposeA  f1; 3g B  f1; 2; 3g; C  f1; 3; 2gThen A and B are both subsets of C; but A is a proper subset of C, whereas B is not a proper subset of Csince B  C.1.5 VENN DIAGRAMSA Venn diagram is a pictoral representation of sets in which sets are represented by enclosed areas inthe plane.The universal set U is represented by the interior of a rectangle, and the other sets are represented bydisks lying within the rectangle. If A B, then the disk representing A will be entirely within the diskrepresenting B as in Fig. 1-1(a). If A and B are disjoint, i.e., if they have no elements in common, then thedisk representing A will be separated from the disk representing B as in Fig. 1-1(b).However, if A and B are two arbitrary sets, it is possible that some objects are in A but not in B,some are in B but not in A, some are in both A and B, and some are in neither A nor B; hence in generalwe represent A and B as in Fig. 1-1(c).CHAP. 1] SET THEORY 3
5. 5. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004Fig. 1-1Arguments and Venn DiagramsMany verbal statements are essentially statements about sets and can therefore be described by Venndiagrams.Hence Venn diagrams can sometimes be used to determine whether or not an argument is valid.Consider the following example.EXAMPLE 1.3 Show that the following argument (adapted from a book on logic by Lewis Carroll, the author ofAlice in Wonderland) is valid:S1: My saucepans are the only things I have that are made of tin.S2: I ®nd all your presents very useful.S3: None of my saucepans is of the slightest use.S: Your presents to me are not made of tin.(The statements S1, S2, and S3 above the horizontal line denote the assumptions, and the statement S below the linedenotes the conclusion. The argument is valid if the conclusion S follows logically from the assumptions S1, S2, andS3.)By S1 the tin objects are contained in the set of saucepans and by S3 the set of saucepans and the set of usefulthings are disjoint: hence draw the Venn diagram of Fig. 1-2.Fig. 1-24 SET THEORY [CHAP. 1
6. 6. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004By S2 the set of ``your presents is a subset of the set of useful things; hence draw Fig. 1-3.Fig. 1-3The conclusion is clearly valid by the above Venn diagram because the set of ``your presents is disjoint fromthe set of tin objects.1.6 SET OPERATIONSThis section introduces a number of important operations on sets.Union and IntersectionThe union of two sets A and B, denoted by A  B, is the set of all elements which belong to A or to B;that is,A  B  fx: x P A or x P BgHere ``or is used in the sense of and/or. Figure 1-4(a) is a Venn diagram in which A  B is shaded.The intersection of two sets A and B, denoted by A  B, is the set of elements which belong to both Aand B; that is,A  B  fx: x P A and x P BgFigure 1-4(b) is a Venn diagram in which A  B is shaded.If A  B  D, that is, if A and B do not have any elements in common, then A and B are said to bedisjoint or nonintersecting.Fig. 1-4EXAMPLE 1.4(a) Let A  f1; 2; 3; 4g, B  f3; 4; 5; 6; 7g, C  f2; 3; 5; 7g. ThenA  B  f1; 2; 3; 4; 5; 6; 7g A  B  f3; 4gA  C  f1; 2; 3; 4; 5; 7g A  C  f2; 3gCHAP. 1] SET THEORY 5
7. 7. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004(b) Let M denote the set of male students in a university C, and let F denote the set of female students in C. ThenM  F  Csince each student in C belongs to either M or F. On the other hand,M  F  Dsince no student belongs to both M and F.The operation of set inclusion is closely related to the operations of union and intersection, as shownby the following theorem.Theorem 1.2: The following are equivalent: A B, A  B  A, and A  B  B.Note: This theorem is proved in Problem 1.27. Other conditions equivalent to A B are given inProblem 1.37.ComplementsRecall that all sets under consideration at a particular time are subsets of a ®xed universal set U. Theabsolute complement or, simply, complement of a set A, denoted by Ac, is the set of elements which belongto U but which do not belong to A; that is,Ac fx: x P U, x =P AgSome texts denote the complement of A by AHor A. Figure 1-5(a) is a Venn diagram in which Acisshaded.The relative complement of a set B with respect to a set A or, simply, the dierence of A and B,denoted by AnB, is the set of elements which belong to A but which do not belong to B; that isAnB  fx: x P A; x =P BgThe set AnB is read ``A minus B. Many texts denote AnB by A À B or A \$ B. Figure 1-5(b) is a Venndiagram in which AnB is shaded.Fig. 1-5EXAMPLE 1.5 Suppose U  N  f1; 2; 3; . . .g, the positive integers, is the universal set. LetA  f1; 2; 3; 4; g; B  f3; 4; 5; 6; 7g; C  f6; 7; 8; 9gand let E  f2; 4; 6; 8; . . .g, the even integers. ThenAc f5; 6; 7; 8; . . .g; B c f1; 2; 8; 9; 10; . . .g; C c f1; 2; 3; 4; 5; 10; 11; . . .gandAnB  f1; 2g; BnC  f3; 4; 5g; BnA  f5; 6; 7g; CnE  f7; 9gAlso, Ec f1; 3; 5; . . .g, the odd integers.6 SET THEORY [CHAP. 1
8. 8. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004Fundamental ProductsConsider n distinct sets A1; A2; . . . ; An. A fundamental product of the sets is a set of the formAÃ1  AÃ2  Á Á Á  AÃnwhere AÃi is either Ai or Aci . We note that (1) there are 2nsuch fundamental products, (2) any two suchfundamental products are disjoint, and (3) the universal set U is the union of all the fundamentalproducts (Problem 1.64). There is a geometrical description of these sets which is illustrated below.EXAMPLE 1.6 Consider three sets A, B, and C. The following lists the eight fundamental products of the threesets:P1  A  B  C;P2  A  B  C cP3  A  B c C;P4  A  B c C c;P5  Ac B  C;P6  Ac B  C cP7  Ac B c CP8  Ac B c C cThese eight products correspond precisely to the eight disjoint regions in the Venn diagram of sets A, B, C in Fig. 1-6as indicated by the labeling of the regions.Fig. 1-6 Fig. 1-7Symmetric DierenceThe symmetric dierence of sets A and B, denoted by A È B, consists of those elements which belongto A or B but not to both; that is,A È B  A  BnA  BOne can also show (Problem 1.18) thatA È B  AnB  BnAFor example, suppose A  f1; 2; 3; 4; 5; 6g and B  f4; 5; 6; 7; 8; 9g. ThenAnB  f1; 2; 3g; BnA  f7; 8; 9g and so A È B  f1; 2; 3; 7; 8; 9gFigure 1-7 is a Venn diagram in which A È B is shaded.1.7 ALGEBRA OF SETS AND DUALITYSets under the operations of union, intersection, and complement satisfy various laws or identitieswhich are listed in Table 1-1. In fact, we formally state this:Theorem 1.3: Sets satisfy the laws in Table 1-1.There are two methods of proving equations involving set operations. One way is to use what itmeans for an object x to be an element of each side, and the other way is to use Venn diagrams. Forexample, consider the ®rst of DeMorgans laws.A  Bc Ac B cCHAP. 1] SET THEORY 7
9. 9. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004Method 1: We ®rst show that A  Bc Ac B c. If x P A  Bc, then x =P A  B.Thus x =P A and x =P B, and so x P Acand x P B c. Hence x P Ac B c.Next we show that Ac B c A  BC. Let x P Ac B c. Then x P Acand x P B c, so x =P A and x =P B. Hence x =P A  B, so x P A  Bc.We have proven that every element of A  Bcbelongs to Ac Bcand that every element of Ac Bcbelongs to A  Bc. Together, theseinclusions prove that the sets have the same elements, i.e., thatA  Bc Ac Bc.Method 2: From the Venn diagram for A  B in Fig. 1-4, we see that A  Bcisrepresented by the shaded area in Fig. 1-8(a). To ®nd Ac B c, the area inboth Acand B c, we shaded Acwith strokes in one direction and B cwithstrokes in another direction as in Fig. 1-8(b). Then Ac B cis representedby the crosshatched area, which is shaded in Fig. 1-8(c). Since A  Bcand Ac B care represented by the same area, they are equal.Fig. 1-88 SET THEORY [CHAP. 1Table 1-1 Laws of the algebra of setsIdempotent laws(1a) A  A  A (1b) A  A  AAssociative laws(2a) A  B  C  A  B  C (2b) A  B  C  A  B  CCommutative laws(3a) A  B  B  A (3b) A  B  B  ADistributive laws(4a) A  B  C  A  B  A  C (4b) A  B  C  A  B  A  CIdentity laws(5a) A  D  A (5b) A  U  A(6a) A  U  U (6b) A  D  DInvolution laws(7) Acc AComplement laws(8a) A  Ac U (8b) A  Ac D(9a) U c D (9b) Dc UDeMorgans laws(10a) A  Bc Ac B c(10b) A  Bc Ac B c
10. 10. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004DualityNote that the identities in Table 1-1 are arranged in pairs, as, for example, (2a) and (2b). We nowconsider the principle behind this arrangement. Suppose E is an equation of set algebra. The dual EÃofE is the equation obtained by replacing each occurrence of , , U, and D in E by , , D and U,respectively. For example, the dual ofU  A  B  A  A is D  A  B  A  AObserve that the pairs of laws in Table 1-1 are duals of each other. It is a fact of set algebra, called theprinciple of duality, that, if any equation E is an identity, then its dual EÃis also an identity.1.8 FINITE SETS, COUNTING PRINCIPLEA set is said to be ®nite if it contains exactly m distinct elements where m denotes some nonnegativeinteger. Otherwise, a set is said to be in®nite. For example, the empty set D and the set of letters of theEnglish alphabet are ®nite sets, whereas the set of even positive integers, f2; 4; 6; . . .g, is in®nite.The notation nA will denote the number of elements in a ®nite set A. Some texts use #A; jAj orcardA instead of nA.Lemma 1.4: If A and B are disjoint ®nite sets, then A  B is ®nite andnA  B  nA  nBProof. In counting the elements of A  B, ®rst count those that are in A. There are nA of these. Theonly other elements of A  B are those that are in B but not in A. But since A and B are disjoint, noelement of B is in A, so there are nB elements that are in B but not in A. Therefore,nA  B  nA  nB.We also have a formula for nA  B even when they are not disjoint. This is proved in Problem 1.28.Theorem 1.5: If A and B are ®nite sets, then A  B and A  B are ®nite andnA  B  nA  nB À nA  BWe can apply this result to obtain a similar formula for three sets:Corollary 1.6: If A, B, and C are ®nite sets, then so is A  B  C, andnA  B  C  nA  nB  nC À nA  B À nA  C À nB  C  nA  B  CMathematical induction (Section 1.10) may be used to further generalize this result to any ®nitenumber of sets.EXAMPLE 1.7 Consider the following data for 120 mathematics students at a college concerning the languagesFrench, German, and Russian:65 study French45 study German42 study Russian20 study French and German25 study French and Russian15 study German and Russian8 study all three languages.Let F, G, and R denote the sets of students studying French, German andRussian, respectively. We wish to ®nd the number of students who study atleast one of the three languages, and to ®ll in the correct number of studentsin each of the eight regions of the Venn diagram shown in Fig. 1-9.CHAP. 1] SET THEORY 9Fig. 1-9
11. 11. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 200410 SET THEORY [CHAP. 1By Corollary 1.6,F  G  R  nF  nG  nR À nF  G À nF  R À nG  R  nF  G  R 65  45  42 À 20 À 25 À 15  8  100That is, nF  G  R  100 students study at least one of the threelanguages.We now use this result to ®ll in the Venn diagram. We have:8 study all three languages,20 À 8  12 study French and German but not Russian25 À 8  17 study French and Russian but not German15 À 8  7 study German and Russian but not French65 À 12 À 8 À 17  28 study only French45 À 12 À 8 À 7  18 study only German42 À 17 À 8 À 7  10 study only Russian120 À 100  20 do not study any of the languagesAccordingly, the completed diagram appears in Fig. 1-10. Observe that 28  18  10  56 students study only one ofthe languages.1.9 CLASSES OF SETS, POWER SETS, PARTITIONSGiven a set S, we might wish to talk about some of its subsets. Thus we would be considering a set ofsets. Whenever such a situation occurs, to avoid confusion we will speak of a class of sets or collection ofsets rather than a set of sets. If we wish to consider some of the sets in a given class of sets, then we speakof a subclass or subcollection.EXAMPLE 1.8 Suppose S  f1; 2; 3; 4g. Let A be the class of subsets of S which contain exactly three elements ofS. ThenA  f1; 2; 3g; f1; 2; 4g; f1; 3; 4g; f2; 3; 4gThe elements of A are the sets f1; 2; 3g, f1; 2; 4g, f1; 3; 4g, and f2; 3; 4g.Let B be the class of subsets of S which contain 2 and two other elements of S. ThenB  f1; 2; 3g; f1; 2; 4g; f2; 3; 4gThe elements of B are the sets f1; 2; 3g, f1; 2; 4g, and f2; 3; 4g. Thus B is a subclass of A, since every element of B isalso an element of A. (To avoid confusion, we will sometimes enclose the sets of a class in brackets instead of braces.)Power SetsFor a given set S, we may speak of the class of all subsets of S. This class is called the power set of S,and will be denoted by Power(S). If S is ®nite, then so is Power(S). In fact, the number of elements inPower(S) is 2 raised to the power of S; that is,nPowerS  2nS(For this reason, the power set of S is sometimes denoted by 2S.)EXAMPLE 1.9 Suppose S  f1; 2; 3g. ThenPowerS  D; f1g; f2g; f3g; f1; 2g; f1; 3g; f2; 3g; SNote that the empty set D belongs to Power(S) since D is a subset of S. Similarly, S belongs to Power(S). Asexpected from the above remark, Power(S) has 23 8 elements.Fig. 1-10
12. 12. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004CHAP. 1] SET THEORY 11PartitionsLet S be a nonempty set. A partition of S is a subdivisionof S into nonoverlapping, nonempty subsets. Precisely, a par-tition of S is a collection fAig of nonempty subsets of S suchthat:(i) Each a in S belongs to one of the Ai.(ii) The sets of fAig are mutually disjoint; that is, ifAi T Aj then Ai  Aj  DThe subsets in a partition are called cells. Figure 1-11 is a Venn diagram of a partition of the rectangularset S of points into ®ve cells, A1, A2, A3, A4, and A5.EXAMPLE 1.10 Consider the following collections of subsets of S  f1; 2; . . . ; 8; 9g:(i) f1; 3; 5g; f2; 6g; f4; 8; 9g(ii) f1; 3; 5g; f2; 4; 6; 8g; f5; 7; 9g(iii) f1; 3; 5g; f2; 4; 6; 8g; f7; 9gThen (i) is not a partition of S since 7 in S does not belong to any of the subsets. Furthermore, (ii) is not a partitionof S since f1; 3; 5g and f5; 7; 9g are not disjoint. On the other hand, (iii) is a partition of S.Generalized Set OperationsThe set operations of union and intersection were de®ned above for two sets. These operations canbe extended to any number of sets, ®nite or in®nite, as follows.Consider ®rst a ®nite number of sets, say, A1, A2, . . ., Am. The union and intersection of these setsare denoted and de®ned, respectively, byA1  A2  Á Á Á  Am  mi1Ai  fx: x P Ai for some AigA1  A2  Á Á Á  Am  mi1Ai  fx: x P Ai for every AigThat is, the union consists of those elements which belong to at least one of the sets, and the intersectionconsists of those elements which belong to all the sets.Now let A be any collection of sets. The union and the intersection of the sets in the collection A isdenoted and de®ned, respectively, byA: A P A)  fx: x P A for some A P AgA: A P A)  fx: x P A for every A P AgThat is, the union consists of those elements which belong to at least one of the sets in the collection A,and the intersection consists of those elements which belong to every set in the collection A.EXAMPLE 1.11 Consider the setsA1  f1; 2; 3; . . .g  N; A2  f2; 3; 4; . . .g; A3  f3; 4; 5; . . .g; An  fn; n  1; n  2; . . .gThen the union and intersection of the sets are as follows:An: n P N  N and  An: n P N  DDeMorgans laws also hold for the above generalized operations. That is:Theorem 1.7: Let A be a collection of sets. Then(i) A: A P Ac Ac: A P A(ii) A: A P Ac Ac: A P AFig. 1-11
13. 13. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.10 MATHEMATICAL INDUCTIONAn essential property of the setN  f1; 2; 3; . . .gwhich is used in many proofs, follows:Principle of Mathematical Induction I: Let P be a proposition de®ned on the positive integers N, i.e.,Pn is either true or false for each n in N. Suppose P has the following two properties:(i) P1 is true.(ii) Pn  1 is true whenever Pn is true.Then P is true for every positive integer.We shall not prove this principle. In fact, this principle is usually given as one of the axioms when Nis developed axiomatically.EXAMPLE 1.12 Let P be the proposition that the sum of the ®rst n odd numbers is n2; that is,Pn: 1  3  5  . . .  2n À 1  n2(The nth odd number is 2n À 1, and the next odd number is 2n  1). Observe that Pn is true for n  1, that is,P1: 1  12Assuming Pn is true, we add 2n  1 to both sides of Pn, obtaining1  3  5  . . .  2n À 1  2n  1  n2 2n  1  n  12which is Pn  1. That is, Pn  1 is true whenever Pn is true. By the principle of mathematical induction, P istrue for all n.There is a form of the principle of mathematical induction which is sometimes more convenient touse. Although it appears dierent, it is really equivalent to the principle of induction.Principle of Mathematical Induction II: Let P be a proposition de®ned on the positive integers N suchthat:(i) P1 is true.(ii) Pn is true whenever Pk is true for all 1 k n.Then P is true for every positive integer.Remark: Sometimes one wants to prove that a proposition P is true for the set of integersfa; a  1; a  2; . . .gwhere a is any integer, possibly zero. This can be done by simply replacing 1 by a in either of the abovePrinciples of Mathematical Induction.Solved ProblemsSETS AND SUBSETS1.1. Which of these sets are equal: fr; t; sg, fs; t; r; sg, ft; s; t; rg, fs; r; s; tg?They are all equal. Order and repetition do not change a set.12 SET THEORY [CHAP. 1
14. 14. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.2. List the elements of the following sets; here N  f1; 2; 3; . . .g.(a) A  fx: x P N; 3 x 12g(b) B  fx: x P N, x is even, x 15g(c) C  fx: x P N, 4  x  3g.(a) A consists of the positive integers between 3 and 12; henceA  f4; 5; 6; 7; 8; 9; 10; 11g(b) B consists of the even positive integers less than 15; henceB  f2; 4; 6; 8; 10; 12; 14g(c) There are no positive integers which satisfy the condition 4  x  3; hence C contains no elements. Inother words, C  D, the empty set.1.3. Consider the following sets:D; A  f1g; B  f1; 3g; C  f1; 5; 9g; D  f1; 2; 3; 4; 5g;E  f1; 3; 5; 7; 9g; U  f1; 2; . . . ; 8; 9gInsert the correct symbol or or between each pair of sets:(a) D, A (c) B, C (e) C, D ( g) D, E(b) A, B (d ) B, E ( f ) C, E (h) D, U(a) D A because D is a subset of every set.(b) A B because 1 is the only element of A and it belongs to B.(c) B C because 3 P B but 3 =P C.(d ) B E because the elements of B also belong to E.(e) C D because 9 P C but 9 =P D.( f ) C E because the elements of C also belong to E.( g) D E because 2 P D but 2 =P E.(h) D U because the elements of D also belong to U.1.4. Show that A  f2; 3; 4; 5g is not a subset of B  fx: x P N, x is even}.It is necessary to show that at least one element in A does not belong to B. Now 3 P A and, since Bconsists of even numbers, 3 =P B; hence A is not a subset of B.1.5. Show that A  f2; 3; 4; 5g is a proper subset of C  f1; 2; 3; . . . ; 8; 9g.Each element of A belongs to C so A C. On the other hand, 1 P C but 1 =P A. Hence A T C.Therefore A is a proper subset of C.SET OPERATIONSProblems 1.6 to 1.8 refer to the universal set U  f1; 2; . . . ; 9g and the setsA  f1; 2; 3; 4; 5g;B  f4; 5; 6; 7g;C  f5; 6; 7; 8; 9g;D  f1; 3; 5; 7; 9g;E  f2; 4; 6; 8gF  f1; 5; 9gCHAP. 1] SET THEORY 13
15. 15. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.6. Find:(a) A  B and A  B (c) A  C and A  C (e) E  E and E  E(b) B  D and B  D (d ) D  E and D  E ( f ) D  F and D  FRecall that the union X  Y consists of those elements in either X or Y (or both), and that theintersection X  Y consists of those elements in both X and Y.(a) A  B  f1; 2; 3; 4; 5; 6; 7g A  B  f4; 5g(b) B  D  f1; 3; 4; 5; 6; 7; 9g B  D  f5; 7g(c) A  C  f1; 2; 3; 4; 5; 6; 7; 8; 9g  U A  C  f5g(d ) D  E  f1; 2; 3; 4; 5; 6; 7; 8; 9g  U D  E  D(e) E  E  f2; 4; 6; 8g  E E  E  f2; 4; 6; 8g  E( f ) D  F  f1; 3; 5; 7; 9g  D D  F  f1; 5; 9g  FObserve that F D; so by Theorem 1.2 we must have D  F  D and D  F  F.1.7. Find: (a) Ac; B c; Dc; E c; (b) AnB, BnA, DnE, FnD; (c) A È B, C È D, E È F.Recall that:(1) The complement X cconsists of those elements in the universal set U which do not belong to X.(2) The dierence XnY consist of the elements in X which do not belong to Y.(3) The symmetric dierence X È Y consists of the elements in X or in Y but not in both X and Y.Therefore:(a) Ac f6; 7; 8; 9g; B c f1; 2; 3; 8; 9g; Dc f2; 4; 6; 8g  E; E c f1; 3; 5; 7; 9g  D.(b) AnB  f1; 2; 3g; BnA  f6; 7g; DnE  f1; 3; 5; 7; 9g  D; FnD  D.(c) A È B  f1; 2; 3; 6; 7g; C È D  f1; 3; 8; 9g; E È F  f2; 4; 6; 8; 1; 5; 9g  E  F.1.8. Find: (a) A  B  E; (b) AnEc;(c) A  DnB; (d ) B  F  C  E.(a) First compute B  E  f2; 4; 5; 6; 7; 8g. Then A  B  E  f2; 4; 5g.(b) AnE  f1; 3; 5g. Then AnEc f2; 4; 6; 7; 8; 9g.(c) A  D  f1; 3; 5g. Now A  DnB  f1; 3g.(d ) B  F  f5g and C  E  f6; 8g. So B  F  C  E  f5; 6; 8g.1.9. Show that we can have A  B  A  C without B  C.Let A  f1; 2g, B  f2; 3g, and C  f2; 4g. Then A  B  f2g and A  C  f2g. Thus A  B  A  Cbut B T C.VENN DIAGRAMS1.10. Consider the Venn diagram of two arbitrary sets A and B in Fig. 1-1(c). Shade the sets:(a) A  B c; (b) BnAc.(a) First shade the area represented by A with strokes in one direction (///), and then shade the arearepresented by Bc(the area outside B), with strokes in another direction (). This is shown in Fig.1-12(a). The cross-hatched area is the intersection of these two sets and represents A  B cand this isshown in Fig. 1-12(b). Observe that A  B c AnB. In fact, AnB is sometimes de®ned to be A  B c.14 SET THEORY [CHAP. 1
16. 16. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004CHAP. 1] SET THEORY 15Fig. 1-12(b) First shade the area represented by BnA (the area of B which does not lie in A) as in Fig. 1-13(a). Thenthe area outside this shaded region, which is shown in Fig. 1-13(b), represents BnAc.Fig. 1-131.11. Illustrate the distributive law A  B  C  A  B  A  C with Venn diagrams.Draw three intersecting circles labeled A, B, C, as in Fig. 1-14(a). Now, as in Fig. 1-14(b) shade A withstrokes in one direction and shade B  C with strokes in another direction; the crosshatched area isA  B  C, as in Fig. 1-14(c). Next shade A  B and then A  C, as in Fig. 1-14(d); the total area shadedis A  B  A  C, as in Fig. 1-14(e).As expected by the distributive law, A  B  C and A  B  A  C are both represented by thesame set of points.Fig. 1-14
19. 19. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.17. Prove the following identity: A  B  A  B c  A:Statement Reason1. A  B  A  B c  A  B  B c Distributive law2. B  B c D Complement law3. A  B  A  B c  A  D Substitution4. A  D  A Identity law5. A  B  A  B c  A Substitution1.18. Prove A  BnA  B  AnB  BnA. (Thus either one may be used to de®ne A È B:)Using XnY  X  Ycand the laws in Table 1-1, including DeMorgans laws, we obtain:A  BnA  B  A  B  A  Bc A  B  Ac B c A  Ac  A  B c  B  Ac  B  B c D  A  B c  B  Ac  D A  B c  B  Ac  AnB  BnA:CLASSES OF SETS1.19. Find the elements of the set A  f1; 2; 3g, f4; 5g, f6; 7; 8g:A is a class of sets; its elements are the sets f1; 2; 3g, f4; 5g, and f6; 7; 8g:1.20. Consider the class A of sets in Problem 1.19. Determine whether each of the following is true orfalse:(a) 1 P A (c) f6; 7; 8g P A (e) D P A(b) f1; 2; 3g A (d ) ff4; 5gg A ( f ) D A(a) False. 1 is not one of the elements of A.(b) False. f1; 2; 3g is not a subset of A; it is one of the elements of A.(c) True. f6; 7; 8g is one of the elements of A.(d ) True. ff4; 5gg, the set consisting of the element f4; 5g, is a subset of A.(e) False. The empty set is not an element of A, i.e., it is not one of the three sets listed as elements of A.( f ) True. The empty set is a subset of every set; even a class of sets.1.21. Determine the power set PowerA of A  fa; b; c; dg.The elements of PowerA are the subsets of A. HencePowerA  A; fa; b; cg; fa; b; dg; fa; c; dg; fb; c; dg; fa; bg; fa; cg;fa; dg; fb; cg; fb; dg; fc; dg; fag; fbg; fcg; fdg; DAs expected, PowerA has 24 16 elements.1.22. Let S  {red, blue, green, yellow}. Determine which of the following is a partition of S:(a) P1  fredg; fblue; greeng. (c) P3  D; fred; blueg; fgreen; yellowg.(b) P2  fred; blue; green; yellowg: (d ) P4  fbluegfred; yellow; greeng:18 SET THEORY [CHAP. 1
20. 20. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004(a) No, since yellow does not belong to any cell.(b) Yes, since P2 is a partition of S whose only element is S itself.(c) No, since the empty set D cannot belong to a partition.(d ) Yes, since each element of S appears in exactly one cell.1.23. Find all partitions of S  f1; 2; 3g.Note that each partition of S contains either 1, 2, or 3 cells. The partitions for each number of cells areas follows:(1) : [S](2) : [{1}, {2, 3}], [{2}, {1, 3}], [{3}, {1, 2}](3) : [{1}, {2}, {3}]Thus we see that there are ®ve dierent partitions of S.MISCELLANEOUS PROBLEMS1.24. Prove the proposition P that the sum of the ®rst n positive integers is 12 nn  1; that is,Pn: 1  2  3  . . .  n 12nn  1The proposition holds for n  1 sinceP1 : 1  12 11  1Assuming Pn is true, we add n  1 to both sides of Pn, obtaining1  2  3  . . .  n  n  1  12 nn  1  n  1 12 nn  1  2n  1 12 n  1n  2which is Pn  1. That is, Pn  1 is true whenever Pn is true. By the principle of induction, P is true forall n.1.25. Prove the following proposition (for n ! 0:Pn: 1  2  22 23 Á Á Á  2n 2n1À 1P0 is true since 1  21À 1. Assuming Pn is true, we add 2n1to both sides of Pn, obtaining1  21 22 Á Á Á  2n 2n1 2n1À 1  2n1 22n1 À 1 2n2À 1which is Pn  1. Thus Pn  1 is true whenever Pn is true. By the principle of induction, P is true for alln ! 0.1.26. Prove: A  B A A  B and A  B B A  B:Since every element in A  B is in both A and B, it is certainly true that if x P A  B then x P A; henceA  B A. Furthermore, if x P A, then x P A  B (by the de®nition of A  B), so A A  B. Puttingthese together gives A  B A A  B. Similarly, A  B B A  B.CHAP. 1] SET THEORY 19
21. 21. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.27. Prove Theorem 1.2: The following are equivalent: A B, A  B  A, and A  B  B.Suppose A B and let x P A. Then x P B, hence x P A  B and A A  B. By Problem 1.26,A  B A. Therefore A  B  A. On the other hand, suppose A  B  A and let x P A. Thenx P A  B, hence x P A and x P B. Therefore, A B. Both results show that A B is equivalent toA  B  A.Suppose again that A B. Let x P A  B. Then x P A or x P B. If x P A, then x P B because A B.In either case, x P B. Therefore A  B B. By Problem 1.26, B A  B. Therefore A  B  B. Now sup-pose A  B  B and let x P A. Then x P A  B by de®nition of union sets. Hence x P B  A  B. ThereforeA B. Both results show that A B is equivalent to A  B  B.Thus A B, A  B  A and A  B  B are equivalent.1.28. Prove Theorem 1.5: If A and B are ®nite sets, then A  B and A  B are ®nite andnA  B  nA  nB À nA  BIf A and B are ®nite, then clearly A  B and A  B are ®nite.Suppose we count the elements of A and then count the elements of B. Then every element in A  Bwould be counted twice, once in A and once in B. HencenA  B  nA  nB À nA  BAlternatively, (Problem 1.36) A is the disjoint union of AnB and A  B, B is the disjoint union of BnAand A  B, and A  B is the disjoint union of AnB, A  B, and BnA. Therefore, by Lemma 1.4,nA  B  nAnB  nA  B  nBnA nAnB  nA  B  nBnA  nA  B À nA  B nA  nB À nA  BSupplementary ProblemsSETS AND SUBSETS1.29. Which of the following sets are equal?A  fx: x2À 4x  3  0g, C  fx: x P N; x 3g, E  f1; 2g, G  f3; 1gB  fx: x2À 3x  2  0g, D  fx: x P N, x is odd, x 5g, F  f1; 2; 1g, H  f1; 1; 3g1.30. List the elements of the following sets if the universal set is U  fa; b; c; . . . ; y; zg. Furthermore, identifywhich of the sets, if any, are equal.A  fx: x is a vowel} C  fx: x precedes f in the alphabet}B  fx: x is a letter in the word ``little} D  fx: x is a letter in the word ``title}1.31. Let A  f1; 2; . . . ; 8; 9g, B  f2; 4; 6; 8g, C  f1; 3; 5; 7; 9g, D  f3; 4; 5g, E  f3; 5g:Which of the above sets can equal a set X under each of the following conditions?(a) X and B are disjoint. (c) X A but XC:(b) X D but XB. (d ) X C but XA.SET OPERATIONSProblems 1.32 to 1.34 refer to the sets U  f1; 2; 3; . . . ; 8; 9g and A  f1; 2; 5; 6g, B  f2; 5; 7g, C  f1; 3; 5; 7; 9g:20 SET THEORY [CHAP. 1
22. 22. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.32. Find: (a) A  B and A  C; (b) A  B and B  C; (c) Acand C c.1.33. Find: (a) AnB and AnC; (b) A È B and A È C.1.34. Find: (a) A  CnB; (b) A  Bc; (c) B È CnA.1.35. Let A  fa; b; c; d; eg, B  fa; b; d; f ; gg, C  fb; c; e; g; hg, D  fd; e; f ; g; hg.Find:(a) A  B (d ) A  B  D ( g) A  DnC j A È B(b) B  C (e) BnC  D (h) B  C  D k A È C(c) CnD ( f ) A  D  B (i ) CnAnD l A È DnB1.36. Let A and B be any sets. Prove:(a) A is the disjoint union of AnB and A  B:(b) A  B is the disjoint union of AnB, A  B, and BnA:1.37. Prove the following:(a) A B if and only if A  B c D.(b) A B if and only if Ac B  U.(c) A B if and only if B c Ac:(d ) A B if and only if AnB  D:(Compare results with Theorem 1.2.)1.38. Prove the Absorption laws: (a) A  A  B  A; (b) A  A  B  A:1.39. The formula AnB  A  B cde®nes the dierence operation in terms of the operations of intersection andcomplement. Find a formula that de®nes the union A  B in terms of the operations of intersection andcomplement.VENN DIAGRAMS1.40. The Venn diagram in Fig. 1-17 shows sets A, B, C. Shade the following sets: (a) AnB  C;(b) Ac B  C; (c) Ac CnB.Fig. 1-17CHAP. 1] SET THEORY 21
24. 24. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 2004CLASSES OF SETS1.48. Find the power set PowerA of A  f1; 2; 3; 4; 5g:1.49. Given A  fa; bg, fcg, fd; e; f g.(a) State whether each of the following is true or false:i a P A, (ii) fcg A, (iii) fd; e; f g P A; (iv) ffa; bgg A, (v) D A:(b) Find the power set of A.1.50. Suppose A is a ®nite set and nA  m. Prove that PowerA has 2melements.PARTITIONS1.51. Let X  f1; 2; . . . ; 8; 9g. Determine whether or not each of the following is a partition of X:(a) f1; 3; 6g; f2; 8g, f5; 7; 9g] (c) f2; 4; 5; 8g, f1; 9g, f3; 6; 7g(b) f1; 5; 7g, f2; 4; 8; 9g, f3; 5; 6g] (d ) f1; 2; 7g; f3; 5g, f4; 6; 8; 9g, f3; 5g1.52. Let S  f1; 2; 3; 4; 5; 6g. Determine whether or not each of the following is a partition of S:(a) P1  f1; 2; 3g, f1; 4; 5; 6g (c) P3  f1; 3; 5g, f2; 4g, f6g(b) P2  f1; 2g, f3; 5; 6g] (d ) P4  f1; 3; 5g, f2; 4; 6; 7g1.53. Determine whether or not each of the following is a partition of the set N of positive integers:(a) fn: n 5g, fn: n 5g (b) fn: n 5g, f0g, f1; 2; 3; 4; 5g, (c) fn: n2 11g, fn: n2 11g1.54. Let A1; A2; . . . ; Am and B1; B2; . . . ; Bn be partitions of a set X. Show that the collection of setsP  Ai  Bj : i  1; . . . ; m; j  1; . . . ; nnDis also a partition (called the cross partition) of X. (Observe that we have deleted the empty set D.)1.55. Let X  f1; 2; 3; . . . ; 8; 9g. Find the cross partition P of the following partitions of X:P1  f1; 3; 5; 7; 9g; f2; 4; 6; 8g and P2  f1; 2; 3; 4g; f5; 7g; f6; 8; 9gARGUMENTS AND VENN DIAGRAMS1.56. Use a Venn diagram to show that the following argument is valid:S1: Babies are illogical.S2: Nobody is despised who can manage a crocodile.S3: Illogical people are despised.________________________________________________S: Babies cannot manage crocodiles.(This argument is adopted from Lewis Carroll, Symbolic Logic; he is also the author of Alice in Wonderland.)CHAP. 1] SET THEORY 23
25. 25. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.57. Consider the following assumptions:S1: All dictionaries are useful.S2: Mary owns only romance novels.S3: No romance novel is useful.Determine the validity of each of the following conclusions: (a) Romance novels are not dictionaries. (b)Mary does not own a dictionary. (c) All useful books are dictionaries.INDUCTION1.58. Prove: 2  4  6  Á Á Á  2n  nn  1:1.59. Prove: 1  4  7  Á Á Á  3n À 2  2n3n À 1:1.60. Prove:11 Á 313 Á 515 Á 7 Á Á Á 12n À 12n  112n  1:1.61. Prove: 12 22 32 . . .  n2nn  12n  16:MISCELLANEOUS PROBLEMS1.62. Suppose N  f1; 2; 3; . . .g is the universal set andA  fx: x 6g, B  fx: 4 x 9g, C  f1; 3; 5; 7; 9g, D  f2; 3; 5; 7; 8gFind: (a) A È B; (b) B È C; (c) A  B È D; (d ) A  B È A  D:1.63. Prove the following properties of the symmetric dierence:(i) A È B È C  A È B È C (Associative law).(ii) A È B  B È A (Commutative law).(iii) If A È B  A È C, then B  C (Cancellation law).(iv) A  B È C  A  B È A  C (Distribution law).1.64. Consider n distinct sets A1; A2; . . . ; An in a universal set U. Prove:(a) There are 2nfundamental products of the n sets.(b) Any two fundamental products are disjoint.(c) U is the union of all the fundamental products.Answers to Supplementary Problems1.29. B  C  E  F; A  D  G  H:1.30. A  fa; e; i; o; ug; B  D  f1; i; t; eg; C  fa; b; c; d; eg:1.31. (a) C and E; (b) D and E; (c) A; B; D; (d ) None.1.32. (a) A  B  f2; 5g; A  C  f1; 5g: (b) A  B  f1; 2; 5; 6; 7g; B  C  f1; 2; 3; 5; 7; 9g:(c) Ac f3; 4; 7; 8; 9g; C c f2; 4; 6; 8g:24 SET THEORY [CHAP. 1
26. 26. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.33. (a) AnB  f1; 6g; AnC  f2; 6g: (b) A È B  f1; 6; 7g; A È C  f2; 3; 6; 7; 9g:1.34. (a) A  CnB  f1; 3; 6; 9g. (b) A  Bc f3; 4; 8; 9g: (c) B È CnA  f3; 9g:1.35. (a) {a, b, c, d, e, f, g}; (b) {b, g}; (c) {b, c}; (d ) {a, b, d, e}; (e) {a};( f ) {a, b, d, e, f, g}; ( g) fa; d; fg; (h) fgg; (i) D; j {c, e, f, g}; k {a, d, y, h};l {c, h}.1.39. A  B  Ac B cc1.40. See Fig. 1-18.Fig. 1-181.41. (a) A  B  C  A  B  C c  A  B c C(b) Ac B  C c  Ac B  C  Ac B c C(c) A  B  C  A  B  C c  A  B c C  Ac B  C c  A  B c C c1.42. No such Venn diagram exists. If A and C have an element in common, say x, and A B; then x must alsobelong to B. Thus B and C must also have an element in common.1.43. (a) A  B  B c Acc; (b) A  B c A  A  B; (c) A  A  B  A;(d ) A  B  Ac B  A  B c  Ac B c  D:1.45. (a) In®nite; (b) ®nite; (c) in®nite; (d ) ®nite; (e) ®nite; ( f ) in®nite.1.47. Use the data to ®rst ®ll in the Venn diagram of A (air-conditioning), R (radio), and W (power windows) inFig. 1-19. Then: (a) 5; (b) 4; (c) 2; (d ) 4; (e) 6; ( f ) 11; g 23; h 2.Fig. 1-19CHAP. 1] SET THEORY 25
27. 27. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text © The McGraw−HillCompanies, 20041.48. PowerA has 25 32 elements as follows:D; f1g; f2g; f3g; f4g; f5g; f1; 2g; f1; 3g; f1; 4g; f1; 5g; f2; 3g; f2; 4g; f2; 5g; f3; 4g; f3; 5g; f4; 5g;f1; 2; 3g; f1; 2; 4g; f1; 2; 5g; f2; 3; 4g; f2; 3; 5g; f3; 4; 5g; f1; 3; 4g; f1; 3; 5g; f1; 4; 5g; f2; 4; 5g; f1; 2; 3; 4g;f1; 2; 3; 5g; f1; 2; 4; 5g; f1; 3; 4; 5g; f2; 3; 4; 5g; A:1.49. (a) (i) False; (ii) False; (iii) True; (iv) True; (v) True.(b) Note nA  3; hence PowerA has 23 8 elements:PowerA  fA; fa; bg; fcg; fa; bg; fd; e; f g; fcg; fd; e; f g; fa; bg; fcg; fd; e; f g; Dg1.50. Let x be an arbitrary element in PowerA. For each a P A, there are two possibilities: a P A or a =P A. Butthere are m elements in A; hence there are 2 Á 2 Á . . . Á 2  2mdierent sets X. That is, PowerA has 2melements.1.51. (a) No, (b) no, (c) yes, (d ) yes.1.52. (a) No, (b) no, (c) yes, (d ) no.1.53. (a) No, (b) no, (c) yes.1.55. P  f1; 3g; f5; 7g; f9g; f2; 4g; f8g:1.56. The three premises lead to the Venn diagram in Fig. 1-20. The set of babies and the set of people who canmanage crocodiles are disjoint. In other words, the conclusion S is valid.Fig. 1-201.57. The three premises lead to the Venn diagram in Fig. 1-21. From this diagram it follows that (a) and (b) arevalid conclusions. However, (c) is not a valid conclusion since there may be useful books which are notdictionaries.Fig. 1-211.62. (a) f1; 2; 3; 7; 8; 9g; (b) f1; 3; 4; 6; 8g; (c) f2; 3; 4; 6g; (d ) f2; 3; 4; 6g: [Note (c)=(d).]26 SET THEORY [CHAP. 1
28. 28. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004Chapter 2Relations2.1 INTRODUCTIONThe reader is familiar with many relations which are used in mathematics and computer science, e.g.,``less than, ``is parallel to, ``is a subset of, and so on. In a certain sense, these relations consider theexistence or nonexistence of a certain connection between pairs of objects taken in a de®nite order.Formally, we de®ne a relation in terms of these ``ordered pairs.There are three kinds of relations which play a major role in our theory: (i) equivalence relations, (ii)order relations, (iii) functions. Equivalence relations are mainly covered in this chapter. Order relationsare introduced here, but will also be discussed in Chapter 14. Functions are covered in the next chapter.Relations, as noted above, will be de®ned in terms of ordered pairs (a, b) of elements, where a isdesignated as the ®rst element and b as the second element. In particular,a; b  c; dif and only if a  c and b  d. Thus a; b T b; a unless a  b. This contrasts with sets studied inChapter 1, where the order of elements is irrelevant; for example, f3; 5g  f5; 3g:Although matrices will be covered in Chapter 5, we have included their connection with relationshere for completeness. These sections, however, can be ignored at a ®rst reading by those with noprevious knowledge of matrix theory.2.2 PRODUCT SETSConsider two arbitrary sets A and B: The set of all ordered pairs a; b where a P A and b P B iscalled the product, or Cartesian product, of A and B. A short designation of this product is A Â B, whichis read ``A cross B. By de®nition,A Â B  fa; b: a P A and b P BgOne frequently writes A2instead of A Â A.EXAMPLE 2.1 R denotes the set of real numbers and so R2 R Â R is the set of ordered pairs of real numbers.The reader is familiar with the geometrical representation of R2as points in the plane as in Fig. 2-1. Here each pointP represents an ordered pair a; b of real numbers and vice versa; the vertical line through P meets the x axis at a,and the horizontal line through P meets the y axis at b. R2is frequently called the Cartesian plane.EXAMPLE 2.2 Let A  f1; 2g and B  fa; b; cg. ThenA Â B  f1; ag; 1; b; 1; c; 2; a; 2; b; 2; cgB Â A  fa; 1; a; 2; b; 1; b; 2; c; 1; c; 2gA Â A  f1; 1; 1; 2; 2; 1; 2; 2gAlsoThere are two things worth noting in the above example. First ofall A Â B T B Â A. The Cartesian product deals with ordered pairs, sonaturally the order in which the sets are considered is important.Secondly, using nS for the number of elements in a set S, we havenA Â B  6  2 Á 3  nA Á nBIn fact, nA Â B  nA Á nB for any ®nite sets A and B. This followsfrom the observation that, for an ordered pair a; b in A Â B, thereare nA possibilities for a, and for each of these there are nBpossibilities for b.27Fig. 2-1
29. 29. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004The idea of a product of sets can be extended to any ®nite number of sets. For any setsA1; A2; F F F ; An, the set of all ordered n-tuples a1; a2; F F F ; an where a1 P A1, a2 P A2; F F F ; an P An is calledthe product of the sets A1; F F F ; An and is denoted byA1 Â A2 Â Á Á Á Â An orYni1AiJust as we write A2instead of A Â A, so we write Aninstead of A Â A Â Á Á Á Â A, where there are n factorsall equal to A. For example, R3 R Â R Â R denotes the usual three-dimensional space.2.3 RELATIONSWe begin with a de®nition.De®nition. Let A and B be sets. A binary relation or, simply, relation from A to B is a subset of A Â B:Suppose R is a relation from A to B. Then R is a set of ordered pairs where each ®rst element comesfrom A and each second element comes from B. That is, for each pair a P A and b P B, exactly one of thefollowing is true:(i) a; b P R; we than say ``a is R-related to b, written aRb.(ii) a; b =P R; we then say ``a is not R-related to b, written aR= b.If R is a relation from a set A to itself, that is, if R is a subset of A2 A Â A, then we say that R is arelation on A.The domain of a relation R is the set of all ®rst elements of the ordered pairs which belong to R, andthe range of R is the set of second elements.Although n-ary relations, which involve ordered n-tuples, are introduced in Section 2.12, the termrelation shall mean binary relation unless otherwise stated or implied.EXAMPLE 2.3(a) Let A  1; 2; 3 and B  fx; y; zg, and let R  f1; y, 1; z, 3; yg. Then R is a relation from A to B since R isa subset of A Â B. With respect to this relation,1Ry; 1Rz; 3Ry; but 1R=x; 2R=x; 2R=y; 2R=z; 3R=x; 3R=zThe domain of R is f1; 3g and the range is fy; zg:(b) Let A  {eggs, milk, corn} and B  {cows, goats, hens}. We can de®ne a relation R from A to B by a; b P R ifa is produced by b. In other words,R  {(eggs, hens), (milk, cows), (milk, goats)}With respect to this relation,eggs R hens, milk R cows, etc.(c) Suppose we say that two countries are adjacent if they have some part of their boundaries in common. Then ``isadjacent to is a relation R on the countries of the earth. Thus(Italy, Switzerland) P R but (Canada, Mexico) =P R(d ) Set inclusion is a relation on any collection of sets. For, given any pair of sets A and B, either A B or A B.(e) A familiar relation on the set Z of integers is ``m divides n. A common notation for this relation is to write mjnwhen m divides n. Thus 6j30 but 7j=25:( f ) Consider the set L of lines in the plane. Perpendicularity, written c, is a relation on L. That is, given any pair oflines a and b, either a c b or a c= b. Similarly, ``is parallel to, written k, is a relation on L since either a k b ora k= b.28 RELATIONS [CHAP. 2
30. 30. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004( g) Let A be any set. An important relation on A is that of equality.fa; a: a P Agwhich is usually denoted by ``. This relation is also called the identity or diagonal relation on A and it willalso be denoted by ÁA or simply Á.(h) Let A be any set. Then A Â A and D are subsets of A Â A and hence are relations on A called the universalrelation and empty relation, respectively.Inverse RelationLet R be any relation from a set A to a set B. The inverse of R, denoted by RÀ1, is the relation from Bto A which consists of those ordered pairs which, when reversed, belong to R; that is,RÀ1 fb; a: a; b P RgFor example, the inverse of the relation R  f1; y, 1; z, 3; yg from A  f1; 2; 3g to B  fx; y; zgfollows:RÀ1 fy; 1; z; 1; y; 3gClearly, if R is any relation, then RÀ1À1 R. Also, the domain and range of RÀ1are equal, respec-tively, to the range and domain of R. Moreover, if R is a relation on A, then RÀ1is also a relation on A.2.4 PICTORIAL REPRESENTATIONS OF RELATIONSFirst we consider a relation S on the set R of real numbers; that is, S is a subset of R2 R Â R.Since R2can be represented by the set of points in the plane, we can picture S by emphasizing thosepoints in the plane which belong to S. The pictorial representation of the relation is sometimes called thegraph of the relation.Frequently, the relation S consists of all ordered pairs of real numbers which satisfy some givenequationEx; y  0We usually identify the relation with the equation; that is, we speak of the relation Ex; y  0.EXAMPLE 2.4 Consider the relation S de®ned by the equationx2 y2 25That is, S consists of all ordered pairs x; y which satisfy the given equation. The graph of the equation is a circlehaving its center at the origin and radius 5. See Fig. 2-2.Fig. 2-2CHAP. 2] RELATIONS 29
31. 31. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004Representations of Relations on Finite SetsSuppose A and B are ®nite sets. The following are two ways of picturing a relation R from A to B.(i) Form a rectangular array whose rows are labeled by the elements of A and whose columns arelabeled by the elements of B. Put a 1 or 0 in each position of the array according as a P A is or isnot related to b P B. This array is called the matrix of the relation.(ii) Write down the elements of A and the elements of B in two disjoint disks, and then draw an arrowfrom a P A to b P B whenever a is related to b. This picture will be called the arrow diagram of therelation.Figure 2-3 pictures the ®rst relations in Example 2.3 by the above two ways.Fig. 2-3Directed Graphs of Relations on SetsThere is another way of picturing a relation R when R is a relation from a ®nite set to itself. First wewrite down the elements of the set, and then we drawn an arrow from each element x to each element ywhenever x is related to y. This diagram is called the directed graph of the relation. Figure 2-4, forexample, shows the directed graph of the following relation R on the set A  f1; 2; 3; 4g:R  f1; 2; 2; 2; 2; 4; 3; 2; 3; 4; 4; 1; 4; 3gObserve that there is an arrow from 2 to itself, since 2 is related to 2 under R.These directed graphs will be studied in detail as a separate subject in Chapter 8. We mention it heremainly for completeness.Fig. 2-430 RELATIONS [CHAP. 2
32. 32. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 20042.5 COMPOSITION OF RELATIONSLet A, B, and C be sets, and let R be a relation from A to B and let S be a relation from B to C. Thatis, R is a subset of A Â B and S is a subset of B Â C. Then R and S give rise to a relation from A to Cdenoted by R S and de®ned byaR Sc if for some b P B we have aRb and bScThat is,R S  fa; c: there exists b P B for which a; b P R and b; c P SgThe relation R S is called the composition of R and S; it is sometimes denoted simply by RS.Suppose R is a relation on a set A, that is, R is a relation from a set A to itself. Then R R, thecomposition of R with itself is always de®ned, and R R is sometimes denoted by R2. Similarly,R3 R2 R  R R R, and so on. Thus Rnis de®ned for all positive n.Warning: Many texts denote the composition of relations R and S by S R rather than R S. Thisis done in order to conform with the usual use of g f to denote the composition of f and g where f andg are functions. Thus the reader may have to adjust his notation when using this text as a supplementwith another text. However, when a relation R is composed with itself, then the meaning of R R isunambiguous.The arrow diagrams of relations give us a geometrical interpretation of the composition R S asseen in the following example.EXAMPLE 2.5 Let A  f1; 2; 3; 4g, B  fa; b; c; dg; C  fx; y; zg and letR  f1; a; 2; d; 3; a 3; b; 3; dg and S  fb; x; b; z; c; y; d; zgConsider the arrow diagrams of R and S as in Fig. 2-5. Observe that there is an arrow from 2 to d which is followedby an arrow from d to z. We can view these two arrows as a ``path which ``connects the element 2 P A to theelement z P C. Thus2R Sz since 2Rd and dSzSimilarly there is a path from 3 to x and a path from 3 to z. Hence3R Sx and 3R SzNo other element of A is connected to an element of C. Accordingly,R S  f2; z; 3; x; 3; zgFig. 2-5Composition of Relations and MatricesThere is another way of ®nding R S. Let MR and MS denote respectively the matrices of therelations R and S. ThenCHAP. 2] RELATIONS 31
33. 33. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004MR 1CCA0BB@a b c d1 1 0 0 02 0 0 0 13 1 1 0 14 0 0 0 0and MS 1CCA0BB@x y za 0 0 0b 1 0 1c 0 1 0d 0 0 1Multiplying MR and MS we obtain the matrixM  MRMS 1CCA0BB@x y z1 0 0 02 0 0 13 1 0 24 0 0 0The nonzero entries in this matrix tell us which elements are related by R S. Thus M  MRMS andMRS have the same nonzero entries.Our ®rst theorem tells us that the composition of relations is associative.Theorem 2.1: Let A, B, C and D be sets. Suppose R is a relation from A to B, S is a relation from B toC, and T is a relation from C to D. ThenR S T  R S TWe prove this theorem in Problem 2.11.2.6 TYPES OF RELATIONSConsider a given set A. This section discusses a number of important types of relations which arede®ned on A.Re¯exive RelationsA relation R on a set A is re¯exive if aRa for every a P A, that is, if a; a P R for every a P A. ThusR is not re¯exive if there exists an a P A such that a; a =P R:EXAMPLE 2.6 Consider the following ®ve relations on the set A  f1; 2; 3; 4g:R1  f1; 1; 1; 2; 2; 3; 1; 3; 4; 4gR2  f1; 1; 1; 2; 2; 1; 2; 2; 3; 3; 4; 4gR3  f1; 3; 2; 1gR4  D, the empty relationR5  A Â A, the universal relationDetermine which of the relations are re¯exive.Since A contain the four elements 1, 2, 3, and 4, a relation R on A is re¯exive if it contains the four pairs (1, 1),(2, 2), (3, 3), and (4, 4). Thus only R2 and the universal relation R5  A Â A are re¯exive. Note that R1, R3, and R4are not re¯exive since, for example, (2, 2) does not belong to any of them.EXAMPLE 2.7 Consider the following ®ve relations:(1) Relation (less than or equal) on the set Z of integers(2) Set inclusion on a collection g of sets(3) Relation c (perpendicular) on the set L of lines in the plane.(4) Relation k (parallel) on the set L of lines in the plane.(5) Relation j of divisibility on the set N of positive integers. (Recall xjy if there exists z such that xz  y.)Determine which of the relations are re¯exive.32 RELATIONS [CHAP. 2
34. 34. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004The relation (3) is not re¯exive since no line is perpendicular to itself. Also (4) is not re¯exive since no line isparallel to itself. The other relations are re¯exive; that is, x x for every integer x in Z, A A for any set A in g, andnjn for every positive integer n in N.Symmetric and Antisymmetric RelationsA relation R on a set A is symmetric if whenever aRb then bRa, that is, if whenever a; b P R thenb; a P R. Thus R is not symmetric if there exists a; b P A such that a; b P R but b; a =P R.EXAMPLE 2.8(a) Determine which of the relations in Example 2.6 are symmetric.R1 is not symmetric since 1; 2 P R1 but 2; 1 =P R1. R3 is not symmetric since 1; 3 P R3 but 3; 1 =P R3. Theother relations are symmetric.(b) Determine which of the relations in Example 2.7 are symmetric.The relation c is symmetric since if line a is perpendicular to line b then b is perpendicular to a. Also, k issymmetric since if line a is parallel to line b then b is parallel to a. The other relations are not symmetric. Forexample, 3 4 but 4M3; f1; 2g f1; 2; 3g but f1; 2; 3g f1; 2g, and 2j6 but 6j=2.A relation R on a set A is antisymmetric if whenever aRb and bRa then a  b, that is, if whenevera; b, b; a P R then a  b. Thus R is not antisymmetric if there exist a; b P A such that a; b and b; abelong to R, but a T b.EXAMPLE 2.9(a) Determine which of the relations in Example 2.6 are antisymmetric.R2 is not antisymmetric since (1, 2) and (2, 1) belong to R2, but 1 T 2. Similarly, the universal relation R5 isnot antisymmetric. All the other relations are antisymmetric.(b) Determine which of the relations in Example 2.7 are antisymmetric.The relation is antisymmetric since whenever a b and b a then a  b. Set inclusion is antisym-metric since whenever A B and B A then A  B. Also, divisibility on N is antisymmetric since whenevermjn and njm then m  n. (Note that divisibility on Z is not antisymmetric since 3j À 3 and À3j3 but 3 T À3.)The relation c is not antisymmetric since we can have distinct lines a and b such that acb and bca. Similarly, kis not antisymmetric.Remark: The properties of being symmetric and being antisymmetric are not negatives of eachother. For example, the relation R  f1; 3; 3; 1; 2; 3g is neither symmetric nor antisymmetric. Onthe other hand, the relation RH f1; 1; 2; 2g is both symmetric and antisymmetric.Transitive RelationsA relation R on a set A is transitive if whenever aRb and bRc then aRc, that is, if whenevera; b; b; c P R then a; c P R. Thus R is not transitive if there exist a; b; c P A such thata; b; b; c P R but a; c =P R.EXAMPLE 2.10(a) Determine which of the relations in Example 2.6 are transitive.The relation R3 is not transitive since 2; 1; 1; 3 P R3 but 2; 3 =P R3. All the other relations aretransitive.(b) Determine which of the relations in Example 2.7 are transitive.The relations , , and j are transitive. That is: (i) If a b and b c, then a c. (ii) If A B and B C,then A C. (iii) If ajb and bjc, then ajc,CHAP. 2] RELATIONS 33
35. 35. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004On the other hand the relation c is not transitive. If a c b and b c c, then it is not true that a c c. Since noline is parallel to itself, we can have a k b and b k a, but a k= a. Thus k is not transitive. (We note that the relation``is parallel or equal to is a transitive relation on the set L of lines in the plane.)The property of transitivity can also be expressed in terms of the composition of relations. For arelation R on A we de®neR2 R R and, more generally, Rn RnÀ1 RThen we have the following result.Theorem 2.2: A relation R is transitive if and only if Rn R for n ! 1.2.7 CLOSURE PROPERTIESConsider a given set A and the collection of all relations on A. Let P be a property of such relations,such as being symmetric or being transitive. A relation with property P will be called a P-relation. The P-closure of an arbitrary relation R on A, written PR, is a P-relation such thatR PR Sfor every P-relation S containing R. We will writere¯exiveR, symmetricR, and transitiveRfor the re¯exive, symmetric, and transitive closures of R.Generally speaking, PR need not exist. However, there is a general situation where PR willalways exist. Suppose P is a property such that there is at least one P-relation containing R and thatthe intersection of any P-relations is again a P-relation. Then one can prove (Problem 2.16) thatPR  S: S is a P-relation and R SThus one can obtain PR from the ``top-down, that is, as the intersection of relations. However, oneusually wants to ®nd PR from the ``bottom-up, that is, by adjoining elements to R to obtain PR.This we do below.Re¯exive and Symmetric ClosuresThe next theorem tells us how to easily obtain the re¯exive and symmetric closures of a relation.Here ÁA  fa; a: a P Ag is the diagonal or equality relation on A.Theorem 2.3: Let R be a relation on a set A. Then:(i) R  ÁA is the re¯exive closure of R.(ii) R  RÀ1is the symmetric closure of R.In other words, re¯exiveR is obtained by simply adding to R those elements a; a in the diagonalwhich do not already belong to R, and symmetricR is obtained by adding to R all pairs b; a whenevera; b belongs to R.EXAMPLE 2.11(a) Consider the following relation R on the set A  f1; 2; 3; 4g:R  f1; 1; 1; 3; 2; 4; 3; 1; 3; 3; 4; 3gThenre¯exiveR  R  f2; 2; 4; 4g and symmetricR  R  f4; 2; 3; 4g34 RELATIONS [CHAP. 2
36. 36. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004(b) Consider the relation (less than) on the set N of positive integers. Thenre¯exive   Á   fa; b: a bgsymmetric    fa; b: a T bgTransitive ClosureLet R be a relation on a set A. Recall that R2 R R and Rn RnÀ1 R. We de®neRÃ[Ii1RiThe following theorem applies.Theorem 2.4: RÃis the transitive closure of a relation R.Suppose A is a ®nite set with n elements. Then we show in Chapter 8 on directed graphs thatRÃ R  R2 Á Á Á  RnThis gives us the following result.Theorem 2.5: Let R be a relation on a set A with n elements. ThentransitiveR  R  R2 Á Á Á  RnFinding transitiveR can take a lot of time when A has a large number of elements. An ecient wayfor doing this will be described in Chapter 8. Here we give a simple example where A has only threeelements.EXAMPLE 2.12 Consider the following relation R on A  f1; 2; 3g:R  f1; 2; 2; 3; 3; 3gThenR2 R R  f1; 3; 2; 33; 3g and R3 R2 R  f1; 3; 2; 3; 3; 3gAccordingly,transitiveR  R  R2 R3 f1; 2; 2; 3; 3; 3; 1; 3g2.8 EQUIVALENCE RELATIONSConsider a nonempty set S. A relation R on S is an equivalence relation if R is re¯exive, symmetric,and transitive. That is, R is an equivalence relation on S if it has the following three properties:(1) For every a P S, aRa.(2) If aRb, then bRa.(3) If aRb and bRc, then aRc:The general idea behind an equivalence relation is that it is a classi®cation of objects which are in someway ``alike. In fact, the relation `` of equality on any set S is an equivalence relation; that is:(1) a  a for every a P S.(2) If a  b, then b  a.(3) If a  b and b  c, then a  c.Other equivalence relations follow.CHAP. 2] RELATIONS 35
37. 37. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004EXAMPLE 2.13(a) Consider the set L of lines and the set T of triangles in the Euclidean plane. The relation ``is parallel to oridentical to is an equivalence relation on L, and congruence and similarity are equivalence relations on T.(b) The classi®cation of animals by species, that is, the relation ``is of the same species as, is an equivalencerelation on the set of animals.(c) The relation of set inclusion is not an equivalence relation. It is re¯exive and transitive, but it is notsymmetric since A B does not imply B A:(d ) Let m be a ®xed positive integer. Two integers a and b are said to be congruent modulo m, writtena b (mod m)if m divides a À b. For example, for m  4 we have 11 3 (mod 4) since 4 divides 11 À 3, and 22 6 (mod 4)since 4 divides 22 À 6. This relation of congruence modulo m is an equivalence relation.Equivalence Relations and PartitionsThis subsection explores the relationship between equivalence relations and partitions on a non-empty set S. Recall ®rst that a partition P of S is a collection fAig of nonempty subsets of S with thefollowing two properties:(1) Each a P S belongs to some Ai.(2) If Ai T Aj, then Ai  Aj  D:In other words, a partition P of S is a subdivision of S into disjoint nonempty sets. (See Section 1.9.)Suppose R is an equivalence relation on a set S. For each a in S, let a  denote the set of elements ofS to which a is related under R; that is, a   fx: a; x P RgWe call  a  the equivalence class of a in S; any b P  a  is called a representative of the equivalence class.The collection of all equivalence classes of elements of S under an equivalence relation R is denotedby S=R, that is,S=R  f a : a P SgIt is called the quotient set of S by R. The fundamental property of a quotient set is contained in thefollowing theorem.Theorem 2.6: Let R be an equivalence relation on a set S. Then the quotient set S=R is a partition of S.Speci®cally:(i) For each a in S, we have a P  a :(ii)  a    b  if and only if a; b P R:(iii) If  a  T  b , then  a  and  b  are disjoint.Conversely, given a partition fAig of the set S, there is an equivalence relation R on Ssuch that the sets Ai are the equivalence classes.This important theorem will be proved in Problem 2.21.EXAMPLE 2.14(a) Consider the following relation R on S  f1; 2; 3g:R  f1; 1; 1; 2; 2; 1; 2; 2; 3; 3g36 RELATIONS [CHAP. 2
38. 38. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004One can show that R is re¯exive, symmetric, and transitive, that is, that R is an equivalence relation. Under therelation R,1  f1; 2g; 2  f1; 2g; 3  f3gObserve that 1  2 and that S=R  f1; 3g is a partition of S. One can choose either f1; 3g or f2; 3g as a setof representatives of the equivalence classes.(b) Let R5 be the relation on the set Z of integers de®ned byx y mod 5which reads ``x is congruent to y modulo 5 and which means that the dierence x À y is divisible by 5. Then R5is an equivalence relation on Z. There are exactly ®ve equivalence classes in the quotient set Z=R5 as follows:A0  fF F F ; À10; À5; 0; 5; 10; F F FgA1  fF F F ; À9; À4; 1; 6; 11; F F FgA2  fF F F ; À8; À3; 2; 7; 12; F F FgA3  fF F F ; À7; À2; 3; 8; 13; F F FgA4  fF F F ; À6; À1; 4; 9; 14; F F FgObserve that any integer x, which can be uniquely expressed in the form x  5q  r where 0 r 5, is amember of the equivalence class Ar where r is the remainder. As expected, the equivalence classes are disjointandZ  A0  A1  A2  A3  A4Usually one chooses f0; 1; 2; 3; 4g or fÀ2; À1; 0; 1; 2g as a set of representatives of the equivalence classes.2.9 PARTIAL ORDERING RELATIONSThis section de®nes another important class of relations. A relation R on a set S is called a partialordering or a partial order if R is re¯exive, antisymmetric, and transitive. A set S together with a partialordering R is called a partially ordered set or poset. Partially ordered sets will be studied in more detail inChapter 14, so here we simply give some examples.EXAMPLE 2.15(a) The relation of set inclusion is a partial ordering on any collection of sets since set inclusion has the threedesired properties. That is,(1) A A for any set A:(2) If A B and B A, then A  B:(3) If A B and B C, then A C:(b) The relation on the set R of real numbers is re¯exive, antisymmetric, and transitive. Thus is a partialordering.(c) The relation ``a divides b is a partial ordering on the set N of positive integers. However, ``a divides b is not apartial ordering on the set Z of integers since ajb and bja does not imply a  b. For example, 3j À 3 and À3j3but 3 T À3:2.10 n-ARY RELATIONSAll the relations discussed above were binary relations. By an n-ary relation, we mean a set ofordered n-tuples. For any set S, a subset of the product set Snis called an n-ary relation on S. Inparticular, a subset of S3is called a ternary relation on S.CHAP. 2] RELATIONS 37
39. 39. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004EXAMPLE 2.16(a) Let L be a line in the plane. Then ``betweenness is a ternary relation R on the points of L; that is, a; b; c P Rif b lies between a and c on L.(b) The equation x2 y2 z2 1 determines a ternary relation T on the set R of real numbers. That is, a triplex; y; z belongs to T if x; y; z satis®es the equation, which means x; y; z is the coordinates of a point in R3onthe sphere S with radius 1 and center at the origin O  0; 0; 0:Solved ProblemsORDERED PAIRS AND PRODUCT SETS2.1. Given: A  f1; 2; 3g and B  fa; bg. Find: (a) A Â B; (b) B Â A; (c) B Â B:(a) A Â B consists of all ordered pairs x; y where x P A and y P B. HenceA Â B  f1; a; 1; b; 2; a; 2; b; 3; a; 3; bg(b) B Â A consists of all ordered pairs y; x where y P B and x P A. HenceB Â A  fa; 1; a; 2; a; 3; b; 1; b; 2; b; 3g(c) B Â B consists of all ordered pairs x; y where x; y P B. HenceB Â B  fa; a; a; b; b; a; b; bgAs expected, the number of elements in the product set is equal to the product of the numbers of the elementsin each set.2.2. Given: A  f1; 2g; B  fx; y; zg; and C  f3; 4g. Find: A Â B Â C:A Â B Â C consists of all ordered triplets a; b; c where a P A; b P B; c P C. These elements ofA Â B Â C can be systematically obtained by a so-called tree diagram (Fig. 2-6). The elements ofA Â B Â C are precisely the 12 ordered triplets to the right of the tree diagram.Observe that nA  2, nB  3, and nC  2 and, as expected,nA Â B Â C  12  nAÁ nB Á nCFig. 2-638 RELATIONS [CHAP. 2
40. 40. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 20042.3. Let A  f1; 2g; B  fa; b; cg and C  fc; dg. Find: A Â B  A Â C and B  C).We haveA Â B  f1; a; 1; b; 1; c; 2; a; 2; b; 2; cgA Â C  f1; c; 1; d; 2; c; 2; dgHenceA Â B  A Â C  f1; c; 2; cgSince B  C  fcg;A Â B  C  f1; c; 2; cgObserve that A Â B  A Â C  A Â B  C. This is true for any sets A, B and C (see Problem 2.4).2.4. Prove A Â B  A Â C  A Â B  C:A Â B  A Â C  fx; yX x; y P A Â B and x; y P A Â Cg fx; yX x P A; y P B and x P A; y P Cg fx; y: x P A; y P B  Cg  A Â B  C2.5. Find x and y given 2x; x  y  6; 2:Two ordered pairs are equal if and only if the corresponding components are equal. Hence we obtainthe equations2x  6 and x  y  2from which we derive the answers x  3 and y  À1:RELATIONS AND THEIR GRAPHS2.6. Find the number of relations from A  fa; b; cg to B  f1; 2g.There are 32  6 elements in A Â B, and hence there are m  26 64 subsets of A Â B. Thus there arem  64 relations from A to B:2.7. Given A  f1; 2; 3; 4g and B  fx; y; zg. Let R be the following relation from A to B:R  f1; y; 1; z; 3; y; 4; x; 4; zg(a) Determine the matrix of the relation.(b) Draw the arrow diagram of R.(c) Find the inverse relation RÀ1of R.(d ) Determine the domain and range of R.(a) See Fig. 2-7(a). Observe that the rows of the matrix are labeled by the elements of A and the columnsby the elements of B. Also observe that the entry in the matrix corresponding to a P A and b P B is 1 ifa is related to b and 0 otherwise.(b) See Fig. 2-7(b). Observe that there is an arrow from a P A to b P B i a is related to b, i.e., i a; b P R:(c) Reverse the ordered pairs of R to obtain RÀ1:RÀ1 fy; 1; z; 1; y; 3; x; 4; z; 4gObserve that by reversing the arrows in Fig. 2.7(b) we obtain the arrow diagram of RÀ1:CHAP. 2] RELATIONS 39
41. 41. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004(d ) The domain of R, DomR, consists of the ®rst elements of the ordered pairs of R, and the range of R.RanR, consists of the second elements. Thus,DomR  f1; 3; 4g and RanR  fx; y; zgFig. 2-72.8. Let A  f1; 2; 3; 4; 6g, and let R be the relation on A de®ned by ``x divides y, written xjy. (Notexjy i there exists an integer z such that x z  y:)(a) Write R as a set of ordered pairs.(b) Draw its directed graph.(c) Find the inverse relation RÀ1of R. Can RÀ1be described in words?(a) Find those numbers in A divisible by 1, 2, 3, 4, and then 6. These are:1j1; 1j2; 1j3; 1j4; 1j6; 2j2; 2j4; 2j6; 3j3; 3j6; 4j4; 6j6HenceR  f1; 1; 1; 2; 1; 3; 1; 4; 1; 6; 2; 2; 2; 4; 2; 6; 3; 3; 3; 6; 4; 4; 6; 6g(b) See Fig. 2-8.(c) Reverse the ordered pairs of R to obtain RÀ1:RÀ1 f1; 1; 2; 1; 3; 1; 4; 1; 6; 1; 2; 2; 4; 2; 6; 2; 3; 3; 6; 3; 4; 4; 6; 6gRÀ1can be described by the statement ``x is a multiple of y.Fig. 2-82.9. Let A  f1; 2; 3g, B  fa; b; cg, and C  fx; y; zg. Consider the following relations R and S fromA to B and from B to C, respectively.R  f1; b; 2; a; 2; cg and S  fa; y; b; x; c; y; c; zg40 RELATIONS [CHAP. 2
42. 42. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004(a) Find the composition relation R S:(b) Find the matrices MR, MS, and MRS of the respective relations R, S, and R S, andcompare MRS to the product MRMS:(a) Draw the arrow diagram of the relations R and S as in Fig. 2-9. Observe that 1 in A is ``connected to xin C by the path 1 3 b 3 x; hence 1; x belongs to R S. Similarly, 2; y and 2; z belong to R S.We haveR S  f1; x; 2; y; 2; zg(See Example 2.5.)Fig. 2-9(b) The matrices of MR, MS, and MRS follow:MR 1A0@a b c1 0 1 02 1 0 13 0 0 0MS 1A0@x y za 0 1 0b 1 0 0c 0 1 1MRS 1A0@x y z1 1 0 02 0 1 13 0 0 0Multiplying MR and MS we obtainMRMS 1 0 00 2 10 0 00@1AObserve that MRS and MRMS have the same zero entries.2.10. Let R and S be the following relations on A  f1; 2; 3g:R  f1; 1; 1; 2; 2; 3; 3; 1; 3; 3g; S  f1; 2; 1; 3; 2; 1; 3; 3gFind (a) R  S; R  S; RcY (b) R S; (c) S2 S S:(a) Treat R and S simply as sets, and take the usual intersection and union. For Rc, use the fact that A Â Ais the universal relation on A:R  S  f1; 2; 3; 3gR  S  f1; 1; 1; 2; 1; 3; 2; 1; 2; 3; 3; 1; 3; 3gRc f1; 3; 2; 1; 2; 2; 3; 2(b) For each pair a; b P R, ®nd all pairs b; c P S. Then a; c P R S. For example, 1; 1 P R and1; 2; 1; 3 P S; hence 1; 2 and 1; 3 belong to R S. Thus,R S  f1; 2; 1; 3; 1; 1; 2; 3; 3; 2; 3; 3(c) Following the algorithm in (b), we getS2 S S  f1; 1; 1; 3; 2; 2; 2; 3; 3; 3gCHAP. 2] RELATIONS 41
43. 43. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 20042.11. Prove Theorem 2.1: Let A, B, C and D be sets. Suppose R is a relation from A to B, S is a relationfrom B to C and T is a relation from C to D. Then R S T  R S T.We need to show that each ordered pair in R S T belongs to R S T, and vice versa.Suppose a; d belongs to R S T. Then there exists a c in C such that a; c P R S and c d P T.Since a; c P R S, there exists a b in B such that a; b P R and b; c P S. Since b; c P S and c; d P T,we have b; d P S T; and since a; b P R and b; d P S T, we have a; d P R S T. Therefore,R S T R S T. Similarly R S T R S T. Both inclusion relations proveR S T  R S T:TYPES OF RELATIONS AND CLOSURE PROPERTIES2.12. Consider the following ®ve relations on the set A  f1; 2; 3g:R  f1; 1; 1; 2; 1; 3; 3; 3g D  empty relationS  f1; 1; 1; 2; 2; 1; 2; 2; 3; 3 A Â A  universal relationT  f1; 1; 1; 2; 2; 2; 2; 3gDetermine whether or not each of the above relations on A is: (a) re¯exive; (b) symmetric;(c) transitive; (d ) antisymmetric.(a) R is not re¯exive since 2 P A but 2; 2 =P R. T is not re¯exive since 3; 3 =P T and, similarly, D is notre¯exive. S and A Â A are re¯exive.(b) R is not symmetric since 1; 2 P R but 2; 1 =P R, and similarly T is not symmetric. S, D, and A Â Aare symmetric.(c) T is not transitive since 1; 2 and 2; 3 belong to T, but 1; 3 does not belong to T. The other fourrelations are transitive.(d ) S is not antisymmetric since 1 T 2, and 1; 2 and 2; 1 both belong to S. Similarly, A Â A is notantisymmetric. The other three relations are antisymmetric.2.13. Given A  f1; 2; 3; 4g. Consider the following relation in A:R  f1; 1; 2; 2; 2; 3; 3; 2; 4; 2; 4; 4g(a) Draw its directed graph.(b) Is R (i) re¯exive, (ii) symmetric, (iii) transitive, or (iv) antisymmetric?(c) Find R2 R R:(a) See Fig. 2-10.(b) (i) R is not re¯exive because 3 P A but 3R= 3, i.e., 3; 3 =P R:(ii) R is not symmetric because 4R2 but 2R= 4, i.e., 4; 2 P R but 2; 4 =P R.(iii) R is not transitive because 4R2 and 2R3 but 4R= 3, i.e., 4; 2 P R and 2; 3 P R but 4; 3 =P R.(iv) R is not antisymmetric because 2R3 and 3R2 but 2 T 3.(c) For each pair a; b P R, ®nd all b; c P R. Since a; c P R2,R2 f1; 1; 2; 2; 2; 3; 3; 2; 3; 3; 4; 2; 4; 3; 4; 4g42 RELATIONS [CHAP. 2
44. 44. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004Fig. 2-102.14. Give examples of relations R on A  f1; 2; 3g having the stated property.(a) R is both symmetric and antisymmetric.(b) R is neither symmetric nor antisymmetric.(c) R is transitive but R  RÀ1is not transitive.There are several possible examples for each answer. One possible set of examples follows:(a) R  f1; 1; 2; 2g:(b) R  f1; 2; 2; 1; 2; 3g:(c) R  f1; 2g:2.15. Suppose C is a collection of relations S on a set A and let T be the intersection of the relation S,that is, T  SX S P C. Prove:(a) If every S is symmetric, then T is symmetric.(b) If every S is transitive, then T is transitive.(a) Suppose a; b P T. Then a; b P S for every S. Since each S is symmetric, b; a P S for every S.Hence b; a P T and T is symmetric.(b) Suppose a; b and b; c belong to T. Then a; b and b; c belong to S for every S. Since each S istransitive, a; c belongs to S for every S. Hence, a; c P T and T is transitive.2.16. Let R be a relation on a set A, and let P be a property of relations, such as, symmetry andtransitivity. Then P will be called R-closable if P satis®es the following two conditions:(1) There is a P-relation S containing R.(2) The intersection of P-relations is a P-relation.(a) Show that symmetry and transitivity are R-closable for any relation R.(b) Suppose P is R-closable. Then PR, the P-closure of R, is the intersection of all P-relationsS containing R, that is,PR  S: S is a P-relation and R S)(a) The universal relation A Â A is symmetric and transitive and A Â A contains any relation R on A. Thus(1) is satis®ed. By Problem 2.15, symmetry and transitivity satisfy (2). Thus symmetry and transivityare R-closable for any relation R.(b) Let T  S: S is a P-relation and R S). Since P is R-closable, T is nonempty by (1) and T is a P-relation by (2). Since each relation S contains R, the intersection T contains R. Thus, T is a P-relationcontaining R. By de®nition, PR is the smallest P-relation containing R; hence PR T. On theCHAP. 2] RELATIONS 43
45. 45. Lipschutz−Lipson:Schaum’s Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text © The McGraw−HillCompanies, 2004other hand, PR is one of the sets S de®ning T, that is, PR is a P-relation and R PR. Therefore,T PR. Accordingly, PR  T.2.17. Consider a set A  fa; b; cg and the relation R on A de®ned byR  fa; a; a; b; b; c; c; cgFind (a) re¯exiveR; (b) symmetricR; and (c) transitiveR:(a) The re¯exive closure on R is obtained by adding all diagonal pairs of A Â A to R which are notcurrently in R. Hence,re¯exiveR  R  fb; bg  fa; a; a; b; b; b; b; c; c; cg(b) The symmetric closure on R is obtained by adding all the pairs in RÀ1to R which are not currently inR. Hence,symmetricR  R  fb; a; c; bg  fa; a; a; b; b; a; b; c; c; b; c; cg(c) The transitive closure on R, since A has three elements, is obtained by taking the union of R withR2 R R and R3 R R R. Note thatR2 R R  fa; a; a; b; a; c; b; c; c; cgR3 R R R  fa; a; a; b; a; c; b; c; c; cgHencetransitiveR  R  R2 R3 fa; a; a; b; a; c; b; c; c; cgEQUIVALENCE RELATIONS AND PARTITIONS2.18. Consider the Z of integers and an integer m 1. We say that x is congruent to y modulo m,writtenx y 