We present an exact algorithm for computing all common subgraphs with the maximum number of vertices across multiple graphs. Our approach is further extended to handle the connected Maximum Common Subgraph (MCS), identifying the largest common subgraph in terms of either vertices or edges across multiple graphs, where edges or vertices may additionally be labeled to account for possible atom types or bond types, a classical labeling used in molecular graphs. Our approach leverages modular product graphs and a modified Bron-Kerbosch algorithm to enumerate maximal cliques, ensuring all intermediate solutions are retained. A pruning heuristic efficiently reduces the modular product size, improving computational feasibility. Additionally, we introduce a graph ordering strategy based on graph-kernel similarity measures to optimize the search process. Our method is particularly relevant for bioinformatics and cheminformatics, where identifying conserved structural motifs in molecular graphs is crucial. Empirical results on molecular datasets demonstrate that our approach is scalable and fast.
翻译:本文提出了一种精确算法,用于计算多图中具有最大顶点数的所有公共子图。我们的方法进一步扩展至处理连通最大公共子图问题,该问题旨在识别多图中在顶点数或边数意义上最大的公共子图,其中边或顶点可附加标记以表示可能的原子类型或键类型——这是分子图领域经典的标记方式。该方法利用模积图和改进的Bron-Kerbosch算法进行极大团枚举,确保保留所有中间解。通过剪枝启发式策略有效缩减模积图规模,提升计算可行性。此外,我们引入基于图核相似度度量的图排序策略以优化搜索过程。本方法在生物信息学和化学信息学领域具有特殊价值,其中识别分子图中的保守结构模体至关重要。在分子数据集上的实证结果表明,我们的方法具有可扩展性和高效性。