
1
Relations
• binary relations xRy
• on sets x∈X y∈Y R ⊆XY
• Example:
“less than” relation from A={0,1,2} to B={1,2,3}
use traditional notation
0 < 1, 0 < 2, 0 < 3, 1 < 2, 1 < 3, 2 < 3
1 1, 2 1, 2 2
or use set notation
AB={(0,1),(0,2),(0,3),(1,1),(1,2),(1,3),(2,1),(2,2),(2,3)}
R={(0,1),(0,2),(0,3), (1,2),(1,3), (2,3)}
or use Arrow Diagrams
Formal Definition
• (binary) relation from A to B
where x∈A, y∈B, (x,y)∈AB and R⊆AB
xRy ↔(x,y) ∈R
• finite example: A={1,2} B={1,2,3}
• infinite example: A = Z and B = Z
aRb ↔a-b∈Zeven