Online Node- and Edge-Deletion Problems with Advice

In online edge- and node-deletion problems the input arrives node by node and an algorithm has to delete nodes or edges in order to keep the input graph in a given graph class Π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi $$\end{document} at all times. We consider only hereditary properties Π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi $$\end{document}, for which optimal online algorithms exist and which can be characterized by a set of forbidden subgraphs F\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathcal{F}}}$$\end{document} and analyze the advice complexity of getting an optimal solution. We give almost tight bounds on the Delayed ConnectedF\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\mathcal{F}}}$$\end{document}-Node-Deletion Problem, where all graphs of the family F\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{F}}$$\end{document} have to be connected and almost tight lower and upper bounds for the DelayedH\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$H$$\end{document}-Node-Deletion Problem, where there is one forbidden induced subgraph H that may be connected or not. For the DelayedH\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$H$$\end{document}-Node-Deletion Problem the advice complexity is basically an easy function of the size of the biggest component in H. Additionally, we give tight bounds on the Delayed ConnectedF\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{F}}$$\end{document}-Edge-Deletion Problem, where we have an arbitrary number of forbidden connected graphs. For the latter result we present an algorithm that computes the advice complexity directly from F\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathcal{F}}$$\end{document}. We give a separate analysis for the Delayed ConnectedH\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$H$$\end{document}-Edge-Deletion Problem, which is less general but admits a bound that is easier to compute.


Introduction
A number of classical online problems can be formulated as follows: Given an instance I = (x 1 , … , x n ) as a series of elements ordered from x 1 to x n , an algorithm receives them iteratively in this order, having to decide immediately whether to include x i into its solution.It can base this decision only on the previously revealed x 1 , … , x i−1 and must neither remove x i from its solution later nor include any of the previously discarded elements.A way to measure the performance of such an online algorithm is the competitive ratio, which compares how much worse it performs compared to an optimal offline algorithm [8].An algorithm is strictly c-competitive if the competitive ratio of the algorithm is bounded by a constant c.
In most classical online problems such as the k -Server Problem, the Paging Problem, or the Knapsack Problem, receiving the next x i requires immediate action.This makes a lot of sense in the mentioned problems, but sometimes there is no "need to act" immediately, which is often the case for the problem that we study in this work: Informally, the requests are single nodes of a graph that are iteratively revealed and our task is to keep the graph induced by these nodes free of a set F of forbidden induced subgraphs by deleting nodes or edges.Obviously, there are sets F and instances in which an arbitrary number of nodes can be revealed before any forbidden induced substructure appears.
In the offline world graph modification problems are well studied.Already a long time ago Yannakakis proved that node-deletion problems are NP-hard for every non-trivial hereditary graph property and that many edge-deletion problems are NPhard, too [24].Cai analyzed the parameterized complexity of graph modification problems [9].All variants are fixed-parameter tractable with respect to the solution size if the graph property can be characterized by a finite set of forbidden induced subgraphs.
The modified online model that we use was first introduced by Komm et al. [19] as the preemptive model.We give a slightly different formulation, which more closely matches our problem and call it the delayed decision model.We consider an instance I = (x 1 , … , x n ) of an online minimization problem for which a solu- tion S ⊆ I has to satisfy some condition C. Again, an algorithm ALG has to decide whether to include any element into its solution S. We denote the intermediate solution of an algorithm on an instance I at the revelation of element x i -before the deci- sion on whether to include it in S-by S I i (ALG) .While in the classical definition, an algorithm has to decide on whether to include an element into its solution at the point of revelation, the algorithm may now wait until the condition C is violated by S I i (ALG) .It may then include any of the previously revealed elements into its solu- tion, but must never remove any element from it.Some online problems that do not allow for competitive algorithms, such as the Minimum Vertex Cover Problem and in particular general node-and edge-deletion problems allow for competitive algorithms in the delayed decision model.
In the Minimum Vertex Cover Problem, the input I is a series of induced subgraphs G[{v 1 }], G[{v 1 , v 2 }], … , G[{v 1 , … , v n }] for which C states: " S I i (ALG) is a vertex cover on G[{v 1 , … , v i }] ".In the delayed decision model, an algorithm has to include nodes into its current solution only when an edge is revealed that is not covered yet.While the Minimum Vertex Cover Problem does not allow for competitive algorithms in the classical online setting [11], a competitive ratio of 2 can be proven for the delayed decision setting: The upper bound is given by always taking both nodes of an uncovered edge into the solution (this is the classical 2-approximation offline algorithm).The lower bound can be achieved by presenting an edge v i v j and adding another edge to either v i or v j , depending on which node is not taken into the solution by a deterministic online algorithm.If both nodes are taken into the solution then no additional edge is introduced.This gadget can be repeated and forces a deterministic algorithm to take two nodes into the vertex cover where one suffices.
The competitive ratio is the classical method to analyze online algorithms and a relatively new alternative is the advice complexity introduced by Dobrev et al. [13], revised by Hromkovič et al. [17], and refined by Böckenhauer et al. [4].The advice complexity measures the amount of information about the future that is necessary to solve an online problem optimally or with a given competitive ratio.There is an oracle called advisor who knows the whole input instance and gives the online algorithm advice in the form of a binary string that can be read from a special advice tape.Many problems have been successfully analyzed in this model including the k -server problem [14], the Knapsack Problem [6], Job-Shop Scheduling [3], and many more.One criticism of the advice model is that in the real world such a powerful advisor usually cannot exist.However, the new research area of learningaugmented algorithms uses an AI-algorithm to guide classical algorithms to solve optimization problems and they are closely related to the advice complexity [20,21].A strong application of advice complexity are the lower bounds it provides: For example, the online knapsack problem can be solved with a competitive ratio of two by a randomized algorithm.It has been shown that this competitive ratio cannot be improved with o(log n) advice bits [2, 5, 6].
In this paper we are not concentrating on the running time, but as we will be considering advice given by an oracle it has to be noted that the oracle will usually be solving NP-hard problems when preparing the advice string, while the online algorithm itself usually performs only simple calculations.
We base our work on the definitions of advice complexity from Komm [18] and Böckenhauer et al. [4], with a variation due to the modified online model we are working on: The length of the advice string is often measured as a function of the input length n, which usually almost coincides with the number of decisions an online algorithm has to make during its run.In the delayed decision model, the number of decisions may be smaller than n by a significant amount and we can measure the advice as a function of the size of the optimum solution.This usually does not work in classical online algorithms.
In this work, we give a lower bound of ⌈opt ⋅ log s⌉ and an upper bound of ⌈opt ⋅ log s⌉ + log opt + 2 log log opt on the advice complexity of the Delayed Connected F -Node-Deletion Problem, where s is the size of the biggest graph in F and opt is the size of the optimal solution.We show lower and upper bounds for the Delayed In the second main part, we give a tight bound for the Delayed Connected F -Edge-Deletion Problem, namely m(F) ⋅ opt F (G) + O(1) , where computing m(F) is rather involved.We provide an algorithm that computes m(F) for every con- crete F .Afterwards, since the results for the Delayed Connected F -Edge-Dele- tion Problem are only computable with some work for concrete sets of forbidden graphs, we provide results for a specialized version of the problem, namely the Delayed Connected H-Edge-Deletion Problem.The advice complexity for this problem is a simple function in the size of the optimal solution, lower bounded by ⌈opt ⋅ log(��H��)⌉ bits where ||H|| denotes the number of edges in H and upper bounded by ⌈opt ⋅ log ��H��⌉ + log opt + 2 log log opt .We leave open the exact advice complexity for the general Delayed F -Node-Deletion Problem and Delayed F -Edge-Deletion Problem, for which we can only provide lower bounds.
An overview over all possible problem types, references to the concrete theorems and open problems, can be found in Tables 1 and 2.
An example that we will examine throughout this paper is the class of trivially perfect graphs, which were first studied by Wolk [23].They are exactly the graphs without any induced path and cycle on 4 nodes, i.e.
. We will see in Example 1 that the advice complexity for this graph class is exactly 2 ⋅ opt when tasked with deleting nodes.Example 3 will show that log 3 ⋅ opt + O(1) advice bits are necessary and sufficient to optimally solve the problem in the case of edge deletions.

Preliminaries
We will use the usual notation for graphs, which will always be simple, undirected, and loop-free.For a graph G = (V, E) we write |G| to denote |V(G)| and ||G|| to denote |E(G)|.We use the symbol ⊴ to denote an induced subgraph relation, i.e.A ⊴ B iff A is an induced subgraph of B. We write G to denote the set of all graphs.We denote by H a finite graph and by F a finite set of finite graphs, if not stated otherwise.
We write G − U for G[V(G) − U] and G − u for G − {u} and also use G − E similarly for an edge set E. For graphs H and G we write H ⊴  G if there exists an isomorphism such that (H) ⊴ G .A graph G is called F -free if there is no H i ⊴  G for any H i ∈ F .A path with k nodes and a clique with k nodes are denoted by P k and K k respectively.An edge between nodes x and y is called xy.
For a problem Π we denote the optimal solution size on an input I by opt Π (I) .If Π is the class of F -free graphs, then we also write opt F (I) instead of opt Π (I) and opt H (I) = opt {H} (I) .As it is always clear whether we refer to a node-or edge- deletion problem, we do not specifically mention it in the notation.
If the context is clear or we do not refer to a concrete instance or even problem, we sometimes abbreviate the notation for the optimal solution size to opt.
By log(n) we always denote the logarithm to base 2.

General Graph Deletion Problems
Let us look at a simple introductory example: Cluster deletion.A cluster graph is a collection of disjoint cliques.Given a graph G the cluster deletion problem asks for a minimum set D of edges whose deletion turns G into a cluster graph.In our model we receive the graph G piecewise vertex by vertex.Each time we receive a new vertex that turns the graph into a non-cluster graph, we have to insert edges into D such that G i [E(G i ) − D] is a cluster graph.It is clear that in the worst case we have no chance to compute an optimal D in this way.It turns out that we can find an optimal solution of the same size online if we are given opt advice bits: Whenever we find an induced P 3 in our graph we have to delete at least one of its edges.We can read one advice bit to find out which one is the right one.As a graph is a cluster graph iff it does not contain P 3 as an induced subgraph the algorithm is correct.It is also easy to see that this simple algorithm is optimal: An adversary can present k times a P 3 which is in the next step expanded into a P 4 on either side.To be optimal the algorithm has to choose the correct edge to delete each time of the k times.This makes 2 k possibilities and the algorithm cannot act identically for any pair of these possibilities.Hence, the algorithm needs at least k advice bits.
In this paper we consider similar problems and find ways to compute their exact advice complexity.
If we are facing a Π graph modification problem for a graph class Π there are special cases we can consider for Π .If we know nothing about Π we can still show that opt log n advice bits are sufficient to solve the Π-edge-deletion problem optimally on a graph with n nodes.
Theorem 1 Let Π be a hereditary graph property.
(1) The Π-node-deletion problem can be solved optimally with ⌈opt ⋅ log n⌉ advice bits.
(2) The Π-edge-deletion problem can be solved optimally with at most 2opt ⋅ log n advice bits.
Proof (1) Whenever the algorithm detects that the graph is not in Π , a node has to be deleted.There at most n nodes to choose so the correct one can be encoded with log n bits and there are at most n opt possibilities to choose opt nodes.Such a number can be encoded with ⌈opt ⋅ log n⌉ many bits.
In that way an optimal set of vertices is deleted.As Π is hereditary, all induced subgraphs seen by the algorithm in-between also belong to Π if the same optimal solution is deleted from them.
(2) If the algorithm detects that the graph is not in Π , one or more edges have to be deleted.There at most n 2 ∕2 edges in total to choose from.There are only (n 2 ∕2) opt possibilities to choose a set of opt edges.We need only ⌈log((n 2 ∕2) opt )⌉ ≤ 2opt ⋅ log n advice bits.◻ While Theorem 1 gives us a simple upper bound on the advice complexity, it is often too pessimistic and we can find a better one.On the other hand, it will turn out that there are very hard edge-deletion problems where the bound of Theorem 1 is almost optimal.
One ugly, but sometimes necessary, property of the bound in Theorem 1 is that the number of advice bits can get arbitrarily big even if the size of the optimal solution is bounded by a constant.Let us look at some special cases, where this is not the case and the number of advice bits is bounded by a function of the solution size.
Theorem 1 is restricted to hereditary properties Π , i.e., properties that are closed under taking induced subgraphs.It is well known that such properties can be characterized by a set of forbidden induced subgraphs.If F is such a set we can always assume that it does not contain two graphs H 1 and H 2 such that H 1 is an induced sub- graph of H 2 because H 2 would be redundant.Under this assumption F is determined completely by Π and can be finite or infinite and we say that F is unordered.
Moreover, it is also clear that if a hereditary class Π contains at least one graph then it also contains the null graph with no vertices (because that is an induced subgraph of any graph).There is a vast number of important hereditary graph properties, for example planar graphs, outerplanar graphs, forests, genus-bounded graphs, chordal graph, bipartite graphs, cluster graphs, line graphs, etc. etc.
Hereditary graph properties are exactly those properties that can be solved optimally in this model if "optimal" means that the online solution is not bigger than the best offline solution that has to modify only one graph G (while the online algorithm has to modify a sequence of induced subgraphs leading to G).

Theorem 2
The online Π-edge and Π-node-deletion problems can be solved opti- mally with respect to the smallest offline solution if and only if Π is hereditary, even if arbitrarily many advice bits can be used.
Proof Theorem 1 already shows that an optimal solution can be found for hereditary properties.
Let now Π be a graph property that is not hereditary.Then there are graphs G 1 and G 2 such that (1) An adversary can present first G 1 and later G 2 .Any correct algorithm has to delete something from G 1 , but the optimal offline solution is to delete nothing.◻ Because of Theorem 2 we will look only at hereditary graph properties in this paper.It should be noted, however, that a sensible treatment of non-hereditary graph properties is possible if the definition of online optimality is adjusted in the right way.In particular, the amount of advice bits cannot be dependent only on the size of the optimal solution.For example, if the input graph has n nodes, any Π-nodedeletion problem can be optimally solved with n bits of advice.
We now give definitions for the main problems that we study in this work.
Definition 2 Let F be an unordered set of graphs.Let I be a sequence of growing induced subgraphs Then the F -Node-Deletion Prob- lem is to delete a minimum size set of nodes S from G such that G − S is F -free.We call The Delayed F -Node-Deletion Problem is defined accordingly, with the condi- tion C stating "The graph G[{v 1 , … , v i } − S I i (ALG)] is F -free" for all i ∈ {1, … , n} and some feasible algorithm ALG.F -Edge-Deletion and Delayed F -Edge-Dele- tion are defined accordingly, with the solution being a set of edges.The graph is always revealed as a sequence of nodes.We will denote the Delayed F -Node-Dele- tion Problem for F = {H} as the Delayed H-Node-Deletion Problem.
We start by giving a short proof that the F -Node-Deletion Problem does not generally admit a constant competitive ratio.We continue by giving upper bounds for the preemptive model in which no advice is used.
Lemma 1 Let H be a connected graph with |H| > 1.Then there is no algorithm for the H-Node-Deletion Problem that is c-competitive for any constant c.Proof Any correct online algorithm has to delete a node from each copy of H.The adversary starts constructing a copy of H.If an algorithm chooses to delete any node before H is completed, the copy is not completed by the adversary.In this special case, the adversary instead chooses to construct another node-disjoint copy of H.
If any algorithm instead chooses to delete a node only once a copy of H is completed, it can only do so by deleting the node v i that was last presented.The rest of the instance then consists of an arbitrary number of copies of v i which repair H repeatedly.An optimal algorithm simply deletes a single v j ∈ V(H), v j ≠ v i , that is not a copy of v i .◻ Lemma 1 is not surprising.It generalizes that Vertex Cover admits no constantly bounded competitive ratio [11].
Note however that this does not mean that there are no F for which the prob- lem admits a constantly bounded competitive ratio.An example is the F -Node- Deletion Problem with F = {K 1 K 1 , P 2 } , i.e. both two isolated nodes and an edge are forbidden.For this problem, an algorithm can simply delete any node that is presented after the first one.As the optimal solution for any graph over this F is deleting every node except for a single one, this algorithm is optimal.
Lemma 2 There is at least one F for which the F -Edge-Deletion Problem does not admit any c-competitive algorithm for any constant c.
Proof Let F = {P k } for any fixed k > 3 .Any correct online algorithm has to delete an edge from each copy of the path P k .The adversary starts constructing a copy of P k finishing with a vertex at the end of the path.If an algorithm chooses to delete any edge before P k is completed, the copy is not completed by the adversary.In this special case, the adversary instead chooses to construct another node-disjoint copy of P k .
If any algorithm instead chooses to delete an edge only once a copy of P k is com- pleted, it can only do so by deleting an edge e j presented last adjacent to the new- est node v i .The rest of the instance then consists of an arbitrary number of cop- ies of v i which repair P k repeatedly.An optimal algorithm simply deletes a single e k ∈ E(P k ), e k ∉ e j .◻ Next, we take a look at a bound on the competitive ratio for algorithms that use the delayed model.

Lemma 3
The Delayed F -Node-Deletion Problem admits an algorithms that is k-competitive for k = max H∈F {|H|} and the Delayed F -Edge-Deletion Problem admits and algorithm that is k-competitive for k = max H∈F {||H||}.
Proof Whenever an algorithm finds an induced H, it deletes all of its nodes, resp.edges.◻ Note that this may seem like a very rough upper bound at first, but there are sets F for which this bound on the Delayed F -Node-Deletion Problem is tight, as we will show now.For the following lemma, C k denotes a cycle with k nodes.Lemma 4 Let k > 4 and F = {C k }.Then any algorithm solving the Delayed F -Node-Deletion Problem cannot achieve a competitive ratio better than k.
Proof There are k adversarial strategies.The ith strategy is the following: First, a C k is presented.Whenever a node is deleted, another node with the same current neighborhood of the deleted node is reinserted.This is done for all nodes except for the node v i of the cycle.We call the set of these reinserted nodes V ′ .We call the graph built by the ith strategy G i .
We now want to show that deleting the last node of the cycle makes the gadget C k -free.Since this last node is chosen arbitrarily, this would show that we can force any algorithm to use k deletions for a gadget for which one deletion would be sufficient.
It is clear by construction that deleting any other single node does not make the gadget C k -free due to the reinsertions.For a contradiction we assume that there remains an induced C k in the gadget after the deletion of v i .
First, it is clear that deleting any v ∈ V � and thus forcing a reinsertion of a copy v ′ does not produce any new As there are only k − 1 replacement nodes, any C k in the gadget -except for the original C k -has to consist of at least one node of the original C k and at least one of the replacement nodes.
We break any C k that consists of k − 1 of the original nodes and one replacement node by deleting v k , as there is no replacement node for v k by construction.
Thus, at least two nodes of V ′ have to be in any remaining C k and none of the nodes of any C k may include v k .
Since by construction, every node of V ′ closes a new C 4 , any bigger cycle of the graph must have at least one edge that connects two non-neighboring nodes, thus not inducing any cycle of length bigger than four.Thus, there are no additional C k in the graph. ◻ It is easy to see that this proof holds even if F is a family of cycles of length at least 5.

The Delayed H-Node-Deletion Problem with Advice
If F consists of connected subgraphs, we can provide a simple proof giving us an almost tight bound on the advice complexity as follows.
In the following we use a gluing operation that works as follows: Given two graphs G and G ′ , we identify a single node from G and a single node from G ′ .A small example where the identified nodes are marked black is the following: Gluing together with results in .
Theorem 3 Let F be a not necessarily finite set of connected graphs and G the input graph.To be optimally solved the Delayed Connected F -Node-Deletion Problem requires at least ⌈opt F (G) ⋅ log s⌉ many advice bits, where s is the size of the biggest graph in F .There is an algorithm almost matching this bound using ⌈opt F (G) ⋅ log s⌉ + log opt F (G) + 2 log log opt F (G) advice bits.If s = ∞ then no algorithm can be optimal with f (opt) advice bits for any function f.
Proof Let H be the biggest graph in F and u be an arbitrary node in H.If we glue two disjoint copies of H together at u by identifying the respective nodes, the resulting graph H u contains H as an induced subgraph and there is exactly one node (i.e., u) that we can delete in order to make H u H-free.However, when deleting u from H u the remaining graph becomes disconnected and both components are proper induced subgraphs of H. Hence, the components are F -free and therefore H u − u is also F -free.
An adversary can simply present first H and then add nodes to build H u for u ∈ V(H) .In this way the adversary has |H| possibilities to continue and to be opti- mal when seeing only H the algorithm has to delete the correct u.By repeating this k times there are |H| k different possibilities and they have all to be distinguished.Hence we need at least log(|H| k ) = k ⋅ log(|H|) advice bits.It is easy to see-using self-delimiting encoding as in [7]-that ⌈k ⋅ log s⌉ + log k + 2 log log k bits are also sufficient if k = opt F (G) because the algorithm has to pick the right node of H when finding H ∈ F as an induced subgraph.The self-delimiting encoding is of course not needed if the size of s is a power of 2. In this case, the bound is tight.
If s is infinite, one can take an arbitrarily big H, so no finite amount of advice bits is sufficient.
◻ Example 1 Given .To compute the advice complexity, we identify the size of the biggest H ∈ F , which is 4. Thus, the advice complexity as stated in The- orem 3 is exactly ⌈opt The problem becomes harder when the graphs in F are disconnected, as we will see in the proof of Theorem 4. We solve it partially by determining the advice complexity for the Delayed H-Node-Deletion Problem, where H can be disconnected.
We occasionally speak of "deleting a graph" in this section.By this we refer to the removal of nodes such that a given substructure is no longer induced.If not specified further, assume that the minimum number of nodes is removed.
If a forbidden graph H is disconnected, it may contain multiple copies of the same component, e.g., three disjoint triangles among other components.If we were only to delete triangles, we would thus have to delete all but two copies to make the graph of an instance H-free.We introduce some notation to determine the number and the actual copies of a type of component.
We are restricting the classical notion of a packing to only include graphs in the same packing if they are not connected by an edge as follows.
Definition 4 Given a graph G.For a connected graph C we define the packing p C (G) of C in G as the family of sets of pairwise node-disjoint copies of C in G and the packing number of C in G, C (G) , as max H∈p C (G) (|H|) .We further demand that there is no edge between two graphs of such a set.
In other words, C (G) is the maximal number of C's that can be packed disjointly into G.
We use the multiplicity of components in H in a lower-bound proof where we force any algorithm to leave specific components such as the two specific triangles in our small example untouched.To punish a wrong selection, we use a redundancy construction that maps a component C into a C ′ such that C ⊴ C ′ and there is still a copy of C in C � − {v} for every v, while C ′ does not contain two disjoint copies of C.
In other words: We transform a component C in such a way that a single node deletion is not sufficient to remove C from the transformed graph, while not introducing additional copies of C in the process.
To show that such a redundancy construction actually exists, we use the following transformation.
Intuitively, we create a copy of H except for a single arbitrary node v 1 .The cop- ied neighbors of v 1 ( v ′ 3 and v ′ 4 in Example 2) are then connected with v 1 .Lastly, some copied node is chosen and connected with the original neighbors of v 1 ( there remains a copy of H in H � ⧵ {v} , as we copied H except for v 1 and the graphs were joined together at v 1 .If on the other hand we remove v 1 , the node v k that is used in Definition 6 acts as a substitution for v 1 , as by construction, N(v k ) ⊇ N(v 1 ).
The total number of nodes is 2 ⋅ |H| − 1 which means that removing any copy of H from H ′ results in less than |H| nodes.
Thus, both properties of a redundancy construction hold for H ′ .◻ We denote an optimal solution of the Delayed H-Node-Deletion Problem on a graph G by sol H (G).

Lower Bound
The lower bound uses two building blocks: Selecting a correct node for deletion in each component as in the proof of Theorem 3 as well as selecting the correct copies of a component by using redundancy constructions.

Theorem 4 Let H be a graph. Let C max be a component of H of maximum size. Any online algorithm optimally solving the Delayed H-Node-Deletion
an iterative way such that in each iteration one copy of each C i is revealed node by node.W.l.o.g.we assume that any algorithm does not delete any nodes before an H is completed and then only deletes nodes of any H in the graph until no H is any longer induced in the graph.
As soon as G is no longer H-free, any algorithm has to delete some node(s).For a C i ∈ C H it can either delete all C i except for C i (H) − 1 occurrences and optionally some additional node(s).Obviously, deleting an additional node is not optimal, as the adversary would simply stop presenting nodes.
The following strategy will force an optimal online algorithm always to delete copies of C max .After all k copies of all C i ∈ C H are presented, addition- Deleting all C max except for C max (H) − 1 occurrences will thus only need k − C max (H) + 1 deletions, while deleting any other component will need at least deletions.Thus, it is always optimal for any algorithm to focus on C max for deletion.
After all components have been revealed-and some deletion(s) had to be made-a redundancy construction such as the one from Definition 6 is used in order to repair an arbitrary set of C max (H) − 1 copies of C max .Every optimal algorithm will leave exactly C max (H) − 1 copies of C max after G is completely revealed.There many different ways to distribute the affected components onto all components and an algorithm without advice cannot distinguish them.In particular, each of these instances is part of a different, unique optimal solution, which deletes a node from all but the C max (H) − 1 subgraphs.If an algorithm has chosen to delete a node from a component that is affected by the redundancy construction, this component is now repaired and demands an additional deletion.By definition, applying the redundancy construction does not result in additional disjoint copies of C max .Thus, it is still optimal to focus on C max for deletion.
Finally, for every component that is not affected by a redundancy construction, the adversary glues a copy of C max to one of its nodes.It has |V(C max )| ways to do so for each copy of C max .
We now measure how much advice an algorithm needs at least.First of all, it is easy to see that the adversary is able to present |V(C max )| opt H (G) many different instances regarding the deletion of nodes for the copies of C max not selected for the redundancy construction.
Assuming  C max (H) > 1 , any algorithm needs to determine the correct subset of opt H (G) components out of k − 1 presented ones to delete one node from.As the adversary has opt H (G) different ways to distribute these redundancies and since every single of these instances has a different unique optimal solution, any correct algorithm has to get advice on the complete distribution in the size of at least

Upper Bound
For simplicity of writing down the algorithm, we will assume in this section that we are only ever presented instances in which the graph induces at least one forbidden subgraph H.Our algorithm can be easily transformed into one that only starts to read any advice once the first forbidden subgraph is completely revealed.Additionally, the algorithm only looks at a single C o to focus on for deletion.In most cases except for some corner cases, this is optimal.In the general case, the adversary gives the algorithm a list as in line 5 for each single component of H.This list is empty for all components except for those from which we need to delete nodes.The algorithm then labels the components in the same way as C o in lines 12-16 and cycles through all lists for deletion.Our arguments for the case of a single C o can be easily general- ized for this case of multiple components.We call this complete version of the algorithm the extended version.
For an instance with an online graph G with V(G) = {v 1 , … , v n } and a forbidden subgraph H, the advisor first computes the advice the algorithm is going to read during its run.It first runs an optimal offline algorithm on G and determines which is the component that is focussed on for deletion, named C o from here on.Finally, the advi- sor computes a list L of labels by simulating the online algorithm.These labels will thus coincide with the labels given by the algorithm to copies of C o which are not to be deleted in an optimal solution.As there are at most C o (H) ⋅ opt H (G) disjoint cop- ies of H in G and as Lemma 8 states that our algorithm uses at most opt H (G) + O(1) labels, we can limit the range of possible labels by [1, opt H (G) + O(1)] .Finally, a number of advice bits is used for every deletion of a concrete node in each copy of C o .
The algorithm starts by reading from the advice tape which component C o to focus on for deletion and the list L, using self-delimiting encoding.
Whenever the next node x i is revealed that fulfills H ⊴  G i , the algorithm will delete nodes from the graph as described in the following, otherwise the algorithm simply waits for the next node to be revealed.
To identify which node(s) of G i are to be deleted, the algorithm first identifies all biggest packings of C o .Of them it identifies a set P of which the most compo- nents have already received a label.Then all previously unlabeled copies of C o ∈ P receive a new unique label.The algorithm now looks at the label list L given by the advisor.Every copy of C o ∈ P whose label is not in L is now marked for deletion.The algorithm reads advice about which concrete node out of every copy of C o is optimal to delete.

Lemma 6
The extended version of Algorithm 1 is correct.
The condition of the if-branch in line 11 trig- gers when there already is an isomorphic copy of H in the graph.A largest packing of copies of a C o from H is then chosen in G in line 12, with the set including the most labeled components being chosen if the choice is ambiguous.All members of this set are then labeled in lines 15 and 16. |P| − C o (H) copies need to be deleted from G i in order to make the graph H-free.In line 17 the algorithm reads from L which of at most C o (H) copies of H are not to be deleted and deletes all other cop- ies.If the graph is not yet H-free, the algorithm repeats this process with the next component that has a non-empty list of labels, making the graph ultimately H-free at the end of line 20, i.e. before the next node is revealed.◻

Lemma 7
The extended version of Algorithm 1 is optimal.
Proof We already know by Lemma 6 that Algorithm 1 is correct and that our algorithm only deletes nodes from types of components that an optimal algorithm would delete from as well.Thus, we only have to show that each node deleted by the algorithm is part of the solution of an optimal offline algorithm.
Our algorithm determines a node for deletion by reading advice telling it from which labeled component it should delete a node.It then also reads advice which node of the selected copy it should delete.Thus, it can only not simulate an optimal offline algorithm if no set of labeled components covers a component such that it is the only optimal extension of the algorithms current solution.This component then does not have a label.By definition, it shares at least one node with a labeled component of the same type from which we do delete a node in this step or it is connected with by an edge with a labeled component.
Each time H ⊴  G i holds (especially the first time), we cover a complete copy of H by our labeled components.If we assume that none of the covered components was optimal for deletion, a supposedly optimal offline algorithm would leave all of these components in the graph after doing some other deletions.Thus, H ⊴  G i would still hold.This means that any optimal offline algorithm has to delete at least one of the labeled components.We can communicate which of these components our algorithm should delete by advice.
Thus, Algorithm 1 simulates an optimal offline algorithm.◻ Definition 7 Given graphs G, H and a labeling function l ∶ G → .We call a fam- ily C of induced subgraphs of G a configuration if every element of C is isomorphic to H, C is a packing and l(C) ≠ 0 for each C ∈ C .The size of a configuration is the number of induced subgraphs it contains.
Informally speaking, a configuration is a set of disjoint induced subgraphs of G that already have a label.
The following lemma refers to the simple version of the algorithm but can be easily generalized, as each component type is labeled independently of all others.This is discussed briefly after the proof.

Lemma 8 Given an online graph G, a forbidden graph H, as well as a graph C ∈ C H (as in line 4 of the algorithm) of which there may be at most
Proof In the worst case, whenever H ⊴  G i holds, the biggest configuration that we can find does not contain a single labeled component, thus the algorithm labels every member of the configuration.◻ It is possible that our algorithm labels more than one type of component, as they may pairwise overlap and the connecting node could be the optimal one to delete.Thus, we can bound the total number of labels over all components by opt H (G) ⋅ |C H | .

Theorem 5 Let H be a graph and C max be a component of H of maximum size and G be an online graph. The Delayed H-Node-Deletion Problem can be solved optimally using at most opt H (G) ⋅ (log |V(C max )| + |C H |) + O(log opt H (G)) advice bits.
Proof We count the number of advice bits used by Algorithm 1.We know by Lemmata 6 and 7 that it is correct and optimal.The advice in line 4 is of constant size.As each L only contains the labels for components which are not to be deleted and we limited the number all labels by opt H (G) ) advice bits-using self-delimiting encoding to encode opt H (G)-are needed in line 5.
Finally, the algorithm reads advice on which node of each copy of C max that is part of sol H (G) to delete in line 20.This can be done using opt H (G) ⋅ log |V(C max )| advice bits in total.◻

The Delayed Connected F -Edge-Deletion Problem
The problem of deleting edges from a graph needs a separate approach from that of deleting nodes.There is a simple example that highlights a problem which makes it hard to simply adapt the ideas of node deletion to the task of edge-deletion: Let F = {P 3 , K 3 } , i.e. a path with two edges and a triangle.Obviously, P 3 ⋬ K 3 , but delet- ing any single edge from the K 3 produces a P 3 .This is a problem that does not occur in the case of node deletions, as the graphs are induced by their nodes.In this section we present a way to calculate the advice complexity for each Delayed Connected F-Edge-Deletion Problem directly from F .Since our tight bounds on the advice complexity are not trivial to calculate for a concrete problem instance, we give a separate analysis for the case that only a single graph is forbidden in the following section, which results in an almost tight bound that is a simple function of the size of the number of edges of this forbidden graph.
In contrast to Sect. 4, "deleting a graph" means removing all of its nodes.

Definition 8
Let F be a family of forbidden connected induced subgraphs and Lemma 9 Let F = {H 1 , … , H k } be a family of connected graphs, G a graph and Proof As D is H i -good for G there must be some D ⊇ D that is optimal for G by the definition of goodness.Let us construct the graph G � = G − ( D − D) , i.e., we get G ′ from G by removing all edges that are in D , but not in D. Let us assume that D is not optimal for G ′ .Then there must be an optimal smaller than the already optimal D .Hence, D is optimal for G. ◻

Upper Bound
An important tool that we will use in the analysis of the number of advice bits is the solution of a special recurrence relation: where c n ≥ 0 and some c i > 0 for 0 Note that does not depend on the c i 's and that m(n) does depend on the d i 's. If A homogeneous linear recurrence relation with constant coefficients usually has a solution of the form Θ(n k−1 n ) if is the dominant root of the characteristic polynomial with multiplicity k [15].However, in (1) the coefficients of the characteristic polynomial are real numbers and there is exactly one sign change.By Descartes' rule of signs there is exactly one positive real root and therefore its multiplicity has to be one [12,16].Therefore m(n) = Θ( (S) n ).
Theorem 6 Let F = {H 1 , … , H k } be a of connected graphs and let S i be H i -sound and H i -sufficient for all i ∈ {1, … , k} .Then there is an m ∈ and an algo- rithm that solves the Delayed Connected F -Edge-Deletion Problem for every graph G with m ⋅ opt F (G) + O(1) many advice bits where 2 m ≤ (S i ) for all i ∈ {1, … , k}.
Proof The algorithm receives opt F (G) ⋅ log(max i { (S i )}) + O(1) many advice bits and then a graph G as a sequence of growing induced subgraphs.The algorithm interprets the advice as a number that can be between 0 and O((max i { (S i )}) opt F (G) ).
The algorithm will delete in total exactly opt F (G) edges.We analyze the total number of different advice strings the algorithm might use when deleting opt F (G) edges.
When the algorithm receives a new node and its incident edges to form the next graph G it proceeds as follows: While G is not F -free, choose some H i ∈ F for which H i ⊴  G .The advisor chooses one D ∈ S i for which (D) is (H i )-good for the graph at hand and puts it in the advice.
The advice string is therefore partitioned into |S i | subsets, one for each D ∈ S i .After deleting (D) the algorithm proceeds on the graph G − (D) , where opt F (G) is now by |D| smaller.If m( opt F (G)) is the total number of advice strings we get the recurrence m( opt In Fig. 1 you can find the behavior of an algorithm that solves the Delayed Connected F -Edge-Deletion Problem with when it encounters only the forbidden H 1 as a tree of pos- sible different computation paths.In the tree nodes you find the number of edges that will still be deleted.This corresponds to the recurrence

Lower Bound
Let F = {H 1 , … , H k } be a family of connected graphs.Let A be a correct algorithm for the Delayed Connected F -Edge-Deletion Problem.We define the sets S i = S i (A) for i = 1, … , k as follows: D ∈ S i if and only if there is some input sequence G 1 , G 2 , … , G t such that algorithm A deletes the edge set D ′ from G t .Moreover, there is a set X and an isomorphism such that G ) .Informally speaking, the edge sets in S i are those that are deleted from some isomorphic copy of H i by algorithm A in some scenario.
We will need the following technical lemma.It states that we can find a matching with special properties in every connected bipartite graph.Figure 2 shows an example.Let U be the vertices on top and V on the bottom.The vertices in U are ordered according to their label and drawn from left to right in ascending order in the figure.The matching should have the following properties.Let U ′ be the nodes in the matching on top and V ′ on the bottom.In the example U � = {1, 3, 4, 6} and V ′ are the nodes marked in gray.
The first property is N(U � ) = V , i.e., every node in V is connected to least one node in U ′ .To check that this property is fulfilled in Fig. 2 you have to check that every node on the bottom is connected to one in U ′ .The second property states that we have an induced matching, i.e., that the graph induced by U � ∪ V � is a matching.The third property concerns the vertices in V ′ : If v ∈ V � then N(v) contains several vertices from U, but exactly one node in U ′ , i.e., its partner in the matching.We require that this partner is the smallest one in N(v).You can check the third property in the figure easily: Just verify that the matching edge is the leftmost emerging edge of each v ∈ V � .For example m has two neighbors 6 and 7.The smaller one is its partner in the matching and hence in U ′ .
Lemma 10 Let G = (U, V, E) be a bipartite graph where U = {u 1 , … , u k } .Let ≤ be a reflexive and transitive relation on U such that u 1 ≤ ⋯ ≤ u k .Moreover, assume that V ⊆ N(U), i.e., every node in V is connected to some node in U. Then there is a Proof We claim that Algorithm 2 computes sets U ′ and V ′ that fulfill the three prop- erties stated in the lemma.As G[U � ∪ V � ] is an induced matching in G, the matching can be found easily from U ′ and V ′ .
We prove all three properties separately.
1. "N(U � ) = V ": The precondition of the lemma states that N(U) = V and therefore that N(v) ≠ � for every v ∈ V .In line 1 we add to U ′ a neighbor each v ∈ V , which already guarantees N(U � ) = V.
We have to prove that the invariant N(U � ) = V is maintained in the for- loop.Only in line 7 a node is removed from U ′ , which could destroy the prop- erty N(U � ) = V .However, we remove u only if there is no v ∈ V for which u is the only neighbor.Hence, every v retains at least one other neighbor in U ′ .
is a matching": If in the end u ∈ U � , then u was not removed from U ′ in line 7, which means that line 5 was executed and a v added to V ′ with N(v) ∩ U � = {u} .At this point of time v has only one neighbor in U ′ .Afterwards U ′ is only shrinking, so v cannot have more than one neighbor in U ′ at the end.Also, afterwards u cannot be deleted from U ′ as each u is only considered once in the body of the for-loop.This means that at the end each v ∈ V � has exactly one neighbor in U ′ .There cannot be a u ∈ U � with no neighbor in V ′ because it would have been removed in line 7. Hence, U � ∪ V � induces a matching.3. "min N(v) ∈ U � for every v ∈ V � ": Directly after line 2 the statement is obviously true.
Let us assume that this property does not hold at any later point.Then there is a v ∈ V � and min N(v) = u , where u ∉ U � .For this to hold, there must be a different a matching.After line 1 was executed, U ′ thus contained u and u ′ .Because u ≤ u ′ and in line 3 the vertices in U ′ are visited in descending order, u ′ was visited before u.
We are now looking at the moment when u ′ was visited in line 3. Then U ′ still contained both u, u � ∈ U � and u, � ∈ N(v) .u ′ cannot be matched with v at this point, as |N(v) ∩ U � | > 1 .This means that after u ′ was considered in the if- condition in line 4, either u ′ was removed from U ′ or u ′ was matched with a node from V ⧵ v , both leading to a contradiction.◻ Lemma 11 Let F = {H 1 , … , H k } be a family of connected graphs and S i be H i - sound and H i -sufficient for all i ∈ {1, … , k}.Then there are S ′ i ⊆ S i such that S ′ i is H i -sound, H i -sufficient and H i -minimal and moreover.
For every D � ∈ S � i there is a graph G with Proof We will use Lemma 10.In the following we look at a fixed i and write H for H i , S for S i , and There are only 2 |S| many possibilities which D ∈ S are H-good for some G and consequently the equivalence relation ≡ S has at most 2 |S| many equivalence classes.Assume that R = {G 1 , … , G m } is a set of representatives of all equivalence classes.
We build a bipartite graph (S, R, E) where there is an edge between D ∈ S and G i ∈ R iff D is H-good for G i .Furthermore we define a reflexive and transitive relation on S by defining D ≤ D ′ iff |D| ≤ |D ′ | .By Lemma 10 there is a matching between S and R that fulfills all three conditions that are stated there.In particular, we can determine the set S ′ ⊆ S that corresponds to U ′ in the lemma.
We prove that S ′ then also fulfills the conditions stated in this lemma: 1. S ′ is H-sound because it is a subset of S, which is H-sound itself.
2. S ′ is H-sufficient because by Lemma 10 we know that N(S � ) = R in the bipartite graph.That means that there is an edge from every G i to some D ∈ S � , which means there is some D ∈ S � such that D is H-good for G i . 3. S ′ is H-minimal, because for every D ∈ S � , its matched graph is covered exactly by D, as G[U � ∪ V � ] is an induced matching.4. Lemma 10 states that G[S � ∪ R] is a matching.By the H i -minimality of S ′ , for every D � ∈ S � there is a graph G such that only D ′ is H i -good for G and no other member of S ′ .This is exactly the graph G i ∈ R matched with D ′ , as G[S � ∪ R] is an induced matching.By condition 3 of Lemma 10, the cardinally smallest neighbor of G i is D ′ , thus there cannot be a D ∈ S that is smaller than D ′ .◻ and H i -minimal.It additionally has the property that for every Let l ∈ .The adversary prepares Θ( (S � ) l ) many instances by repeating the fol- lowing procedure in several rounds until the size of the optimum solution for the presented graph exceeds l − max{|D 1 |, … , |D r |} .
1.The adversary presents a disjoint copy of H i .2. Then the adversary computes G j with H i ⊴ G j for which D j is H i -good, but all D j � ∈ S � i with j ′ ≠ j are not H i -good, for all 1 ≤ j ≤ r .The existence of the graph G j is guaranteed by the H i -minimality of S ′ i .In particular there is a Dj ⊇ D j such that Dj is H i -optimal for G j .Let D We show that no other Next the adversary transforms the H i into one of the r possible G ′ j s and presents the new vertices.Then opt F (G � j ) = |D j | .Hence, the optimal solution size increases by |D j |.
In each round the input graph grows and the optimal solution size grows by |D j | .As soon as that size exceeds l − max{|D 1 |, … , |D r |} the adversary keeps presenting disjoint copies of H i without turning them into bigger connected graphs until the size reaches exactly l.The number N(l) of different instances is given by the following recurrence: It is easy to see that N(l) = Θ( (S � i ) l ) .The algorithm has to react differently on all of these instances: When the algorithm sees a new H i to be turned into one of G � 1 , … , G � r , it deletes different edge sets for each of the r possibilities.The adversary constructed an instance that consists of a sequence of disjoint graphs 1) advice bits on every graph G as stated in the precondition above.Then m cannot be smaller than log (S � i ) for every i ∈ {1, … , k} because opt F (G) can be become arbitrarily big.◻ Lemma 12 Let F be a family of connected forbidden graphs, H ∈ F , and S ⊆ 2 E(H) .
There is an algorithm that can decide whether S is H-sufficient.
Proof It is sufficient to verify for all connected graphs G with H ⊴ G that some D ∈ S is H-good for G, i.e., there is an optimal solution for G that contains D. By Lemma 9 we can restrict our search to all such G's that have an optimal solution that is a subset of E(H).There are infinitely many graphs G to check.To overcome this we define the unfolding of G, written Υ(G) , as the set of the follow- ing graphs: Remember that H ⊴ G .If there is some ] ∈ Υ(G) (for every possible ).If, however, Υ(G) contains two graphs G ′ and G ′′ that are isomorphic via an isomorphism that is the identity on V(H), then only the lexicographically smaller one is retained.This means that the unfolding of G contains all induced subgraphs that consist of H and one other copy of some forbidden induced subgraph from F that must overlap with H in some way (because we assumed that G has an optimal solution that consists solely of edges from H).Here is a small example: Let .Then It is easy to see that deleting some D ⊆ E(H) from G makes it F -free iff deleting the same D from all graphs G � ∈ Υ(G) makes all of them F -free.Hence, there is an optimal solution for G that is a subset of E(H) iff there is such a subset that is "optimal" for Υ(G) (i.e., deletion of no smaller edge set can make all graphs in Υ(G) F -free).
There are only finitely many possibilities for Υ(G) and we can enumerate all of them.Let us say this enumeration is Υ 1 , … , Υ t .For each Υ i we first find out whether there is a G with Υ(G) = Υ i .We can do this by enumerating all graphs G up to a size that does not exceed the sum of the sizes of all graphs in Υ i and computing Υ(G) for them.If indeed Υ(G) = Υ i then we test whether some D ∈ S is H-good for G. Iff these tests pass for all i then S is indeed H-sufficient.
◻ H) , S is H i -sound and H i -sufficient} .There is an algorithm that can compute m from F .More specifically, there is an algorithm that gets F and t ∈ as the input and returns the tth bit of the binary representation of m.
Proof "≤ " by Theorem 6. " ≥ " by Theorem 7.An algorithm can enumerate all pos- sible S ⊆ E(H) and then test if S is H i -sound and H i -sufficient (by Lemma 12).Then (S) is computed by finding the only real root of the characteristic polynomial of the corresponding recurrence relations [15].◻ We will now give an example on how to apply this theorem to the class of trivially perfect graphs.For demonstrative purposes we will not use the algorithm described in Lemma 12, but manually construct the sets S i , such that the reader may get a better intuition why the constructed sets are indeed H i -sound and H i -sufficient.

Example 3 Given
. In order to be able to apply Theorem 8, we need to compute sets S i ⊆ 2 E(H i ) that are H i -sound and H i -sufficient.start with .A single edge cannot be in S 1 , as this would violate the demanded H 1 -soundness by leaving a P 4 in the graph.S 1 may not only consist of edge subsets of size three or larger, as this would violate the H 1 -sufficiency for the graph .Thus, S 1 contains at least one two-element subset of E(H 1 ) .Indeed, every subset including exactly two edges is part of S 1 , as the following construction shows, which is also visualized in Figure 3.By constructing an input graph which extends one of the nodes of the cycle to a P 3 , each pair of neighboring edges is exactly the optimal solution.On the other hand, if we attach an edge to each of two neighboring nodes of the cycle, we need to delete exactly two opposing edges of .As we cover each two-element edge subset of , we do not need to look at edge subsets bigger than size two (even if including them would not necessarily violate our two conditions, but increase the size of (S 1 )).
We continue by computing S 2 for , which is a bit simpler.S 2 may not only consist of edge subsets of size two or larger, as this would violate the H 2 -sufficiency for the graph .On the other hand, every one-edge subset of E(H 2 ) is part of S 2 .The outer edges of the path are optimal for deletion if we attach a P 2 to either end of the original P 4 .The middle edge is optimal for deletion if we attach an edge to both ends of the path.Again, as we cover every single-edge subset, we do not need to look at bigger subsets for S 2 .

The Delayed H-Edge-Deletion Problem and Further Edge-Deletion Problems
As announced in the previous section, we now deal with the simpler case of forbidding only a single connected graph.For this, we give the following definition, which allows us to glue two graphs together at an edge.A crucial difference between these two ways of gluing is that basically "nothing can go wrong" when gluing graphs at a node and then deleting the node because the graph becomes disconnected and the parts are induced subgraphs of the original graphs.This is no longer true when gluing along edges.The next definition tries to capture the idea of "nothing can go wrong" by labeling edges as critical if we can use them without producing a graph that contains graphs from F .Definition 10 Let F be a collection of graphs and H ∈ F .We classify all edges in H as critical or non-critical.An edge xy ∈ E(H) is critical iff there is an H � ∈ F and an edge uv ∈ E(H � ) such that H xy ⊖ uv H ′ does not contain any graph from F as an induced subgraph.
Let #crit F (H) denote the number of critical edges in H and If we would define "critical nodes" in a similar way for node-deletion problems it would turn out that all nodes are critical.In the following we will establish that the number of critical edges plays a crucial role in the advice complexity of online edge-deletion problems and ways how to compute the number of critical edges for special families F .Please note first that it is quite easy to compute #crit(F) if given Fig. 3 In Example 3 the set S 1 contains six edge sets shown here as dashed lines.The corresponding supergraphs of are depicted demonstrating that all six sets in S 1 are necessary a finite F .A simple algorithm can achieve this by a polynomial number of subgraph isomorphism tests, which are of course by themselves NP-complete.The graphs in typical families F are usually small, so long running times are not a practical issue here.
Let us look at a very simple example.Let F = {P 3 , K 3 } .Because of symmetry we have to look only at three different gluing operations: P 3 to P 3 , K 3 to K 3 , and P 3 to K 3 .Whenever K 3 is involved, the resulting graph contains P 3 as an induced sub- graph.For example, gluing K 3 to itself results in a cycle of length four, which is iso- morphic to K 3 ⊖ e K 3 .This means that the edges in K 3 are not critical.Gluing P 3 to itself can be done in two ways.The first result are two disjoint edges and the second is again P 3 .Hence, the edges in P 3 are critical.In total, #crit(F) = 2.

Lemma 13 Let G be a graph and e ∈ E(G)
Proof A connected graph is two-connected iff it has no cut-vertex.Let e = xy .Assume first that G has a cut-vertex.If it is x or y then it is also a cut vertex in G ⊖ e G .Otherwise both parts of G ⊖ e G have the corresponding vertex as a cut- vertex.The other direction of the proof is similar.◻ Lemma 14 Let G be a graph that contains vertices x, y, u, v and these four conditions hold: 1.
x and y are connected by an edge.
2. There are two vertex-disjoint paths from u to x and from u to y.
3. There are two vertex-disjoint paths from v to x and from v to y. 4. The edge xy is not on any of those four paths.
Then u and v are two-connected in G. Proof u, x, and y are on a cycle and therefore in the same two-connected component.
The same holds for v, x, and y. ◻ The proof of the next lemma is surprisingly complicated.What it states about all two-connected graphs is also true for many other graphs and it can be checked easily for a concrete graph G.It opens a path to proving lower bounds on the advice complexity of edge-deletion problems in a similar way of how Theorem 3 works for node-deletion problems.simpler because then all paths are automatically disjoint.Altogether, this means that H ′ is two-connected.
We have established the following three facts: If we look at the preconditions of Lemma 15 we see that H ′ is another counter- example.Moreover, H ′ ⊆ G .We have assumed that G is a minimal counterexam- ple, so it cannot contain another smaller subgraph that is also a counterexample.
Because H ≃ G the graphs H and H ′ must have the same number of vertices.This, however, cannot be the case if there is at least one 12-edge in H.One endpoint of a 12-edge has to be outside {x 1 , y 1 } because x 1 y 1 ∉ E(H) .Let us assume x 1 u 1 is such a 12-edge.Then there exists also the 12-edge x 2 u 2 = x 1 u 2 .The graph H ′ con- tains the vertex u iff H contains u 1 or u 2 .As H contains both u 1 and u 2 , the number of vertices in H is higher than in H ′ .
As this is impossible, the only remaining possibility is that there is not even a single 12-edge in H.The number of edges in H is h 1 + h 2 + h 12 , if we denote the num- ber of 1-, 2-, and 12-edges by h 1 , h 2 , and h 12 .Then the number of edges in G = H � is h 1 + h 2 + h 12 ∕2 + 1 (note that h 12 is always an even number).If indeed G and H are isomorphic, these counts must coincide, which is impossible if h 12 = 0 .This contra- diction shows that our first assumption must have been wrong and the assumption was simply that Lemma 15 is wrong.◻ The condition that G is two-connected in Lemma 15 is necessary.Figure 7 shows that gluing an arbitrary connected graph to itself on a vertex yields a graph that is connected, but not two-connected and is a counterexample to the statement in Lemma 15.The next lemma shows that if we use G yx ⊖ xy G instead, a similar statement holds for graphs that are just connected.

Lemma 16
Let G be a connected graph and e = xy ∈ E(G) one of its edges.Then G yx ⊖ xy G does not contain a subgraph that is isomorphic to G.
Proof The outline of the proof is similar to the proof of Lemma 15.First we assume that there is a connected graph G and an edge xy ∈ G(H) such that H ⊆ G yx ⊖ xy and H is isomorphic to G.Moreover, we assume without loss of generality that G is a minimal counterexample with respect to taking subgraphs.From this assumption we will derive a contraction.
We define H ′ analogous to H ′ in Lemma 15 and the only difference is that now x 1 = y 2 and y 1 = x 2 .This time H ′ "automatically" contains both x and y: Because H has too many edges to fit in one part of G yx ⊖ xy it has to use x 1 or y 1 .In either case H ′ contains both x and y.
As before we get a contradiction if there is no 12-edge: On the other hand, if there is at least one pair of 12-edges, say u 1 v 1 and u 2 v 2 then H ′ must be connected: G is connected therefore yx ⊕ xy is also connected.If yx ⊖ xy is dis- connected then only the missing edge x 1 y 1 can be responsible.Then H would consist of two connected components, one in the upper part and connected to x 1 , the other in the lower part and connected to y 1 = x 2 (or the other way around).The correspond- ing parts in H ′ share the node u and therefore H ′ is connected after all.As above this shows that H ′ is another counterexample.Because of the assumption that G is mini- mal and H ′ ⊆ G we get H � = G .On the other hand h 12 > 1 implies that H ′ has fewer edges than G, a contradiction.◻ Please note that Lemmas 15 and 16 have several consequences.First, it means that #crit({G}) = ||G|| .It is also the key to the next theorem, which gives an almost tight bound for the Delayed Connected H-Edge-Deletion Problem, and is much simpler than using the techniques from Sect. 5.

Theorem 9
Let H be a connected graph and G be an arbitrary graph.Every online algorithm requires ⌈ opt H (G) ⋅ log(��H��)⌉ advice bits to solve the Delayed H-Edge-Deletion Problem optimally on input G.There is a deterministic algorithm that solves this problem using ⌈ opt H (G) ⋅ log ��H��⌉ + log opt H (G) + 2 log log opt H (G) advice bits.
Fig. 5 A graph G is depicted left.The corresponding graph G ⊖ xy G is on the right (here x 1 = x 2 and y 1 = y 2 ).Note that the edge corresponding to xy is missing in the right graph.An subgraph H is indicated by the dotted outline.(Please note that H is not isomorphic to G, which would be impossible by the very lemma we are about to prove.)Proof The adversary prepares a set I of ||H|| k different instances.We will show that every fixed algorithm (deterministic and using no advice) can solve at most one instance in I correctly.
Let e 1 , … , e m = E(H) and H i = H xy ⊕ yx H where xy = e i .Each instance is a graph that has k components that are presented one after another by the adversary.Each component is some H i .
It is clear that making H i H-free requires removing of at least one edge and can be accomplished by removing exactly the edge e i by Lemma 15: Removing e i from H xy ⊕ yx leaves H xy ⊖ yx H , which does not contain H as an (induced) subgraph.On the other hand, removing any other edge will result in a graph that still contains H as an induced subgraph.
If there are less than ⋅ log(��H��)⌉ advice bits, the algorithm will react in the same way for two different instances.At least one of them will then be solved in a non-optimal way.
For an upper bound, whenever some H is found as an induced subgraph, one edge of it belongs to some optimal solution known to the oracle.This edge can be communicated by a number between 1 and ||H||.As only k times an edge is selected, k such numbers suffice and we can encode them using ⌈k ⋅ log ��H��⌉ bits.Assuming k is not a power of 2, we communicate its size using self-delimiting encoding using an additional log k + 2 log log k bits.◻ The following theorem generalizes the lower bound from Theorem 9 to arbitrary families F .Its small disadvantage is that it uses #crit(F) , which has to be estab- lished for each F individually, which is a lot of work by hand, but easy with the help of a computer.A bigger disadvantage is the missing matching upper bound for the general case, which we discuss after stating and proving the theorem.
Theorem 10 Let F be a set of graphs and G be an arbitrary graph.Solving the online Delayed F -Edge-Deletion Problem requires at least ⌈opt F (G) ⋅ log(#crit(F))⌉ advice bits on input G.

Proof
The proof is very similar to proof of Theorem 9.The adversary chooses H ∈ F such that #crit F (H) = #crit(F) .Let C be the critical edges in H.It would be nice to have a matching upper bound for Theorem 10, too, but it is easy to see that Theorem 10 is not always optimal.For example, consider claw-and diamond-free graphs.The edges in the diamond are not critical and Theorem 10 gives us only opt ⋅ log(3) as a lower bound on the advice complexity.However, you can find five different supergraphs that induce a diamond that all require a different edge of the diamond to be removed in order to make it clawand diamond-free.
Nevertheless, the following algorithm provides a matching upper bound in many, but not all, cases.The algorithm actually consists of the online algorithm and the behavior of the oracle providing the advice string.The online algorithm proceeds as follows: It waits until the graph is no longer F -free and then identifies one graph H ∈ F that is present as an induced sub- graph.If there is no H ′ ⊆ H such that H � ∈ F and H ′ has a critical edge then it deletes an arbitrary edge from H. Otherwise it asks the oracle to name one critical edge in an appropriate subgraph H ′ and deletes it.It is easy to see that only ⌈log(#crit(F) opt )⌉ bits are used.
The oracle provides the following advice when the algorithm asks to identify a critical edge.The oracle identifies the edge in H that would be deleted by an optimal offline algorithm.If e is critical, it provides its number as advice.Otherwise it provides an arbitrary number.
It turns out that this algorithm is correct even for some extreme cases.For example, if F consists of all cycles then the problem is to delete the minimum number of edges to make the graph acyclic.This is a very simple problem that can be solved greedily without any advice.It turns out that here all edges are non-critical.The online algorithm would just delete an arbitrary edge in a cycle it finds.
Another example is F = {P 3 , K 3 } .Remember that P 3 contains critical and K 3 non-critical edges.Hence, as P 3 ⊆ K 3 the algorithm would ask the oracle which of two given edges in a triangle has to be deleted.With correct advice this yields an optimal solution and the algorithm matches the bound of Theorem 10.
Unfortunately, the algorithms does not work in all cases and indeed such an algorithm cannot exist because the lower bound in Theorem 10 is not optimal.Figure 8 shows a family F with #crit(F) = 3 .The first graph has no critical edges at all.An adversary can, however, present the first graph and any algorithm has to delete one edge.It is not hard to see that the adversary can force the algorithm to make a non-optimal decision if the algorithm is not able to choose the right petal from which to delete the edge.
An important open question left is to find a construction for an optimal algorithm for every family F .While we are able to provide tight bounds for the family F of Fig. 8 using Theorem 8, we leave open the problem of finding an upper bound and a better lower bound for the general Delayed F -Edge-Deletion Problem as well as for the general Delayed F -Node-Deletion Problem.
The last example we consider shows a problem whose advice complexity is not bounded by any function of opt.
A graph is distance hereditary if the distance between two vertices does not change if we delete other vertices as long as they stay connected [1].Surprisingly many graph classes are distance hereditary although it seems to be a severe restriction (which it is!).Among those graph classes are, e.g., ptolemaic graphs and cluster graphs.Let us call the corresponding problem the Delayed DH-Edge-Deletion Problem.Its complexity is at least very close to the trivial upper bound from Theorem 1 and it is not bounded by a function of the size of the optimal solution.Theorem 11 Given a set F of all distance hereditary graphs and an arbitrary graph G as an input graph.The Delayed DH-Edge-Deletion Problem requires at least opt F (G) ⋅ (log(n − 1) − 2) advice bits.
Proof We construct k graphs of size 4t + 1 depicted in Fig. 9 for t = 9 .The adver- sary presents first the cycle that consists of the long lower edge and the path going through the middle of the gadget.When the cycle is completed the algorithm is for the first time confronted with a graph that is not distance hereditary.Hence, the algorithm has to delete an edge.The only optimal choice is to delete the long edge making the graph distance hereditary.Because of rotation symmetry the adversary can construct t such gadgets and for each of them a different edge has to be deleted.Since there are k such gadgets arriving one after another, the adversary can choose between t k instances in total.The optimal solution deletes only k = opt edges.The online algorithm therefore requires k log t advice bits.The graph has size n = 4t + 1 , so t = (n − 1)∕4 , making the number of advice bits at least k log((n − 1)∕4) = k(log(n − 1) − 2) .◻ F = , Fig. 8 A counterexample the optimality of Theorem 10.The adversary presents the big graph in F .The algorithm has to delete an edge e.Then the adversary adds another vertex as shown on the right side.The optimal solution is to delete two edges.The algorithm is not optimal if it did not choose e from the correct petal out of ten.Repeating this scheme for k rounds leads to opt = 2k and at least log(10 k ) = log(10)∕2 ⋅ opt > 1.66opt advice bits to achieve optimality.Theorem 10 provides a lower bound of only ⌈opt ⋅ log 3⌉ ≤ ⌈1.59opt⌉

Fig. 4
Fig. 4 From left to right: H, xy ⊕ uv H , G xy ⊖ uv H

Fig. 6 u 7 Further
Fig. 6 u 1 and v 2 are two-connected in H (left).The resulting vertices u and v in H ′ are then also twoconnected (right)

Fig. 7
Fig. 7 Lemma 15 does not hold for single-connected graphs

Table 1
The transformation in Definition 6 is a redundancy construction.Proof Given any connected graph H with |H| > 1 .Let H ′ be the graph we obtain from Definition 6.If any single node a family of connected graphs and assume that there is an algorithm A that can solve the Delayed Connected F -Edge-Deletion Problem for all inputs G with at most m ⋅ opt F (G) + O(1) advice for some m ∈ .Then there exist S ′ i that are H i -sound, H i -sufficient, and H i -minimal and (S � i ) ≤ 2 m for every i ∈ {1, … , k}.

Definition 9
Let G and H be graphs and xy ∈ E(G) , uv ∈ E(H) .We define two oper- ations that glue G and H together along their edges xy and uv.First, G xy ⊕ uv H is the graph that we get by identifying u with x and v with y (and replacing the double edge by a single one).If G and H are not vertex-disjoint we replace them by disjoint copies first.We say that G xy ⊕ uv H consists of two parts, one is the induced subgraph by V(G) and the other by V(H).The two parts overlap in x and y.Second, G xy ⊖ uv H is the same except that the edges xy and uv are removed completely.We abbreviate G ⊕ xy G ∶= G xy ⊕ xy G and G ⊖ xy G ∶= G xy ⊖ xy G . Figure 4 shows an example.
Now again |C| k different instances are generated.For xy ∈ C let H xy ∈ F be another graph and uv ∈ H xy be an edge such that H xy ⊖ uv H xy is F -free.Such a graph and edge exist by the definition of a critical edge.The instance presented by the adversary is H xy ⊕ uv H xy .An optimal online algorithm has to delete exactly the edge xy when confronted with H xy ⊕ uv H xy as the deletion of any other edge either leaves H or H xy as an induced subgraph.Deleting, however, xy turns H xy ⊕ uv H xy into H xy ⊖ uv H xy , which is F -free.Again, there are |C| k different instances by repeating such choice k times.◻