arXiv:2609.09715math.COSep 2026

Manuscript Offprint

arXiv:2609.09715

NP-Hardness of the HH-Free Edge-Deletion Problem

Lior Gishboliner, Ethan Honest

Abstract

For a graph HH, the HH-freeness edge-deletion problem is the algorithmic problem of finding, for an input graph GG, the minimum number of edges of GG whose deletion turns GG into an HH-free graph. We show that for every graph HH containing a cycle, this problem is NP-hard. This proves a conjecture of Gishboliner, Levanzov and Shapira, and completes the characterization of the complexity of the HH-freeness edge-deletion problem, answering a question of Alon, Shapira and Sudakov.

1 Introduction

Edge-deletion problems are a class of algorithmic problems where the goal is to find the minimum number of edges whose deletion turns the input graph GG into a graph satisfying a given graph property P\mathcal{P}. The systematic study of such problems was initiated by Yannakakis [13], who proved the NP-hardness of this problem for several natural graph properties P\mathcal{P}, and raised the question of proving hardness for large families of graph properties.

For a (non-empty) graph-family H\mathcal{H} each containing at least one edge, and for a graph GG, we denote by RemH(G)\text{Rem}_{\mathcal{H}}(G) the distance of GG to H\mathcal{H}-freeness, i.e., the minimum number of edges whose deletion turns GG into an H\mathcal{H}-free graph.¹ If H={H}\mathcal{H} = \{H\}, then we write RemH(G)\text{Rem}_H(G). A breakthrough result of Alon, Shapira and Sudakov [1] addressed Yannakakis's question by proving that for every (possibly infinite) family of graphs H\mathcal{H} containing no bipartite graph, it is NP-hard to compute RemH(G)\text{Rem}_{\mathcal{H}}(G), and even to approximate this quantity to within an additive error of n2−εn^{2-\varepsilon} for nn-vertex input graphs GG, for any fixed ε>0\varepsilon > 0. In the case that H\mathcal{H} is finite, this result was reproved and extended to kk-uniform hypergraphs in [8].

Alon, Shapira and Sudakov [1] raised the problem of characterizing the graphs HH for which the problem of computing RemH(⋅)\text{Rem}_H(\cdot) is solvable in polynomial time. As mentioned above, their results show that this problem is NP-hard if HH is non-bipartite. However, their technique does not apply to bipartite HH.² Earlier, Yannakakis [13] proved that computing RemH(⋅)\text{Rem}_H(\cdot) is NP-hard if HH is a cycle (see also [2]), and Watanabe, Ae and Nakamura [12] proved hardness in the case that HH is 3-connected. Levanzov, Shapira and the first author [7] considered the case where HH is a forest, and showed that computing RemH(⋅)\text{Rem}_H(\cdot) is polynomial-time solvable if HH is a star forest (i.e., a forest where every component is a star) and NP-hard otherwise. They conjectured that star forests are the only graphs HH for which the problem is polynomial. In other words, what remains is to show that

*Department of Mathematics, University of Toronto, Canada. Email: lior.gishboliner@utoronto.ca. Research supported by an NSERC Discovery Grant.

†Department of Mathematics, University of Toronto, Canada. Email: ethan.honest@mail.utoronto.ca.

¹A graph is H\mathcal{H}-free if it contains no (not necessarily induced) copies of any H∈HH \in \mathcal{H}.

²Furthermore, the aforementioned inapproximability result of [1] does not hold for bipartite HH, because for every bipartite HH there exists ε>0\varepsilon > 0 such that every nn-vertex HH-free graph has at most n2−εn^{2-\varepsilon} edges (by the Kővári-Sós-Turán theorem [9]). Hence, one can trivially approximate RemH(G)\text{Rem}_H(G) up to additive error of n2−εn^{2-\varepsilon} by outputting e(G)e(G).

computing RemH(⋅)\text{Rem}_H(\cdot) is NP-hard whenever HH contains a cycle. In this paper we prove this conjecture. This also answers the aforementioned question of Alon, Shapira and Sudakov [1].

Theorem 1.1. For every graph HH containing a cycle, the problem of computing RemH(⋅)\text{Rem}_H(\cdot) is NP-hard.

Corollary 1.2. For a graph HH containing at least one edge, computing RemH(⋅)\text{Rem}_H(\cdot) is polynomial-time solvable if HH is a star forest, and is NP-hard otherwise.

It is worth noting that the analogous problem for induced HH-freeness was solved previously by Aravind, Sandeep and Sivadasan [3] using different methods. Here the task is to make the input graph induced HH-free using the smallest number of edge deletions, additions, or both; these are known as the induced edge-deletion, edge-addition, and edge-modification problems, respectively.

We prove Theorem 1.1 via a reduction from the vertex cover problem. This is natural, since the vertex cover problem asks for the smallest number of vertex-deletions which leave the graph edgeless, while RemH(⋅)\text{Rem}_H(\cdot) asks for the smallest number of edge-deletions which leave the graph HH-free. Thus, roughly speaking, the reduction works by taking an input graph GG for the vertex cover problem, and producing a graph A=A(G,H)A = A(G, H) which has special edges corresponding to vertices of GG, and such that each edge e=xy∈E(G)e = xy \in E(G) gives rise to a copy of HH in AA involving the two special edges corresponding to x,yx, y. We note that this idea is not new; e.g., it was used by Alon and Stav [2] to show that computing RemH(⋅)\text{Rem}_H(\cdot) is NP-hard if HH is a cycle. However, analyzing this construction becomes significantly more difficult when dealing with a general graph HH. The difficulty lies in controlling the copies of HH in the graph A=A(G,H)A = A(G, H). This is essential in order to show that by taking a vertex-cover CC of GG and deleting all special edges corresponding to the vertices in CC, one turns AA into an HH-free graph. As we shall see, this statement is the main challenge in the proof of Theorem 1.1.

Paper organization: Section 2 contains some preliminaries. Section 3 introduces the main construction used in our reduction and proves some of its key properties. We then prove Theorem 1.1 in several steps: first for 2-connected graphs HH in Section 4, then for connected graphs HH with minimum degree δ(H)≥2\delta(H) \geq 2 in Section 5, and finally in full generality in Section 6.

Notation: We use standard graph-theoretic notation. In particular, δ(G)\delta(G) denotes the minimum degree of GG and τ(G)\tau(G) the vertex-cover number of GG. Also, G[X]G[X] denotes the subgraph of GG induced on a set X⊆V(G)X \subseteq V(G).

Declaration of Use of AI: The proofs in this paper were found with no significant use of AI. ChatGPT was used to handle some minor issues and polish the writing.