Directed graphs
Definition 1.
A Topological sort of a digraph is an ordering of all its vertices in a sequence such that for every edge , vertex comes before vertex in the sequence.
A digraph admits a tolopogical sorting iff it is a directed acyclic graphs.
Definition 2.
A source is a vertex with no incoming edge, and a sink is a vertex with no outgoing edge.
A digraph with no cycles has a sink.
Definition 3.
An Eulerian tour is a graph is a closed walk that uses every edge of exactly once.
Definition 4.
A cycle decomposition of a graph is a partition of into cycles.
Claim 5.
A graph has a cycle decomposition iff every vertex has an even degree.
Proof of
Induction on number of edges.
Base case: edges.
Suppose has edges. Pick any component of which has an edge in it.
That component has minimum degree , so it contains a cycle . Note that in (keep the vertices, delete the edges) all the degrees are still even. Use induction hypothesis.
Claim 6.
A connected graph (isolated vertices are okay) has an Eulerian tour iff every vertex in that graph has an even degree.
Given a graph with a cycle decomposition, we will build a Eulerian tour. Maintain two entities:
- A partial tour (PT) which is a closed walk not using an edge more than once.
- A set of unprocessed cycles , which is a cycle decomposition of the edges that are not part of .
Initially, we have to be one of the cycles in our cycle decomposition and be the remaining cycles.
One by one, we’ll remove cycles from and incorporate them into .
At each step, find a cycle in that contains one of the vertices visited by . There must be such a cycle, otherwise would contain two connected components.
Hamiltonian cycles
No nice equivalent condition.
necessary conditions:
- graph having cut vertex cannot be hamiltonian.
- A bipartite graph in which the two parts hare different sizes cannot be hamiltonian.
A graph G is said to be t-tough for a given real number t if, for every integer k > 1, G cannot be split into k different connected components by the removal of fewer than tk vertices.
All hamiltonian graphs are tough.
however, not all tough graphs are hamiltonian.
Sufficient condition: If has vertices and minimum degree of is , then is Hamiltonian (Dirac’s theorem).
Theorem 7.
graph with vertices. Suppose and are two non-adjacent vertices with . If has a hamiltonian cycle, then so does .
Dirac’s theorem can be proved from this.