Next Article in Journal
Integration of Polynomials Times Double Step Function in Quadrilateral Domains for XFEM Analysis
Next Article in Special Issue
Minimizing Interference-to-Signal Ratios in Multi-Cell Telecommunication Networks
Previous Article in Journal
An Adaptive Deep Learning Neural Network Model to Enhance Machine-Learning-Based Classifiers for Intrusion Detection in Smart Grids
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Adding a Tail in Classes of Perfect Graphs

Department of Computer Science & Engineering, University of Ioannina, 45110 Ioannina, Greece
*
Authors to whom correspondence should be addressed.
Algorithms 2023, 16(6), 289; https://doi.org/10.3390/a16060289
Submission received: 8 May 2023 / Revised: 30 May 2023 / Accepted: 31 May 2023 / Published: 3 June 2023

Abstract

:
Consider a graph G which belongs to a graph class C . We are interested in connecting a node w V ( G ) to G by a single edge u w where u V ( G ) ; we call such an edge a tail. As the graph resulting from G after the addition of the tail, denoted G + u w , need not belong to the class C , we want to compute the number of non-edges of G in a minimum C -completion of G + u w , i.e., the minimum number of non-edges (excluding the tail u w ) to be added to G + u w so that the resulting graph belongs to C . In this paper, we study this problem for the classes of split, quasi-threshold, threshold and P 4 -sparse graphs and we present linear-time algorithms by exploiting the structure of split graphs and the tree representation of quasi-threshold, threshold and P 4 -sparse graphs.

1. Introduction

Given a graph G, an edge connecting a vertex  w V ( G ) to a vertex u of G is a tail added to G; let us denote the resulting graph as G + u w . If G belongs to a class  C of graphs, this need not hold for the graph  G + u w . Hence, we are interested in computing the number of non-edges of G in a minimum C -completion of G + u w , i.e., the minimum number of non-edges (excluding the tail  u w ) to be added to G + u w so that the resulting graph belongs to C ; such non-edges are called fill edges. The problem is trivial for several graph classes (e.g., planar, bipartite, chordal, weakly chordal, {gem}-free, {house,hole,domino}-free, perfect graphs) but is not so for many other classes. Furthermore, we note that this problem is an instance of the more general ( C , + k )-MinEdgeAddition problem [1] in which we add k given non-edges in a graph belonging to a class  C and we want to compute a minimum C -completion of the resulting graph.
Computing a minimum completion of an arbitrary graph into a specific graph class is an important and well-studied problem with applications in areas involving graph modeling with missing edges due to lacking data, e.g., molecular biology and numerical algebra [2,3]. Unfortunately, minimum completions into many interesting graph classes, such as split graphs, chordal graphs and cographs, are NP-hard to compute [4,5,6,7,8]. This led researchers towards the computation of minimal completions [9,10,11,12,13,14,15,16], the solution of problems with restricted input [17,18,19,20,21], parameterized algorithms [22,23,24,25] and approximation algorithms [26].
A related field is that of the dynamic recognition (or on-line maintenance) problem on graphs: a series of requests for the addition or the deletion of an edge or a vertex (potentially incident on a number of edges) are submitted and each is executed only if the resulting graph remains in the same class of graphs. Several authors have studied this problem for different classes of graphs and have given algorithms supporting some or all the above operations [27,28,29,30,31].
The motivation of our work is that many classes of perfect graphs arise quite naturally in real-world applications. More specifically, split, cographs, threshold, quasi-threshold, P 4 -sparse graphs are used in computer storage optimization, analysis of genetic structure, information hiding, synchronization of parallel processes, etc [32]. The classes of threshold and quasi-threshold graphs find applications in set-packing problems, parallel processing and resource allocation problems [33,34,35]. The importance of the study of P 4 -sparse graphs in practical applications is due to the fact that graphs that are unlikely to have more than a few chordless paths of length 3 appear in a number of contexts [36]; applications in scheduling, clustering and computational semantics have been the driving forces behind the study of P 4 -sparse graphs, as well as their natural generalization of cographs, which have a nice tree structure and bounded clique width, implying efficient algorithms for several problems [37,38,39,40].
In this paper, we consider the tail addition problem, a special case of the general completion problem and we show that it admits minimum completions for the classes of split, threshold, quasi-threshold and P 4 -sparse graphs. Given the ( K , S )-partition of a given split graph or the tree representation of a given quasi-threshold, threshold or P 4 -sparse graph, our algorithms run in optimal O ( n ) time where n is the number of vertices of G. These algorithms are a first step towards the solution of the ( C , + 1 )-MinEdgeAddition problem [1] for each of these four classes  C of graphs.

2. Theoretical Framework

We consider finite undirected graphs with no loops or multiple edges. For a graph G, we denote by V ( G ) and E ( G ) the vertex set and edge set of G, respectively. The subgraph of G induced by a subset S of vertices of G is denoted G [ S ] . The neighborhood  N G ( x ) of a vertex x of the graph G is the set of all the vertices of G which are adjacent to x. The closed neighborhood of x is defined as N G [ x ] : = N G ( x ) { x } . The degree of a vertex x in G, denoted d e g G ( x ) , is the number of vertices adjacent to x in G; thus, d e g G ( x ) = | N G ( x ) | . A vertex of a graph is universal if it is adjacent to all other vertices of the graph. We extend this notion to a subset of the vertices of a graph G and we say that a vertex is universal in a set  S V ( G ) , if it is universal in the induced subgraph  G [ S ] .
Finally, 2 K 2 is the disconnected graph on 4 vertices in which each vertex is incident on exactly 1 edge and P k ( C k resp.) denotes the chordless path (chordless cycle resp.) on k vertices; in each P 4 , the unique edge incident on its first or last vertex is called a wing.

3. Split Graphs

Split graphs were first studied by Földes and Hammer [41] and independently introduced by Tyshkevich and Chernyak [42]; since then, they have been the focus of many research papers. An undirected graph G is split if its vertex set  V ( G ) admits a partition K S such that K induces a clique and S induces an independent set [32,43]; the partition into K , S can be computed in time proportional to the size of the graph [44]. It also holds that a graph is split if and only if it contains no induced C 4 , C 5 or 2 K 2 . As a result of the definition, the complement and every induced subgraph of a split graph is split.
Lemma 1.
Let G be a split graph with vertex partition into a clique K and an independent set S, u a vertex of G, u w a tail and Q K , S the set of vertices in K that have no neighbors in S. Then, in a minimum split-completion of the graph  G + u w , the number of fill edges (excluding the tail  u w ) is 0 if u K , | K | d e g G ( u ) if u S and Q K , S = and | K | 1 d e g G ( u ) if u S and Q K , S .
Proof. 
If u K , no fill edge (in addition to u w ) is needed, which is optimal, since G + u w is a split graph with clique K and independent set  S { w } . Below, we consider that u S .
First, assume that Q K , S = . A split completion of G + u w can be obtained by connecting u to all its non-neighbors in K; the resulting graph is split with clique  K { u } and independent set  S { w } . To prove its optimality, suppose for contradiction that there existed a split completion of G + u w that uses fewer than | K | d e g G ( u ) fill edges. Then, there would exist a vertex a K N G ( u ) which is not incident on any fill edge. If there existed one more vertex b K ( N G ( u ) { a } ) not incident on any fill edge as well, then the edges a b and u w would form a 2 K 2 , a contradiction. Thus, all the fill edges would be incident on the vertices in K ( N G ( u ) { a } ) ; note that these vertices induce a clique in G. However, then, because Q K , S = , there exists z S N G ( a ) and the edges a z and u w would form a 2 K 2 , a contradiction again.
Next assume that u S and Q K , S ; let p be any vertex in Q K , S . Then, the graph G is split with clique  K = K { p } and independent set  S = S { p } and for each  x K , it holds that N G ( x ) S , which implies that Q K , S = . Then, from the case for u S and Q K , S = , we conclude that the number of fill edges (excluding u w ) in a minimum split-completion of G + u w is | K | d e g G ( u ) = | K | 1 d e g G ( u ) .    □
We note that the above case is a special case of the minimum completion for the vertex addition case in [28].
Lemma 1 directly implies that given a split partition of the given graph G with a maximal independent set, the minimum number of fill edges can be computed in O ( | V ( G ) | ) time; otherwise, the time complexity is O ( | V ( G ) | + | E ( G ) | ) .

4. Threshold and Quasi-Threshold Graphs

Threshold Graphs. A well-known subclass of perfect graphs called threshold graphs are those whose independent vertex set subsets can be distinguished by using a single linear inequality: a graph G is threshold if there exists a threshold assignment [ α , t ] consisting of a labeling α of the vertices by non-negative integers and an integer threshold t such that a set  S V ( G ) is independent if and only if α ( v 1 ) + α ( v 2 ) + + α ( v p ) t where v i S , 1 i p . Chvátal and Hammer [33] first proposed threshold graphs in 1973 and proved that the threshold graphs are precisely the graphs that contain no induced C 4 , P 4 or  2 K 2 .
Nikolopoulos [45] proved that every threshold graph admits a unique rooted tree representation as shown in Figure 1(left): each tree node stores a vertex set V i , j (these sets partition the vertex set of the graph) with each V i , 1 inducing a clique and each of the remaining sets containing a single vertex (note that the tree nodes that store these singleton sets have no descendants) and the vertices in the union of the sets stored in the nodes on a path from a tree node to any one of its descendants induce a clique. Thus, the vertices in V k , 1 are adjacent to all the vertices in i > k V i , j , the vertices in i V i , 1 induce a clique and the vertices in i j 2 V i , j form an independent set.
Regarding the addition of a tail to a threshold graph, we show the following lemma.
Lemma 2.
Let G be a threshold graph and let the nodes of its tree representation  T G store the sets  V i , j for all 0 i h and 1 j k i where k 0 = 1 and k i 2 for i 1 (Figure 1(left)). Consider the addition of a tail  u w where u V ( G ) . Then, there exists a minimum threshold completion of the graph  G + u w which uses f fill edges (excluding the tail  u w ) where:
(i) 
If u V p , 1 , then f = min 0 p s = + 1 p ( k s 1 ) + s = 0 1 | V s , 1 | ;
(ii) 
If u V p , j where 2 j k p , then f = min { f 1 , f 2 } where
f 1 = r = p h | V r , 1 | + min p h s = + 1 h ( k s 1 ) + s = 0 1 | V s , 1 | and
f 2 = r = p h | V r , 1 | + min 0 p 1 s = + 1 h ( k s 1 ) + s = 0 1 | V s , 1 | 1 .
Proof. 
Let G O P T be a minimum threshold completion of the graph  G + u w whose tree representation  T O P T has nodes storing sets V i , j where 0 i h , 1 j k i where k 0 = 1 and k i 2 for i 1 ; moreover, let K = s = 0 h V s , 1 and S = s = 1 h t = 2 k s V s , t = ( V ( G ) { w } ) K . Below, we give the properties of the structure of T O P T .
Since u , w are adjacent in G O P T , u , w cannot both belong to S . Additionally, we can assume that u K ; if u S then w K which implies that N G O P T [ u ] K N G O P T [ w ] and thus we can exchange u and w, obtaining a threshold completion of G + u w using the same number of fill edges in which u K . The u , w exchange can also be applied if u V i , 1 and w V j , 1 with i > j ; thus, if u , w K with u V i , 1 and w V j , 1 , we can assume that i j .
In fact, it is not possible that both u , w belong to K unless V h , 1 = { u , w } : if u , w V h , 1 and | V h , 1 | > 2 , then if we replace the treenode containing the set V h , 1 by the 3-treenode subtree with V h , 1 = { u } , V h + 1 , 1 = V h , 1 { u , w } and V h + 1 , 2 = { w } , we obtain a threshold completion of G + u w using fewer fill edges than in G O P T , a contradiction; if u V i , 1 where i < h , then, if w V p , 1 with p > i or if w V p , q where p > i + 1 and q 2 , we move w in a new set  V i + 1 , k i + 1 + 1 and thus obtain fewer fill edges again. Hence, u V i , 1 and either i = h and V h , 1 = { u , w } or i < h and w V i + 1 , j with j 2 . We consider separately these two cases:
A.
Consider that u V i , 1 with i < h and w V i + 1 , j with j 2 . Then, V i , 1 = { u } since otherwise removing u , w from T O P T (note that if k i + 1 = 2 then the set V i , 1 { u } is merged with the set  V i + 1 , 1 ) and then reinserting them as in the formation of Figure 1(right) just above the node storing V i , 1 { u } would lead to the omission of the fill edges connecting w to the vertices in V i , 1 { u } , in contradiction with the optimality of  G O P T .
Let B = s = i + 1 h t = 1 k s V s , t ; the set B contains the vertices (including w) stored in all the descendants in T O P T of the node storing { u } . Let r be the smallest index such that there exists a vertex z V r , 1 B and let X = s = r + 1 h t = 1 k s V s , t ; note that V r , 1 X N G [ z ] . Then, V r , 1 X B , since otherwise any vertex in D = B ( V r , 1 X ) would belong to s = 0 i 1 V s , 1 (because D N G [ z ] ) and thus would be incident on a fill edge connecting it to w in G O P T ; this would imply that G O P T is not optimal compared to replacing G O P T [ B V r , 1 D { u } ] by G [ ( B { w } ) V r , 1 D ] along with u being universal in B V r , 1 D and w being adjacent to all vertices in { u } ( ( s = 0 i 1 V s , 1 ) D ) which does not use the fill edges connecting w to the vertices in D. In the same way, we can show that if u V p , 1 , the vertices in s = p + 1 h t = 1 k s V s , t also belong to B .
The optimality of G O P T also implies that the subtree resulting from T O P T after having removed the descendants of the node storing { u } is identical to the tree for G [ V ( G ) ( B V r , 1 D ) ] = G { u } s = 0 r 1 t = 1 k s V s , t t = 2 k r V r , t with the node for { u } placed at the leftmost node in the lowermost level. Therefore,
if u V p , 1 , the tree  T O P T results from the tree  T G of G after we have removed u from V p , 1 and have inserted the Formation of Figure 1(right) just above any of the nodes storing the set  V s , 1 for s = 0 , , p (note that if V p , 1 = { u } , then the removal of u implies that the nodes storing V p + 1 , t for 2 t k p + 1 are linked to the node of the formation of Figure 1(right) storing { u } if the formation is placed just above the node storing V p , 1 ; otherwise, they are linked to the node storing  V p 1 , 1 );
if u V p , j with j 2 , the tree  T O P T results from T G after we have removed the node for V p , j and have inserted the formation of Figure 1(right) just above any of the nodes storing the set  V s , 1 for s = 0 , , h (as mentioned, if p < h and k p = 2 , the removal of u implies that the nodes storing V p , 1 and V p + 1 , 1 will be merged and if p = h and k p = 2 , the removal of u implies that the node storing V p , 1 will be merged with the node storing { u } in the formation of Figure 1(right) if the formation is placed just above the node storing V p , 1 or with the node storing V p 1 , 1 in any other placement of the formation).
B.
Consider that V h , 1 = { u , w } . Then, it has to be the case that in G either u V h , 1 or u V p , j where j 2 . First, suppose, for contradiction, that u V p , 1 with p < h ; then, if we link a node storing { w } as a child of the node storing V p , 1 in T G , we obtain a threshold completion of the graph  G + u w with fewer fill edges, a contradiction. Next, if u V h , 1 then V h , 1 = { u } ; otherwise, in order to obtain V h , 1 = { u , w } in T O P T , we need to move all vertices in V h , 1 { u } into the set  V h 1 , 1 , thus adding the fill edges connecting these vertices to { w } t = 2 k h V h , t , but if we replace the node storing V h , 1 by the 3-treenode subtree with V h , 1 = { u } , V h + 1 , 1 = V h , 1 { u } and V h + 1 , 2 = { w } , we obtain a threshold completion of G + u w without these fill edges, a contradiction.
Next, we rely on the structure of the tree  T O P T shown above; we consider the two cases in the statement of the lemma; we have:
(i)
Consider that u V p , 1 in T G . We consider two cases:
(a)
Assume that p < h or if p = h and | V h , 1 | 2 . Then, we remove u from V p , 1 and add the formation of Figure 1(right) just above each node storing V , 1 for 0 p which results in fill edges connecting u to all vertices in s = + 1 p t = 2 k s V s , t and w to all vertices in s = 0 1 V s , 1 which yields the number of fill edges stated in the lemma taking into account that t = 2 k s | V s , t | = k s 1 .
(b)
Assume that p = h and V h , 1 = { u } . Then, we try
*
adding w in V h , 1 which results in fill edges connecting w to all vertices in s = 0 h 1 V s , 1 and
*
removing u from V h , 1 (and linking the nodes for the sets  V h , t for all t = 2 , , k h to the node storing V h 1 , 1 ) and adding the formation of Figure 1(right) just above each node storing V , 1 for 0 h 1 which results in the fill edges stated in Case (a) for p = h and 0 h 1 .
Combining the two cases, we obtain the number of fill edges stated in the lemma in this case too.
(ii)
Consider that u V p , j where 2 j k p . Then, we remove u (that is, we assume that V p , j becomes empty) and add the formation of Figure 1(right) just above each node storing V , 1 for 0 h which results in fill edges connecting u to all vertices in ( r = p h V r , 1 ) s = + 1 h t = 2 k s V s , t and w to all vertices in s = 0 1 V s , 1 which yields the number of fill edges stated in the lemma taking into account that t = 2 k s | V s , t | = k s 1 and that if < p we must subtract 1 for the removed u.
   □
The number of fill edges in Lemma 2 results from using the formation in Figure 1(right) above each node in the path from the node storing V p , 1 to the root of T G in Case (i) and above each node in the path from the node storing V h , 1 to the root of T G in Case (ii) taking into account the removal of the node storing the set  V p , j = { u } .
Lemma 2 implies that given the tree representation  T G of the given threshold graph G, the minimum number of fill edges can be computed in O ( | V ( G ) | ) time; otherwise, the time complexity is O ( | V ( G ) | + | E ( G ) | ) .
Quasi-threshold Graphs. A graph G is called quasi-threshold or QT-graph for short, if G contains no induced C 4 or P 4 [34,46,47,48]. The class of quasi-threshold graphs is a subclass of the class of cographs and properly contains the class of threshold graphs [32,49,50,51]. Brades et al. [52] proposed the heuristic Quasi-Threshold Mover algorithm to solve the problem of transforming a given graph into a quasi-threshold graph using a small number of edge additions and deletions, which they later used to solve the inclusion-minimal version of the problem [53].
Nikolopoulos and Papadopoulos [54] have shown, among other properties, a unique rooted tree representation of QT-graphs which is a generalization of the tree representation of threshold graphs (Figure 2): the tree nodes store disjoint vertex subsets, each inducing a clique and the vertex sets stored in the tree nodes on a path from a tree node to any of its descendants, induce a clique. It has been proven that a graph is QT-graph if and only if it admits such a tree representation [55,56]. Then, by generalizing the approach in Case (i) of Lemma 2, we can show the following lemma.
Lemma 3.
Let G be a QT-graph and T G its tree representation. Moreover, let u be a vertex of G for which we assume without loss of generality that u V p , 1 and that the vertex sets stored in the tree nodes on the path from the root of T G to the node storing V p , 1 are in order V 0 , 1 , V 1 , 1 , , V p , 1 . Consider the addition of a tail  u w to G. Then, any minimum QT completion of the graph  G + u w uses min 0 p s = + 1 p t = 2 k s | V s , t | + s = 0 1 | V s , 1 | fill edges (excluding the tail u w ).
As previously, Lemma 3 implies that given the tree representation of the given quasi-threshold graph G, the minimum number of fill edges can be computed in O ( | V ( G ) | ) time; otherwise, the time complexity is O ( | V ( G ) | + | E ( G ) | ) .

5. P 4 -Sparse Graphs

A graph in which every set of five vertices induces at most one P 4 is P 4 -sparse [57] (Figure 3 depicts the seven forbidden subgraphs for the class of P 4 -sparse graphs). The P 4 -sparse graphs are perfect and also perfectly orderable [57] and properly contain many graph classes, such as the cographs, the P 4 -reducible graphs, etc (see [37,38,58]). They have received considerable attention in recent years and find applications in applied mathematics and computer science (e.g., communications, transportation, clustering, scheduling, computational semantics) in problems that deal with graphs featuring “local density” properties.
For a P 4 -sparse graph, either the graph or its complement is disconnected with the connected components inducing P 4 -sparse graphs or it induces a spider. A graph H is called a spider if its vertex set  V ( H ) admits a partition into sets S , K , R such that:
  • The set S is an independent set, the set K is a clique and | S | = | K | 2 ;
  • Every vertex in R is adjacent to every vertex in K and to no vertex in S;
  • There exists a bijection f : S K such that for each vertex  s S either N G ( s ) K = { f ( s ) } or N G ( s ) K = K { f ( s ) } ; in the former case, the spider is thin, in the latter it is thick (see Figure 4).
Note that for | S | = | K | = 2 , the spider is simultaneously thin and thick. To avoid ambiguity, in the following, for thick spiders we assume that | K | 3 .
In [38], Jamison and Olariu showed that each P 4 -sparse graph G admits a unique tree representation, up to isomorphism, called the P 4 -sparse tree T ( G ) of G, which is a rooted tree such that:
(i)
Each internal node of T ( G ) has at least two children provided that | V ( G ) | 2 ;
(ii)
The internal nodes are labeled by one of 0, 1 or 2 (0-, 1-, 2-nodes, respectively) and the parent node of each 0- or 1-node t has a different label than t;
(iii)
The leaves of the P 4 -sparse tree are in a one-to-one correspondence with the vertices of G; if the least common ancestor of the leaves corresponding to two vertices v i , v j of G is a 0-node (1-node, resp.) then the vertices v i , v j are non-adjacent (adjacent, resp.) in G, whereas the vertices corresponding to the leaves of a subtree rooted at a 2-node induce a spider.
The structure of the P 4 -sparse tree implies the following lemma.
Lemma 4.
Let G be a P 4 -sparse graph and let H = ( S , K , R ) be a thin spider of G. Moreover, let s S and k K be vertices that are adjacent in the spider.
P1. 
Every vertex of the spider is adjacent to all vertices in N G ( s ) { k } .
P2. 
Every vertex  z K { k } is adjacent to all vertices in N G ( k ) { s , z } .
Let G be a given graph to which we want to add the tail  u w with u V ( G ) . Let t 0 t 1 t h u be the path from the root  t 0 of the P 4 -sparse tree  T G of G to the leaf associated with u. Moreover, let V i ( 0 i < h ) be the set of vertices associated with the leaves of the subtrees rooted at the children of t i except for t i + 1 , and V h be the set of vertices associated with the leaves of the subtrees rooted at the children of t h except for the leaf associated with u (see Figure 5). The sets  V 0 , V 1 , , V h form a partition of V ( G ) { u } .
We show that there always exists a minimum P 4 -sparse completion of the graph G + u w in which u and w appear together in a small number of different formations.
Lemma 5.
Let G be a P 4 -sparse graph and T G be its P 4 -sparse tree. Consider the addition of a tail  u w incident on a node u of G. Then, there exists a minimum P 4 -sparse completion  G of the graph  G + u w such that for the P 4 -sparse tree  T G of G , one of the following three cases holds:
1.
The nodes u , w in T G have the same parent node which is a 2-node corresponding to a thin spider ( S , K , R ) with u K and w S .
2.
The P 4 -sparse tree  T G results from T G by replacing the leaf for u by the 3-treenode Formation 1 shown in Figure 6(left).
3.
The P 4 -sparse tree  T G results from T G by removing the leaf for u and replacing a 1- or a 2-node t in the path from the root of T G to the leaf for u by the 5-treenode Formation 2 in Figure 6(right).
Proof. 
Let G O P T be a minimum P 4 -sparse completion of the graph  G + u w and let T O P T be its P 4 -sparse tree. We consider the following cases:
A.
The leaves associated with u , w in T O P T do not have the same parent node: Let T R be the P 4 -sparse tree obtained from T O P T by using Formation 2 just above the least common ancestor t of w and u in T O P T (Figure 7); let G R be the P 4 -sparse graph corresponding to the tree  T R . Then, G R uses no more fill edges than T O P T . To see this, let t be the child of t that is an ancestor of the leaf for u (note that t may coincide with the leaf for u). Since u , w are adjacent in G O P T , t is a 1- or a 2-node. In either case, w is adjacent to all vertices in ( Z { u } ) X corresponding to the leaves of the subtree of T O P T rooted at t and all these edges, except for the tail  u w , are fill edges. If t is a 1-node, then u is adjacent to all vertices in X (Figure 7) and thus G R uses no more fill edges than G O P T . If t is a 2-node, then u is adjacent to all the vertices in the clique  K X of the corresponding spider (which includes w). Moreover, because w K X , w is adjacent to all the vertices in K X { w } and to at least one vertex in the independent set for a total of | K X | fill edges; these fill edges can be used to connect u to the vertices in the independent set of the spider and thus G R uses no more fill edges in this case too. Therefore, the graph  G R is a minimum P 4 -sparse completion of G + u w .
Recall that in the P 4 -sparse tree  T G of G, the path from the root  t 0 to u is t 0 t 1 t h u and V i ( 0 i h ) is the set of vertices associated with the leaves of the subtrees rooted at the children of t i except for t i + 1 (where t h + 1 is the leaf associated with u); see Figure 5.
We first observe that the induced subgraph  G R [ Z ] induced by the set of vertices Z corresponding to the leaves of the subtree of T R rooted at node t coincides with the induced subgraph  G [ Z ] (otherwise, G O P T would include fill edges that could be removed in contradiction to its optimality); then, let t = t k . It also holds that node t in T R is a 1- or a 2-node, since node t was a 1- or a 2-node in T O P T , as well. Let A = V ( G ) ( Z { u } ) . Note that there is no set  V j such that x V j A , y V j Z and x is a neighbor of u in G; otherwise, we can move x to Z together with y; because y is in Z, all adjacencies from y to all the vertices in V ( G ) ( V j { u } ) in G are maintained and this will also hold for x and the fill edge  x w will be removed, a contradiction to the optimality of G R . Similarly, there is no set  V j such that x V j A , y V j Z and y is a non-neighbor of u in G; otherwise, we can move y to A together with x, thus omitting the fill edge  u y . This implies that for each i = 0 , 1 , , h , either V i A or V i Z and since t = t k , V k Z .
Finally, there exists no j > k such that V j A . Suppose that there existed such a V j and let j be the largest such index. Then, because t = t k is a 1- or a 2-node and k < j , there would exist a vertex z V k which would be adjacent to all vertices in V j . This implies that in T R , the least common ancestor of z and the vertices in V k would be a 1-node; thus, u and w would be adjacent to all vertices in V j and if we moved V j to Z then we would have fewer fill edges, a contradiction to the optimality of G R . Therefore, the tree  T R is as described in Case 3 of the statement of the lemma.
B.
The leaves associated with u , w in T O P T have the same parent node p: Then, since u , w are adjacent, the parent node p is either a 1-node or a 2-node.
(i)
The parent node p of u , w in T O P T is a 1-node: Then, the leaves associated with u and w are the only children of p (Formation 1): otherwise, we can use Formation 2 as shown in Figure 8 which requires fewer fill edges. Then, w will be adjacent to all neighbors of u in T O P T ; this and the optimality of G O P T imply that T O P T results from T G by replacing the leaf for u by Formation 1.
(ii)
The parent node p of u , w in T O P T is a 2-node: Let H = ( S , K , R ) be the corresponding spider. If H is thick (thus | K | 3 ), then no matter whether the tail  u w is an S-K, K-K or R-K edge, the sum of degrees of u , w in H (excluding u w ) is at least | V ( H ) | 3 + | K | 2 (consider an S-K edge). However, we would have added no more fill edges if we had made u universal in G [ V ( H ) { w } ] and then applied Formation 2 at the parent of the leaf for u (then Z = V ( H ) { u , w } ) using | V ( H ) | 2 | V ( H ) | + | K | 5 fill edges.
In the same way, we show that we would have added no more fill edges if H were a thin spider and the tail  u w were a K-K or K-R edge. Then, either u K and w S or u S and w K ; in the latter case, we exchange u and w for the same total number of fill edges and obtain u K and w S again.
   □

5.1. Adding a Tail to a Spider

In this section, we consider adding a tail  u w to a spider  H = ( S H , K H , R H ) where u V ( H ) . In the following two lemmas, we address the cases of a thin or a thick spider H, respectively.
Lemma 6.
Consider the addition of a tail  u w to a thin spider  H = ( S H , K H , R H ) where u is a vertex of H. Then, for the number f of fill edges (excluding the tail  u w ) in a minimum P 4 -sparse completion of the graph  H + u w , the following holds:
1.
if u S H , f = | K H | 1 if R H = and f = | K H | otherwise;
2.
If u K H , f = | K H | 1 ;
3.
If u R H , Then f = min { | R H N H [ u ] | , | K H | + f } where f is the number of fill edges (excluding u w ) in a minimum P 4 -sparse completion of the graph  H [ R H ] + u w .
Proof. 
1. Let v K H be the neighbor of u in H. Then, we can obtain a P 4 -sparse graph as follows: if R H = , we connect u to all vertices in K H { v } (we obtain a thin spider with S = ( S H { u } ) { w } , K = ( K H { v } ) { u } and R = { v } ; that is, the tail  u w is a wing of a P 4 of a thin spider); otherwise, we connect v to all vertices in { w } ( S H { u } ) , which makes v universal in V ( H ) { w } and u , w form a separate connected component in G [ V ( G ) { v } ] ; the total number of fill edges (excluding the tail  u w ) is precisely | K H | 1 if R H = and K H otherwise.
Moreover, this is the minimum number of fill edges (excluding u w ) needed. First, we note that for each pair k i , s i where k i K H { v } and s i S H { u } , the vertices v , u , w , k i , s i define an F 5 or an F 3 depending on whether the vertices v , w are adjacent or not, which implies that at least | K H | 1 fill edges (excluding u w ) are needed. Then, if there is a way of obtaining a P 4 -sparse graph by adding fewer than the number of fill edges mentioned in Case 1 of the statement of the lemma, it has to be the case that (i)  R H , (ii) each pair k i , s i where k i K H { v } and s i S H { u } is incident on exactly 1 fill edge and (iii) no more fill edges exist. Let r R H and k K H { v } . Then, the vertices v , u , w , k , r induce a forbidden subgraph (an F 5 if k is non-adjacent to both u , w or an F 6 ( F 1 , resp.) if k becomes adjacent to u (w, resp.) by means of a fill edge); thus, at least K H fill edges are needed in this case.
2. Let v S H be the neighbor in H of u K H . Then, connecting u to all vertices in S H { v } (which makes u universal in H) or connecting w to all vertices in K H { u } yields a P 4 -sparse graph. Moreover, this is the minimum number of fill edges (excluding the tail  u w ) that need to be added. Suppose, for contrast, that we obtain a P 4 -sparse graph after having added fewer than | K H | 1 fill edges (excluding u w ) to the thin spider H. Then, there exists a pair of adjacent vertices  s , k with s S H { v } and k K H { u } such that neither s nor k is incident on a fill edge. Then, the vertices u , v , w , s , k induce a forbidden subgraph  F 5 or F 3 if w and v are adjacent or not, respectively, a contradiction.
3. The term  R H N H [ u ] corresponds to making u universal in H [ R H ] , in which case the resulting graph is P 4 -sparse (it is a thin spider with S = S H { w } , K = K H { u } and R = R H { u } ). The term  | K H | + f corresponds to adding | K H | fill edges connecting w to the vertices in K H and then computing a minimum P 4 -sparse completion of the graph  H [ R H ] + u w . Note that no minimum P 4 -sparse completion of H + u w exists with u not being universal in R H and with using fewer than | K H | fill edges incident on the vertices in S H K H : if there were such a minimum P 4 -sparse completion  H of H + u w , then in H , there would exist a non-neighbor  r R H and a pair of adjacent vertices s , k where s S H and k K H such that neither s nor k would be incident on a fill edge; but then, in H , the vertices u , w , r , s , k induce an F 4 or an F 3 if w , r have been connected by a fill edge or not, respectively, which leads to a contradiction. In turn, if H has at least | K H fill edges incident on vertices in S H K H then H [ R H { w } ] would be P 4 -sparse using fewer than f fill edges in contradiction to the minimality of f .    □
(If u R H , the former case corresponds to making u universal in G [ R H ] and the latter to inserting w in R H by making it adjacent to all the vertices in K H . Furthermore, note that if u R H and u’s parent node is the 2-node corresponding to the thin spider H, then R H = { u } and no fill edges are needed.)
Lemma 7.
Consider the addition of a tail  u w to a thick spider H = ( S H , K H , R H ) where u is a vertex of H. Then, for the number f of fill edges (excluding the tail  u w ) in a minimum P 4 -sparse completion of the graph  H + u w , the following holds:
1.
If u S H ,
f = | K H | 1 = 2 i f   | K H | = 3   a n d   R H = | K H | = 3 i f   | K H | = 3   a n d   | R H | = 1 | K H | + 1 = 4 i f   | K H | = 3   a n d   | R H | 2 | K H | i f   | K H | 4   a n d   R H = | K H | + 1 i f   | K H | 4   a n d   | R H | 1 ;
2.
If u K H , f = 1 ;
3.
If u R H , then f = | K H | + f where f is the number of fill edges (excluding u w ) in a minimum P 4 -sparse completion of the graph  H [ R H ] + u w .
Proof. 
1. Let v K H be the non-neighbor of u in H. Let us first consider the case | K H | = 3 . If | R H | 2 , we can obtain a P 4 -sparse graph after having added the fill edges v u and v w (this implies that v becomes universal in ( V ( H ) { v } ) { w } ) and those connecting u to the vertices in R H if R H is non-empty; then the vertices in ( V ( H ) { v } ) { w } induce a thin spider with K = ( K H { v } ) { u } , S = ( S H { u } ) { w } and R = R H , for a total of | K H | 1 + | R H | fill edges (excluding the tail  u w ). If | R H | 2 , a P 4 -sparse graph is obtained after in addition to the tail  u w we add the fill edges v u , v w (again v is universal in ( V ( H ) { v } ) { w } ) and the fill edges connecting w to the vertices in K H { v } (then the vertices in ( V ( H ) { v } ) { w } induce a thin spider with K = K H { v } , S = S H { u } and R = R H { u , w } ), for a total of | K H | + 1 fill edges (excluding u w ).
Now, consider the case that | K H | 4 . If | R H | 1 , we obtain a P 4 -sparse graph after having made u universal by connecting it to the remaining vertices in S H by using | K H | 1 fill edges and adding the fill edge  u v and those connecting u to the vertices in R H if R H is non-empty, for a total of | K H | + | R H | fill edges (excluding u w ). If | R H | 1 , a P 4 -sparse graph is obtained after having made v universal (by adding the fill edges  v u and v w ) and after having connected w to all vertices in K H { v } (then the vertices in ( V ( H ) { v } ) { w } induce a thick spider with K = K H { v } , S = S H { u } and R = R H { u , w } ) for a total of | K H | + 1 fill edges (excluding u w ).
Below we show the minimality of this solution. Recall that v K H is the non-neighbor of u in H. We consider each of the five cases.
(i)
| K H | = 3 and R H = : Suppose, for contrast, that there is a P 4 -sparse completion of H + u w with at most | K H | 2 = 1 fill edge (excluding u w ). If v is incident on the unique fill edge (which connects v to u or w), then the vertices in S { v , w } induce an F 3 . Now suppose that the fill edge is not incident on v. Moreover, there exists at least one vertex s S H { u } that is not incident on the fill edge either. Then, the vertices u , v , w , s , k (where k K H is the non-neighbor of s in H) induce an F 5 if k , w are connected by the fill edge or an F 2 otherwise.
(ii)
| K H | = 3 and | R H | = 1 : Let R H = { r } . Suppose, for contrast, that there is a P 4 -sparse completion of H + u w with at most | K H | 1 = 2 fill edges (excluding u w ). We distinguish three cases depending on whether v is incident on 0, 1 or 2 fill edges:
v is not incident on a fill edge: If there exists a pair  s , k of non-neighbors with s S H { u } and k K H { v } such that none of s , k is incident on a fill edge to u or w, the vertices u , v , w , s , k induce an F 2 . Otherwise, since the number of such pairs is 2, for each such pair  s , k , exactly one of s , k is incident on a fill edge to u or w and no other fill edges exist. If there exists a vertex k K H { v } not incident on a fill edge to w, the vertices u , v , w , k , r induce an F 5 ; otherwise, each of the fill edges connects each of the vertices in K H { v } to w and then u , v , w , s , k (for any pair  s , k of non-neighbors with s S H { u } and k K H { v } ) induce an F 5 .
v is incident on 1 fill edge (to u or w): Then, there is 1 more fill edge; hence, there exist 2 vertices in the set  ( S H { u } ) { r } that are not incident on a fill edge connecting them to u or w and let these vertices be p 1 , p 2 . Then, the vertices u , v , w , p 1 , p 2 induce an F 5 if p 1 , p 2 are connected by a fill edge or an F 3 otherwise.
v is incident on 2 fill edges connecting it to u and w: Then, there is no other fill edge. Then, the vertices u , w , k , k , r (where { k , k } = K H { v } ) induce an F 6 .
(iii)
| K H | = 3 and | R H | 2 : Let r 1 , r 2 be two vertices in R H . Suppose, for contrast, that there is a P 4 -sparse completion of H + u w with at most | K H | = 3 fill edges (excluding u w ). Again, we distinguish three cases depending on whether v is incident on 0, 1 or 2 fill edges:
v is not incident on a fill edge: Consider the case that there exists a vertex  k K H { v } that is not incident on a fill edge to w. Let s S H be the non-neighbor of k in H and A = ( S H { u , s } ) { r 1 , r 2 } ; the set A contains 3 vertices which are common neighbors of v , k . If at least one of these 3 vertices (say, p) is not incident on a fill edge to u , w , then the vertices u , v , w , k , p induce an F 5 ; otherwise, all 3 of these vertices are incident on a fill edge to u , w (then these are all the fill edges) and the vertices u , v , w , s , k induce an F 2 . On the other hand, if no such vertex k exists, then both vertices in K H { v } are incident on a fill edge to w, accounting for 2 of the 3 fill edges; then there exists a vertex  s S H { u } which is not incident on a fill edge to w and the vertices u , v , w , s , k (where k K H is the non-neighbor of s ) induce an F 5 .
v is incident on 1 fill edge (to u or w): There are 2 more fill edges; hence, there exist 2 vertices in the set  ( S H { u } ) { r 1 , r 2 } that are not incident on a fill edge connecting them to u or w and let these vertices be p 1 , p 2 . Then, the vertices u , v , w , p 1 , p 2 induce an F 5 if p 1 , p 2 are connected by a fill edge or an F 3 otherwise.
v is incident on 2 fill edges connecting it to u and w: Then, there is 1 more fill edge; hence, there exists a vertex k K H { v } that is not incident on the fill edge. Moreover, there exist 2 vertices in the set  ( S H { u , s } ) { r 1 , r 2 } that are not incident on a fill edge connecting them to u or w (where s S H is the non-neighbor of k); let these vertices be p 1 , p 2 . Then, the vertices u , w , k , p 1 , p 2 induce an F 5 if p 1 , p 2 are adjacent or an F 3 otherwise.
(iv)
| K H | 4 and R H = : Suppose, for contrast, that there is a P 4 -sparse completion of H + u w with at most | K H | 1 fill edges (excluding the tail  u w ). Again, we distinguish three cases depending on whether v is incident on 0, 1 or 2 fill edges:
v is not incident on a fill edge: If there exists a vertex s S H { u } not incident on a fill edge to u, w or to its non-neighbor  k K H in H, the vertices u , v , w , s , k induce an F 5 if k , w are connected by a fill edge or an F 2 otherwise; if all vertices in S H { u } are incident on a fill edge to u, w or their non-neighbor in K H , then there are no more fill edges and the vertices u , v , w , k , k (for any k , k K H { v } ) induce an F 6 .
v is incident on 1 fill edge (to u or w): Then, the remaining fill edges are at most | K H | 2 in total. If there exist two vertices s 1 , s 2 S H { u } not incident on a fill edge to u or w, the vertices u , v , w , s 1 , s 2 induce an F 5 or an F 3 depending on whether s 1 , s 2 are connected by a fill edge or not. Thus, there cannot be two such vertices s 1 , s 2 ; this implies that the remaining fill edges are precisely | K H | 2 and they connect all but one vertex in S H { u } to u or w; let that vertex be s. Then, the vertices u , v , w , s , k (where k K H { v } is a neighbor of s in H) induce an F 6 or an F 1 if the fill edge incident on v connects it to u or w, respectively.
v is incident on 2 fill edges connecting it to u and w: Then, the remaining fill edges are at most | K H | 3 in total; hence, there exist two pairs of non-adjacent vertices s 1 , k 1 and s 2 , k 2 with s 1 , s 2 S H { u } and k 1 , k 2 K H { v } such that none of s 1 , s 2 , k 1 , k 2 are incident on a fill edge to u or w. Let A = S H { u , s 1 , s 2 } ; the set A is the set of | K H | 3 common neighbors of k 1 , k 2 in S H other than u. If there exists a vertex s A not incident on a fill edge to u or w, then the vertices u , w , k 1 , k 2 , s induce an F 6 ; otherwise, the remaining fill edges are precisely | K H | 3 and they connect each of the vertices in A to u or w; that is, none of the vertices in K H { v } are incident on a fill edge. Then, the vertices u , w , s 1 , s 2 , k (where k is any vertex in K H { v , k 1 , k 2 } ) induce an F 3 .
(v)
| K H | 4 and | R H | 1 : Let r R H . Suppose, for contrast, that there is a P 4 -sparse completion of H + u w with at most | K H | fill edge (excluding the tail  u w ). Again, w distinguishes three cases depending on whether v is incident on 0, 1 or 2 fill edges:
v is not incident on a fill edge: If there exists a vertex s S H { u } not incident on a fill edge to u, w or to its non-neighbor  k K H in H, the vertices u , v , w , s , k induce an F 5 if k , w are connected by a fill edge or an F 2 otherwise; if all vertices in S H { u } are incident on a fill edge to u, w or their non-neighbor in K H , which account for the | K H | 1 of the | K H | fill edges, there exist vertices k , k K H { v } which are not incident on a fill edge and then the vertices u , v , w , k , k induce an  F 6 .
v is incident on 1 fill edge (to u or w): Then, the remaining fill edges are at most | K H | 1 in total. If all vertices in K H { v } are incident on a fill edge to w, then no more fill edges exist and the vertices u , v , w , s 1 , s 2 (for any s 1 , s 2 S H { u } ) induce an F 3 . Thus, there exists k K H { v } which is not incident on a fill edge to w. The number of common neighbors of v , k in S H r is | K H | 1 . If each of these vertices is incident on a fill edge to u or w, then no more fill edges exist and the vertices u , v , w , s , k induce an F 6 or an F 1 depending on whether the fill edge incident on v connects it to u or w, respectively, where s S H is the non-neighbor of k and k is any vertex in K H { v , k } ; hence, there exists a common neighbor p not incident on a fill edge to u or w and the vertices u , v , w , k , p induce an F 6 or an F 1 depending on whether the fill edge incident on v connects it to u or w, respectively.
v is incident on 2 fill edges connecting it to u and w: Then, the remaining fill edges are at most | K H | 2 in total; hence, there exists a pair of non-adjacent vertices  s , k (where s S H { u } and k K H { v } ) which are not incident on a fill edge to u or w. Let A = ( S H { u , s } ) { r } ; the set A is a set of | K H | 1 neighbors of k other than u. Then, there exists a vertex  p 1 in A which is not incident on a fill edge to u or w. If there exists a second vertex  p 2 in A not incident on a fill edge to u or w, then the vertices u , w , k , p 1 , p 2 induce an F 5 if p 1 , p 2 are connected by a fill edge or an F 3 otherwise. If each vertex in A { p 1 } is incident on a fill edge to u or w, then the fill edges incident on these vertices account for the remaining | K H | 2 fill edges and the vertices u , w , s , k 1 , k 2 (for any vertices k 1 , k 2 K H { v , k } ) induce an F 6 .
Therefore, if we use fewer than the stated number of fill edges, in each case, the resulting graph contains an induced forbidden subgraph, a contradiction.
2. Let v S H be the non-neighbor of u in H. Then, we obtain a P 4 -sparse graph by connecting u to v; thus, u becomes universal in V ( H ) { w } . This is the minimum number of fill edges (excluding the tail  u w ) that need to be added since for any pair of non-neighbors s , k with s S H { v } and k K H { u } , the vertices u , v , w , s , k induce a forbidden subgraph  F 3 , a contradiction.
3. By connecting w to all vertices in K H and then computing a minimum P 4 -sparse completion of H [ R H { w } ] , we obtain a P 4 -sparse graph and the number of fill edges needed is | K H | + f .
To prove the minimality of this number of fill edges, suppose, for contrast, that we can obtain a P 4 -sparse graph from H + u w after having added at most | K H | 1 fill edges incident on vertices in S H K H (excluding the tail  u w ). Then, there exists a pair  s 1 , k 1 of non-neighbors in H with s 1 S H and k 1 K H , none of which is incident on a fill edge to u or w. We distinguish the following two cases that cover all possibilities.
  • Each of the vertices in K H { k 1 } is incident on a fill edge to w. These are precisely all the | K H | 1 fill edges; hence none of the vertices in S H { s 1 } is incident on a fill edge. Then, the vertices u , w , k 1 , s 2 , s 3 (for any s 2 , s 3 S H { s 1 } ) induce an F 3 .
  • There exists at least one vertex in K H { k 1 } that is not incident on a fill edge to w. Let that vertex be k 2 . Then, if there exists another vertex  k 3 K H { k 1 , k 2 } that is not incident on a fill edge to w as well, the vertices u , w , k 2 , k 3 , s 1 induce an F 6 . On the other hand, if each of the vertices in K H { k 1 , k 2 } is incident on a fill edge to w (which implies that k 3 is adjacent to w), then these fill edges are | K H | 2 in total, with only 1 remaining. If the non-neighbor  s 3 of k 3 in S H is not incident on a fill edge to u or w, then the vertices u , w , k 1 , k 2 , s 3 induce an F 6 , whereas if it is adjacent to u or w, then there are no more fill edges. In particular, if s 3 is adjacent to u, the vertices u , k 1 , k 3 , s 1 , s 3 induce an F 6 and if it is adjacent to w, the vertices u , w , k 2 , s 1 , s 3 induce an F 4 .
In each case, we get a contradiction. Thus every minimum P 4 -sparse completion of H + u w requires at least | K H | fill edges incident on vertices of S H K H . Now, if there exists a minimum P 4 -sparse completion  H of H + u w having fewer than | K H | + f fill edges, then the fact that at least | K H | of them are incident on vertices in S H K H implies that H [ R H { w } ] is P 4 -sparse using fewer than f fill edges in contradiction to the minimality of f .    □
If the (thin or thick) spider H belongs to a more general P 4 -sparse graph, then Lemmas 6 and 7 imply the following result.
Corollary 1.
Let u be a vertex of a P 4 -sparse graph to which we add the tail  u w . Let t 0 t h u be the path in the P 4 -sparse tree of G from the the root  t 0 to the leaf for u and let V 0 , , V h be the corresponding vertex sets as mentioned before. Then, if node  t i ( 0 i h ) is a 2-node corresponding to a spider H, the number of fill edges needed for a minimum P 4 -sparse completion of the graph  G + u w (excluding the tail  u w ) does not exceed the minimum number given by Lemmas 6 and 7 (if H is thin or thick, respectively) augmented by | ( V 0 V i 1 ) N G ( u ) | .
The number of fill edges given in Corollary 1 corresponds to doing a minimum P 4 -completion of the graph H + u w and not changing the rest of the P 4 -sparse tree  T G of G.

5.2. The Algorithm

Recall that t 0 t 1 t h u is the path in the P 4 -sparse tree  T G of G from the root  t 0 to the leaf for u and V i ( 0 i < h ) is the set of vertices associated with the leaves of the subtrees rooted at the children of t i except for t i + 1 and V h is the set of vertices associated with the leaves of the subtrees rooted at the children of t h except for the leaf corresponding to u (see Figure 5).
Next we prove the conditions under which a minimum P 4 -sparse completion of the graph  G + u w uses fewer fill edges than when using Formation 1 or 2.
Lemma 8.
There exists a minimum P 4 -sparse completion  G O P T of the graph G + u w which uses fewer fill edges than when using Formation 1 or 2 if and only if u w is a wing of a P 4 in G O P T which implies that
(i) 
either u is a vertex of a spider in G (Lemmas 6 and 7 apply)
(ii) 
or there exists j ( 0 j < h ) such that t j is a 1-node, t j + 1 is a 0-node and there exist vertices a , b such that a V j is universal in G [ V j ] and b V j + 1 is isolated in G [ V j + 1 ] .
Then, in G O P T , the vertices u , w , a , b induce a P 4 in a spider ( S , K , R ) with S = { w , b } , K = { u , a } and R = ( V j + 1 { b } ) V j + 2 V h .
Proof. 
If Formation 1 or Formation 2 cannot be used then Lemma 5 implies that u w is the wing of a P 4 in G O P T . If u is a vertex of a spider in G, then Lemmas 6 and 7 apply. So, below, assume that u is not a vertex of a spider in G.
For the tail  u w to be the wing of a P 4 in G O P T , we can show that there exist vertices x , y such that u x y is a P 3 in the graph G: if u , x , y do not all belong to the same connected component of G, then we could add the tail  u w to the connected component of G to which u belongs; thus, all the fill edges in G O P T incident on vertices in different connected components (among which is at least one of u x and u y ) will not be needed, a contradiction; if u , x , y belong to the same connected component of G but do not form a P 3 , then because u , y are not adjacent in G O P T and thus neither are in G, u , y are at distance 2 in G and there exists a P 3   u a y in G (note that u , y cannot be at distance  4 in G since then G would contain an induced P 5 = F 2 and they cannot be at distance 3 either since then there exists a P 4   u a b y in G and u would be a vertex of a spider in G).
Therefore, in the following, consider that the minimum P 4 -sparse completion  G O P T of G + u w contains an induced P 4   w u a b such that the graph G contains the induced P 3   u a b ; suppose that a V j and b V k . Then, since u , b are not adjacent in G O P T , they are not adjacent in G either and thus their least common ancestor  t k in the P 4 -sparse tree  T G of G is a 0-node; it cannot be a 2-node since then u would be a vertex of a spider. Moreover, a is a common neighbor of both u , b and thus the least common ancestor  t j of a , u in T G is a 1- or a 2-node (in the latter case, a is a vertex of the clique of the spider) and j < k .
Let us now try forming the P 4   w u a b , which clearly will belong to a spider, say W = ( S W , K W , R W ) . We show that | S W | = | K W | = 2 . First, note that the edge  a b cannot belong to a spider in G, since then u would belong to that spider as well (note that the vertices of G not belonging to a spider are either adjacent to all vertices of the spider or to none of them). So, suppose for contrast that the spider W has | S W | = | K W | 3 and let w , b , d S W and u , a , c K W with the corresponding S-K pairs being w and u, b and a and d and c. The spider W can be thin or thick.
  • The spider W is thin. Then, a b E ( G ) ; otherwise, the removal of a b would produce a P 4 -sparse graph with fewer fill edges (b is isolated in G [ V ( W ) ] ), a contradiction; similarly, c d E ( G ) . Moreover, a c E ( G ) : as above, if a , c do not belong to the same connected component of the induced subgraph  G [ V ( W ) ] , then adding the tail  u w to the connected component of G [ V ( W ) ] to which u belongs would result in fewer fill edges (e.g., the fill edge  a c will not be needed); if a , c belong to the same connected component of G [ V ( W ) ] but a c E ( G ) , then there exists a chordless path  ρ connecting them in the subgraph  G [ K W R W ] and the vertices in V ( ρ ) { b , d } induce a P with 5 , in contradiction to the P 4 -sparseness of G. However, then, G contains the P 4   b a k s and a b belongs to a spider.
  • The spider W is thick. Then, w S W is incident on the tail  u w and | K W | 2 1 fill edges. Since we can make u universal in G [ V ( W ) { w } ] by using a single fill edge and then use Formation 2, it is clear that building spider W does not result in fewer fill edges.
Thus, G O P T with a spider W with | K W | 3 has no fewer fill edges than if we use Formation 2. Therefore, the P 4   w u a b belongs to a spider with clique size equal to 2, which thus is thin. Then, Property P1 in Lemma 4 implies that w, u and a are adjacent to all the neighbors of b except for a in G O P T and thus at least to the neighbors of b except for a in G; thus, in G O P T ,
  • Fill edges connect vertex w to the vertices in ( ( V 0 V k 1 ) { a } ) N G ( b ) = [ ( V 0 V k 1 ) { a } ] N G ( u ) ;
  • Vertex u and w are adjacent to all neighbors of b in V k ; that is, fill edges connect u to the vertices in ( V k N G ( b ) ) N G ( u ) and w to the vertices in V k N G ( b ) ;
  • Vertex a is adjacent to all the vertices in ( V j N G ( b ) ) and thus fill edges connect a to all vertices in ( V j N G ( b ) ) N G [ a ] = ( V j N G ( u ) ) N G [ a ] .
Additionally, Property P2 in Lemma 4 implies that because a is adjacent to all the vertices in V j + 1 V h and to the vertices in V j N G ( a ) in G O P T (because it is adjacent to them in G), then so must be vertex u in G O P T ; thus, in G O P T , fill edges connect u to the vertices in ( V j + 1 V h ) N G ( u ) and to the vertices in ( V j N G ( a ) ) N G ( u ) (the set  ( V j N G ( a ) ) N G ( u ) is non-empty if and only if t j is a 2-node).
Now, let us consider using Formation 2 right below node  t j in the P 4 -sparse tree  T G of G; then, the number of fill edges is | ( V j + 1 V h ) N G ( u ) | + | ( V 0 V j ) N G ( u ) | ; the former term corresponds to fill edges incident on u, the latter to fill edges incident on w. Then, because j < k and | ( ( V 0 V k 1 ) { a } ) N G ( u ) | = | ( V 0 V k 1 ) N G ( u ) | 1 , the only possibility for G O P T to use fewer fill edges than using Formation 2 after node  t j requires that
  • k 1 = j k = j + 1 ;
  • ( V j N G ( u ) ) N G [ a ] = ;
  • V k N G ( b ) = which implies that b is isolated in G [ V k ] and also implies that ( V k N G ( b ) ) N G ( u ) = ;
  • ( V j N G ( a ) ) N G ( u ) = which implies that t j is a 1-node.
Requirement 4 implies that V j N G ( u ) = V j which together with Requirement 2 imply that N G [ a ] = V j ; that is, a is universal in G [ V j ] and we have the second case in the statement of the lemma.    □
Now we are ready to describe our algorithm for counting the number of fill edges in a minimum P 4 -sparse completion of the graph  G + u w . Note that every graph on 4 vertices is P 4 -sparse since every forbidden graph for the class of P 4 -sparse graphs has 5 vertices (Figure 3).
Algorithm 1 can be easily augmented to return a minimum cardinality set of fill edges. The correctness of the algorithm follows from Lemmas 5, 6, 7 and 8 and Corollary 1. Let G be the given graph and let n be the number of its vertices. If the P 4 -sparse tree  T G of G is given, an O ( n ) -time traversal of the tree enables us to compute the path t 0 t 1 t h u , the sets V 0 , , V h and the number of neighbors and non-neighbors of u in each of these sets; additionally, the height of T G is O ( n ) and thus h = O ( n ) . To avoid duplicate work in the recursive calls, we store the numbers of neighbors and non-neighbors of u in each of the sets V 0 , , V h for easy access and work from the highest 2-node and up, leaving the rest for the recursive call at that node. Since all conditions can be checked in O ( 1 ) -time, the entire algorithm runs in O ( n ) time.
Theorem 1.
Let G be a P 4 -sparse graph on n vertices and let u w be a tail attached at node u of G. If the P 4 -sparse tree of G is given, Algorithm P 4 -sparse-Tail-Addition computes the minimum number of fill edges to be added to G + u w so that the resulting graph is P 4 -sparse in O ( | V ( G ) | ) time.
If the P 4 -sparse tree  T G of G is not given, then it can be computed in O ( n + m ) time where m is the number of edges of G [37] and the entire algorithm takes O ( n + m ) time.
Algorithm 1  P 4 -sparse-Tail-Addition(G,u, u w )
Input: a P 4 -sparse graph G, a vertex  u V ( G ) and a tail  u w to be added to G.
Output: the number of fill edges (excluding the tail  u w ) needed in a minimum
      P 4 -sparse completion of the graph  G + u w .
if  | V ( G ) | 3  then    {the graph  G + u w is P 4 -sparse}
  return(0);
compute the P 4 -sparse tree  T G of G and the path  t 0 t 1 t h ( h 1 ) from the root t 0 of T G
to the parent node  t h of the leaf corresponding to u;
compute the sets of vertices V i , 0 i h (see Figure 5);
m i n | N G ( u ) | ;    {corresponds to Formation 1}
{apply (Lemma 5(iii) and Corollary 1}
for each t i ( i = 0 , 1 , , h ) that is a 1- or a 2-node do
   {use Formation 2 above each 1- or 2-node  t i (Lemma 5(iii))}
   | ( V 0 V i 1 ) N G ( u ) | + | ( V i V h ) N G ( u ) | ;
   update m i n if < m i n ;
   {if t i is a 2-node, apply Lemmas 6 or 7 and Corollary 1}
   if  t i is a 2-node then    {spider  H = ( S H , K H , R H ) }
     if  u S H K H then
       number of fill edges according to Lemmas 6 or 7;
     else    { u R H }
       if H is thin then
        min { | R H N H [ u ] | , | K H | + P 4 -sparse-Tail-Addition(H,u, u w ) };
       else    {H is thick}
        | K H | + P 4 -sparse-Tail-Addition(H,u, u w );
     + | ( V 0 V i 1 ) N G ( u ) | ;       {Corollary 1}
     update m i n if < m i n ;
{check for new P 4 formation (Lemma 8)}
for each i = 0 , 1 , , h 1 such that t i is a 1-node and t i + 1 is a 0-node do
   if there exist vertex  a V i such that a is universal in V i and
         vertex  b V i + 1 such that b has no neighbors in V i + 1 then
     | ( V 0 V i 1 ) N G ( u ) | + | V i { a } | + | V i + 1 { b } |
                 + | ( V i + 2 V h ) N G ( u ) | ;
     update m i n if < m i n ;
return( m i n );

6. Open Problems

An immediate open problem is to try to devise fast algorithms for the tail addition problem on other subclasses of perfect graphs such as interval, comparability and permutation graphs. Moreover, in light of the results in this paper, it would be interesting to try to extend our approach to the ( C , + 1 )-MinEdgeAddition problem [1] in which we want to compute a minimum C -completion of the graph that results after the addition of 1 given non-edge for the classes C of split, threshold, quasi-threshold and P 4 -sparse graphs, as well as for other graph classes.
Finally, it is worth investigating the complexity of the ( C , + k )-MinEdgeAddition problem for fixed k 1 for different classes C of graphs.

Author Contributions

All authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Hellenic Foundation for Research and Innovation (H.F.R.I.) under the “First Call for H.F.R.I. Research Projects to support Faculty members and Researchers and the procurement of high-cost research equipment grant”, Project FANTA (eFficient Algorithms for NeTwork Analysis), number HFRI-FM17-431.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Nikolopoulos, S.D.; Palios, L. Adding an Edge in a Cograph. In WG 2005, LNCS; Kratsch, D., Ed.; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3787, pp. 214–226. [Google Scholar]
  2. Goldberg, P.W.; Golumbic, M.C.; Kaplan, H.; Shamir, R. Four strikes against physical mapping of DNA. J. Comput. Biol. 1995, 2, 139–152. [Google Scholar] [CrossRef]
  3. Natanzon, A.; Shamir, R.; Sharan, R. Complexity classification of some edge modification problems. Discrete Appl. Math. 2001, 113, 109–128. [Google Scholar] [CrossRef] [Green Version]
  4. Burzyn, P.; Bonomo, F.; Durán, G. NP-completeness results for edge modification problems. Discrete Apll. Math. 2006, 154, 1824–1844. [Google Scholar] [CrossRef] [Green Version]
  5. El-Mallah, E.; Colbourn, C. The complexity of some edge deletion problems. IEEE Trans. Circuits Syst. 1988, 35, 354–362. [Google Scholar] [CrossRef]
  6. Kashiwabara, T.; Fujisawa, T. An NP-complete problem on interval graphs. In Proceedings of the IEEE Symposium of Circuits and Systems, Tokyo, Japan, 17–19 July 1979; pp. 82–83. [Google Scholar]
  7. Mancini, F. Graph Modification Problems Related to Graph Classes. Ph.D. Thesis, University of Bergen, Bergen, Norway, 2008. [Google Scholar]
  8. Yannakakis, M. Computing the minimum fill-in is NP-complete. SIAM J. Alg. Disc. Meth. 1981, 2, 77–79. [Google Scholar] [CrossRef]
  9. Crespelle, C. Linear-time minimal cograph editing. In Proceedings of the Fundamentals of Computation Theory: 23rd International Symposium, FCT 2021, Athens, Greece, 12–15 September 2021; Springer International Publishing: Cham, Switzerland, 2021; pp. 176–189. [Google Scholar]
  10. Crespelle, C.; Lokshtanov, D.; Phan, T.H.D.; Thierry, E. Faster and enhanced inclusion-minimal cograph completion. Discrete Appl. Math. 2021, 288, 138–151. [Google Scholar] [CrossRef]
  11. Fritz, A.; Hellmuth, M.; Stadler, P.F.; Wieseke, N. Cograph editing: Merging modules is equivalent to editing P4s. Art Discrete Appl. Math. 2020, 3, P2-01. [Google Scholar] [CrossRef] [Green Version]
  12. Heggernes, P.; Mancini, F. Minimal split completions. Discrete Appl. Math. 2009, 157, 2659–2669. [Google Scholar] [CrossRef] [Green Version]
  13. Heggernes, P.; Mancini, F.; Papadopoulos, C. Minimal comparability completions of arbitrary graphs. Discrete Appl. Math. 2008, 156, 705–718. [Google Scholar] [CrossRef] [Green Version]
  14. Heggernes, P.; Papadopoulos, C. Single-edge monotonic sequences of graphs and linear-time algorithms for minimal completions and deletions. Theoret. Comput. Sci. 2009, 410, 1–15. [Google Scholar] [CrossRef] [Green Version]
  15. Heggernes, P.; Telle, J.A.; Villanger, Y. Computing minimal triangulations in time O(nαlogn)=o(n2.376). SIAM J. Discrete Math. 2005, 19, 900–913. [Google Scholar] [CrossRef]
  16. Suchan, K.; Todinca, I. Minimal interval completion through graph exploration. Theoret. Comput. Sci. 2009, 410, 35–43. [Google Scholar] [CrossRef]
  17. Bodlaender, H.L.; Kloks, T.; Kratsch, D.; Müller, H. Treewidth and minimum fill-in on d-trapezoid graphs. J. Graph Alg. Appl. 1998, 2, 1–28. [Google Scholar] [CrossRef] [Green Version]
  18. Broersma, H.J.; Dahlhaus, E.; Kloks, T. A linear time algorithm for minimum fill-in and treewidth for distance hereditary graphs. Discrete Appl. Math. 2000, 99, 367–400. [Google Scholar] [CrossRef] [Green Version]
  19. Kloks, T.; Kratsch, D.; Spinrad, J. On treewidth and minimum fill-in of asteroidal triple-free graphs. Theoret. Comput. Sci. 1997, 175, 309–335. [Google Scholar] [CrossRef] [Green Version]
  20. Kloks, T.; Kratsch, D.; Wong, C.K. Minimum fill-in on circle and circular-arc graphs. J. Alg. 1998, 28, 272–289. [Google Scholar] [CrossRef]
  21. Meister, D. Computing treewidth and minimum fill-in for permutation graphs in linear time. In Proceedings of the 31st International Workshop on Graph-Theoretic Concepts in Computer Science (WG 2005), Metz, France, 23–25 June 2005; Volume 3787, pp. 91–102. [Google Scholar]
  22. Drange, P.G. Parameterized Graph Modification Algorithms. Ph.D. Thesis, University of Bergen, Bergen, Norway, 2015. [Google Scholar]
  23. Kaplan, H.; Shamir, R.; Tarjan, R.E. Tractability of parameterized completion problems on chordal and interval graphs: Minimum fill-in and physical mapping. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science (FOCS 2004), Rome, Italy, 17–19 October 2004; pp. 780–791. [Google Scholar]
  24. Mancini, F. Minimum fill-in and treewidth of split+ke and split+kv graphs. In Algorithms and Computation (ISAAC 2007); Tokuyama, T., Ed.; Springer: Berlin/Heidelberg, Germany, 2007; Volume 4835, pp. 881–892. [Google Scholar]
  25. Villanger, Y.; Heggernes, P.; Paul, C.; Telle, J.A. Interval completion is fixed parameter tractable. SIAM J. Comput. 2009, 38, 2007–2020. [Google Scholar] [CrossRef] [Green Version]
  26. Natanzon, A.; Shamir, R.; Sharan, R. A polynomial approximation algorithm for the minimum fill-in problem. In Proceedings of the 30th Annual ACM Symposium on Theory of Computing (STOC 1998), Dallas, TX, USA, 24–26 May 1998; pp. 41–47. [Google Scholar]
  27. Hell, P.; Shamir, R.; Sharan, R. A fully dynamic algorithm for recognizing and representing proper interval graphs. SIAM J. Comput. 2002, 31, 289–305. [Google Scholar] [CrossRef] [Green Version]
  28. Heggernes, P.; Mancini, F. Dynamically maintaining split graphs. Discrete Appl. Math. 2009, 157, 2047–2069. [Google Scholar] [CrossRef] [Green Version]
  29. Ibarra, L. Fully dynamic algorithms for chordal graphs and split graphs. ACM Trans. Alg. 2008, 4, 40. [Google Scholar] [CrossRef]
  30. Shamir, R.; Sharan, R. A fully dynamic algorithm for modular decomposition and recognition of cographs. Discrete Appl. Math. 2004, 136, 329–340. [Google Scholar] [CrossRef] [Green Version]
  31. Toyonaga, K.; Johnson, C.R.; Uhrig, R. Multiplicities: Adding a vertex to a graph. In Applied and Computational Matrix Analysis: MAT-TRIAD; September 2015 Selected, Revised Contributions 6; Springer International Publishing: Berlin/Heidelberg, Germany, 2017; pp. 117–126. [Google Scholar]
  32. Golumbic, M.C. Algorithmic Graph Theory and Perfect Graphs; Elsevier: Amsterdam, The Netherlands, 2004. [Google Scholar]
  33. Chvátal, V.; Hammer, P.L. Set-Packing and Threshold Graphs, Research Report CORR 73-21; University of Warerloo: Waterloo, ON, Canada, 1973. [Google Scholar]
  34. Ma, S.; Wallis, W.D.; Wu, J. Optimization problems on quasi-threshold graphs. J. Comb. Inform. Syst. Sci. 1989, 14, 105–110. [Google Scholar]
  35. Qiu, Z.; Tang, Z. On the eccentricity spectra of threshold graphs. Discrete Appl. Math. 2022, 310, 75–85. [Google Scholar] [CrossRef]
  36. Jamison, B.; Olariu, S. Linear time optimization algorithms for P4-sparse graphs. Discrete Appl. Math. 1995, 61, 155–175. [Google Scholar] [CrossRef] [Green Version]
  37. Jamison, B.; Olariu, S. Recognizing P4-sparse graphs in linear time. SIAM J. Comput. 1992, 21, 381–406. [Google Scholar] [CrossRef]
  38. Jamison, B.; Olariu, S. A tree representation for P4-sparse graphs. Discrete Appl. Math. 1992, 35, 115–129. [Google Scholar] [CrossRef] [Green Version]
  39. Nikolopoulos, S.D.; Palios, L.; Papadopoulos, C. A fully-dynamic algorithm for the recognition of P4-sparse graphs. Theor. Comput. Sci. 2012, 439, 41–57. [Google Scholar] [CrossRef] [Green Version]
  40. Rose, D.J. A graph-theoretic study of the numerical solution of sparse positive definite systems of linear equation. In Graph Theory and Computing; Read, R.C., Ed.; Academic Press: New York, NY, USA, 1972; pp. 183–217. [Google Scholar]
  41. Földes, S.; Hammer, P.L. Split graphs having Dilworth number two. Can. J. Math. 1977, 29, 666–672. [Google Scholar] [CrossRef]
  42. Tyshkevich, R.I.; Chernyak, A.A. Yet another method of enumerating unmarked combinatorial objects. Mat. Zametki 1990, 48, 98–105. (In Russian) [Google Scholar] [CrossRef]
  43. Maack, N.; Molter, H.; Niedermeier, R.; Renken, M. On finding separators in temporal split and permutation graphs. J. Comput. Syst. Sci. 2023, 135, 1–14. [Google Scholar] [CrossRef]
  44. Hammer, P.L.; Simeone, B. The splittance of a graph. Combinatorica 1981, 1, 275–284. [Google Scholar] [CrossRef]
  45. Nikolopoulos, S.D. Recognizing cographs and threshold graphs through a classification of their edges. Inf. Process. Lett. 2000, 74, 129–139. [Google Scholar] [CrossRef]
  46. Golumbic, M.C. Trivially perfect graphs. Discrete Math. 1978, 24, 105–107. [Google Scholar] [CrossRef] [Green Version]
  47. Wolk, E.S. The comparability graph of a tree. Proc. Am. Math. Soc. 1962, 3, 789–795. [Google Scholar] [CrossRef]
  48. Wolk, E.S. A note of the comparability graph of a tree. Proc. Am. Math. Soc. 1965, 16, 17–20. [Google Scholar]
  49. Corneil, D.G.; Lerches, H.; Burlingham, L. Complement reducible graphs. Discrete Appl. Math. 1981, 3, 163–174. [Google Scholar] [CrossRef] [Green Version]
  50. Corneil, D.G.; Perl, Y.; Stewart, L.K. A linear recognition algorithm for cographs. SIAM J. Comput. 1985, 14, 926–934. [Google Scholar] [CrossRef]
  51. Veldman, H.J. A result on Hamiltonian line graphs involving restrictions on induced subgraphs. J. Graph Theory 1988, 12, 413–420. [Google Scholar] [CrossRef] [Green Version]
  52. Brandes, U.; Hamann, M.; Strasser, B.; Wagner, D. Fast quasi-threshold editing. In ESA 2015. LNCS; Bansal, N., Finocchi, I., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9294, pp. 251–262. [Google Scholar]
  53. Brandes, U.; Hamann, M.; Häuser, L.; Wagner, D. Skeleton-Based Clustering by Quasi-Threshold Editing. In Algorithms for Big Data: DFG Priority Program 1736; Springer Nature: Cham, Switzerland, 2023; pp. 134–151. [Google Scholar]
  54. Nikolopoulos, S.D.; Papadopoulos, C. The number of spanning trees in Kn-complements of quasi-threshold graphs. Graphs Comb. 2004, 20, 383–397. [Google Scholar] [CrossRef] [Green Version]
  55. Kano, M.; Nikolopoulos, S.D. On the Structure of A-Free Graphs; Part II, TR-25-99; Department of Computer Science, University of Ioannina: Ioannina, Greece, 1999. [Google Scholar]
  56. Nikolopoulos, S.D. Parallel algorithms for Hamiltonian problems on quasi-threshold graphs. Parallel Distrib. Comput. 2004, 64, 48–67. [Google Scholar] [CrossRef]
  57. Hoáng, C. Perfect Graphs. Ph.D. Thesis, McGill University, Montreal, QC, Canada, 1985. [Google Scholar]
  58. Brandstädt, A.; Le, V.B.; Spinrad, J. Graph Classes—A Survey. In SIAM Monographs in Discrete Mathematics and Applications; SIAM: Philadelphia, PA, USA, 1999. [Google Scholar]
Figure 1. (left) The structure of the tree representation of a threshold graph [45]; (right) Formation for the addition of the tail u w .
Figure 1. (left) The structure of the tree representation of a threshold graph [45]; (right) Formation for the addition of the tail u w .
Algorithms 16 00289 g001
Figure 2. The tree representation of a quasi-threshold graph.
Figure 2. The tree representation of a quasi-threshold graph.
Algorithms 16 00289 g002
Figure 3. The forbidden subgraphs for the class of P 4 -sparse graphs [38].
Figure 3. The forbidden subgraphs for the class of P 4 -sparse graphs [38].
Algorithms 16 00289 g003
Figure 4. (left) A thin spider; (right) a thick spider.
Figure 4. (left) A thin spider; (right) a thick spider.
Algorithms 16 00289 g004
Figure 5. The path t 0 t 1 t h u from the root t 0 of the P 4 -sparse tree to the leaf associated with u and the vertex sets V 0 , V 1 , , V h .
Figure 5. The path t 0 t 1 t h u from the root t 0 of the P 4 -sparse tree to the leaf associated with u and the vertex sets V 0 , V 1 , , V h .
Algorithms 16 00289 g005
Figure 6. (left) Formation 1; (right) Formation 2 where t is a 1- or a 2-node. Formation 1 is a special case of Formation 2 when Z = .
Figure 6. (left) Formation 1; (right) Formation 2 where t is a 1- or a 2-node. Formation 1 is a special case of Formation 2 when Z = .
Algorithms 16 00289 g006
Figure 7. (left) The P 4 -sparse tree T O P T in which the leaves for u , w do not have the same parent node and have node t as their least common ancestor; (right) The P 4 -sparse tree T R obtained by using Formation 2 just above node t which results in no more fill edges than those in G O P T .
Figure 7. (left) The P 4 -sparse tree T O P T in which the leaves for u , w do not have the same parent node and have node t as their least common ancestor; (right) The P 4 -sparse tree T R obtained by using Formation 2 just above node t which results in no more fill edges than those in G O P T .
Algorithms 16 00289 g007
Figure 8. A transformation that reduces the number of fill edges.
Figure 8. A transformation that reduces the number of fill edges.
Algorithms 16 00289 g008
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Mpanti, A.; Nikolopoulos, S.D.; Palios, L. Adding a Tail in Classes of Perfect Graphs. Algorithms 2023, 16, 289. https://doi.org/10.3390/a16060289

AMA Style

Mpanti A, Nikolopoulos SD, Palios L. Adding a Tail in Classes of Perfect Graphs. Algorithms. 2023; 16(6):289. https://doi.org/10.3390/a16060289

Chicago/Turabian Style

Mpanti, Anna, Stavros D. Nikolopoulos, and Leonidas Palios. 2023. "Adding a Tail in Classes of Perfect Graphs" Algorithms 16, no. 6: 289. https://doi.org/10.3390/a16060289

APA Style

Mpanti, A., Nikolopoulos, S. D., & Palios, L. (2023). Adding a Tail in Classes of Perfect Graphs. Algorithms, 16(6), 289. https://doi.org/10.3390/a16060289

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop