TRAVERSING A GRAPH IN GENERAL POSITION

Abstract Let G be a graph. Assume that to each vertex of a set of vertices 
$S\subseteq V(G)$
 a robot is assigned. At each stage one robot can move to a neighbouring vertex. Then S is a mobile general position set of G if there exists a sequence of moves of the robots such that all the vertices of G are visited while maintaining the general position property at all times. The mobile general position number of G is the cardinality of a largest mobile general position set of G. We give bounds on the mobile general position number and determine exact values for certain common classes of graphs, including block graphs, rooted products, unicyclic graphs, Kneser graphs 
$K(n,2)$
 and line graphs of complete graphs.


Introduction
In this article G = (V (G), E(G)) will represent a connected simple graph whose order is n(G) = |V (G)|.We will indicate that vertices u and v are adjacent by writing u ∼ v.A u, v-path of length ℓ is a sequence u = u 0 , u 1 , . . ., u ℓ−1 , u ℓ = v of distinct vertices of G such that u i ∼ u i+1 for 0 ≤ i < ℓ.The distance d G (u, v) between two vertices u, v ∈ V (G) is the length of a shortest u, v-path.A clique of G is a set S ⊆ V (G) of mutually adjacent vertices, i.e. S induces a complete graph.The clique number, denoted ω(G), is the cardinality of a largest clique in G.For a given set S ⊂ V (G), the subgraph induced by S will be written G [S].For a positive integer k we will use the notation [k] = {1, . . ., k}.
General position sets in graphs have been widely studied in recent years, for example in [3,5,6,10,11,12,14].The concept was independently introduced in [8] and [13]; the terminology and set-up of the present work follow the former paper.However, the general position sets of hypercubes and integer lattices were investigated earlier in a different context in [7,9], respectively.
One of the original motivations of the general position problem in [8] was to place a set of robots in a graph such that any pair of robots situated at vertices u, v can exchange signals by any shortest u, v-path without being obstructed by another robot.This static concept can be transformed into a dynamic one which is more closely related to practical problems in robotic navigation and transport.In fact this research was inspired by the delivery robots belonging to Starship Technologies® [15] that deliver groceries to the inhabitants of cities including Milton Keynes, home of the Open University.For some related studies on robot mobility in computer science see [1,2,4].In this paper we introduce a variant that describes the largest number of robots that can travel through a network such that each vertex of the network can be visited by a robot, whilst at every stage any pair of robots can see each other through any shortest path between their positions without being obstructed by another robot.We now describe this concept in greater detail.
A set of vertices S of a graph G forms a general position set if no three distinct vertices from S lie on a common shortest path.The general position number gp(G) of G is the cardinality of a largest general position set.Assume that to each vertex of a general position set S ⊆ V (G) one robot is assigned.The robots can move through the graph one at a time.We say that a move of a robot is legal if the robot moves to an adjacent unoccupied vertex such that the new set of occupied vertices is also in general position.If there exists a sequence of legal moves such that every vertex of G can be visited by at least one robot, then we say that S is a mobile general position set.The mobile general position number Mob gp (G) of G is the cardinality of a largest mobile general position set of G.Such a set will be briefly called a mobile gp-set of G.We will also abbreviate the term mobile general position set to mobile set and mobile general position number to mobile number.A move of a robot from vertex u to a neighbor v will be denoted by u v.
The paper is organised as follows.In the rest of the introduction we give some preliminary results and examples.In Section 2 we consider graphs with cut vertices, in particular block graphs, rooted products, and unicyclic graphs.In Section 3 the mobile number is determined for Kneser graphs K(n, 2) and line graphs of complete graphs.We conclude the paper with some open problems.

Preliminaries
We begin with the following bounds.Proof.As the set of occupied vertices at any stage must be a general position set of G, we have Mob gp (G) ≤ gp(G).Any set of two vertices is in general position.Let S = {u, v} ⊂ V (G) be any set of two vertices of G; then for any vertex w of G the robot closest to w (say d G (u, w) ≤ d G (v, w)) can move along a shortest path to w without crossing the robot at vertex v, so that Mob gp (G) ≥ 2.
To prove the second assertion, we claim that if In C 6 , a general position set of order 3 is an independent set.But such a set is not a mobile set, hence Mob gp (C 6 ) = 2. Assume in the rest that n ≥ 3 and n = 4, 6.Set V (C n ) = Z n .When n = 2r + 1, consider the general position set {0, r, r + 1}.The sequence of moves r + 1 r + 2, 0 1 and r r + 1 keeps the property of being in general position.By iterating this procedure, each vertex of C n will be visited by a robot.As gp(C n ) = 3, Lemma 1.1 implies that this set is a mobile gp-set.The second case to consider is when n is even.Then consider a set of three vertices that are as equidistant as possible.By moving robots sequentially along the cycle in the same direction, all vertices will be visited by the robots.
Consider next the Petersen graph P .A scheme that allows four robots to visit every vertex of P in general position is shown in Fig. 1 To see that four robots is optimal, suppose for a contradiction that K ⊆ V (G) is an initial configuration of at least five robots in general position.Observe that as α(P ) = 4 and P is edge-transitive, we can assume that K contains the two black vertices in Fig. 2. It is easily verified that the remaining robots must be situated on a subset of the gray vertices.If all four gray vertices are occupied, then no robot can move at all without creating threein-a-line.If there are just five robots, then in the two independent edges joining the gray vertices one edge must have both incident vertices occupied by robots, whilst the other edge has just one robot on it.However in this configuration the only move that can be made is by the robot on the edge containing one robot and this robot can only move to the unoccupied gray vertex and back, so that not all vertices of P can be visited.We have thus shown that Mob gp (P ) = 4.
by attaching a leaf to one of its vertices.The latter result can be deduced from [13,Theorem 3.1] in which the graphs G with gp(G) = n(G) − 1 are characterised; among the two families described there, the above stated graphs are the only ones with the mobile number equal to their general position number.To characterise all graphs with the mobile number equal to their general position number seems to be difficult.

Graphs with cut-vertices
In this section we first give a technical lemma about mobile sets in graphs with cut-vertices.Then we apply it to block graphs and to rooted products.Lemma 2.1.Let v be a cut-vertex of a (connected) graph G and let C 1 , . . ., C k be the components of , where j = k.Then v, v j and v k are not in general position.
(ii) Assume v / ∈ S. Suppose that there exist vertices , where |{i, j, k}| = 3.Consider now the moment when the vertex v is visited for the first time by some robot.At that moment we get a contradiction with (i).It follows that S ⊆ V (C i ) ∪ V (C j ) for some i, j ∈ [k].By a similar argument we see that S has at most one vertex in C i or C j , without loss of generality assume Assume second that |S ∩V (C i )| = 1.The statement clearly holds if |S ∩V (C j )| = 1, hence we may consider the case when |S ∩ V (C j )| ≥ 2. Then the vertex v must be visited by the unique vertex from S ∩V (C i ), for otherwise we are in contradiction with (i).At that moment, (S ∩V (C j ))∪{v} is a mobile gp-set, which in turn implies that |S ∩V ( To prove that Mob gp (G) ≤ ω(G), we proceed by induction on the number of blocks of G.
If G has only one block, then G is a complete graph for which we know that Mob gp (G) = n(G) = ω(G).Suppose now that B is an end block of G. Then B contains exactly one cut-vertex of G, denote it by v. Let S be an arbitrary mobile gp-set of G.If v ∈ S, then the assertion follows by Lemma 2.1(i) and induction.Assume secondly that v / ∈ S. Let H be the subgraph of G induced by (V (G) \ V (B)) ∪ {v}.By Lemma 2.1(ii) we get that |S| ≤ 1 + (Mob gp (H) − 1) or |S| ≤ 1 + (Mob gp (B) − 1).The induction assumption now gives Theorem 2.2 clearly implies that Mob gp (K n ) = n for n ≥ 2 and that Mob gp (T ) = 2, where T is a tree of order at least 2.
A rooted graph is a connected graph with one chosen vertex called the root.Let G be a graph and let H be a rooted graph with root x.The rooted product graph G • x H is the graph obtained from G and n(G) copies of H, say H 1 , . . ., H n(G) , by identifying the root of H i with the i th vertex of G.If w ∈ V (H), then the vertex from H v corresponding to w will be denoted by (v, w).Moreover, the bounds are sharp.
Proof.Let S be a mobile gp-set of G. Then we claim that S considered as a subgraph of G • x H is a mobile set of G • x H. Indeed, if v ∈ S, then v can be moved to every vertex of H v by maintaining the general position property.On the other hand, if v / ∈ S, then in the subgraph G of G • x H, some robot can move to v and then continue visiting all the vertices of H v .Hence Mob gp (G Let S be a mobile gp-set of H. Then a copy of S in an arbitrary H v is a mobile set of G • x H. Indeed, after a robot inside H v visits the vertex (v, x), this robot can freely move around V (G • x H) \ V (H v ) whilst maintaining the general position property.Thus Mob gp (G • x H) ≥ |S| = Mob gp (H).This proves the lower bound.

Suppose now that
Then the vertex (v, x) must be visited by the robot from y and at this point the robots form a mobile set of H v .We conclude again that |S| ≤ Mob gp (H).

Noting that Mob
we infer that the bounds are sharp.
The next result shows in particular that the mobile position number of a rooted product can lie strictly between the bounds of Theorem 2.3.Let G be a unicyclic graph with unique cycle C of length ℓ; we will identify the vertex set of C with Z ℓ in the natural manner.Let k ≤ ℓ be the number of vertices of C that have degree at least three; we will call such a vertex a root.If ℓ / ∈ {4, 6}, then it is trivial that Mob gp (G) ≥ 3, as three robots can traverse C in general position as described in Subsection 1.1, visiting the vertices of any pendent tree on their way.
We note firstly that if x is a root of C, with attached trees T 1 , . . ., T r , then there can be at most one robot on the vertices in {x} ∪ r j=1 V (T j ) at any time if Mob gp (G) ≥ 3.By Theorem 2.2 there can be at most two robots on {x} ∪ V (T j ) for any 1 ≤ j ≤ r.When a robot visits x for the first time there will be a robot in a tree attached to x, say T 1 .Since x is a cut-vertex there can be no robots on the vertices of V (G) \ ({x} ∪ V (T 1 )), so that there are only two robots on G. Therefore when analysing unicyclic graphs without loss of generality we can assume that G is a subgraph of a sun graph, i.e. any vertex on the cycle of G has degree two or three and any attached tree is a leaf.For simplicity in the following result we only deal with the case that both ℓ and k are even; similar results are possible in the other cases by a slightly more involved argument.
Theorem 2.4.Let G be a unicyclic graph with cycle length ℓ such that there are k ≥ 2 vertices of the cycle with degree at least 3.If both k and ℓ are even, then Mob gp (G) ≤ k 2 + 2 and this is tight.
Proof.As described previously, we can assume that G is a subgraph of a sun graph.For any i ∈ Z ℓ we call the set {i, i + 1, . . ., i + ℓ 2 − 1} and any attached leaves the i-section of the cycle.Observe that if a robot is stationed at a vertex x of C, then the shortest x 1 , x 2path containing x must be of length at least ℓ 2 + 1, for otherwise there would be a shortest Suppose for a contradiction that Mob gp (G) ≥ k 2 + 3. Either the 0-section or ℓ 2 -section must contain ≤ k 2 roots of C; we shall assume that the 0-section has this property.If there are k 2 + 2 robots contained in the 0-section, then k 2 of them must be positioned on leaves and the other two are on vertices of the cycle; then it is easily seen that there are three robots not in general position, possibly considering another robot from the ℓ 2 -section.Hence there are at most k 2 + 1 robots on the 0-section.Furthermore, if there are k 2 + 1 robots in the 0-section, then we can assume that there are robots stationed on leaves attached to vertices Firstly, suppose that there are at least k 2 + 4 robots.Then as the 0-section contains at most k 2 + 1 robots, there are at least three robots on the ℓ 2 -section.Consider the middle robot R among any such three robots and suppose this robot is at the vertex y or at a leaf attached to y.Then R must be stationed on the leaf attached to y, otherwise it is on a shortest path between the other two vertices of the ℓ 2 -section.Then no robot can visit the vertex y, a contradiction.Now suppose that there are exactly k 2 + 3 robots.If any section contains less than k 2 roots, then the above argument yields a contradiction, so we can assume that every section of C contains exactly k 2 roots.This implies that if x, x ′ is any pair of antipodal vertices on C, then either both x, x ′ are roots or neither x, x ′ are roots.As the 0-section of G contains k 2 roots, there must be at least two robots R 1 and R 2 at vertices x 1 , x 2 of C or attached leaves in the ℓ 2 -section.If R 1 is stationed on a leaf at some point it must descend to a vertex of C in order to visit the root, so we can assume that R 1 is on C. When this occurs, we consider the two robots at shortest distance from R 1 on either side of R 1 with respect to the cycle.Since they must be at distance bigger than ℓ 2 , at least one of then must be in the 0-section.As the 0-section can hold at most k 2 + 1 robots, we can assume that R 1 is on C and R 2 is on a leaf attached to x 2 in the ℓ 2 -section.Now by the preceding argument the vertex x ′ 2 antipodal to x 2 on C is also a root in the 0-section; as there are k 2 roots and k 2 + 1 robots in the 0-section, there must also be a robot R ′ 2 on the leaf attached to x ′ 2 .However, this implies that the robot R 1 lies on a shortest path between the robots R 2 and R ′ 2 .As a conclusion we get that Mob gp (G) ≤ k 2 + 2. We now show that this bound is tight.For ℓ ≥ k we define the (ℓ, k)-jellyfish to be the unicyclic graph with order ℓ + k formed from an ℓ-cycle C ℓ (with vertex set identified with Z ℓ ) with leaves attached to the vertices 0, 1, . . ., k − 1.We will denote the leaf attached to vertex i by i ′ .We describe how k 2 + 2 vertices can visit every vertex of the jellyfish whilst staying in general position.We begin with robots at the vertices 0 ′ , 1 ′ , . . ., ( k 2 + 1) ′ (call the robots R 0 , R 1 etc).The first robot R 0 makes the move 0 ′ 0 and then moves around Finally, by symmetry, it follows that vertices k 2 and k 2 + 1 can also be visited.
Note that if ℓ = k then the graph in question is a rooted product.

Kneser graphs and line graphs of complete graphs
If n ≥ 2k, then the Kneser graph K(n, k) has all k-subsets of [n] as vertices, two vertices being adjacent if the corresponding sets are disjoint.In [5, Theorem 2.2] it was proved that gp(K(n, 2)) = 6 for n ∈ {4, 5, 6} and gp(K(n, 2)) = n − 1 for n ≥ 7.For additional results on the gp-number of Kneser graphs see [10].
The Kneser graph K(5, 2) is the Petersen graph for which we have seen in Section 1.1 that Mob gp (K(5, 2)) = 4.This fact generalises as follows.Proof.For n ≥ 5 the diameter of K(n, 2) is 2. It follows from [3,Theorem 4.1] that a set S of vertices of K(n, 2) is in general position if and only if it is an independent union of cliques.Moreover, from the proof of [5,Theorem 2.2] we recall that the structure of S is one of the following: (i) S consists of a clique of order at least 3 (ii) the largest clique of S is of • Since it not even clear whether checking if a given set of vertices of a graph is a mobile general position set is in NP, the computational complexity of computing the mobile general position number seems to be a challenging and interesting problem.
• Determine the mobile general position number for all unicyclic graphs.
• Based on Theorem 3.2 it would be interesting to investigate the mobile general position number of arbitrary line graphs.
• In view of Theorems 3.1 and 3.2, since L(K n ) is the complement of K(n, 2), we propose to investigate Mob gp (G)+Mob gp (G) for an arbitrary G, that is, the additive Nordhaus-Gaddum inequalities.
• Is there a general relationship between the mobile general position number and clique number?
• Finally, in our model it suffices that each vertex is visited by one of the robots.However, possible applications can also be imagined in which each vertex must be visited by every robot while still maintaining the general position property at all times.We believe this variant of mobility deserves independent investigation.

Lemma 1 . 1 .
If G is a graph with n(G) ≥ 2, then 2 ≤ Mob gp (G) ≤ gp(G).Moreover, for any 2 ≤ a ≤ b there exists a graph with Mob gp (G) = a and gp(G) = b.

4 Figure 1 :
Figure 1: Four robots traversing the Petersen graph in general position

Figure 2 :
Figure 2: Five robots cannot visit every vertex of the Petersen graph Note that Mob gp(G) = n(G) if and only if G is complete.Moreover, Mob gp (G) = n(G)−1 if and only if G is obtained from K n−1by attaching a leaf to one of its vertices.The latter result can be deduced from[13, Theorem 3.1]  in which the graphs G with gp(G) = n(G) − 1 are characterised; among the two families described there, the above stated graphs are the only ones with the mobile number equal to their general position number.To characterise all graphs with the mobile number equal to their general position number seems to be difficult.
where t ≥ 2 and r 1 ≥ 2, then Mob gp (K r 1 ,...,rt ) = max{2, t − 1} .(1)LetS be the set of occupied vertices in the initial configuration of Mob gp (K r 1 ,...,rt ) robots.It is trivial that two robots can visit every vertex and remain in general position, so assume that |S| ≥ 3. Assume that S contains at least 2 vertices from the same partite set W . Hence, there can be no robots in the other partite sets and, furthermore, if there are at least 3 robots, then no robot can move from W to a different partite set.Therefore, if Mob gp (K r 1 ,...,rt ) ≥ 3, then the set of occupied vertices at any stage contains at most one vertex from each partite set.If each partite set contains an occupied vertex, then no robot can move without making a partite set containing at least 2 robots.So it follows that |S| ≤ t − 1.On the other hand, clearly t − 1 robots can remain in general position and visit every vertex of K r 1 ,...,rt .We close the introduction with some examples.First, Mob gp (C 4 ) = Mob gp (C 6 ) = 2 and if n ≥ 3 and n = 4, 6, then Mob gp can also visit the attached leaves (k − 1) ′ , (k − 2) ′ , . . ., ( k 2 + 2) ′ .Finally robot R 0 moves to the leaf ( k 2 + 2) ′ .We now send robot R 1 around the cycle in the same direction and station it at leaf ( k 2 + 3) ′ and in general for 1 ≤ i ≤ k 2 − 3 we send robot R i around the cycle to leaf ( k 2 + 2 + i) ′ in sequence.At this point there are robots at the leaves ( k 2 − 2) ′ , ( k 2 − 1) ′ , . . ., (k − 1) ′ and all vertices of G have been visited with the exception of the leaves ( k 2