An undirected, unweighted, simple graph is said to be 2-colorable if there exists a function such that for every , .
Which of the following statements about 2-colorable graphs is/are true?
- (A)
If is 2-colorable, then may contain cycles of odd length
- (B)
If is 2-colorable, then may contain cycles of even length
- (C)
An optimal algorithm for testing whether is 2-colorable runs in time , if is represented as an adjacency list
- (D)
An optimal algorithm for testing whether is 2-colorable runs in time , if is represented as an adjacency list
