How this calculation works
Enumerate modules of a small simple undirected graph and organize its strong modules into an inclusion tree. A module is a vertex set that every outside vertex sees uniformly: an outside vertex is adjacent to all members or to none. Strong modules are those that do not overlap another module in the crossing sense. The result exposes substitutable graph structure, not merely connected components.
M is a module iff every outside vertex is adjacent to all of M or none of M; strong modules overlap no other module.A worked example
Two disconnected edges have four singleton strong modules, the two edge-components, and the whole four-vertex set. These seven nodes form the modular decomposition hierarchy. Equal external neighborhoods define modules, a stronger condition than equal neighbor counts.
Good to know
Simple graph≤14 vertices. Enumerates modules then tests overlap to identify strong modules. Output hierarchy is validated by containment, not a promise of graph-isomorphism classification or automorphism orbits.
Reference: Method reference: Graph modular decomposition calculator with strong modules (opens in a new tab) ↗
Uniform external neighborhoods
Vertices inside a module can have different internal adjacencies. The defining condition concerns only vertices outside the set. For each outside vertex, its adjacency to the module must be constant across all members.
Singletons and the full vertex set are always modules. Connected components are modules too, but modules can occur inside a connected graph. Equal individual neighborhoods are a special case rather than the complete definition.
A module has identical external neighborhoods, stronger than equal neighbor counts; equitable cells need not be modules. The Critical path calculator from task durations and precedence constraints offers a complementary calculation under its own stated assumptions.
What overlap means here
Two sets overlap when they intersect and neither contains the other. Disjoint sets and nested sets do not overlap in this sense. A module is strong if no module overlaps it.
Strong modules therefore form a laminar family that can be organized by inclusion. Calling every module a tree node would be incorrect because ordinary modules can cross. The calculator distinguishes the total module count from the listed strong-module hierarchy.
Worked example and mathematical rule
Two disconnected edges have four singleton strong modules, the two edge-components, and the whole four-vertex set. These seven nodes form the modular decomposition hierarchy. Equal external neighborhoods define modules, a stronger condition than equal neighbor counts.
M is a module iff every outside vertex is adjacent to all of M or none of M; strong modules overlap no other module.
Exact subset enumeration
For each nonempty vertex subset, the implementation tests uniform adjacency from all outside vertices. It then checks which resulting modules are strong and assigns each non-root strong module to its smallest strict strong superset.
This transparent exhaustive method suits small graphs and makes the certificate easy to inspect. It is not a claim to implement the fastest linear-time modular decomposition algorithms used for much larger graphs.
Reading parents and trivial nodes
The full graph is the root, and singleton leaves identify original vertices. An internal strong module groups a structurally interchangeable region at that decomposition level.
Its parent index refers to the returned strong-module ordering, so retain the accompanying member sets when interpreting the tree. The hierarchy alone does not report a complete quotient-graph classification at every node. Do not infer that every internal node is a clique or an independent set.
Relabeling and complement checks
Graph complementation preserves modules: an outside vertex seeing all members becomes one seeing none, and vice versa. It also preserves which modules overlap, so the strong-module family is unchanged.
Consistent vertex relabeling changes member labels but not the abstract hierarchy. These identities provide strong implementation checks. Adding just one external adjacency to part of a candidate module can destroy it, showing why uniformity across every outside vertex is necessary.
Interpreting apparent interchangeability
Membership in a module describes how outsiders connect to the group, not equality of every vertex’s internal role, centrality or application meaning. Two vertices can lie in the same large module yet have quite different internal connections.
Use the hierarchy as structural information for graph algorithms or teaching examples. If a practical network assigns costs, directions or vertex attributes, this unweighted undirected module definition ignores them and may group objects that are not operationally interchangeable.
A few questions, answered
Are modules just connected components?
No. A connected graph can have nontrivial modules inside it.
Can a module contain both edges and nonedges?
Yes. Only its external adjacency must be uniform.
Why list only strong modules in a tree?
Ordinary modules can overlap; strong modules form a nested or disjoint family.
Does complementing the graph change its modules?
No. Uniform all-or-none external adjacency is preserved by complementation.