DEV Community

Cover image for Sibling Relation Transitivity and a Little More
Alexandre Pierre for kerthump

Posted on

Sibling Relation Transitivity and a Little More

I have a small number of friends with whom I discuss any craziness my brain is capable of producing. Some days ago I sent a voice note to one of them (shout out to Iago, I've linked his blog which is way better than mine) saying something along the lines: "I was thinking about transitivity and sibling relations are intransitive if you consider half-siblings as siblings". He replied: "Yes, and it's transitive if you only consider full siblings". Them he went a step ahead and said the same in more mathematical terms, which I explain below:

Intransitive Sibling Relation

Let SI be the sibling relation as written above, then:x SI y    px,y is parents for x and y \text{Let $S_I$ be the sibling relation as written above, then:} \\ \text{$x ~ S_I ~ y \iff \exists p_{x,y}$ is parents for $x$ and $y$}

I don't think it's necessary to write "parents to" in terms of relations too. But if you, dear reader, disagree you may comment and I'll consider putting it there or to use it to answer the comment itself.

It's possible to prove that the relation is intransitive if we consider that zz can be siblings with yy but not with xx . Even though xx and yy are siblings to each other.

Let px,y be the parent to x and yx SI y because px,y exists Let py,z be the parent to y and zy SI z because py,z exists \text{Let $p_{x,y}$ be the parent to $x$ and $y$} \\ \text{$x ~ S_I ~ y$ because $p_{x,y}$ exists} \\~\\ \text{Let $p_{y,z}$ be the parent to $y$ and $z$} \\ \text{$y ~ S_I ~ z$ because $p_{y,z}$ exists}

But why is this relation intransitive?

Answer: because in the context of half-siblings xx and zz may not have a common parent.

Diagram showing that x and z don't have a common parent

Transitive Sibling Relation

Exploring mathematically the other observation Iago made:

Let ST be the full-sibling relation:x ST y    px,y are parents for x and y \text{Let $S_T$ be the full-sibling relation:} \\ \text{$x ~ S_T ~ y \iff \forall p_{x,y}$ are parents for $x$ and $y$}

But how is it different from what we've seen before?

If we are talking about full-siblings, they have to share all parents. And it makes impossible the condition that made SIS_I intransitive. You can see that in the diagram below, which is minimal for full-sibling relations.

Diagram showing that x and z have to have a common parents to be siblings

What I've Learned Today: Anti-Transitive Relation

While doing the research for this post I've got acquainted with the concept of Anti-Transitive Relations in the site Geeks for Geeks. Which means a relation ATA_T that is made impossible between xx and zz if x AT yx ~ A_T ~ y and y AT zy ~ A_T ~ z .

Wikipedia article on Transitivity has a very good example that I've used as a base to make my own:

Diagram showing the cyclic dynamic between the three starter types in pokémon: water beats fire, fire beats leaf and leaf beats water

The antitransitive nature of the cycle makes it so Fire beats Leaf, Leaf beats Water but Fire can't beat Water. (If you know enough about pokémon you may know that this model has its limits, but consider only the starter types and not all of pokémon).

Conclusion

To end this text about the examples I really recommend the Geeks for Geeks article, the Wikipedia article on Transitivity and the Wikipedia article on Intransitivity.

Top comments (0)