Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let Undir-Reachability be the following problem: given an undirected graph G and two specified vertices s and t in G, is there a path from s to t in G?

I need to prove that the 2-Colourability is in L, by knowing that Undir-Reachability belongs to the complexity class L.

I don't know how to start.

share|cite|improve this question
up vote 4 down vote accepted

Hint: a graph is not bipartite if there is a walk of odd length from a vertex to itself.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.