On Erdős-Gallai and Havel-Hakimi algorithms

Antal Iványi, Loránd Lucz, Francesco Mori, Péter SótérarXiv 2011

TL;DR

This paper introduces a novel linear-time algorithm, EGL, for determining if a sequence of integers can represent the degrees of vertices in a simple graph. This significantly improves upon existing $O(n^2)$ algorithms, enabling faster computation of graph properties and enumeration of graph structures.

What Problem Does This Paper Address?

The fundamental problem addressed is deciding whether a given sequence of non-negative integers can be the degree sequence of a simple graph. This is a classic problem in graph theory with applications in various fields, including network analysis and combinatorial optimization. For decades, the most efficient algorithms for this task, such as those by Havel-Hakimi and Erdős-Gallai, had a worst-case time complexity of $O(n^2)$, where $n$ is the number of vertices. This quadratic complexity becomes a bottleneck for large graphs. The authors aim to break this barrier by developing a linear-time algorithm.

Methods

The paper builds upon the foundational work of Havel-Hakimi and Erdős-Gallai. It first reviews these classical algorithms and their limitations. The core contribution is the introduction of the Erdős-Gallai Linear (EGL) algorithm. While the details of EGL's implementation are presented in pseudocode, the paper highlights that it exploits the monotonicity of degree sequences and determines capacities in constant time. This linear-time approach is contrasted with the quadratic time complexity of earlier methods. The paper also discusses various filtering algorithms (Parity Test, Binomial Test, Headsplitter Test) that can quickly identify non-graphical sequences with high probability, thus reducing the need for slower, precise algorithms.

Datasets

Not discussed in the paper. The paper focuses on theoretical algorithms and their complexity, rather than empirical evaluation on specific datasets.

Key Insights and Ideas

  • Linear Time Complexity is Achievable: The most significant insight is that the problem of checking for graphical sequences can be solved in linear time ($O(n)$), a substantial improvement over the long-standing $O(n^2)$ bound.
  • Exploiting Monotonicity: The EGL algorithm's efficiency stems from its ability to leverage the inherent monotonicity of degree sequences, allowing for constant-time capacity calculations.
  • Filtering as a Preprocessing Step: The paper demonstrates the effectiveness of using simpler, faster filtering algorithms (like parity checks and binomial tests) to quickly discard non-graphical sequences, thereby optimizing the overall process.
  • Connection to Real-World Problems: The authors emphasize that this problem is motivated by practical applications like ranking objects (e.g., products, people) where pairwise comparisons can be modeled by graphs.

Key Results

  • EGL Algorithm: The paper introduces the EGL algorithm with a worst-case running time of $O(n)$.
  • Computational Efficiency: The authors provide experimental data (Figure 5 and Figure 6) showing the total number of operations for various precise algorithms, highlighting the significant advantage of EGL over others like HHSO, HHSh, EG, and EGJ.
  • Enumeration Application: As an application of the EGL algorithm, the authors computed the number of different degree sequences of simple graphs for vertices ranging from 24 to 29.

Limitations and Future Work

  • Focus on Simple Graphs: The presented algorithms are primarily for simple graphs. Extensions to directed graphs or multigraphs are mentioned as areas of prior work but not the focus of the new algorithms.
  • Reconstruction: While the paper focuses on testing whether a sequence is graphical, the abstract mentions that the Havel-Hakimi algorithm based on its proof is constructive and can also construct a corresponding simple graph. The new EGL algorithm's primary focus is on the testing aspect for speed.
  • Further Enumeration: The paper mentions that the EGL algorithm was used to compute the number of degree sequences for specific $n$. This suggests that further enumeration for larger $n$ or for different types of graph properties could be a future direction.
  • Parallel Implementations: The paper mentions the implementation of a parallel version of an algorithm (EGEP) and its running time, indicating that parallelization is a relevant avenue for further research.

Summary updated

Abstract

Havel in 1955, Erdős and Gallai in 1960, Hakimi in 1962, Ruskey, Cohen, Eades and Scott in 1994, Barnes and Savage in 1997, Kohnert in 2004, Tripathi, Venugopalan and West in 2010 proposed a method to decide, whether a sequence of nonnegative integers can be the degree sequence of a simple graph. The running time of their algorithms is $Ω(n^2)$ in worst case. In this paper we propose a new algorithm called EGL (Erdős-Gallai Linear algorithm), whose worst running time is $Θ(n).$ As an application of this quick algorithm we computed the number of the different degree sequences of simple graphs for $24, ...,29$ vertices.
BibTeX
@misc{ivanyi2011erdos,
  author = {Antal Iványi and Loránd Lucz and Francesco Mori and Péter Sótér},
  title = {{On Erdős-Gallai and Havel-Hakimi algorithms}},
  year = {2011},
  eprint = {1111.3282},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1111.3282},
}
Figure