Relations Flashcards
What is the cartesian product of A={1,2,3} and B={4,5,6}
AxB = {(a,b)|a in A, b in B}
AxB={(1,4),(1,5),(1,6),(2,4),(2,5),(2,6),(3,4),(3,5),(3,6)}
What are the different ways to find R^n? (a path of length n in R from a to g)
- Draw digraph D_R Find all paths of length n
- Use matrix multiplication to compute M_{R^n} = M_R * M_R … M_R (repeat matrix n times)
for a function f: A -> B
if dom(f) = A, then the function is…
defined everywhere / total
For a function f: A -> B if ran(f) = B then the function is…
surjective or onto
For a function f: A -> B if for x_1 not equal to x_2 it holds that f(x_1) not equal to f(x_2), then the function is…
Injective or one-to-one
If f is total, surjective, and injective then it is called
Bijective (f can also be called a bijection)
A relation R on A is reflexive if
for all a there exist (a, a) in R
A relation R on A is symmetric if
for all a,g there exist (a,g) in A and (g, a) in R
A relation R on A is antisymmetric if
for all a,g there exist (a,g) in A and (g, a) in R but a = g
if a matrix representation contains a diagonal of all 1s this means
The relation is reflexive
if a matrix represetation is symmetric ((M_R)^T = M_R) this means
A representation is symmetric
if for all a,g,c in A there exist (a,g) in R and (g,c) in R there exist (a,c) in R. This means that the relation is
Transitive
A relation R on A is an equivalence relation if
it is reflexive, symmetric, and transitive
what is a partition
a collection of subsets p1,p2,p3,…,pk
such that
for all i in [k], pi is not equal to Ø
for all i,j in [k], i not equal to j, the the intersection of pi and pj = Ø
let A = {1,2,3,4,5,6,7}
p1 = {1,4,7}
p2 = {2,5}
p3 = {3,6}
p4 = {2,3,5,7}
Does this collection of subsets have any partitions?
{p1,p2,p3} is the only partition