# God Save the Queen

Queen Daniela of Sardinia is asleep at the center of a round room at the top of the tower in her castle. She is accompanied by her faithful servant, Eva. Suddenly, they are awakened by cries of "Fire". The room is pitch black and they are disoriented. There is exactly one exit from the room somewhere along its boundary. They must find it as quickly as possible in order to save the life of the queen. It is known that with two people searching while moving at maximum speed 1 anywhere in the room, the room can be evacuated (i.e., with both people exiting) in 1 + 2π/3 + √(3)≈ 4.8264 time units and this is optimal [Czyzowicz et al., DISC'14], assuming that the first person to find the exit can directly guide the other person to the exit using her voice. Somewhat surprisingly, in this paper we show that if the goal is to save the queen (possibly leaving Eva behind to die in the fire) there is a slightly better strategy. We prove that this "priority" version of evacuation can be solved in time at most 4.81854. Furthermore, we show that any strategy for saving the queen requires time at least 3 + π/6 + √(3)/2 ≈ 4.3896 in the worst case. If one or both of the queen's other servants (Biddy and/or Lili) are with her, we show that the time bounds can be improved to 3.8327 for two servants, and 3.3738 for three servants. Finally we show lower bounds for these cases of 3.6307 (two servants) and 3.2017 (three servants). The case of n≥ 4 is the subject of an independent study by Queen Daniela's Royal Scientific Team.

## Authors

• 7 publications
• 11 publications
• 6 publications
• 11 publications
• 8 publications
• 10 publications
• 10 publications
• 4 publications
• ### On Worst-case Regret of Linear Thompson Sampling

In this paper, we consider the worst-case regret of Linear Thompson Samp...
06/11/2020 ∙ by Nima Hamidi, et al. ∙ 0

• ### Simple dynamic algorithms for Maximal Independent Set and other problems

We study three fundamental graph problems in the dynamic setting, namely...
04/05/2018 ∙ by Manoj Gupta, et al. ∙ 0

• ### Combinatorial Communication in the Locker Room

The reader may be familiar with various problems involving prisoners and...
08/26/2020 ∙ by Artur Czumaj, et al. ∙ 0

• ### Age of Information With Prioritized Streams: When to Buffer Preempted Packets?

In this paper, we consider N information streams sharing a common servic...
01/17/2019 ∙ by Ali Maatouk, et al. ∙ 0

• ### Generalized Rental Harmony

Rental Harmony is the problem of assigning rooms in a rented house to te...
12/31/2019 ∙ by Erel Segal-Halevi, et al. ∙ 0

• ### Prisoners, Rooms, and Lightswitches

We examine a new variant of the classic prisoners and lightswitches puzz...
09/18/2020 ∙ by Daniel M. Kane, et al. ∙ 0

• ### Good pivots for small sparse matrices

For sparse matrices up to size 8 × 8, we determine optimal choices for p...
06/02/2020 ∙ by Manuel Kauers, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

In traditional search, a group of searchers (modeled as mobile autonomous agents or robots) may collaboratively search for an exit (or target) placed within a given search domain [1, 2, 17]. Although the searchers may have differing capabilities (communication, perception, mobility, memory) search algorithms, previously employed, generally make no distinction between them as they usually play identical roles throughout the execution of the search algorithm and with respect to the termination time (with the exception of faulty robots, which also do not contribute to searching). In this work we are motivated by real-life safeguarding-type situations where a number of agents have the exclusive role to facilitate the execution of the task by a distinguished entity. More particularly, we introduce and study Priority Evacuation, a new form of search , under the wireless communication model, in which the search time of the algorithm is measured by the time it takes a special searcher, called the queen, to reach the exit. The remaining searchers in the group, called servants, are participating in the search but are not required to exit.

### 1.1 Problem Definition of Priority Evacuation (Pen)

A target (exit) is hidden in an unknown location on the unit circle. The exit can be located by any of the robots (searchers) that walks over it (). Robots share the same coordinate system, start from the center of the circle, and have maximum speed 1. Among them there is a distinguished robot, called the queen, and the remaining robots are referred to as servants. All servants are known to the queen by their identities. Robots may run asymmetric algorithms, and can communicate their findings wirelessly and instantaneously (each message is composed by an identity and a location). Only the queen is required to be able to receive messages. Feasible solutions to this problem are evacuation algorithms, i.e. robots’ movements (trajectories) that guarantee the finding of the hidden exit. The cost of an evacuation algorithm is the evacuation time of the queen, i.e., the worst case total time until the queen reaches the exit. None of the servants needs to evacuate.

### 1.2 Related work

Related to our work is linear search which refers to search in an infinite line. There have been several interesting studies attempting to optimize the search time which were initiated with the influential works of Bellman [7] and Beck [6]. A long list of results followed for numerous variants of the problem, citing which is outside the scope of this work. For a comprehensive study of seminal search-type problems see [2, 3].

The problem of searching in the plane by one or more searchers, has been considered by [4, 5]. The unit disk model considered in our present paper is a form of two-dimensional search that was initiated in the work of [10]. In this paper the authors obtained evacuation algorithms in the wireless and face-to-face communication models both for a small number of robots as well optimal asymptotic results for a large number of robots. Additional evacuation algorithms in the face-to-face communication model were subsequently analyzed for two robots in [13] and later in [8]. Other variations of the problem include the case of more than one exit, see [9] and [16], triangular and square domains in [14], robots with different moving speeds [15], and evacuation in the presence of crash or byzantine faulty robots [11].

Notably, all relevant previous work in search-type problems considered the objective of minimizing the time it takes either by the first or the last agent to reach the hidden target. In contrast, this paper considers an evacuation (search-type) problem where the completion time is defined with respect to a distinguished mobile agent, the queen, while the remaining servants are not required to evacuate. Our current focus is to design efficient algorithms for servants, as well as give strong lower bounds. Notably, the algorithms we propose significantly improve upon evacuation costs induced by naive trajectories, and in fact the trajectories we propose are non-trivial. Our main contribution concerns priority evacuation for each of the cases of servants, all of which require special treatment. Moreover, all our algorithms are characterized by the fact that the queen does contribute effectively to the search of the hidden item. In sharp contrast, the independent and concurrent work of [12] studies the same problem for servants where the queen never contributes to the search. More importantly, the proposed algorithms of [12] admit a unified description and analysis that does not intersect with the current work.

### 1.3 Our Results & Paper Organization

Section 2 introduces necessary notation and terminology and discusses preliminaries. Section 3 is devoted to upper bounds for PE for servants (see Subsections 3.13.2, and 3.3, respectively). All our upper bounds are achieved by fixing optimal parameters for families of parameterized algorithms. In Section 4 we derive lower bounds for PE, . An interesting corollary of our positive results is that priority evacuation with servants (i.e. with searchers) can be performed strictly faster than ordinary evacuation with robots where all robots have to evacuate. Indeed, an argument found in [10] can be adjusted to show that the evacuation problem with robots cannot be solved faster than . Surprisingly, when one needs to evacuate only one designated robot, the task can provably (due to our upper bounds) be executed faster. All our results, together with the comparison to the lower bounds of [10], are summarized in Table 1. We conclude the paper in Section 5 with a discussion of open problems.

## 2 Notation and Preliminaries

We use to denote the number of servants, and we set . Queen and servant will be denoted by and , respectively, where . We assume that all robots start from the origin of a unit circle in . As usual, points in

will be treated, when it is convenient, as vectors from

to , and will denote the euclidean norm of that vector.

### 2.1 Problem Reformulation & Solutions’ Description

Robots’ trajectories will be defined by parametric functions , where are continuous and piecewise differentiable. In particular, search algorithms for all robots will be given by trajectories

 Sn:={Q(t),{Si(t)}i∈[n]},

where will denote the position of and , respectively, at time .

###### Definition 2.1 (Feasible Trajectories).

We say that trajectories are feasible for PE if:

1. , for all ,

2. induce speed-1 trajectories for respectively, and

3. there is some time , such that each point of the unit circle is visited (searched) by at least one robot in the time window . We refer to the smallest such as the search time of the circle.

Note that feasible trajectories do indeed correspond to robots’ movements for PE in which, eventually the entire circle is searched, and hence the search time is bounded. We will describe all our search/evacuation algorithms as feasible trajectories, and we will assume that once the target is reported, will go directly to the location of the exit.

For feasible trajectories with search time , and for any trajectory (either of the queen or of a servant), we denote by the subinterval of that contains all such that (i.e. the robot is on the the circle) and no other robot has been to before. Since robots start from the origin, it is immediate that . With this notation in mind, note that the exit can be discovered by some robot , say at time , only if . In this case, the finding is instantaneously reported, so goes directly to the exit, moving along the corresponding line segment between her current position and the reported position of the exit . Hence, the total time that needs to evacuate equals

 x+∥Q(x)−F(x)∥.

Therefore, the evacuation time of feasible trajectories to PE is given by expression

 maxF∈Snsupx∈I(F){x+∥Q(x)−F(x)∥}.

Notice that for “non-degenerate” search algorithms for which the last point on the circle is not searched by alone, the previous maximum can be simply computed over the servants, i.e the evacuation cost will be

 maxi∈[n]supx∈I(Si){x+∥Q(x)−Si(x)∥}. (1)

In other words, we can restate PE as the problem of determining feasible trajectories so as to minimize (1).

### 2.2 Useful Trajectories’ Components

Feasible trajectories induce, by definition, robots that are moving at (maximum) speed 1. The speed restriction will be ensured by the next condition.

###### Lemma 2.2.

An object following trajectory has unit speed if and only if

 (f′(t))2+(g′(t))2=1,  ∀t≥0.

Proof: For any , the velocity of is given by , and its speed is calculated as . ∎

Robots’ trajectories will be composed by piecewise smooth parametric functions. In order to describe them, we introduce some further notation. For any , we introduce abbreviation for point . Next we introduce parametric equations for moving along the perimeter of a unit circle (Lemma 2.3), and along a line segment (Lemma 2.4).

###### Lemma 2.3.

Let and . The trajectory of an object moving at speed 1 on the perimeter of a unit circle with initial location is given by the parametric equation

 C(b,σt):=(cos(σt+b),sin(σt+b)).

If the movement is counter-clockwise (ccw), and clockwise (cw) otherwise.

Proof: Clearly, . Also, it is easy to see that , i.e. the object is moving on the perimeter of the unit circle. Lastly,

 (ddtcos(σt+b))2+(ddtsin(σt+b))2=σ2(−sin(σt+b))2+σ2(cos(σt+b))2=1,

so the claim follows by Lemma 2.2. ∎

###### Lemma 2.4.

Consider distinct points in . The trajectory of a speed 1 object moving along the line passing through and with initial position is given by the parametric equation

 L(A,B,t):=(b1−a1∥A−B∥t+a1,b2−a2∥A−B∥t+a2).

Proof: It is immediate that the parametric equation corresponds to a line. Also, it is easy to see that and , i.e. the object starts from , and eventually visits . As for the object’s speed, we calculate

 (ddt(b1−a1∥A−B∥t+a1))2+(ddt(b2−a2∥A−B∥t+a2))2=(b1−a1∥A−B∥)2+(b2−a2∥A−B∥)2=1

so, by Lemma 2.2, the speed is indeed 1. ∎

Robots trajectories will be described in phases. In each phase, robot, say , will be moving between two explicit points, and the corresponding trajectory will be implied by the previous description, using most of the times Lemma 2.3 and Lemma 2.4. We will summarize the details in tables of the following format.

Robot F # Description Trajectory Duration 0 F(t) t0 1 F(t) t1 ⋮ ⋮

Phase 0 will usually correspond to the deployment of from the origin to some point of the circle. Also, for each phase we will summarize it’s duration. With that in mind, trajectory during phase , with duration , will be valid for all with .

Lastly, the following abbreviation will be useful for the exposition of the trajectories. For any and , we introduce notation

 K(θ,ρ):=(1−ρ)Cπ−θ+ρC−θ.

In other words, is a convex combination of antipodal points of the unit circle, i.e. it lies on the diameter of the unit circle passing through these two points. Moreover, it is easy to see that , and hence

 ∥K(θ,ρ)−C−θ∥=2−2ρ.

As it will be handy later, we also introduce abbreviation

 AK(θ,ρ):=∥Cπ−K(θ,ρ)∥.

The choice of the abbreviation is clear, if the reader denotes by .

### 2.3 Critical Angles

The following definition introduces a key concept. In what follows, abstract trajectories will be assumed to be continuous and differentiable, which in particular implies that corresponding velocities are continuous.

###### Definition 2.5 (Critical Angle).

Let denote the trajectory of a speed-1 object, where . For some point , we define the -critical angle at time to be the angle between the velocity vector and vector , i.e. the vector from to .

###### Theorem 2.6.

Consider trajectories of two speed-1 objects , where . Let also denote the -critical angle and the -critical angle at time , respectively. Then is strictly increasing if , strictly decreasing if , and constant otherwise.

Theorem 2.6 is an immediate corollary of the following lemma.

###### Lemma 2.7.

Consider trajectories and their critical angles , as in the statement of Theorem 2.6. Then

 ddt∥Q(t)−S(t)∥=cos(ϕ)+cos(θ).

Proof: For any fixed , let denote , and denote points , respectively. Denote also by the velocities of at time , respectively, i.e. . See also Figure 1.

With that notation, observe that . Since , we see that

 projSQu=cos(ϕ)d−−→SQ

and

 projSQv=cos(θ)d−−→QS.

Now consider two imaginary objects , with corresponding velocities and . It is immediate that .

In particular, is the projection of the relative velocities of on the line segment connecting . As such, the distance between changes at a rate determined by velocity

 projSQu−projSQv=cos(ϕ)+cos(θ)d−−→SQ,

where . Moreover, are antiparallel iff and only if , in which case the two objects come closer to each other. ∎

## 3 Upper Bounds

### 3.1 Evacuation Algorithm for Pe1

This subsection is devoted in proving the following.

###### Theorem 3.1.

Consider the real function , and denote by the solution to equation

 f(f(α−sin(α)))=sin(α),

with . Then PE can be solved in time .

The value of is well defined in the statement of Theorem 3.1. Indeed, by letting , we observe that is continuous, while and , hence there exists with .

In order to prove Theorem 3.1, and given parameters , we introduce the family of trajectories , see also Figure 2.

Algorithm
 Robot # Description Trajectory Duration Q 0 Move to point Cπ L(O,Cπ,t) 1 1 Search circle ccw till point C−α C(π,t−1) π−α 2 Move to point C−α+β, L(C−α,C−α+β,t−(1+π−α)) 2sin(β/2) 3 Search circle cw till point C−α C(β−α,1+π−α+2sin(β/2)−t) β S1 0 Move to point Cπ L(O,Cπ,t) 1 1 Search circle cw till point Cβ−α C(π,−t+1) π+α−β

Partitioning the circle clockwise, we see that the arc with endpoints is searched by , while the remaining of the circle is searched by . Therefore, robots’ trajectories in are feasible, and it is also easy to see that they are continuous as well. The search time equals , as well as

An illustration of the above trajectories for certain values of can be seen in Figure 2.

First we make some observations pertaining to the monotonicity of the evacuation cost.

###### Lemma 3.2.

Assuming that and that , the evacuation cost of is monotonically increasing if the exit is found by during ’s phase 1 and monotonically decreasing if the exit is found by during ’s phase 2.

Proof: Suppose that the exit is found by during ’s phase 1, i.e. at time after robots start searching for the first time, where . It is easy to see that the critical angles between are both equal to . But then . Hence, by Theorem 2.6, the evacuation cost is decreasing in this case.

Now suppose that the exit is found by during ’s phase 2, i.e. at time after starts moving along the chord with endpoints , where . If denote the critical angles, then it is easy to see that and that . Since , Theorem 2.6 implies that the evacuation cost is initially decreasing in this phase. For the remaining of ’s phase 2, it is easy to see that both are decreasing in , hence is increasing in , hence, the evacuation cost will remain decreasing in this phase. ∎

Now we can prove Theorem 3.1 by fixing certain values for parameters of . In particular, we set as in the statement of Theorem 3.1, and . The trajectories of the robots, for the exact same values of the parameters, can be seen in Figure 2.

Proof: [Proof of Theorem 3.1]
Let be as in the statement of Theorem, and set . We argue that the worst evacuation time of is . Note that for the given values of the parameters, we have that , that , and that .

First we observe that if the exit if found by , then the worst case evacuation time is incurred when the exit is found just before stops searching, that is

 E0(α0,β0)=1+π−α0+2sin(β0/2)+β0.

Next we examine some cases as to when the exit is found by . If the exit is found by during the 1st phase of , then the evacuation time is, due to Lemma 3.2, given as

Recall that , and so, again by Lemma 3.2 we may omit the case that the exit is found by while is at phase 2. The end of ’s phase 2 happens at time , when have that , and , and both robots are intending to search ccw. Condition says that will finish searching prior to , and this happens when reaches point . During this phase, the distance between stays invariant and equal to . We conclude that the cost in this case would be

 E2(α0,β0)=1+π+α0−β0+2sin(α0−β0/2−sin(β0/2)).

Then, we argue that that the choice of guarantees that , as wanted.

Indeed, implies that . But then, we can rewrite as

 E2(α0,β0)=1+π+α0−β0+2sin(α0−sin(α0)).

Equating the last expression with implies that

 β0/2=α0−sin(α0)+sin(α0−sin(α0))=f(α0−sin(α0)).

Substituting twice in the already derived condition implies that

 f(f(α−sin(α0)))=sin(α0).

Figure 2 depicts the worst placements of the exit, along with the trajectories of the queen (in dashed green lines) after the exit is reported. ∎

It should be stressed that ’s Phases 2,3 are essential for achieving the promised bound. Indeed, had we chosen , the worst case evacuation time would have been

 sup1≤x≤1+π{x+∥Q(x)−S1(x)∥}=sup0≤x≤π{1+x+2sin(x)}.

The maximum is attained at (and indeed, both critical angles in this case are and in particular ), inducing cost . The latter is the cost of the evacuation algorithm for two robots without priority of [10].

### 3.2 Evacuation Algorithm for Pe2

In this subsection we prove the following theorem.

###### Theorem 3.3.

PE can be solved in time 3.8327.

Given parameters , we introduce the family of trajectories , see also Figure 3.

Algorithm
 Robot # Description Trajectory Duration Q 0 Move to point Cπ−α L(O,Cπ−α,t) 1 1 Search the circle ccw till point Cπ C(π−α,t−1) α 2 Move to point K(α/2,ρ) L(Cπ,K(α/2,ρ),t−(1+α)) AK(α/2,ρ) 3 Move to point C−α/2 L(K(α/2,ρ),C−α/2) 2−2ρ S1 0 Move to point Cπ−α L(O,Cπ−α) 1 1 Search the circle cw till point C−α/2 C(π−α,−t+1) π−α/2 S2 0 Move to point Cπ L(O,Cπ) 1 1 Search the circle cw till point C−α/2 C(π,t−1) π−α/2

Notice that, by definition of , robots’ trajectories are continuous and feasible, meaning that the entire circle is eventually searched. Indeed, partitioning the circle clockwise, we see that: the arc with endpoints is searched by , the arc with endpoints is searched by , and the arc with endpoints is searched by .

It is immediate from the description of the trajectories that the search time is . Moreover

 I(Q)=[1,1+α], I(S1)=I(S2)=[1,1+π−α/2].

An illustration of the above trajectories for certain values of can be seen in Figure 3. Now we make some observations, in order to calculate the worst case evacuation time.

###### Lemma 3.4.

Suppose that . Then is continuous and differentiable in the time intervals of ’s phases 1,2,3, respectively. Moreover, the worst case evacuation time of can be computed as

where

 I2=[1+α,1+α+AK(α/2,ρ)],I3=[1+α+AK(α/2,ρ),3−2ρ+α+AK(α/2,ρ)].

Proof: Note that the line passing through and , call it , has the property that each point of it, including is equidistant from . Moreover, in the time window that only are searching, stays below line . At time , is, by construction, equidistant from , a property that is preserved for the remaining of the execution of the algorithm. As a result, the evacuation time of is given by .

Now note that condition guarantees that reaches point no later than . Moreover, in each time interval , ’s trajectory is differentiable (and so is ’s trajectory). ∎

Now Theorem 3.3 can be proven by fixing parameters for , in particular, . Notably, the performance of is provably improvable (slightly) using a technique we will describe in the next section.

Proof: [Proof of Theorem 3.3] We choose . The trajectories of Figure 3 correspond exactly to those values. The time that needs to reach equals , while the time that reach the same point is . Hence, Lemma 3.4 applies.

The worst case evacuation time during phase 1 is . The worst case evacuation time after reaches , equals . Hence, it remains to compute the maxima of in the two intervals , which can be done numerically using the trajectories of , since expression is differentiable in each of the intervals.

To that end, when we have that

 Q(t) =(0.9931t−2.62481,0.191866−0.11727t) S1(t) =(cos(3.50549−t),sin(3.50549−t)),

so that becomes

 t+√(−sin(3.50549−t)−0.11727t+0.191866)2+(−cos(3.50549−t)+0.9931t−2.62481)2

When we have that

 Q(t) =(0.949847t−2.48613,0.818501−0.312715t)

while ’s trajectory equation remains unchanged, so that becomes

 t+√(−sin(3.50549−t)−0.312715t+0.818501)2+(−cos(3.50549−t)+0.949847t−2.48613)2

In particular, it follows that

with corresponding maximizers (with approximate values) and , respectively. Figure 3 also depicts the locations of the optimizers, i.e the worst case locations on the circle for the exit to be found, along with the corresponding evacuation trajectory in dashed green colour. ∎

### 3.3 Evacuation Algorithm for Pe3

#### 3.3.1 A Simple Algorithm

In this section we prove the following preliminary theorem (to be improved in Section 3.3.2).

###### Theorem 3.5.

PE can be solved in time 3.37882.

Given parameters , we introduce the family of trajectories , corresponding to robots , see also Figure 4.

Algorithm
 Robot # Description Trajectory Duration Q 0 Move to point Cπ−α L(O,Cπ−α,t) 1 1 Search the circle ccw till point Cπ C(π−α,t−1) α 2 Move to point K(α+β2,ρ) L(Cπ,K(α+β2,ρ),t−(1+α)) AK(α+β2,ρ) 3 Move to point C−α+β2 L(K(α+β2,ρ),C−α+β2) 2−2ρ S1 0 Move to point Cπ−α−β L(O,Cπ−α−β) 1 1 Search the circle cw till point C−α+β2 C(π−α−β,−t+1) π−α+β2 S2 0 Move to point Cπ L(O,Cπ) 1 1 Search the circle ccw till point C−α+β2 C(π,t−1) π−α+β2 S3 0 Move to point Cπ−α−β L(O,Cπ−α−β) 1 1 Search the circle ccw till point C−α C(π−α−β,−t+1) β

As before, it is immediate that, in , robots’ trajectories are continuous and feasible, meaning that the entire circle is eventually searched. In particular, the arc with endpoints is searched by , the arc with endpoints is searched by , the arc with endpoints is searched by , and the arc with endpoints is searched by . Also, the search time is , and

 I(Q)=[1,1+α], I(S1)=I(S2)=[1,1+π−α+β2], I(S3)=[1,1+β].

An illustration of the above trajectories for certain values of can be seen in Figure 4.

Before we prove Theorem 3.5, we need to make some observation, in order to calculate the worst case evacuation time.

###### Lemma 3.6.

Suppose that , , and . Then the following functions are continuous and differentiable in each associated time intervals: in , in and in . Moreover, the worst case evacuation time of can be computed as

Proof: Conditions and mean that stops searching no later than , and that when stops searching is still in her phase 2, respectively.

The line passing through and , call it , has the property that each point of it, including is equidistant from . Moreover, while are searching, never goes above line . At time , is, by construction, equidistant from , a property that is preserved for the remaining of the execution of the algorithm. As a result, can be ignored in the performance analysis, and when it comes to the case that finds the exit, the evacuation cost is given by the supremum of in the time interval or in the interval . Note that in both intervals, the evacuation cost is continuous and differentiable, by construction.

If the exit is reported by then the evacuation cost is for . However, it is easy to see that the cost is strictly increasing for all (in fact it is linear). Since the evacuation cost is also continuous, we may restrict the analysis in interval .

Lastly, observe that implies that reach point no earlier than . Hence waits at till the search of the circle is over, which can be easily seen to induce the worse evacuation time after reaches . ∎

Next, we prove Theorem 3.5 by fixing parameters for .

Proof: [Proof of Theorem 3.5] We choose