I am trying to conceive a solution for problems like in the following example:
A != B
B != C
D != B
C != B
E != D
E != A
How many variables are true and how many are false? As far as I found out I should try to use breadth-first search, but my problem is where to start and the fact that the graph will be an oriented one (I am connecting xi to !xj where the equality relation exists). Can someone point me in the right direction?
It’s a graph 2-coloring problem. Vertices:
A, B, C, …Edge(u, v)in this undirected graph is present if and only ifu != v.2-coloring is one of the applications of the breadth-first search. See: http://en.wikipedia.org/wiki/Breadth-first_search#Testing_bipartiteness