TITLE: How to tell if a graph is bipartite?
QUESTION [7 upvotes]: So 
I have the following graphs drawn. How can I tell whether they are bipartite? If it is bipartite, how to identify 2 disjoint non empty sets?

REPLY [6 votes]: Use the vertex colouring algorithm:
1) Colour any one of your vertices red.
2) Identify all uncoloured vertices that are adjacent to a red vertex. Colour them blue.
3) Identify all uncoloured vertices that are adjacent to a blue vertex. Colour them red.
4) Repeat steps 2 and 3 until all the vertices are coloured red or blue.
5) If there are any two vertices adjacent of the same colour, then your graph is not bipartite, otherwise it is bipartite.
6) If the graph is bipartite, the colouring algorithm will have created the two required sets of points (one red and one blue).