For the relation p = {(1, 4), (2, 1), (2, 3), (4, 2)} on the set {1, 2, 3, 4}, determine the relation p^3.
I get that p^3 is p°p°p but how do I apply this to the exercise? Could p be described as = {(a, d), (b, c), (b, c), (d, b)}, and the set as {a, b, c, d} and then I just have to apply this three times?
Given a relation $R$ over some set $A$, we define the composition of $R$ with itself as $$R\circ R := \{(a,c)\in A\times A\phantom{i} | \phantom{i} \exists b : aRb \phantom{i} \& \phantom{i}bRc\}.$$ Given your set $p$, we could quite easily manually check which elements satisfy this definition. As a matter of fact, this turns out to be the set $$p^3 := p\circ p\circ p = \{(1,1), (1,2), (1,3), (2,2), (4,4)\}.$$