 # An algorithm for destroying claws and diamonds

In the Claw,Diamond-Free Edge Deletion problem the input is a graph G and an integer k, and the goal is to decide whether there is a set of edges of size at most k such that removing the edges of the set from G results a graph that does not contain an induced claw or diamond. In this paper we give an algorithm for this problem whose running time is O^*(3.562^k).

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

A claw is a graph with four vertices such that one vertex, called the center, is adjacent to the other three vertices of the graph, and there are no edges between the non-center vertices. A diamond is a graph with four vertices and five edges. In other words, there is an edge between every pair of vertices except one pair. In the {Claw,Diamond}-Free Edge Deletion problem the input is a graph and an integer , and the goal is to decide whether there is a set of edges of size at most such that removing the edges of the set from results a graph that does not contain an induced claw or diamond. This problem was introduced by Cygan et al. . The importance of this problem is due to its connection to the Claw-Free Edge Deletion problem. It is currently an open problem whether the latter problem has a polynomial kernel, and a polynomial kernel for {Claw,Diamond}-Free Edge Deletion may be a first step towards a polynomail kernel for Claw-Free Edge Deletion (see the discussion in ).

Cygan et al.  showed that the {Claw,Diamond}-Free Edge Deletion problem is NP-hard. Moreover, the problem has no subexpontial-time algorithm, unless the exponential time hypothesis fails. The problem has a simple -time algorithm . Li et al.  gave an -time algorith. In this paper we give an algorithm for whose running time is .

### Preleminaries

For a set of vertices in a graph , is the subgraph of induced by (namely, ). For a set of edges, is the graph obtained from by deleting the edges of . For a set of graphs and a graph , the graph is called -free if does not contain an induced subgraph which is isomorphic to a graph in . A set of edges is called a deletion set if is {claw,diamond}-free.

## 2 The algorithm

The algorithm is a branching algorithm (cf. ). Given an instance , the algorithm applies the first applicable rule from the rules below. When we say that the algorithm branches on sets , we mean that the algorithm is called recursively on the instances . For a graph , let be a set containing every inclusion minimal deletion set of .

(1)  If return ‘no’.

(2)  If is {Claw,Diamond}-free, return ‘yes’.

(3)  If there is a set of vertices that induces a claw, branch on every set in .

Rule (3) is clearly safe. The set consists of three sets of size 1, where each set consists of one edge of

. Therefore, the branching vector of Rule (3) is

and the branching number is 3.

For the following rules, we have that the graph is claw-free since Rule (2) cannot be applied. Additionally, due to Rule (2), the graph contains at leas one induced diamond. Assume that induces a diamond, where are not adjacent.

(4)  If , branch on , , and .

To prove the correctness of Rule (4), note that . Rule (4) branches on the first three sets of . From the assumption we have that the graph is isomorphic to the graph . Therefore, the algorithm does not need to branch on . Similarly, the graph is isomorphic to the graph .

The branching vector of Rule (4) is and the branching number is 3.

For the following rules we have that . Let be a vertex that is adjacent to exactly one vertex from . Without loss of generality, assume that is adjacent to and not adjacent to .

(5)  If there is a vertex that is adjacent to exactly one vertex from , branch on every set in .

Rule (5) is clearly safe. To compute the branching number of this rule, we need to consider all possible cases of the graph .

• The vertex must be adjacent to at least one vertex from , otherwise induces a claw. Due to symmetry, it suffices to only consider the cases and .

• Using the same argument as above, the vertex is adjacent to at least one vertex from . Therefore, is either , , , , , or .

Therefore, there are 18 possible cases for the graph . For each case, we used a Python script to compute . The case with largest branching number is when and . In this case, the branching vector is and the branching number is at most 3.533.

If Rules (1)–(5) cannot be applied, is the only vertex in that is adjacent to exactly one vertex from . As shown above, is adjacent to at least one vertex from . Without loss of generality assume that is adjacent to .

(6)  If is not adjacent to , branch on every set in except .

We have that is isomorphic to and . Therefore, Rule (6) is safe. Since , the branching vector of Rule (6) is and the branching number is at most 3.562.

(7)  Otherwise (namely, if is adjacent to ), branch on every set in except and .

As before, the safeness of Rule (7) follows from symmetry: The graph is isomorphic to and . Additionally, the graph is isomorphic to and . The branching vector of Rule (7) is and the branching number is at most 3.465.

The rule with the largest branching number is Rule (2). Therefore, the running time of the algorithm is .