Solution (source code)

= Solution

Using the wiki convention that paths follow the written order of the <binary relations>, <composition of relations> is
$$
\boxed{R\circ S=\{(x,z)\in A\times A:\exists y\in A,\ (x,y)\in R\text{ and }(y,z)\in S\}.}
$$
Some treatments reverse the naming convention; stating it explicitly avoids ambiguity. The powers of the single relation $R$ below are the same under either convention.