Lecture05 - Bipartite CSE 421 Algorithms Richard Anderson...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CSE 421 Algorithms Richard Anderson Lecture 5 Graph Theory Bipartite • A graph is bipartite if its vertices can be partitioned into two sets V 1 and V 2 such that all edges go between V 1 and V 2 • A graph is bipartite if it can be two colored Theorem: A graph is bipartite if and only if it has no odd cycles Lemma 1 • If a graph contains an odd cycle, it is not bipartite Lemma 2 • If a BFS tree has an intra-level edge , then the graph has an odd length cycle Intra-level edge: both end points are in the same level Lemma 3 • If a graph has no odd length cycles, then it is bipartite
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Connected Components • Undirected Graphs Computing Connected Components in O(n+m) time • A search algorithm from a vertex v can find all vertices in v’s component • While there is an unvisited vertex v, search from v to find a new component Directed Graphs • A Strongly Connected Component is a subset of the vertices with paths between every pair of vertices. Identify the Strongly Connected
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/25/2012 for the course CSE 421 taught by Professor Richardanderson during the Fall '06 term at University of Washington.

Page1 / 3

Lecture05 - Bipartite CSE 421 Algorithms Richard Anderson...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online