Disjoint Union / Find Equivalence Relations Equivalence Classes

Total Page:16

File Type:pdf, Size:1020Kb

Disjoint Union / Find Equivalence Relations Equivalence Classes Equivalence Relations Disjoint Union / Find • A relation R is defined on set S if for CSE 326 every pair of elements a, b∈S, a R b is Data Structures either true or false. Unit 13 • An equivalence relation is a relation R that satisfies the 3 properties: › Reflexive: a R a for all a∈S Reading: Chapter 8 › Symmetric: a R b iff b R a; for all a,b∈S › Transitive: a R b and b R c implies a R c 2 Dynamic Equivalence Equivalence Classes Problem • Given an equivalence relation R, decide • Starting with each element in a singleton set, whether a pair of elements a,b∈S is and an equivalence relation, build the equivalence classes such that a R b. • Requires two operations: • The equivalence class of an element a › Find the equivalence class (set) of a given is the subset of S of all elements element › Union of two sets related to a. • It is a dynamic (on-line) problem because the • Equivalence classes are disjoint sets sets change during the operations and Find must be able to cope! 3 4 Disjoint Union - Find Union • Maintain a set of disjoint sets. • Union(x,y) – take the union of two sets › {3,5,7} , {4,2,8}, {9}, {1,6} named x and y • Each set has a unique name, one of its › {3,5,7} , {4,2,8}, {9}, {1,6} members › Union(5,1) › {3,5,7} , {4,2,8}, {9}, {1,6} {3,5,7,1,6}, {4,2,8}, {9}, 5 6 Find An Application • Find(x) – return the name of the set • Build a random maze by erasing edges. containing x. › {3,5,7,1,6}, {4,2,8}, {9}, › Find(1) = 5 › Find(4) = 8 7 8 An Application (ct’d) An Application (ct’d) • Pick Start and End • Repeatedly pick random edges to delete. Start Start End End 9 10 Desired Properties A Cycle (we don’t want that) • None of the boundary is deleted • Every cell is reachable from every other Start cell. • There are no cycles – no cell can reach itself by a path unless it retraces some part of the path. End 11 12 Good Solution : A Hidden A Good Solution Tree Start Start End End 13 14 Number the Cells Basic Algorithm We have disjoint sets S ={ {1}, {2}, {3}, {4},… {36} } each cell is unto itself. We have all possible edges E ={ (1,2), (1,7), (2,8), (2,3), … } 60 edges total. • S = set of sets of connected cells • E = set of edges Start 1 2 3 4 5 6 While there is more than one set in S pick a random edge (x,y) 7 8 9 10 11 12 u := Find(x); v := Find(y); if u ≠ v then 13 14 15 16 17 18 Union(u,v) //knock down the wall between the cells (cells in 19 20 21 22 23 24 . Remove (x,y) from E //the same set are connected) 25 26 27 28 29 30 • If u=v there is already a path between x and y • All remaining members of E form the maze 31 32 33 34 35 36 End 15 16 Example Step Example S S Pick (8,14) S {1,2,7,8,9,13,19} {1,2,7,8,9,13,19,14,20 26,27} {1,2,7,8,9,13,19} {3} Find(8) = 7 {3} {3} {4} Find(14) = 20 {4} Start 1 2 3 4 5 6 {4} {5} {5} {5} {6} {6} 7 8 9 10 11 12 {6} Union(7,20) {10} {10} {10} 13 14 15 16 17 18 {11,17} {11,17} {11,17} {12} {12} {12} 19 20 21 22 23 24 {14,20,26,27} {15,16,21} {14,20,26,27} {15,16,21} . 25 26 27 28 29 30 {15,16,21} . End . {22,23,24,29,39,32 31 32 33 34 35 36 . {22,23,24,29,39,32 33,34,35,36} {22,23,24,29,30,32 33,34,35,36} 33,34,35,36} 17 18 Example Example at the End Pick (19,20) S S {1,2,7,8,9,13,19 {1,2,3,4,5,6,7,… 36} 14,20,26,27} Start 1 2 3 4 5 6 {3} Start 1 2 3 4 5 6 {4} E 7 8 9 10 11 12 {5} 7 8 9 10 11 12 {6} 13 14 15 16 17 18 13 14 15 16 17 18 {10} 19 20 21 22 23 24 {11,17} 19 20 21 22 23 24 {12} 25 26 27 28 29 30 {15,16,21} 25 26 27 28 29 30 . 31 32 33 34 35 36 End . 31 32 33 34 35 36 End {22,23,24,29,39,32 33,34,35,36} 19 20 Up-Tree for DU/F Find Operation Initial state 1 2 3 4 5 6 7 • Find(x) follow x to the root and return the root Intermediate 1 3 7 1 3 7 state 2 5 4 2 5 4 Roots are the names of each set. 6 Find(6) = 7 6 21 22 Union Operation Simple Implementation • Union(i,j) - assuming i and j roots, point i • Array of indices (Up[i] is parent of i) Up [x] = 0 means to j. 1 2 3 4 5 6 7 x is a root. up 0 1 0 7 7 5 0 Union(1,7) 1 3 7 1 3 7 2 5 4 2 5 4 6 6 23 24 Union Find • Design Find operator Union(up[] : integer array, x,y : integer) : { //precondition: x and y are roots// › Recursive version Up[x] := y › Iterative version } Find(up[] : integer array, x : integer) : integer { //precondition: x is in the range 1 to size// Constant Time! ??? } 25 26 A Bad Case Weighted Union 1 2 3 … n • Weighted Union (weight = number of nodes) Union(1,2) … › Always point the smaller tree to the root of the 2 3 n larger tree 1 Union(2,3) W-Union(1,7) 3 … n : : 1 3 7 2 2 1 4 n Union(n-1,n) 1 2 5 4 3 2 Find(1) n steps!! 6 1 27 28 Example Again Analysis of Weighted Union 1 2 3 … n • With weighted union an up-tree of height h Union(1,2) has weight at least 2h. 2 3 … n • Proof by induction Union(2,3) 1 › Basis: h = 0. The up-tree has one node, 20 = 1 2 … n : : › Inductive step: Assume true for all h’ < h. 1 3 Union(n-1,n) h-1 T W(T1) > W(T2) > 2 2 Minimum weight Weighted Induction h-1 1 3 … n up-tree of height h union hypothesis Find(1) constant time T1 T formed by 2 W(T) > 2h-1 + 2h-1 = 2h weighted unions 29 30 Worst Case for Weighted Analysis of Weighted Union Union n/2 Weighted Unions • Let T be an up-tree of weight n formed by weighted union. Let h be its height. • n > 2h n/4 Weighted Unions • log2 n > h • Find(x) in tree T takes O(log n) time. • Can we do better? 31 32 Example of Worst Cast (cont’) Elegant Array Implementation After n -1 = n/2 + n/4 + …+ 1 Weighted Unions 1 3 7 2 1 4 2 5 4 log2n 6 1 2 3 4 5 6 7 0 1 0 7 7 5 0 Can save the extra Find up space by storing the If there are n = 2k nodes then the longest weight 2 1 4 complement of weight path from leaf to root has length k. in the space reserved for the root 33 34 Weighted Union Path Compression W-Union(i,j : index){ • On a Find operation point all the nodes on the //i and j are roots// wi := weight[i]; search path directly to the root. wj := weight[j]; 1 7 1 7 if wi < wj then up[i] := j; weight[j] := wi + wj; 2 5 4 PC-Find(3) 2 3 6 5 4 else up[j] :=i; weight[i] := wi +wj; 6 8 9 10 8 9 } 3 10 35 36 Self-Adjustment Works Path Compression Find PC-Find(i : index) { r := i; while up[r] ≠ 0 do //find root// r := up[r]; if i ≠ r then //compress path// PC-Find(x) k := up[i]; while k ≠ r do up[i] := r; i := k; x k := up[k] return(r) } 37 38 Disjoint Union / Find Example with Weighted Union and PC • Worst case time complexity for a W- 7 1 Union is O(1) and for a PC-Find is O(log n). 2 5 4 • Time complexity for m ≥ n operations on 6 8 9 n elements is O(m log* n) where log* n is a very slow growing function. i 3 10 › log * n < 7 for all reasonable n. Essentially constant time per operation! 39 40 Amortized Complexity Find Solutions Recursive • For disjoint union / find with weighted Find(up[] : integer array, x : integer) : integer { union and path compression. //precondition: x is in the range 1 to size// if up[x] = 0 then return x › average time per operation is essentially a else return Find(up,up[x]); } constant. Iterative › worst case time for a PC-Find is O(log n). Find(up[] : integer array, x : integer) : integer { //precondition: x is in the range 1 to size// • An individual operation can be costly, while up[x] ≠ 0 do but over time the average cost per x := up[x]; return x; operation is not.
Recommended publications
  • Algebra I Chapter 1. Basic Facts from Set Theory 1.1 Glossary of Abbreviations
    Notes: c F.P. Greenleaf, 2000-2014 v43-s14sets.tex (version 1/1/2014) Algebra I Chapter 1. Basic Facts from Set Theory 1.1 Glossary of abbreviations. Below we list some standard math symbols that will be used as shorthand abbreviations throughout this course. means “for all; for every” • ∀ means “there exists (at least one)” • ∃ ! means “there exists exactly one” • ∃ s.t. means “such that” • = means “implies” • ⇒ means “if and only if” • ⇐⇒ x A means “the point x belongs to a set A;” x / A means “x is not in A” • ∈ ∈ N denotes the set of natural numbers (counting numbers) 1, 2, 3, • · · · Z denotes the set of all integers (positive, negative or zero) • Q denotes the set of rational numbers • R denotes the set of real numbers • C denotes the set of complex numbers • x A : P (x) If A is a set, this denotes the subset of elements x in A such that •statement { ∈ P (x)} is true. As examples of the last notation for specifying subsets: x R : x2 +1 2 = ( , 1] [1, ) { ∈ ≥ } −∞ − ∪ ∞ x R : x2 +1=0 = { ∈ } ∅ z C : z2 +1=0 = +i, i where i = √ 1 { ∈ } { − } − 1.2 Basic facts from set theory. Next we review the basic definitions and notations of set theory, which will be used throughout our discussions of algebra. denotes the empty set, the set with nothing in it • ∅ x A means that the point x belongs to a set A, or that x is an element of A. • ∈ A B means A is a subset of B – i.e.
    [Show full text]
  • MATH 361 Homework 9
    MATH 361 Homework 9 Royden 3.3.9 First, we show that for any subset E of the real numbers, Ec + y = (E + y)c (translating the complement is equivalent to the complement of the translated set). Without loss of generality, assume E can be written as c an open interval (e1; e2), so that E + y is represented by the set fxjx 2 (−∞; e1 + y) [ (e2 + y; +1)g. This c is equal to the set fxjx2 = (e1 + y; e2 + y)g, which is equivalent to the set (E + y) . Second, Let B = A − y. From Homework 8, we know that outer measure is invariant under translations. Using this along with the fact that E is measurable: m∗(A) = m∗(B) = m∗(B \ E) + m∗(B \ Ec) = m∗((B \ E) + y) + m∗((B \ Ec) + y) = m∗(((A − y) \ E) + y) + m∗(((A − y) \ Ec) + y) = m∗(A \ (E + y)) + m∗(A \ (Ec + y)) = m∗(A \ (E + y)) + m∗(A \ (E + y)c) The last line follows from Ec + y = (E + y)c. Royden 3.3.10 First, since E1;E2 2 M and M is a σ-algebra, E1 [ E2;E1 \ E2 2 M. By the measurability of E1 and E2: ∗ ∗ ∗ c m (E1) = m (E1 \ E2) + m (E1 \ E2) ∗ ∗ ∗ c m (E2) = m (E2 \ E1) + m (E2 \ E1) ∗ ∗ ∗ ∗ c ∗ c m (E1) + m (E2) = 2m (E1 \ E2) + m (E1 \ E2) + m (E1 \ E2) ∗ ∗ ∗ c ∗ c = m (E1 \ E2) + [m (E1 \ E2) + m (E1 \ E2) + m (E1 \ E2)] c c Second, E1 \ E2, E1 \ E2, and E1 \ E2 are disjoint sets whose union is equal to E1 [ E2.
    [Show full text]
  • Solutions to Homework 2 Math 55B
    Solutions to Homework 2 Math 55b 1. Give an example of a subset A ⊂ R such that, by repeatedly taking closures and complements. Take A := (−5; −4)−Q [[−4; −3][f2g[[−1; 0][(1; 2)[(2; 3)[ (4; 5)\Q . (The number of intervals in this sets is unnecessarily large, but, as Kevin suggested, taking a set that is complement-symmetric about 0 cuts down the verification in half. Note that this set is the union of f0g[(1; 2)[(2; 3)[ ([4; 5] \ Q) and the complement of the reflection of this set about the the origin). Because of this symmetry, we only need to verify that the closure- complement-closure sequence of the set f0g [ (1; 2) [ (2; 3) [ (4; 5) \ Q consists of seven distinct sets. Here are the (first) seven members of this sequence; from the eighth member the sets start repeating period- ically: f0g [ (1; 2) [ (2; 3) [ (4; 5) \ Q ; f0g [ [1; 3] [ [4; 5]; (−∞; 0) [ (0; 1) [ (3; 4) [ (5; 1); (−∞; 1] [ [3; 4] [ [5; 1); (1; 3) [ (4; 5); [1; 3] [ [4; 5]; (−∞; 1) [ (3; 4) [ (5; 1). Thus, by symmetry, both the closure- complement-closure and complement-closure-complement sequences of A consist of seven distinct sets, and hence there is a total of 14 different sets obtained from A by taking closures and complements. Remark. That 14 is the maximal possible number of sets obtainable for any metric space is the Kuratowski complement-closure problem. This is proved by noting that, denoting respectively the closure and com- plement operators by a and b and by e the identity operator, the relations a2 = a; b2 = e, and aba = abababa take place, and then one can simply list all 14 elements of the monoid ha; b j a2 = a; b2 = e; aba = abababai.
    [Show full text]
  • ON the CONSTRUCTION of NEW TOPOLOGICAL SPACES from EXISTING ONES Consider a Function F
    ON THE CONSTRUCTION OF NEW TOPOLOGICAL SPACES FROM EXISTING ONES EMILY RIEHL Abstract. In this note, we introduce a guiding principle to define topologies for a wide variety of spaces built from existing topological spaces. The topolo- gies so-constructed will have a universal property taking one of two forms. If the topology is the coarsest so that a certain condition holds, we will give an elementary characterization of all continuous functions taking values in this new space. Alternatively, if the topology is the finest so that a certain condi- tion holds, we will characterize all continuous functions whose domain is the new space. Consider a function f : X ! Y between a pair of sets. If Y is a topological space, we could define a topology on X by asking that it is the coarsest topology so that f is continuous. (The finest topology making f continuous is the discrete topology.) Explicitly, a subbasis of open sets of X is given by the preimages of open sets of Y . With this definition, a function W ! X, where W is some other space, is continuous if and only if the composite function W ! Y is continuous. On the other hand, if X is assumed to be a topological space, we could define a topology on Y by asking that it is the finest topology so that f is continuous. (The coarsest topology making f continuous is the indiscrete topology.) Explicitly, a subset of Y is open if and only if its preimage in X is open. With this definition, a function Y ! Z, where Z is some other space, is continuous if and only if the composite function X ! Z is continuous.
    [Show full text]
  • MAD FAMILIES CONSTRUCTED from PERFECT ALMOST DISJOINT FAMILIES §1. Introduction. a Family a of Infinite Subsets of Ω Is Called
    The Journal of Symbolic Logic Volume 00, Number 0, XXX 0000 MAD FAMILIES CONSTRUCTED FROM PERFECT ALMOST DISJOINT FAMILIES JORG¨ BRENDLE AND YURII KHOMSKII 1 Abstract. We prove the consistency of b > @1 together with the existence of a Π1- definable mad family, answering a question posed by Friedman and Zdomskyy in [7, Ques- tion 16]. For the proof we construct a mad family in L which is an @1-union of perfect a.d. sets, such that this union remains mad in the iterated Hechler extension. The construction also leads us to isolate a new cardinal invariant, the Borel almost-disjointness number aB , defined as the least number of Borel a.d. sets whose union is a mad family. Our proof yields the consistency of aB < b (and hence, aB < a). x1. Introduction. A family A of infinite subsets of ! is called almost disjoint (a.d.) if any two elements a; b of A have finite intersection. A family A is called maximal almost disjoint, or mad, if it is an infinite a.d. family which is maximal with respect to that property|in other words, 8a 9b 2 A (ja \ bj = !). The starting point of this paper is the following theorem of Adrian Mathias [11, Corollary 4.7]: Theorem 1.1 (Mathias). There are no analytic mad families. 1 On the other hand, it is easy to see that in L there is a Σ2 definable mad family. In [12, Theorem 8.23], Arnold Miller used a sophisticated method to 1 prove the seemingly stronger result that in L there is a Π1 definable mad family.
    [Show full text]
  • Cardinality of Wellordered Disjoint Unions of Quotients of Smooth Equivalence Relations on R with All Classes Countable Is the Main Result of the Paper
    CARDINALITY OF WELLORDERED DISJOINT UNIONS OF QUOTIENTS OF SMOOTH EQUIVALENCE RELATIONS WILLIAM CHAN AND STEPHEN JACKSON Abstract. Assume ZF + AD+ + V = L(P(R)). Let ≈ denote the relation of being in bijection. Let κ ∈ ON and hEα : α<κi be a sequence of equivalence relations on R with all classes countable and for all α<κ, R R R R R /Eα ≈ . Then the disjoint union Fα<κ /Eα is in bijection with × κ and Fα<κ /Eα has the J´onsson property. + <ω Assume ZF + AD + V = L(P(R)). A set X ⊆ [ω1] 1 has a sequence hEα : α<ω1i of equivalence relations on R such that R/Eα ≈ R and X ≈ F R/Eα if and only if R ⊔ ω1 injects into X. α<ω1 ω ω Assume AD. Suppose R ⊆ [ω1] × R is a relation such that for all f ∈ [ω1] , Rf = {x ∈ R : R(f,x)} ω is nonempty and countable. Then there is an uncountable X ⊆ ω1 and function Φ : [X] → R which uniformizes R on [X]ω: that is, for all f ∈ [X]ω, R(f, Φ(f)). Under AD, if κ is an ordinal and hEα : α<κi is a sequence of equivalence relations on R with all classes ω R countable, then [ω1] does not inject into Fα<κ /Eα. 1. Introduction The original motivation for this work comes from the study of a simple combinatorial property of sets using only definable methods. The combinatorial property of concern is the J´onsson property: Let X be any n n <ω n set.
    [Show full text]
  • Handout #4: Connected Metric Spaces
    Connected Sets Math 331, Handout #4 You probably have some intuitive idea of what it means for a metric space to be \connected." For example, the real number line, R, seems to be connected, but if you remove a point from it, it becomes \disconnected." However, it is not really clear how to define connected metric spaces in general. Furthermore, we want to say what it means for a subset of a metric space to be connected, and that will require us to look more closely at subsets of metric spaces than we have so far. We start with a definition of connected metric space. Note that, similarly to compactness and continuity, connectedness is actually a topological property rather than a metric property, since it can be defined entirely in terms of open sets. Definition 1. Let (M; d) be a metric space. We say that (M; d) is a connected metric space if and only if M cannot be written as a disjoint union N = X [ Y where X and Y are both non-empty open subsets of M. (\Disjoint union" means that M = X [ Y and X \ Y = ?.) A metric space that is not connected is said to be disconnnected. Theorem 1. A metric space (M; d) is connected if and only if the only subsets of M that are both open and closed are M and ?. Equivalently, (M; d) is disconnected if and only if it has a non-empty, proper subset that is both open and closed. Proof. Suppose (M; d) is a connected metric space.
    [Show full text]
  • Real Analysis 1 Math 623 Notes by Patrick Lei, May 2020
    Real Analysis 1 Math 623 Notes by Patrick Lei, May 2020 Lectures by Robin Young, Fall 2018 University of Massachusetts, Amherst Disclaimer These notes are a May 2020 transcription of handwritten notes taken during lecture in Fall 2018. Any errors are mine and not the instructor’s. In addition, my notes are picture-free (but will include commutative diagrams) and are a mix of my mathematical style (omit lengthy computations, use category theory) and that of the instructor. If you find any errors, please contact me at [email protected]. Contents Contents • 2 1 Lebesgue Measure • 3 1.1 Motivation for the Course • 3 1.2 Basic Notions • 4 1.3 Rectangles • 5 1.4 Outer Measure • 6 1.5 Measurable Sets • 7 1.6 Measurable Functions • 10 2 Integration • 13 2.1 Defining the Integral • 13 2.2 Some Convergence Results • 15 2.3 Vector Space of Integrable Functions • 16 2.4 Symmetries • 18 3 Differentiation • 20 3.1 Integration and Differentiation • 20 3.2 Kernels • 22 3.3 Differentiation • 26 3.4 Bounded Variation • 28 3.5 Absolute Continuity • 30 4 General Measures • 33 4.1 Outer Measures • 34 4.2 Results and Applications • 35 4.3 Signed Measures • 36 2 1 Lebesgue Measure 1.1 Motivation for the Course We will consider some examples that show us some fundamental problems in analysis. Example 1.1 (Fourier Series). Let f be periodic on [0, 2π]. Then if f is sufficiently nice, we can write inx f(x) = ane , n X 1 2π inx where an = 2π 0 f(x)e dx.
    [Show full text]
  • 2 Values and Types
    2 Values and Types . Types of values. Primitive, composite, recursive types. Type systems: static vs dynamic typing, type completeness. Expressions. Implementation notes. © 2004, D.A. Watt, University of Glasgow / C. Huizing TU/e 1 1 Types (1) . Values are grouped into types according to the operations that may be performed on them. Different PLs support different types of values (according to their intended application areas): • Ada: booleans, characters, enumerands, integers, real numbers, records, arrays, discriminated records, objects (tagged records), strings, pointers to data, pointers to procedures. • C: enumerands, integers, real numbers, structures, arrays, unions, pointers to variables, pointers to functions. • Java: booleans, integers, real numbers, arrays, objects. • Haskell: booleans, characters, integers, real numbers, tuples, disjoint unions, lists, recursive types. 2 2 Types (2) . Roughly speaking, a type is a set of values: • v is a value of type T if v ∈ T. E is an expression of type T if E is guaranteed to yield a value of type T. But only certain sets of values are types: • {false, true} is a type, since the operations not, and, and or operate uniformly over the values false and true. • {…, –2, –1, 0, +1, +2, …} is a type, since operations such as addition and multiplication operate uniformly over all these values. • {13, true, Monday} is not considered to be a type, since there are no useful operations over this set of values. 3 3 Types (3) . More precisely, a type is a set of values, equipped with one or more operations that can be applied uniformly to all these values. The cardinality of a type T, written #T, is the number of values of type T.
    [Show full text]
  • Open Subsets of R
    Open Subsets of R Definition. (−∞; a), (a; 1), (−∞; 1), (a; b) are the open intervals of R. (Note that these are the connected open subsets of R.) Theorem. Every open subset U of R can be uniquely expressed as a countable union of disjoint open intervals. The end points of the intervals do not belong to U. Proof. Let U ⊂ R be open. For each x 2 U we will find the \maximal" open interval Ix s.t. x 2 Ix ⊂ U. Here \maximal" means that for any open interval J s.t x 2 J ⊂ U, we have J ⊂ Ix. Let x 2 U. Define Ix = (ax; bx), where ax = inf fa 2 R j (a; x) ⊂ Ug, and bx = sup fb 2 R j (x; b) ⊂ Ug. Either could be infinite. They are well defined since 9 an open interval I s.t x 2 I ⊂ U, because U is open. Clearly, x 2 Ix ⊂ U. Suppose J = (p; q) is s.t. x 2 J ⊂ U. Then (p; x) ⊂ U so p ≥ ax. Likewise q ≤ bx. Thus, J ⊂ Ix and so Ix is indeed maximal. Suppose ax 2 U. (In particular we are supposing ax is finite.) Then 9 > 0 s.t. (ax − , ax + ) ⊂ U. The (ax − , bx) is larger than Ix contradicting maximality. Thus, ax 2= U and likewise bx 2= U. 1 2 Claim. For x; y 2 U, the intervals Ix and Iy are either disjoint or identical. Proof. If Ix \ Iy 6= ;, then Ix [ Iy is an open interval. Since x 2 Ix [ Iy ⊂ U, we have, by maximality, Ix [ Iy ⊂ Ix.
    [Show full text]
  • The Arithmetic of Cardinal Numbers
    The arithmetic of cardinal numbers We wish to extend the familiar operations of addition, multiplication and expo- nentiation of the natural numbers so as to apply to all cardinal numbers. We start with addition and multiplication, then go on consider the unary exponen- tiation function assigning 2 n to each number n and finally the general binary exponentiation operation assigning mn to numbers n, m . Addition and Multiplication Lemma 2 For finite sets A, B , (i) If A ∩ B = ∅ then A ∪ B is finite and |A ∪ B| = |A| + |B|, (ii) A × B is finite and |A × B| = |A| · | B|. Proof see Example 1.9. For sets A, B let A + B = ( {0} × A) ∪ ({1} × B). We call this the disjoint union of A and B. Lemma 3 If A ∼ C and B ∼ D then (i) A + B ∼ C + D, (ii) A × B ∼ C × D. Proof Let f : A ∼ C, g : B ∼ D. Then h : A + B → C + D and e : A × B → C × D defined by h(0 , a ) = (0 , f (a)) for a ∈ A, h (1 , b ) = (1 , g (b)) for b ∈ B e(a, b ) = ( f(a), g (b)) for a ∈ A, b ∈ B are bijections so the result follows. Definition 10 For cardinal numbers n, m let (i) n + m = |A + B| for some/any sets A, B such that n = |A| and m = |B|, (ii) n · m = |A × B| for some/any sets A, B such that n = |A| and m = |B|, Note that the previous lemma ensures that these definitions make sense. Proposition 21 For cardinal numbers n, m and any sets A, B such that A ∩ B = ∅ and n = |A| and m = |B| we have n + m = |A ∪ B|.
    [Show full text]
  • Producing New Bijections From
    ro duing xew fijetions from yld @to pp er in edvnes in wthemtisA epril PPD IWWR hvid peldmn niversity of xew rmpshire tmes ropp wsshusetts snstitute of ehnology efeg por ny purely omintoril onstrution tht pro dues new nite sets from given onesD ijetion etween two given sets nturlly determines ijetion etween the orresp onding onstruted setsF e investigte the p ossiility of going in reverseX dening ijetion etween the originl o jets from given ijetion etween the onstruted o jetsD in eet neling4 the onstrutionF e present preise formultion of this question nd then give onrete riterion for determining whether suh nelltion is p ossileF sf the riterion is stisedD then nelltion pro edure existsD nd indeedD for mny of the onstrutions tht we hve studied p olynomilEtime nellE tion pro edure hs een foundY on the other hndD when the riterion is not stisedD no pro edureD however omplitedD n p erform the nelltionF he elerted involution priniple of qrsi nd wilne ts into our ruri one it is reognized s thinly disguised form of neling disjoint union with xed setD itself well{known tehnique tht ts into our theoretil frmeworkF e show tht the onstrution tht forms the grtesin pro dut of given set with some otherD xed set nnot in generl e neledD ut tht it n e neled in the se where the xed set rries distinguished elementF e lso show tht the onstrution tht tkes the mth grtesin p ower of given set n e neledD ut tht the onstrution tht forms the p ower set of given set nnotF uey wordsX fijetionD ijetive pro ofD qEsetD grtesin p owerD p ower
    [Show full text]