Testing Bipartiteness


Algorithm

A biparite graph is a graph in which the nodes can be partitioned into sets X and Y so that each edge has one end in X and the other end in Y. This is implemented by doing a breadth first search and painting each node the opposite color of the previous node, if any adjacent nodes have the same color it is not bipartite.

Code
Node.java
Edge.java
Graph.java
Bipartite.java
MainApplet.java