On the monophonic rank of a graph

A set of vertices $S$ of a graph $G$ is $monophonically \ convex$ if every induced path joining two vertices of $S$ is contained in $S$. The $monophonic \ convex \ hull$ of $S$, $\langle S \rangle$, is the smallest monophonically convex set containing $S$. A set $S$ is $monophonic \ convexly \ independent$ if $v \not\in \langle S - \{v\} \rangle$ for every $v \in S$. The $monophonic \ rank$ of $G$ is the size of the largest monophonic convexly independent set of $G$. We present a characterization of the monophonic convexly independent sets. Using this result, we show how to determine the monophonic rank of graph classes like bipartite, cactus, triangle-free and line graphs in polynomial time. Furthermore, we show that this parameter can be computed in polynomial time for $1$-starlike graphs, $i.e.$, for split graphs, and that its determination is $NP$-complete for $k$-starlike graphs for any fixed $k \ge 2$, a subclass of chordal graphs. We also consider this problem on the graphs whose intersection graph of the maximal prime subgraphs is a tree.


Introduction
A family C of subsets of a finite set X is a convexity on X if ∅, X ∈ C and C is closed under intersection (van de Vel (1993)).Given a graph G and a family P of paths of G, the P-interval of a set S ⊆ V (G) is formed by S and all vertices of every path of P between vertices of S. The set S is P-convex if S is equal to its P-interval.The P-convex hull of S is the minimum P-convex set containing S. It is easy to see that the P-convex sets form a convexity on V (G).Indeed, the most studied graph convexities are defined in this way.For instance, the well-known geodetic convexity has P as the family of shortest paths (Pelayo (2013); Dourado et al. (2016)), the P 3 convexity has P as the family of paths of order 3 (Campos et al. (2015); Centeno et al. (2011)), and in the monophonic convexity, P is the family of all induced paths (Dourado et al. (2010); Duchet (1988)).
The set S is said to be P-convexly independent if for every u ∈ S, it holds that u does not belong to the P-convex hull of S − {u}.The size of a maximum P-convexly independent set of G is called the P-rank of G.We are interested in the computational complexity of determining the rank of a graph in the monophonic convexity.is a petal mp-subgraph of G ′ .Denote by F (G), M(G), and P(G) the families of the flower subgraphs of G, of the mp-subgraphs of G, and of the petal mp-subgraphs of G, respectively.
For M ∈ P(G), we say that X ⊆ Theorem 2.1 (Dourado et al. (2010)) Every two non-adjacent vertices of a prime graph form a monophonic hull set.
Theorem 2.2 A set S ⊆ V (G) of a connected graph G is m-convexly independent if and only if for every mp-subgraph M of the minimum flower subgraph H of G containing S , if M is a leaf, then S ∩ V (M ) is contained in a stamen set of M in H, otherwise S ∩ V (M ) = ∅.
Proof: First, consider that S is an m-convexly independent set of G.
We begin showing that no vertex of S belongs to → M for any M ∈ M(H).Suppose the contrary and and let P 2 be an induced (u 2 , w)-path of H 2 − (C w − {w}).These two paths imply that w ∈ u 1 , u 2 , which contradicts the assumption that S is an m-convexly independent of G.

Suppose that there is an mp
. Now, define H u as a maximum connected subgraph of H containing M as a leaf with → M = C u , and define H v as a maximum connected subgraph of H containing M as a leaf with , and let P be an induced (u, v)path of M .These three paths imply that u, v ∈ u ′ , v ′ .Now, Theorem 2.1 implies that w ∈ u ′ , v ′ , contradicting the assumption that S is an m-convexly independent of G. Now, suppose that there is As a consequence, we can express the monophonic rank of a graph in terms of its flower subgraphs and the stamen sets of its petal mp-subgraphs.
Corollary 2.1 For any graph G, r(G) = max s(M ) where s(M ) stands for the maximum size of a stamen set of M in G ′ .
Corollary 2.1 is used in Sections 3 and 4 to solve MONOPHONIC RANK in polynomial time for some graph classes.
3 Bipartite, cactus and triangle-free graphs In this section, we show how to compute the monophonic rank of a class containing the bipartite, cactus and triangle-free graphs in polynomial time.We say that a graph G is bipartite if V (G) can be partitioned into two independent sets, and that G is a cactus if every maximal 2-connected subgraph of G is a cycle or an edge.We define Γ 1 as the class containing the graphs G such that G is K 4 -free and if an mpsubgraph B of G contains a K 3 , then B is isomorphic to K 3 .Note that Γ 1 contains the bipartite, cactus and triangle-free graphs.The following property of general graphs is important for this purpose.
and the claim is true.
Finally, by the induction hypothesis, we have | with maximum number of leaves of Type 2.
Proof: First, observe that every petal mp-subgraph of a graph G ∈ Γ 1 has Type 1 or 2. Now, let S be an m-convexly independent set of G with |S| = r(G) and let H be the minimum flower subgraph containing the vertices of S .By Corollary 2.1, for every petal mp-subgraph We have the following complexity result as a consequence of the above theorem.
Corollary 3.1 One can determine the monophonic rank of a graph G ∈ Γ 1 in polynomial time. Proof: and repeat.The instance of G ′ after the loop is the flower subgraph of G with the same number of petal mp-subgraphs as G with maximum number of leaves of Type 2. By Theorem 3.1, r(G) = n 1 + 2n 2 where n 1 is the number of petal mp-subgraphs of Type 1, n 2 is the number of petal mp-subgraphs of Type 2. It is clear that G ′ can be obtained in polynomial time on the size of G. ✷ 4 When the intersection graph of the mp-subgraphs is a tree In this section, we consider the class Γ 2 of the graphs G such that Ω(M(G)) is a tree.We will see that Γ 2 contains the line graphs.We begin characterizing the graphs of Γ 2 .Then, we present in Section 4.1 a metaalgorithm for trees.Such algorithm is part of the algorithm presented in the sequel for the computation of the monophonic rank of graphs of Γ 2 .We decided to present the exploitation of the tree-like structure of our solution separatly because it is essentially the same that appears implicitly in other solutions for other problems (Anand et al. (2020); Benevides et al. (2015)), which facilitates its use in future works.
Lemma 4.1 A graph G ∈ Γ 2 if and only if every vertex of G belongs to at most 2 mp-subgraphs of G.
Proof: Denote H = Ω(M(G)).First, consider that v is a vertex belonging to 3 mp-subgraphs M 1 , M 2 , and M 3 of G.It is clear that the vertices u 1 , u 2 , and u 3 of H corresponding to M 1 , M 2 , and M 3 , respectively, induce a C 3 , which means that H is not a tree.Conversely, consider that H has a cycle C = u 1 . . .u k .We can assume that C is induced.If k ≥ 4, then G − M i ∩ M i+1 is a connected graph for i + 1 taken mod k.Therefore, M 1 ∪ . . .∪ M k has no clique separator and properly contains an mp-subgraph.Therefore, k = 3 and suppose that every vertex of G belongs to at most 2 mp-subgraphs of G. Hence.
is a connected graph for i + 1 taken mod 3. Therefore, M 1 ∪ . . .∪ M 3 has no clique separator and properly contains an mp-subgraph, which is a contradiction.✷

Meta-algorithm for trees
Let T be a tree of order n and let F and F ′ be sets of functions.We say that (T, F, F ′ ) is a good triple if • for every v ∈ V (T ) and w ∈ N (v), there is f ′ v,u ∈ F ′ which depends of the values of f ′ w,v for w ∈ N (v) − {u} and does not depend of any other function of F ∪ F ′ ; and • for every v ∈ V (T ), there is f v ∈ F which depends of the values of f ′ w,v for w ∈ N (v) and does not depend of any other function of F ∪ F ′ .
If v is a leaf of T , we denote the only neighbor of v in T by π T (v).
while there is leaf w of T ′ with f w not computed yet do add u to T ′ as neighbor of w compute f w Theorem 4.1 If (T, F, F ′ ) is a good triple, Algorithm 1 computes all functions of F and F ′ in time O(n(α + α ′ )) steps, where α and α ′ are the time complexities of computing f ∈ F and f ′ ∈ F ′ , respectively, and n is the number of vertices of the input tree.
Proof: The number of iterations of the while beginning in line 5 is n − 2. The cost of each iteration is α ′ .Therefore, the total cost of lines 5 to 8 is O(nα ′ ).It remains to show that f ′ w,π T ′ (w) can be computed in line 7.But this is consequence of the fact that f ′ w,π T ′ (w) is computed only if w is a leaf of T ′ at this moment, i.e., f ′ u,w has already been computed for every u ∈ N T (w) − {π T ′ (w)}.The number of iterations of the while loop beginning in line 12 is n.The cost of each line 16 is α.Even inside of the while loop beginning in line 12, the total number of iterations of the for loop beginning in line 13 is n − 2. The cost of each iteration is α ′ .Therefore, the total cost of lines 12 to 16 is O(n(α + α ′ )).It remains to show that f ′ w,π T ′ (w) can be computed in line 14 and that f w can be computed in line 16.Both cases are consequences of the fact that f ′ u,w has already been computed for every u ∈ N T (w) when w is chosen in line 12. ✷

Applying the meta-algorithm
Now, we define the functions of a good triple of a graph G ∈ Γ 2 for expressing the monophonic rank of G. Write T = Ω(M(G)).For every w ∈ V (T ) and u ∈ N (w), denote by M w the mp-subgraph of G corresponding to w and by M w,u the petal mp-subgraph of the graph associated to the tree of T − (N (w) − u) containing w. Define {f w }.
Note that f ′ M,πT r (M) = s(M ) for every M ∈ P(G r ).For every w, since f w is defined as the maximum between two values where one of them is the sum of f ′ u,w for all u ∈ N (w), for every w that is not a leaf of T r , it holds that f w = M∈P(Gr) s(M ).If G r is not a prime graph, then T r has at least one non-leaf vertex.Otherwise, f w is the maximum clique of the graph prime G r , which corresponds to the maximum degree of a vertex of G. ✷ The following result is a consequence of Theorems 4.1 and 4.2.
Corollary 4.1 If G ∈ Γ 2 , then r(G) can be computed in O(n(m + α + α ′ )) steps where α and α ′ are the time complexities of determining the clique number of G and a maximum stamen set of a petal mp-subgraph of a flower subgraph of G, respectively.
Proof: Denote T = Ω(M(G)).It is easy to see that (T, F, F ′ ) is a good triple.Using Theorem 4.2, it remains to prove the time complexity.By Theorem 4.1, f ′ w,u and f w can be computed in O(n(α + α ′ )) steps.Since M(G) can be computed in O(nm) steps (Leimer (1993)), the result does follow.✷ We say that a graph class Γ is hereditary if G ∈ Γ implies that every induced subgraph of G also belongs to Γ.As a consequence of Corollary 4.1, the monophonic rank can be computed in polynomial time for every graph G ∈ Γ 2 ∩ Γ such that Γ is hereditary and the clique number can be computed in polynomial time for the graphs of Γ, for instance, when Γ is the class of chordal graphs.We will see in Section 5 that MONOPHONIC RANK is NP-complete for chordal graphs.
We conclude this section by showing that there are non-hereditary graph classes Γ so that MONO-PHONIC RANK is NP-complete even if the clique number can be computed in polynomial time.
We define Γ 3 as the class containing the graphs G such that |V (G)| = 2n + 1 for some integer n ≥ 1, V (G) can be partitioned into sets It is easy to see that every graph of Γ 3 is prime, can be recognized in polynomial time, and its maximum clique can also be found in polynomial time.
Theorem 4.3 MONOPHONIC RANK is NP-complete for the graphs whose mp-subgraphs belong to Γ 3 .
Proof: We present a reduction from a version of MAXCLIQUE that receives as input a connected graph G or order n, with no universal vertices, and asks whether there exists a clique in G with at least ⌈ n 2 ⌉ vertices.Let H be the graph with vertex set and the same for V 3 and V 4 .Notice that H contains two mp-subgraphs, each one belonging to Γ 3 .It is easy to see that rk

Line graphs
Let G be a graph and v ∈ V (G).The line graph of G, denoted by L(G), is Ω(E(G)).We say that G is a line graph if there is a graph H such that G = L(H).In this case, L −1 (G) represents the family of graphs that are a root of G under the line graph operator.Denote by Proof: Suppose by contradiction that K is a clique separating vertices u, v ∈ L(G).We can write u = u 1 u 2 and v = v 1 v 2 for u 1 , u 2 , v 1 , v 2 ∈ V (G).Since K separates u and v, we have that u 1 , u 2 , v 1 and v 2 are distinct.Since G is 2-connected, there is a cycle C containing both edges u 1 u 2 and v 1 v 2 .Without loss of generality, we can assume that u 1 and v 1 separate u 2 and v 2 in the subgraph of G induced by the edges of C.Then, let P u1u2v1v2 be the (u 1 , v 2 )-path formed by the edges of C containing the edges u 1 u 2 , v 1 v 2 , and let P u2u1v2v1 be the (u 2 , v 1 )-path formed by the edges of C containing the edges u 1 u 2 , v 1 v 2 .Now, denote by E ′ the edges of G associated with the vertices of K.There are two possibilities for the elements of E ′ , either they are the edges of a triangle of G − {u 1 u 2 , v 1 v 2 } or they are some edges of E(G) − {u 1 u 2 , v 1 v 2 } incident to a vertex w.In both cases, at least one of the paths P u1u2v1v2 and P u2u1v2v1 does not contain edges of E ′ , which is a contradiction.
) also induces a prime subgraph for every cut vertex v.The maximality of each M ∈ L comes from the fact that M ∪ S for S ⊂ H where H is a v-component for v ∈ M has E(v) ∩ H as a clique separator.Suppose by contradiction that L(G) has an mp-subgraph M ′ ∈ L. Therefore, M ′ contains vertices that are edges of different blocks of G sharing a cut vertex v and at least one of these edges, say uw, is not incident to v. Now observe that E(v) ∩ H, where H is the v component containing uw is a clique separator of M ′ , which is a contradiction.Proof: We begin showing that for line graphs, every stamen set of a petal mp-subgraph M of a line graph G that is not prime is 1.Then, suppose the contrary and let u, v Without loss of generality, we can assume that u 1 = v 1 = w 1 while u 2 , v 2 and w 2 are distinct.Therefore, w 2 is a cut vertex of G L and u has no more neighbors in If G is a prime graph, then G L is a 2-connected graph and the maximum stamen set of G is the maximum degree of G L .
Finally, Corollary 2.1 and Lemma 3.1 imply that we only need to consider one flower subgraph of G, namely, itself.Therefore, r(G) = max ∆(G L ), ℓ) , where ℓ stands for the number of leaf blocks of G L .Since a member of G L can be found in linear time (Lehot (1974)), the result does hold.✷
In this section, we describe a polynomial-time algorithm for determining the monophonic rank of a 1-starlike graph and show that this problem is NP-complete for k-starlike graphs for any fixed k ≥ 2.

INDEPENDENT SET
Instance: A graph G and a positive integer k.Question: Does G contain an independent set with at least k vertices?
Theorem 5.1 The MONOPHONIC RANK problem restricted to split graphs belongs to P.
Proof: Since INDEPENDENT SET restricted for bipartite graphs belongs to P (Garey and Johnson (1982)), it suffices to present a polynomial reduction from MONOPHONIC RANK restricted to split graphs to IN-DEPENDENT SET restricted to bipartite graphs.
Let G be a split graph with bipartition (C, I).We can assume that C is a maximum clique.Construct a bipartite graph G ′ from a copy of G by deleting the edges joining vertices of C. Denote (C ′ , I ′ ) the bipartition of G ′ , where C ′ = {v ′ i : v i ∈ C}.See Figure 1.We will show that G has an m-convexly independent set of size at least k if and only if G ′ has an independent set of size at least k.
. By the construction of G ′ , we can assume that v i ∈ C and v j ∈ I. Since S is not a clique, there is v ℓ such that v ℓ v j ∈ E(G).Now, observe that v i belongs to a monophonic path between v j and v ℓ , which contradicts the assumption that S is an m-convexly independent set of G.
Conversely, let S ′ be an independent set of G ′ with at least k vertices.Write S = {v i : Since S ′ is an independent set, we have that v i ∈ S − {v i } , which means that S is an m-convexly independent set of G. ✷ Now, we show that the problem of deciding whether a 2-starlike graph has a convexly independent set with at least k vertices is NP-complete in the monophonic convexity.It is clear that the following variation of INDEPENDENT SET is also NP-complete Garey and Johnson (1982).

HALF INDEPENDENT SET
Instance: A graph G.
Question: Does G contain an independent set with at least |V (G)|+1 2 vertices?
Proof: Since the monophonic convex hull of a set can computed in polynomial time and one needs |S| computations of the convex hull of a set to decide whether a set is convexly independent, the problem belongs to NP.We present a reduction from HALF INDEPENDENT SET.
Let G be a general graph with n = |V (G)|.We construct a 2-starlike graph G ′ as follows.For every vertex v i ∈ V (G), create 4n + 1 vertices u 1 i , . . .u 2n+1 i , w 1 i , . . ., w 2n i in G ′ .Write U = {u 1 i , . . ., u 2n+1 i } : 1 ≤ i ≤ n} and W = {w 1 i , . . ., w 2n i : 1 ≤ i ≤ n}.The edge set of G ′ is obtained as follows • add the edges to make a clique of the set U ; • add the edges u 2n+1 i w 2n−1 i and u 2n+1 i w 2n i for every v i ∈ V (G); and • for every v i v j ∈ E(G), add the edges u p i w q j for p, q ∈ {1, . . ., 2n}.
Since U is a clique and for i, ℓ ∈ {1, . . ., n}, the vertices w 2ℓ i and w 2ℓ+1 i are twins and each one has only one neighbor in W , it holds that G ′ is a 2-starlike graph.Note that the number of vertices of G ′ is 4n 2 + n, which means that G ′ can be constructed in polynomial time.To complete the instance of MONOPHONIC RANK define p = 4n n + 1 2 + n − n + 1 2 = n + (4n − 1) n + 1 2 .
We will show that G has an independent set with ⌈ n+1 2 ⌉ vertices if and only if G ′ has a monophonic convexly independent set with p vertices.Since every vertex has a neighbor in the set U , it is easy to see that the diameter of G ′ is 3 (and a maximum induced path has length 3).
First, consider that G has an independent set S with n+1 2 vertices.Define S ′ = {u 1 i , . . ., u 2n i , w 1 i , . . ., w 2n i : v i ∈ S} ∪ {u 2n+1 i : v i ∈ S}.Since S ′ has 4n vertices for every vertex in S and 1 for each vertex not in S, it holds Suppose that there is u ∈ S ′ such that u ∈ S ′ − {u} .Hence, u belongs to some monophonic (x, x ′ )path for x, x ′ ∈ S ′ − {u} .Since W contains only simplicial vertices and no simplicial vertex is an internal vertex of an induced path, we conclude that u ∈ U ∩ S ′ .Since U is a clique, at least one of x and x ′ belongs to W .However, observe that for every S ′′ ⊆ S ′ , it holds S ′′ ⊆ (S ′′ ∩ W ) ∪ U , in other The above result can be extended for k-starlike with k ≥ 2.
Corollary 5.1 For any fixed integer k ≥ 2, the MONOPHONIC RANK problem is NP-complete for kstarlike graphs.✷
we have a contradiction.Conversely, let w ∈ S. By the definition of stamen set, we conclude that w ∈ ← M of some petal mpsubgraph of H, i.e., → M is a clique.If V (M ) ∩ S = {w}, it is clear that w ∈ S − {w} , then we can assume that |V (M ) ∩ S| ≥ 2 and w ∈ S − {w} .But this contradicts the definition of stamen set, because in any case that |V (M ) ∩ S| ≥ 2, it holds that → M ⊆ N (w), which contradicts w ∈ S − {w} .✷

Lemma 3. 1
Let G be any graph.For every flower subgraph G ′ of G, it holds |P(G)| ≥ |P(G ′ )|.Proof: We use induction on the number of mp-subgraphs of G. First, consider that G has 2 mp-subgraphs.Note that |P(G)| = 2 and that |P(G ′ )| = 1 for any of its flower subgraphs.Now, consider that G has k mp-subgraphs for k ≥ 3. Suppose that there is a flower subgraph G ′ of G with |P(G)| < |P(G ′ )|.Since G ′ can be obtained from G by iteratively removing a petal mp-subgraph, there is a petal mp-subgraph M of G not present in G ′ .Define G ′′ = G − ← M .We claim that |P(G)| ≥ |P(G ′′ )|.If M is not an extreme mp-subgraph, then there is exactly one mp-subgraph M ′ in G ′′ that is not in G, namely, the one formed by the vertices of → M .Observe that M(G ′′ ) = (M(G) − {M }) ∪ {M ′ }.Since the intersections among the mp-subgraphs of G and G ′′ are the same, it holds that G ′′ has no new petal mp-subgraph and |P(G)| > |P(G ′′ )| for this case because Finally, let |L(G)| ≥ 2 and B be a block of G with at least 3 vertices.Since there is a cut vertex v of G belonging to B, it holds |L( → B)| ≥ 2 because v has at least 2 neighbors in B. ✷ Lemma 4.4 If G is a line graph, then G ∈ Γ 2 .Proof: By Lemma 4.3, M(G) = L(G).Now, the result follows from the fact that every vertex of G belongs to at most two sets of L(G) and Lemma 4.1.✷ Corollary 4.2 The monophonic rank of a line graph can be found in linear time.

Fig. 1 :
Fig. 1: Reduction from MONOPHONIC RANK PROBLEM restricted to split graphs to INDEPENDENT SET PROBLEM restricted to bipartite graphs.The vertices inside of the oval with a straight form a clique.First, let S be an m-convexly independent set of size at least k of G.If |S| ≤ |C|, then G ′ has an independent set of size at least k contained in C ′ because C ′ is an independent set.Then, consider |S| > |C| and define S ′ = {v ′ i : v i ∈ S}.Suppose that v ′ i v ′ j ∈ E(G) for v ′ i , v ′ j ∈ S ′.By the construction of G ′ , we can assume that v i ∈ C and v j ∈ I. Since S is not a clique, there is v ℓ such that v ℓ v j ∈ E(G).Now, observe that v i belongs to a monophonic path between v j and v ℓ , which contradicts the assumption that S is an m-convexly independent set of G.Conversely, let S ′ be an independent set of G ′ with at least k vertices.Write S = {v i : v ′ i ∈ S ′ }.Observe that

Proof:
It suffices to change the reduction presented in Theorem 5.2 by adding kn vertices in G ′ for every vertex of G and defining p = n + kn n+1 2 .