Counting and detecting small subgraphs via equations and matrix multiplication

  • Authors:
  • Mirosław Kowaluk;Andrzej Lingas;Eva-Marta Lundell

  • Affiliations:
  • Warsaw University, Warsaw, Poland;Lund University, Lund, Sweden;Lund University, Lund, Sweden

  • Venue:
  • Proceedings of the twenty-second annual ACM-SIAM symposium on Discrete Algorithms
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a general technique for detecting and counting small subgraphs. It consists in forming special linear combinations of the numbers of occurrences of different induced subgraphs of fixed size in a graph. The combinations can be efficiently computed by rectangular matrix multiplication. Our two main results utilizing the technique are as follows. Let H be a fixed graph with k vertices and an independent set of size s. 1. Detecting if an n-vertex graph contains a (non-necessarily induced) subgraph isomorphic to H can be done in time O(nk−s + nw(⌈(k−s)/2⌉,1,⌊(k−s)/2⌋)), where w(p, q, r) is the exponent of fast arithmetic matrix multiplication of an np x nq matrix by an nq x nr matrix. 2. When s = 2, counting the number of (non-necessarily induced) subgraphs isomorphic to H can be done in the same time, i.e., in time O(nk-2 + nw(⌈(k-2)/2⌉,1,⌊(k-2)/2⌋)). (This improves for s = 2 on a counting algorithm of Vassilevska and Williams, running in time O(nk-s+3).) It follows in particular that we can count the number of subgraphs isomorphic to any H on four vertices that is not K4 in time O(nw), where w = w(1, 1, 1) is known to be smaller than 2.376. Similarly, we can count the number of subgraphs isomorphic to any H on five vertices that is not K5 in time O(nw(2,1,1)), where w (2, 1, 1) is known to be smaller than 3.334.