Created classes to determine if the graph is acyclic and bipartite