CMPSCI 250: Introduction to Computation. Lecture #11: Equivalence Relations David Mix Barrington 27 September 2013

Similar documents
Reading 11 : Relations and Functions

Chapter 9: Relations Relations

5. Partitions and Relations Ch.22 of PJE.

Definition: A binary relation R from a set A to a set B is a subset R A B. Example:

CMPSCI 250: Introduction to Computation. Lecture #22: From λ-nfa s to NFA s to DFA s David Mix Barrington 22 April 2013

Week 4-5: Binary Relations

CMPSCI 250: Introduction to Computation. Lecture #15: The Fundamental Theorem of Arithmetic David Mix Barrington 24 February 2014

Section Summary. Relations and Functions Properties of Relations. Combining Relations

Outline Inverse of a Relation Properties of Relations. Relations. Alice E. Fischer. April, 2018

1. To be a grandfather. Objects of our consideration are people; a person a is associated with a person b if a is a grandfather of b.

Chapter VI. Relations. Assumptions are the termites of relationships. Henry Winkler

Relations Graphical View

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009

Mathematics 220 Homework 4 - Solutions. Solution: We must prove the two statements: (1) if A = B, then A B = A B, and (2) if A B = A B, then A = B.

Week 4-5: Binary Relations

In this initial chapter, you will be introduced to, or more than likely be reminded of, a

Equivalence relations

Notes for Science and Engineering Foundation Discrete Mathematics

CSE 311: Foundations of Computing I Autumn 2014 Practice Final: Section X. Closed book, closed notes, no cell phones, no calculators.

MATH 115, SUMMER 2012 LECTURE 4 THURSDAY, JUNE 21ST

Coloring Vertices and Edges of a Path by Nonempty Subsets of a Set

CMPSCI 240: Reasoning about Uncertainty

Announcements. Solution to Assignment 3 is posted Assignment 4 is available. c D. Poole and A. Mackworth 2017 CPSC 322 Lecture 8 1 / 25

UMASS AMHERST MATH 300 SP 05, F. HAJIR HOMEWORK 8: (EQUIVALENCE) RELATIONS AND PARTITIONS

Independencies. Undirected Graphical Models 2: Independencies. Independencies (Markov networks) Independencies (Bayesian Networks)

CMPSCI 250: Introduction to Computation. Lecture #32: The Myhill-Nerode Theorem David Mix Barrington 11 April 2014

CSC Discrete Math I, Spring Relations

PROBLEM SET 3: PROOF TECHNIQUES

Lecture 8: Equivalence Relations

Relations and Equivalence Relations

Definitions: A binary relation R on a set X is (a) reflexive if x X : xrx; (f) asymmetric if x, x X : [x Rx xr c x ]

CMPSCI 250: Introduction to Computation. Lecture #23: Finishing Kleene s Theorem David Mix Barrington 25 April 2013

COT3100 SI Final Exam Review

Economics 204 Fall 2012 Problem Set 3 Suggested Solutions

Notes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y.

MATH 2200 Final Review

Essential facts about NP-completeness:

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Proofs. Chapter 2 P P Q Q

1 Predicates and Quantifiers

Relations. Relations of Sets N-ary Relations Relational Databases Binary Relation Properties Equivalence Relations. Reading (Epp s textbook)

(x 1 +x 2 )(x 1 x 2 )+(x 2 +x 3 )(x 2 x 3 )+(x 3 +x 1 )(x 3 x 1 ).

Section 7.1 Relations and Their Properties. Definition: A binary relation R from a set A to a set B is a subset R A B.

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

Chapter 0 Introduction. Fourth Academic Year/ Elective Course Electrical Engineering Department College of Engineering University of Salahaddin

Selected Solutions to Even Problems, Part 3

Proofs. Chapter 2 P P Q Q

Introductory Analysis I Fall 2014 Homework #5 Solutions

Coloring Vertices and Edges of a Path by Nonempty Subsets of a Set

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

CSE 20 DISCRETE MATH. Winter

Thus, X is connected by Problem 4. Case 3: X = (a, b]. This case is analogous to Case 2. Case 4: X = (a, b). Choose ε < b a

Lecture 4. Algebra. Section 1:. Signature, algebra in a signature. Isomorphisms, homomorphisms, congruences and quotient algebras.

Proof Techniques (Review of Math 271)

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

MITOCW Lec 11 MIT 6.042J Mathematics for Computer Science, Fall 2010

Relations. Relations. Definition. Let A and B be sets.

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Algorithms For Inference Fall 2014

Before you get started, make sure you ve read Chapter 1, which sets the tone for the work we will begin doing here.

5 Set Operations, Functions, and Counting

Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin

Logic, Sets, and Proofs

CSE 20: Discrete Mathematics

CSE 20 DISCRETE MATH. Fall

Homework 1 2/7/2018 SOLUTIONS Exercise 1. (a) Graph the following sets (i) C = {x R x in Z} Answer:

14 Equivalence Relations

Lifted Inference: Exact Search Based Algorithms

Vectors. Vector Practice Problems: Odd-numbered problems from

Solutions to In Class Problems Week 4, Mon.

1 More finite deterministic automata

Eves Equihoop, The Card Game SET, and Abstract SET

Mathematical Foundations of Computer Science Lecture Outline October 18, 2018

Cosets and Lagrange s theorem

Math 42, Discrete Mathematics

9 RELATIONS. 9.1 Reflexive, symmetric and transitive relations. MATH Foundations of Pure Mathematics

CHAPTER THREE: RELATIONS AND FUNCTIONS

Economics 204 Summer/Fall 2017 Lecture 1 Monday July 17, 2017

HAMBURGER BEITRÄGE ZUR MATHEMATIK

Seminaar Abstrakte Wiskunde Seminar in Abstract Mathematics Lecture notes in progress (27 March 2010)

6c Lecture 14: May 14, 2014

Lecture 3: the classification of equivalence relations and the definition of a topological space

CMPSCI 250: Introduction to Computation. Lecture #29: Proving Regular Language Identities David Mix Barrington 6 April 2012

Relations. Binary Relation. Let A and B be sets. A (binary) relation from A to B is a subset of A B. Notation. Let R A B be a relation from A to B.

arxiv: v1 [math.co] 1 Oct 2013

Lecture 5 : Proofs DRAFT

Generating Permutations and Combinations

Advanced Combinatorial Optimization September 24, Lecture 5

Game Theory and Algorithms Lecture 7: PPAD and Fixed-Point Theorems

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

1.4 Equivalence Relations and Partitions

CS173 Strong Induction and Functions. Tandy Warnow

1.3 Vertex Degrees. Vertex Degree for Undirected Graphs: Let G be an undirected. Vertex Degree for Digraphs: Let D be a digraph and y V (D).

Supplementary Material for MTH 299 Online Edition

CMSC 27130: Honors Discrete Mathematics

Writing proofs for MATH 61CM, 61DM Week 1: basic logic, proof by contradiction, proof by induction

Lecture 2: Connecting the Three Models

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

Lecture 4: Constructing the Integers, Rationals and Reals

COMP 409: Logic Homework 5

Graph Theory. Thomas Bloom. February 6, 2015

Transcription:

CMPSCI 250: Introduction to Computation Lecture #11: Equivalence Relations David Mix Barrington 27 September 2013

Equivalence Relations Definition of Equivalence Relations Two More Examples: Universal and Parity The Graph of an Equivalence Relation Partitions and the Partition Theorem Same-Set on a Partition is an E.R. Equivalence Classes The Classes Form a Partition

Defining an Equivalence Relation Last lecture we looked at partial orders, which are reflexive, antisymmetric, and transitive. Today we look at equivalence relations: binary relations on a set that are reflexive, symmetric, and transitive. Recall the definitions: R is reflexive if x: R(x, x), R is symmetric if x: y: R(x, y) R(y, x)), and R is transitive if x: y: z: (R(x, y) R(y, z)) R(x, z).

Defining an Equivalence Relation You should be familiar with these properties of the equality relation: x = x is always true, from x = y we can get y = x, and we know that if x = y and y = z, then x = z. The idea of equivalence relations is to formalize the property of acting like equality in this way. To prove that a relation is an equivalence relation, we formally need to use the Rule of Generalization, though we often skip steps if they are obvious.

Some Equivalence Relations If A is any set, we can define the universal relation U on A to always be true. Formally, U is the entire set A A consisting of all possible ordered pairs. Of course U(x, x) is always true, and the implications in the definitions of symmetry and transitivity are always true because their conclusions are true. The always false relation U (or ) is symmetric and transitive but not reflexive.

More Equivalence Relations The parity relation on naturals is perhaps more interesting. We define P(i, j) to be true if i and j are either both even or both odd. Later we ll call this being congruent modulo 2 and we ll define being congruent modulo n in general. Any relation of the form x and y are the same in this respect will normally be reflexive, symmetric, and transitive, and thus be an equivalence relation.

Clicker Question #1 Let S be the set of the fifty United States. Which of these is not an equivalence relation? (a) A(x, y): state x and state y have the same number of representatives in the US House (b) B(x, y): state x and state y are equal (c) C(x, y): state x and state y are equal or share a land border (d) D(x, y): state x and state y have the same first letter in their names

Answer #1 Let S be the set of the fifty United States. Which of these is not an equivalence relation? (a) A(x, y): state x and state y have the same number of representatives in the US House (b) B(x, y): state x and state y are equal (c) C(x, y): state x and state y share a land border (d) D(x, y): state x and state y have the same first letter in their names

Graphs of Equivalence Relations What happens when we draw the diagram of an equivalence relation? Because it is reflexive, we have a loop on every vertex, but we can leave those out for clarity. The arrows are bidirectional because the relation is symmetric. The effect of transitivity on the diagram is a bit harder to see.

Complete Graphs If we have a set of points that have some connection from each point to each other point, transitivity forces us to have all possible direct connections among those points. A graph with all possible undirected edges is called a complete graph on its points. The graph of an equivalence relation has a complete graph for each connected component.

Partitions We ve claimed a characterization of the graph of any equivalence relation in terms of complete graphs. Let s now prove that this characterization is correct -- we will need a new definition. If A is any set, a partition of A is a set of subsets of A -- a set P = {S1, S2,..., Sk} where (1) each Si is a subset of A, (2) the union of all the Si s is A, and (3) the sets are pairwise disjoint -- i: j: (i j) (Si Sj = ).

Clicker Question #2 Which of these collections of sets is not a partition of the set S of fifty U.S. states? (a) {Xα: Xα is the set of all states whose names contain the letter α} (b) {{x}: x is a state} (c) {Xi: Xi is the set of all states with exactly i representatives in the US House} (d) {{x: x was a state in 1800}, {x: x became a state during 1801-1900}, {x: x became a state after 1900}}

Answer #2 Which of these collections of sets is not a partition of the set S of fifty U.S. states? (a) {Xα: Xα is the set of all states whose names contain the letter α} (b) {{x}: x is a state} (c) {Xi: Xi is the set of all states with exactly i representatives in the US House} (d) {{x: x was a state in 1800}, {x: x became a state during 1801-1900}, {x: x became a state after 1900}}

The Partition Theorem The Partition Theorem relates equivalence relations to partitions. It says that a relation is an equivalence relation if and only if it is the same-set relation of some partition. In symbols, the same-set relation of P is given by the predicate SS(x, y) defined to be true if i: (x Si) (y Si). So we need to get a partition from any equivalence relation, and an equivalence relation from any partition.

Same-Set is an E.R. Let P = {S1, S2,..., Sk} be a partition of A and let SS be its same set relation. We need to show that SS is an equivalence relation. We first show that SS is reflexive. Let x be an arbitrary element of A. Because the sets of P union to give A, x must be in at least one of them, Si. So (x Si) (x Sj) is true, and thus SS(x, x) is true for an arbitrary x.

Same-Set is an E.R. To show SS is symmetric, let x and y be arbitrary elements of A and assume that SS(x, y) is true. We need to prove SS(y, x). But we have (x Si) (y Si) from the definition, and we can rewrite this as (y Si) (x Si) and thus prove that SS(y, x) is true.

Same-Set is an E.R. For transitivity, we let x, y, and z be arbitrary and assume SS(x, y) and SS(y, z). From the definition we know that x and y are both in some Si and that y and z are both in some Sj. But since y is in both Si and Sj, and the sets are pairwise disjoint, the sets Si and Sj are the same, and this single set contains both x and z. So SS(x, z) is true, and we have proved that SS is transitive.

Equivalence Classes If R is an equivalence relation on A, and x is any element of A, we define the equivalence class of x, written [x], as the set {y: R(x, y)}, that is, the set of elements of A that are related to x by R. The universal relation U has a single equivalence class consisting of all the elements. The equality relation has a separate equivalence class for each element.

Equivalence Classes In the parity relation, the set of even numbers forms one equivalence class and the set of odd numbers forms another. If we let A be the set of people in the USA, and define R(x, y) to mean x and y are legal residents of the same state, we get fifty equivalence classes, one for each state. One of them is {x: x is a legal resident of Massachusetts}.

Clicker Question #3 Again let S be the set of fifty states and let D(x, y) be the relation state x and state y have the same first letter in their name. How many (non-empty) equivalence classes does S have? (a) one (b) 26 minus the number of letters that don t begin any state names (c) 26 (d) none of the above

Answer #3 Again let S be the set of fifty states and let D(x, y) be the relation state x and state y have the same first letter in their name. How many (non-empty) equivalence classes does S have? (a) one (b) 26 minus the number of letters that don t begin any state names ({B, E, J, Q, X, Y, Z}, so 19) (c) 26 (d) none of the above

The Classes Form a Partition To finish the proof of the Partition Theorem, we must prove that if R is any equivalence relation on A, the set of equivalence classes forms a partition. Note that in the set of classes, we only count a class once even if it has multiple definitions. So if [x] and [y] are the same set, it is just one set of the partition.

The Classes Form a Partition Recall our three conditions for a set of sets to be a partition. Condition (1) says that each set is a subset of A, which is clearly true for the classes. Condition (2) says that the sets union together to give A, which is true for the classes because each element is in at least one class, its own. We still have to show (3) for the classes, that they are pairwise disjoint.

Finishing the Proof Let [x] and [y] be the equivalence classes of two arbitrary elements x and y of A. (This gives us two arbitrary equivalence classes, which might or might not be equal as sets.) We must show that ([x] [y]) ([x] [y] = ). We ll do this by contrapositive, showing ( z: z [x] [y]) ([x] = [y]).

Finishing the Proof Assume that an element z of [x] [y] exists and name it z. We must show that [x] = [y], which means w: (w [x]) (w [y]). By the definition of equivalence classes, this means w: R(x, w) R(y, w). So let w be arbitrary.

Finishing the Proof We know that R(x, z) and R(y, z). Assume R(x, w). We have R(z, x) by symmetry, and then R(y, z), R(z, x), and R(x, w) give us R(y, w) by transitivity. The argument that R(y, w) R(x, w) is exactly the same as R(x, w) R(y, w). So if z exists, [x] and [y] contain exactly the same elements. We have completed our proof that the classes form a partition.