Extremal edge general position sets in some graphs

A set of edges $X\subseteq E(G)$ of a graph $G$ is an edge general position set if no three edges from $X$ lie on a common shortest path. The edge general position number ${\rm gp}_{\rm e}(G)$ of $G$ is the cardinality of a largest edge general position set in $G$. Graphs $G$ with ${\rm gp}_{\rm e}(G) = |E(G)| - 1$ and with ${\rm gp}_{\rm e}(G) = 3$ are respectively characterized. Sharp upper and lower bounds on ${\rm gp}_{\rm e}(G)$ are proved for block graphs $G$ and exact values are determined for several specific block graphs.


Introduction
Edge general position sets in graphs occur as the edge variant of general position sets.As we know, general position sets have already been extensively researched, see the seminal papers [9,15], some of the subsequent ones [3,4,7,[12][13][14]16], and references therein.The edge version has been introduced in [10] and further studied in [5,11].In this paper we continue this direction of research.
Let G = (V (G), E(G)) be a graph.Then we say that X ⊆ E(G) is an edge general position set if for any shortest path P of G and any three edges e, e ′ , e ′′ ∈ X we have |E(P )∩{e, e ′ , e ′′ }| ≤ 2. The edge general position number gp e (G) of G is the cardinality of a largest edge general position set.An edge general position set of cardinality gp e (G) is called a gp e -set of G.
The main results of the seminal paper [10] are the formulas for the edge general position number of hypercubes and of Cartesian grids.As a point of interest, we would like to add that the general position number of hypercubes is a notorious difficult problem, cf.[6].The paper is organized as follows: in Section 2, we characterize the graphs G with gp e (G) = |E(G)|−1 and the graphs G with gp e (G) = 3.We also discuss the graphs G with gp e (G) = 4.In Section 3 we focus on block graphs.We prove sharp upper and lower bounds and determine exact values in several specific cases.In the rest of the introduction we list some definitions and state a couple of results needed later on.
Unless stated otherwise, the graphs considered are connected.If G is a graph and R ⊆ V (G), then the subgraph of G induced by R is denoted by G[R].The distance d G (u, v) between vertices u and v of G is the number of edges on a shortest u, v-path.
A subgraph H of G is isometric if for each pair of vertices u, v ∈ V (H) we have d H (u, v) = d G (u, v).The diameter of G is the maximum distance between pairs of vertices of G and is denoted by diam(G).A shortest u, v-path in G is diametral if d G (u, v) = diam(G).The order, the size, and the maximum degree of G are denoted by n(G), m(G), and ∆(G), respectively.A block of G is a maximal connected subgraph of G that has no cut-vertex.
If G is a graph, then the edges incident to a vertex form an edge general position set, hence we have gp e (G) ≥ ∆(G) .
For later use we also recall the following results from [10].For its statement recall that an edge of a tree is a pendant edge if it is incident with a leaf and that C n , n ≥ 3, denotes the cycle of order n.
(ii) If L is the set of pendant edges of a tree T , then gp e (T ) = |L|.

Graphs with extremal edge general position numbers
In the main result of this section we characterize the graphs G with gp e (G) = m(G)−1.
We further characterize the graphs with the edge general position number equal to 3 and show that the variety of graphs with this number equal to 4 is large.
In [10] it was observed that if diam(G) = 2, then gp e (G) = m(G).A slightly more general formulation of this fact reads as follows.
To characterize graphs G with gp e (G) = m(G) − 1, we introduce the following two families of graphs.
The family G 1 consists of all the graphs G that can be obtained from an arbitrary graph H with diam(H) = 2 by attaching a pendant edge to a vertex u of H with deg H (u) ≤ n(H) − 2. We will say that this pendant edge of G is the special edge of G. Knowing how the graph G from G 1 was constructed, there is no doubt which of its edges is the special edge.On the other hand, if only G is given, then it might not be clear which of its edges is the special one.For instance, K 4 belongs to G 1 since it can be obtained from P 3 by attaching a pendant edge to its vertex of degree 1.Then each of the two pendant edges of P 4 can be declared as the special one.In such a case we select one such edge and fix it, so that the special edge of G is well-defined.In Fig. 1 the graph Z 1 belongs to the family G 1 , where the top edge is the special edge of Z 1 .
The family G 2 consists of all the graphs G constructed as follows.Let G 0 , G 1 , and G 2 be arbitrary graphs not necessarily connected.Then G is obtained from the disjoint union of G 0 , G 1 , G 2 , and K 2 , where V (K 2 ) = {x 1 , x 2 }, by adding all possible edges between K 2 and G 0 , adding the edges between x 1 and all vertices from G 1 , and adding the edges between x 2 and all vertices of G 2 .We will say that the edge x 1 x 2 of G is the central edge of G.In Fig. 1 the graph Z 2 belongs to the family G 2 .Note that for Z 2 we have G 0 = P 3 ∪ P 2 , G 1 = C 4 , and G 2 = K 2 ∪ 2K 1 .Another graph from the family G 2 is the graph G ′ from Fig. 3, where G 0 is the empty graph, G 1 = K 3 , and then it is clear that E(G) \ {e} is an edge general position set of G, where e is the special edge of G. Let next G ∈ G 2 .Then we claim that E(G)\{x 1 x 2 } is an edge general position set of G, where x 1 x 2 is the central edge of G. Indeed, this follows by the fact that every shortest path of G of length 3 passes through x 1 x 2 .In both cases we have gp e (G) ≥ m(G) − 1 and we may conclude that gp e (G) = m(G) − 1.
Claim 1: diam(G) = 3.By Lemma 2.1 we have diam(G) ≥ 3.Moreover, if diam(G) ≥ 4, then at least two edges of an arbitrary diametral path of G do not lie in an arbitrary edge general position set, hence gp e (G) ≤ m(G) − 2. We conclude that diam(G) = 3.
Claim 2: There exists an edge e ∈ E(G) which lies on every diametral path of G.
Let R 1 , . . ., R ℓ be the diametral paths of G.If V (R i ) ∩ V (R j ) = ∅, then every edge general position set of G misses at least one edge of R i and at least one edge of R j .
Hence each two diametral paths share at least one edge.Consider now arbitrary three diametral paths R i , R j and R k .We claim that they have at least one common edge.Suppose on the contrary that this is not the case and let X be a largest edge general position set of G. Assume that where we without loss of generality have f = g, then the edge f lies on all three paths.Hence we must have |{e, f, g}| = 3. Recall that at least one edge of R i (as well as of R j and of R k ) is not in X.If this edge is e, then at least one additional edge of R j is also not in X.Similarly, if f / ∈ X, then at least one additional edge of R k is also not in X.Finally, if the unique edge from V (R i ) \ {f, g} is not in X, then on each of R j and R k one additional edge is not in X. Hence in all the cases we have gp ) and let R k ′ be an arbitrary additional diametral path.We are going to show that all these four paths have a common edge.If e ∈ E(R k ′ ), there is nothing to prove.Assume hence that e / ∈ E(R k ′ ).We now consider two cases.If e ∈ X, then on each of the paths R i , R j , R k and R k ′ there lies at least one edge which is not in X.If this is the same edge, we are done.Otherwise there exist two different edges not in X, which is not possible as we have assumed that gp e (G) = m(G) − 1.In the second case e / ∈ X.Since e / ∈ E(R k ′ ), the path R k ′ contains an edge different from e not in X, which is again not possible.By induction we now conclude the truth of Claim 2.
By Claim 2, G has an edge e = uv which lies on all diametral paths of G. Assume first that e is the first edge of some diametral path with the first vertex of it being u.Then e must be the first edge of every diametral path, for otherwise we would have diam(G) ≥ 4 or there would exist another diametral path which would not contain e.Moreover, by the same reason we see that deg Assume second that e = uv is the middle edge of some diametral path P , let P = xuvy.We claim that u is a cut-vertex of G. Suppose this is not the case and let Q be a shortest x, y-path in G − u.Since diam(G) = 3 and Q does not contain the edge uv, its length is at least 4. Consider the subpath Q ′ of Q induced by its last four vertices, say y 1 , y 2 , y 3 , and y 4 = y.It is possible that y 3 = v.We claim that Q ′ is a shortest path also in G. Since we have assumed that Q ′ is shortest in G − u, the only way Q ′ is not shortest in G would be that there exists a shortest path in G between y 1 and y 4 = y using the vertex u.But this would mean that uy ∈ E(G), which is not possible as P is a diametral path.Hence Q ′ is a shortest path in G of length 3 which does not contain uv.This contradiction proves the claim, that is, u is a cut-vertex.By symmetry of P we also deduce that v is a cut-vertex.
Consider now the block B of G containing the vertices u and v. Let w ̸ = u, v be an arbitrary vertex from B. We first show that at least one of the edges wu and wv exist.Suppose not.Then assume without loss of generality that d G (w, u) ≤ d G (w, v).If P is a shortest w, u-path, then this path (which must be of length 2) together with an arbitrary edge between u and a vertex not in B is a diametral path which does not pass uv, a contradiction.Suppose next that wu ∈ E(G) but wv / ∈ E(G).Since B is a block and wv / ∈ E(G), there is another w, v-path in B which does not pass u.Assuming that this is a shortest possible such path, the last two edges of it together with the edge between v and a vertex adjacent to v not from B again gives a diametral path not containing uv.It follows that each of u and v is adjacent to every vertex of B. Then B \ {u, v} is the graph G 0 required to show that G ∈ G 2 .Moreover, let G 1 be the graph induced by the vertices of G which are not in B and are closer to u than to v. Then u must be adjacent to each vertex of G 1 because otherwise we would have diam(G) ≥ 4. Analogously we can define G 2 with respect to v and conclude that v must be adjacent to each vertex of G 2 .We conclude that G ∈ G 2 .

□
In the second part of this section we consider graphs with small edge general position number.
From Proposition 1.1(ii) we get that if T is a tree with m(T ) ≥ 2, then gp e (T ) = 2 if and only if T is a path.Moreover, if G is not a tree, then considering a shortest cycle in G which is necessarily isometric, we infer that gp e (G) ≥ 3. Hence we have the following easy result.
Proof.We know from (1) that (i) holds.To prove (ii), consider an arbitrary vertex v of G with deg G (v) = 4 and consider the distance levels with respect to v. If there exists two adjacent vertices in some of these distance levels, then the edge between them together with the edges incident with v form an edge general position set.So we would have gp e (G) ≥ 5. We conclude that the distance levels of v induce independent sets which in turn means that G is bipartite.□ Let G k , k ≥ 1, be the graph consisting of a chain of k cycles C 4 sharing a vertex, see Fig. 2 where G 5 is shown from which the formal definition of G k should be clear.Then it can be checked that gp e (G k ) = 4 for each k ≥ 1.More generally, the edge general position number remains 4 if we replace each C 4 of G k by an arbitrary even cycle.

Edge general position sets in block graphs
While investigating in the previous section the graphs with extremal edge general position number, it turned out that cut-vertices are ubiquitous.In this section we thus consider the edge general position number in block graphs.To state our results, some preparation is needed.
We say that a block B of a graph G is thick if n(B) ≥ 3 and that B is pendant if it contains exactly one cut-vertex of G.A graph is a block graph if every block of it is complete.(See [1,2,8] for some current research on block graphs.) A vertex of a graph is simplicial if its neighbourhood induces a complete subgraph.The set of simplicial vertices in a graph G will be denoted by S(G) and the cardinality of S(G) by s(G).A block B of a block graph is simplicial if B has at least one simplicial vertex.An edge of a block graph is a simplicial edge if it is incident with at least one simplicial vertex.The set of simplicial edges of G will be denoted by S ′ (G) and its cardinality by s ′ (G).
Let G be a block graph and let B 1 , . . ., B k be its simplicial blocks.Set b i = n(B i ) and . Since an edge of B i is not simplicial if and only if its both endvertices are not simplicial, we infer that Let G be a graph and let p 1 , . . ., p k be the consecutive vertices of a path P in G, where k ≥ 2. We say that P is an Let G be a block graph.Then the reduction R(G) of G is constructed from G as follows.For every internal path P of G, identify the end vertices of P (and remove all the inner vertices of P ).Moreover, replace every pendant path P by a pendant edge attached to R(G) in the same vertex as Proof.It is clear that an edge general position set of R(G) yields an edge general position set of G of the same cardinality.It follows that gp e (G) ≥ gp e (R(G)).In the rest we thus need to prove the reverse inequality.
If G is a path, then R(G) = G and there is nothing to prove.Assume in the following that G is a block graph which is not a path.Then deg G (v) ≥ 3 for some v ∈ V (G).It follows that gp e (G) ≥ 3. Let X be an arbitrary gp e -set of G. Let P be the set consisting of all internal and pendant paths of G.If P ∈ P, then P is isometric subgraph of G and hence |X ∩ E(P )| ≤ 2. We hence distinguish the following two cases.
Case 1. |X ∩ E(P )| ≤ 1 for any P ∈ P. It is obvious that X is also an edge general position set of R(G) if |X ∩ E(P )| = 0 for any path P ∈ P. Next, assume that |X ∩ E(P ′ )| = 1 for some path P ′ ∈ P and let e ∈ X ∩ E(P ′ ).If P ′ is a pendant path, then e can be replaced by the pendant edge of R(G) corresponding to P ′ , which keeps the property of being in edge general position.If P ′ is an internal path, then let u and v be the end-vertices of P ′ .Let u ′ and v ′ be the respective neigbors of u and v which do not lie on P ′ .Then at most one of the edges uu ′ and vv ′ lie in X. Assume without loss of generality that uu ′ / ∈ X.Then (X \ {e}) ∪ {uu ′ } is also an edge general position set.Repeating this procedure we end up with an edge general position set X ′ of G in which no edge from the paths from P lies in X ′ .Since this set is also an edge general position set of R(G) we conclude that gp e (G) ≤ gp e (R(G)).
Case 2. |X ∩ E(P )| = 2 for some path P ∈ P. Let e, e ′ ∈ X ∩ E(P ).Let e = xy and e ′ = x ′ y ′ .Since G is not a path, there exists a simplicial vertex v such that v / ∈ V (P ).Let v ′ be the neighbor of v such that the edges e, e ′ , and vv ′ lie on a common shortest path.Since e, e ′ ∈ X, we clearly have vv ′ / ∈ X.Now the set X ′ = (X \ {e}) ∪ {vv ′ } is an edge general position set of G.If vv ′ is a pendant edge of a pendant path P ′ of G, then E(P ′ ) ∩ X = ∅, for otherwise an edge from E(P ′ ) ∩ X would lie on a shortest path together with e and e ′ .It follows that when X ′ is constructed, the number of pendant paths which contain two edges from an edge general position set is reduced by one.The same holds if P is an internal path.Hence after repeating this procedure for every path from P with two edges from X we end up with an edge general position set X ′′ of G such that |X ′′ ∩ E(P )| ≤ 1 holds for any P ∈ P. Now we can proceed as in Case 1. □ Next we prove general bounds for block graphs.
Moreover, the bounds are sharp.
Proof.Let c i be the number of cut-vertices from B i in G and let E i be the set of simplicial edges from . We claim that X is an edge general position set of G. Consider an arbitrary shortest u, u ′ -path P from G and let u = u 0 , . . ., u ℓ = u ′ be its consecutive vertices.Clearly, P does not contain three edges of X if ℓ ≤ 2. Hence we may assume that ℓ ≥ 3. Since G is a block graph, the shortest path P is the unique shortest u, u ′ -path.If u ∈ S(G), then it follows that |E(P ) ∩ X| ≤ 2. Hence X is an edge general position set of G. Similarly, we also get the same result if u ′ ∈ S(G).If u, u ′ ̸ ∈ S(G), then |E(P ) ∩ X| = 0 and X also is an edge general position set of G.In consequence, we conclude that gp e (G) ≥ s ′ (G).
To prove the upper bound we use induction on t, the number of blocks of G.If t = 1, then G is a complete graph, then hence gp e (G) = s(G) 2 and the assertion holds.Let now t ≥ 2 and let B be a pendant block of G. Let G ′ be the block graph obtained from G by removing the block B but keeping the corresponding cut-vertex.Let R be an edge general position set of G of order gp e (G) and let R ′ be the restriction of R to G ′ .By the induction hypothesis, gp e (G ′ ) ≤ s(G ′ ) 2 + 1.Let v be the vertex connecting G ′ with B in G and let s(B) be the set of simplicial vertices of B in G. Then s(B) = n(B) − 1.We distinguish the following two cases.
we can now estimate as follows: Since n(B) ≥ 3, we have 2 − n(B) < 0.Moreover, because s(G) − n(B) ≥ 0, we can continue the above estimation with |R| < s(G) 2 + 1, completing the proof of the upper bound.The lower bound is sharp on trees.Indeed, if T is a tree, then gp e (T ) is the number of leaves of T , and this is equal to s ′ (T ).To show that the upper bound is sharp, consider a graph G obtained from the complete graph K n , n ≥ 2, by attaching selecting k ∈ [n] vertices of K n and add a separate pendant path (of arbitrary length) to each of the selected vertices.(See Fig. 3, where the graph G ′′ is such a graph.)Then we infer that s(G) = n.Moreover, the edges of K n together with an arbitrary additional edge of G form a largest edge general position set of G. Indeed, this set is clearly an edge general position set.To see that it is largest, we can argue that if an edge general position set X of G contains at least two edges from E(G) \ E(K n ), then all but one of these edges can be replaced by a unique edge from E(K n ) \ X keeping the property of being an edge general position set.
□ We follow with a large class of block graphs which attain the lower bound of Theorem 3.2.It is defined as follows.We say that a graph G is a thick-leaved tree if G is obtained from a tree T by a sequence of the following operations.Let v be a leaf of T and let v ′ be its unique neighbor.Then replace the vertex v by a complete graph K, and replace the edge v ′ v by an edge between v ′ and one vertex of K. See Fig. 3 where G ′ is a thick-leaved tree.Note that a thick-leaved tree is a block graph.Note further that a pendant block of a thick-leaved tree is either a thick block or a K 2 .Moreover, its simplicial blocks coincide with its pendant blocks.X ∩ E(G u ) = ∅ or X ∩ E(G v ) = ∅.Indeed, otherwise there exist edges e ′ ∈ X ∩ E(G u ) and e ′′ ∈ X ∩ E(G v ), but then e ′ , e, and e ′′ would lie on the same shortest path in G.
Hence we may assume, without loss of generality, that X ∩ E(G u ) = ∅.Let f be an arbitrary simplicial edge of G u .Note that f may be adjacent to e. Then it is clear that (X \ {e}) ∪ {f } also is an edge general position set of G. Repeating this process we end up with an edge general position set of G which contains only simplicial edges and has the same cardinality as X.We conclude that |X| ≤ s ′ (G).□

Proposition 2 . 4
Let G be a graph.Then gp e (G) = 3 if and only if G is K 3 or a tree with three leaves.Proof.Clearly, gp e (K 3 ) = 3.If G is a tree with three leaves, then gp e (G) = 3 by Proposition 1.1(ii).Conversely, assume that gp e (G) = 3.If G is a tree, then the conclusion follows from Proposition 1.1(ii).Hence assume in the rest that G is not a tree.Let C be a shortest cycle of G.If n(C) ≥ 4, then since C is isometric, Proposition 1.1(i) implies that gp e (G) ≥ 4. Hence C must be a triangle.Let V (C) = {x, y, z}.If n(G) ≥ 4, then we may without loss of generality assume that deg G (x) ≥ 3. Let x ′ be adjacent to x, where x ′ ̸ ∈ {y, z}.Then {xy, yz, xz, xx ′ } is an edge general position set of G.We conclude that G = K 3 .□For graphs G with gp e (G) = 4 we have the following.Proposition 2.5 If G is a graph with gp e (G) = 4, then the following holds.

Proposition 3 . 3 2 . 2 ,
If G is a thick-leaved tree and B 1 , . . ., B k are its simplicial blocks, then gp e (G) = k i=1 n(B i ) Proof.By Theorem 3.2, we know that gp e (G) ≥ s ′ (G).Since s ′ (G) = consider an arbitrary edge general position set X of G and suppose e = uv ∈ X, where u and v are cut-vertices of G. Let G u and G v be the two components of G − e, where u ∈ G u and v ∈ G v .Then it follows that