Table of Contents
Fetching ...

On the number of small edge-weighted subgraphs

Feng Yu, Mingao Yuan

TL;DR

This paper addresses exact counting of small edge-weighted subgraphs in weighted networks by grounding the counts in the weighted adjacency matrix $A$ and expressing the labeled subgraph count as $L = \sum_{i_1\neq i_2\neq \cdots \neq i_m} F(i_1,\ldots,i_m)$. It introduces a general, partition-based framework with distinct-block sums $S_\pi$ and general-block sums $M_\pi$ linked by $M_\pi = \sum_{\sigma\succeq\pi} S_\sigma$, with Möbius inversion used to recover $S_{\hat{0}}$, the target distinct-index count. The authors provide explicit closed-form formulas for all connected subgraphs with up to five nodes, including $\sum_{i\neq j\neq k} A_{ij}A_{jk}A_{ki} = \mathrm{tr}(A^3)$ and analogous 4- and 5-node expressions built from traces, Hadamard powers, and tensor contractions, along with a practical, non-loop algorithm verified numerically. This yields a scalable analytical toolkit for both weighted and unweighted graphs, enabling fast subgraph statistics in network analysis and highlighting implementation considerations such as memory management for larger clique-based contractions.

Abstract

Subgraph counting is a fundamental task that underpins several network analysis methodologies, including community detection and graph two-sample tests. Counting subgraphs is a computationally intensive problem. Substantial research has focused on developing efficient algorithms and strategies to make it feasible for larger unweighted graphs. Implementing those algorithms can be a significant hurdle for data professionals or researchers with limited expertise in algorithmic principles and programming. Furthermore, many real-world networks are weighted. Computing the number of weighted subgraphs in weighted networks presents a computational challenge, as no efficient algorithm exists for the worst-case scenario. In this paper, we derive explicit formulas for counting small edge-weighted subgraphs using the weighted adjacency matrix. These formulas are applicable to unweighted networks, offering a simple and highly practical analytical tool for researchers across various scientific domains. In addition, we introduce a generalized methodology for calculating arbitrary weighted subgraphs.

On the number of small edge-weighted subgraphs

TL;DR

This paper addresses exact counting of small edge-weighted subgraphs in weighted networks by grounding the counts in the weighted adjacency matrix and expressing the labeled subgraph count as . It introduces a general, partition-based framework with distinct-block sums and general-block sums linked by , with Möbius inversion used to recover , the target distinct-index count. The authors provide explicit closed-form formulas for all connected subgraphs with up to five nodes, including and analogous 4- and 5-node expressions built from traces, Hadamard powers, and tensor contractions, along with a practical, non-loop algorithm verified numerically. This yields a scalable analytical toolkit for both weighted and unweighted graphs, enabling fast subgraph statistics in network analysis and highlighting implementation considerations such as memory management for larger clique-based contractions.

Abstract

Subgraph counting is a fundamental task that underpins several network analysis methodologies, including community detection and graph two-sample tests. Counting subgraphs is a computationally intensive problem. Substantial research has focused on developing efficient algorithms and strategies to make it feasible for larger unweighted graphs. Implementing those algorithms can be a significant hurdle for data professionals or researchers with limited expertise in algorithmic principles and programming. Furthermore, many real-world networks are weighted. Computing the number of weighted subgraphs in weighted networks presents a computational challenge, as no efficient algorithm exists for the worst-case scenario. In this paper, we derive explicit formulas for counting small edge-weighted subgraphs using the weighted adjacency matrix. These formulas are applicable to unweighted networks, offering a simple and highly practical analytical tool for researchers across various scientific domains. In addition, we introduce a generalized methodology for calculating arbitrary weighted subgraphs.

Paper Structure

This paper contains 12 sections, 8 theorems, 9 equations, 1 figure, 5 tables.

Key Result

Proposition 2

Suppose that $M_\pi$ and $S_\sigma$ are defined in eq:DBS and eq:GBS, respectively. Then it follows that where $\mu(\pi, \sigma)$ is the Möbius function on the lattice of partitions $\Pi(S)$. For any $\pi, \sigma \in \Pi(S)$ with $\pi \prec \sigma$, it satisfies $\mu(\pi, \pi) = 1$, and is defined recursively by $\mu(\pi, \sigma) = - \sum_{\pi \preceq \tau \prec \sigma} \mu(\pi, \tau)$.

Figures (1)

  • Figure 1: Runtime for the 5-node subgraph formulas (log-scale on the $y$-axis). Left: execution time of the proposed non-loop expressions. Right: comparison between the proposed formulas and their loop-based implementations for $(I),(M),(P)$.

Theorems & Definitions (9)

  • Definition 1: Partition
  • Proposition 2: rota1964foundations
  • Theorem 3
  • Theorem 4
  • Proposition 5: $M_\sigma$ of $\bm{n}_\sigma$-type
  • Proposition 6
  • Theorem 1
  • Theorem 2
  • Theorem 3