A Linear-Time Approximation Scheme for the Densest Subgraph Problem
Abstract
In the undirected \emph{Densest Subgraph Problem (DSG)} the goal is to output a subset of vertices of a given graph that maximizes the quantity , where is the set of edges in the subgraph induced by . The problem is well studied in both theory and practice, and it admits natural efficient exact algorithms, as well as near-linear time algorithms with a approximation ratio. However, all previously-known approximation schemes incur logarithmic factors in the size of the graph or other parameters of the graph. This raises the question of whether a linear time -approximation can be obtained for all . We answer this question affirmatively by providing a -approximation algorithm running in time , where and are respectively the number of edges and vertices of . To the best of our knowledge, this is the first truly linear-time approximation scheme for the problem (when is a constant). Our algorithm uses assignments arising from a flow-based formulation together with a structural carving lemma. This lemma allows us to progressively carve "sparse" parts of the graph while nearly preserving the densest subgraph, allowing us to shift heavy computations to smaller instances, which eventually yields the mentioned runtime. Our framework also yields a -approximation for the \emph{Densest At-Least- Subgraph Problem}, where in addition to maximizing the density, we require the subgraph to have at least vertices. Our algorithm runs in time . This nearly matches the known approximation hardness while running in near-linear time.
Keywords
Cite
@article{arxiv.2608.11094,
title = {A Linear-Time Approximation Scheme for the Densest Subgraph Problem},
author = {Elena Grigorescu and Mehrshad Taziki},
journal= {arXiv preprint arXiv:2608.11094},
year = {2026}
}