Graph modelling: Forbidden paths

69 views Asked by At

I am modelling a system where I believe a directed graph is the method of choice. However I am facing the following issue which seems trivial but I cannot solve:

Having three vertices A, B, C, how do I model the graph such that there is a path from

A->B and B->A,

A->C and C->A

but

not B->C nor C->B.

The issue I am facing is that of course the path from B to C via A (B->A->C) would be legal, which in reality it is not.

How do I solve this? Use different vertices (e.g. additional ones)?

The directed graph is necessary due to other constaints (think a vertex D with A->D only)

0

There are 0 answers