Graph Theory Flashcards
What is a graph?
Pair of sets (V(G),E(G)), where each element of E consists of a pair of elements of V
What is a walk in a graph G?
A sequence of vertices v_1 v_2 … v_n such that {v_i, v_i+1} is in E(G) for 1 <= i < n
What is a path in a graph G?
A walk where all the vertices are distinct
What is a cycle?
A closed walk of at least 3 vertices with otherwise distinct vertices
What does is mean for a graph G to be connected?
For any two vertices x,y in V(G), there is an xy-walk in G
What does it mean for two vertices x,y to lie in the same component?
They are joined by an xy-walk
What is a tree?
A minimally connected graph
Prove that any tree is acyclic
- SFAC there is a cycle in T
- Remove some edge e in this cycle
- Then we obtain a path, P
- Take two vertices x,y in T
- Since T is connected, there is an xy-walk between them
- If this walk used the edge we removed, replace it with the path P
- This is still an xy-walk
- So T-{e} is connected
- Contradicts minimality of T
- So T is acyclic
Prove that a connected & acyclic graph G is a tree
- SFAC G - {e} is connected for some e = xy in G
- Let W be a shortest xy-walk in G-{e}
- Then W must be an xy-path (otherwise it wouldn’t be the shortest)
- So if we add e back in, we get a cycle, but G was acyclic, contradiction
Prove that any two vertices in a tree are joined by a unique path
- SFAC this isn’t true
- i.e. there are two distinct xy-paths in T, P_1 and P_2
- Suppose P_1 is the shortest over all such choices of x and y
- Then P_1 and P_2 intersect only at x and y
- But this is a cycle, contradiction
Prove that any tree with at least two vertices has at least two leaves
- Let P be a longest path in T
- If the start / end of P had another neighbour in V(T)/V(P), we could make the path longer
- If the start / end of P had another neighbour in V(P) other than the next in the sequence P, we would have a cycle
- So the two ends of P must be leaves.
What is a leaf?
A vertex of degree 1
Prove that if T is a tree and v is a leaf, then T-v is a tree
- Suffices to show T-v is connected & acyclic
- Know T is acyclic, and we can’t create a cycle by removing an edge, so T-v is acyclic
- Know T is connected
- For any x,y in T-v, the unique xy-path in T is contained in T-v
- So T-v is a tree
Prove that any tree on n vertices has n-1 edges
- By induction
- A tree with 1 vertex has 0 edges
- Consider a tree T on n vertices
- Know T has a leaf v
- Know T-v is a tree
- T-v has n-1 vertices and n-2 edges by induction hypothesis
- So T has n vertices & n-1 edges
What is a spanning tree?
Minimally connected subgraph of the same vertex set
Prove that a connected graph with n-1 edges and n vertices is a tree
- Let H be a spanning tree of G
- H has n vertices and n-1 edges
- so H=G, i.e. G is a tree
What is a minimum cost spanning tree of G?
A spanning tree T of G such that for any other spanning tree T’, C(T’) >= C(T)
Describe Kruskal’s algorithm
- A_0 = {}
- Check if there is an edge e in G / A_i such that (V(G), A_i U {e}) is acyclic
- If not, output A = A_i and stop
- If there is, set A_i+1 = A_i ∪ {e} for one such e such that c(e) is minimal, then increase i by 1
Prove that Kruskal’s algorithm produces a minimum cost spanning tree of G
[CONTINUE]
What is an Euler trail?
A walk such that every edge in a graph appears exactly once
What is an Euler tour?
A closed Euler trail
What is an Eulerian graph?
A graph where every edge is of even degree (in an Euler tour, we use one edge to enter a vertex, and a different edge to leave).