ORDERED SETS. RELATIONS COSC-1321 Discrete Structures 1.

Slides:



Advertisements
Similar presentations
Equivalence Relations
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
Lecture 1 RMIT University, Taylor's University Learning Objectives
Chapter 3 Relations. Section 3.1 Relations and Digraphs.
The Engineering Design of Systems: Models and Methods
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
Basic Properties of Relations
Relations.
Sets DISCRETE STRUCTURE ABDUL BASIT TAHIR, KAMRAN ALI, FAIZAN ILLAHI, NOMAN AHMAD, ARSALAN MUBASHIR.
Discrete Structures Chapter 5 Relations Nurul Amelina Nasharuddin Multimedia Department.
CSE115/ENGR160 Discrete Mathematics 04/24/12 Ming-Hsuan Yang UC Merced 1.
Denoting the beginning
CSE115/ENGR160 Discrete Mathematics 05/03/11 Ming-Hsuan Yang UC Merced 1.
Congruence of Integers
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/10/11 Ming-Hsuan Yang UC Merced 1.
Sets 1.
Discrete Mathematics Lecture#11.
Partially Ordered Sets Basic Concepts
Reminders: –Test3 is scheduled for Friday, April 25 was sent that included a proposed schedule –HW 8 is due Wednesday, April 9 in class Pascal’s.
Partially Ordered Sets (POSets)
Relations Chapter 9.
Week 8 - Wednesday.  What did we talk about last time?  Cardinality  Countability  Relations.
Logics for Data and Knowledge Representation Introduction to Algebra Chiara Ghidini, Luciano Serafini, Fausto Giunchiglia and Vincenzo Maltese.
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,
R. Johnsonbaugh, Discrete Mathematics 5 th edition, 2001 Chapter 2 The Language of Mathematics.
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.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Relations, Functions, and Countability
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.
Discrete Mathematics Relation.
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.
Sets and Subsets Set A set is a collection of well-defined objects (elements/members). The elements of the set are said to belong to (or be contained in)
Discrete Mathematics Lecture # 15 Types of Relations (contd.)
Rosen 1.6, 1.7. Basic Definitions Set - Collection of objects, usually denoted by capital letter Member, element - Object in a set, usually denoted by.
Equivalence Relations. Partial Ordering Relations 1.
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.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
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.
RelationsCSCE 235, Spring Introduction A relation between elements of two sets is a subset of their Cartesian products (set of all ordered pairs.
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
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.
Chap. 7 Relations: The Second Time Around
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
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 B = {a,b} {( 0, a), (
Advanced Digital Designs Jung H. Kim. Chapter 1. Sets, Relations, and Lattices.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
“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.
Section 9.1. Section Summary Relations and Functions Properties of Relations Reflexive Relations Symmetric and Antisymmetric Relations Transitive Relations.
Discrete Mathematics Lecture # 13 Applications of Venn Diagram.
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
Relations and Their Properties
Relations Chapter 9.
Set, Combinatorics, Probability & Number Theory
Cartesian product Given two sets A, B we define their Cartesian product is the set of all the pairs whose first element is in A and second in B. Note that.
Chapter 2 Sets and Functions.
Mathematical Background 1
Formal Definition and Examples
9.5 Equivalence Relations
Presentation transcript:

ORDERED SETS. RELATIONS COSC-1321 Discrete Structures 1

Ordered Pair When listing the elements of a set, the order of the elements does not matter In the ordered pair of elements a and b, denoted (a, b), the order in which the entries are written, matters Hence and if and only if a=c and b=d 2

Cartesian Product The Cartesian Product of sets A and B is the set consisting of all the ordered pairs (a, b), where : The most popular and simple example of the Cartesian product is the Euclidean plain, which is the set of all ordered pairs of real numbers It is important that in general 3

Cartesian Product The Cartesian Product of the sets is the set consisting of ordered n-tuples where : 4

Relation A relation R from a set A to a set B is any subset of the Cartesian product A x B. Thus, if P=A x B,, then we say that x is related to y by R and use the following notation: x R y. 5

Relation For example, let A={Smith, Johnson} be a set of students and B={Calculus, Discrete Structures, History, Programming} be a set of classes. Let student Smith takes Calculus and History, while student Johnson takes Calculus, Discrete Structures and Programming. Let us determine a relation R as follows: “student x takes class y” Thus, R={(Smith, Calc), (Smith, Hist), (Johnson, Calc), (Johnson, Discrete Structures), (Johnson, Programming)} Hence, for example Smith R Calc is true, while Johnson R Hist is false. 6

Relation on a set A relation from set S to itself, that is a subset of the Cartesian product S x S, is called a relation on S. Let S={A, B, C, D, E, F, G} be a set of classes from some program curriculum. Let us define relation as follows: x is related to y if class x is a prerequisite for class y. If A and B are prerequisites for C and C, D are prerequisites for E, F, G, then the resulting relation on S is {(A,C), (B,C), (C,E), (C,F), (C,G), (D,E), (D,F), (D,G) } is a just defined relation on S. 7

Properties of a Relation on a set A relation R on a set S may have any of the following three special properties:  If, is true, then R is called reflexive.  If is true whenever is true, then R is called symmetric.  If is true whenever are both true, then R is called transitive. 8

Strict Order Relation Let S={1,2,3,4}. Define a relation R on S by letting x R y mean x < y. Then, for example, 1 R 4, 2 R 4, 1 R 3, 1 R 2, 3 R 4 are true, but 4 R 1, 4 R 2, 3 R 1, 2 R 1, 4 R 3 are false. The relation “ “ on the set S (and the set Z) are the relations of a strict order. A strict order relation is not reflexive, not symmetric, but it is transitive. 9

Properties of a Relation on a set The relation “<“ on the set of integer numbers or any its subset containing not less than 3 elements, is not reflexive, it is also not symmetric, but it is transitive. In fact, if x < y and y < z then always x < z. The relation “=“ on any numbering set is reflexive (x=x), symmetric (x=y whenever y=x), and transitive (if x=y and y=z then x=z). 10

Equivalence Relation A relation, which is reflexive, symmetric, and transitive is called an equivalence relation. Example 1: on the set of students attending a particular university, define one student to be related to another one if they both take the Discrete Structures class. Example 2: on the set of students attending a particular university, define one student to be related to another whenever their last names begin with the same letter. 11

Equivalence Relation Example 3: On the set of polygons define x R y to mean that x has the same area as y. Example 4: on the set of students attending a particular university, define one student to be related to another one if they both got “A” in the Calculus 1 class. 12

Equivalence Relation Example 5: On the set of integers greater than 1 define x R y to mean that x has the same number of distinct prime devisors as y. Thus, 6 R 15 (6=2x3 and 15=3x5) and 12 R 55 (12=2x2x3 and 55=5x11). Evidently, 6 R 12, 6 R 55, 15 R 12, and 15 R 55 are also true. It is clear that this relation is reflexive, symmetric and transitive. 13

Equivalence Relation Example 5 ( continuation ). On the set of integers greater than 1 define x R y to mean that x has the same number of distinct prime devisors as y. Thus, 30 R 60 (30=2x3x5 and 60=2x2x3x5) and 90 R 150 (90=2x3x3x5 and 150=2x3x5x5). Evidently, 30 R 150, 60 R 90, 30 R 90, and 60 R 150 are also true. However, !!! 14

Equivalence Class If and R is an equivalence relation on a set S, the set of elements of S that are related to x is called the equivalence class containing x and is denoted [x]. Thus 15

Equivalence Class Returning to the previous example, we may conclude that we have considered two equivalence classes [6]={6, 12, 15, 55,…} and [30]={30, 60, 90, 150,…} Evidently, the different equivalence classes are always disjoint. If we suppose that two or more different equivalence classes have a non-empty intersection, we immediately have to conclude that these classes cannot be different and they must contain the same elements. 16

Equivalence Relation Example. On the set of integers greater than 1 define x R y to mean that x has the same largest prime devisor as y. Then R is an equivalence relation on S. The equivalence class of R containing 2 consists of all elements in S that are related to 2 – that is all positive integers whose largest prime devisor is 2: 17

Theorem on Equivalence Classes Let R be an equivalence relation on a set S. Then:  If, then x is related to y by R only if [x]=[y].  Two equivalence classes of R are either equal or disjoint. 18

Equivalence Relation and Partition It follows from the second part of Theorem that the equivalence classes of an equivalence relation R on set S divide S into disjoint subsets. This family of subsets is called a partition of S and has the following properties:  No subset is empty.  Each element of S belongs to some subset.  Two distinct subsets are disjoint. 19

Equivalence Relation and Partition Every equivalence relation on S gives rise to a partition of S by taking the family of subsets in the partition to be the equivalence classes of the equivalence relation. If P is a partition of S, we can define a relation R on S by letting x R y mean that x and y belong to the same member of P. 20

Equivalence Relation and Partition Let S={1,2,3,4,5,6}. Let A={1,3,4}, B={2,6}, and C={5}. Let some equivalence relation is defined on these sets. Evidently, Then P= {A, B, C} is a partition of S={1,2,3,4,5,6}. Then we can establish a relation “ x R y means that x and y belong to the same member of P”: R={(1,1),(1,3),(1,4),(3,1),(3,3),(3,4),(4,1),(4,3), (4,4), (2,2), (2,6), (6,2), (6,6), (5,5)} 21

Equivalence Relation and Partition Theorem.  An equivalence relation R on S gives rise to a partition P of S, in which the members of P are the equivalence classes of R.  A partition P of S induces an equivalence relation R in which any two elements x and y are related by R whenever they belong to the same member of P. Moreover, the equivalence classes of this relation are members of P. 22

Antisymmetric Relation A relation R on a set S is called antisymmetric if, whenever x R y and y R x are both true, then x=y. Examples. Relations “≤” and “≥” on the set Z of integer numbers. If x ≤ y and y ≤ x then always x=y. If x ≥ y and y ≥ x then always x=y. 23

Partial Ordering Relations A relation R on a set S is called a partial ordering relation, or simply a partial order, if the following 3 properties hold for this relation: 1) R is reflexive, that is, x R x is true 2) R is antisymmetric, that is 3) R is transitive, that is 24

Partial Ordering Relations. Examples Relations “≤” and “≥” are partial orders on sets Z of integer numbers and R of real numbers. Let S={A,B,C,…} be a set whose elements are other sets. For define A R B if  R is reflexive ( ), antisymmetric and transitive Thus R is a partial order. 25

Partial Ordering Relations. Examples Let us consider a set of n-dimensional binary vectors E 2 n ={(0,…,0), (0,…,01),…,(1,…,1)}. We say that vector x precedes to vector y if for all n components of these two vectors the following property holds. For example, if n=3:, but. The relation is a partial order on the set of n-dimensional binary vectors. 26

Partial Ordering Relations. Examples Let S={A, B, C, D, E, F, G} be a set of classes from some program curriculum. Let us define relation as follows: x is related to y if class x is a prerequisite for class y. This relation is a partial order. 27

Tolerance Relations A relation, which is reflexive and symmetric, but not necessary is transitive is called a tolerance relation. Hence any equivalence relation is a tolerance relation, but a tolerance relation, which is not transitive, is only tolerance, but not an equivalence relation A tolerance relation establishes closeness of some objects with each other, but this closeness cannot be expanded to other objects. Example 1: on the set of students attending a particular university, define one student to be related to another one if they both have a grandmother in common. 28