IAE Academy

Graph theory formulas

Graph theory: connectivity, matching and colouring. 20 formulas for GATE CS Discrete Mathematics, each with when to use it. Each is explained in the topic notes.

All 20 Graph theory formulas

HANDSHAKING LEMMA

Holds for every undirected graph (loops count 2). So the number of odd-degree vertices is always even.

MOST EDGES IN A SIMPLE GRAPH

Attained exactly by the complete graph . A -regular simple graph on vertices has edges, so it can exist only if is even and .

EDGES NEEDED FOR $K$ COMPONENTS

A graph with vertices and components has at least edges; so a connected graph has at least edges. Equality holds exactly for forests.

MOST EDGES IN A DISCONNECTED SIMPLE GRAPH

Simple graph on vertices with at least 2 components. Attained by plus one isolated vertex. With exactly components the maximum is .

VERTEX AND EDGE CONNECTIVITY

The vertex connectivity is the fewest vertices whose removal disconnects or leaves a single vertex; the edge connectivity is the fewest edges whose removal disconnects . . A connected graph on vertices has a cut vertex exactly when , and a connected graph on vertices has a bridge exactly when .

LEAVES OF A TREE

For a tree with vertices. In particular every such tree has at least 2 leaves (vertices of degree 1).

CAYLEY'S FORMULA

Number of labelled trees on vertices, which equals the number of spanning trees of . Also and .

COMPLEMENT EDGE COUNT

For a simple graph , the complement has the same vertices and exactly the non-edges of . Degrees satisfy .

SELF-COMPLEMENTARY GRAPHS

Necessary conditions on the order and size of a simple self-complementary graph. Examples: (4 vertices, 3 edges) and (5 vertices, 5 edges).

INDEPENDENT SET AND VERTEX COVER

Holds for every simple (loopless) graph: a set is independent exactly when its complement is a vertex cover.

KÖNIG'S THEOREM

Every vertex cover needs a distinct vertex for each matching edge, so always; equality is guaranteed only for bipartite graphs. (The triangle has , .)

HALL'S CONDITION

A bipartite graph with parts has a matching covering every vertex of if and only if this holds, where is the set of neighbours of . When , this is the condition for a perfect matching.

GREEDY COLOURING BOUND

For every graph, where is the maximum degree. By Brooks' theorem, a connected graph that is neither a complete graph nor an odd cycle has .

CHROMATIC POLYNOMIALS

is the number of proper colourings of using at most colours, with the colours and vertices labelled. is any tree on vertices; needs . Check: . is the least with .

EDGE COLOURING

The chromatic index is the fewest colours that give edges sharing a vertex different colours. The bounds hold for every simple graph (Vizing). A bipartite graph has . for even and for odd .

EULER'S FORMULA

For a connected planar graph (drawn without crossings). With components the right side is .

EDGE BOUND FOR SIMPLE PLANAR GRAPHS

For a simple planar graph with . If the graph also has no triangle (for example, it is bipartite), . Reason: in a simple connected planar graph with , every face has degree at least 3 (at least 4 with no triangle), and . More generally, if every cycle has length at least , then .

DIRAC'S THEOREM

Simple graph with . Ore's generalisation: if for every pair of non-adjacent , then is Hamiltonian. Both are sufficient only.

HAMILTONIAN CYCLES IN $K_N$

For , labelled vertices, counting a cycle and its reverse as the same. is Hamiltonian exactly when , and () has Hamiltonian cycles (1 for , 6 for ).

POWERS OF THE ADJACENCY MATRIX

For the adjacency matrix of a graph (directed or undirected; in a multigraph counts parallel edges, and a loop is entered as 1 in ). Walks may repeat vertices.

Where this was asked: 2018 (2), 2020 (1), 2022 (5), 2024 (4), 2026 (2). See the 14 previous-year questions on Graph theory. This shows what was asked, not what will be asked.