538
Lipschutz-Lipson: Schaum’s Outline of Theory and Problems of Discrete Math, 2/e Front Matter Preface © The McGraw-Hill Companies, 2004 Preface Discrete mathematics, the study of ®nite systems, has become increasingly important as the computer age has advanced. The digital computer is basically a ®nite structure, and many of its properties can be understood and interpreted within the framework of ®nite mathematical systems. This book, in presenting the more essential 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, directed graphs, and binary trees. Finally there are individual chapters on properties of the integers, algebraic systems, languages and machines, ordered sets and lattices, and Boolean algebra. The chapter on functions and algorithms includes a discussion of cardinality and countable sets, and complexity. The chapters on graph theory include discussions on planarity, traversability, minimal paths, and Warshall's and Human's algorithms. The chapter on languages and machines includes regular expressions, automata, and Turing machines and computable functions. We empha- size that the chapters have been written so that the order can be changed without diculty and without loss of continuity. This second edition of Discrete Mathmatics covers much more material and in greater depth than the ®rst edition. The topics of probability, regular expressions and regular sets, binary trees, cardinality, complexity, and Turing machines and compu- table functions did not appear in the ®rst edition or were only mentioned. This new material re¯ects the fact that discrete mathematics now is mainly a one-year course rather 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 sets of solved and supplementary problems. The solved problems serve to illustrate and amplify the material, and also include proofs of theorems. The supplementary prob- lems furnish a complete review of the material in the chapter. More material has been included than can be covered in most ®rst courses. This has been done to make the book more ¯exible, to provide a more useful book of reference, and to stimulate further interest in the topics. Finally, we wish to thank the sta of the McGraw-Hill Schaum's Outline Series, especially Arthur Biderman and Maureen Walker, for their unfailing cooperation. SEYMOUR LIPSCHUTZ MARC LARS LIPSON v

Schaum – matematica discreta

Embed Size (px)

DESCRIPTION

Schaum – matematica discreta

Citation preview

  • 1. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/eFront Matter Preface The McGrawHillCompanies, 2004PrefaceDiscrete mathematics, the study of nite systems, has become increasinglyimportant as the computer age has advanced. The digital computer is basically anite 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 andHumans 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 withoutdiculty 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 reects 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 denition, 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 denition 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 specied 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 otherwisespecied, 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 dened 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 denition, 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 dierence 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 2004Fundamental ProductsConsider n distinct sets A1; A2; . . . ; An. A fundamental product of the sets is a set of the formA1 A2 Anwhere Ai 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 DierenceThe symmetric dierence 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 BnA BOne can also show (Problem 1.18) thatA B AnB BnAFor 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 Bc Ac B cCHAP. 1] SET THEORY 7
  • 9. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 2004Method 1: We rst show that A Bc Ac B c. If x P A Bc, 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 BC. 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 Bc.We have proven that every element of A Bcbelongs to Ac Bcand that every element of Ac Bcbelongs to A Bc. Together, theseinclusions prove that the sets have the same elements, i.e., thatA Bc Ac Bc.Method 2: From the Venn diagram for A B in Fig. 1-4, we see that A Bcisrepresented 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 Bcand 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 CCommutative 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 CIdentity laws(5a) A D A (5b) A U A(6a) A U U (6b) A D DInvolution laws(7) Acc AComplement laws(8a) A Ac U (8b) A Ac D(9a) U c D (9b) Dc UDeMorgans laws(10a) A Bc Ac B c(10b) A Bc Ac B c
  • 10. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 EofE is the equation obtained by replacing each occurrence of , , U, and D in E by , , D and U,respectively. For example, the dual ofU 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 Eis 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 innite. 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 innite.The notation nA will denote the number of elements in a nite set A. Some texts use #A; jAj orcardA instead of nA.Lemma 1.4: If A and B are disjoint nite sets, then A B is nite andnA B nA nBProof. In counting the elements of A B, rst count those that are in A. There are nA 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 nB elements that are in B but not in A. Therefore,nA B nA nB.We also have a formula for nA 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 andnA B nA nB nA BWe 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, andnA B C nA nB nC nA B nA C nB C nA B CMathematical 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 200410 SET THEORY [CHAP. 1By Corollary 1.6,F G R nF nG nR nF G nF R nG R nF G R 65 45 42 20 25 15 8 100That is, nF 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; 4gThe 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; 4gThe 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,nPowerS 2nS(For this reason, the power set of S is sometimes denoted by 2S.)EXAMPLE 1.9 Suppose S f1; 2; 3g. ThenPowerS D; f1g; f2g; f3g; f1; 2g; f1; 3g; f2; 3g; SNote 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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; 9gThen (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 dened above for two sets. These operations canbe extended to any number of sets, nite or innite, as follows.Consider rst a nite number of sets, say, A1, A2, . . ., Am. The union and intersection of these setsare denoted and dened, respectively, byA1 A2 Am mi1Ai fx: x P Ai for some AigA1 A2 Am mi1Ai 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 dened, respectively, byA: A P A) fx: x P A for some A P AgA: 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 Ac Ac: A P A(ii) A: A P Ac Ac: A P AFig. 1-11
  • 13. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 dened on the positive integers N, i.e.,Pn is either true or false for each n in N. Suppose P has the following two properties:(i) P1 is true.(ii) Pn 1 is true whenever Pn 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,Pn: 1 3 5 . . . 2n 1 n2(The nth odd number is 2n 1, and the next odd number is 2n 1). Observe that Pn is true for n 1, that is,P1: 1 12Assuming Pn is true, we add 2n 1 to both sides of Pn, obtaining1 3 5 . . . 2n 1 2n 1 n2 2n 1 n 12which is Pn 1. That is, Pn 1 is true whenever Pn 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 dierent, it is really equivalent to the principle of induction.Principle of Mathematical Induction II: Let P be a proposition dened on the positive integers N suchthat:(i) P1 is true.(ii) Pn is true whenever Pk 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 dierence XnY consist of the elements in X which do not belong to Y.(3) The symmetric dierence 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) AnEc;(c) A DnB; (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 AnEc f2; 4; 6; 7; 8; 9g.(c) A D f1; 3; 5g. Now A DnB 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) BnAc.(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 dened to be A B c.14 SET THEORY [CHAP. 1
  • 16. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 BnAc.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
  • 17. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 200416 SET THEORY [CHAP. 11.12. Determine the validity of the following argument:S1: All my friends are musicians.S2: John is my friend.S3: None of my neighbors are musicians.S: John is not my neighbor.The premises S1 and S3 lead to the Venn diagram in Fig. 1-15. By S2, John belongs to the set of friendswhich is disjoint from the set of neighbors. Thus S is a valid conclusion and so the argument is valid.Fig. 1-15FINITE SETS AND THE COUNTING PRINCIPLE1.13. Determine which of the following sets are nite.(a) A {seasons in the year} (d ) D {odd integers}(b) B {states in the Union} (e) E {positive integral divisors of 12}(c) C {positive integers less than 1} ( f ) F {cats living in the United States}(a) A is nite since there are four seasons in the year, i.e., nA 4.(b) B is nite because there are 50 states in the Union, i.e. nB 50.(c) There are no positive integers less than 1; hence C is empty. Thus C is nite and nC 0.(d ) D is innite.(e) The positive integer divisors of 12 are 1, 2, 3, 4, 6, and 12. Hence E is nite and nE 6:( f ) Although it may be dicult to nd the number of cats living in the United States, there is still a nitenumber of them at any point in time. Hence F is nite.1.14. In a survey of 60 people, it was found that:25 read Newsweek magazine26 read Time26 read Fortune9 read both Newsweek and Fortune11 read both Newsweek and Time8 read both Time and Fortune3 read all three magazines(a) Find the number of people who read at least one of the three magazines.(b) Fill in the correct number of people in each of the eight regions of the Venn diagram in Fig.1-16(a) where N, T, and F denote the set of people who read Newsweek, Time, and Fortune,respectively.
  • 18. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 2004(c) Find the number of people who read exactly one magazine.(a) We want nN T F. By Corollary 1.6,nN T F nN nT nF nN T nN F nT F nN T F 25 26 26 11 9 8 3 52:Fig. 1-16(b) The required Venn diagram in Fig. 1-16(b) is obtained as follows:3 read all three magazines11 3 8 read Newsweek and Time but not all three magazines9 3 6 read Newsweek and Fortune but not all three magazines8 3 5 read Time and Fortune but not all three magazines25 8 6 3 8 read only Newsweek26 8 5 3 10 read only Time26 6 5 3 12 read only Fortune60 52 8 read no magazine at all(c) 8 10 12 30 read only one magazine.ALGEBRA OF SETS AND DUALITY1.15. Write the dual of each set equation:(a) U A B A A (c) A U D Ac D(b) A B Cc A Cc A Bc(d ) A Uc A DInterchange and and also U and D in each set equation:(a) D A B A A (c) A D U Ac U(b) A B Cc A Cc A Bc(d ) A Dc A U1.16. Prove the Commutative laws: (a) A B B A, and (b) A B B A.(a) A B fx: x P A or x P Bg fx: x P B or x P Ag B A:(b) A B fx: x P A and x P Bg fx: x P B and x P Ag B A:CHAP. 1] SET THEORY 17
  • 19. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 BnA B AnB BnA. (Thus either one may be used to dene A B:)Using XnY X Ycand the laws in Table 1-1, including DeMorgans laws, we obtain:A BnA B A B A Bc 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 PowerA of A fa; b; c; dg.The elements of PowerA are the subsets of A. HencePowerA 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; DAs expected, PowerA 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 dierent partitions of S.MISCELLANEOUS PROBLEMS1.24. Prove the proposition P that the sum of the rst n positive integers is 12 nn 1; that is,Pn: 1 2 3 . . . n 12nn 1The proposition holds for n 1 sinceP1 : 1 12 11 1Assuming Pn is true, we add n 1 to both sides of Pn, obtaining1 2 3 . . . n n 1 12 nn 1 n 1 12 nn 1 2n 1 12 n 1n 2which is Pn 1. That is, Pn 1 is true whenever Pn is true. By the principle of induction, P is true forall n.1.25. Prove the following proposition (for n ! 0:Pn: 1 2 22 23 2n 2n1 1P0 is true since 1 21 1. Assuming Pn is true, we add 2n1to both sides of Pn, obtaining1 21 22 2n 2n1 2n1 1 2n1 22n1 1 2n2 1which is Pn 1. Thus Pn 1 is true whenever Pn 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; henceA B A. Furthermore, if x P A, then x P A B (by the denition 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 denition 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 andnA B nA nB nA BIf 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. HencenA B nA nB nA BAlternatively, (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,nA B nAnB nA B nBnA nAnB nA B nBnA nA B nA B nA nB nA BSupplementary 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 CnB; (b) A Bc; (c) B CnA.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 DnC j A B(b) B C (e) BnC D (h) B C D k A C(c) CnD ( f ) A D B (i ) CnAnD l A DnB1.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 cdenes the dierence operation in terms of the operations of intersection andcomplement. Find a formula that denes 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) AnB C;(b) Ac B C; (c) Ac CnB.Fig. 1-17CHAP. 1] SET THEORY 21
  • 23. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 20041.41. Use the Venn diagram Fig. 1-6 and Example 1.6 to write each set as the (disjoint) union of fundamentalproducts:(a) A B C, (b) Ac B C, (c) A BnC.1.42. Draw a Venn diagram of sets A, B, C where A B, sets B and C are disjoint, but A and C have elements incommon.ALGEBRA OF SETS AND DUALITY1.43. Write the dual of each equation:(a) A B B c Acc(b) A B c A A B(c) A A B A (d ) A B Ac B A B c Ac B c U1.44. Use the laws in Table 1-1 to prove each set identity:(a) A B A B c A.(b) A A B A:(c) A B A B c Ac B A B:FINITE SETS AND THE COUNTING PRINCIPLE1.45. Determine which of the following sets are nite:(a) The set of lines parallel to the x axis(b) The set of letters in the English alphabet(c) The set of numbers which are multiples of 5(d ) The set of animals living on the earth(e) The set of numbers which are solutions of the equation:x27 26x18 17x11 7x3 10 0( f ) The set of circles through the origin (0, 0)1.46. Use Theorem 1.5 to prove Corollary 1.6: If A, B, and C are nite sets, then so is A B C andnA B C nA nB nC nA B nA C nB C nA B C1.47. A survey on a sample of 25 new cars being sold at a local auto dealer was conducted to see which of threepopular options, air-conditioning A, radio R, and power windows W, were already installed. Thesurvey found:15 had air-conditioning.12 had radio.11 had power windows.5 had air-conditioning and power windows.9 had air-conditioning and radio.4 had radio and power windows.3 had all three options.Find the number of cars that had: (a) only power windows; (b) only air-conditioning; (c) only radio; (d )radio and power windows but not air-conditioning; (e) air-conditioning and radio, but not power windows;and ( f ) only one of the options; g at least one option; h none of the options.22 SET THEORY [CHAP. 1
  • 24. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 2004CLASSES OF SETS1.48. Find the power set PowerA 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 nA m. Prove that PowerA 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; 5g1.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; 7g1.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< 11g1.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; . . . ; nnDis 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 nn 1:1.59. Prove: 1 4 7 3n 2 2n3n 1:1.60. Prove:11 313 515 7 12n 12n 112n 1:1.61. Prove: 12 22 32 . . . n2nn 12n 16: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 dierence:(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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 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 CnB f1; 3; 6; 9g. (b) A Bc f3; 4; 8; 9g: (c) B CnA 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 cc1.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 c1.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 Acc; (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) Innite; (b) nite; (c) innite; (d ) nite; (e) nite; ( f ) innite.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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e1. Set Theory Text The McGrawHillCompanies, 20041.48. PowerA 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 nA 3; hence PowerA has 23 8 elements:PowerA 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 PowerA. 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 2mdierent sets X. That is, PowerA 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 denite order.Formally, we dene 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 dened 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; dif 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 denition,A B fa; 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 f1; ag; 1; b; 1; c; 2; a; 2; b; 2; cgB A fa; 1; a; 2; b; 1; b; 2; c; 1; c; 2gA A f1; 1; 1; 2; 2; 1; 2; 2gAlsoThere 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 nS for the number of elements in a set S, we havenA B 6 2 3 nA nBIn fact, nA B nA nB for any nite sets A and B. This followsfrom the observation that, for an ordered pair a; b in A B, thereare nA possibilities for a, and for each of these there are nBpossibilities for b.27Fig. 2-1
  • 29. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 orYni1AiJust 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 denition.Denition. 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 f1; y, 1; z, 3; yg. 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 dene 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 2004( g) Let A be any set. An important relation on A is that of equality.fa; 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 R1, is the relation from Bto A which consists of those ordered pairs which, when reversed, belong to R; that is,R1 fb; a: a; b P RgFor example, the inverse of the relation R f1; y, 1; z, 3; yg from A f1; 2; 3g to B fx; y; zgfollows:R1 fy; 1; z; 1; y; 3gClearly, if R is any relation, then R11 R. Also, the domain and range of R1are equal, respec-tively, to the range and domain of R. Moreover, if R is a relation on A, then R1is 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 givenequationEx; y 0We usually identify the relation with the equation; that is, we speak of the relation Ex; y 0.EXAMPLE 2.4 Consider the relation S dened 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 f1; 2; 2; 2; 2; 4; 3; 2; 3; 4; 4; 1; 4; 3gObserve 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 dened byaR Sc if for some b P B we have aRb and bScThat is,R S fa; 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 dened, and R R is sometimes denoted by R2. Similarly,R3 R2 R R R R, and so on. Thus Rnis dened 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 f1; a; 2; d; 3; a 3; b; 3; dg and S fb; x; b; z; c; y; d; zgConsider 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. Thus2R Sz since 2Rd and dSzSimilarly there is a path from 3 to x and a path from 3 to z. Hence3R Sx and 3R SzNo other element of A is connected to an element of C. Accordingly,R S f2; z; 3; x; 3; zgFig. 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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. ThenR S T R S TWe 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 aredened on A.Reexive RelationsA relation R on a set A is reexive if aRa for every a P A, that is, if a; a P R for every a P A. ThusR is not reexive 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 f1; 1; 1; 2; 2; 3; 1; 3; 4; 4gR2 f1; 1; 1; 2; 2; 1; 2; 2; 3; 3; 4; 4gR3 f1; 3; 2; 1gR4 D, the empty relationR5 A A, the universal relationDetermine which of the relations are reexive.Since A contain the four elements 1, 2, 3, and 4, a relation R on A is reexive 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 reexive. Note that R1, R3, and R4are not reexive 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 reexive.32 RELATIONS [CHAP. 2
  • 34. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 2004The relation (3) is not reexive since no line is perpendicular to itself. Also (4) is not reexive since no line isparallel to itself. The other relations are reexive; 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 thenb; 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 whenevera; 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; abelong 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 f1; 3; 3; 1; 2; 3g is neither symmetric nor antisymmetric. Onthe other hand, the relation RH f1; 1; 2; 2g 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 whenevera; b; b; c P R then a; c P R. Thus R is not transitive if there exist a; b; c P A such thata; 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 deneR2 R R and, more generally, Rn Rn1 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 PR, is a P-relation such thatR PR Sfor every P-relation S containing R. We will writereexiveR, symmetricR, and transitiveRfor the reexive, symmetric, and transitive closures of R.Generally speaking, PR need not exist. However, there is a general situation where PR 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) thatPR S: S is a P-relation and R SThus one can obtain PR from the ``top-down, that is, as the intersection of relations. However, oneusually wants to nd PR from the ``bottom-up, that is, by adjoining elements to R to obtain PR.This we do below.Reexive and Symmetric ClosuresThe next theorem tells us how to easily obtain the reexive and symmetric closures of a relation.Here A fa; 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 reexive closure of R.(ii) R R1is the symmetric closure of R.In other words, reexiveR is obtained by simply adding to R those elements a; a in the diagonalwhich do not already belong to R, and symmetricR is obtained by adding to R all pairs b; a whenevera; b belongs to R.EXAMPLE 2.11(a) Consider the following relation R on the set A f1; 2; 3; 4g:R f1; 1; 1; 3; 2; 4; 3; 1; 3; 3; 4; 3gThenreexiveR R f2; 2; 4; 4g and symmetricR R f4; 2; 3; 4g34 RELATIONS [CHAP. 2
  • 36. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 2004(b) Consider the relation < (less than) on the set N of positive integers. Thenreexive< < fa; b: a bgsymmetric< < > fa; b: a T bgTransitive ClosureLet R be a relation on a set A. Recall that R2 R R and Rn Rn1 R. We deneR[Ii1RiThe following theorem applies.Theorem 2.4: Ris 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. ThentransitiveR R R2 RnFinding transitiveR can take a lot of time when A has a large number of elements. An ecient 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 f1; 2; 2; 3; 3; 3gThenR2 R R f1; 3; 2; 33; 3g and R3 R2 R f1; 3; 2; 3; 3; 3gAccordingly,transitiveR R R2 R3 f1; 2; 2; 3; 3; 3; 1; 3g2.8 EQUIVALENCE RELATIONSConsider a nonempty set S. A relation R on S is an equivalence relation if R is reexive, 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 classication 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 classication 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 reexive 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.Specically:(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 f1; 1; 1; 2; 2; 1; 2; 2; 3; 3g36 RELATIONS [CHAP. 2
  • 38. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 2004One can show that R is reexive, 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 f1; 3g 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 dened byx y mod 5which reads ``x is congruent to y modulo 5 and which means that the dierence 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 f2; 1; 0; 1; 2g as a set of representatives of the equivalence classes.2.9 PARTIAL ORDERING RELATIONSThis section denes another important class of relations. A relation R on a set S is called a partialordering or a partial order if R is reexive, 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 reexive, 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. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 triplex; y; z belongs to T if x; y; z satises 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 f1; a; 1; b; 2; a; 2; b; 3; a; 3; bg(b) B A consists of all ordered pairs y; x where y P B and x P A. HenceB A fa; 1; a; 2; a; 3; b; 1; b; 2; b; 3g(c) B B consists of all ordered pairs x; y where x; y P B. HenceB B fa; a; a; b; b; a; b; bgAs 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 nA 2, nB 3, and nC 2 and, as expected,nA B C 12 nA nB nCFig. 2-638 RELATIONS [CHAP. 2
  • 40. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 f1; a; 1; b; 1; c; 2; a; 2; b; 2; cgA C f1; c; 1; d; 2; c; 2; dgHenceA B A C f1; c; 2; cgSince B C fcg;A B C f1; c; 2; cgObserve 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; yX x; y P A B and x; y P A Cg fx; yX x P A; y P B and x P A; y P Cg fx; y: x P A; y P B Cg A B C2.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 32 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 f1; y; 1; z; 3; y; 4; x; 4; zg(a) Determine the matrix of the relation.(b) Draw the arrow diagram of R.(c) Find the inverse relation R1of 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 R1:R1 fy; 1; z; 1; y; 3; x; 4; z; 4gObserve that by reversing the arrows in Fig. 2.7(b) we obtain the arrow diagram of R1:CHAP. 2] RELATIONS 39
  • 41. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 2004(d ) The domain of R, DomR, consists of the rst elements of the ordered pairs of R, and the range of R.RanR, consists of the second elements. Thus,DomR f1; 3; 4g and RanR fx; y; zgFig. 2-72.8. Let A f1; 2; 3; 4; 6g, and let R be the relation on A dened 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 R1of R. Can R1be 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 f1; 1; 1; 2; 1; 3; 1; 4; 1; 6; 2; 2; 2; 4; 2; 6; 3; 3; 3; 6; 4; 4; 6; 6g(b) See Fig. 2-8.(c) Reverse the ordered pairs of R to obtain R1:R1 f1; 1; 2; 1; 3; 1; 4; 1; 6; 1; 2; 2; 4; 2; 6; 2; 3; 3; 6; 3; 4; 4; 6; 6gR1can 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 f1; b; 2; a; 2; cg and S fa; y; b; x; c; y; c; zg40 RELATIONS [CHAP. 2
  • 42. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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 f1; x; 2; y; 2; zg(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 f1; 1; 1; 2; 2; 3; 3; 1; 3; 3g; S f1; 2; 1; 3; 2; 1; 3; 3gFind (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 f1; 2; 3; 3gR S f1; 1; 1; 2; 1; 3; 2; 1; 2; 3; 3; 1; 3; 3gRc f1; 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 and1; 2; 1; 3 P S; hence 1; 2 and 1; 3 belong to R S. Thus,R S f1; 2; 1; 3; 1; 1; 2; 3; 3; 2; 3; 3(c) Following the algorithm in (b), we getS2 S S f1; 1; 1; 3; 2; 2; 2; 3; 3; 3gCHAP. 2] RELATIONS 41
  • 43. LipschutzLipson:Schaums Outline of Theoryand Problems of DiscreteMath, 2/e2. Relations Text The McGrawHillCompanies, 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, t