1

I'm looking for an algorithm that checks that for the given directed graph its nodes can be split into two groups such that nodes don't connect to each other within their group

For example

enter image description here enter image description here

UPD

I need to check on Bipartite graphs, that's it

vitkarpov
  • 399
  • 2
  • 8

1 Answers1

0

The graph you are describing is called a Bipartite Graph.

enter image description here

This is a way to check if a given graph is Bipartite or not.

asds_asds
  • 990
  • 1
  • 10
  • 19