This site is under active development — features and results may change without notice.

SymSplit · PACMMOD Vol. 4 No. 3 · SIGMOD 2026

Maximum Common
Subgraph Solver

Exact maximum common induced subgraph (MCIS) computation via dual symmetry breaking — exploiting both variable and value graph symmetries to drastically prune the branch-and-bound search space.

Branch-and-Bound Symmetry Breaking 75.7× avg speedup over RRSplit NP-hard · Exact · C++17
Given graphs G and H, find the largest induced subgraphs G'⊆G and H'⊆H such that G' ≅ H'

What is the maximum common subgraph problem?

The maximum common subgraph (MCS) problem asks: given two graphs G and H, what is the largest graph that appears as a subgraph of both? The size of the maximum common subgraph is a natural measure of how structurally similar two graphs are, which is why MCS is used for molecule comparison, graph similarity search, and graph matching.

There are two standard variants. The maximum common induced subgraph (MCIS) maximises the number of matched vertices, and every edge between matched vertices in one graph must also exist in the other. The maximum common edge subgraph (MCES) instead maximises the number of shared edges. Both are NP-hard, so exact solvers rely on carefully pruned search.

mcsolver solves the induced variant exactly with SymSplit, a branch-and-bound algorithm in the McSplit family that detects symmetries in both input graphs and skips search branches that can only produce equivalent solutions.

Applications of maximum common subgraph

The maximum common (induced) subgraph problem underlies structural similarity in a broad range of domains. Below are the primary application areas.

🧪

Cheminformatics

Finding the largest shared substructure of two molecules for similarity search, scaffold analysis and reaction mapping.

🧬

Bioinformatics

Comparing protein structures, interaction networks and metabolic pathways to find conserved functional modules.

🔍

Pattern Recognition

Matching graph-based representations of images, shapes and scenes when exact isomorphism is too strict.

🌐

Network Analysis

Measuring similarity between social, communication or knowledge graphs and aligning their common structure.

⚙️

Hardware Verification

Identifying common sub-circuits between designs for equivalence checking and IP reuse detection.

🔐

Software & Malware Analysis

Comparing control-flow and call graphs to detect code clones, plagiarism and malware variants.

SymSplit Algorithm

SymSplit extends the McSplit branch-and-bound framework with dual symmetry breaking: it detects modular symmetries based on local neighbourhood hashes in both the variable graph G and the value graph H, then prunes isomorphic subtrees during search. Variable symmetry (previously exploited by RRSplit) and value symmetry (novel contribution) are composed without violating completeness.

Symmetry detection runs in O(n²) via Boost hash-based neighbourhood grouping. The resulting symmetry classes enable O(1) pruning lookups during BnB traversal.

Comparison with prior work

Method Var. Sym. Val. Sym. Exact
McSplit ✗✗✓
RRSplit ✓✗✓
Trummer ✓✓✗
SymSplit✓✓✓

SymSplit achieves an average 75.7× speedup over RRSplit and solves more instances within any fixed branch count — with the strongest gains on high-symmetry graph datasets (BI, LV).

Live MCIS Solver

Upload two graphs in edge-list format or paste them directly. The SymSplit backend will return the exact Maximum Common Induced Subgraph with vertex mapping.

File upload
Paste text
GGraph G
📄

Click or drag a graph file

Edge list · one edge per line

HGraph H
📄

Click or drag a graph file

Edge list · one edge per line

Awaiting input
⬡

Upload or paste two graphs then click Run

Maximum common subgraph FAQ

What is the maximum common subgraph problem?

Given two graphs G and H, the maximum common subgraph (MCS) problem asks for the largest graph that is isomorphic to a subgraph of both G and H. It is a fundamental measure of structural similarity between graphs and is NP-hard.

What is the difference between maximum common induced subgraph and maximum common edge subgraph?

The maximum common induced subgraph (MCIS) maximises the number of vertices and requires that all edges among the chosen vertices are preserved in both graphs. The maximum common edge subgraph (MCES) maximises the number of shared edges and does not require the subgraphs to be induced.

Which algorithms solve the maximum common subgraph problem exactly?

State-of-the-art exact solvers use branch-and-bound search, notably McSplit, its symmetry-aware extension RRSplit, and SymSplit, which adds value-graph symmetry breaking and is more faster than RRSplit.