You are on page 1of 11

All-path convexity: Combinatorial and

complexity aspects

Fábio Protti1
Instituto de Computação - Universidade Federal Fluminense - Brazil
E-mail: fabio@ic.uff.br

João V. C. Thompson
Centro Federal de Educação Tecnológica Celso Suckow da Fonseca
CEFET/RJ - Campus Petrópolis - Brazil
E-mail: joao.thompson@cefet-rj.br

Abstract. Let P be any collection of paths of a graph G = (V, E). For


S ⊆ V , define I(S) = S ∪ {v | v lies in a path of P with endpoints in S}.
Let C be the collection of fixed points of the function I, that is, C = {S ⊆
V | I(S) = S}. It is well known that (V, C) is a finite convexity space,
where the members of C are precisely the convex sets. If P is taken as the
collection of all the paths of G, then (V, C) is the all-path convexity with
respect to graph G. In this work we study how important parameters and
problems in graph convexity are solved for the all-path convexity.
Keywords: all-path convexity, graph convexity, path convexity

1 Introduction
Let G = (V, E) be a simple, finite, nonempty, and connected graph, and
let C be a collection of subsets of V . We say that (V, C) is a (finite) graph
convexity space if: (a) ∅ ∈ C; (b) V ∈ C; (c) C is closed under intersections.
In many studies, the collection C is determined as follows. Let P be any
collection of paths of a graph G, and, for S ⊆ V , define
I(S) = S ∪ {v | v lies in a path of P with endpoints in S}.
Define C ⊆ 2V as the collection of fixed points of the function I, that is,
C = {S ⊆ V | I(S) = S}. Then (V, C) is easily seen to be a graph convexity
space, generally called a “path convexity”. In particular, if P contains
precisely all the shortest paths of G then the corresponding convexity space
is the well-known geodesic convexity with respect to G [18, 19, 22]; if P
is the collection of induced paths of G then the corresponding convexity
space is the monophonic convexity with respect to G [12, 15]; and there are
in the literature many other examples described below, where in each case
we indicate which collection P of paths of G is considered:
1 Partially supported by CNPq and FAPERJ, Brazilian Research Agencies
– g 3 -convexity [23]: shortest paths of length at least three;
– m3 -convexity [3, 14]: induced paths of length at least three;
– gk -convexity [16]: shortest paths of length at most k;
– P3 -convexity [4, 13, 24]: paths of length two;
– P3∗ -convexity [1]: induced paths of length two;
– triangle-path convexity [6, 7]: paths allowing only triangular chords;
– total convexity [11]: paths allowing only non-triangular chords;
– detour convexity [8, 9, 10]: longest paths.
In this work, we study the all-path convexity, which is associated with
the collection P of all the paths of G [5, 17, 25]. Our study is concen-
trated in solving the most important problems in graph convexity for the
specific case of the all-path convexity, including the determination of some
well-known graph convexity parameters, such as the convexity number, the
interval number, and the hull number of G. The remainder of this work is
organized as follows. In Section 2 we provide some necessary background.
In Section 3 we present the main results of this work. Finally, Section 4
contains our concluding remarks.

2 Preliminaries
In this work, G = (V, E) is always a finite, simple, nonempty, and connected
graph with n vertices and m edges. Let P be a collection of paths of G,
and let IP : 2V → 2V be a function (interval function) associated with P
in the following way:

IP (S) = S ∪ {v | v lies in a path P ∈ P with endpoints in S}.

Define CP as the family of subsets of V such that S ∈ CP if and only if


IP (S) = S. Then it is easy to see that (V, CP ) is a finite convexity space,
whose convex sets are precisely the fixed points of IP .
Proposition 1. [26] (V, CP ) is a finite convexity space.

If P is the collection of all the paths of G, then (V, CP ) is the all-path


convexity with respect to G. In order to ease the notation, we omit the
subscript P if it is clear from the context.
In this work we focus on seven important problems that are usually
studied in the field of convexity in graphs, and solve them for the case of
the all-path convexity. We need some additional definitions. Let S ⊆ V . If
I(S) = V then S is an interval set. The convex hull H(S) of S is the smallest
convex set containing S. Write I 0 (S) = S and define I i+1 (S) = I(I i (S))
for i ≥ 0. Note that I(S) = I 1 (S) and there is an index i for which
H(S) = I i (S). If H(S) = V then S is a hull set. The convexity number
c(G) of G is the size of a maximum convex set S 6= V . The interval number
i(G) of G is the size of a smallest interval set of G. The hull number
h(G) of G is the size of a smallest hull set of G. Clearly, h(G) ≤ i(G).
The geodetic iteration number of a graph G, denoted by gin(G), is the
smallest i such that H(S) = I i (S) for every S ⊆ V (G). Equivalently,
gin(G) = min{i | I i (S) = I i+1 (S) for every S ⊆ V (G)}. Graphs with
geodetic iteration number at most 1 are called interval monotone graphs
Now we are in position to state the problems dealt with in this work:

– Convex Set
Input: A graph G and a set S ⊆ V .
Question: Is S convex?
– Interval Determination
Input: A graph G and a set S ⊆ V .
Goal: Determine I(S).
– Convex Hull Determination
Input: A graph G.
Goal: Determine H(S).
– Convexity Number
Input: A graph G.
Goal: Determine c(G).
– Interval Number
Input: A graph G.
Goal: Determine i(G).
– Hull Number
Input: A graph G.
Goal: Determine h(G).
– Geodetic Iteration Number
Input: A graph G.
Goal: Determine gin(G).

3 Main results
In this section we present the solution of the problems stated in the pre-
ceding section for the case of the all-path convexity. For X, Y ⊆ V , denote
N (X, Y ) = {v ∈ Y | v is a neighbor of some x ∈ X}.
Theorem 2. Let S ⊆ V . Then S is convex in the all-path convexity if and
only if either S = V or for every connected component Gi of G − S it holds
that
|N (V (Gi ), S)| = 1.
Proof. Suppose that S is convex and S 6= V , and let Gi be a connected
component of G − S. If |N (V (Gi ), S)| ≥ 2 then there are distinct v, w ∈ S
with neighbors v 0 , w0 ∈ V (Gi ) (not necessarily distinct). Let P 0 = v 0 . . . w0
be a path from v 0 to w0 in Gi (such a path exists because Gi is connected).
Occasionally, P 0 consists of a single vertex v 0 = w0 . Now, let P be the
path vP 0 w = vv 0 . . . w0 w. This means that v 0 (or w0 ) lies in a path with
endpoints in S, that is, v 0 ∈ I(S). Since v 0 ∈ / S, this implies I(S) 6= S, a
contradiction to the assumption that S is convex.
Conversely, suppose that S 6= V and |N (V (Gi ), S)| = 1 for every con-
nected component of G − S. Assume by contradiction that S is not convex.
Then, from the definition of convex set, there is a path P = v1 v2 . . . vk with
(distinct) endpoints in S that contains vertices outside S. Let j be the min-
imum index for which vj ∈ S and vj+1 6∈ S, and assume that vj+1 ∈ V (Gi ).
Since the Gi ’s are mutually isolated (i.e., there is no edge in E joining a ver-
tex in Gi to a vertex in Gk for i 6= k), let l be the minimum index for which
l > j and vl ∈ S (in other words, after visiting Gi , the path P must return
to S before visiting another component Gk ). Thus vj , vl ∈ N (V (Gi ), S).
But j 6= l, because P is a path. Then |N (V (Gi ), S)| ≥ 2, a contradiction.
Therefore, S is convex.
Corollary 3. Convex Set can be solved in O(n+m) time for the all-path
convexity.
Proof. If S 6= V , computing the connected components of G−S can be eas-
ily done in O(n+m) time. In addition, checking whether |N (V (Gi ), S)| = 1
for every connected component Gi of G − S can also be done in O(n + m)
time. Thus, the corollary follows.
Now we deal with the Interval Determination problem. Consider
the block decomposition of G represented by a block-cut tree TG , where
each vertex of TG is associated with either a block Bj (a cut edge or a
maximal 2-connected subgraph of G) or a cut vertex zi ∈ V , and there
is an edge linking a vertex Bj and a vertex zi in TG whenever block Bj
contains the cut vertex zi ∈ V . This definition implies that the vertices
of TG associated with blocks of G form an independent set, and the same
occurs for the vertices of TG associated with cut vertices of G. In addition,
every leaf of TG represent a block of G. An end block of G is a block
associated with a leaf of TG .
For a set S ⊆ V , let TS be the maximal subtree of TG such that every
leaf of TS is associated with a block of G containing a vertex of S that is
not a cut vertex in the subgraph GS induced by ∪Bj ∈V (TS ) Bj . Figure 1
shows an example.

i j k

a a e v y
l
b f w
u

c d g x z
(a)
B5 B5

l l
B1 b B3 f B4 w B7 B3 f B4

B2 B6
(b) (c)

Figure 1: (a) A graph G and a subset S = {b, j, w} (represented by the


white vertices), whose blocks are such that V (B1 ) = {a, b}, V (B2 ) =
{b, c, d}, V (B3 ) = {b, e, g, f }, V (B4 ) = {f, l, u, v, w}, V (B5 ) = {h, i, j, k, l},
V (B6 ) = {w, x}, V (B7 ) = {w, y, z}; (b) block-cut tree TG ; (c) subtree TS
of TG . Block B3 is a leaf of TS because it contains no cut vertex in the
graph GS induced by V (B3 ) ∪ V (B4 ) ∪ V (B5 ).

Lemma 4. Let S ⊆ V , and let u, w be two distinct vertices in S, belonging


to blocks Bu and Bw of TS , respectively. Assume that u and w are not
cut vertices in GS . Let Bj1 z1 Bj2 z2 . . . zk−1 Bjk be a path in TS between
Bj1 = Bu and Bjk = Bw . Then, for every v ∈ ∪ki=1 V (Bji ), there is a path
P in G from u to w passing through v.
Proof. If Bu = Bw and there is a vertex v ∈ V (Bu ) \ {u, w}, by the Fan
Lemma (Proposition 9.5 in [2], applied to 2-connected graphs) there is a
path P from u to w passing through v.
If Bu 6= Bw , construct from Bj1 z1 Bj2 z2 . . . zk−1 Bjk a path P in G as
follows. Let v ∈ ∪ki=1 V (Bji ) and suppose first that v is not a cut vertex in
GS . Assume that Bv = Bjs for some 1 < s < k (the cases s = 1 or s = k
are similar).
– Let P1 be a path contained in Bj1 starting at u and ending at z1 .
– Let Ps be a path contained in Bjs starting at zs−1 , passing through
v, and ending at zs . Since v is not a cut vertex of GS , the block Bjs
contains at least three vertices. Thus, the Fan Lemma guarantees the
existence of path Ps .
– Let Pi , 2 ≤ i ≤ k − 1, i 6= s, be a path contained in Bji starting at
zi−1 and ending at zi .
– Finally, let Pk be a path contained in Bjk starting at zk−1 and ending
at w.
Now, define P as the concatenation P1 P2 . . . Pk (remove replicated vertices
that appear consecutively). Then P is a path from u to w passing through
vertex v.
The case where v is a cut vertex of GS is dealt with similarly. In this
case, there is no need of applying the Fan Lemma to Bjs . Ps can be simply
taken as a path from zs−1 to zs , since v ∈ {zs−1 , zs }.
Let S ⊆ V and v ∈ V \ S. Say that a vertex z 6= v separates v and
V 0 ⊆ V \ {v} if, in graph G − z, the connected component containing v
contains no vertex of V 0 .
Theorem 5. Let S ⊆ V with |S| ≥ 2. Then
[
I(S) = Bj .
Bj ∈V (TS )

Proof. Let v ∈ ∪Bj ∈V (TS ) Bj . If v ∈ S then v ∈ I(S). If v 6∈ S, con-


sider a block Bv containing v. Clearly, there is a maximal path Pv =
Bj1 z1 Bj2 z2 . . . zk−1 Bjk in TS containing Bv . Thus, v ∈ ∪ki=1 V (Bji ). By
the maximality of Pv , Bj1 and Bjk are leaves in TS , and this implies that
Bj1 contains a vertex u ∈ S and Bjk contains a vertex w ∈ S, w 6= u,
such that u and w are not cut vertices in GS . Then, by Lemma 4, there is
a path P in G from u to w passing through v. Therefore, v ∈ I(S), i.e.,
∪Bj ∈V (TS ) Bj ⊆ I(S).
Now, let v ∈ I(S). If v ∈ S, then, from the definition of TS , it is
clear that v ∈ ∪Bj ∈V (TS ) Bj . Assume then v 6∈ S and v 6∈ ∪Bj ∈V (TS ) Bj .
Thus, v is in a block Bv of TG that is not in TS , and this implies that
there is a cut vertex z ∈ V (Bv ), z 6= v, that separates v and ∪Bj ∈V (TS ) Bj .
Since S ⊆ ∪Bj ∈V (TS ) Bj , z separates v and S, and therefore every path
from some u ∈ S to v passes through z, i.e., it is impossible to find a
path from a vertex u ∈ S to another vertex w ∈ S passing through v.
This contradicts the assumption v ∈ I(S). Hence, v ∈ ∪Bj ∈V (TS ) Bj and
I(S) ⊆ ∪Bj ∈V (TS ) Bj .
Corollary 6. Interval Determination can be solved in O(n + m) time
for the all-path convexity.
Proof. Assume |S| ≥ 2 (other cases are trivial). The block-cut tree TG
of G can be constructed in O(n + m) time using well-known algorithmic
techniques [20]. The determination of TS can be easily done in O(n + m)
time as follows: initialize TS ← TG and repeat the following procedure until
no longer possible: if Bj is a leaf of the tree containing no vertices of S or
containing exactly one vertex of S that is a cut vertex of GS then remove
from the tree the vertex associated with Bj and the cut vertex zi adjacent to
Bj in the tree. Each removal takes O(|V (Bj )|) time, thus
S the construction
of TS from TG takes O(n) time. Finally, computing Bj ∈V (TS ) Bj takes
O(n) time. Hence, the theorem follows.
In Figure 1, for S = {b, j, w}, we have that I(S) = V (B3 ) ∪ V (B4 ) ∪
V (B5 ).

Lemma 7. Let S ⊆ V . Then, in the all-path convexity, I(S) is always a


convex set.
Proof. Assume S 6= V . By Theorem 5, I(S) = ∪Bj ∈V (TS ) Bj . Let X =
∪Bj ∈V
/ (TS ) Bj . In other words, X is formed by all vertices belonging to
blocks of G that are not represented in TS . It is clear that every vertex in
I(S) ∩ X is a cut vertex of G. That is, the condition
“|N (V (Gi ), I(S))| = 1 for every connected component Gi of G − I(S)”
is valid. Hence, by Theorem 2, I(S) is a convex set.
Theorem 8. In the all-path convexity, H(S) = I(S) for every S ⊆ V .

Proof. Follows from Lemma 7.


Corollary 9. In the all-path convexity, every graph G satisfies gin(G) ≤ 1
(i.e., is interval monotone).
Proof. Follows from the previous theorem.

Corollary 10. Convex Hull Determination can be solved in O(n+m)


time for the all-path convexity.
Proof. Follows from Corollary 6 and Theorem 8.
Corollary 11. Geodetic Iteration Number can be solved in O(1) time
for the all-path convexity.
Proof. Follows from Corollary 9.
Now we focus on the Convexity Number problem. For an end block
Bj of G, let |V (Bj )| = bj . Define b(G) = min{bj | Bj is an end block of G}.
Theorem 12. In the all path convexity, for any graph G it holds that:


1, if |V | = 2 or G is 2-connected;
c(G) =
n − b(G) + 1, otherwise.

Proof. If |V | = 2 then the theorem is trivially true. If G is 2-connected


then, by the Fan Lemma, for each pair of vertices u, w ∈ V, w 6= u, we have
that every v ∈ / {u, w} lies in a path from u to w. Hence, for every S with
2 ≤ |S| ≤ n − 1, S is not convex. This implies that c(G) = 1.
Suppose now that G is not 2-connected. Note that any S ⊆ V consisting
of the union of all vertex sets of all blocks of G but one end block, say Bj ,
is convex, because the only cut vertex z belonging to V (Bj ) separates all
the vertices of V \ V (Bj ) from V (Bj ) \ z. (Note that z ∈ S.) Thus the
maximum convex set in G is obtained by removing from G all the vertices in
an end block Bj with minimum size, except the cut vertex z ∈ V (Bj ).
Corollary 13. Convexity Number can be solved in O(n + m) time for
the all-path convexity.
Proof. Follows from Theorem 12 and the fact that the block decomposition
of G can be obtained in O(n + m) time.
Now we finally consider the problems Interval Number and Hull
Number. Let eb(G) be the number of end blocks of G.
Theorem 14. In the all path convexity, for any graph G it holds that:

 1, if G is trivial;
i(G) = 2, if |V | = 2 or G is 2-connected;
eb(G), otherwise.

Proof. If |V | = 1 or |V | = 2 then the theorem is trivially true. If G is


2-connected, by the Fan Lemma any pair u, w ∈ V , w 6= u, is an interval
set, and thus i(G) = 2 in this case.
Finally, if G is not 2-connected, consider S ⊆ V such that S ∩ V (Bj ) =
{vj } for each end block Bj of G, where vj is not a cut vertex of G. Note
that |S| = eb(G). The definition of S implies that TS = TG , and thus
every vertex v ∈ V is in a block Bv of G belonging to a maximal path
Bj1 z1 Bj2 z2 . . . zk−1 Bjk in TS such that Bj1 and Bjk are end blocks of GS =
G containing, respectively, vertices u, w ∈ S, w 6= u, that are not cut
vertices in GS = G. By Lemma 4, there is a path P in G from u to w
passing through v. In other words, S is an interval set. To conclude the
proof, if a set S 0 ⊆ V is such that |S 0 | < eb(G) then there is at least
one end block Bj in G such that V (Bj ) \ {zj } contains no vertices of S 0 ,
where zj is the cut vertex of G belonging to V (Bj ). Hence, no vertex in
V (Bj ) \ {zj } can lie in a path starting and ending at distinct vertices of S 0 ,
i.e., S 0 cannot be an interval set. Thus S is minimum.
Corollary 15. In the all path convexity, for any graph G it holds that
h(G) = i(G).

Proof. Follows from Theorem 8.


Corollary 16. Interval Number and Hull Number can be solved in
O(n + m) time for the all-path convexity.

4 Concluding remarks
In this work we showed that the problems Convex Set, Interval De-
termination, Convex Hull Determination, Convexity Number,
Interval Number, and Hull Number can all be solved in O(n + m)
time for the all-path convexity, whereas Geodetic Iteration Number
can be solved in O(1) time (all graphs are interval monotone with respect
to the all-path convexity). The arguments used to solve such problems are
based on the block decomposition and the block-cut tree of the graph.

References
[1] R. T. Araujo, R. M. Sampaio, and J. L. Szwarcfiter. The convexity of
induced paths of order three. Discrete Mathematics 44 (2013) 109–114.
[2] J. A. Bondy and U. S. R. Murty. Graph Theory. Springer, 2008.

[3] J. Cáceres, O. R. Oellermann, and M. L. Puertas. Minimal trees


and monophonic convexity. Discuss. Math. Graph Theory 32(4) (2012)
685–704.
[4] C. C. Centeno, S. Dantas, M. C. Dourado, D. Rautenbach, and J.
L. Szwarcfiter. Convex partitions of graphs induced by paths of order
three. Discrete Mathematics 12(5) (2010) 175–184.
[5] M. Changat, S. Klavzar, and H. M. Mulder. The all-paths transit
function of a graph. Czechoslovak Mathematical Journal 51(2) (2001)
439–448.
[6] M. Changat and J. Mathew. On triangle path convexity in graphs.
Discrete Mathematics 206 (1999) 91–95.
[7] M. Changat, P. G. Narasimha-Shenoi, and J. Mathews. Triangle path
transit functions, betweenness and pseudo-modular graphs. Discrete
Mathematics 309(6) (2009) 1575–1583.
[8] M. Changat, P. G. Narasimha-Shenoi, and I. Pelayo. The longest path
transit function of a graph and betweenness. Utilitas Mathematica 82
(2010) 111–127.
[9] G. Chartrand, H. Escuadro, and P. Zhang. Detour distance in graphs.
J. Combin. Math. Combin. Comput. 52 (2005) 75–94.
[10] G. Chartrand, L. Garry, and P. Zhang. The detour number of a graph.
Utilitas Mathematica 64 (2003) 97–113.
[11] V. Chepoi. Peakless functions on graphs. Discrete Applied Mathemat-
ics 73(2) (1997) 175–189.
[12] M. C. Dourado, F. Protti, and J. L. Szwarcfiter. Complexity results re-
lated to monophonic convexity. Discrete Mathematics 158 (2010) 1268–
1274.
[13] M. C. Dourado, D. Rautenbach, V. F. dos Santos, P. M. Schäfer, J. L.
Szwarcfiter, and A. Toman. An upper bound on the P3 -Radon number.
Discrete Math 312(16) (2012) 2433–2437.

[14] F. F. Dragan, F. Nicolai, and A. Brandstädt. Convexity and HHD-free


graphs. SIAM J. Discrete Math 12 (1999) 119–135.
[15] P. Duchet. Convex sets in graphs, II. Minimal path convexity. Journal
of Combinatorial Theory, Series B 44 (1988) 307–316.
[16] M. Farber and R. E. Jamison. On local convexity in graphs. Discrete
Math. 66 (1987) 231–247.
[17] G. Gutin and A. Yeo. On the number of connected convex subgraphs
of a connected acyclic digraph. Discrete Appl. Math. 157(7) (2009)
1660–1662.

[18] F. Harary, E. Loukakis, and C. Tsouros. The geodetic number of a


graph. Math. Comput. Modelling 17(11) (1993) 89–95.
[19] F. Harary and J. Nieminen. Convexity in graphs. Journal of Differen-
tial Geometry 16 (1981) 185–190.
[20] J. Hopcroft and R. Tarjan. Algorithm 447: efficient algorithms for
graph manipulation. Communications of the ACM 16:6 (1973) 372–
378.
[21] R. E. Jamison and R. Nowakowski. A Helly theorem for convexity in
graphs. Discrete Mathematics 51:1 (1984) 35–39.
[22] L. Nebeský. A characterization of the interval function of a connected
graph. Czechoslovak Math. J. 44(1) (1994) 173–178.

[23] M. H. Nielsen and O. R. Oellermann. Steiner trees and convex geome-


tries. SIAM J. Discrete Math. 23(2) (2011) 680–693.
[24] D. B. Parker, R. F. Westhoff, and M. J. Wolf. Two-path convexity in
clone-free regular multipartite tournaments. Australas. J. Combin. 36
(2006) 177–196.

[25] E. Sampathkumar. Convex sets in a graph. Indian J. Pure Appl. Math.


15(10) (1984) 1065–1071.
[26] M. L. J. van de Vel. Theory of Convex Structures. North Holland, 1993.

You might also like