Manuscript Offprint
arXiv:2610.13712Tight asymptotic competitive ratio for the Canadian Traveller Problem on unit-weighted grids
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We study the k-Canadian Traveller Problem (k-CTP), an online navigation problem introduced by Papadimitriou and Yannakakis in 1991. Given an undirected weighted graph and two vertices , a traveller aims at navigating from to while minimizing the total distance travelled. However, up to edges of the graph may be blocked, and the traveller discovers that an edge is blocked only upon reaching one of its endpoints. The performance of an online algorithm for k-CTP is measured with the competitive ratio, which is the quotient between the distance actually traversed and the distance traversed by an omniscient traveller who knows all blockages in advance.
A general lower bound for the competitive ratio of deterministic algorithms remains valid even when the input graph is series-parallel, whereas constant competitive ratios can be achieved on restricted graph classes, such as cycles or unit-weighted outerplanar graphs. In this paper, we establish the first intermediate competitive ratio between constant and linear regimes. We prove that, on unit-weighted solid grid graphs, there exists an online algorithm with competitive ratio . This ratio is asymptotically tight and cannot be defeated, even on unit-weighted square grids. Finally, we show that both the unit-weighted and solidity assumptions are essential: going further with arbitrary edge weights (even on square grids) or non-solid unit-weighted grid structures yields a linear lower bound of .
2012 ACM Subject Classification Theory of computation → Online algorithms
Keywords and phrases Canadian Traveller Problem, online algorithms, competitive analysis, grid graphs
Competitive analysis for the k-CTP on unit-weighted grids
1 Introduction
We study an online navigation problem on graphs, the k-Canadian Traveller Problem (k-CTP), introduced by Papadimitriou and Yannakakis [15]. Given an undirected connected weighted graph and a source-target pair , a traveller must navigate from s to t in G while minimizing the total distance travelled. Edge weights are positive. Unfortunately, certain edges (at most k) of the graph can be blocked. The traveller discovers that an edge is blocked upon reaching one of its endpoints u or v. The k-CTP is PSPACE-complete [4, 15]. Several variants have been studied, including settings in which edges are blocked with a certain probability [1, 4, 12], predictions are given [3], remote edges can be sensed at a cost [12], or the objective is to find a shortest tour [13, 14]. This problem has applications in robot routing for humanitarian logistics [1, 2, 11].
Any instance of the k-CTP can be divided into two parts: a visible one, the weighted graph with and a hidden one, the set of blocked edges , . The objective is to make the traveller attain the target at a minimum cost, i.e. the sum of the weights of the traversed edges. An instance is called a road map. Road maps are assumed feasible: and belong to the same connected component of the graph obtained from by removing . In other words, there is always a way to complete the walk despite the blockages.
A solution to the k-CTP is an online algorithm, called a strategy, which guides the traveller along the walk from s to t on the graph. The competitive ratio [8] of a strategy on a given instance is the quotient between the distance actually traversed by the traveller on that instance and the distance they would have traversed, knowing which edges are blocked in advance. Westphal [17] proved that, for any deterministic strategy A, there is at least one k-CTP road map for which the competitive ratio of A is at least .
One way to circumvent this lower bound consists in adding randomization [6, 10]. A second approach, which we pursue in this paper, is to restrict the competitive analysis of deterministic strategies to certain families of graphs. The lower bound remains valid even when restricted to unit-weighted series-parallel graphs [9]. However, positive results are known for some families: competitive ratio 3 for cycles and cacti (folklore), competitive ratio 9 for unit-weighted outerplanar graphs [5] and competitive ratio for graphs where the maximum -cut has a bounded size [7].
In this paper, we study the k-CTP on unit-weighted solid grids. Informally, these are induced subgraphs of the square grid whose bounded faces are all unit squares. In particular, this family contains square and rectangular grids. Besides their simple geometric structure, solid grids provide a natural abstraction for studying navigation in transportation networks.
Xu et al. [18] previously investigated the design of efficient strategies for unit-weighted rectangular grids. They showed that when k is smaller than both the horizontal and vertical widths of the shortest -path, then the GREEDY strategy achieves a constant competitive ratio 3. Strategy GREEDY simply consists, at each moment of the walk, of going through the shortest path between the current position to target t, taking into account the already discovered blockages. Their assumption on k, however, substantially simplifies the set of instances under consideration. Indeed, in this paper, we prove that the competitive ratio of GREEDY without any restriction on k is at least linear in k, even on square grids.
We thus propose a new strategy, called DOUBLING-FOLLOWWALL achieving a smaller competitive ratio on all unit-weighted solid grid graphs. Our main contribution is summarized:
a sub-family of planar graphs of treewidth at most 2
▶ Main result. There is a polynomial-time deterministic strategy which achieves competitive ratio for the k-CTP on unit-weighted solid grids. This ratio is asymptotically tight, since no deterministic strategy can achieve a competitive ratio on this family.
Some techniques employed in our work bear similarities with the ones proposed for outerplanar graphs in [5]. Indeed, a key limitation of GREEDY strategy is its tendency to persist in one direction when successive blockages are discovered. The distance traversed thus depends linearly on k, whereas a constant distance could have been covered on some other open -path. To address this shortcoming, we introduce the DOUBLING-FOLLOWWALL strategy, which always keeps a close look on the possible open -distance instead of insisting on one direction full of blockages. To do so, we assign to the traveller a distance budget, which doubles at each iteration: a similar technique was used in [5]. In addition, several topological arguments compatible with the grid embedding are used in our competitive analysis for DOUBLING-FOLLOWWALL, leading to ratio . To the best of our knowledge, it is the first time that such tools are employed for the study of k-CTP.
A natural question would be whether our result can be extended to grids without weight restrictions. Unfortunately, we show that it is not possible to outperform linear-in-k competitive ratio, even on arbitrarily-weighted square grids.
In Section 2, we introduce graph notations, the definition of the k-CTP, and some preliminary observations on grids. Section 3 aims at establishing lower bounds to motivate our main contribution: we derive a lower bound for the competitive ratio of unit-weighted square grids, and prove that GREEDY is far from this bound. In Section 4, we introduce our strategy FOLLOWWALL and show that it achieves a competitive ratio when the size of the solid grid graph is small relative to the -distance. This serves as a preliminary result for Section 5 which generalizes it to all unit-weighted solid grids by introducing the DOUBLING-FOLLOWWALL strategy. For all results annotated with a , the full proof is given in the Appendix.
2.1 Graph notation
We consider only undirected connected weighted graphs , where . A graph is unit-weighted if for every edge . A subgraph of is a graph , where , , and , i.e. restricted to set . For any vertex set , we denote by the edge set induced by and the subgraph of induced by : . Let be the graph deprived of set : . For any , we denote by the closed neighborhood of , consisting of all vertices in and all vertices adjacent to at least one vertex of . Similarly, for any edge set , we denote by the subgraph of induced by : . Let be the graph deprived of edges : .
A simple path (called simply a path in the remainder) of is a sequence of pairwise different vertices , with departure and arrival , where for . A path between vertices and is called a -path. We abuse notation: and mean that vertex and edge are on the path , respectively. We denote by the sub-path of obtained from picking the section of between and . In a -walk, however, vertices can be repeated. Moreover, an edge can be traversed several times in a walk, and in opposite directions.
Competitive analysis for the k-CTP on unit-weighted grids
A simple cycle of is a sequence of pairwise different vertices such that for every , and as well.
Throughout the paper, we use classical Landau notation O, o, and .
2.2 Problem definition and competitive analysis
Let be a graph and a set of blocked edges. A road map, which is a feasible instance of the k-CTP problem, is a 4-tuple such that and are connected in . We can now formally introduce the k-Canadian Traveller Problem.
▶ Definition 1 (k-Canadian Traveller Problem, or k-CTP).
Input: A graph , , a set of blocked edges whose identities are unknown and such that and is a road map.
Objective: Traverse graph G from s to t while minimizing the distance travelled.
Guided by a strategy, the traveller produces an -walk. The set of blocked edges is a hidden input at the beginning of the walk. We say an edge is revealed when one of its endpoints has already been visited. A discovered blocked edge is a revealed edge which is blocked. At any moment of the walk, we usually denote by the set of discovered blocked edges. At any moment, we are in fact working on the graph as discovered blocked edges can be permanently withdrawn from the input graph . Conversely, an open edge is an edge which is not blocked. We say a path is open if it does not contain any blocked edges.
For any subset of blocked edges and two vertices , let be the cost of the shortest -path in the graph . Independently from blocked edges, we also write the infinite-norm distance (or -distance) between and , i.e. the maximum gap between either horizontal or vertical coordinates of both points. Hence, for a given vertex , the set of vertices at some fixed infinite-norm distance from form a square cycle in the grid embedding. In order to introduce competitive analysis in the -CTP context, we define the optimal offline cost, which is the distance the traveller would have traversed knowing the blockages in advance.
▶ Definition 2 (Optimal offline path and cost). An optimal offline path, denoted by , is a shortest -path in the graph . Its cost, the optimal offline cost, is .
The competitive ratio is defined in [8]. We denote by the distance traversed by the traveller guided by a strategy on the graph from the source to the target with blocked edges . Since and are generally clear from the context, we might simply write . The same remark holds for the notation of competitive ratio, presented below.
▶ Definition 3 (Competitive ratio). The competitive ratio of A over a road map is the ratio between and the optimal offline cost. Formally:
We can assume w.l.o.g. that all blocked edges of our road map are accessible from in : formally, for any , there exists an -path or an -path in . Indeed, all blocked edges which are not accessible from play no role in the behaviour of the traveller since they cannot be discovered. Said differently, as we conduct here a worst-case competitive analysis, useless blocked edges do not appear in the worst instances of -CTP.
2.3 Grids
Square grids, rectangular grids and solid grid graphs. Let denote the infinite square grid graph, whose vertex set is and in which two vertices are adjacent if and only if their -distance is one. A grid graph is a finite induced subgraph of . We consider the natural planar embedding of a grid graph inherited from .
We distinguish two classes of grid graphs that will be of particular interest: rectangular grids and solid grid graphs (Figure 1).
▶ Definition 4 (Rectangular grid). A rectangular grid is a grid graph induced by a vertex set of the form for some .
Equivalently, a rectangular grid is the Cartesian product of two finite paths. Thus, the boundary of a rectangular grid forms a rectangle and all its bounded faces are unit squares. When n = p, the graph is a square grid. Solid grid graphs generalize rectangular grids by allowing the boundary to have an arbitrary shape while still excluding non-unit bounded faces.
▶ Definition 5 (Solid grid graph [16]). A solid grid graph (or simply solid grid) is a grid graph in which every bounded face has unit area.
Hence, every square grid is a rectangular grid, and each rectangular grid is a solid grid graph. Figure 1b illustrates a solid grid graph whose boundary is not rectangular.

(a) A rectangular grid

(b) A solid grid
Figure 1 Examples of grid graphs
The case of weighted square grids and unit-weighted grid graphs. Since our goal is to assess the competitiveness of deterministic strategies on different types of grids, we begin by providing two cases which are (almost) equivalent to the worst-case instances of k-CTP, as presented in [17]. Concretely, any strategy dealing with some graph made up of vertex-disjoint -paths cannot outperform the competitive ratio . In fact, such a vertex-disjoint path structure can be built either by assigning arbitrary weights on any sufficiently large grid, or by considering unit-weighted grid graphs with large holes.
▶ Theorem 6 (★). There is no deterministic strategy for the k-CTP with competitive ratio strictly smaller than on unit-weighted grid graphs. The same holds for arbitrarily-weighted solid grid graphs.
The consequence of this theorem is that, if we aim at achieving a competitive ratio on certain grid families, then we have to consider either weight or topological restrictions. For this reason, in the remainder, we focus on unit-weighted solid grids.
Competitive analysis for the k-CTP on unit-weighted grids
3 First insights for the study of unit-weighted solid grids
We present here some initial observations on the study k-CTP grid instances. First, we assess the competitiveness of the GREEDY strategy, which was first introduced in [18]: in the context of unit-weighted square grids, we prove that its competitive ratio is asymptotically linear in k. Second, we provide a general asymptotic lower bound for the competitive ratio on unit-weighted square grids.
3.1 Greedy strategy
The GREEDY strategy is a natural algorithm proposed by Xu et al. [18]. In this paper, the authors provide several results and observations on the competitiveness of this strategy. Its principle is the following: at each step, follow the shortest -path in the graph , where is the current position of the traveller and is the set of blocked edges already discovered by the traveller. GREEDY is the strategy we could apply in a real-world transportation network, when we encounter a blocked road (accident, road renovations,...) and we aim at computing a short detour to reach our destination.
Nevertheless, on general graphs, its competitive ratio can be exponentially large in [18], which is very far from the optimal ratio , achieved by the other strategy REPOSITION [17]. One could think that GREEDY is efficient for some network topologies, in particular grid-like networks, which are natural models for urban transportation. In [18], the authors show that, on unit-weighted rectangular grids, it achieves competitive ratio 3 under a very specific and strong restriction: the number of blockages is upper-bounded by .
We prove that this statement is no longer valid when k increases, especially when k becomes much larger than the initial -distance. In this scenario, the competitive ratio of the GREEDY is at least linear in k, which does not outperform asymptotically the optimal bound of general graphs. Therefore, GREEDY does not offer meaningful guarantees on grids when the number of blockages is unbounded.
▶ Theorem 7. The competitive ratio of GREEDY strategy on unit-weighted square grids is at least .
Proof. Consider a square grid of dimension , with odd and . Place and at distance 3 on the same horizontal line, such that the center of the grid is on the 3-edge shortest -path . We fix and the vertex located below .
Following GREEDY, the traveller traverses the edge . Assume it discovers that both and are blocked edges. Hence, we recompute the shortest -path in the graph with . This path goes up and the traveller visits a first vertex , just above . Assume the horizontal edge , which is parallel to , is blocked. Again, we recompute the current shortest path which goes up. The traveller moves to but discovers that is blocked, and so on. With the GREEDY strategy, this process continues until some edge is blocked. Then the traveller finds an open detour via (which exists as ) and reaches without encountering extra blockages. The journey of the traveller is highlighted with green arcs in Figure 2a.
In this situation, the distance traversed by the traveller is exactly , while . So, the competitive ratio of GREEDY on square grids is at least .
3.2 Lower bound for the competitiveness on unit-weighted grids
This section is dedicated to proving that no competitive ratio can be expected on unit-weighted square grids. To establish this result, we consider a square grid with certain

(a) Road map on which the GREEDY strategy achieves ratio .

(b) Road map on which any strategy achieves at least ratio .
Figure 2 Lower bounds instances of Section 3
configurations of blocked edges.
▶ Theorem 8. There is no deterministic strategy that achieves a competitive ratio on unit-weighted square grids for the k-CTP.
Proof. Let us consider all road maps , where is a square grid, is the top-left corner vertex, is the bottom-right corner vertex, and is a set of blocked edges of size at most . We fix the source and target to be at coordinates and ; and . We restrict ourselves to blockage sets containing:
all vertical edges, except the ones present on the leftmost vertical line (the x-coordinate is equal to 0) and on the rightmost one (the x-coordinate is equal to N)
all horizontal edges adjacent to the rightmost vertical line, except an arbitrary one.
An example of such a road map is given in Figure 2. The blocked edges are drawn in red, and the open edges appear with a thick black line. The optimal offline path is highlighted in orange. A first remark is that the number of blocked edges is exactly , so these road maps are k-CTP instances for . A second comment is that, thanks to the single open horizontal edge on the rightmost column, there is an -path in graph and the shortest one has length 2N.
Consider any deterministic strategy A: it must, at some moment, reach the rightmost vertical line, i.e. a vertex v such that . To do so, it makes the traveller traverse a horizontal edge adjacent to this rightmost vertical line. Consider the configuration where the single open edge among these horizontal edges corresponds to the last attempt made by strategy A. Said differently, the traveller discovers N horizontal blockages before reaching the rightmost vertical line. Because of the vertical blockages forcing the traveller to traverse the length of the grid in order to reach the rightmost vertical line, they have no choice but retrace their steps towards the leftmost vertical line.
For these reasons, the distance traversed by the traveller guided by strategy A is at least N (distance needed to attain the y-coordinate equal to 0) plus for all the horizontal paths traversed. Hence, the total distance traversed is at least . Consequently, the competitive ratio of strategy A on these road maps is at least .
Competitive analysis for the k-CTP on unit-weighted grids
Although we assume that and lie at opposite corners of the square, the proof extends to arbitrary positions by adding at most blockages to restrict the accessible area. This does not affect the asymptotic analysis, since the distance traversed is . We now prove that the resulting competitive ratio is optimal for unit-weighted solid grid graphs.
4 Competitive analysis when the grid size is small
Let us consider now, as announced, as a solid grid graph, with , and a positive integer. This defines the visible part of a -CTP grid instance. Let . We also fix as a set of blocked edges to be discovered by the traveller, .
Our first objective in this section is to introduce the strategy FOLLOWWALL. Then, we prove that its competitive ratio on solid grid graphs is when the total size of the grid is at most , where is any constant positive value, i.e. . The case where the grid size is arbitrarily larger than will be investigated later (Section 5).
4.1 Description of the FollowWall strategy
We introduce some vertex coloring, which depends on the set .
▶ Definition 9. A vertex is called red if it is an endpoint of an edge in , and blue if it is not red but adjacent to a red vertex. We fix R and B the sets of red and blue vertices, respectively. We say a colored vertex is either blue or red.
The red-blue graph is the subgraph of induced by . For a colored vertex , we denote by the connected component of in the red-blue graph.
Naturally, the red-blue graph is not necessarily connected, as blocked edges can be located anywhere in graph G. Hence, it admits connected components which will be treated quite independently by our algorithm FOLLOWWALL.
▶ Observation 10. Any two distinct red-blue components are vertex-disjoint. In particular, if u and v are colored vertices, then either or .
We now describe our strategy FOLLOWWALL. The strategy starts by fixing a shortest -path in . The traveller traverses , whenever edges are open. If it encounters a blockage that has not yet been discovered, it initiates an exhaustive exploration of following a Depth-First Search (DFS). We will show in Theorem 12, presented in the next subsection, that this exploration produces an open (colored) path from to a later vertex of , , such that either or . The strategy follows the open colored path inside to such a which is as close as possible from . Then, the traveller restarts the walk towards on , until finding a new red-blue component.
Before giving the full pseudocode of FOLLOWWALL, we define the subroutine called RB-DFS (Algorithm 1). This procedure guides the traveller in exploring a red-blue component, following a DFS tree. It takes as input the graph G with a set of already discovered blocked edges , a current position and the -path P. It makes the traveller visit all vertices of RB( ) and returns the closest-to-t vertex , , belonging both to P and RB( ). RB-DFS cannot be seen as a classical DFS where all the information is known from the beginning of the traversal. Indeed, the traveller discovers little by little adjacent blockages and identifies whether vertices are red, blue, or uncolored. Hence, each vertex status and the content of the red-blue component is incrementally updated while the exploration goes on.
Algorithm 1 RB-DFS
Input: Grid G, target t, blockages already discovered , position , path P
1 tree containing a single vertex ; parent ; // DFS tree
2 Let stack be the DFS stack; Push(stack, ); // DFS stack
3 Label all vertices as undiscovered;
4 while stack is nonempty do
5 Pop(stack);
6 if x is not labeled as discovered then
7 add vertex x and edge to T; parent ;
8 the traveller goes to x (if not already there) via T; Label x as discovered;
9 Decide the color of x (visit the four neighbors if necessary);
10 if x is colored then
11 for all neighbors y of x in not already present in stack do
12 Push(stack, y)
13 end for
14 end if
15 end if
16 end while
17 Update with all the blockages discovered during the exploration;
18 ; // Determining the vertex of which is the closest to t
19 for all vertices do
20 | if and then ;
21 end for
22 if then return “Error: no -path in ”;
23 The traveller goes to following tree T; return ;
Concretely, the FOLLOWWALL strategy consists in repeating RB-DFS each time a blockage is discovered on the shortest -path . Indeed, each time RB-DFS is launched on a red-blue component , it necessarily meets another vertex such that the section between and on path is apparently open. And therefore, is necessarily closer to than . This is a result we are going to state and prove later (Theorem 12). Note, as a technical detail, that for now, the pseudocode of RB-DFS is consistent, since we define as the closest-to- vertex of : such a vertex necessarily exists as is candidate.
The pseudocode of FOLLOWWALL is provided in Algorithm 2. Observe that, as long as path P is open, the traveller advances on it and maintains both set and color statuses.
This strategy FOLLOWWALL is illustrated in Figure 3, which describes its different steps on a solid grid example. The position of the traveller is indicated by a green line surrounding the vertex. The traveller starts on vertex s in Figure 3a, and the pre-computed path P is highlighted in orange. Then, the traveller traverses path P until reaching a blockage on P (Figure 3b). At this point, subroutine RB-DFS is launched: Figure 3c illustrates the beginning of the exploration of the red-blue component RB(u) and extra blockages are discovered. Green arcs and numbers indicate in which order the vertices of RB(u) are visited by the RB-DFS. Observe that, due to line 9 of Algorithm 1, there are additional edges actually traversed by the traveller. Indeed, for each vertex visited, deciding its color amounts to exploring all its neighbors to check whether they are adjacent (or not) to a blockage. The RB-DFS exploration goes on and is completed in Figure 3d, with all red and blue vertices RB(u) explored. Then, the traveller moves in the DFS tree to join the
Competitive analysis for the k-CTP on unit-weighted grids
Algorithm 2 FOLLOWWALL
Input: Grid G, source s, target t
1 any shortest -path in G; // Definition of
2 ; ; // Blocked edges discovered and position iterator
3 while do
// Run until reaching t
4 while is open and do
5 for all blockages adjacent to do
6 ; // Adding the discovered blockage to
7 Color and u in red, their neighbors in blue if they are not colored yet;
8 end for
9 Traverse ; ;
10 end while
11 if then return;
12 ; // Explore when is blocked
13 ; // Theorem 12 shows that
14 end while
vertex of RB(u) which is the closest to t (Figure 3e). The traveller continues their journey towards t and is luckily not blocked in this example (Figure 3f).
4.2 Competitive ratio of FollowWall
To determine the competitive ratio of FOLLOWWALL on solid grid graphs, under the hypothesis that , our reasoning consists in showing that the distance traversed by the traveller is proportional to . If such a statement holds, then the competitive ratio of FOLLOWWALL depends asymptotically on . As , we have , which gives the upper competitive bound .
Therefore, our first challenge is to assess the distance traversed by the traveller as a function of k and N. We begin with a natural property of red-blue components.
▶ Lemma 11. Let be a blockage, then either:
there exists a path between u and v included in RB(u), or
there is no open path between u and v in .
Proof. Assume that and that there exists a path from to in . In particular, suppose that is chosen to be area-minimal, that is, the area of the interior of the cycle formed by adding the edge to is minimum. We denote the interior of this cycle by and orient from to for simplicity.
We prove inductively that . First, . Moreover, , since is red and is adjacent to , and hence is either red or blue.
Now, assume as induction hypothesis that for some . If is red, then is blue, since by definition. By connectivity, .
Otherwise, suppose that is blue and that is neither red nor blue. Consider the vertices and such that is a 4-cycle and such that the corresponding unit square is fully contained in . The vertices and exist since is a simple cycle in , and is a solid grid graph and therefore contains no hole. We claim that no edge of this 4-cycle is blocked. Indeed, , since otherwise would be red. Similarly, , since

(a) Solid grid instance for k-CTP with a pre-computed path P
(b) The traveller (in green) moves on P but is blocked
(c) The traveller starts exploring the red-blue component

(d) The run of RB-DFS for this component is terminated.
(e) The traveller goes to the closest vertex to t.
(f) The traveller reaches t without encountering any other blockage.
Figure 3 How FOLLOWWALL works on an example
otherwise would be red. Finally, , since otherwise would be blue. All in all, our claim is satisfied.
Therefore, replacing the edge by the path yields a path from to in whose enclosed area is smaller than the one of . This contradicts the area-minimality of . Thus, in all cases, . By induction, for all . In particular, , and hence there exists a path between and in .
FOLLOWWALL strategy ensures that, after running RB-DFS, the traveller necessarily visits another vertex of P which is closer to t. Such a guarantee is formally proven below.
▶ Theorem 12 (Red-blue routing). Let be a shortest -path in and assume the traveller follows FOLLOWWALL: they are currently located on and discovers blockage . RB-DFS is then launched to perform an exhaustive exploration of and exactly one of the two following statements holds:
-
there exists , with , such that , and either or ;
-
there is no -path in .
Proof. We start with the proof of the following claim.
▷ Claim 13. Let be the maximum index such that . In other words, for every . If , then there is no -path in .
Proof. Naturally, such an index exists as is a candidate. We prove by induction on that there is no path between and in .
For , we have . By Lemma 11, either there exists a path between and contained in , or there is no open path between and in .
Competitive analysis for the k-CTP on unit-weighted grids
Since , Observation 10 gives . The first alternative would imply , contradicting our claim hypothesis. So, there is no -path in .
Now suppose that the statement holds for every integer between and , where . In particular, for every , there is no open path between and . We prove that there is no open path between and .
Suppose, for a contradiction, that a -path exists in . Among all open paths from to choose one for which the area enclosed by and the subpath is minimum, and denote this region by . By the minimality of , the paths and have no common vertex other than and otherwise, a proper subpath of would give an open path from to some , with contradicting the induction hypothesis.
We write . We prove by induction on that for every . The statement is trivial for . Suppose that for some . Since and intersect only at their endpoints, the edge is incident to a unit square contained in . Let and be the other two vertices of this square, so that is its boundary. At least one edge of this 4-cycle is blocked. Indeed, if all four edges were open, then replacing in by the three-edge path would produce an open path enclosing a strictly smaller area than , contradicting the choice of .
Hence some edge of the 4-cycle is blocked. Both endpoints of a blocked edge are red, and consequently all four vertices of the square are red or blue. In particular, . Since and the square contains a red vertex, then is connected to in the red-blue graph. Thus .
This completes the induction. In particular, for , we have . This contradicts the hypothesis that for every . Therefore there is no open path between and .
Taking gives that there is no open path from to . On the other hand, since , there is an open path from to contained in . Moreover, there is an -path in since the traveller moved from to . Thus, in graph , vertices and belong to the same connected component, but belongs to another one.
Based on this claim, we fix as the largest index such that . If , then , and the statement of the theorem holds. Same remark if and . Finally, consider the case
This latter result is the key property for establishing the competitive ratio of FOLLOWWALL on . Concretely, during their walk, the traveller either traverses edges of the path P towards t or explores edges of a red-blue component.
▶ Theorem 14. On a solid grid graph G with blocked edges , the FOLLOWWALL strategy either makes the traveller reach t if is feasible or certifies that there is no -path in . In both cases, the distance traversed is at most .
Proof. Let us first explain why FOLLOWWALL actually guides the traveller towards if is feasible. The traveller walks on the pre-computed -path , until a blockage is discovered. RB-DFS will explore and, from Theorem 12, will identify a vertex , , such that . Then, the traveller goes to (line 23 of Algorithm 1). Therefore, RB-DFS moves the traveller to another vertex of which is closer to . Since is finite, the traveller will necessarily reach target after applying the above procedure a finite number of times.
Conversely, if no open -path exists, then, since the strategy continues along P until reaching t or until a blocked edge is encountered, some call to Theorem 12 must return the second outcome, thereby correctly certifying that there is no -path in .
It remains to bound the total length of the walk. The walk alternates between following the path and achieving open walks in different red-blue components , with and some positive integer. Each such walk is obtained after an exhaustive exploration of . The exploration phase of RB-DFS consists in traversing a tree , and each edge of is traversed at most twice. Thus, the distance traversed by the traveller for the exploration of is at most , since the degree of each vertex is at most 4. To which we can add an extra term for moving to when the exploration is completed (line 23 of Algorithm 1). In the worst case, deciding the color of each vertex explored needs the traveller to traverse each incident edge twice, adding a constant factor of 8. Altogether, the distance traversed by the traveller due to is .
All red-blue components traversed by the traveller are disjoint (Observation 10), since at each new launch of RB-DFS, we explore completely the vertex set . Thus, the total length of the walk due to all RB-DFS calls is at most .
Moreover, for each blocked edge, at most 8 vertices are colored (two red endpoints with 6 possible neighbors). Thus, . All in all, the total length traversed by the traveller is at most .
Combining this distance traversed with our initial assumption that , we conclude that the competitive ratio of the FOLLOWWALL strategy is .
▶ Theorem 15. On a unit-weighted solid grid graph G with blocked edges , where is feasible and , the FOLLOWWALL strategy has competitive ratio .
Proof. By Theorem 14, if is feasible, then the FOLLOWWALL strategy guides the traveller towards and produces a walk of length at most . By definition, , so . The competitive ratio of FOLLOWWALL on satisfies:
Furthermore, . Reversing the inequality, we have . As a conclusion,
In brief, the competitive ratio of FOLLOWWALL is , seeing as a constant.
5 Extension to all grid sizes
We generalize the result of Theorem 15. We still consider unit-weighted solid grids but this time can be greater than . We show that successively applying the FOLLOWWALL strategy to balls of doubling sizes yields a competitive ratio of . We call this strategy DOUBLING-FOLLOWWALL, and its pseudocode is given in Algorithm 3. Notation still refers to the initial -distance . Remember that is the infinity-norm distance between two vertices and .
Let . At each iteration , strategy DOUBLING-FOLLOWWALL only considers as an input the induced subgraph of containing vertices at -distance
Competitive analysis for the k-CTP on unit-weighted grids
Algorithm 3 DOUBLING-FOLLOWWALL
Input: Solid grid G, source s, target t
1 ; ; ;
2 ; // Square ball centered on s
3 while FOLLOWWALL fails on do
4 the traveller goes back to s using the shortest path among already visited edges;
5 ;
6 ; // Ball size is doubled
7 end while
from , a value between and . In other words, the graph is reduced to the ball centered on with radius . We launch FOLLOWWALL on this input: either the traveller reaches or there is a call of RB-DFS inside FOLLOWWALL which returns an error (line 22 of Algorithm 1), meaning that there is no open -path inside the ball. In the latter case, we expand the graph to explore, doubling the radius of the ball.
For every , let be defined as in Algorithm 3, namely, as the set of vertices of at -distance at most from . Moreover, we refer to as the number of blocked edges whose endpoints both belong to : . We also fix as the total number of iterations achieved by DOUBLING-FOLLOWWALL on the input graph: the last grid considered is the -ball of radius . We establish a first key property: at each iteration, the number of blockages discovered is proportional to the size of the current ball.
▶ Lemma 16 (★). Assume DOUBLING-FOLLOWWALL is launched on a solid grid graph G, and let . Then .
Proof sketch. The idea behind this proof is relatively simple: as not only but also its subgraph do not contain any open -path, a certain number of blockages must be present in to separate from . This latter number is necessarily proportional to the radius of , in fact with a factor . A full technical version of the proof is available in Appendix B, and its major arguments are summarized below.
Suppose, towards a contradiction, that , where . Observe that there are concentric square boundaries surrounding and contained in , one of which, say , must contain no blocked edge. Fix an open -path of : it leaves and therefore crosses at least twice. We can also fix any -path contained in , which is necessarily blocked. Together, the -paths and form a cycle . Selecting and such that minimizes its enclosed area leads to a contradiction: since is solid, a portion of (which is open) provides an open shortcut through the interior of , yielding a cycle with strictly smaller enclosed area.
Using this lemma, we can now derive the competitive ratio of the strategy. Note that DOUBLING-FOLLOWWALL is correct in the sense that it reaches target t on any feasible instance made up of unit-weighted grids. Indeed, Theorem 14 shows that FOLLOWWALL either reaches t or certifies that the input is not feasible: as we are considering balls of increasing sizes around s, at some point, one ball has to contain an open -path. Now, it remains to prove our main result: DOUBLING-FOLLOWWALL achieves ratio on all unit-weighted solid grids.
▶ Theorem 17. DOUBLING-FOLLOWWALL strategy has competitive ratio on unit-weighted solid grids.
P. Bergé, V. Chernyshev, M. Marin, A. Pyrko and L. Saläün
15
Proof. Since there exists an open -path in , there necessarily exists an index such that contains an open -path. Let be the smallest such index. Hence, FOLLOWWALL succeeds on and fails on for every . By minimality of , . Indeed, an open -path of length at most cannot leave , since every vertex on such a path is at -distance at most from .
Recall by Theorem 14 that, when ran on , strategy FOLLOWWALL produces a walk of length and then either reaches , or states that no open -path exists in . When returning to (line 4 of Algorithm 3), the traveller traverses at most the distance of the outward journey. Consequently, the total length of the walk produced by DOUBLING-FOLLOWWALL satisfies: . The geometric part of this sum gives , where the last equality follows from . It therefore remains to prove that:
Since blocked edges outside do not affect the execution of DOUBLING-FOLLOWWALL, we can assume w.l.o.g. that for simplicity. We also set : thus . Recall by definition that is contained in a full square grid with vertices on each side. By grid topology, we have . Since . It follows, using rough upper bounds, that:
Note that the case was already considered in Theorem 15, because . As another specific case, we consider . We have, using Equation (1):
From now, we consider the general case . We fix a real value , or said differently . We distinguish two scenarios.
Scenario 1: . Here, . Using and , we obtain
Scenario 2: . As a first observation, let us show that is bounded above by 1, up to an irrelevant additive adjustment. Indeed, by Lemma 16, for every , . Iterating this inequality gives
where the last inequality holds since . It follows that . Note that value can be assumed to be smaller than , as otherwise is necessarily upper-bounded by a constant value and so is . Thus, we can consider .
Competitive analysis for the k-CTP on unit-weighted grids
We now define and split the sum into:
For both terms, we prove that they are asymptotically bounded by . First, using Equation (1) and , we have:
Since , then . Consequently, .
Second, since for every , we have
Define:
As , we have . Consequently,
Let . Then, . The function , for , attains its maximum at . Hence,
Therefore, .
For Scenario 2, we also have . As this holds for both scenarios, then the competitive ratio of DOUBLING-FOLLOWWALL is .
6 Conclusion
We exhibited a deterministic strategy achieving a competitive ratio for the k-CTP on unit-weighted solid grid graphs, and proved that this bound is asymptotically tight. To the best of our knowledge, this is the first competitive ratio for the k-CTP that lies strictly between the previously known regimes of and . This raises the question of whether other intermediate regimes can be obtained.
In [5], a lower bound of was identified for arbitrarily-weighted outerplanar graphs. Whether any strategy can achieve a competitive ratio matching this lower bound remains an open question. Nevertheless, the existence of an optimal competitive ratio of 9 for outerplanar graphs in the unit-weight setting suggests that this family of graphs is a promising candidate for exhibiting another sublinear competitive regime.
Moreover, it seems at first sight that our lower bound of can be extended to -dimensional grid graphs, for , yielding a lower bound of . It would be interesting to investigate whether the DOUBLING-FOLLOWWALL strategy can also be generalized to higher dimensions.
References
1 V. Aksakalli, O. F. Sahin, and I. Ari. An AO based exact algorithm for the canadian traveler problem. INFORMS Journal on Computing, 28(1):96–111, 2016.
2 A. F. Alkaya, S. Yildirim, and V. Aksakalli. Heuristics for the Canadian Traveler Problem with neutralizations. Comput. Ind. Eng., 159:107488, 2021.
3 E Bampis, B. Escoffier, and M. Xefteris. Canadian Traveller Problem with predictions. In Parinya Chalermsook and Bundit Laekhanukit, editors, Procs. of WAOA, volume 13538 of Lecture Notes in Computer Science, pages 116–133. Springer, 2022.
4 A. Bar-Noy and B. Schieber. The Canadian Traveller Problem. In Proc. of ACM/SIAM SODA, pages 261–270, 1991.
5 L. Beaudou, P. Bergé, V. Chernyshev, A. Dailly, Y. Gerard, A. Lagoutte, V. Limouzy, and L. Pastor. The Canadian Traveller Problem on unit-weighted and arbitrarily weighted outerplanar graphs. Theor. Comput. Sci., 1082:116096, 2026.
6 M. Bender and S. Westphal. An optimal randomized online algorithm for the k-Canadian Traveller Problem on node-disjoint paths. J. Comb. Optim., 30(1):87–96, 2015.
7 P. Bergé and L. Salaün. The influence of maximum -cuts on the competitiveness of deterministic strategies for the Canadian Traveller Problem. Theor. Comput. Sci., 941:221–240, 2023.
8 A. Borodin and R. El-Yaniv. Online computation and competitive analysis. Cambridge Univ. Press, 1998.
9 H. Chan, J. Chang, H. Wu, and T. Wu. The k-Canadian Traveller Problem on Equal-Weight Graphs. Proc. of WCMCT, pages 135–137, 2015.
10 E. D. Demaine, Y. Huang, C. Liao, and K. Sadakane. Canadians Should Travel Randomly. Proc. of ICALP, pages 380–391, 2014.
11 P. Eyerich, T. Keller, and M. Helmert. High-quality policies for the Canadian Traveler's Problem. In Proces. of AAAI, pages 51–58. AAAI Press, 2010.
12 D. Fried, S. E. Shimony, A. Benbassat, and C. Wenner. Complexity of canadian traveler problem variants. Theor. Comput. Sci., 487:1–16, 2013.
13 N. Hahn and M. Xefteris. The covering canadian traveller problem revisited. In Procs. of MFCS, volume 272 of LIPIcs, pages 53:1–53:12, 2023.
14 C. Liao and Y. Huang. The covering canadian traveller problem. Theor. Comput. Sci., 530:80–88, 2014.
15 C. Papadimitriou and M. Yannakakis. Shortest paths without a map. Theor. Comput. Sci., 84(1):127–150, 1991.
16 C. Umans and W. J. Lenhart. Hamiltonian cycles in solid grid graphs. In Procs. of FOCS, pages 496–505. IEEE Computer Society, 1997.
17 S. Westphal. A note on the k-Canadian Traveller Problem. Inform. Proces. Lett., 106(3):87–89, 2008.
18 Y. Xu, M. Hu, B. Su, B. Zhu, and Z. Zhu. The Canadian traveller problem and its competitive analysis. J. Comb. Optim., 18(2):195–205, 2009.
A Proofs of Section 2
Proof of Theorem 6. Let A be a deterministic strategy for the k-CTP. We first prove the result for unit-weighted grid graphs.
For two integers , let be the graph defined as follows:
■ and are two paths on vertices;
■ for each , let be a path of length such that and .
Competitive analysis for the k-CTP on unit-weighted grids
We set and (see Figure 4). All edges of have unit weight.
Consider the following set of edges: . It contains all horizontal edges incident to the rightmost vertical line. Set is an -separator, hence the traveller must traverse at least one edge of set in order to reach . We will consider blockages only inside set . More precisely, we fix as a set made up of among the edges of , such that it contains the first edges which strategy aims at traversing to attain the rightmost vertical line. Concretely, strategy first tries to make the traveller pass through some but fail as we fix . So, strategy tries to pass through another but the traveller is blocked as we fix . Finally, the traveller reaches the rightmost vertical line by passing through some which is open.

Figure 4 An example of grid graph on which any strategy achieves at least ratio 2k - 1.
Said differently, the first paths traversed by the traveller are unsuccessful. These paths are traversed in both directions as the traveller is blocked on their extremity. Moreover, the traveller traverses path in one direction to reach the rightmost vertical line. As a consequence, at least edges are traversed horizontally by the traveller in this configuration . Vertically, the traveller traverses at least edges from to . Hence, denoting by the total length of the walk produced by , we have:
Every shortest -path in has length , and one is open as is not blocked (see the orange path in Figure 4). Therefore,
For the competitive ratio, it follows that:
Fixing yields:
Hence, the competitive ratio of any deterministic strategy A on unit-weighted grid graphs is at least .
P. Bergé, V. Chernyshev, M. Marin, A. Pyrko and L. Saläün
19
Observe that is indeed a grid graph, but it is not a solid grid graph, as it contains non-unit bounded faces. We now adapt the construction to weighted solid grid graphs.
Let be obtained from by adding all the missing vertices and edges between consecutive paths and , so that is a rectangular grid, and therefore a solid grid graph. We assign weight 1 to every edge of and weight to every edge of .
We use the same “blocking adversary” as above on the edges of . If we assume that A never makes the traveller traverse an edge of weight M, his exploration is confined to , and the previous reasoning gives again a competitive ratio of at least .
Suppose now that A traverses an edge of weight M. Its total cost is then at least M. On the other hand, the optimal path described above uses only edges of and therefore still has cost . Thus,
For , this quantity is larger than . Consequently, in both cases, the competitive ratio of is at least . Therefore, the lower bound holds both for unit-weighted grid graphs and for weighted solid grid graphs.
B Proofs of Section 5
Proof of Lemma 16. Let . Thus, is induced by the vertices at -distance at most from , while is induced by the vertices at -distance at most from .
Suppose, towards a contradiction, that . For every , let
There are such square boundaries, and every grid edge is contained in at most one of them. Since we assumed that there are fewer than blocked edges in there exists such that no edge of contained in is blocked. Fix such an and write .
Let be a shortest -path contained in . Such a path exists as is smaller than , the radius of . Since , we have , and therefore . In particular, is contained strictly inside the square bounded by .
As FOLLOWWALL fails on (because ) and FOLLOWWALL is correct, there is no open -path contained in . Let be an open -path in . We may assume that is simple. Necessarily, contains a vertex outside .
Let . Following from to , let be the last vertex of preceding (it exists as is a candidate), and let be the first vertex of following (it exists as is a candidate). By their choice,
Consequently, is a simple cycle. Moreover, contains the vertex . Figure 5 illustrates cycle with both sections (in red) and (in blue).
Among all choices of an open -path , a vertex , and the corresponding vertices defined above, select a combination for which the region enclosed by has minimum area. Let contain all vertices of surrounded by in the grid embedding. We write for the closed region bounded by . As is a solid grid, we can show that every lattice point of is a vertex of .
Competitive analysis for the k-CTP on unit-weighted grids

Figure 5 The cycle formed by . The dashed arcs of represent the possible shortcuts.
▷ Claim 18. For every , we have .
Proof. Suppose, for the sake of contradiction, that there exists such that . Since every vertex of is a vertex of , we necessarily have .
Consider the face of containing . Since lies in the interior of the simple cycle , the face is an inner face of . Moreover, since is an induced subgraph of the square grid and , none of the four grid edges incident with belongs to . Consequently, the four unit squares incident with are contained in the same face . Hence,
contradicting the assumption that G is solid, i.e. every inner face has unit area.
We now show that a portion of gives an open shortcut for . Since and contains a vertex outside , the path must leave the square bounded by . Let be a vertex at which leaves this square; that is, and the successor of along lies strictly outside .
Let and be the two neighbors of x along .
▷ Claim 19. At least one of and belongs to .
Proof. Indeed, in a sufficiently small neighborhood of , the two edges of incident with divide the neighborhood into an interior and an exterior sector. One of these two edges is the edge of by which reaches , and the other is , the edge by which leaves the square bounded by . Hence one of the two directions of incident with lies on the interior side of the Jordan curve . Therefore at least one of belongs to .
Assume w.l.o.g. that , and traverse from in the direction of . Let
be the maximal subpath of all of whose vertices belong to . Note that, by Claim 18, A is a path in G.
The path cannot traverse the whole of . Indeed, eventually returns to the interior of , since . At such a re-entry point, the same local Jordan-curve argument, with the roles of the interior and exterior reversed, shows that one of the two directions of lies on the exterior side of . Thus, when is traversed from in the interior direction chosen above, one must eventually leave .
Let be the vertex of immediately following . By maximality, . Since the edge joins the closed interior of to its exterior, and ; hence . Thus is an -path whose endpoints lie on and which is otherwise contained in . Furthermore, since lies strictly inside , neither nor belongs to . Hence both belong to .
Since and contains no blocked edge, is an open -path. Replace the -subpath of lying on the boundary of the region cut off by by the path . Since both the replaced part and have the same endpoints and is contained in , this yields an open -path .
Moreover, replacing P by removes a nonempty region from the region bounded by C. In particular, every cycle obtained from the modified portion of and the corresponding portion of Q is contained in , and the cycle containing the modified portion has strictly smaller enclosed area than C.
Finally, since is an open -path and FOLLOWWALL fails on , correctness of FOLLOWWALL implies that is not contained in . Choose , and let and be, respectively, the last and first vertices of before and after . Then
is a simple cycle of the same type as C. By the shortcut construction, is included into and has a smaller enclosed area. This contradicts the minimal choice of C.
Therefore . As , we conclude that .