Practice Discrete Math

Algorithms / Subgraph Isomorphism

Least You Need to Know: Subgraph Isomorphism, Pattern Graphs, and Clique-Based Hardness

Subgraph Isomorphism asks whether a pattern graph appears inside a larger host graph. The key exam ideas are what the certificate looks like, why the mapping must preserve edges injectively, and how Clique reduces to the problem by using a complete pattern graph.

The least you need to know

Key notation

H -> G map vertices of pattern graph `H` into host graph `G`
injective distinct pattern vertices map to distinct host vertices
K_k complete graph on `k` vertices

Tiny worked example

  • Suppose the pattern graph is a triangle.
  • A certificate chooses three distinct vertices in the host graph.
  • Verification checks that all three corresponding host edges are present.
  • This is exactly why `Clique` reduces to `Subgraph Isomorphism` when the pattern is `K_k`.

Common mistakes

How to recognize this kind of problem

Start practice