2.3. Relations. Arrow diagrams. Venn diagrams and arrows can be used for representing

Similar documents
Lecture 16 : Relations and Functions DRAFT

Lecture 17 : Equivalence and Order Relations DRAFT

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson


INTRODUCTORY SET THEORY

Just the Factors, Ma am

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Discrete Mathematics. Hans Cuypers. October 11, 2007

7 Relations and Functions

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

Cartesian Products and Relations

Applications of Fermat s Little Theorem and Congruences

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

How To Understand And Solve A Linear Programming Problem

Math 319 Problem Set #3 Solution 21 February 2002

Discrete Maths. Philippa Gardner. These lecture notes are based on previous notes by Iain Phillips.

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

Chapter 7: Products and quotients

Math 312 Homework 1 Solutions

Some elements of elementary set theory MAT2200 Spring 2011 By Geir Ellingsud

MATH APPLIED MATRIX THEORY

COUNTING SUBSETS OF A SET: COMBINATIONS

Cross product and determinants (Sect. 12.4) Two main ways to introduce the cross product

1 The Concept of a Mapping

Notes on Algebraic Structures. Peter J. Cameron

Abstract Algebra Cheat Sheet

Notes on Factoring. MA 206 Kurt Bryan

Degree Hypergroupoids Associated with Hypergraphs

Introduction to Modern Algebra

Solutions to In-Class Problems Week 4, Mon.

Scalar Valued Functions of Several Variables; the Gradient Vector

Mathematics for Algorithm and System Analysis

Factoring Algorithms

Group Theory. Contents

S on n elements. A good way to think about permutations is the following. Consider the A = 1,2,3, 4 whose elements we permute with the P =

Chapter 3. if 2 a i then location: = i. Page 40

6.3 Conditional Probability and Independence

4.5 Finite Mathematical Systems

k, then n = p2α 1 1 pα k

Reading 13 : Finite State Automata and Regular Expressions

How To Solve The Stable Roommates Problem

The Ideal Class Group

A permutation can also be represented by describing its cycles. What do you suppose is meant by this?

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Pigeonhole Principle Solutions

Midterm Practice Problems

You know from calculus that functions play a fundamental role in mathematics.

How To Understand And Solve Algebraic Equations

Dimitris Chatzidimitriou. Corelab NTUA. June 28, 2013

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

Tree-representation of set families and applications to combinatorial decompositions

DATA ANALYSIS II. Matrix Algorithms

Mathematics Review for MS Finance Students

Continued Fractions and the Euclidean Algorithm

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Class notes Program Analysis course given by Prof. Mooly Sagiv Computer Science Department, Tel Aviv University second lecture 8/3/2007

Math 223 Abstract Algebra Lecture Notes

A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Course Syllabus. MATH 1350-Mathematics for Teachers I. Revision Date: 8/15/2016

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

3 Some Integer Functions

Multiplication. Year 1 multiply with concrete objects, arrays and pictorial representations

Acquisition Lesson Planning Form Key Standards addressed in this Lesson: MM2A3d,e Time allotted for this Lesson: 4 Hours

Handout #1: Mathematical Reasoning

V Quantitative Reasoning: Computers, Number Theory and Cryptography

is in plane V. However, it may be more convenient to introduce a plane coordinate system in V.

EXERCISES FOR THE COURSE MATH 570, FALL 2010

Semantics of UML class diagrams

1 Sets and Set Notation.

Chapter 7. Permutation Groups

Quotient Rings and Field Extensions

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

Basic Concepts of Point Set Topology Notes for OU course Math 4853 Spring 2011

AN ALGORITHM FOR DETERMINING WHETHER A GIVEN BINARY MATROID IS GRAPHIC

Lecture 4: BK inequality 27th August and 6th September, 2007

E3: PROBABILITY AND STATISTICS lecture notes

4/1/2017. PS. Sequences and Series FROM 9.2 AND 9.3 IN THE BOOK AS WELL AS FROM OTHER SOURCES. TODAY IS NATIONAL MANATEE APPRECIATION DAY

ORIENTATIONS. Contents

Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter 4 described a mathematical system

LINEAR INEQUALITIES. Mathematics is the art of saying many things in many different ways. MAXWELL

A first step towards modeling semistructured data in hybrid multimodal logic


Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

Dot product and vector projections (Sect. 12.3) There are two main ways to introduce the dot product

Group Fundamentals. Chapter Groups and Subgroups Definition

Linear Algebra Notes for Marsden and Tromba Vector Calculus

Mathematical Conventions. for the Quantitative Reasoning Measure of the GRE revised General Test

Cryptography and Network Security. Prof. D. Mukhopadhyay. Department of Computer Science and Engineering. Indian Institute of Technology, Kharagpur

1 Solving LPs: The Simplex Algorithm of George Dantzig

4. FIRST STEPS IN THE THEORY 4.1. A

Data Mining: Algorithms and Applications Matrix Math Review

Examples of Functions

Transcription:

2.3. RELATIONS 32 2.3. Relations 2.3.1. Relations. Assume that we have a set of men M and a set of women W, some of whom are married. We want to express which men in M are married to which women in W. One way to do that is by listing the set of pairs (m, w) such that m is a man, w is a woman, and m is married to w. So, the relation married to can be represented by a subset of the Cartesian product M W. In general, a relation R from a set A to a set B will be understood as a subset of the Cartesian product A B, i.e., R A B. If an element a A is related to an element b B, we often write a R b instead of (a, b) R. The set is called the domain of R. The set {a A a R b for some b B} {b B a R b for some a A} is called the range of R. For instance, in the relation married to above, the domain is the set of married men, and the range is the set of married women. If A and B are the same set, then any subset of A A will be a binary relation in A. For instance, assume A = {1, 2, 3, 4}. Then the binary relation less than in A will be: < A = {(x, y) A A x < y} = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}. Notation: A set A with a binary relation R is sometimes represented by the pair (A, R). So, for instance, (Z, ) means the set of integers together with the relation of non-strict inequality. 2.3.2. Representations of Relations. Arrow diagrams. Venn diagrams and arrows can be used for representing relations between given sets. As an example, figure 2.8 represents the relation from A = {a, b, c, d} to B = {1, 2, 3, 4} given by R = {(a, 1), (b, 1), (c, 2), (c, 3)}. In the diagram an arrow from x to y means that x is related to y. This kind of graph is called directed graph or digraph.

2.3. RELATIONS 33 a b c d 1 3 4 2 A B Figure 2.8. Relation. Another example is given in diagram 2.9, which represents the divisibility relation on the set {1, 2, 3, 4, 5, 6, 7, 8, 9}. 1 2 8 6 7 3 5 4 9 Figure 2.9. Binary relation of divisibility. Matrix of a Relation. Another way of representing a relation R from A to B is with a matrix. Its rows are labeled with the elements of A, and its columns are labeled with the elements of B. If a A and b B then we write 1 in row a column b if a R b, otherwise we write 0. For instance the relation R = {(a, 1), (b, 1), (c, 2), (c, 3)} from A = {a, b, c, d} to B = {1, 2, 3, 4} has the following matrix: a b c d 1 2 3 4 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 0 2.3.3. Inverse Relation. Given a relation R from A to B, the inverse of R, denoted R 1, is the relation from B to A defined as b R 1 a a R b.

2.3. RELATIONS 34 For instance, if R is the relation being a son or daughter of, then R 1 is the relation being a parent of. 2.3.4. Composition of Relations. Let A, B and C be three sets. Given a relation R from A to B and a relation S from B to C, then the composition S R of relations R and S is a relation from A to C defined by: a (S R) c there exists some b B such that a R b and b S c. For instance, if R is the relation to be the father of, and S is the relation to be married to, then S R is the relation to be the father in law of. 2.3.5. Properties of Binary Relations. A binary relation R on A is called: 1. Reflexive if for all x A, x R x. For instance on Z the relation equal to (=) is reflexive. 2. Transitive if for all x, y, z A, x R y and y R z implies x R z. For instance equality (=) and inequality (<) on Z are transitive relations. 3. Symmetric if for all x, y A, x R y y R x. For instance on Z, equality (=) is symmetric, but strict inequality (<) is not. 4. Antisymmetric if for all x, y A, x R y and y R x implies x = y. For instance, non-strict inequality ( ) on Z is antisymmetric. 2.3.6. Partial Orders. A partial order, or simply, an order on a set A is a binary relation on A with the following properties: 1. Reflexive: for all x A, x x. 2. Antisymmetric: (x y) (y x) x = y. 3. Transitive: (x y) (y z) x z. Examples: 1. The non-strict inequality ( ) in Z. 2. Relation of divisibility on Z + : a b t, b = at.

2.3. RELATIONS 35 3. Set inclusion ( ) on P(A) (the collection of subsets of a given set A). Exercise: prove that the aforementioned relations are in fact partial orders. As an example we prove that integer divisibility is a partial order: 1. Reflexive: a = a 1 a a. 2. Antisymmetric: a b b = at for some t and b a a = bt for some t. Hence a = att, which implies tt = 1 t = t 1. The only invertible positive integer is 1, so t = t = 1 a = b. 3. Transitive: a b and b c implies b = at for some t and c = bt for some t, hence c = att, i.e., a c. Question: is the strict inequality (<) a partial order on Z? Two elements a, b A are said to be comparable if either x y or y x, otherwise they are said to be non comparable. The order is called total or linear when every pair of elements x, y A are comparable. For instance (Z, ) is totally ordered, but (Z +, ), where represents integer divisibility, is not. A totally ordered subset of a partially ordered set is called a chain; for instance the set {1, 2, 4, 8, 16,... } is a chain in (Z +, ). 2.3.7. Hasse diagrams. A Hasse diagram is a graphical representation of a partially ordered set in which each element is represented by a dot (node or vertex of the diagram). Its immediate successors are placed above the node and connected to it by straight line segments. As an example, figure 2.10 represents the Hasse diagram for the relation of divisibility on {1, 2, 3, 4, 5, 6, 7, 8, 9}. Question: How does the Hasse diagram look for a totally ordered set? 2.3.8. Equivalence Relations. An equivalence relation on a set A is a binary relation on A with the following properties: 1. Reflexive: for all x A, x x. 2. Symmetric: x y y x. 3. Transitive: (x y) (y z) x z.

2.3. RELATIONS 36 8 9 4 6 5 7 2 3 1 Figure 2.10. Hasse diagram for divisibility. For instance, on Z, the equality (=) is an equivalence relation. Another example, also on Z, is the following: x y (mod 2) ( x is congruent to y modulo 2 ) iff x y is even. For instance, 6 2 (mod 2) because 6 2 = 4 is even, but 7 4 (mod 2), because 7 4 = 3 is not even. Congruence modulo 2 is in fact an equivalence relation: 1. Reflexive: for every integer x, x x = 0 is indeed even, so x x (mod 2). 2. Symmetric: if x y (mod 2) then x y = t is even, but y x = t is also even, hence y x (mod 2). 3. Transitive: assume x y (mod 2) and y z (mod 2). Then x y = t and y z = u are even. From here, x z = (x y) + (y z) = t + u is also even, hence x z (mod 2). 2.3.9. Equivalence Classes, Quotient Set, Partitions. Given an equivalence relation on a set A, and an element x A, the set of elements of A related to x are called the equivalence class of x, represented [x] = {y A y x}. Element x is said to be a representative of class [x]. The collection of equivalence classes, represented A/ = {[x] x A}, is called quotient set of A by. Exercise: Find the equivalence classes on Z with the relation of congruence modulo 2. One of the main properties of an equivalence relation on a set A is that the quotient set, i.e. the collection of equivalence classes, is a partition of A. Recall that a partition of a set A is a collection of

2.3. RELATIONS 37 non-empty subsets A 1, A 2, A 3,... of A which are pairwise disjoint and whose union equals A: 1. A i A j = for i j, 2. n A n = A. Example: in Z with the relation of congruence modulo 2 (call it 2 ), there are two equivalence classes: the set E of even integers and the set O of odd integers. The quotient set of Z by the relation 2 of congruence modulo 2 is Z/ 2 = {E, O}. We see that it is in fact a partition of Z, because E O =, and Z = E O. Exercise: Let m be an integer greater than or equal to 2. On Z we define the relation x y (mod m) m (y x) (i.e., m divides exactly y x). Prove that it is an equivalence relation. What are the equivalence classes? How many are there? Exercise: On the Cartesian product Z Z we define the relation (a, b) R (c, d) ad = bc. Prove that R is an equivalence relation. Would it still be an equivalence relation if we extend it to Z Z?