Chapter 2 Sets and Functions.

Slides:



Advertisements
Similar presentations
Math 3121 Abstract Algebra I
Advertisements

Section 7.5: Equivalence Relations Def: A relation R on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive. Ex: Let.
Equivalence Relations
Relations Relations on a Set. Properties of Relations.
Instructor: Hayk Melikya
The Engineering Design of Systems: Models and Methods
Applied Discrete Mathematics Week 11: Graphs
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
Relations Chapter 9.
Sets.
Copyright © Cengage Learning. All rights reserved. CHAPTER 11 ANALYSIS OF ALGORITHM EFFICIENCY ANALYSIS OF ALGORITHM EFFICIENCY.
Ordered Sets. Relations. Equivalence Relations 1.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Discrete Math for CS Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Math Chapter 6 Part II. POWER SETS In mathematics, given a set S, the power set of S, written P(S) or 2 n(S), is the set of all subsets of S. Remember.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
Copyright © Cengage Learning. All rights reserved.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Mathematical Preliminaries
Chapter 8 Equivalence Relations Let A and B be two sets. A relation R from A to B is a subset of AXB. That is, R is a set of ordered pairs, where the first.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Chapter Relations and Their Properties
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
8.5 Equivalence Relations
Relations and Functions ORDERED PAIRS AND CARTESIAN PRODUCT An ordered pair consists of two elements, say a and b, in which one of them, say a is designated.
ORDERED SETS. RELATIONS COSC-1321 Discrete Structures 1.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Discrete Mathematics Lecture # 13 Applications of Venn Diagram.
1-1 Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.4, Slide 1 Chapter 2 Sets and Functions.
Chapter 1 Logic and Proof.
Binary Relation: A binary relation between sets A and B is a subset of the Cartesian Product A x B. If A = B we say that the relation is a relation on.
Relations Chapter 9 Copyright © McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill.
The Relation Induced by a Partition
Representing Relations Using Digraphs
Relations and Their Properties
Chapter 2 Sets and Functions.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Chapter 3 The Real Numbers.
The Language of Sets If S is a set, then
Set Theory.
Chapter 5 Limits and Continuity.
Introduction to Relations
Equivalence Relations
Relations Chapter 9.
Set, Combinatorics, Probability & Number Theory
Copyright © Cengage Learning. All rights reserved.
Reflexivity, Symmetry, and Transitivity
Chapter 2 Sets and Functions.
Chapter 3 The Real Numbers.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
CS201: Data Structures and Discrete Mathematics I
Set Theory A B C.
Transformations of Functions
Depth Estimation via Sampling
Copyright © Cengage Learning. All rights reserved.
Copyright © Cengage Learning. All rights reserved.
Mathematical Background 1
Mathematical Background 1
Mathematical Background
Copyright © Cengage Learning. All rights reserved.
Foundations of Discrete Mathematics
Presentation transcript:

Chapter 2 Sets and Functions

Section 2.2 Relations

In listing the elements of a set, the order is not important. When we wish to indicate that a set of two elements a and b is ordered, we enclose the elements in parentheses: (a, b). Then a is called the first element and b is called the second. The important property of ordered pairs is that (a, b) = (c, d ) iff a = c and b = d. Essentially, we identify the two elements in the ordered pair and specify which one comes first. Ordered pairs can be defined using basic set theory in a clever way. Definition 2.2.1 In symbols we have (a, b) = {{a}, {a, b}}, where we have written the singleton set first. The ordered pair (a, b) is the set whose members are {a, b} and {a}. The acceptability of this definition depends on the ordered pairs actually having the property expected of them. This we prove in the following theorem.

Definition: (a, b) = {{a}, {a, b}} and (c, d) = {{c}, {c, d}} Theorem 2.2.2: (a, b) = (c, d) iff a = c and b = d. Proof: If a = c and b = d, then (a, b) = {{a}, {a, b}} = {{c}, {c, d}} = (c, d). Then we have {{a}, {a, b}} = {{c}, {c, d}}. Conversely, suppose that (a, b) = (c, d). We wish to conclude that a = c and b = d. Consider two cases: when a = b and when a  b. (a, b) = {{a}}. If a = b, then {a} = {a, b}, so Since (a, b) = (c, d), we then have {{a}} = {{c}, {c, d}}. The set on the left has only one member, {a}. Thus the set on the right can have only one member, so But then {{a}} = {{c}}, so {c} = {c, d} and c = d. {a} = {c} and a = c. Thus, a = b = c = d. On the other hand, if a  b …

Definition: (a, b) = {{a}, {a, b}} and (c, d) = {{c}, {c, d}} Theorem 2.2.2: (a, b) = (c, d) iff a = c and b = d. On the other hand, if a  b, then from the preceding argument it follows that c  d. Since (a, b) = (c, d), we must have {a}  {{c}, {c, d}}, which means that {a} = {c} or {a} = {c, d}. In either case, we have c  {a}, so a = c. Again, since (a, b) = (c, d), we must have {a, b}  {{c}, {c, d}}. Thus {a, b} = {c} or {a, b} = {c, d}. But {a, b} has two distinct members and {c} has only one, so we must have {a, b} = {c, d}. Now a = c, a  b and b  {c, d}, which implies that b = d. 

Definition 2.2.4 If A and B are sets, then the Cartesian product (or cross product) of A and B, written A  B, is the set of all ordered pairs (a, b) such that a  A and b  B. In symbols, A  B = {(a, b) : a  A and b  B}. Example 2.2.5 If A and B are intervals of real numbers, then in the Cartesian coordinate system with A on the horizontal axis and B on the vertical axis, A  B is represented by a rectangle. For example, if A is the interval [1, 4) then A  B is the rectangle shown below: and B is the interval (2, 4], 1 4 2 x y Note: The solid lines indicate the left and top edges are included. [ ) The dashed lines indicate the right and bottom edges are not included. B A  B A [ )

A relation between two objects a and b is a condition involving a and b that is either true or false. When it is true, we say a is related to b; otherwise, a is not related to b. For example, “less than” is a relation between positive integers. We have 1 < 3 is true, 2 < 7 is true, 5 < 4 is false. When considering a relation between two objects, it is necessary to know which object comes first. So it is natural for the formal definition of a relation to depend on the concept of an ordered pair. For instance, 1 < 3 is true but 3 < 1 is false. Definition 2.2.7 Let A and B be sets. A relation between A and B is any subset R of A  B. We say that an element a in A is related by R to an element b in B if (a, b)  R, and we often denote this by writing “a R b.” The first set A is referred to as the domain of the relation and denoted by dom R. If B = A, then we speak of a relation R  A  A being a relation on A.

Example 2.2.8 Returning to Example 2.2.5 where A = [1, 4) and B = (2, 4], the relation a R b given by “a < b” is graphed as the portion of A  B that lies to the left of the line x = y. 1 4 2 x y [ ) [ ) A B A  B x = y R x = 1 x = 3 For example, we can see that 1 in A is related to all b in (2, 4]. But 3 in A is related only to those b that are in (3, 4].

Certain relations are singled out because they possess the properties naturally associated with the idea of equality. Definition 2.2.9 A relation R on a set S is an equivalence relation if it has the following properties for all x, y, z in S: (a) x R x (reflexive property) (b) If x R y, then y R x. (symmetric property) (c) If x R y and y R z, then x R z. (transitive property) Example 2.2.10 Determine which properties apply to each relation. (a) Define a relation R on by x R y if x  y. It is reflexive and transitive, but not symmetric. (b) Let S be the set of all lines in the plane and let R be the relation “is parallel to.” It is reflexive (if we agree that a line is parallel to itself), symmetric, and transitive. (c) Let S be the set of all people who live in Chicago, and suppose that two people x and y are related by R if x lives within a mile of y. It is reflexive and symmetric, but not transitive.

that are related to a particular element. Given an equivalence relation R on a set S, it is natural to group together all the elements that are related to a particular element. More precisely, we define the equivalence class (with respect to R  ) of x  S to be the set Ex = { y  S : y R x}. Since R is reflexive, each element of S is in some equivalence class. That is, if two equivalence classes overlap, they must be equal. Furthermore, two different equivalence classes must be disjoint. To see this, suppose that w  Ex  Ey.  x y w Ey Ex  x We claim that Ex = Ey. For any x  Ex we have x R x. But w  Ex, so w R x and, by symmetry, x R w. Also, w  Ey, so w R y. Using transitivity twice, we have x R y. This implies x  Ey and Ex  Ey. The reverse inclusion follows in a similar manner. Thus we see that an equivalence relation R on a set S breaks S into disjoint pieces in a natural way. These pieces are an example of a partition of the set.

Definition 2.2.12 A partition of a set S is a collection P of nonempty subsets of S such that (a) Each x  S belongs to some subset A  P . (b) For all A, B  P , if A  B, then A  B = . A member of P is called a piece of the partition. Example 2.2.13 Let S = {1, 2, 3}. Then the collection P = {{1}, {2}, {3}} is a partition of S. The the collection P = {{1, 2}, {3}} is also a partition of S. 1 2 3 S 1 2 3 S P = {{1}, {2}, {3}} P = {{1, 2}, {3}} The collection P = {{1, 2}, {2, 3}} is not a partition of S because {1, 2} and {2, 3} are not disjoint.

Not only does an equivalence relation on a set S determine a partition of S, but the partition can be used to determine the relation. Theorem 2.2.17 Let R be an equivalence relation on a set S. Then { Ex : x  S} is a partition of S. The relation “belongs to the same piece as” is the same as R. Conversely, if P is a partition of S, let P be defined by x P y iff x and y are in the same piece of the partition. Then P is an equivalence relation and the corresponding partition into equivalence classes is the same as P . Proof: Let R be an equivalence relation on S. We have already shown that {Ex : x  S} is a partition of S. Now suppose that P is the relation “belongs to the same piece (equivalence class) as.” Then x P y iff x, y  Ez for some z  S. iff x R z and y R z for some z  S. iff x R z and z R y for some z  S. iff x R y Thus, P and R are the same relation.

Not only does an equivalence relation on a set S determine a partition of S, but the partition can be used to determine the relation. Theorem 2.2.17 Let R be an equivalence relation on a set S. Then {Ex : x  S} is a partition of S. The relation “belongs to the same piece as” is the same as R. Conversely, if P is a partition of S, let P be defined by x P y iff x and y are in the same piece of the partition. Then P is an equivalence relation and the corresponding partition into equivalence classes is the same as P . Proof: Conversely, suppose that P is a partition of S and let P be defined by x P y iff x and y are in the same piece of the partition. Clearly, P is reflexive and symmetric. To see that P is transitive, suppose that x P y and y P z. Then y  Ex  Ez. But this implies that Ex = Ez by the contrapositive of 2.2.12(b), so x P z. Finally, the equivalence classes of P correspond to the pieces of P because of the way P was defined. 