Chapter 9: Relations Relations

Size: px
Start display at page:

Download "Chapter 9: Relations Relations"

Transcription

1 Chapter 9: Relations Relations Definition 1 (Relation). Let A and B be sets. A binary relation from A to B is a subset R A B, i.e., R is a set of ordered pairs where the first element from each pair is from A and the second element is from B. If (a, b) R then we write a R b or a b (read a relates/is related to b [by R] ). If (a, b) / R, then we write a R b or a b. We can represent relations graphically or with a chart in addition to a set description. Example 1. A = {0, 1, 2}, B = {1, 2, 3}, R = {(1, 1), (2, 1), (2, 2)} Example 2. (a) Parent (b) x, y Z, x R y x 2 + y 2 = 8 (c) A = {0, 1, 2}, B = {1, 2, 3}, a R b a + b 3 (d) 1

2 Note: All functions are relations, but not all relations are functions. Definition 2. If A is a set, then a relation on A is a relation from A to A. Example 3. How many relations are there on a set with... (a) two elements? (b) n elements? (c) 14 elements? Properties of Relations Definition 3 (Reflexive). A relation R on a set A is said to be reflexive if and only if a R a for all a A. Definition 4 (Symmetric). A relation R on a set A is said to be symmetric if and only if for all a, b A. a R b = b R a Definition 5 (Anitsymmetric). A relation R on a set A is said to be antisymmetric if and only if for all a, b A. a R b and b R a = a = b 2

3 Definition 6 (Transitive). A relation R on a set A is said to be transitive if and only if for all a, b, c A. a R b and b R c = a R c Example 4. Determine whether the relation R on the set of all integers is reflexive, symmetric, antisymmetric, or transitive, where (a, b) R if and only if (a) a b (b) a b 2 Example 5. Determine whether the relation R on the set of all web pages is reflexive, symmetric, antisymmetric, or transitive, where (a, b) R if and only if (a) Everyone who has visited page a has also visited page b. (b) There are no common links found on both page a and page b 3

4 Combining Relations We can combine two relations R 1 and R 2 from A to B using the following operations (these all come from set operations that we ve discussed previously(: Intersection: R 1 R 2 = {(a, b) (a, b) R 1 and (a, b) R 2 } Union: R 1 R 2 = {(a, b) (a, b) R 1 or (a, b) R 2 } Difference: R 1 R 2 = {(a, b) (a, b) R 1 but (a, b) / R 2 } Symmetric Difference: R 1 R 2 = {(a, b) (a, b) R 1 or (a, b) R 2 but (a, b) / R 1 R 2 } Definition 7 (Composition). If R 1 is a relation from A to B and R 2 is a relation from B to C, then we define R 2 R 1 = {(a, c) a A, c C, and there exists b B such that (a, b) R 1 and (b, c) R 2 } Example 6. Let R 1 and R 2 be relations on Z where R 1 = {(a, b) a b} and R 2 = {(a, b) a is a multiple of b}. Find the following: (a) R 1 R 2 (b) R 1 R 2 (c) R 1 R 2 (d) R 2 R 1 (e) R 1 R 2 (f) R 1 R 2 (g) R 2 R 1 4

5 Definition 8. Let R be a relation on a set A. Then we define the powers of R as R 1 = R R n = R n 1 R = R } R {{ R }, for n > 1 n copies of R Example 7. A = {1, 2, 3, 4, 5}, R = {(1, 1), (1, 2), (1, 3), (2, 3), (2, 4), (3, 1), (3, 4), (3, 5)} Theorem 1. A relation R on a set A is transitive if and only if R n R for all n Z n-ary Relations Definition 9 (n-ary Relation). Let A 1, A 2,..., A n be sets. An n-ary relation on these sets is a subset R A 1 A 2 A n. The sets A 1, A 2,..., A n are called the domains of the relation and n is the degree Representing Relations In addition to charts, sets, and graphs we can represent relations using: 1. A zero-one matrix M R = [m ij ], where m ij = { 1 if (a i, b j ) R 0 if (a i, b j ) / R (This can be used for any relation from A to B.) 2. A digraph (or directed graph). Definition 10 (Digraph). A digraph consists of a set V of vertices or nodes together with a set E of ordered pairs of elements of V called edges or arcs. Given an edge (a, b), a is called the initial vertex of the edge and b is called the terminal vertex of the edge. An edge from a vertex to itself, (a, a), is call a loop. Example 8. a b c d 5

6 Example 9. Draw the divides relation on the set {2, 3, 4, 5, 6, 7, 8, 9} both as a digraph and as a 0-1 matrix. We can use digraphs and 0-1 matrices to identify whether or not a relation is reflexive, symmetric, antisymmetric, or transitive. Reflexive: Symmetric: Antisymmetric: Transitive: Theorem 2. Given relations R 1, R 2, and R on a set A with matrix representations M R1, M R2, and M R, respectively, then M R1 R 2 = M R1 M R2 M R1 R 2 = M R1 M R2 M R1 R 2 = M R2 M R1 M R n = M [n] R 6

7 Example 10. Let R 1 = {(1, 2), (2, 1), (2, 2), (3, 3)} and R 2 = {(1, 1), (1, 2), (1, 3), (3, 2)} be binary relations on the set A = {1, 2, 3}. Find M R1 and M R2 and then use them to find M R1 R 2, M R1 R 2, and M R1 R 2. Verify by computing R 1 R 2, R 1 R 2, and R 1 R 2 without matrices. Example 11. Let M R = , M S = , M P = Compute M R n, M S n, M P n, to determine if the relations R, S, and P are transitive. 7

8 9.4 - Closures of Relations Definition 11 (Reflexive Closure). Let R be a relation on a set A. The reflexive closure of R is the smallest relation containing R that is reflexive. We denote the reflexive closure by R where = {(a, a) a A}. Definition 12 (Symmetric Closure). Let R be a relation on a set A. The symmetric closure of R is the smallest relation containing R that is symmetric. We denote the reflexive closure by R R 1 where R 1 = {(b, a) (a, b) R}. Example 12. Let R = {(1, 1), (1, 2), (2, 4), (3, 1), (4, 2)} be a relation on the set A = {1, 2, 3, 4}. Find the reflexive closure and symmetric closure of R. Definition 13. A path from a to b in a digraph G is a sequence of edges (x 0, x 1 ), (x 1, x 2 ), (x 2, x 3 ),..., (x n 1, x n ) where n N, a = x 0, and b = x n. This path is denoted by x 0, x 1,..., x n and has length n. An empty set of edges is viewed as a path of length 0 from a to a. A path of length n 1 that begins and ends at the same vertex is called a circuit or cycle. Example 13. Let A = {a, b, c, d} and R = {(a, b), (b, a), (a, d), (d, b), (c, c), (c, b)}. Definition 14 (The Connectivity Relation). Let R be a relation on the set A. The connectivity relation R consists of all pairs (a, b) such that there is path of length at least 1 from a to b in R. Alternatively, R = i=1 R i 8

9 Example 14. Let R be the relation on the set of all people in the world that contains (a, b) iff a has met b. What is R n, where n Z +? What is R? Definition 15 (Transitive Closure). Let R be a relation on a set A. The transitive closure of R is the smallest relation containing R that is transitive. Theorem 3. The transitive closure of R is R. Example 15. R = {(1, 1), (1, 2), (2, 4), (3, 1), (4, 2)} It turns out that if A is a set with n elements and R is a relation on A, then any time there is a path of length 1 or more from a to b in R there there is a path of length n or less from a to b in R. This means that and R = M R = n i=1 n i=1 R i M [i] R (It turns out that this is still not the most efficient way of computing R.) Example 16. R = {(1, 1), (1, 2), (2, 4), (3, 1), (4, 2)} 9

10 Warshall s Algorithm Definition 16 (Interior Vertex). An interior vertex is any vertex in a path that is not the initial vertex or terminal vertex. (The initial or terminal vertex could be an interior vertex as long as the path visits it again without starting or ending there.) [ Theorem 4 (Warshall s Algorithm). W k = w (k) ij ], where w (k) ij = 1 if and only if there is a path from v i to v j such that all interior vertices are in the set {v 1,..., v k }. (Note: the first and last vertices in the path can be outside, length 1 paths always count since there are no interior vertices (vacuously true), and the path doesn t have to visit all of the vertices v 1,..., v k.) Example 17. R = {(1, 1), (1, 2), (2, 4), (3, 1), (4, 2)}

11 9.5 - Equivalence Relations Definition 17 (Equivalence Relation). A relation R on a set A is called an equivalence relation if and only if R is reflexive, symmetric, and transitive. If two elements a and b are related by an equivalence relation, then we write a b. 1 All elements that are related to an element a A form the equivalence class of a, denoted by [a] R (or simply [a] if there is only one relation under consideration): [a] R = {b (b, a) R} a is called a representative of the equivalence class [a] R. Theorem 5. Given an equivalence relation R on a set A and given two elements a, b A, the following are equivalent: 1. a b 2. [a] R = [b] R 3. [a] R [b] R = Example 18. (a) a b if and only if a and b have the same gender. (b) a b if and only if a and b have the same first name. 1 As was mentioned earlier in the notes, some books use the notation to denote any relation, but in this book it is only used if element are related under an equivalence relation. 11

12 (c) a b if and only if a b (mod 5). (d) [4] 5 (e) a b if and only if a and b say the same thing. (f) Definition 18 (Partition). A partition of a set S is a collection Π = {A 1, A 2,..., A m } of nonempty, pairwise disjoint subsets of S such that every element of S is in one of the subsets A i. We say that Π partitions S (or Π is a partition of S ). Theorem 6. Let R be an equivalence relation on a set S. Then the equivalence classes of R form a partition of S. Conversely, any partition Π of S defines an equivalence relation on S whose equivalence classes are the sets in Π. Equivalence relations give us a way to identify some notion of sameness (same name, same remainder, same set of a partition, etc.). 12

Math.3336: Discrete Mathematics. Chapter 9 Relations

Math.3336: Discrete Mathematics. Chapter 9 Relations Math.3336: Discrete Mathematics Chapter 9 Relations Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018

More information

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

Section Summary. Relations and Functions Properties of Relations. Combining Relations Chapter 9 Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations Closures of Relations (not currently included

More information

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

Definition: A binary relation R from a set A to a set B is a subset R A B. Example: Chapter 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 B = {a,b} {(0, a), (0, b), (1,a), (2, b)} is a relation from A to B.

More information

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

Notes. Relations. Introduction. Notes. Relations. Notes. Definition. Example. Slides by Christopher M. Bourke Instructor: Berthe Y. Relations Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 7.1, 7.3 7.5 of Rosen cse235@cse.unl.edu

More information

Relations Graphical View

Relations Graphical View Introduction Relations Computer Science & Engineering 235: Discrete Mathematics Christopher M. Bourke cbourke@cse.unl.edu Recall that a relation between elements of two sets is a subset of their Cartesian

More information

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.

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. 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. Note: there are no constraints on relations as there are on functions. We have a common

More information

and e 2 ~ e 2 iff e 1

and e 2 ~ e 2 iff e 1 Section 4. Equivalence Relations A binary relation is an equivalence relation if it has the three properties reflexive, symmetric, and transitive (RST). Examples. a. Equality on any set. b. x ~ y iff x

More information

Reading 11 : Relations and Functions

Reading 11 : Relations and Functions CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Reading 11 : Relations and Functions Instructor: Beck Hasti and Gautam Prakriya In reading 3, we described a correspondence between predicates

More information

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

Relations. Relations of Sets N-ary Relations Relational Databases Binary Relation Properties Equivalence Relations. Reading (Epp s textbook) Relations Relations of Sets N-ary Relations Relational Databases Binary Relation Properties Equivalence Relations Reading (Epp s textbook) 8.-8.3. Cartesian Products The symbol (a, b) denotes the ordered

More information

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion

CHAPTER 1. Relations. 1. Relations and Their Properties. Discussion CHAPTER 1 Relations 1. Relations and Their Properties 1.1. Definition of a Relation. Definition 1.1.1. A binary relation from a set A to a set B is a subset R A B. If (a, b) R we say a is Related to b

More information

1.4 Equivalence Relations and Partitions

1.4 Equivalence Relations and Partitions 24 CHAPTER 1. REVIEW 1.4 Equivalence Relations and Partitions 1.4.1 Equivalence Relations Definition 1.4.1 (Relation) A binary relation or a relation on a set S is a set R of ordered pairs. This is a very

More information

COMP 182 Algorithmic Thinking. Relations. Luay Nakhleh Computer Science Rice University

COMP 182 Algorithmic Thinking. Relations. Luay Nakhleh Computer Science Rice University COMP 182 Algorithmic Thinking Relations Luay Nakhleh Computer Science Rice University Chapter 9, Section 1-6 Reading Material When we defined the Sorting Problem, we stated that to sort the list, the elements

More information

Week 4-5: Binary Relations

Week 4-5: Binary Relations 1 Binary Relations Week 4-5: Binary Relations The concept of relation is common in daily life and seems intuitively clear. For instance, let X be the set of all living human females and Y the set of all

More information

5. Partitions and Relations Ch.22 of PJE.

5. Partitions and Relations Ch.22 of PJE. 5. Partitions and Relations Ch. of PJE. We now generalize the ideas of congruence classes of Z to classes of any set X. The properties of congruence classes that we start with here are that they are disjoint

More information

Week 4-5: Binary Relations

Week 4-5: Binary Relations 1 Binary Relations Week 4-5: Binary Relations The concept of relation is common in daily life and seems intuitively clear. For instance, let X be the set of all living human females and Y the set of all

More information

Automata and Languages

Automata and Languages Automata and Languages Prof. Mohamed Hamada Software Engineering Lab. The University of Aizu Japan Mathematical Background Mathematical Background Sets Relations Functions Graphs Proof techniques Sets

More information

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c.

a + b = b + a and a b = b a. (a + b) + c = a + (b + c) and (a b) c = a (b c). a (b + c) = a b + a c and (a + b) c = a c + b c. Properties of the Integers The set of all integers is the set and the subset of Z given by Z = {, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, }, N = {0, 1, 2, 3, 4, }, is the set of nonnegative integers (also called

More information

Properties of the Integers

Properties of the Integers Properties of the Integers The set of all integers is the set and the subset of Z given by Z = {, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, }, N = {0, 1, 2, 3, 4, }, is the set of nonnegative integers (also called

More information

Relations --- Binary Relations. Debdeep Mukhopadhyay IIT Madras

Relations --- Binary Relations. Debdeep Mukhopadhyay IIT Madras Relations --- Binary Relations Debdeep Mukhopadhyay IIT Madras What is a relation? The mathematical concept of relation is based on the common notion of relationships among objects: One box is heavier

More information

CSC Discrete Math I, Spring Relations

CSC Discrete Math I, Spring Relations CSC 125 - Discrete Math I, Spring 2017 Relations Binary Relations Definition: A binary relation R from a set A to a set B is a subset of A B Note that a relation is more general than a function Example:

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 1 Course Web Page www3.cs.stonybrook.edu/ cse303 The webpage contains: lectures notes slides; very detailed solutions to

More information

Equivalence relations

Equivalence relations Equivalence relations R A A is an equivalence relation if R is 1. reflexive (a, a) R 2. symmetric, and (a, b) R (b, a) R 3. transitive. (a, b), (b, c) R (a, c) R Example: Let S be a relation on people

More information

Section 8.4 Closures of Relations

Section 8.4 Closures of Relations Section 8.4 Closures of Relations Definition: The closure of a relation R with respect to property P is the relation obtained by adding the minimum number of ordered pairs to R to obtain property P. In

More information

Relations. We have seen several types of abstract, mathematical objects, including propositions, predicates, sets, and ordered pairs and tuples.

Relations. We have seen several types of abstract, mathematical objects, including propositions, predicates, sets, and ordered pairs and tuples. Relations We have seen several types of abstract, mathematical objects, including propositions, predicates, sets, and ordered pairs and tuples. Relations use ordered tuples to represent relationships among

More information

Relationships between elements of sets occur in many contexts. Every day we deal with

Relationships between elements of sets occur in many contexts. Every day we deal with C H A P T E R 9 Relations 9.1 Relations and Their Properties 9.2 n-ary Relations and Their Applications 9.3 Representing Relations 9.4 Closures of Relations 9.5 Equivalence Relations 9.6 Partial Orderings

More information

What are relations? f: A B

What are relations? f: A B What are relations? Ch 9.1 What are relations? Notation Informally, a relation is a set of pairs of objects (or in general, set of n-tuples) that are related to each other by some rule. We will focus first

More information

Discrete Mathematics. 2. Relations

Discrete Mathematics. 2. Relations Discrete Mathematics 2. Relations Binary Relations Let A, B be any two sets. A binary relation R from A to B is a subset of A B. E.g., Let < : N N : {(n,m) n < m} The notation a R b or arb means (a,b)îr.

More information

Math 42, Discrete Mathematics

Math 42, Discrete Mathematics c Fall 2018 last updated 12/05/2018 at 15:47:21 For use by students in this class only; all rights reserved. Note: some prose & some tables are taken directly from Kenneth R. Rosen, and Its Applications,

More information

Nonnegative Matrices I

Nonnegative Matrices I Nonnegative Matrices I Daisuke Oyama Topics in Economic Theory September 26, 2017 References J. L. Stuart, Digraphs and Matrices, in Handbook of Linear Algebra, Chapter 29, 2006. R. A. Brualdi and H. J.

More information

Equivalence, Order, and Inductive Proof

Equivalence, Order, and Inductive Proof 2/ chapter 4 Equivalence, Order, and Inductive Proof Good order is the foundation of all things. Edmund Burke (729 797) Classifying things and ordering things are activities in which we all engage from

More information

Discrete Mathematics. Chapter 4. Relations and Digraphs Sanguk Noh

Discrete Mathematics. Chapter 4. Relations and Digraphs Sanguk Noh Discrete Mathematics Chapter 4. Relations and Digraphs Sanguk Noh Table Product sets and partitions Relations and digraphs Paths in relations and digraphs Properties of relations Equivalence relations

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 3 CHAPTER 1 SETS, RELATIONS, and LANGUAGES 6. Closures and Algorithms 7. Alphabets and Languages 8. Finite Representation

More information

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.

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. 20 [161016-1020 ] 3.3 Binary relations In mathematics, as in everyday situations, we often speak about a relationship between objects, which means an idea of two objects being related or associated one

More information

Math 42, Discrete Mathematics

Math 42, Discrete Mathematics c Fall 2018 last updated 12/10/2018 at 18:16:18 For use by students in this class only; all rights reserved. Note: some prose & some tables are taken directly from Kenneth R. Rosen, and Its Applications,

More information

Lecture 8: Equivalence Relations

Lecture 8: Equivalence Relations Lecture 8: Equivalence Relations 1 Equivalence Relations Next interesting relation we will study is equivalence relation. Definition 1.1 (Equivalence Relation). Let A be a set and let be a relation on

More information

Rela%ons and Their Proper%es. Slides by A. Bloomfield

Rela%ons and Their Proper%es. Slides by A. Bloomfield Rela%ons and Their Proper%es Slides by A. Bloomfield What is a rela%on Let A and B be sets. A binary rela%on R is a subset of A B Example Let A be the students in a the CS major A = {Alice, Bob, Claire,

More information

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

CMPSCI 250: Introduction to Computation. Lecture #11: Equivalence Relations David Mix Barrington 27 September 2013 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

More information

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).

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). 1.3. VERTEX DEGREES 11 1.3 Vertex Degrees Vertex Degree for Undirected Graphs: Let G be an undirected graph and x V (G). The degree d G (x) of x in G: the number of edges incident with x, each loop counting

More information

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

Outline Inverse of a Relation Properties of Relations. Relations. Alice E. Fischer. April, 2018 Relations Alice E. Fischer April, 2018 1 Inverse of a Relation 2 Properties of Relations The Inverse of a Relation Let R be a relation from A to B. Define the inverse relation, R 1 from B to A as follows.

More information

Worksheet on Relations

Worksheet on Relations Worksheet on Relations Recall the properties that relations can have: Definition. Let R be a relation on the set A. R is reflexive if for all a A we have ara. R is irreflexive or antireflexive if for all

More information

14 Equivalence Relations

14 Equivalence Relations 14 Equivalence Relations Tom Lewis Fall Term 2010 Tom Lewis () 14 Equivalence Relations Fall Term 2010 1 / 10 Outline 1 The definition 2 Congruence modulo n 3 Has-the-same-size-as 4 Equivalence classes

More information

2. Transience and Recurrence

2. Transience and Recurrence Virtual Laboratories > 15. Markov Chains > 1 2 3 4 5 6 7 8 9 10 11 12 2. Transience and Recurrence The study of Markov chains, particularly the limiting behavior, depends critically on the random times

More information

Relations, Functions, and Sequences

Relations, Functions, and Sequences MCS-236: Graph Theory Handout #A3 San Skulrattanakulchai Gustavus Adolphus College Sep 13, 2010 Relations, Functions, and Sequences Relations An ordered pair can be constructed from any two mathematical

More information

Notes for Science and Engineering Foundation Discrete Mathematics

Notes for Science and Engineering Foundation Discrete Mathematics Notes for Science and Engineering Foundation Discrete Mathematics by Robin Whitty BSc PhD CMath FIMA 2009/2010 Contents 1 Introduction 1 1.1 The Laws of Arithmetic....................... 2 2 Polynomial

More information

Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr.

Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr. Massachusetts Institute of Technology 6.042J/18.062J, Fall 02: Mathematics for Computer Science Professor Albert Meyer and Dr. Radhika Nagpal Quiz 1 Appendix Appendix Contents 1 Induction 2 2 Relations

More information

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms

REVIEW QUESTIONS. Chapter 1: Foundations: Sets, Logic, and Algorithms REVIEW QUESTIONS Chapter 1: Foundations: Sets, Logic, and Algorithms 1. Why can t a Venn diagram be used to prove a statement about sets? 2. Suppose S is a set with n elements. Explain why the power set

More information

Practice Exam 1 CIS/CSE 607, Spring 2009

Practice Exam 1 CIS/CSE 607, Spring 2009 Practice Exam 1 CIS/CSE 607, Spring 2009 Problem 1) Let R be a reflexive binary relation on a set A. Prove that R is transitive if, and only if, R = R R. Problem 2) Give an example of a transitive binary

More information

CHAPTER 1 SETS AND EVENTS

CHAPTER 1 SETS AND EVENTS CHPTER 1 SETS ND EVENTS 1.1 Universal Set and Subsets DEFINITION: set is a well-defined collection of distinct elements in the universal set. This is denoted by capital latin letters, B, C, If an element

More information

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS. 4 Functions Before studying functions we will first quickly define a more general idea, namely the notion of a relation. A function turns out to be a special type of relation. Definition: Let S and T be

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Today's learning goals Determine whether a relation is an equivalence relation by determining whether it is Reflexive Symmetric

More information

CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms

CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms Professor Henry Carter Fall 2016 Recap Space-time tradeoffs allow for faster algorithms at the cost of space complexity overhead Dynamic

More information

Lecture 7: Relations

Lecture 7: Relations Lecture 7: Relations 1 Relation Relation between two objects signify some connection between them. For example, relation of one person being biological parent of another. If we take any two people at random,

More information

Preliminaries and Complexity Theory

Preliminaries and Complexity Theory Preliminaries and Complexity Theory Oleksandr Romanko CAS 746 - Advanced Topics in Combinatorial Optimization McMaster University, January 16, 2006 Introduction Book structure: 2 Part I Linear Algebra

More information

Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries

Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries Harvard CS121 and CSCI E-121 Lecture 2: Mathematical Preliminaries Harry Lewis September 5, 2013 Reading: Sipser, Chapter 0 Sets Sets are defined by their members A = B means that for every x, x A iff

More information

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

Definition: A binary relation R from a set A to a set B is a subset R A B. Example: Section 9.1 Rela%onships Relationships between elements of sets occur in many contexts. Every day we deal with relationships such as those between a business and its telephone number, an employee and his

More information

Chapter 2 - Relations

Chapter 2 - Relations Chapter 2 - Relations Chapter 2: Relations We could use up two Eternities in learning all that is to be learned about our own world and the thousands of nations that have arisen and flourished and vanished

More information

Week 4-5: Generating Permutations and Combinations

Week 4-5: Generating Permutations and Combinations Week 4-5: Generating Permutations and Combinations February 27, 2017 1 Generating Permutations We have learned that there are n! permutations of {1, 2,...,n}. It is important in many instances to generate

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Determine whether a relation is an equivalence relation by determining whether it is Reflexive Symmetric

More information

Today. Binary relations establish a relationship between elements of two sets

Today. Binary relations establish a relationship between elements of two sets Today Relations Binary relations and properties Relationship to functions n-ary relations Definitions Binary relations establish a relationship between elements of two sets Definition: Let A and B be two

More information

Relations and Equivalence Relations

Relations and Equivalence Relations Relations and Equivalence Relations In this section, we shall introduce a formal definition for the notion of a relation on a set. This is something we often take for granted in elementary algebra courses,

More information

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM

MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM MATH 61-02: PRACTICE PROBLEMS FOR FINAL EXAM (FP1) The exclusive or operation, denoted by and sometimes known as XOR, is defined so that P Q is true iff P is true or Q is true, but not both. Prove (through

More information

Problems for Putnam Training

Problems for Putnam Training Problems for Putnam Training 1 Number theory Problem 1.1. Prove that for each positive integer n, the number is not prime. 10 1010n + 10 10n + 10 n 1 Problem 1.2. Show that for any positive integer n,

More information

1. (B) The union of sets A and B is the set whose elements belong to at least one of A

1. (B) The union of sets A and B is the set whose elements belong to at least one of A 1. (B) The union of sets A and B is the set whose elements belong to at least one of A or B. Thus, A B = { 2, 1, 0, 1, 2, 5}. 2. (A) The intersection of sets A and B is the set whose elements belong to

More information

GROUPS AS GRAPHS. W. B. Vasantha Kandasamy Florentin Smarandache

GROUPS AS GRAPHS. W. B. Vasantha Kandasamy Florentin Smarandache GROUPS AS GRAPHS W. B. Vasantha Kandasamy Florentin Smarandache 009 GROUPS AS GRAPHS W. B. Vasantha Kandasamy e-mail: vasanthakandasamy@gmail.com web: http://mat.iitm.ac.in/~wbv www.vasantha.in Florentin

More information

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

Relations. Relations. Definition. Let A and B be sets. Relations Relations. Definition. Let A and B be sets. A relation R from A to B is a subset R A B. If a A and b B, we write a R b if (a, b) R, and a /R b if (a, b) / R. A relation from A to A is called

More information

Packing of Rigid Spanning Subgraphs and Spanning Trees

Packing of Rigid Spanning Subgraphs and Spanning Trees Packing of Rigid Spanning Subgraphs and Spanning Trees Joseph Cheriyan Olivier Durand de Gevigney Zoltán Szigeti December 14, 2011 Abstract We prove that every 6k + 2l, 2k-connected simple graph contains

More information

0 Sets and Induction. Sets

0 Sets and Induction. Sets 0 Sets and Induction Sets 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 A to denote that a is an element of the set

More information

1 Predicates and Quantifiers

1 Predicates and Quantifiers 1 Predicates and Quantifiers We have seen how to represent properties of objects. For example, B(x) may represent that x is a student at Bryn Mawr College. Here B stands for is a student at Bryn Mawr College

More information

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

BOOLEAN ALGEBRA INTRODUCTION SUBSETS BOOLEAN ALGEBRA M. Ragheb 1/294/2018 INTRODUCTION Modern algebra is centered around the concept of an algebraic system: A, consisting of a set of elements: ai, i=1, 2,, which are combined by a set of operations

More information

Sets and Motivation for Boolean algebra

Sets and Motivation for Boolean algebra SET THEORY Basic concepts Notations Subset Algebra of sets The power set Ordered pairs and Cartesian product Relations on sets Types of relations and their properties Relational matrix and the graph of

More information

Combinatorial optimization problems

Combinatorial optimization problems Combinatorial optimization problems Heuristic Algorithms Giovanni Righini University of Milan Department of Computer Science (Crema) Optimization In general an optimization problem can be formulated as:

More information

Selected Solutions to Even Problems, Part 3

Selected Solutions to Even Problems, Part 3 Selected Solutions to Even Problems, Part 3 March 14, 005 Page 77 6. If one selects 101 integers from among {1,,..., 00}, then at least two of these numbers must be consecutive, and therefore coprime (which

More information

Reading: Chapter 9.3. Carnegie Mellon

Reading: Chapter 9.3. Carnegie Mellon I II Lecture 3 Foundation of Data Flow Analysis Semi-lattice (set of values, meet operator) Transfer functions III Correctness, precision and convergence IV Meaning of Data Flow Solution Reading: Chapter

More information

Generating Permutations and Combinations

Generating Permutations and Combinations Generating Permutations and Combinations March 0, 005 Generating Permutations We have learned that there are n! permutations of {,,, n} It is important in many instances to generate a list of such permutations

More information

Ring Sums, Bridges and Fundamental Sets

Ring Sums, Bridges and Fundamental Sets 1 Ring Sums Definition 1 Given two graphs G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) we define the ring sum G 1 G 2 = (V 1 V 2, (E 1 E 2 ) (E 1 E 2 )) with isolated points dropped. So an edge is in G 1 G

More information

The Pigeonhole Principle

The Pigeonhole Principle The Pigeonhole Principle 2 2.1 The Pigeonhole Principle The pigeonhole principle is one of the most used tools in combinatorics, and one of the simplest ones. It is applied frequently in graph theory,

More information

0 Logical Background. 0.1 Sets

0 Logical Background. 0.1 Sets 0 Logical Background 0.1 Sets In this course we will use the term set to simply mean a collection of things which have a common property such as the totality of positive integers or the collection of points

More information

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

MATH 101: ALGEBRA I WORKSHEET, DAY #1. We review the prerequisites for the course in set theory and beginning a first pass on group. 1.

MATH 101: ALGEBRA I WORKSHEET, DAY #1. We review the prerequisites for the course in set theory and beginning a first pass on group. 1. MATH 101: ALGEBRA I WORKSHEET, DAY #1 We review the prerequisites for the course in set theory and beginning a first pass on group theory. Fill in the blanks as we go along. 1. Sets A set is a collection

More information

Relations. Definition 1 Let A and B be sets. A binary relation R from A to B is any subset of A B.

Relations. Definition 1 Let A and B be sets. A binary relation R from A to B is any subset of A B. Chapter 5 Relations Definition 1 Let A and B be sets. A binary relation R from A to B is any subset of A B. If A = B then a relation from A to B is called is called a relation on A. Examples A relation

More information

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} Preliminaries Graphs G = (V, E), V : set of vertices E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) 1 2 3 5 4 V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)} 1 Directed Graph (Digraph)

More information

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

Homework 1 2/7/2018 SOLUTIONS Exercise 1. (a) Graph the following sets (i) C = {x R x in Z} Answer: Homework 1 2/7/2018 SOLTIONS Eercise 1. (a) Graph the following sets (i) C = { R in Z} nswer: 0 R (ii) D = {(, y), y in R,, y 2}. nswer: = 2 y y = 2 (iii) C C nswer: y 1 2 (iv) (C C) D nswer: = 2 y y =

More information

Discrete Mathematics. Benny George K. September 22, 2011

Discrete Mathematics. Benny George K. September 22, 2011 Discrete Mathematics Benny George K Department of Computer Science and Engineering Indian Institute of Technology Guwahati ben@iitg.ernet.in September 22, 2011 Set Theory Elementary Concepts Let A and

More information

DRAFT CONCEPTUAL SOLUTION REPORT DRAFT

DRAFT CONCEPTUAL SOLUTION REPORT DRAFT BASIC STRUCTURAL MODELING PROJECT Joseph J. Simpson Mary J. Simpson 08-12-2013 DRAFT CONCEPTUAL SOLUTION REPORT DRAFT Version 0.11 Page 1 of 18 Table of Contents Introduction Conceptual Solution Context

More information

Discrete Structures (2IT50)

Discrete Structures (2IT50) Discrete Structures (2IT50) Rob Hoogerwoord & Hans Zantema August, 2016 1 2 Contents 0.1 Introduction................................. 5 0.2 Basic set theory............................... 5 0.3 The principle

More information

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

MATH 13 SAMPLE FINAL EXAM SOLUTIONS MATH 13 SAMPLE FINAL EXAM SOLUTIONS WINTER 2014 Problem 1 (15 points). For each statement below, circle T or F according to whether the statement is true or false. You do NOT need to justify your answers.

More information

Sets. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing Spring, Outline Sets An Algebra on Sets Summary

Sets. Alice E. Fischer. CSCI 1166 Discrete Mathematics for Computing Spring, Outline Sets An Algebra on Sets Summary An Algebra on Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing Spring, 2018 Alice E. Fischer... 1/37 An Algebra on 1 Definitions and Notation Venn Diagrams 2 An Algebra on 3 Alice E. Fischer...

More information

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

Independencies. Undirected Graphical Models 2: Independencies. Independencies (Markov networks) Independencies (Bayesian Networks) (Bayesian Networks) Undirected Graphical Models 2: Use d-separation to read off independencies in a Bayesian network Takes a bit of effort! 1 2 (Markov networks) Use separation to determine independencies

More information

Relations. Carl Pollard. October 11, Department of Linguistics Ohio State University

Relations. Carl Pollard. October 11, Department of Linguistics Ohio State University Department of Linguistics Ohio State University October 11, 2011 (Intuitive Idea) Intuitively, a relation is the kind of thing that either holds or doesn t hold between certain things. Examples: Being

More information

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS

Discrete Structures: Sample Questions, Exam 2, SOLUTIONS Discrete Structures: Sample Questions, Exam 2, SOLUTIONS (This is longer than the actual test.) 1. Show that any postage of 8 cents or more can be achieved by using only -cent and 5-cent stamps. We proceed

More information

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

Coloring Vertices and Edges of a Path by Nonempty Subsets of a Set Coloring Vertices and Edges of a Path by Nonempty Subsets of a Set P.N. Balister E. Győri R.H. Schelp April 28, 28 Abstract A graph G is strongly set colorable if V (G) E(G) can be assigned distinct nonempty

More information

1 Chapter 1: SETS. 1.1 Describing a set

1 Chapter 1: SETS. 1.1 Describing a set 1 Chapter 1: SETS set is a collection of objects The objects of the set are called elements or members Use capital letters :, B, C, S, X, Y to denote the sets Use lower case letters to denote the elements:

More information

TOPOLOGICAL ASPECTS OF YAO S ROUGH SET

TOPOLOGICAL ASPECTS OF YAO S ROUGH SET Chapter 5 TOPOLOGICAL ASPECTS OF YAO S ROUGH SET In this chapter, we introduce the concept of transmissing right neighborhood via transmissing expression of a relation R on domain U, and then we study

More information

2.31 Definition By an open cover of a set E in a metric space X we mean a collection {G α } of open subsets of X such that E α G α.

2.31 Definition By an open cover of a set E in a metric space X we mean a collection {G α } of open subsets of X such that E α G α. Chapter 2. Basic Topology. 2.3 Compact Sets. 2.31 Definition By an open cover of a set E in a metric space X we mean a collection {G α } of open subsets of X such that E α G α. 2.32 Definition A subset

More information

SF2729 GROUPS AND RINGS LECTURE NOTES

SF2729 GROUPS AND RINGS LECTURE NOTES SF2729 GROUPS AND RINGS LECTURE NOTES 2011-03-01 MATS BOIJ 6. THE SIXTH LECTURE - GROUP ACTIONS In the sixth lecture we study what happens when groups acts on sets. 1 Recall that we have already when looking

More information

HOMEWORK #2 - MATH 3260

HOMEWORK #2 - MATH 3260 HOMEWORK # - MATH 36 ASSIGNED: JANUARAY 3, 3 DUE: FEBRUARY 1, AT :3PM 1) a) Give by listing the sequence of vertices 4 Hamiltonian cycles in K 9 no two of which have an edge in common. Solution: Here is

More information

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations Page 1 Definitions Tuesday, May 8, 2018 12:23 AM Notations " " means "equals, by definition" the set of all real numbers the set of integers Denote a function from a set to a set by Denote the image of

More information

The integers. Chapter 3

The integers. Chapter 3 Chapter 3 The integers Recall that an abelian group is a set A with a special element 0, and operation + such that x +0=x x + y = y + x x +y + z) =x + y)+z every element x has an inverse x + y =0 We also

More information

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland

Discrete Mathematics. W. Ethan Duckworth. Fall 2017, Loyola University Maryland Discrete Mathematics W. Ethan Duckworth Fall 2017, Loyola University Maryland Contents 1 Introduction 4 1.1 Statements......................................... 4 1.2 Constructing Direct Proofs................................

More information

Equational Logic. Chapter Syntax Terms and Term Algebras

Equational Logic. Chapter Syntax Terms and Term Algebras Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from

More information