Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Linear Time Vertex Partitioning on Massive Graphs



Peter M. Mell, Richard Harang, Assane Gueye


The problem of optimally removing a set of vertices from a graph to minimize the size of the largest resultant component is known to be NP-complete. Prior work has provided near optimal heuristics with a high time complexity that function on up to hundreds of nodes and less optimal but faster techniques that function on up to thousands of nodes. In this work, we analyze how to perform vertex partitioning on massive graphs of tens of millions of nodes. We use a previously known and very simple heuristic technique: iteratively removing the node of largest degree and all of its edges. This approach has an apparent quadratic complexity since, upon removal of a node and adjoining set of edges, the node degree calculations must be updated prior to choosing the next node. However, we describe a linear time complexity solution using an array whose indices map to node degree and whose values are hash tables indicating the presence or absence of a node at that degree value. We empirically demonstrate linear scalability on random graphs of up to 15 000 nodes and evaluate our memory usage vs. runtime tradeoffs. We then demonstrate tractability on massive graphs through execution on a graph with 34 million nodes representing Internet wide router connectivity.
International Journal of Computer Science: Theory and Application


vertex partitioning, graphs


Mell, P. , Harang, R. and Gueye, A. (2016), Linear Time Vertex Partitioning on Massive Graphs, International Journal of Computer Science: Theory and Application, [online], (Accessed June 17, 2024)


If you have any questions about this publication or are having problems accessing it, please contact

Created March 7, 2016, Updated February 19, 2017