Finding heaviest H-subgraphs in real weighted graphs, with applications

Virginia Vassilevska, Ryan Williams, Raphael Yuster

Research output: Contribution to journalArticlepeer-review


For a graph G with real weights assigned to the vertices (edges), the MAX H-SUBGRAPH problem is to find an H-subgraph of G with maximum total weight, if one exists. Our main results are new strongly polynomial algorithms for the MAX H-SUBGRAPH problem. Some of our algorithms are based, in part, on fast matrix multiplication. For vertex-weighted graphs with n vertices we solve a more general problem: The all pairs MAX H-SUBGRAPH problem, where the task is to find for every pair of vertices u, v, a maximum H-subgraph containing both u and v, if one exists. We obtain an 0(nt(ω,h))-time algorithm for the all pairs MAX H-SUBGRAPH problem in the case where H is a fixed graph with h vertices and ω < 2.376 is the exponent of matrix multiplication. The value of t(ω, h) is determined by solving a small integer program. In particular, heaviest triangles for all pairs can be found in 0(n2+1/(4-ω)) ≤ o(n2.616)-time. For h = 4, 5, 8 the running time of our algorithm essentially matches that of the (unweighted) H-subgraph detection problem. Using rectangular matrix multiplication, the value of t(ω, h) can be improved; for example, the runtime for triangles becomes O(n2.575). We also present improved algorithms for the MAX H-SUBGRAPH problem in the edge-weighted case. In particular, we obtain an 0(m2-1/k log n)-time algorithm for the heaviest cycle of length 2k or 2k - 1 in a graph with m edges and an 0(n3 /log n)-time randomized algorithm for finding the heaviest cycle of any fixed length. Our methods also yield efficient algorithms for several related problems that are faster than any previously existing algorithms. For example, we show how to find chromatic H-subgraphs in edge-colored graphs, and how to compute the most significant bits of the distance product of two real matrices, in truly subcubic time.

Original languageEnglish
Article number44
JournalACM Transactions on Algorithms
Issue number3
StatePublished - 1 Jun 2010

ASJC Scopus subject areas

  • Mathematics (miscellaneous)


Dive into the research topics of 'Finding heaviest H-subgraphs in real weighted graphs, with applications'. Together they form a unique fingerprint.

Cite this