Next Article in Journal
Decision to Adopt Neuromarketing Techniques for Sustainable Product Marketing: A Fuzzy Decision-Making Approach
Previous Article in Journal
Disdrometer Performance Optimization for Use in Urban Settings Based on the Parameters that Affect the Measurements
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Recognition and Optimization Algorithms for P5-Free Graphs

1
“Vasile Alecsandri” University of Bacau, Calea Marasesti 157, 600115 Bacau, Romania
2
“Dunarea de Jos” University of Galati, Domneasca 47, 800008 Galati, Romania
3
Institute of Mathematics of National Academy of Sciences of Belarus, Surganov 11, 220072 Minsk, Belarus
4
“George Emil Palade” University of Medicine, Pharmacy, Sciences and Technology of Tg. Mures, Gh. Marinescu 38, 540139 Tg. Mures, Romania
*
Authors to whom correspondence should be addressed.
Symmetry 2020, 12(2), 304; https://doi.org/10.3390/sym12020304
Submission received: 4 January 2020 / Revised: 2 February 2020 / Accepted: 6 February 2020 / Published: 20 February 2020

Abstract

:
The weighted independent set problem on P 5 -free graphs has numerous applications, including data mining and dispatching in railways. The recognition of P 5 -free graphs is executed in polynomial time. Many problems, such as chromatic number and dominating set, are NP-hard in the class of P 5 -free graphs. The size of a minimum independent feedback vertex set that belongs to a P 5 -free graph with n vertices can be computed in O ( n 16 ) time. The unweighted problems, clique and clique cover, are NP-complete and the independent set is polynomial. In this work, the P 5 -free graphs using the weak decomposition are characterized, as is the dominating clique, and they are given an O ( n ( n + m ) ) recognition algorithm. Additionally, we calculate directly the clique number and the chromatic number; determine in O ( n ) time, the size of a minimum independent feedback vertex set; and determine in O ( n + m ) time the number of stability, the dominating number and the minimum clique cover.

1. Introduction

1.1. Notations, Basics and Applications

Graphs, including the P 5 -free graphs, have many real-life applications, including: preference elicitation applied to a brownfield redevelopment conflict in China [1], evaluation of the energy supply options of a manufacturing plant [2], lifestyle pattern mining based on image collections in smartphones [3] and conflict resolution based on option prioritization [4]. In [5] we point out some applications of bipartite chain graphs in chemistry and approach the minimum chain completion problem. The very large numbers of studies and researchers focused on graphs [6,7,8] outline the importance of this field.
Next we give the terminology used in graph theory that we approach. Throughout this work, G = ( V , E ) is a connected, undirected, finite, without multiple edges and loops graph [9], where V = V ( G ) is the vertices set and E = E ( G ) is the set of edges. G ¯ = c o G is the complement graph of G. If U V , with G ( U ) (or [ U ] or [ U ] G ) we denote the subgraph of G induced by U. Throughout this paper, all subgraphs are considered induced subgraphs. With G X we denote the graph G ( V X ) , every time X V , and we simply write G v , ( v V ), when X = { v } . If e = x y E at the same time, we use x y , and if x y every time, x and y are not adjacent in G. A set denoted A is totally adjacent (non adjacent) with a set denoted B, of vertices (A B = ) if a b is (is not) an edge, for any a vertex in A and any b vertex in B. In the following we denote with A B ( A B ) and we say that A, B are t o t a l l y a d j a c e n t ( n o n a d j a c e n t ). If v V is a vertex in G, the n e i g h b o r h o o d N G ( v ) represents the vertices of G v that are adjacent to v. We will write N ( v ) in case that graph G appears certainly from the context. N ¯ ( v ) denotes the n e i g h b o r h o o d of the vertex v in the complement of the graph G. In G for any subset S of vertices the n e i g h b o r h o o d of S is N ( S ) = v S N ( v ) S , N [ S ] = S N ( S ) . A c l i q u e represents a subset of V in that all the vertices are pairwise adjacent. ω ( G ) the c l i q u e n u m b e r of G is calculated as the size of the maximum clique. The c h r o m a t i c n u m b e r of a graph G ( χ ( G ) ) represents the lowest number of colors necessary to label all its vertices respecting the restriction that does not exist two adjacent vertices with the same color. The s t a b i l i t y n u m b e r α ( G ) of a graph G is the size of the greater stable set. An i n d e p e n d e n t ( s t a b l e ) s e t of a graph G is a subset of pairwise non-adjacent vertices. A d o m i n a t i n g s e t of a graph G is a subset D of its vertices, in such way that every member not in D is adjacent to one or more member of D. The d o m i n a t i o n n u m b e r ν ( G ) of G is the cardinality of a minimum dominating set of G. By P n , C n , K n we denote a chordless path on n 3 vertices, the chordless cycle on n 3 vertices and the complete graph on n 1 vertices.
Let F denote a set of graphs. A graph denoted G is F-free in the case that none of its induced subgraphs are in F.
The s u m of two graphs denoted G 1 , G 2 is the graph G = G 1 + G 2 where:
E ( G ) = E ( G 1 ) E ( G 2 ) { u v : u V ( G 1 ) , v V ( G 2 ) } , V ( G ) = V ( G 1 ) V ( G 2 ) .
With the graphs G 1 and G 2 , we set G = G 1 G 2 with V ( G ) = V ( G 1 ) V ( G 2 ) and E ( G ) = E ( G 1 ) E ( G 2 ) .

1.2. Preliminaries

The study is importantly based on an algorithm proposed for P 5 -free graphs with a lower complexity than known algorithms, while the purpose and significance of this work is given by the foundation and presentation of this algorithm.
Here we recap some results regarding the P 5 -free graphs.
Theorem 1
([10]). A graph G is called a perfect connected-dominant graph if and only if G contains no induced cycle C 5 and induced path P 5 [10].
(Let us consider D a dominating set and G(D) a connected subgraph. D is called a connected dominating set. It is connected ti domination number n u c (G) of G the minimum size of a connected dominating set in G. Clearly, n u ( G ) n u c ( G ) for any connected graph G. A graph G is called a perfect connected-dominant graph if n u ( H ) = n u c ( H ) for all connected induced subgraphs H of G).
Theorem 2
([11]).
(i) 
The paper [11] presents a O ( n 12 m ) time algorithm for weighted independent set on P 5 -free graphs;
(ii) 
The weighted independent set problem applications include train dispatching [12] and data mining [13].
Theorem 3
([14]).
(i) 
In the case of line graphs of planar subcubic bipartite graphs, the near-bipartiteness is proven to be NP-complete;
(ii) 
In the case of line graphs of planar subcubic bipartite graphs, it is proven that the considered independent feedback vertex set is NP-complete;
(iii) 
List semi-acyclic 3-coloring is algorithmically solvable on P 5 -free graphs in O ( n 16 ) time;
(iv) 
The size of the minimum independent feedback vertex set of a P 5 -free graph with n vertices is algorithmically solvable in O ( n 16 ) time [14].
(Let S be a set of vertices in a graph G. S is a feedback vertex set of G in the case graph G-S is a forest. In the following is considered the problem with the requirement of the feedback vertex set to be an independent set. Such a set is called independent feedback vertex set. It is known that graphs which admit an independent feedback vertex set are called near-bipartite).
Theorem 4
([15]). The k-restricted-coloring problem in the class of P 5 -free graphs can be solved in polynomial time [15]. Diverse problems are known to be NP-hard in the class of P 5 -free graphs. The dominating set [16] and chromatic number [17] are illustrative examples in this sense.
Property 1
([18]). According to [18] a connected augmenting graph is P 5 -free if and only if it is chain bipartite.
(A bipartite graph denoted H = ( V 1 ; V 2 ; E ) with the parts denoted V 1 and V 2 is named augmenting for a stable set S in a graph denoted G if | V 2 | > | V 1 | , V 1 S , V 2 V ( G ) S and ( N ( v ) S ) V 1 for all vertices v in V 2 . A stable set S in a graph denoted G is maximal if and only if does not exist augmenting graphs for S).
Theorem 5
([19]). Let us denote with G a connected graph. The two conditions from below are equivalent.
(i) 
G is a P 5 -free graph;
(ii) 
G is nonseparable [19].
(A strong matching of a graph denoted G is a matching (cardinality two or higher) that is also an induced subgraph of G. A connected graph that does not have strong matching is said to be nonseparable.)
Theorem 6
([20]). A graph G is { P 5 , P ¯ 5 } -free if and only if at least one of the following conditions holds:
  • G is a split graph;
  • G is a C 5 ;
  • G is obtained by substitution from smaller { P 5 , P ¯ 5 } -free graphs;
  • G or G ¯ is obtained by split unification from smaller { P 5 , P ¯ 5 } -free graphs [20].
Theorem 7
([21]). A connected graph denoted G is P 5 -free if and only if each connected induced subgraph has a dominating induced C 5 or a dominating clique [21].
The content of the upcoming parts of the paper is organized as follows. Section 2 presents results reported in the scientific literature about the weak decomposition of a graph, and we recall the relationship between P 5 -free graphs and the dominating clique, given in [21]. Section 3, characterizes the P 5 -free graphs using weak decomposition, dominating clique and gives an O ( n ( n + m ) ) recognition algorithm. Next, we approach some combinatorial optimization problems for which we directly calculate some combinatorial numbers; for the other combinatorial optimization numbers, we use an algorithm of complexity O ( n + m ) .

2. Materials and Methods

The method is the one of the weak decomposition of a graph. In Consequence 1 is presented the use of the dominant clique. The correctness in execution of the designed algorithms is shown, and their complexity is determined.
We recap a characterization of the weak decomposition of a graph here.
Definition 1
([22,23]). Let us denote with G = (V, E) a graph. A set of vertices denoted A is called a weak set if N G ( A ) V A and the induced subgraph by A is connected. If the set A is a weak set, satisfying the property that is maximal considering the inclusion, the subgraph induced by A is a weak component. For simplification, the weak component G(A) will be symbolized with A.
The use of the name “weak component” is justified by the next result.
Theorem 8
([22,23]). Any incomplete and connected graph G = (V, E) admits a weak component; let us denote it with A, such that G ( V A ) = G ( N ( A ) ) + G ( N ¯ ( A ) ) .
Theorem 9
([24,25]). Let G = (V, E) be a graph that is connected and incomplete and A V . A is a weak component of G if and only if the conditions N ( A ) N ¯ ( A ) and G ( A ) are connected.
Definition 2
([22,23]). The partition denoted ( A , N ( A ) , V A N ( A ) ) , where A is a weak set, is called weak decomposition of G in relation to A. It is called: A the weak component, N ( A ) the minimal cutset and V N ( A ) the remote set.
The next result assures the existence of a weak decomposition in an incomplete and connected graph.
Corollary 1
([22,23]). Let us denote with G = ( V , E ) a connected and incomplete graph. The set of vertices denoted V admits a weak decomposition denoted ( A , B , C ) such that G ( V A ) = G ( B ) + G ( C ) and G ( A ) is a weak component.
Theorem 9 presents an Algorithm 1 with complexity O ( n + m ) for building a weak decomposition for a connected and incomplete graph.
Algorithm 1: Weak decomposition of a graph [23]
Input: G = ( V , E ) connected graph that have two or more nonadjacent vertices.
Output: V = ( A , N , R ) partition in that G ( A ) is connected, N = N ( A ) , A R = N ¯ ( A ) .
   B e g i n
   A: = any set of vertices such that,
    V A N ( A ) ;
    N : = N ( A ) ;
    R : = V A N ( A ) ;
    W h i l e ( r R , n N such that n r E ) D o
     N : = ( N { n } ) ( N ( n ) R ) ;
     A : = A { n } ;
    R : = R ( N ( n ) R ) ;
    E n d W h i l e
   E n d
We should also address the characterization of P 5 -free graphs according to the dominating clique, given by the authors from [21]: A connected graph denoted G is P 5 -free if and only if each connected induced subgraph detains a dominating induced C 5 or a dominating clique.

3. Proposal

3.1. Characterization of P 5 -Free Graphs

In [26], the authors present the following results:
A connected bipartite graph denoted G is called difference graph if and only if it has no induced P 5 graph, the path that connects five vertices;
A graph denoted G is a difference graph if and only if it has no induced 2 K 2 , no triangle and no induced pentagon (i.e., C 5 ).
In [5], the authors characterize the bipartite chain graphs using weak decomposition.
In the following is a specific characterization of a P 5 -free graph using the idea from [5]. For the work to be a whole, we present the demonstration.
Theorem 10.
Let G = (V, E) be a connected, non-complete and bipartite graph. Let (A, N, R) be a weak decomposition with the G(A) weak component. G is an P 5 -free if and only if
(i) 
G ( N R ) is complete bipartite with bipartitions N R (that is, N and R are stable sets and N∼R);
(ii) 
B A can be identified such that A B , B are stable sets, B N . In the same time ( A B ) N, A B = N G ( B ) N and B = N G ( A B ) ;
(iii) 
G ( A ) is a P 5 -free.
Proof. 
Proof. Let us denote G, a non-complete, connected, bipartite and P 5 -free graph. ( A , N , R ) is a weak decomposition with the G ( A ) weak component. In this case N R and G ( A ) is a P 5 -free graph. If N was not stable, in this case n 1 , n 2 N would exist such that n 1 , n 2 E ; then G ( n 1 , n 2 , r ) C 3 , r R , a contradiction, since G being the difference graph is C 3 -free. If R were not stable, then r 1 , r 2 R would exist such that r 1 , r 2 E ; then G ( r 1 , r 2 , n ) C 3 , n N .
Distinct vertices do not exist in N with distinct neighbors in A. Indeed, if n , n N exist such that a a where a, a A and n a , n a E ( n a , n a E ), then if a a E , then G ( a , n , r , n , a ) C 5 , r R ; else G ( a , n , n , a ) 2 K 2 .
So, n 1 , n 2 N we have either
(a)
N ( n 1 ) A N ( n 2 ) A ; or
(b)
N ( n 1 ) A = N ( n 2 ) A .
Let us suppose that (a) holds. Let x, belonging to A, be adjacent only to n 1 , and y from A to be adjacent to n 1 and n 2 at the same time. Since G ( A ) is connected, P x y is. If x y E , then G ( x , y , n 1 ) C 3 . If x y E in this case either x and y have a same neighbor b in A and in this case G ( b , x , n 2 , r ) 2 K 2 or x and y have different neighbors in A (let them b 1 x E and b 2 y E ), then G ( b 1 , x , n 2 , r ) 2 K 2 , r R . So (a) does not hold.
Therefore, N ( n 1 ) A = N ( n 2 ) A , n 1 , n 2 N .
Then B A so that B = N ( n ) A , n N that have the significance that B = N G ( N ) A and B N , A B N . Since G is connected and N = N G ( A ) , A B N , it follows that B . In a case where B is not stable, then b 1 , b 2 N ( n ) A ( = B) would exist such that b 1 b 2 E . Then G ( b 1 , b 2 , n ) C 3 . Since G ( A ) is connected and B is stable set, in this case A B . Since A B A R , it follows that A B R . If A B was not stable, then a 1 , a 2 A B would exist such that a 1 a 2 E . Then, since A B R N , it follows that G ( a 1 , a 2 , n , r ) 2 K 2 , n N , r R . Since A B is stable set, G ( A ) is connected, so it follows that a A B , b B such that a b E . Therefore, A B = N G ( B ) N . Since G ( A ) is connected and B is a stable set, then B = N G ( A B ) .
It is supposed that (i), (ii) and (iii) hold.
According to (i), G ( R N ) is C 3 -free, C 5 -free and 2 K 2 -free. Similarly, G ( N B ) is a C 3 -free, C 5 -free and 2 K 2 -free. According to [18], G ( R N ) and G ( N B ) are difference graphs. According to [18], it follows that G ( R N ) and G ( N B ) , are P 5 -free graphs. From (iii), it follows that G ( A ) ( = G ( B ( A B ) ) ) is P 5 -free graph. From (i) and (ii) (i.e., R, N, B and A B are stable sets and R N B and A B N R ) and from (iii) (i.e., G ( A ) is P 5 -free) it follows that G is C 3 -free and 2 K 2 -free.
Suppose that X V : X A , X N , X R and G ( X ) C 5 . From G ( X ) C 5 , since N R and R is a stable set, it follows that | X R | = 1 . If | X N | = 1 , then, since B N and A B N , | X B | = 1 , and then | X ( A B ) | = 2 ; i.e., it does not hold G ( X ) C 5 . So, | X N | = 2 . Since B N and A B N , G ( X ) G ( r , n 1 , n 2 , b , a ) , where r R , n 1 , n 2 N , b B , a A B and r n 1 , r n 2 , n 1 b , n 2 b , b a E . So, G is C 5 -free. According to [26] G is a difference graph, since G is { C 3 , 2 K 2 , C 5 } -free. Since G is a connected bipartite and a difference graph, G is P 5 -free graph. □
In [21], the authors present the following theorem:
A connected graph denoted G is P 5 -free in case if and only if each connected induced subgraph has a dominating induced C 5 or a dominating clique.
In [18] (see http://www.graphclasses.org/classes/gc_668.html), the author states that the recognition of graphs ( P 5 , C 5 )-free is polynomial in time.
Using the Theorem 10, we obtain the consequence mentioned in the following.
Consequence 1.
Let us denote G = (V, E) a connected, non-complete, C 5 -free and bipartite graph, and (A, N, R) a weak decomposition with the G(A) weak component. The graph G is a P 5 -free if and only if:
(i) 
B A : B N and A B N , A B , B, N, R stable sets, A B = N G ( B ) N and B = N G ( A B ) ;
(ii) 
{ r , n } a minimum dominating clique in G ( R N ) , r R , n N ;
(iii) 
{ n , b } a minimum dominating clique in G ( N B ) , n N , b B ;
(iv) 
{ a , b } a minimum dominating clique in G ( A ) , b N ( a | A B | ) B , a N ( b 1 ) ( A B ) , where: N ( b 1 ) ( A B ) = m a x / i = 1 , . . . , | B | N ( b i ) ( A B ) ; N ( a | A B | ) B = m a x / i = 1 , . . . , | A B | N ( a i ) B .
Proof. 
(I) Suppose G is P 5 -free. According to the Theorem 10. (i) holds. According to Theorem 10, it follows that R N B , so (ii) and (iii) hold. According to Theorem 10. it follows that: “ b 1 , b 2 B does not exist in B vertices with distinct neighbors in A B ”. Indeed. If b 1 , b 2 B would exist such that a 1 a 2 , where a 1 , a 2 A B and b 1 a 1 , b 2 a 2 E ( b 1 a 2 , b 2 a 1 E ), then, since A B , B are stable sets and B N it follows that G ( a 1 , b 1 , n , b 2 , a 2 ) P 5 , n N , a contradiction. Therefore, s , t B : N ( s ) ( A B ) N ( t ) ( A B ) . So: N ( b 1 ) ( A B ) . . . N ( b | B | ) ( A B ) holds, where B = { b 1 , b 2 , . . . , b | B | } . Similarly, we have: N ( a 1 ) B . . . N ( a | A B | ) B , where A B = { a 1 , a 2 , . . . , a | A B | } .
So, N ( a ) B N ( a | A B | ) B , a A B and N ( b ) ( A B ) N ( b 1 ) ( A B ) , b B .
So: a A B : a b E { b } A B ; b B : b a E { a } B .
Therefore: a b E and
a A B { a } : a b E , b B { b } : b a E , i.e., { a , b } is the dominating clique (edge) in G ( B ( A B ) ) , which is also the minimum. So (iv) holds.
(II) We assume that (i), (ii), (iii) and (iv) hold. We show G is P 5 -free, proving the conditions in the Theorem 10. According to (ii) and the previous theorem, it follows that G ( R N ) is P 5 -free. Indeed. Let H be connected induced subgraph of G ( N R ) ; it follows that (since H is connected) both V ( H ) R and V ( H ) N , given that r V ( H ) R and n V ( H ) N . From (ii) it follows that { r , n } is a dominating clique. According to the previous theorem (i.e., A connected graph is called P 5 -free if and only if each connected induced subgraph has a dominating induced C 5 or a dominating clique) G ( R N ) is P 5 -free. Since G ( A ) is the weak component, it follows that R N . Since R N , it follows that G ( R N ) is complete bipartite. By using (iii) and the previous theorem, similarly, it follows that G ( N B ) is complete bipartite. Therefore, (i) and (ii) according to Theorem 10 hold.
We show G ( A ) = G ( B ( A B ) ) is a P 5 -free graph.
Let H be an connected induced subgraph of G ( A ) . If V ( H ) B (or V ( H ) A B ), then H is not connected since B (or A B ) is a stable set. If V ( H ) ( N ( a | A B | ) B ) ( N ( b 1 ) ( A B ) ) , then a b is a dominating edge. If V ( H ) ( B ( N ( a | A B | ) B ) ) ( A B ( N ( b 1 ) ( A B ) ) ) , then H is not connected. Let V ( H ) ( B ( N ( a | A B | ) B ) ) ( N ( b 1 ) ( A B ) ) . Given that b ¯ ( B ( N ( a | A B | ) B ) ) V ( H ) , a ¯ V ( H ) N ( b 1 ) ( A B ) . For b ( B ( N ( a | A B | ) B ) ) V ( H ) { b ¯ } , a V ( H ) N ( b 1 ) ( A B ) { a ¯ } : b a ¯ , a b ¯ E . According to the previous theorem, it follows that G(A) is P 5 -free. The conditions the Theorem 10 hold; therefore, G is P 5 -free graph. □

3.2. Proposed Recognition Algorithm for P 5 -Free Graphs

In this section we design the algorithm of recognition for the P 5 -free graphs class.
In [27], it is specified in “Unweighted problems” that: recognition of P 5 -free graphs is executed in polynomial time.
In [27], it is specified in “Unweighted problems” that: recognition the bipartite graphs is linear.
Using Theorem 10.(or Consequence 1, if G is C 5 -free), we obtain the following recognition Algorithm 2.
Algorithm 2: Recognition algorithm for P 5 -free graphs
Input: G = ( V , E ) a connected bipartite graph with two or more nonadjacent vertices.
Output: The answer to the issue: Is G a P 5 -free graph?
Begin
   L = { G } ;/L represents a list of graphs.
  Let H be in L.
  While ( | V ( H ) | > 5 ) Do
    1. Determine the degree of each vertex
    2. Determine a weak decomposition ( A , N , R ) with N R for H;
    3. Determine B = N H ( N ) R and C = A B ;
    4. Let: n r : = | N | ; r : = | R | ; b : = | B | ;
    5. If ( v R such that d H ( v ) n r ) Then The graph G is not P 5 -free
     ElseIf ( v N so that d H ( v ) b + r ) Then
     Graph G is not P 5 -free
      Else
      Insert, in L, the induced subgraph of A (at each iteration the graph is
      called H, so H = [ A ] ) of order strictly higher than 5.
    EndIf
   EndWhile
   6. Graph G is P 5 -free
  End
It is shown that the execution is in O ( n ( n + m ) ) time, because the complexity of the weak decomposition algorithm is O ( n + m ) ; the other operations of the recognition algorithm of P 5 -free graphs are less complex.
The recognition algorithm is executed in a finite number of steps.
Initially, the graph is finished. In the next interaction, the graph H is replaced by the induced subgraph by A obtained from the weak decomposition (we have V(H) = ANR, therefore (because N = N ( A ) , R = N ¯ (A)), AN = ϕ , AR = ϕ , NR = ϕ ), that is AV(H).
Let k be the number of repetitions of the while loop. We have: |A|≥1, |N|≥1, |R|≥1. So, the execution of the algorithm ends when n i = 1 k r i + n r i = p , where p ( 0 < p 5 ) is the cardinal of the set of vertices (i.e., number of vertices, because the given graph is finished) of the graph obtained in the last stage.
The complexity of the recognition algorithm.
The graph is presented through the adjacent matrix (O(n 2 )) or adjacency list (O(n + m)).
  • Determine the degree of each vertex/we count the binary numbers with the value 1 on each line of the adjacent matrix (O(n 2 )) or we count the vertices of adjacent list (O(n + m)).
  • Determine a weak decomposition (A, N, R) with N R for H/the algorithm for the weak decomposition of a graph has the complexity O(n + m).
  • Determine B = N H (N)−R and C = AB/we define the induced subgraph by A (by removing the vertices from R and N and the adjacent edges). The vertices from A that have the same degree in [A] and in H are introduced in C, and the others in A, are introduced in B. The required time is O(n).
  • Let: r = |R|; nr = |N|; b = |B| / O(n).
  • If (∃vR such that d H (v) ≠ nr)/
The time for comparing the degrees of the vertices in R with nr is O(n).
The induced subgraph of A (H = [A])/H is connected, non-complete and bipartite graph.
In the second and following while loops, the role of graph H is assumed by the induced subgraph by A.
All in all, the complexity is O ( k ( n + m ) ) , where k is the number of repetitions of the while loop.
An example of application of the recognition algorithm
We apply the algorithm to the graph
G = (V, E), where V = {a 1 , a 2 , a 3 , b 1 , b 2 , b 3 , b 4 , n 1 , n 2 , n 3 , r 1 , r 2 , r 3 , r 4 } and E = {a 1 b 1 , a 1 b 2 , a 2 b 2 , a 2 b 3 , a 2 b 4 , a 3 b 3 , b 1 n 1 , b 1 n 2 , b 1 n 3 , b 2 n 1 , b 2 n 2 , b 2 n 3 , b 3 n 1 , b 3 n 2 , b 3 n 3 , b 4 n 1 , b 4 n 2 , b 4 n 3 , n 1 r 1 , n 1 r 2 , n 1 r 3 , n 1 r 4 , n 2 r 1 , n 2 r 2 , n 2 r 3 , n 2 r 4 , n 3 r 1 , n 3 r 2 , n 3 r 3 , n 3 r 4 }.
HG;
Determine the degree of each vertex;
Determine a weak decomposition (A, N, R) with N R for H;
Initial A = {a 1 }.
Finally we get A = {a 1 , a 2 , a 3 , b 1 , b 2 , b 3 , b 4 }; N = {n 1 , n 2 , n 3 }; R = {r 1 , r 2 , r 3 , r 4 }.
Determine B = N H (N)−R and C = AB. We define the induced subgraph by A, by removing the vertices from R and N and the adjacent edges. The vertices from A have the same degree in [A] and in H; we introduce them in C, and for the others in A, we introduce them in B. C = {a 1 , a 2 , a 3 }, B = {b 1 , b 2 , b 3 , b 4 }).
Let: r = |R|; nr = |N|; b = |B|; r = 4; nr = 3; b = 4.
vR such that d H (v) ≠ nr, not ∃vN such that d H (v) ≠ b + r.
The new graph H is [A]( = [{a 1 , a 2 , a 3 , b 1 , b 2 , b 3 , b 4 }])
Repeating the while loop with the new graph H we obtain (Initial, A = {a 1 }):
B = {b 1 , b 2 }; A-B = {a 1 , a 3 }; N = {a 2 }; R = {b 3 , b 4 }.
So G is P 5 -free.

3.3. Combinatorial Optimization Algorithms for P 5 -Free Graphs

In [27], it is specified in “Unweighted Problems” that: clique, clique cover, colorability and domination are NP-complete; the feedback vertex set is unknown to ISGCI; and the independent set is polynomial.
Theorem 10 has the following consequence.
Consequence 2.
Let us the graph G = (V, E) be a non-complete, connected and bipartite graph, and (A, N, R) a weak decomposition where G(A) is the weak component. If G is a P 5 -free graph, then
1. 
ω ( G ) = 2 ;
2. 
α ( G ) = m a x { | A | | B | + | N | , | A | | B | + | R | , | B | + | R | } ;
3. 
χ ( G ) = 2 ;
4. 
θ ( G ) = m a x { | R | , | N | } + m i n { m a x { | B | , | N ( b 1 ) ( A B ) | } + | ( A B ) N ( b 1 ) ( A B ) | , m a x { | A B | , | N ( a | A B | ) B | } + | B N ( a | A B | ) B | } where:
N ( b 1 ) ( A B ) = m a x / i = 1 , , | B | N ( b i ) ( A B ) ; N ( a | A B | ) B = m a x / i = 1 , , | A B | N ( a i ) B
5. 
ν ( G ) = m i n { | { b } { n } | , | A | | B | + | R | } , n N , b N ( a | A B | ) B .
Proof. 
It is known: α ( G ( R ) ) = | R | ; α ( G ( A ) ) = m a x { | B | | A | | B | ; α ( G ( A N ) ) = m a x { α ( G ( ( A B ) B ) ) , α ( G ( A B ) ) + α ( G ( N ) ) } = m a x { | A | | B | , | B | , | A | | B | + | N | } . In this way, α ( G ) = m a x { α ( G ( A N ) ) , α ( G ( A ) ) + α ( G ( R ) ) } = m a x { m a x { | A | | B | , | B | , | A | | B | + | N | } , m a x { | A | | B | , | B | } + | R | } = m a x { | A | | B | + | N | , | A | | B | + | R | , | B | + | R | } .
We color the vertices of R with c R . We color the vertices of N with c N . Since N R , it follows that c R c N . We can color the vertices in B with c R and the vertices in A B with c N (since A B N ).
If we suppose | R | > | N | , a minimum cover with cliques (which are the edges) of G ( N R ) is: { n 1 r i | n i N , r i R , i = 1 , , | N | } { n | N | r k | k = | N | + 1 , , | R | } .
The vertices of G ( A ) need to be covered. According to Theorem 10 it follows that: “Distinct vertices in B that have distinct neighbors in A B do not exist”. Indeed, if b 1 , b 2 B would exist such that a 1 a 2 where a 1 , a 2 A B and b 1 a 1 , b 2 a 2 E ( b 1 a 2 , b 2 a 1 E ), then, since A B , B are stable sets and B N it follows that G ( a 1 , b 1 , n , b 2 , a 2 ) P 5 , n N , a contradiction.
So, there is an order of vertices in B according to their neighborhoods in A B from the point of view of inclusion (i.e., we can assume: N ( b 1 ) ( A B ) N ( b 2 ) ( A B ) N ( b | B | ) ( A B ) ) , where B = { b 1 , b 2 , , b | B | } .
(2) Distinct vertices do not exist in A B with distinct neighbors in B. Similarly, we show: N ( a 1 ) B N ( a 2 ) B N ( a | A B | ) B , where A B = { a 1 , a 2 , , a | A B | } .
Since B = N G ( A B ) , it follows that b B : N ( b ) N N ( b 1 ) ( A B ) . Since A B = N G ( B ) N , it follows that a A B : N ( a ) N ( a | A B | ) B .
Therefore: θ ( G ) = m a x { | R | , | N | } + m i n { m a x { | B | , | N ( b 1 ) ( A B ) | } + | ( A B ) N ( b 1 ) ( A B ) | , m a x { | A B | , | N ( a | A B | ) B | } + | B N ( a | A B | ) B | } .
We show n N , { n } B is a dominating set. Indeed. r R : n r E (since R N ). n N { n } : n b E , b B (since B N ). a A B , b B : a b E (since A B = N G ( B ) N ). For b 0 B we have { n } ( B { b 0 } ) is a dominating set, since b 0 n E ; i.e., { n } B is not a minimum dominating set. Moreover, { n } { b } , n N , b N ( a | A B | ) B , is a minimum dominating set. Indeed. r R : n r E (since R N ). n N { n } : n b E (since B N ). For a A B we have: N ( a ) B N ( a | A B | B ) . So, for b N ( a | A B | ) B we have a b E . For b B { b } : b n E .
The R ( A B ) set is a minimum dominating. Indeed. n N , r R : n r E , ( R N ) . b B , a A B : a b E , ( B = N G ( A B ) ) . Given that r 0 R . We have r 0 ( R { r 0 } ) ( A B ) . For x 0 ( R { r 0 } ) ( A B ) we have r 0 x 0 E (since R is a stable set and R ( A B ) ). Given that a 0 A B . We have a 0 R ( ( A B ) { a 0 } ) . For y 0 R ( ( A B ) { a 0 } ) we have a 0 y 0 E , (since A B is a stable set and R ( A B ) ).
So, R ( A B ) is the minimum dominating set.
So, ν ( G ) = m i n { | { b } { n } | , | A B | + | R | } , n N , b N ( a | A B | ) B . □
From Consequence 2 it follow that the clique number and the chromatic number are calculated directly; the number of stability is determined in O ( n + m ) (as the complexity of the weak decomposition algorithm); the minimum clique cover and the dominating number are O ( n + m ) (since the determination of the neighbors of a vertex in (B or A B ) is not more than the complexity of the weak decomposition algorithm).
In [14] are the following results:
  • For line graphs of planar subcubic bipartite graphs, it is proven that near-Bipartiteness is NP-complete;
  • For line graphs of planar subcubic bipartite graphs, it is proven that Independent Feedback Vertex Set is NP-complete;
  • List Semi-Acyclic 3-Colouring is algorithmically solvable on P 5 -free graphs in O ( n 16 ) time;
  • The size of a minimum independent feedback vertex set of a P 5 -free graph with n vertices can be solved in O ( n 16 ) time.
Using Theorem 10, the size of a minimum independent feedback vertex set is given in the following consequence.
Consequence 3.
Let G = (V, E) be a non-complete connected graph. (A, N, R) is the weak decomposition with G(A) as the weak component. In case if G is a P 5 -free graph then the size of a minimum independent feedback vertex set is min | N | , | B | .
Indeed. Since G N (which means G ( A R ) ) , as well as G B (which means G ( ( A B ) ( N R ) ) ) , are acyclic graphs. (Using Consequence 2 and Consequence 3, we obtain the Algorithm 3 for determining combinatorial optimization numbers).
Algorithm 3: Determining combinatorial optimization numbers
Input: A connected, non-complete and P 5 -free graph G = (V, E).
Output: Determination: α (G), θ (G), γ (G) and the size of a minimum independent feedback vertex set
  Determine a weak decomposition (A, N, R) with N R
  Calculation: | N ( b 1 ) ( A B ) | + | ( A B ) N ( b 1 ) ( A B ) | , | A B | , | A | , | B | , | A | | B | + | N | ,
   | A | | B | + | R | , | B | + | R | , | N ( a | A B | ) B | + | B ( N ( a | A B | ) B ) |
  Determination: α ( G ) , θ (G), γ (G) using Consequence 2.
  Determination the size of a minimum independent feedback vertex set using Consequence 3
  So, using the notations in Consequence 2:
   α ( G ) = max{ | A | | B | + | N | , | A | | B | + | R | , | B | + | R | }.
   θ ( G ) = m a x { | R | , | N | } + m i n { m a x { | B | , | N ( b 1 ) ( A B ) | } + | ( A B ) N ( b 1 ) ( A B ) | ,
   m a x { | A B | , | N ( a | A B | ) B | } + | B N ( a | A B | ) B | } ;
   γ ( G ) = m i n { | { b } { n } | , | A | | B | + | R | } .
  So, using the notations in Consequence 3: min{ | N | , | B | }
The complexity of the determining combinatorial optimization numbers algorithm.
Determine a weak decomposition (A, N, R) with N R / / The algorithm for the weak decomposition of a graph has complexity O ( n + m ) .
Calculation: | N ( b 1 ) ( A B ) | + | ( A B ) N ( b 1 ) ( A B ) | , | A B | , | A | , | B | , | A | | B | + | N | , | A | | B | + | R | , | B | + | R | , | N ( a | A B | ) B | + | B ( N ( a | A B | ) B ) |
The determination of the neighbors of an vertex in (B or A B ) is not more than the complexity of the weak decomposition algorithm, which is O ( n + m ) .
Determination: α (G), θ (G), γ (G) using Consequence 2/Comparisons, O ( 1 ) .
Determination the size of a minimum independent feedback vertex set using Consequence 3/A comparison, O ( 1 ) .
According to Consequence 2, the complexity of determining α ( G ) , θ ( G ) , γ ( G ) are O ( n + m ) . According to Consequence 3, the complexity of determining the size of a minimum independent feedback vertex set is O ( 1 ) .

4. Conclusions

In this paper the P 5 -free graphs are characterized using the weak decomposition presented in Theorem 10. The results consist of an O ( n ( n + m ) ) recognition algorithm. Consequence 1 characterizes the P 5 -free graphs using the dominant clique. A result of Consequence 1 is the direct calculation of the clique and chromatic number of the P 5 -free graphs. Based on the fact that the complexity of the weak decomposition algorithm is O ( n + m ) , and because | A | | B | + | N | , | A | | B | + | R | , | B | + | R | is determined in O ( n ) time, it follows from the Consequence 1 that the stability number of P 5 -free graphs is calculated in O ( n + m ) time. Because N ( b 1 ) ( A B ) , and N( a | A B | ) B is determined linearly, it follows that the minimum clique cover and the dominating number is O ( n + m ) (this is based on the fact that the complexity of the weak decomposition algorithm being O ( n + m ) ) . Since the complexity of the weak decomposition algorithm is O ( n + m ) and |N|, |B|, it is calculated in O ( n ) time it follows, from the Consequence 3, that the size of a minimum independent feedback vertex set of P 5 -free graphs is calculated in O ( n + m ) time.

Author Contributions

M.T. participated in the entire work; L.D., I.Ş. and V.L. participated in the development of algorithms; and L.B.I. participated in conceptualization. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

References

  1. Zhao, S.; Xu, H. A Novel Preference Elicitation Technique Based on a Graph Model and Its Application to a Brownfield Redevelopment Conflict in China. Int. J. Environ. Res. Public Health 2019, 16, 4088. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  2. Eles, A.; Halasz, L.; Heckl, I.; Cabezas, H. Evaluation of the Energy Supply Options of a Manufacturing Plant by the Application of the P-Graph Framework. Energies 2019, 12, 1484. [Google Scholar] [CrossRef] [Green Version]
  3. Khan, K.U.; Alam, A.; Dolgorsuren, B.; Uddin, M.A.; Umair, M.; Sang, U.; Duong, V.T.T.; Xu, W.; Lee, Y.K. LPaMI: A Graph-Based Lifestyle Pattern Mining Application Using Personal Image Collections in Smartphones. Appl. Sci. 2017, 7, 1200. [Google Scholar] [CrossRef] [Green Version]
  4. Yin, K.; Yu, L.; Li, X. An Improved Graph Model for Conflict Resolution Based on Option Prioritization and Its Application. Int. J. Environ. Res. Public Health 2017, 14, 1311. [Google Scholar] [CrossRef] [Green Version]
  5. Talmaciu, M.; Nechita, E.; Iantovics, B. Recognition and combinatorial optimization algorithms for bipartite chain graphs. Comput. Inform. 2013, 32, 313–329. [Google Scholar]
  6. Miller, A.; Miron, D.; Maiya, S. GraphDraw—A Tool for the Represention of Graphs Using Inherent Symmetry. Proceedings 2018, 2, 86. [Google Scholar] [CrossRef] [Green Version]
  7. Yun, U.; Lee, G.; Kim, C.H. The Smallest Valid Extension-Based Efficient, Rare Graph Pattern Mining, Considering Length-Decreasing Support Constraints and Symmetry Characteristics of Graphs. Symmetry 2016, 8, 32. [Google Scholar] [CrossRef] [Green Version]
  8. Lee, G.; Yun, U.; Ryang, H.; Kim, D. Multiple Minimum Support-Based Rare Graph Pattern Mining Considering Symmetry Feature-Based Growth Technique and the Differing Importance of Graph Elements. Symmetry 2015, 7, 1151–1163. [Google Scholar] [CrossRef] [Green Version]
  9. Berge, C. Graphs; Nort-Holland: Amsterdam, The Netherland, 1985. [Google Scholar]
  10. Zverovich, I.E. Perfect connected-dominant graphs. Discuss. Math. Graph Theory 2003, 23, 159–162. [Google Scholar] [CrossRef]
  11. Lokshtanov, D.; Vatshelle, M.; Villanger, Y. Independent Set in P5-Free Graphs in Polynomial Time; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA, 2014. [Google Scholar]
  12. Flier, H.; Mihalak, M.; Schobel, A.; Widmayer, P.; Zych, A. Vertex disjoint paths for dispatching in railways. In Proceedings of the ATMOS, Liverpool, UK, 9 September 2010; pp. 61–73. [Google Scholar]
  13. Fukuda, S.M.T.; Morimoto, Y.; Morishita, S.; Tokuyama, T. Data mining with optimized two-dimensional association rules. ACM Trans. Database Syst. 2001; 26, 179–213. [Google Scholar]
  14. Bonamy, M.; Dabrowski, K.K.; Feghali, C.; Johnson, M.; Paulusma, D. Independent Feedback Vertex Set for P5-free Graphs. Algorithmica 2018, 81, 1416–1449. [Google Scholar]
  15. Hoàng, C.T.; Kamiński, M.; Lozin, V.; Sawada, J.; Shu, X. Deciding k-colorability of P5-free graphs in polynomial time. Algorithmica 2010, 57, 74–81. [Google Scholar]
  16. Korobitsyn, D.V. On the complexity of determining the domination number in monogenic classes of graphs. Diskret. Mat. 1990, 2, 90–96. (In Russian) [Google Scholar]
  17. Král, D.; Kratochvil, J.; Tuza, Z.; Woeginger, G.J. Complexity of coloring graphs without forbidden induced subgraphs. In Proceedings of the 27th International Workshop on Graph-Theoretic Concepts in Computer Science, LNCS 2204, WG 2001, Boltenhagen, Germany, 14–16 June 2001; pp. 254–262. [Google Scholar]
  18. Gerber, M.U.; Hertz, A.; Schindl, D. P5-free augmenting graphs and the maximum stable set problem. Discret. Appl. Math. 2004, 132, 109–119. [Google Scholar] [CrossRef] [Green Version]
  19. Fouquet, J.L. A decomposition for a class of {P5, P5}-free graphs. Discret. Math. 1993, 121, 75–83. [Google Scholar] [CrossRef] [Green Version]
  20. Chudnovsky, M.; Esperet, L.; Lemoine, L.; Maceli, P.; Maffray, F.; Penev, I. Graphs with no induced P5 or P5. Available online: https://web.math.princeton.edu/~mchudnov/decompP4CP4.pdf (accessed on 3 November 2019).
  21. Liu, J.; Zhou, H. Dominating subgraphs in graphs with some forbidden structures. Discret. Math. 1994, 135, 163–168. [Google Scholar] [CrossRef] [Green Version]
  22. Talmaciu, M. Decomposition Problems in the Graph Theory with Applications in Combinatorial Optimization. Ph.D. Thesis, University “Al. I. Cuza” Iasi, Iași, Romania, 2002. [Google Scholar]
  23. Talmaciu, M.; Nechita, E. Recognition Algorithm for diamond-free graphs. Informatica 2007, 18, 457–462. [Google Scholar]
  24. Croitoru, C.; Olaru, E.; Talmaciu, M. Confidentially connected graphs. In Proceedings of the Annals of the University “Dunarea de Jos” of Galati, International Conference “The Risk in Contemporany Economy”, Galati, Romania, 1–2 October 2000; pp. 17–20. [Google Scholar]
  25. Croitoru, C.; Talmaciu, M. On Confidentially Connected Graphs; Seria B; Nr. 1; Buletinul Siintific al Universitatii Baia Mare, Fascicola Matematica-Informatica: Baia Mare, Romania, 2000; Volume XVI, pp. 13–16. [Google Scholar]
  26. Hammer, P.L.; Peled, U.N.; Sun, X. Difference Graphs. Discret. Appl. Math. 1990, 28, 35–44. [Google Scholar] [CrossRef] [Green Version]
  27. Information System on Graph Classes and Their Inclusions. Available online: http://www.graphclasses.org/classes/gc_396.html (accessed on 3 November 2019).

Share and Cite

MDPI and ACS Style

Talmaciu, M.; Dumitriu, L.; Şuşnea, I.; Lepin, V.; Iantovics, L.B. Recognition and Optimization Algorithms for P5-Free Graphs. Symmetry 2020, 12, 304. https://doi.org/10.3390/sym12020304

AMA Style

Talmaciu M, Dumitriu L, Şuşnea I, Lepin V, Iantovics LB. Recognition and Optimization Algorithms for P5-Free Graphs. Symmetry. 2020; 12(2):304. https://doi.org/10.3390/sym12020304

Chicago/Turabian Style

Talmaciu, Mihai, Luminiţa Dumitriu, Ioan Şuşnea, Victor Lepin, and László Barna Iantovics. 2020. "Recognition and Optimization Algorithms for P5-Free Graphs" Symmetry 12, no. 2: 304. https://doi.org/10.3390/sym12020304

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