Problem description ------------------- Let G= a directed graph, where each edge is given a color. Does there exist a non-empty subset S of V that: 1. given any pair of vertex v1 and v2 n S, there is no monochrome path between v1 and v2. 2. (maximality) for any vertex v not in S, there exists a monochrome path connecting v to some other node in S. Input format ------------ A set of facts of the form vertex(V). <-- vertices edge(V1,V2,Color). <-- colored edges Output format ------------- a set of facts of the form in(X). <-- selected nodes if no instances of "in" are given, the answer is supposed to be "NO".