1
$\begingroup$

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.

$\endgroup$
4
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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