1 / 31

EE1J2 – Discrete Maths Lecture 8

EE1J2 – Discrete Maths Lecture 8. Equivalence relations on sets Function between sets Types of function. Relations. Suppose A = { 0,1,2,3 }. An example of a relation on A is ‘<’ This relation is defined by the set R = { 0 < 1 , 0 < 2 , 0 < 3 , 1 < 2 , 1 < 3 , 2 < 3 }

akiva
Télécharger la présentation

EE1J2 – Discrete Maths Lecture 8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EE1J2 – Discrete Maths Lecture 8 • Equivalence relations on sets • Function between sets • Types of function

  2. Relations • Suppose A = {0,1,2,3}. • An example of a relation on A is ‘<’ • This relation is defined by the set R = {0<1, 0<2, 0<3, 1<2, 1<3, 2<3} or, equivalently R = {(0,1), (0,2), (0,3), (1,2), (1,3), (2,3)} AA • So, a relation on Ais a subset of RA  A

  3. Equivalence relations • A relation ~ is an equivalence relation on a set S if and only if: • a ~ a for every aS (~ reflexive) • If a~b then b~aa,b S (~ symmetric) • If a~b and b~c then a~c (~ transitive) a,b,c S • If ~ is an equivalence relation and a~b, then we can say that a is equivalent to b

  4. Examples • S is the set of all people in the UK • R1: x,y  S, x~y if and only if x and y are the same age. This is an equivalence relation on S • R2: x,y  S, x~y if and only if x and y own a copy of the same book. This is not an equivalence relation. Why? • R3: x,y  S, x~y if and only if x and y both own a copy of ‘War and Peace’. This is an equivalence relation on S

  5. Partitions • Suppose A is a set. A partitionP of A is a set of subsets of A,P = {P1,…,PN} such that: • PnPm= if nm • P1P2…PN = A

  6. P3 P3 P1 P1 P2 P2 P3 P1 P2 Partitions - example {P1,P2,P3} is a partition of S S {P1,P2,P3} not a partition – P2  P3   {P1,P2,P3} is not a partition – P1 P2  P3  S

  7. Partitions & Equivalence Relations (1) • Let ~ be an equivalence relation on A • For aA, let Pabe the set of elements of A which are equivalent to a • I.e. Pa= {bA: b~a} • P = {Pa:aA} is a partition of A

  8. Partitions & Equivalence Relations (2) • Let P={P} be a partition of A • Define an equivalence relation ~ on A by a~b if and only if both a and b belong to Pfor some  • ~ is an equivalence relation on A

  9. Partitions & Equivalence Relations (3) • So, for a set A there is a one-to-one correspondence between: • Equivalence relations on A • Partitions of A

  10. Relations - More Terminology • Let A be a set, R a relation on A • The domain of R, dom(A), is the set: dom(A)={a: b((a,b)R)} • The range of R, range(A), is the set: range(A)={b: a((a,b)R)} • If R is a relation on A then the inverse relation R-1 is given by R-1={(b,a): (a,b)R}

  11. Example • Let S be the set of all people in the world • Define a relation R on S by: • If x,yS, then (x,y) R if and only if x and y are siblings • The domain of R is the set of all people who have brothers or sisters • The range of R is the same as its domain

  12. Example 2 • Let S be the set of all people in the world • Define a relation R on S by: • If x,yS, then (x,y) R if and only if x is y’s younger sibling • The domain of R is the set of all people who have an older brother or sister • The range of R is the set of all people who have a younger brother or sister

  13. Example 3 • S = {1,4,7,9} • Define a relation R on S by: • If x,y  S, then (x,y) R if and only if x < y • The domain of R is {1,4,7} • The range of R is {4,7,9} • Is R an equivalence relation?

  14. Functions • You probably have pre-conceived ideas of what a function is – f(x)=x2+2x+2, f(x)=sin(x), f(x)=exp(x),… • These are all functions which associate a member x of ℝ unambiguously with another member f(x) of ℝ • They can all be written in set-theoretic notation as f = {(x,f(x)):x  ℝ}

  15. Function – more examples • Some functions require more care. • f(x)=log(x) only defined for x > 0 • f = {(x, f(x)): x  ℝ,x>0 }

  16. Examples continued • f(x)=1/x • Not defined when x = 1 • f = {(x, f(x)): x  ℝ,x  0}

  17. Functions • Also, x and f(x) need not be members of the same set. For example consider the function (positive square root) • If x>0, then f is a real-valued function • Otherwise f is a complex-valued function

  18. Functions • A functionf from a set Ato a set Bis a subset of P(AB) such that if (a1,b1)f and (a2,b2)f then a1a2 • This ensures that f is well-defined. As before • dom(f)={a: b((a,b)f)} • range(A)={b: a((a,b)R)} • If adom(f), then there is a uniquebrange(f) such that (a,b)f • In this case we normally write f(a)=b

  19. Functions • If f is a function from A to B and A=dom(f) then we write: f : A  B

  20. Functions • In formal mathematics it is important to take care with this notation –in particular to be sure about the domain and range in the definition of a function: • f:ℝℝ, is not well-defined • f:[0,) ℝ, (positive root) is a well-defined function • f:ℝ ℂ , is a well-defined function, and is different from either of the previous functions

  21. Special Types of Function • Let f:AB be a function • f is called a surjection (or f is onto) if b(bB)a((aA)(f(a)=b)) • f is called an injection (or f is 1-1 “one-to-one”) if (f(a1)=b)(f(a2)=b)a1=a2 • f is a bijection if and only if f is 1-1 and onto (f is a surjection and an injection)

  22. A B A B f onto but not 1-1 f not 1-1 or onto f 1-1 but not onto f 1-1 and onto - bijection Special Types of Function

  23. f 1-1 and onto - bijection Isomorphism • If f:AB is a bijection, then A and B are basically the same set • Mathematicians say that A and B are isomorphic

  24. Examples • Let A = {0,1,2,3} and B = {a,b,c,d} • The function f :AB defined by {(0,a),(1,b),(2,c),(3,d)} is a bijection • The sets A and B are isomorphic. • B is just a ‘re-labelled’ version of A

  25. More examples • Well defined? Injection? Surjection? Bijection? • f : ℝ ℝ, f(x) = cos(x) • f : ℝ [-1,1], f(x) = sin(x) • f : [-,]  [-1,1], f(x) = sin(x) • f : ℝ ℝ, f(x) = log(x) • f : ℝ ℝ, f(x) = 1/x if x  0, f(0) = 0. • f : ℕ ℤ, f(n) = n/2 if n is even, f(n)=-(n+1)/2 if n is odd

  26. A B X f(X) The Image of a Subset • A and B sets, f:A  B be a function. • Suppose X  A (X is a subset of A) • Then f(X) is the subset of B defined by f(X)={b:f(x)=b for some xX}, called the image of X under f f

  27. The Inverse-Image of a Subset • A and B sets, f:A  B a function. • Suppose Y  B (Y is a subset of B) • Then f -1(Y) is the subset of A defined by f -1(Y)={a:f(a)=y for some yY} Called the inverse-image of Y under f A B f-1 X=f-1(Y) f(X)=Y

  28. Inverse Functions • A, B sets, f:A  B a function f = {(a,b): b=f(a), aA} • Is f –1={(b,a): b=f(a), aA}a function? • In order for f –1to be a function, if (b,a)f –1 and (b,c)f –1 then a=c • i.e. if (a,b)fand (c,b)f then a=c • i.e f must be 1-1

  29. Inverse Functions • In other words, if f:AB, then theinverse function f –1:f(A)A exists if and only if f is 1-1 • If f(A)=B, and f is 1-1, then f –1:BA exists • In other words, f –1:BA existsif and only if f is a bijection • In this case, f –1 is also a bijection, and A and B are isomorphic

  30. Cardinality Revisited • Recall that for a finite set A={a1,…,an}, the cardinality of A is simply the number of members which A has. • In this case |A|=n • For infinite sets the notion of cardinality is more complex. • But, if twoinfinite sets A and B are isomorphic, then surely |A|=|B|

  31. Summary of Lecture 8 • Relations on sets • Equivalence relations and partitions • Introduction to functions • Injections (or 1-1 functions) • Surjections (or ‘onto’ functions) • Bijections • Cardinality revisited

More Related