Algorithm for finding contradictions in a directed graph that represents implications

188 Views Asked by At

I need an algorithm that does this:

For a directed graph where nodes represent boolean values and edges represent implication (implies TRUE and implies FALSE):
If (arc exists between any node $A$ and any node $B$ such that ($A\to B$ AND $A\to !B$) OR ($!A\to B$ AND $!A\to !B$) )
then return FALSE, else return TRUE

Does such an algorithm already exist?

1

There are 1 best solutions below

0
On BEST ANSWER

In such general terms, the only algorithm is exhaustion. Walk through all possible paths of your graph and check for consistency. It is possible that there is a much better way depending on your assumptions about the graph.