Parallelizing Depth-First Search for
Robotic Graph Exploration
A thesis presented
by
Chelsea Zhang
To
Applied Mathematics
in partial fulfillment of the honors requirements
for the degree of
Bachelor of Arts
Harvard College
Cambridge, Massachusetts
April 1, 2010
Abstract
The collective behavior of robot swarms outfits them for comprehensive search of an environment,
which is useful for terrain mapping, crop pollination, and related applications. We study efficient
mapping of an obstacle-ridden environment by a collection of robots. We model the environment
as an undirected, connected graph and require robots to explore the graph—to visit all nodes and
traverse all edges. In this thesis, we present a graph exploration algorithm that parallelizes depthfirst search, so that each robot completes a roughly equal part of exploration. Through simulation,
we show our parallel algorithm attains close to linear speedup when robots are able to disperse in
the graph. We also provide experimental validation of a result from percolation theory.
i
Acknowledgements
I am indebted to Michael Mitzenmacher and Matt Welsh for their guidance on this project. Their
advice on formulating research problems, performing experiments, pairing results with theory, and
presenting this document has been invaluable. I am also grateful to Radhika Nagpal, Nicholas Hoff,
and Brian Young for their helpful suggestions.
ii
Contents
1 Introduction
1.1 Motivation . . . . . . . . . . .
1.2 Outline . . . . . . . . . . . . .
1.3 The context: swarm robotics .
1.4 Informal model . . . . . . . . .
1.4.1 Assumptions . . . . . .
1.4.2 Justification and caveats
1.5 High-level approach . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2 Background
2.1 Exploration algorithms for physical space
2.1.1 Random walks on graphs . . . . .
2.1.2 Algorithms by graph type . . . . .
2.1.3 Adding a power constraint . . . . .
2.2 Depth-first search by parallel processors .
2.3 Swarm-inspired optimization algorithms .
2.3.1 Ant Colony Optimization . . . . .
2.3.2 Particle Swarm Optimization . . .
3 Algorithm
3.1 Formal model . . . . . . .
3.2 Approach . . . . . . . . .
3.3 Basic algorithm . . . . . .
3.3.1 Correctness . . . .
3.3.2 Efficiency analysis
3.3.3 Remarks . . . . . .
3.4 Algorithm with relocation
3.4.1 Remarks . . . . . .
3.5 Simulation method . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
iii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
2
2
4
4
5
6
.
.
.
.
.
.
.
.
7
7
8
9
12
13
15
15
16
.
.
.
.
.
.
.
.
.
19
19
21
23
26
28
30
31
34
35
4 Results
4.1 Graph size after edge removal: an application of percolation
4.1.1 Percolation on infinite graphs . . . . . . . . . . . . .
4.1.2 Percolation on finite graphs . . . . . . . . . . . . . .
4.1.3 Estimating P∞ experimentally . . . . . . . . . . . .
4.1.4 Graph size after edge removal . . . . . . . . . . . . .
4.2 Simulation results . . . . . . . . . . . . . . . . . . . . . . .
4.2.1 The advantage of relocation . . . . . . . . . . . . . .
4.2.2 More edges are better . . . . . . . . . . . . . . . . .
4.2.3 Bigger graphs are better . . . . . . . . . . . . . . . .
4.2.4 Algorithm performance on other graph structures . .
4.2.5 General principles . . . . . . . . . . . . . . . . . . .
5 Conclusions
theory
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
37
37
38
40
41
44
47
48
49
50
52
53
54
iv
Chapter 1
Introduction
1.1
Motivation
We address the problem of using a swarm of flying microrobots to perform collective actions, such
as pollination of crops and mapping of complex environments. These actions require that the
environment be explored. A robot swarm is well adapted to the task of exploration, as the work
can be divided among many robots, and the swarm can succeed even if some robots fail.
As a motivating example, we consider the task of exploring a field of crops that will subsequently
be pollinated. Conducting exploration first is useful because once the robot swarm has mapped
the field entirely, it can determine best paths to crops. It is important to investigate an artificial
alternative to natural pollination because bee populations are currently in decline [29], a problem
that threatens the world’s food supply. In fact, the Harvard RoboBees project aims to build a
colony of small, autonomously flying robotic bees that can accomplish pollination [22].
Our objective is to have robots map an unfamiliar environment that may contain obstacles. We
model the environment as an undirected, connected graph whose structure is determined by the
presence of obstacles. We want the robots to fully explore the graph—to visit all nodes and traverse
1
all edges. We seek an algorithm that minimizes the time required for exploration. Specifically, we
are concerned with the speedup of the algorithm when more robots are introduced—the ratio of the
exploration time for a single robot to the exploration time for multiple (k) robots. A speedup of k
is desirable; we call this linear speedup.
1.2
Outline
In this thesis, we show that a parallel depth-first search strategy can achieve nearly linear speedup
when robots are sufficiently able to disperse. Robots are best able to disperse in large environments
with low obstacle density and many neighboring locations to a given location.
The remainder of this section gives an overview of swarm robotics and describes our model of
robots and environment. Section 2 examines several classes of algorithms: swarm-inspired algorithms that search a solution space; algorithms that search physical space, with a focus on graph
exploration; and depth-first search algorithms for parallel processors. In Section 3 we state our
model formally, present a basic version of our graph exploration algorithm, PDFS, and show it is
susceptible to bottlenecks. We improve PDFS by allowing some repeated edge traversals, producing the algorithm PDFS-RELOC. Section 4 gives the results of simulating our algorithms, analyzes
how exploration time varies with robots’ dispersal ability, and validates the graphs we generate in
simulation. Section 5 offers directions for future work.
1.3
The context: swarm robotics
The study of swarm robotics is inspired by the collective behavior of biological swarms—the foraging
behavior of social insects, the flocking behavior of birds and schools of fish, and so forth. The central
idea in swarm robotics is that a large group of autonomous, limited-capability robots with no central
controller follows a set of rules to achieve large-scale, cooperative behavior. Cao et al define a multi-
2
robot system to exhibit cooperative behavior if some mechanism of cooperation causes the total
utility of the system to increase [11].
Robot swarms are advantageous because there exist tasks achievable by multiple robots but
not by a single robot. Moreover, robot swarms are fault-tolerant: in many applications a swarm
of many simple, low-cost robots has a greater success probability than one powerful, high-cost
robot. Robot swarms are well suited to tasks in remote or hazardous environments, such as searchand-rescue and toxic waste cleanup [11]. Robot swarms are also useful for material transport and
object assembly. Often, these applications require robot swarms to self-organize into predefined
spatial patterns. A body of work has focused on the pattern formation problem [34]; Gordon et
al developed a method of inter-agent communication during pattern formation that resembles the
“waggle dance” bees perform to communicate locations of food sources [21].
To characterize the rules that robots in a swarm follow, we look to Mataric’s basis behaviors
for multi-agent interactions [27]. Mataric proposes five behaviors that govern local interactions and
produce global behavior: safe-wandering, dispersion, aggregation, following and homing. Agents
that safe-wander are moving without colliding into obstacles or one another. Agents disperse by
spreading out until they satisfy a minimum inter-agent distance, and aggregate by moving together
until they satisfy a maximum inter-agent distance. An agent may follow another. A homing agent
is navigating to a specific location.
Our application, environment mapping, illustrates the advantages of swarm robotics: a robot
swarm would accomplish the task faster than a single robot, and it would likely succeed even if a few
robots fail in the process. Mapping also illustrates the use of Mataric’s basis behaviors. To speed up
exploration, robots should disperse into different regions of the environment and then safe-wander.
Robots return to a central location to exchange information and refuel; for this purpose they enter
homing mode.
3
1.4
1.4.1
Informal model
Assumptions
We solve the following problem: given a colony of robots, map the environment in minimum time.
In our model, the environment is an undirected, connected graph whose nodes represent locations in the environment. Edges represent the ability to move directly from one location to another:
an edge does not exist between adjacent locations if an obstacle separates them, and does exist
otherwise. Between each pair of adjacent locations, an obstacle exists with constant probability.
We begin by assuming the graph is a square lattice with edges removed where obstacles appear;
later we consider other graph structures.
A colony of homogeneous robots resides at a hive, located at some node. The hive is a central
authority capable of assigning robots to tasks, directing robot movement and refueling robots.
Importantly, the hive is responsible for building a map of the environment; we assume the hive has
unlimited computational power.
Exploration begins with all robots at the hive. An unlimited number of robots may occupy
a node simultaneously. At each timestep, each robot starts at a node and traverses an edge as
instructed by the hive. We have implictly assumed robots have perfect odometry—they know their
exact change in position at every step. This implies robots always know their coordinates relative
to the hive; they have perfect localization. We may thus regard all nodes as being labeled by their
coordinates.
Exploration should terminate when the hive knows all nodes and all edges. To this end, at each
step all robots transmit their locations back to the hive and notify the hive of any crops detected.
The hive augments its map with all nodes and edges learned in this step. We assume the robots
are capable of global communication, so that all robots may communicate instantaneously with the
hive at any time.
4
Finally, we assume each robot has an unlimited power supply. At no point in the exploration
do robots need to return to the hive and recharge.
1.4.2
Justification and caveats
By modeling the environment as a grid graph, we confine ourselves to a finite set of locations and a
finite set of possible moves at any given location. This greatly simplifies the exploration algorithm.
A grid graph is not an unrealistic model of two-dimensional space, since we can discretize continuous
space to an arbitrary degree of precision. We assume the graph is connected to ensure all locations
are reachable from the hive. Furthermore, by assuming edges are undirected, we allow robots to
move in either direction along any edge. This is more realistic than assuming directed edges, which
would produce graphs in which an edge is traversable in one direction but blocked in the other
direction.
Our other assumptions are less realistic. It is unlikely that every edge is blocked with the same
probability, as obstacles often follow non-random patterns. We cannot expect an unlimited number
of robots to fit into one physical location. We also cannot require odometry and localization of
real-world robots. One way to overcome this difficulty is to enable robots to sense targets (hive,
crops) at a distance and hone in on them. Realistically, robots are capable of local, not global,
communication because their radios have limited range. A real-world implementation may position
robots strategically during exploration so that a faraway robot can relay information back to the
hive. Finally, the assumption that robots have infinite power is clearly unfeasible. Unless robots
have some means of generating power themselves, they must refuel periodically at the hive in any
real-world implementation.
Still, our assumptions simplify the problem to a tractable one. After we have developed an
algorithm for this basic version of the problem, it is relatively straightforward to relax certain
assumptions and revise the algorithm to accommodate them.
5
Note the robots in our model do not exhibit swarm intelligence in the strict sense: instead of a
decentralized swarm, we have a hive acting as a central controller. As we will see, it is natural to
make the hive a comprehensive repository of information, and thus natural for the hive to decide
how robots should conduct exploration.
1.5
High-level approach
For our multi-robot graph exploration problem, we develop a parallel version of depth-first search
(DFS). Robots take unexplored edges when they are available and backtrack when they are not.
Our algorithm disperses robots into different regions of the graph, where they each perform DFS
individually. When robots encounter one another at a node, they attempt to disperse. To minimize
the exploration time, we generally aim to minimize redundant edge traversals, or multiple traversals
of the same edge. However, we allow some redundant edge traversals in order to relocate robots
in explored regions of the graph to unexplored regions. We simulate our algorithm in multiple
environments that differ in the freedom they give robots to disperse.
6
Chapter 2
Background
In this section, we survey previous work on robotic search of an environment. Section 2.1 reviews
algorithms for one or more robots exploring a physical environment, often modeled as a graph.
The parallelization of one graph exploration technique, depth-first search, for parallel processors
is treated in Section 2.2. Section 2.3 gives an overview of algorithms that search an optimization
space with virtual swarms; these algorithms have been applied to physical search by robot swarms.
2.1
Exploration algorithms for physical space
Several authors have considered the problem of learning an unknown environment with one or
more robots. Deng et al develop an algorithm in which a single robot maps a rectilinear room
with a bounded number of obstacles [13]. Whereas Deng et al require the robot to see all visible
points in the environment to learn a map, other authors discretize the environment into a grid and
require robots to cover all grid points [10, 26]. Burgard et al seek to cover the grid with multiple
robots in minimum time; robots move toward target points according to a utility maximization that
spreads them out [10]. Koenig and Liu present and simulate robust methods for terrain coverage
by limited-capability robots, where the terrain is modeled as a grid graph [26].
7
The algorithms that follow explicitly address the graph exploration problem: they build a map
of a previously unknown graph by exploring all of its nodes and edges. Some algorithms are designed
for a single robot; others are designed for multiple robots. In all algorithms reviewed, undirected
graphs are connected and directed graphs are strongly connected, so that exploration starting from
any node can reach all nodes.
2.1.1
Random walks on graphs
A simple strategy for exploring a graph is to have robots independently perform random walks
until all nodes have been visited. That is, at each step of exploration, a robot moves from a node
to any of its neighbors with equal probability. The cover time is the expected time until all nodes
have been visited at least once. Previous work [3, 12] has focused on the speedup produced by
multiple random walks in undirected graphs, where
speedup =
cover time of single random walk
cover time of k random walks
(2.1)
A speedup of k is called linear ; linear speedup is desirable. Alon et al showed that k random
walks achieve linear speedup on several graph types, including d-dimensional grids for d ≥ 2 and
complete graphs, when k is sufficiently small [3]. They conjectured that for general graphs, speedup
is at most linear and at least logarithmic in k. Cooper et al showed linear speedup occurs on random
r-regular graphs [12].
Cooper et al also considered interactions between agents performing random walks on random
r-regular graphs with n nodes. Suppose k predators are performing random walks, and l prey
individuals are located at random nodes. The expected extinction time—the time required for the
predators to encounter all prey—is
Θr Hl
k n,
where Θr =
r−1
r−2
and Hl is the lth harmonic number.
Our problem is somewhat analogous: if we equate robots with predators and crops with prey, the
extinction time is the time needed for the robots, walking randomly, to discover all crops. Cooper’s
8
result would apply directly to our problem if our graphs were random regular graphs. But we do
not use random regular graphs; we use subgraphs of the square grid, a specific 4-regular graph.
Random walks are useful when robots have no means of coordinating graph exploration. This is
not the case in our problem. Since we assume global communication between robots, our algorithm
is able to plan how individual robots will contribute to graph exploration. This added capability
implies we may devise an algorithm that explores a graph faster than independent random walks.
In fact, the cover time for a two-dimensional grid by a single random walk is Θ(n log2 n) [3]. A
single depth-first search (DFS) requires 2|E| ∈ Θ(n) steps to cover the same graph. We can do
better than a random walk; the next section explores more sophisticated algorithms that involve
planning.
2.1.2
Algorithms by graph type
The algorithms we present in this section are adapted for various graph environments. Our graphs
vary along two axes: whether edges are directed or undirected, and whether nodes are labeled
or unlabeled. Nodes are labeled if each node contains information that uniquely identifies it, and
unlabeled otherwise. Put another way, a graph has labeled nodes if a robot can recognize a node
it has visited previously. In graphs with unlabeled nodes, a robot cannot distinguish two nodes of
equal degree without extra information. As we will see, the environment most amenable to efficient
exploration is an undirected, connected graph with labeled nodes.
Undirected edges, labeled nodes
The well-known DFS algorithm traverses undirected graphs with labeled nodes, making 2|E| edge
traversals—two along every edge. It is possible to reduce the number of edge traversals below
that performed by DFS; Panaite and Pelc present a single-robot algorithm that performs at most
|E| + 3|V | edge traversals [30]. In DFS, backtracking occurs according to the temporal order in
9
which nodes were visited. The distance covered while backtracking often exceeds the distance
between the node where backtracking begins and the next unvisited node that DFS visits. To
eliminate this inefficency, Panaite and Pelc modified backtracking so that it occurs along edges of
a dynamically constructed spanning tree.
Dessmark and Pelc studied whether there are single-robot algorithms better than DFS when
the robot is given some information about the graph [16]. They evaluate an algorithm A by its
overhead, which they define as
overhead =
worst-case number of edge traversals under A
optimal number of edge traversals if graph were known
(2.2)
Since any graph traversal requires at least |E| edge traversals, and DFS requires 2|E| edge traversals,
the overhead of DFS is 2. This is the optimal overhead if the robot begins exploration with no
information about the graph [16]. If the robot begins exploration with an unlabeled map of the
graph, and the graph assumes a certain structure (a line or a tree), there exist algorithms with
overhead less than 2. For general graphs, even if the robot is given an unlabeled map, an overhead
of 2 is optimal; thus DFS is a generally optimal algorithm with respect to the authors’ metric.
Undirected edges, unlabeled nodes
Changing the undirected graph to have unlabeled nodes creates a difficulty for robot exploration:
the nodes contain no information to help robots identify previously visited nodes. Map building
requires robots to locate their current nodes within the map or add them to the map as new nodes.
Dudek et al overcome this difficulty by giving robots one or more markers, which will be dropped
at nodes for the purpose of identifying them [17, 18, 19].
Dudek et al begin with a single-robot algorithm that performs O(|V |3 ) edge traversals [17]. In
this algorithm, the robot builds a map as follows: starting at a node in the map (the known graph),
it traverses an unexplored edge and drops a marker at its new location v. It then visits all other
10
nodes in the map to see if v is actually an existing location. The robot updates the map with
the edge just traversed; if v does not exist in the map already, the robot adds it and schedules its
incident edges for future exploration. If the robot has k distinguishable markers, it can explore up
to k edges in one step.
This algorithm generalizes to a multi-robot algorithm: given a group of robots, designate one
robot as a controller, and treat all other robots as markers to be herded [18]. For a small number
of robots, this algorithm has the same runtime as Dudek’s original algorithm. For a large swarm
of robots, where the number of robots far exceeds |V |, Dudek’s multi-robot algorithm has robots
spread out to all nodes for the purpose of uniquely identifying each node. Because these “markers”
are expendable, they do not need to be herded to new locations, which uses up edge traversals.
Then the problem reduces to exploring an undirected graph with labeled nodes, which the controller
robot can solve in O(|V |2 ) steps.
Dudek et al also sketch an exploration algorithm specifically designed for two robots, each
equipped with one marker and capable of Dudek’s single-robot algorithm [19]. Robots begin at a
common node, explore independently by the single-robot algorithm, return to a prearranged node
at a prearranged time, and harmonize their respective maps. After each harmonization, the robots
have the same map of the world. Both of Dudek’s multi-robot algorithms confront the added
challenge of minimal communication ability; robots cannot communicate unless they are at the
same node.
Directed edges, labeled nodes
The challenge of exploring directed graphs is that a robot cannot, in general, move backward
along a path it has taken. In this context, DFS and Dudek’s single-robot algorithm break down.
Algorithms have been devised for exploring directed graphs with labeled nodes [14, 20]. Their
efficiency is evaluated in terms of overhead (Equation 2.2) and deficiency, defined as the minimum
11
number of edges that must be added to make a graph Eulerian, and denoted here by δ. A graph
is Eulerian if it contains a circuit that visits every edge exactly once; equivalently, if the outdegree
of each node equals its indegree.
Deng and Papadimitriou give an exploration algorithm with an overhead of 3(δ + 1)2δ+1 [14].
Fleischer and Trippen improve on this result with an algorithm whose overhead is polynomial in δ;
their algorithm achieves overhead ∈ O(δ 8 |E|) [20]. Both algorithms may be performed by a single
robot.
Directed edges, unlabeled nodes
When the difficulties of directed graphs and unlabeled nodes are combined, algorithms for graph
exploration become much more involved. Bender and Slonim studied exploration of a graph where
every node has outdegree d by two robots capable of global communication [6]. They give a
randomized algorithm that maps the graph with high probability in time O(d2 |V |5 ). The same
type of graph can be explored deterministically in polynomial time by a single robot with a pebble,
as long as the robot knows an upper bound N on |V |, Bender et al show [5]. Their algorithm has
runtime O(d2 N 2 |V |2 ). If N is not known, but the robot has Θ(log log n) pebbles, a deterministic
algorithm exists for exploring the graph.
Although it is remarkable that these algorithms run in polynomial time, running them on
large graphs would be infeasible. The environment that permits algorithms with the most feasible
runtimes is an undirected graph with labeled nodes, explorable by DFS and its more efficient
variants.
2.1.3
Adding a power constraint
Previous work has examined another challenge in the undirected-edges, labeled-nodes setting: a
power constraint that forces the robot to return to the start node periodically for refueling. Graph
12
exploration algorithms that satisfy the power constraint (called piecemeal search algorithms) should
be able to return efficiently to the start node. Breadth-first search (BFS) proceeds in a way that
remains as close to the start node as possible; thus, several authors have found it natural to modify
BFS for this setting [7, 4].
Betke et al restrict their graphs to grid graphs with rectangular obstacles [7]. They give a
single-robot exploration algorithm with runtime O(|E|) that can be converted into a piecemeal
search algorithm with runtime O(|E|). Their algorithm relies on the notion of a wavefront—the
set of all nodes an equal distance from the start node. The robot expands wavefronts one by
one in order of increasing distance from the start node. When the robot expands a wavefront, it
takes unexplored edges parallel to the wavefront just explored. The algorithm is complicated by
obstacles, which can cause wavefronts to split, bend, merge and expire; workarounds for these cases
incur extra edge traversals for the robot.
Awerbuch et al developed a single-robot algorithm for general undirected graphs with labeled
nodes in the presence of a power constraint [4]. The algorithm divides the graph into strips based
on distance from the start node, and recursively divides each strip into sub-strips. To explore a
given strip, the robot performs local BFS searches from a set of start nodes, ensuring that the
BFS trees do not overlap. At this point, the robot has not necessarily finished exploring the strip.
From the connected components formed by the BFS trees, the algorithm computes spanning trees.
The robot then relocates by shortest paths to frontier nodes and repeats the procedure until it has
finished exploring the strip. This recursive algorithm has a runtime of O(|E| + |V |1+o(1) ).
2.2
Depth-first search by parallel processors
From the previous section, DFS is a reasonable approach when the graph to explore is undirected,
with labeled nodes, and the robots face no power constraint—all of which we have assumed in
our formulation of the problem. We now review previous work on speeding up DFS using parallel
13
processors. Rao and Kumar presented and implemented parallel DFS for state-space trees as follows
[31]: the search space is divided into disjoint regions, and each processor searches one region by
DFS. A processor that finishes early requests work from a neighboring processor. The neighboring
processor may donate work by one of several strategies: donate nodes near the root of the statespace tree; donate nodes near a cutoff depth; and donate half the nodes at each level above the
cutoff depth. The authors’ implementation showed “fairly linear speedup” up to 128 processors,
the maximum available.
Rao and Kumar’s parallel DFS algorithm has limited usefulness for graph exploration because
it assumes tree graphs. Trees can be easily partitioned into disjoint regions searchable by individual
robots; if two robots at a node travel along different branches, they will explore disjoint sets of
nodes further down the tree. For general graphs, we cannot assume robots that branch out from a
node in different directions will search disjoint regions. Their paths of exploration may intersect, a
case that Rao and Kumar’s algorithm does not handle.
There has been significant cumulative work on parallel DFS for more general graph types,
focusing on the fact that parallelization allows DFS to be performed in sub-linear time. In other
words, DFS is in NC, the class of problems solvable in O(logc n) time using O(nk ) parallel processors.
Smith showed DFS on planar undirected graphs is in NC by giving an algorithm that executes in
O(log3 n) time on O(n4 ) processors [32]. Improvements by Kao et al demonstrated that DFS on
planar undirected graphs can execute in O(log2 n) time with a sublinear ( logn n ) number of processors
[25]. Aggarwal et al gave randomized algorithms for parallel DFS on general undirected and directed
graphs, showing the most general form of the problem is in randomized NC [1, 2].
However, difficulties arise in converting DFS for parallel processors into DFS for robots. The
above algorithms for parallel processors do not require, as robot exploration does, that DFS occur
along traversable paths. A robot that is requesting work as per Rao’s algorithm cannot teleport to
a donated node; it must travel there. DFS by processors on directed graphs can backtrack when
14
there is a directed edge in the opposite direction but not in the backtracking direction; DFS by
robots cannot. Most importantly, the above algorithms, except for Rao and Kumar’s, rely on the
graph being known in advance—precisely the opposite of our situation. Because Rao and Kumar’s
algorithm does not assume advance knowledge of the graph, it provides a starting point for a
multi-robot graph exploration algorithm.
2.3
Swarm-inspired optimization algorithms
Less relevant to our problem, but central to the study of swarm intelligence, are swarm-based
algorithms for finding optimal solutions in a search space. Here, agents in the swarm are virtual.
The following algorithms have been applied to computational problems as well as problems involving
robotic motion.
2.3.1
Ant Colony Optimization
Among the most well-known swarm-inspired algorithms are optimization algorithms based on ant
foraging [8, 28]. To keep track of best paths to food sources, ants deposit biological markers
called pheromones along their foraging paths. When choosing which paths to follow, ants prefer
paths with higher pheromone levels. The shortest paths to food sources are traveled most often
in expectation, so they eventually collect the most pheromone. Eventually ants travel along the
shortest paths only. Thus, pheromones allow ants to vote on best paths through positive feedback.
This biological process translates into a local search technique, ant colony optimization (ACO),
for problems that can be modeled as finding optimal paths in a graph. The ACO algorithm for the
Traveling Salesman Problem is a canonical example [8]. We give a sketch of ACO that finds a best
path πbest :
15
Initialize pheromone levels of edges
Until termination:
For each ant ak :
Find a path πk , probabilistically preferring edges with higher pheromone levels
Lay a base amount of pheromone along each edge of πk
Find the best path in this iteration, π ∗
Update πbest if π ∗ is better
Lay extra pheromone along each edge of πbest
To avoid getting stuck at local optima, ACO often models pheromone evaporation: at every
timestep, each edge loses some fraction of its pheromone. Thus, only the best paths that persist
over time are selected.
Hoff et al developed ACO-inspired foraging algorithms for a robot swarm capable of only local
communication [24]. Since pheromones allow foraging agents to communicate indirectly, ACObased algorithms do not require global communication between agents. In Hoff’s work, robots
reside in a continuous world with one food source. They depart from a nest, search for the food
source, and carry food back to the nest. Instead of leaving physical pheromone, Hoff’s algorithm
assigns some robots to be stationary beacons that store pheromone values. The remaining robots
forage: they lay pheromone by updating the pheromone values of nearby beacons, and they search
for food by moving toward the beacon within sensing range with the strongest pheromone value.
Hoff presents an improved algorithm in which beacons store not pheromone values but a rough
measure of distance from the food source; foraging robots navigate to the sensable beacon with the
least distance.
2.3.2
Particle Swarm Optimization
Another optimization technique, Particle Swarm Optimization (PSO), searches for optimal solutions to some fitness function based on swarm intelligence [15, 28]. The swarm consists of particles,
16
each of which has a position representing a solution in the search space. To reach new solutions,
particles move through the search space with some velocity. A particle updates its velocity to move
toward the best solutions found by itself and by the swarm so far, balancing local search with global
search. Note that PSO requires global communication between robots. In the following sketch of
PSO, f is the fitness function; particle i has position xi and velocity vi ; x∗i is the best position
found by particle i; and g ∗ is the best position found by the swarm.
Initialize xi and vi for all particles i
Until termination:
For each particle i:
Compute f (xi )
Update x∗i if xi is better
Update g ∗ if xi is better
Update xi and vi based on x∗i and g ∗
PSO is often applied in situations where a swarm of robots searches for a target, such as searchand-rescue problems. In the search-and-rescue formulation of PSO by Songdong and Jianchao,
there is no global fitness function; rather, the target emits a signal, and robots have sensors to
measure signal intensity [33]. Robots seek to maximize the signal as they would maximize a fitness
function. There are two difficulties: robots far away from the target cannot detect the signal, and
robots far away from each other cannot communicate. In the absence of global communication,
each robot updates its velocity based on the experience of itself and its neighbors (all robots within
some fixed distance of it). In the absence of a global signal, a robot searches by moving in a
spiral pattern until it detects the signal; then it hones in on the signal. PSO has been adapted for
multiple-target search; see Derr and Manic [15].
Although ACO and PSO do not apply to our problem of mapping an unknown environment
in minimum time, they are quite relevant to the related problems of search-and-rescue and path
17
planning by robots. Moreover, these optimization algorithms illustrate the power of swarm robotics
to inspire approaches to purely computational problems.
18
Chapter 3
Algorithm
3.1
Formal model
In preparation for the algorithms we present, we formalize the model we described in Section 1.4.
The environment is an undirected graph G = (V, E). An edge {v1 , v2 } ∈ E iff no obstacle separates
v1 and v2 . We require that G is connected so that all nodes are reachable from vh .
The hive controls a set of k robots, R = {r1 , . . . , rk }, that explore G. All robots begin at the
hive node, vh ∈ V . At every step of exploration, the hive directs each robot to traverse a single
edge; each robot traverses its assigned edge and then notifies the hive of which node it reaches.
Since robots have perfect localization, we may consider all nodes in V as being labeled by their
coordinates relative to vh . We have assumed the robot is able to communicate with the hive at
every step; the realization of this assumption is beyond the scope of this thesis.
Based on the edges robots traverse and the nodes where robots end up, the hive gradually builds
a map of G, denoted Gm = (Vm , Em ). Every node visited for the first time is added to Vm ; every
edge traversed for the first time is added to Em . Exploration terminates when Gm is isomorphic
to G—when the colony has learned all nodes and edges. Our problem is to develop an algorithm
19
Algorithms
DFS
PDFS
PDFS-RELOC *
depth-first search
parallel depth-first search
parallel depth-first search with relocation
Constants
G = (V, E)
vh ∈ V
R = {r1 , . . . , rk }
k
the
the
the
the
graph being explored, with nodes V and edges E
node containing the hive
set of robots
number of robots
State kept by hive
Gm = (Vm , Em )
the known graph; the map being built
State kept by robot ri
Si
relocating*
destination*
path*
DFS stack for ri
boolean value representing whether ri is relocating
node to which ri is relocating
list of nodes from ri ’s current location to destination
Table 3.1: Definitions for notation used in this section. All terms marked with an asterisk (*)
pertain to the PDFS-RELOC algorithm, introduced in Section 3.4.
that minimizes the exploration time, or runtime.
In the following sections we develop our algorithm and evaluate its runtime and the total number
of edge traversals performed by robots. Section 3.2 describes and motivates our approach, which
builds upon depth-first search (DFS). Section 3.3 presents a basic version of our parallel DFS
algorithm (PDFS ). In Section 3.4 we refine PDFS by allowing robots to relocate, producing the
algorithm PDFS-RELOC. Section 3.5 describes how we create environments on which to simulate
the algorithm.
20
3.2
Approach
We saw in Section 2.1.2 that DFS is a suitable algorithm for a single robot exploring an undirected
graph with labeled nodes, with runtime 2|E|. We may improve the runtime of single-robot DFS to
|E|+3|V | by performing backtracking in a more clever order than temporal order [30]. But multiple
robots should be able to divide the work of exploration and reduce runtime more dramatically. Thus,
our approach is to parallelize DFS.
We have chosen to parallelize DFS over other linear-time graph search algorithms like breadthfirst search (BFS) because of the physical nature of our problem. DFS, by only moving between
adjacent nodes, simulates the physical movement of robots. By contrast, BFS may require robots to
travel between non-adjacent nodes in one step. Our robots are unable to perform this teleportation;
they must move along traversable paths.
Previous work on parallelizing DFS (see Section 2.2) has centered on parallel processors, which
are not constrained to move along traversable paths in a graph. Moreover, much of this work has
assumed the graph is known in advance. Our algorithm is novel in that it parallelizes DFS for the
purpose of exploring an unknown graph with physical agents.
Our algorithm builds upon the following notion: individual robots perform DFS, taking unexplored edges as available and backtracking otherwise. However, robots are not guaranteed to
remain isolated; they may stumble upon the same node and expand the same sequence of edges,
duplicating each other’s work. As a result, the hive needs to control the movement of colocated
robots. The hive should also decide which robots should expand and which should backtrack based
on the exploration properties of their current nodes.
The hive seeks to disperse colocated robots and send robots to unexplored parts of G. Ideally, if
multiple robots are at an unfinished node v, the hive would tailor the fraction of robots expanding
an edge of v to the amount of work the edge leads to. However, since G is unknown, the amount
of work at the far end of an unexplored edge is unknown, and the hive can at best assign robots to
21
unexplored edges uniformly; PDFS does this.
We now introduce several definitions. If a node v ∈ V is encountered by any robot for the first
time, the hive adds v to Vm , and we call v started. A node is finished if all its edges have been
explored. The hive determines whether v is started by checking whether v ∈ Vm , and whether v is
finished by comparing its edges in Em to the edges seen by a robot at v.
A robot that expands an edge e ∈ E is moving along an unexplored edge. After it moves, the
hive adds e to Em , and e is considered explored. A robot that backtracks along an edge is returning
along an edge it expanded previously.
As in DFS, each robot ri maintains a stack Si of nodes it has visited that are not yet finished.
We say a robot has work if its stack is nonempty. A robot that relocates has finished its work and
is moving to an unfinished node.
For every edge e ∈ E, once exploration terminates, some robot has expanded e once and backtracked along e once. Any extra traversals of e by any robot are called redundant edge traversals.
In one step, e may be expanded by multiple robots, each of which will eventually backtrack along e;
we call these extra expansions and backtrackings simultaneously redundant edge traversals. Any redundant traversal of e that is not simultaneously redundant is a wasteful traversal. More precisely,
if e is expanded in step t1 , and a traversal of e occurs in step t2 > t1 that is not a backtracking
resulting from the expansion of e in step t1 , then this traversal is wasteful.
Intuitively, simultaneously redundant edge traversals occur when the number of robots at an
unfinished node exceeds the number of unexplored edges there. A wasteful edge traversal occurs
when a robot traverses an already explored edge that it did not expand, and when a robot that
expands and backtracks along an edge makes a separate traversal of it.
In designing our algorithm, one natural approach to minimizing exploration time is to disallow
wasteful edge traversals. This constrains our algorithm to having each robot perform a single DFS
starting and ending at the hive. Any further traversals would be wasteful: any edges encountered
22
but not expanded by a robot’s DFS must have been expanded (explored) already, and all edges at
the hive must have been expanded already when the robot’s DFS finishes. Thus, each robot should
perform no more than its individual DFS; it should not, for instance, relocate to an unexplored
region of G after its DFS finishes.
We will see that prohibiting wasteful edge traversals undermines our objective of minimizing
runtime. After giving our basic algorithm, PDFS, we will show its worst-case runtime is no better
than that of single-robot DFS. Intuitively, some graphs lead to highly disparate workloads across
robots; some finish DFS early, while others become the bottleneck. In this way, PDFS does not
adequately parallelize work.
3.3
Basic algorithm
We focus on the individual robot performing DFS for now. We initially provide three routines for
the robot: assign, expand, and backtrack. To push a node onto Si , we assign this node to Si .
When a robot expands, it moves to the node at the top of its stack. Thus, if we want ri to expand
to v, we must assign v to Si beforehand. When the robot backtracks to a previously visited node,
it discards the topmost node of Si and moves to the new topmost node; if Si is empty, the robot
stays put. The expand and backtrack routines maintain the invariant that the topmost node of
Si , if it exists, is the current location of ri .
23
ri .assign(v):
Push v onto Si
ri .expand():
Move to node at top of Si along edge e
ri .backtrack():
Pop node from Si and discard it
If Si 6= ∅:
Move to node at top of Si
We now present PDFS, the logic performed by the hive. All robots begin at the hive, so we
assign the hive node to all robots—we initialize Si = {vh } for all ri .
Each iteration of the while loop represents one timestep. At each timestep, each robot traverses
at most one edge. A robot at a finished node cannot expand, so it backtracks. A robot at a started
but unfinished node should expand an edge. A robot at an unstarted node should expand an edge
if one exists; otherwise it should backtrack because the node is already finished (the robot has
reached a dead end). If the robot’s stack is empty, we know it has backtracked to a finished node
and stayed there. It does nothing; it cannot expand because its current node is finished, and it
cannot backtrack because its stack is empty.
The hive waits until the end of the iteration (the split-expand step) to direct expanding robots
where to go. It groups robots based on their current node; then, for each node with a robot, the
unexplored edges are divided evenly among all the robots there. Robots expand their assigned
edges, and the hive adds these newly explored edges to Em .
24
PDFS :
** All robots begin at the hive **
For ri ∈ R:
ri .assign(vh )
While some ri ∈ R still has work:
** Categorize robots; move robots that need to backtrack **
For ri ∈ R:
v ← current node of ri
If ri has no work:
Do nothing
Else if v is finished:
ri .backtrack()
Else if v is started and unfinished:
Save ri for split-expand step
Else (v is unstarted):
Vm ← Vm ∪ {v}
If v has no unexplored edges:
** v is finished **
ri .backtrack()
Else:
Save ri for split-expand step
** Split-expand step: move robots that need to expand **
Group expanding robots by their current node
For each node u containing a robot:
SPLIT-WORK-EVENLY(u)
For each expanding robot ri :
u ← current node of ri
ri .expand()
v ← current node of ri
Em ← Em ∪ {u, v}
25
The routine SPLIT-WORK-EVENLY, defined below, assigns a node’s unexplored edges to the
expanding robots there in a way that guarantees all robots are assigned one edge. It cycles through
the unexplored edges, assigning the next edge to the next robot until no more robots are left. Not
all edges are necessarily assigned.
SP LIT-WORK-EVENLY(v):
Rv ← set of robots at v
Ev ← queue of unexplored edges at v
For ri ∈ Rv :
{v, w} ← first edge in Ev
ri .assign(w)
Move {v, w} to the end of Ev
3.3.1
Correctness
We next prove that PDFS accomplishes the task of graph exploration.
Claim 1. P DF S terminates iff G is completely explored.
Proof. Suppose G is completely explored. All nodes have been finished, so the robots backtrack
until their stacks are empty. This is the termination condition of P DF S.
Now suppose P DF S terminates at time T ; we want to show all nodes have been finished by
time T .
Proposition 1.1. Suppose v is pushed onto a robot’s stack after u. Then when u is popped, v has
been finished.
Proof. P DF S ensures that when v is popped, v has been finished. v is popped before u is popped.
26
Lemma 1.1. If G contains the edge {u, v} and u has appeared on some robot’s stack, then v has
appeared on some robot’s stack by time T .
Proof. Let Ru = {r ∈ R : u has appeared on the stack of r}. Let t be the latest time u appeared
on a stack of any r ∈ Ru . At time t, we have two cases:
1. {u, v} is explored. Some robot r has already expanded from u to v or vice versa, which
requires that v has appeared on r’s stack at time t1 < t.
2. {u, v} is unexplored. While {u, v} is unexplored, u remains on the stack of all r ∈ Ru , since u
is unfinished and only finished nodes are removed from the stack. PDFS, in SPLIT-WORKEVENLY, will eventually direct some r ∈ Ru to expand from u to v, possibly after some
backtracking steps, unless another robot expands from v to u first. In either case, v appears
on some robot’s stack at time t2 ≥ t.
Lemma 1.2. For all v 6= vh , v has appeared on some robot’s stack by time T .
Proof. Suppose, for sake of contradiction, ∃ v 6= vh : v has never appeared on any robot’s stack.
Consider some path π = {u1 , . . . , ul } from u1 = v to ul = vh . π exists because G is connected.
Then, by Lemma 1.1, u2 has never appeared on any robot’s stack. From repeated application
of this reasoning, we obtain that u3 , ..., ul have never appeared on any robot’s stack. But this is a
contradiction because ul = vh is the first node in every robot’s stack.
We may now prove the second direction of the claim. By Lemma 1.2, every v 6= vh in G has
been pushed on some robot’s stack. Each of these nodes was pushed after vh . By Prop. 1.1, when
vh is popped from robot r’s stack, all other nodes that appeared on r’s stack have been finished. If
27
Figure 3.1: A bad graph.
PDFS has terminated, then vh has been popped from every robot’s stack, and all nodes have been
finished.
3.3.2
Efficiency analysis
Runtime
The runtime is the number of times the outer while loop of PDFS iterates. We investigate the worstcase runtime of the algorithm. Intuitively, this should be the worst-case runtime of single-robot
DFS, if we imagine a bad enough graph where all robots finish their work early except one.
Claim 2. For every k ≥ 1, < 1, we can construct a graph such that PDFS has runtime at least
2|E|(1 − ).
Proof. Consider the graph in Figure 3.1, consisting of a “stem” of length r and a “trap” with B
edges, where B is high. The hive is the leftmost node of degree 3. The idea is to use up all robots
except one to explore the stem, and leave the remaining robot to explore the trap.
We have two cases:
28
1. k = 3m for some m ∈ N. Then choose r = m to place exactly one robot in the trap. In the
first iteration, PDFS assigns 3m−1 robots to each of the branches above and below the hive;
these robots arrive at finished nodes, backtrack to the hive and do nothing. 3m−1 robots make
it one node down the stem. In general, at iteration i, 3m−i robots make it i nodes down the
stem, where there is unfinished work. At iteration m, a single robot makes it m nodes down
the stem and enters the trap. All other robots fall into two categories: those with empty
stacks, which are doing nothing, and those whose stacks contain only finished nodes, which
are backtracking to the hive.
This graph contains three edges per unit length of the stem, so |E| = 3r + B. The runtime is
the time taken by the robot that enters the trap: 2r to travel across the stem and back, and
2B to explore the trap by single-robot DFS. We want 2r + 2B ≥ 2|E|(1 − ) for our claim to
hold. That is, we want
2r + 2B ≥ 2(3r + B)(1 − )
(3.1)
This holds when
B≥r
2
−3
(3.2)
We simply construct a graph with r = m and appropriate B.
2. k is not a power of 3. We choose r = dlog3 ke, making the stem long enough to ensure only
one robot enters the trap. We choose B according to (3.2), and (3.1) is satisfied.
Corollary 1. The worst-case runtime of PDFS is 2|E|.
Proof. Let W TP DF S () = 2|E|(1 − ), a lower bound on the worst-case runtime. Then
lim W TP DF S () = 2|E|
→0+
29
(3.3)
Total edge traversals
We now examine the total number of edge traversals performed by k robots in the worst case. For
k ≥ 2, the worst case occurs when G is a line of m nodes, and the hive is at one endpoint. Then
for m iterations, all robots move together to the other endpoint, and for m subsequent iterations,
all robots backtrack together to the hive. There are 2|E|k edge traversals in total, 2|E|(k − 1) of
which are simultaneously redundant (defined in Section 3.2).
Claim 3. The total number of edge traversals by PDFS does not exceed 2|E|k.
Proof. The worst-case runtime is 2|E|. The worst-case number of edge traversals occurs if all robots
move at all timesteps, producing 2|E|k traversals.
3.3.3
Remarks
We point out a difference between our algorithm and a common variant of DFS (call it DFS-1 ):
if a robot arrives at a started and unfinished node v, DFS-1 directs it to backtrack immediately,
while PDFS directs it to expand an edge of v. In DFS-1, a single-robot algorithm, v is already on
the robot’s stack, so it will eventually backtrack to v. Our choice for PDFS does not affect the
correctness of PDFS, which we proved in Section 3.3.1, nor does it cause any wasteful traversals.
The advantage of our choice for runtime is that robots are able to explore more of the graph now
rather than later. This choice has the possible drawback, however, of concentrating robots along
one branch of the graph and not distributing them well.
As observed in Section 3.3.2, PDFS performs no better than single-robot DFS in the worst
case. PDFS cannot take advantage of multiple robots when, in a perverse graph, many robots
finish their work, and some robot becomes the bottleneck. We cannot allocate finished robots to
unfinished work because our requirement that there be no wasteful edge traversals prevents them
30
from leaving the hive after finishing DFS. In the next section, we relax this requirement, allowing
finished robots to relocate to unfinished nodes and help lagging robots finish earlier. By incurring
some wasteful edge traversals, we hope to improve runtime.
3.4
Algorithm with relocation
We refine our algorithm so that, until exploration has finished, all robots seek to contribute to
exploration. We accomplish this by relocating finished robots to unfinished regions of G. Giving
robots the limited freedom to perform wasteful edge traversals during relocation guarantees that,
even on bad graphs, there is a roughly even division of work among robots. Intuitively, this is a
better parallel approach to exploration.
Our use of relocation draws upon Rao’s work on parallel processors [31], which suggests that
an unfinished processor split its work stack with a finished processor. It is unfeasible to translate
this technique in our algorithm—to have a relocating (acceptor) robot explicitly split work with an
unfinished (donor) robot—because the donor robot will move while the acceptor robot relocates.
Instead, we direct a relocating robot to a currently unfinished node.
A natural choice for the relocation destination is an unfinished node in the least explored region
of G—we want to allocate more resources to the largest portions of work. However, we cannot know
how much work surrounds an unfinished node v because G is still unknown around v. Thus, for a
relocating robot ri , we choose the closest unfinished node to ri (along paths in Gm ) as the relocation
destination of ri . This choice seeks to minimize the time it takes for ri to resume contributing to
exploration. Furthermore, if ri ends up relocating to a node with little surrounding work, or if all
the work intended for ri is completed before ri even arrives, then ri can at least be assigned quickly
to a new relocation destination. Taking the closest unfinished node is a suitable strategy when we
are constrained by lack of knowledge of G and physical motion of robots.
To enable relocation, we first equip robots with relocation capability. A robot that begins
31
relocating is given a destination—an unfinished node—and a path of intermediate nodes to the
destination. A robot in the process of relocating moves to the next node in its path. When it
arrives at the destination, it stops relocating and sets its stack to contain only the destination. The
following routines accomplish this:
ri .begin relocation(destination, path):
Save destination, path
relocating ← true
ri .continue relocation():
Remove node v at front of relocation path
Move to v
If v = destination:
ri .assign(v)
relocating ← f alse
We now present our improved algorithm, PDFS-RELOC. Note the differences with PDFS : a
robot that has finished its work is slated for relocation. A currently relocating robot ri performs
the next step in its relocation unless another robot has finished the destination node, in which case
ri is slated to relocate elsewhere. Our backtracking and expanding instructions remain the same.
The hive waits until after the split-expand step to decide where robots slated for relocation
should go. Since we want to relocate robots to unfinished nodes, and the split-expand step has the
potential to finish nodes, this ordering is justified. The relocation-init step assigns a destination
and path to each robot that needs to relocate.
32
PDFS-RELOC :
** All robots begin at the hive **
For ri ∈ R:
ri .assign(vh )
While some ri ∈ R still has work:
** Categorize robots; move robots that need to backtrack **
For ri ∈ R:
v ← current node of ri
If ri has no work:
Save ri for relocation-init step
Else if ri .relocating:
If v is still unfinished:
ri .continue relocation()
Else:
Save ri for relocation-init step
Else if v is finished:
ri .backtrack()
..
. ** same as in PDFS **
** Split-expand step: move robots that need to expand **
Group expanding robots by their current node
..
. ** same as in PDFS **
** Relocation-init step: decide destinations of robots that need to relocate **
For each robot ri that needs to relocate:
w ← current node of ri
destination ← FIND-CLOSEST(w)
path ← path from w to destination
ri .begin relocation(destination, path)
33
In FIND-CLOSEST, the hive searches the known graph for the unfinished node closest to a
robot. It breaks ties by choosing the node with the most unexplored edges.
FI ND-CLOSEST(v):
S ← unfinished nodes closest to v, found by virtual BFS in Gm
Return s ∈ S : s has the most unexplored edges
3.4.1
Remarks
FIND-CLOSEST employs a virtual BFS in Gm to solve a dynamic nearest-neighbor problem: find,
in the set of all started and unfinished nodes, the node closest to a robot in Gm . The problem
is dynamic because Gm is changing; we cannot solve it efficiently by maintaining a static set of
pairwise distances between nodes. Currently, FIND-CLOSEST performs a BFS every time a robot
needs to relocate. This may become costly if the robot to relocate is far away from unfinished
nodes.
An alternative strategy is to maintain a frontier set of unfinished nodes during exploration, and
select relocation destinations from this frontier set when needed. If, however, we want to select
from the frontier set the node closest to a robot, we have a shortest-path problem solvable no faster
than by BFS. Thus, the frontier set method may only be efficient if we give up the closest-node
requirement.
These challenges arise from the constraint that the graph is unknown beforehand; other challenges arise from the constraint that robots must move physically. The physical movement of robots
prohibits instantaneous relocation. It is possible that, while a robot relocates, its destination node
becomes finished. Then the relocation traversals it has performed are wasted, and runtime suffers. We may want to modify relocation to account for the density of robots in Gm around the
destination node; we would prefer destinations with lower robot density.
34
In choosing a destination node, we may weigh factors like proximity, number of unexplored
edges, and robot density by designing a cost function. We would then select the destination node
by optimizing the cost function. Still, because at least part of G is unknown around any destination
node, we will never have full knowledge of robot density and amount of unfinished work near the
destination node. This highlights the difficulty of our problem: whereas a parallel algorithm for
computation can immediately assign a thread to a known amount of work, a parallel algorithm for
physical graph exploration can neither relocate an agent immediately nor know in advance how
much work is available to the agent.
3.5
Simulation method
To verify that relocation improves runtime, we simulate PDFS and PDFS-RELOC on standardized
graphs. We use grid graphs as a starting point for two reasons. First, rectangular coordinates are a
natural representation of physical space. Second, it is natural to allow four directions of movement
from a point—to include an edge between the point and each adjacent point. A complete graph,
for example, would represent the environment less faithfully because it contains edges between
non-adjacent points, implying the travel time between faraway points is the same as the travel
time between adjacent points (one timestep). Note, however, that our algorithms work on general
undirected, connected graphs with labeled nodes. We restrict G only in our simulations.
We want the graphs in our simulations to contain obstacles while remaining connected. Our
method of graph generation, CREATE-GRAPH, begins with a full grid graph with vh at the center,
and removes edges with constant probability. That is, every edge is retained with probability p;
an obstacle separates adjacent locations with probability 1 − p. To ensure that all nodes in the
simulation graph are reachable from vh , we find the connected component containing vh and use
that as our simulation graph.
35
Figure 3.2: Graph structures: the square, triangular and hexagonal lattices.
CREATE-GRAPH(p):
Create a full graph, G = (V, E), of desired size, with vh at the center
For e ∈ E:
Keep e with probability p
Find the connected component containing the hive, G0 = (V 0 , E 0 )
G ← G0
We simulate our algorithms on other graph structures, namely triangular and hexagonal lattices,
to analyze the effect on runtime of the number of directions of movement from a node. Figure 3.2
displays our method of encoding these graph structures, which standardizes |V | prior to edge
removal. We state our results in the next chapter.
36
Chapter 4
Results
In this chapter, we experimentally analyze the performance of our basic parallel exploration algorithm, PDFS, and our improved algorithm, PDFS-RELOC. We first verify that the graphs generated for our simulations are of sufficient and consistent size in Section 4.1. Section 4.2 presents our
simulation results and states principles governing the performance of PDFS-RELOC.
4.1
Graph size after edge removal: an application of percolation
theory
As described in Section 3.5, CREATE-GRAPH, our method of generating graphs for simulations,
probabilistically removes edges and retains the connected component containing the hive. This
method produces graphs of varying size. It is important to examine the distribution of graph size,
as graph size may affect the performance of the algorithm.
This problem is closely related to a well-established branch of mathematics called percolation
theory. Percolation theory studies the properties of infinite graphs with edges probabilistically
present or absent, namely the existence of paths and clusters. In the following sections, we introduce
37
percolation theory in the usual context of infinite graphs. We then highlight a result of percolation
theory on finite graphs, which allows us to estimate the probability that CREATE-GRAPH returns
a large enough graph. By validating this result experimentally, we gain insight into how a property
of infinite graphs behaves on finite graphs. We also verify experimentally that CREATE-GRAPH
produces sufficiently large and consistent graphs.
4.1.1
Percolation on infinite graphs
We present some key concepts in percolation theory, mostly following the notation in Grimmett
[23]. Consider a graph G = (V, E). For each edge e, let e be open with probability p. Imagine the
subgraph of G consisting of only open edges, that is, G0 = (V, {e ∈ E : e is open}). A connected
component of this subgraph is called an open cluster. C(x) denotes the open cluster at node x. An
infinite open cluster is an open cluster containing an infinite number of nodes.
We define P∞ (p) as the percolation probability—the probability that a given node is in an infinite
open cluster. Without loss of generality, we take this node to be the origin: P∞ (p) = Pp (|C(0)| =
∞).
A central idea in percolation theory is the critical probability: a value pc such that
P∞ (p)
= 0 if p < pc
(4.1)
> 0 if p > pc
Below the critical probability, it is impossible that the origin (or any node) is contained in an infinite
open cluster. Above the critical probability, this is possible but not guaranteed; it is guaranteed,
however, that an infinite open cluster exists. Letting ψ(p) denote the probability that G contains
some infinite open cluster,
38
ψ(p) =
0 if θ(p) = 0
(4.2)
1 if θ(p) > 0
The critical probability is known for the graph structures we study in our simulation:
• square lattice: psq
c =
1
2
π
• triangular lattice: ptri
c = 2 sin 18
π
• hexagonal lattice: phex
= 1 − 2 sin 18
c
To clarify the relationship between percolation theory and our method of graph generation, open
edges correspond to edges included by CREATE-GRAPH. The origin corresponds to the hive; the
size of C(0) corresponds to the size of the connected component containing the hive. Thus, |C(0)|
is the size of the graph returned when CREATE-GRAPH begins with an infinite graph. P∞ (p) is
the probability that CREATE-GRAPH returns an infinite graph.
However, these results on infinite graphs are of limited usefulness to us for two reasons. First, we
would like a more specific formulation of P∞ (p) when p > pc . Second, the existence of an infinite
cluster tells us little about the sizes of finite clusters in a finite graph, which we are concerned
with. It is known that, in the presence of an infinite cluster, the distribution of finite cluster
sizes Pp (|C| = n) decays subexponentially. In other words, when p > pc , ∃ β1 (p), β2 (p) such that
0 < β2 (p) ≤ β1 (p) < ∞ and
exp(−β1 (p)n(d−1)/d ) ≤ Pp (|C| = n) ≤ exp(−β2 (p)n(d−1)/d )
(4.3)
Still, we want to examine the cluster size distribution in the absence of an infinite cluster. For
that, we look to percolation results on finite graphs.
39
4.1.2
Percolation on finite graphs
Borgs et al [9] studied percolation on a d-dimensional hypercube of side length n; we present
several results by them that characterize the size of the largest cluster. Their results assume a set
of postulates that they prove for d = 2. We denote the ith largest cluster by C (i) . If pc is the
critical probability defined for percolation on infinite graphs, then
Θ(log n) if p < pc
|C (1) | ∈
Θ(ndf ) if p = pc
Θ(nd )
if p > pc
where df = d −
1
ρ
(4.4)
for some ρ.
Above the critical probability, the size of the largest cluster is of order nd . It is analogous to the
infinite open cluster, and we call it the giant component. Below the critical probability, the largest
cluster—in fact, all clusters C (i) for finite i—has size of order log n. At the critical probability, we
see the infinite cluster beginning to form; the largest cluster has size of order ndf ∈ o(nd ).
The authors consider a scaling window around the critical probability, pc (1 ± δ), in which the
incipient infinite cluster appears. They show that, above the scaling window, for a sequence of
systems with probabilities {pn } → p, the distribution of the largest cluster size converges around
nd P∞ (p). That is, as n → ∞,
|C (1) |
→ 1 in probability
∞ (pn )
nd P
(4.5)
Informally, we may state Equation (4.5) as |C (1) | ≈ nd P∞ (p). Moreover, Borgs et al show the giant
component is unique: |C (2) |/|C (1) | → 0.
Two interesting questions arise: first, in the absence of formulas for P∞ (p), could we approxi-
40
mate P∞ (p) experimentally as follows?
|C (1) |
P\
∞ (p) =
nd
(4.6)
Second, does a generalized version of Equation (4.5) hold for graph structures besides d-dimensional
hypercubes? Specifically, for a graph G = (Vinit , Einit ), could we have the following?
|C (1) |
→ 1 in probability
|Vinit |P∞ (pn )
(4.7)
Our experiments in the next section address these questions.
4.1.3
Estimating P∞ experimentally
It is useful to approximate P∞ (p) because, from Section 4.1.1, P∞ (p) is the probability that
CREATE-GRAPH, starting with an infinite graph, produces an infinite graph. In other words,
P∞ (p) is the probability that the hive lies in the equivalent of an infinite open cluster. We saw
in Section 4.1.2 that the infinite open cluster in an infinite graph is analogous to the giant component in a finite graph. Thus, P∞ (p) approximates the probability that the hive lies in the giant
component—equivalently, the probability that CREATE-GRAPH, starting with a finite graph,
returns the giant component.
We show that this probability is high for p sufficiently greater than pc . We calculated estimates
of P∞ (p) by Equation (4.6), which we will call the giant component method. We generated 256×256
grid graphs, kept edges with probability p, found the size of the giant component and computed
sq
1
P\
∞ (p) over 100 trials. Results for p = 0.55 and p = 0.65 are shown in Figure 4.1. Above pc = 2 ,
estimated P∞ (p) increases with p. Even when p = 0.65, it is highly likely that CREATE-GRAPH
returns the giant component.
We verified the giant component method using another method of estimating P∞ (p): “grow”
41
Figure 4.1: The distribution of P∞ estimates by the giant component method on grid graphs.
the component containing the origin, C(0), by moving outward from the origin, adding edges of
the grid with probability p. C(0) is alive for a given size s if it has grown out to the boundary
\
of a box of side length s around the origin. The estimate P∞
(p, s) is the fraction of times C(0) is
\
alive over 100 trials. We expect P∞
(p, s) to converge to P∞ (p) as s → ∞. We call this method the
grown component method.
We implemented the grown component method as follows:
GROWN-COMPONENT(p):
For s ∈ {2, 4, . . . , 256}:
n alive ← 0
For t ∈ {1, . . . , N T RIALS}:
Generate an s by s grid graph, G, around origin
Keep edges with probability p
If C(0) contains a boundary node of G:
n alive ← n alive + 1
P\
∞ (p, s) ← n alive/N T RIALS
Figure 4.2 compares the two methods of estimating P∞ (p) on a grid graph with p = 0.55 and
42
Figure 4.2: The convergence of P∞ estimates by the giant component method and the grown
component method on grid graphs.
p = 0.65. As graph size increases, the giant component estimates appear to converge to the same
value as the grown component estimates; we assert this value is P∞ (p). Note the giant component
estimates converge from below, whereas the grown component estimates converge from above. As
graph size increases, the fraction of the graph occupied by the giant component increases, while
the probability that C(0) is alive at the boundary decreases. Results for higher p are similar, with
convergence occurring closer to P\
∞ (p) = 1. The convergence of the giant component estimates and
grown component estimates for a range of p values demonstrates that Equation (4.6) is a suitable
way to approximate P∞ (p) for initially large grid graphs.
The giant component method and grown component method give convergent estimates on other
graph structures as well. We estimated P∞ (p) by both methods on triangular lattices (Figure 4.3)
and hexagonal lattices (Figure 4.4). For each graph type, we chose p above the scaling window, i.e.
hex + δ for hexagonal lattices. For triangular lattices,
p > ptri
2
c + δ1 for triangular lattices and p > pc
the scaling window occurs at lower p than for the grid graph, intuitively because triangular lattices
are denser and thus need a smaller fraction of edges to be present to contain an infinite cluster at
the origin. For hexagonal lattices, the opposite is true: hexagonal lattices are sparser than grid
43
Figure 4.3: Estimating P∞ (p) for triangular lattices. Note that the two methods converge.
graphs and need a greater fraction of edges to exist for |C(0)| = ∞.
The convergence of the giant component estimates and grown component estimates is strong
evidence that the giant component method is a valid way of estimating P∞ (p) on triangular and
hexagonal lattices. In other words, we believe Equation (4.7) holds for triangular and hexagonal
lattices. The result Borgs et al presented for hypercubes may, in fact, be a more general law.
Conjecture 1. Equation (4.7) holds for triangular and hexagonal lattices.
For all graph structures examined here, we have chosen some p ≤ 0.8 and achieved P\
∞ (p) > 0.95.
Thus, our simulations, which use p = 0.8 unless otherwise stated, ensure that the graph generated
is the giant component with high probability. In all likelihood, CREATE-GRAPH returns graphs
of sufficient size.
4.1.4
Graph size after edge removal
To verify that CREATE-GRAPH selects the giant component with high probability, we tested our
method on a 256 × 256 grid graph, computing the resulting graph size 100 times for each value of p.
Figure 4.5 summarizes our results. At p = 0.50 = psq
c , CREATE-GRAPH never returned a graph
44
Figure 4.4: Estimating P∞ (p) for hexagonal lattices. Note that the two methods converge.
with more than 23 |Vinit | nodes, and usually returned a small graph. As p increases to 0.51 and 0.52,
the graph returned begins to coincide with the giant component. At p = 0.54, CREATE-GRAPH
returned either the giant component or, with lower probability, a small graph. We have zeroed in
on the scaling window; p = 0.54 seems to be an approximate upper bound on the scaling window.
For higher values of p, the frequency of small graphs shrinks, and the frequency of the giant
component grows. We obtained a few small graphs when p = 0.60 and none when p = 0.80. This
confirms that in our simulations, which use p = 0.80 unless otherwise stated, it is highly unlikely
that the graphs generated be anything other than the giant component. Moreover, the graphs
generated are of surprisingly consistent size.
The spike representing the giant component moves rightward, approaching |Vinit |, as p increases.
Interestingly, the spike is the rightmost boundary of the distribution of resulting graph sizes; there
is no discernible tail between the spike and |Vinit |, e.g. when p = 0.54 or p = 0.60. This result
implies that when p remains close to the scaling window, a fully connected graph is extremely
unlikely. Almost always, enough nodes will be disconnected from the giant component to create a
gap between the giant component size and |Vinit |. In the real-world formulation of our problem,
45
Figure 4.5: Graph size after percolating a grid graph and retaining the connected component
containing the hive.
46
where missing edges represent obstacles, this result implies that, almost certainly, some locations
will be inaccessible for close-to-critical values of p.
4.2
Simulation results
Simulation enables us to assess the runtime and total edge traversals of PDFS-RELOC, as well
as PDFS in the average case. In evaluating runtime, we want to know the speedup achieved by
multiple robots, defined analogously to Equation 2.1:
speedup =
exploration time for a single robot
exploration time for k robots
(4.8)
A speedup of k is called linear speedup; an ideal algorithm would display linear speedup.
Our metric for assessing runtime is the ratio of the number of iterations to the number of edges
(the iteration ratio I/E). The number of iterations is the runtime, so the iteration ratio enables
us to compare runtime for different graph sizes. Because single-robot DFS requires 2|E| iterations,
we expect I/E = 2 when the number of robots k = 1. A parallel algorithm that attains linear
speedup should divide the runtime by k. It should divide the iteration ratio by k as well; that is,
it should satisfy I/E = k2 .
To assess the total edge traversals performed, especially redundant edge traversals, we used a
second metric: the ratio of the total number of edge traversals by all robots to the number of edges
(the traversal ratio T /E). Because single-robot DFS performs 2|E| edge traversals, we expect
T /E = 2 when k = 1. When T /E > 2, some edge is traversed more than twice, so one or more
redundant edge traversals has occurred. From Section 3.3.2, PDFS performs 2|E|k edge traversals
in the worst case, so T /E ≤ 2k for PDFS. PDFS-RELOC, unlike PDFS, enables wasteful edge
traversals during relocation, so we expect T /E to be higher for PDFS-RELOC than for PDFS on
average.
47
Ideally, a parallel exploration algorithm would attain linear speedup and minimize redundant
edge traversals—it would satisfy I/E =
2
k
and T /E = 2. Realistically, an algorithm might not
achieve linear speedup because more robots would have more difficulty spreading out; as k increases,
an individual robot becomes less likely to contribute an explored edge in a given iteration. We seek
to keep I/E as close as possible to the linear speedup curve,
2
k,
minimizing T /E when possible.
We assess the performance of our algorithms on 128 × 128 grid graphs with p = 0.8.
4.2.1
The advantage of relocation
Our simulations show PDFS-RELOC outperforms PDFS, confirming our intuition in Section 3.4
that the wasteful edge traversals incurred by PDFS-RELOC are worth the improved runtime.
PDFS-RELOC achieves much closer to linear speedup than PDFS, as seen in Figure 4.6.
PDFS diverges from linear speedup early on, as its I/E curve bottoms out around k = 10. In
PDFS, since robots that have finished DFS stop contributing to exploration, in any uneven graph,
the robots with the most work become the bottleneck. Throwing more robots at the problem hardly
alleviates the bottleneck because PDFS cannot anticipate which neighbors of a given node lead to
the most unfinished work, and thus cannot allocate robots to unexplored edges efficiently.
By contrast, PDFS-RELOC attains close to linear speedup for moderate values of k; it begins
to diverge from the linear speedup curve around k = 102 . Relocation allows robots that have finished their work early to split work with the remaining robots. In other words, relocation redirects
resources to places that would otherwise become bottlenecks. For higher orders of magnitude of k,
our method of relocation is not enough to produce linear speedup because it is constrained by the
graph being unknown in advance and the physical motion of robots. In choosing a relocation destination, the algorithm does not know whether another robot will finish this node before relocation
is complete—whether relocation will be in vain. For higher k, more robots perform relocations,
and more relocations happen in vain.
48
Figure 4.6: PDFS-RELOC outperforms PDFS, attaining close to linear speedup on a grid graph
with p = 0.8 and |Vinit | = 1282 .
The tradeoff of the improved runtime of PDFS-RELOC is the many redundant edge traversals
it performs, as seen in Figure 4.7. Our expectation that T /E grows faster in k for PDFS-RELOC
than for PDFS is confirmed. Every relocation is a series of wasteful edge traversals, and more
relocations happen for higher k. Meanwhile, T /E for PDFS grows slowly because the algorithm
incurs no wasteful edge traversals, only simultaneously redundant edge traversals.
Still, we prioritize runtime improvements over reductions in redundant edge traversals. Because
PDFS-RELOC outperforms PDFS in terms of runtime, we use PDFS-RELOC in all subsequent
simulations.
4.2.2
More edges are better
The performance of PDFS-RELOC depends on the properties of the graph being explored. If a
graph is more percolated—if p is lower—the algorithm performs more redundant edge traversals
(see Figure 4.8). When fewer edges exist, robots expanding from the same node are more likely to
expand along the same edge. Moreover, a lower p results in a more uneven graph, which means
greater variation in amount of work across robots, which means more relocations, during which
49
Figure 4.7: PDFS-RELOC performs more redundant edge traversals than PDFS on a grid graph
with p = 0.8 and |Vinit | = 1282 .
wasteful edge traversals occur. Variation in p hardly makes a difference for runtime; I/E is slightly
lower when p = 1.0 than when p = 0.7. These experiments were performed on 128 × 128 grid
graphs.
4.2.3
Bigger graphs are better
Unlike the prevalence of obstacles, graph size does have a discernible impact on runtime. The
algorithm attains closer to linear speedup on n × n grid graphs when n is larger, as shown in
Figure 4.9. Larger graphs give robots greater opportunity to disperse; they take advantage of
higher numbers of robots. Conversely, in smaller graphs, at some level of k adding more robots
will not reduce iterations but will simply send these robots to expand edges simultaneously with
existing robots. This explains why, for smaller graphs, the I/E curve bottoms out earlier and the
T /E curve is higher—more redundant edge traversals occur. These experiments were performed
on grid graphs with p = 0.8.
Note that, in Figure 4.9, the magnitude of k at which I/E begins to peel away from linear
speedup (the peel-away point) increases with graph size. We now make this more precise.
50
Figure 4.8: PDFS-RELOC performs fewer redundant edge traversals and attains slightly better
speedup when more edges are present in grid graphs with |Vinit | = 1282 .
Figure 4.9: PDFS-RELOC attains better speedup and performs fewer redundant edge traversals
on larger grid graphs with p = 0.8.
51
Figure 4.10: The abrupt increase in slope of each curve is where the linear speedup of PDFS-RELOC
breaks down when p = 0.8. Larger graphs permit linear speedup for more values of k.
Figure 4.10 plots the slopes of the I/E curves in Figure 4.9. There is a marked increase in slope
for each curve, representing the peel-away point. Interestingly, this kink appears to occur when
k ≈ size—when the number of robots is roughly the grid size along one dimension. We state this
as a conjecture; more work should be done to elucidate the peel-away point.
Conjecture 1. On an n x n grid graph, the I/E curve diverges most rapidly from the linear speedup
curve when k ≈ n.
4.2.4
Algorithm performance on other graph structures
The ability of robots to disperse appears to affect the runtime and redundant edge traversals of
PDFS-RELOC. One determinant of robots’ dispersal ability is the number of directions they can
take from a given node—the degree of a node. Letting d denote the degree of a non-boundary
node, d = 4 in the grid graph, d = 3 in the hexagonal lattice, and d = 6 in the triangular lattice.
In graphs with higher d, robots expanding from the same node are better able to disperse and
52
Figure 4.11: PDFS-RELOC attains best speedup and performs fewest redundant edge traversals
on triangular lattices. The algorithm attains worst speedup and performs most redundant edge
traversals on hexagonal lattices. For all graphs, p = 0.8 and |Vinit | = 1282 .
less likely to duplicate work. Indeed, PDFS-RELOC performs better on graphs with higher d (see
Figure 4.11). On triangular lattices, the algorithm attains closer to linear speedup and performs
fewer redundant edge traversals than on grid graphs; the opposite is true of hexagonal lattices.
These experiments were performed on 128 × 128 grid graphs with p = 0.8.
4.2.5
General principles
We summarize our simulation results in the following general principles. We consider the robots’
spreading ability, or ability to disperse. A greater number of robots hinders spreading ability.
Greater graph size, greater p and greater d all improve spreading ability.
1. The greater the robots’ spreading ability, the better the speedup of PDFS-RELOC.
2. The greater the robots’ spreading ability, the fewer the redundant edge traversals performed
by PDFS-RELOC.
53
Chapter 5
Conclusions
We have presented a parallel depth-first search algorithm, PDFS-RELOC, for graph exploration
by a colony of robots. We have shown that the physical motion of robots and the unknown nature
of the graph are barriers to efficient exploration. Nevertheless, PDFS-RELOC achieves near-linear
speedup in the number of robots when the graph is large relative to the number of robots. We
accomplish this by allowing robots to perform seemingly wasteful work in order to balance their
workloads.
We have shown that our algorithm attains better speedup on graphs where robots are better able
to disperse. In large environments with many directions of robot movement at each location, PDFSRELOC performs optimally. If one were to implement the algorithm with physical robots exploring
a real-world environment, one should design the environment with attention to the freedom robots
have to spread. If, however, the environment to map is fixed in advance, the number of robots
assigned to the exploration task should be chosen judiciously. It is desirable to allocate as many
robots as will allow linear speedup, but not many more.
Future work should do more to characterize the point where the speedup of PDFS-RELOC falls
away from linear speedup. A formal analysis of the runtime of PDFS-RELOC —both worst-case
54
and average-case—would be illuminating. Future work should also aim to improve the method
of relocation in PDFS-RELOC. Rather than choosing, as a relocation destination, the closest
unfinished node, we should design a cost function that weighs all relevant factors and choose the
optimal destination. Introducing randomization, into the selection of relocation destinations or the
graph traversal more generally, may also prove useful.
One unanswered question is whether there exists an exploration algorithm for the graph types
we have considered that does attain linear speedup. To shed light on this question, we may seek
an algorithm for the equivalent problem when the graph is known in advance—the problem of
traversing a known graph in minimum time. This problem becomes one of dividing the known
graph into roughly equal regions, one per robot, so that every robot’s traversal takes about the
same time. In other words, partition the graph into possibly overlapping subpartitions, each of
which is traversable in approximately equal time.
Formally, suppose G = (V, E) is an undirected, connected, known graph. Define a traversable
subpartition as a connected subgraph of G. The traversal length of a traversable subpartition T
is the minimum number of edge traversals needed for a robot to cover all edges of T . A parallel
traversal algorithm for G and k robots should find k traversable subpartitions of G—call them
S
S
T1 = (V1 , E1 ), . . . , Tk = (Vk , Ek )—such that E = ki=1 Ei . (It follows that V = ki=1 Vi .) The
problem is to find a set of traversable subpartitions as described such that each Ei has traversal
length at most L, where L is minimized.
If an algorithm can solve this problem and attain linear speedup, there may exist a linearspeedup exploration algorithm for unknown graphs. If there exists no linear-speedup algorithm
for traversing known graphs, there exists no linear-speedup algorithm for the harder problem of
exploring unknown graphs. Note the problem we just presented differs from the graph partitioning
problem, known to be NP-complete, in allowing subpartitions to overlap and requiring subpartitions
to be traversable.
55
Finally, plenty of directions for future work lie in eliminating the simplifying assumptions we
have made about robots’ abilities: global and instantaneous communication, perfect odometry, and
unlimited power. None of these assumptions are practical; our algorithm must be adapted for
local communication, flawed odometry and limited power before it can be realized physically. In
addition, further work should investigate how to translate our parallel graph exploration algorithm
into a mapping algorithm for a continuous world.
56
Bibliography
[1] A. Aggarwal and R.J. Anderson. A random NC algorithm for depth first search. Annual ACM
Symposium on Theory of Computing, pages 325–334, 1987.
[2] A. Aggarwal, R.J. Anderson, and M. Kao. Parallel depth-first search in general directed graphs.
Annual ACM Symposium on Theory of Computing, pages 297–308, 1989.
[3] N. Alon, C. Avin, M. Koucky, G. Kozma, Z. Lotker, and M.R. Tuttle. Many random walks
are faster than one. Proceedings of the 20th Annual Symposium on Parallelism in Algorithms
and Architectures, pages 119–128, 2008.
[4] B. Awerbuch, M. Betke, and R.L. Rivest. Piecemeal graph exploration by a mobile robot.
Information and Computation, 152(2):155–172, 1999.
[5] M.A. Bender, A. Fernandez, D. Ron, A. Sahai, and S. Vadhan. The power of a pebble:
Exploring and mapping directed graphs. Information and Computation, 176(1):1–21, 2002.
[6] M.A. Bender and D. Slonim. The power of team exploration: Two robots can learn unlabeled
directed graphs. Proceedings of the 35th Annual Symposium on Foundations of Computer
Science, pages 75–85, 1994.
[7] M. Betke, R.L. Rivest, and M. Singh. Piecemeal learning of an unknown environment. Machine
Learning, 18(2-3):231–254, 1995.
[8] E. Bonabeau, M. Dorigo, and G. Theraulaz. Swarm Intelligence. Oxford University Press,
New York, 1999.
[9] C. Borgs, J.T. Chayes, H. Kesten, and J. Spencer. The birth of the infinite cluster: Finite-size
scaling in percolation. Communications in Mathematical Physics, 224(1):153–204, 2001.
[10] W. Burgard, M. Moors, D. Fox, R. Simmons, and S. Thrun. Collaborative multi-robot exploration. IEEE Intl. Conference on Robotics and Automation, pages 476–481, 2000.
[11] Y.U. Cao, A.S. Fukunaga, and A. Kahng. Cooperative mobile robotics: Antecedents and
directions. Autonomous Robots, 4(1):7–27, 1997.
57
[12] C. Cooper, A. Frieze, and T. Radzik. Multiple random walks in random regular graphs. SIAM
J. Discrete Math, 23(4):1738–1761, 2009.
[13] X. Deng, T. Kameda, and C. Papadimitriou. How to learn an unknown environment. I: the
rectilinear case. Journal of the ACM, 45(2):215–245, 1998.
[14] X. Deng and C.H. Papadimitriou. Exploring an unknown graph. Journal of Graph Theory,
32(3):265–297, 1999.
[15] K. Derr and M. Manic. Multi-robot, multi-target particle swarm optimization search in noisy
wireless environments. 2nd Conference on Human System Interactions, pages 81–86, 2009.
[16] A. Dessmark and A. Pelc. Optimal graph exploration without good maps. Theoretical Computer Science, 326(1-3):343–362, 2004.
[17] G. Dudek, M. Jenkin, E. Milios, and D. Wilkes. Robotic exploration as graph construction.
IEEE Transactions on Robotics and Automation, pages 859–865, 1991.
[18] G. Dudek, M. Jenkin, E. Milios, and D. Wilkes. A taxonomy for swarm robots. Proceedings
of the IEEE/RSJ Intl. Conference on Intelligent Robots and Systems, pages 441–447, 1993.
[19] G. Dudek, M. Jenkin, E. Milios, and D. Wilkes. Topological exploration with multiple robots.
Proceedings of the Seventh Intl. Symposium on Robotics with Applications, 1998.
[20] R. Fleischer and G. Trippen. Exploring an unknown graph efficiently. Algorithms - ESA 2005,
pages 11–22, 2005.
[21] N. Gordon, I.A. Wagner, and A.M. Bruckstein. Discrete bee dance algorithms for pattern
formation on a grid. IEEE Intl. Conference on Intelligent Agent Technology, pages 545–549,
2003.
[22] G. Goth. Exploring new frontiers. Communications of the ACM, 52(11):21–23, 2009.
[23] G. Grimmett. Percolation (2nd ed). Springer, New York, 1999.
[24] N.R. Hoff, A. Sagoff, R.J. Wood, and R. Nagpal. Two foraging algorithms for robot swarms
using only local communication. Awaiting publication, 2009.
[25] M. Kao, S. Teng, and K. Toyama. Improved parallel depth-first search in undirected planar
graphs. Algorithms and Data Structures, 709:409–420, 1993.
[26] S. Koenig and Y. Liu. Terrain coverage with ant robots: a simulation study. International
Conference on Autonomous Agents, pages 600–607, 2001.
[27] M.J. Mataric. Designing and understanding adaptive group behavior. Adaptive Behavior,
1(4):51–80, 1995.
58
[28] D. Merkle and M. Middendorf. Swarm intelligence and signal processing. IEEE Signal Processing Magazine, 25(6):152–158, 2008.
[29] Committee on the Status of Pollinators in North America. Status of Pollinators in North
America. National Research Council, Washington, DC, 2007.
[30] P. Panaite and A. Pelc.
33(2):281–295, 1999.
Exploring unknown undirected graphs.
Journal of Algorithms,
[31] V.N. Rao and V. Kumar. Parallel depth-first search, part I: Implementation. International
Journal of Parallel Programming, 16(6):479–499, 1988.
[32] J.R Smith. Parallel algorithms for depth-first searches I. Planar graphs. SIAM J. Comput.,
15(3):814–830, 1986.
[33] X. Songdong and Z. Jianchao. Sense limitedly, interact locally: the control strategy for swarm
robots search. IEEE Intl. Conference on Networking, Sensing and Control, pages 402–407,
2008.
[34] C. Unsal and J.S. Bay. Spatial self-organization in large populations of mobile robots. Proceedings of the IEEE Intl. Symposium on Intelligent Control, pages 249–254, 1994.
59
© Copyright 2026 Paperzz