Graph TheoryTopic #23 of 40

Graph Types

Complete graphs, bipartite graphs, regular graphs, trees, and special graph families.

Regular Graphs

A graph is kk-regular if every vertex has degree kk.

Examples

  • 0-regular: isolated vertices
  • 1-regular: perfect matching
  • 2-regular: disjoint cycles
  • 3-regular: cubic graph
  • Complete graph KnK_n: (n1)(n-1)-regular

Properties

For a kk-regular graph with nn vertices: E=kn2|E| = \frac{kn}{2}

Bipartite Graphs

A graph is bipartite if vertices can be partitioned into two sets UU and VV such that every edge connects a vertex in UU to one in VV.

Characterization

A graph is bipartite if and only if it contains no odd cycles.

Testing Bipartiteness

Use BFS/DFS with 2-coloring. If no conflicts arise, graph is bipartite.

Complete Bipartite Graph Km,nK_{m,n}

Every vertex in the first set (size mm) is connected to every vertex in the second set (size nn).

  • Edges: mnmn
  • Bipartite with parts of sizes mm and nn

Special case: K1,nK_{1,n} is a star graph.

Trees

A tree is a connected graph with no cycles.

Equivalent Definitions

For a graph GG with nn vertices, the following are equivalent:

  1. GG is a tree
  2. GG is connected and has n1n - 1 edges
  3. GG has no cycles and has n1n - 1 edges
  4. There is exactly one path between any two vertices
  5. GG is connected, but removing any edge disconnects it
  6. GG has no cycles, but adding any edge creates exactly one cycle

Properties

  • E=V1|E| = |V| - 1
  • At least 2 leaves (vertices of degree 1) if V2|V| \geq 2
  • Adding one edge creates exactly one cycle

Rooted Trees

A rooted tree has a designated root vertex.

Terminology

  • Parent: The neighbor closer to the root
  • Child: A neighbor farther from the root
  • Ancestor/Descendant: Generalization of parent/child
  • Leaf: Vertex with no children
  • Internal vertex: Vertex with at least one child
  • Depth: Distance from root to vertex
  • Height: Maximum depth of any vertex

Binary Trees

Each vertex has at most 2 children (left and right).

Types

  • Full binary tree: Every internal vertex has exactly 2 children
  • Perfect binary tree: All leaves at same depth, all internal vertices have 2 children
  • Complete binary tree: All levels filled except possibly the last, which is filled left-to-right

Properties of Full Binary Trees

With ii internal vertices and ll leaves:

  • l=i+1l = i + 1
  • Total vertices: n=2i+1n = 2i + 1

Properties of Perfect Binary Trees

With height hh:

  • Leaves: 2h2^h
  • Internal vertices: 2h12^h - 1
  • Total vertices: 2h+112^{h+1} - 1

Forests

A forest is a graph with no cycles (disjoint union of trees).

For a forest with nn vertices, cc connected components: E=nc|E| = n - c

Planar Graphs

A graph is planar if it can be drawn in the plane without edge crossings.

Euler's Formula

For a connected planar graph: VE+F=2|V| - |E| + |F| = 2

where FF is the number of faces (including unbounded outer face).

Degree-Face Bound

E3V6(for V3)|E| \leq 3|V| - 6 \quad \text{(for } |V| \geq 3 \text{)}

Non-Planar Examples

  • K5K_5 (complete graph on 5 vertices)
  • K3,3K_{3,3} (complete bipartite graph)

Connected Graphs

A graph is connected if there's a path between every pair of vertices.

Connected Components

Maximal connected subgraphs. Every graph is a disjoint union of its components.

Strongly Connected (Digraphs)

A directed graph is strongly connected if there's a directed path between every pair of vertices in both directions.

Weakly Connected (Digraphs)

Connected if we ignore edge directions.

Special Graph Families

Petersen Graph

A famous 3-regular graph with 10 vertices.

  • Not planar
  • Hamiltonian
  • Vertex-transitive

Grid Graphs

Vertices at integer coordinates, edges between adjacent points.

  • m×nm \times n grid has mnmn vertices and 2mnmn2mn - m - n edges

Hypercube QnQ_n

Vertices are nn-bit strings.

  • Q1Q_1: single edge
  • Q2Q_2: square
  • Q3Q_3: cube
  • V=2n|V| = 2^n, E=n2n1|E| = n \cdot 2^{n-1}

Circulant Graphs

Vertices 0,1,,n10, 1, \ldots, n-1 on a circle. Connection set SS: edge (i,j)(i, j) if ijmodnS|i - j| \mod n \in S.