Find the transitive closure of relation $R$

351 Views Asked by At

I am working on a question to find the transitive closure of $$R = \{(2,1), (2,2),(2,3),(3,1),(4,5),(5,4)\}$$

I began with the first ordered pair of $R$ to see if there are any element that needed to be added to make $R$ transitive. I worked my way through and came up with the answer.

$$R^*={(2,1), (2,2),(2,3),(3,1),(4,5),(5,4),(4,4)}$$

I only added one ordered pair and somehow feel I have come up with the wrong answer. Could someone possibly shed some light on this for me and tell me whether or not I am right?

3

There are 3 best solutions below

0
On

Transitive means $$(a,b)\text { and } (b,c)\implies (a,c) $$

you have $(5,4) $ and $(4,5) $ so, you must add $(5,5) $ .

0
On

$$ R^* = \{ (2,3),(3,1),(2,1),(2,2),(4,5),(5,4),(4,4),(5,5)\}$$ is the transitive closure of your $$ R = \{(2,1), (2,2),(2,3),(3,1),(4,5),(5,4)\}$$

Note that $R^*$ is transitive and contains $R$

1
On

When you have room for it, this visualisation helps find closure.   We're looking for elements that end-and-start with the same member but need a bridge to complete the triangle; any $(a,b),(b,c)$ needs an $(a,c)$ .

$$R = \begin{Bmatrix}\times &\times &\times &\times &\times \\(2,1)& (2,2) & (2,\color{red}3)&\times &\times \\(\color{red}3,1)&\times&\times&\times&\times\\\times&\times&\times&\times&(\color{crimson}4,\color{red}5)\\\times&\times&\times&(\color{red}5,\color{crimson}4)&\times\end{Bmatrix}$$

Since $(2,1)$ is already in the relation $(2,3),(3,1)$ is bridged.   However, $(4,5),(5,4)$ and $(5,4),(4,5)$ both need bridging, so $(4,4)$ and $(5,5)$ both need adding.

$$R^* = \begin{Bmatrix}\times &\times &\times &\times &\times \\(2,1)& (2,2) & (2,3)&\times &\times \\(3,1)&\times&\times&\times&\times\\\times&\times&\times&\color{blue}{(4,4)}&(4,5)\\\times&\times&\times&(5,4)&\color{blue}{(5,5)}\end{Bmatrix}$$

Now no new bridges have to be build, so we have closure.