KU Math 725: Lecture 1/30/2026
On this page:
Bipartite graphs
Intuitively, a graph $G$ is bipartite if its vertices can be partitioned into two sets $X$ and $Y$ so that none of the vertices of $X$ are adjacent and likewise with $Y$. We can give a much more grotesquely formal definition via cocliques.
[definition=%counter%] Recall that $X$ is a coclique of the graph $G$ if the induced subgraph $G[X]$ is $\overline{K_{|X|}}$. [/definition]
[definition=%counter%] A graph is bipartite if $V(G) = X \sqcup Y$ where $X$ and $Y$ are cocliques. For short, we say that $G$ is an $X,Y$ bigraph. More generally, a graph $G$ is $k$-partite if its vertex set is the disjoint union of $k$ cocliques. [/definition]
Some useful facts about bipartite graphs:
- A graph is bipartite if and only if every one of its components are bipartite.
- A bipartite graph cannot contain any loops.
- Any subgraph of bipartite graph is bipartite.
- Even cycles are bipartite but odd cycles are not.
[proposition=%counter% (Proposition 1.30 in Reuven’s notes)] Let $G$ be an $X,Y$ bigraph. Then
\[\sum_{v \in X}d(v) = \sum_{v \in Y} d(V) = e(G).\][/proposition]
[proof] Since $X$ is a coclique of $G$, it follows that $\sum_{v\in X} d(v)$ counts every edge of $G$ exactly once. Similarly, $\sum_{v \in Y} d(v)$ counts every edge of $G$ exactly once. [/proof]
[corollary=%counter% (Corollary 1.31 in Reuven’s notes)] If $G$ is a regular $X,Y$-bigraph, then $|X| = |Y|$ (and so $V(G)$ is even). [/corollary]
[proof] If $G$ is $d$-regular, then
\[\sum_{v \in X} d(v) = |X|d = G = |Y|d = \sum_{v \in Y} d(v).\]And so the claim follows immediately. [/proof]
Bipartite graphs arise in many real world application, especially as matching problems. For example, suppose
\[\begin{align*} X &= \{\text{workers } w\}, \\ Y &= \{\text{shifts } s\}, \\ E &= \{(w, s) \mid \text{worker } w \text{ is able to work shift } s\}. \end{align*}\]The goal is to match these up in an efficient way. We will see some of these matching problems later on in the course.
One way we can heuristically detect something is not bipartite is by a parity argument. Intuitively, if we have a $3$-cycle in a bipartite graph, then we have a cycle
\[X \to Y \to X \to Y\]That’s a contradiction because $X$ and $Y$ are disjoint. To prove this, we will make use of the following lemma:
[lemma=%counter% (Lemma 1.32 in Reuven’s notes)] Every closed odd walk contains an odd cycle. [/lemma]
[proof] If the closed off walk is an odd cycle, we are done. Suppose said walk is not an odd cycle. Then the walk has a repeated vertex $x$. Write the walk, then, as $xWxW’x$. But since $\ell(W) + \ell(W’)$ is odd, it follows that either $\ell(W)$ is odd or $\ell(W’)$ is odd. Without loss of generality, suppose $W$ is odd length. Then we just shorten the walk to $xWx$. Now we recursively repeate this process until we eventually get a cycle. Note that this recursive process terminates because we degree the length by at least two at each iteration. [/proof]
[proposition=%counter% (Proposition 1.33 in Reuven’s notes)] A graph is bipartite if and only if it contains no odd cycles. [/proposition]
[proof] ($\implies$) We proceed by contrapositive. Suppose that $G$ does have an odd cycle. Since odd cycles fail to be bipartite, $G$ contains a subgraph that is not bipartite. So $G$ itself cannot be bipartite.
($\impliedby$) Suppose $G$ contains no odd cycles. Without loss of generality, assume that $G$ is connected. Fix a vertex $v$ and define
\[\begin{align*} X &= \{x \in V(G) \mid G \text{ has an even path } v\to x\}, \\ Y &= \{x \in V(G) \mid G \text{ has an odd path } v\to x\}. \end{align*}\]Then $X \cup Y = V(G)$ since $G$ is connected. We will show that $X \sqcup Y = V(G)$. Suppose that $x \in X \cap Y$. Then there is a path $vPx$ from $X$ and a path $xP’v$ from $Y$. Thus, $G$ has an odd closed walk $vPxP’v$. By the lemma, this implies that $G$ has an odd cycle which is a contradiction.
Now we claim that $X$ and $Y$ are cocliques in $G$. Suppose that $x, x’ \in X$ are adjacent via the edge $a$. Then we have a closed walk
\[vPxax'P'v\]Since $P$ and $P’$ are even length paths, the closed walk above is odd. So $G$ contains an odd cycle which is a contradiction. Thus, $X$ is a coclique. An identical argument shows that $Y$ is a coclique. [/proof]
[remark=%counter%] Notice that this says that odd cycles are the minimal obstractions to a graph being bipartite. [/remark]
[remark=%counter%] Notice that if $G$ is bipartite, you can find $X$ and $Y$ be picking a starting vertex, coloring it blue, and walking around the graph toggling between blue and red at each step. Once every single vertex is visited, the blue vertices are $X$ and the red are $Y$. [/remark]
[corollary=%counter% (Corollary 1.34 in Reuven’s notes)] Acyclic graphs are bipartite. [/corollary]
[proof] If $G$ is acyclic, it has no cycles. So $G$ certainly doesn’t have odd cycles! [/proof]
Eulerian Graphs
[definition=%counter%] A circuit (or tour) in a graph is a closed trail (i.e. a walk that ends where it began and does not repeat any edges). An Euler circuit of a graph is a circuit using every edge. A graph is Eulerian if it admits an Euler circuit. [/definition]
(See Koenigsberg problem!)
A few facts:
- Removing and/or adding loops does not affect whether $G$ is Eulerian!
- If $G$ is Eulerian and disconnected, then it has at most one nontrivial component.
Because of these facts, we will always assume $G$ is loopless and connected.
[theorem=%counter% (Theorem 1.36 in Reuven’s notes)] A connected graph is Eulerian if and only if it is an even graph. That is, even vertex has even degree. [/theorem]
[proof] $(\implies)$ Let $W$ be an Euler circuit. When $W$ leaves and enters each vertex the same number of times. Since each edge is traversed exactly once, it follows that every vertex must have even degree.
$(\impliedby)$ Let $W = x \cdots y$ be a trail of greatest possible length in $G$. We claim that $W$ is a circuit ($x = y$). Suppose not. Then $x \neq y$ and so the number of edges in the trail incident to $y$ is odd. By assumption, $G$ is even, so there must be at least one edge of $G \setminus W$ incident to $y$. This implies the trail can be elongated which contradicts the assumption of greatest possible length.
Now suppose that $W$ is not an Euler circuit. Then there is some vertex $v$ that has at least one edge in $W$ and also at least one edge $e = vu$ not in $W$. Now say
\[W = xW'vW''x.\]But then $uevW''xW’v$ is a trail and is longer than $W$, contradiction. [/proof]