rostam / GTea

Online version of GraphTea
http://www.graphtheorysoftware.com/
4 stars 4 forks source link

Bipartite algorithm does not work for undirected #6

Open HKH515 opened 7 years ago

HKH515 commented 7 years ago

Given an undirected algorithm with nodes 0 and 1, with an edge from 0 to 1, it works fine. But when the edge is from 1 to 0 it says the graph is not bipartite, we tested this in GraphTea as well and it is also occurs there.

rostam commented 7 years ago

What is the definition of being bipartite for directed graphs? I am not sure if there is a unique definition?

HKH515 commented 7 years ago

Well, i have not really heard of such a definition, but the bipartite code exhibits this behaviour given a directed graph, it's not consistent, that's what I'm trying to say.

A fix would maybe be not allowing bipartite checking on a directed graph? (the reason I'm bringing this up is because we added directed/undirected support in GTea).