Content uploaded by Ramin Khalili
Author content
All content in this area was uploaded by Ramin Khalili on Oct 22, 2014
Content may be subject to copyright.
Neighbor Discovery in Wireless Networks and the Coupon
Collector’s Problem
Sudarshan Vasudevan∗
svasu@cs.umass.edu Donald F. Towsley†
towsley@cs.umass.edu Dennis Goeckel‡
goeckel@ecs.umass.edu
Ramin Khalili§
ramin.khalili@epfl.ch
ABSTRACT
Neighbor discovery is one of the first steps in the initializa-
tion of a wireless ad hoc network. In this paper, we design
and analyze practical algorithms for neighbor discovery in
wireless networks. We first consider an ALOHA-like neigh-
bor discovery algorithm in a synchronous system, proposed
in an earlier work. When nodes do not have a collision de-
tection mechanism, we show that this algorithm reduces to
the classical Coupon Collector’s Problem. Consequently, we
show that each node discovers all its nneighbors in an ex-
pected time equal to ne(ln n+c), for some constant c. When
nodes have a collision detection mechanism, we propose an
algorithm based on receiver status feedback which yields a
ln nimprovement over the ALOHA-like algorithm.
Our algorithms do not require nodes to have any estimate
of the number of neighbors. In particular, we show that
not knowing nresults in no more than a factor of two slow-
down in the algorithm performance. In the absence of node
synchronization, we develop asynchronous neighbor discov-
ery algorithms that are only a factor of two slower than their
synchronous counterparts. We show that our algorithms can
achieve neighbor discovery despite allowing nodes to begin
execution at different time instants. Furthermore, our al-
gorithms allow each node to detect when to terminate the
neighbor discovery phase.
Categories and Subject Descriptors
C.2.1 [Computer-Communication Networks]: Network
Architecture and Design—Wireless Communication; F.2.2
∗Department of Computer Science, University of Mas-
sachusetts, Amherst, MA 01003
†Department of Computer Science, University of Mas-
sachusetts, Amherst, MA 01003
‡Department of Electrical and Computer Engineering, Uni-
versity of Massachusetts, Amherst, MA 01003
§School of Computer and Communication Sciences, EPFL,
CH-1015, Lausanne, Switzerland
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee provided that copies are
not made or distributed for profit or commercial advantage and that copies
bear this notice and the full citation on the first page. To copy otherwise, to
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.
MobiCom’09, September 20–25, 2009, Beijing, China.
Copyright 2009 ACM 978-1-60558-702-8/09/09 ...$10.00.
[Analysis of Algorithms And Problem Complexity]:
Nonnumerical Algorithms and Performance
General Terms
Algorithms, Design, Performance, Theory
Keywords
Ad Hoc Networks, Sensor Networks, Initialization, Neighbor
Discovery, Randomized Algorithms
1. INTRODUCTION
Wireless ad hoc networks and sensor networks have gen-
erated considerable attention recently due to many appli-
cations such as habitat monitoring, environmental observa-
tion, surveillance and tracking, and community networking.
These networks are typically deployed without any commu-
nication infrastructure and are required to“configure” them-
selves upon deployment, in order to establish an efficient
communication infrastructure. For instance, immediately
after deployment, a node has no knowledge of other nodes
in its transmission range and needs to discover its neigh-
boring nodes in order to efficiently communicate with other
nodes in the network. Knowledge of one-hop neighbors is
required by medium access control protocols [2], routing al-
gorithms [8], and topology control algorithms [10]. Thus,
neighbor discovery is one of the first steps in the configura-
tion of a large wireless network.
Neighbor discovery algorithms can be classified into two
categories, viz. randomized or deterministic. In a random-
ized neighbor discovery algorithm, each node transmits at
randomly chosen times and yet discovers all its neighbors
by a given time with high probability. In a deterministic
neighbor discovery algorithm, each node transmits accord-
ing to a pre-determined transmission schedule that allows it
to discover all its neighbors by a given time with probabil-
ity one. Guaranteed neighbor discovery typically comes at
the cost of increased running time and often requires unre-
alistic assumptions such as synchronization between nodes
and apriori knowledge of the number of neighbors [9]. We,
therefore, choose to investigate randomized neighbor discov-
ery algorithms in this paper.
The neighbor discovery problem is non-trivial due to sev-
eral reasons:
1. A neighbor discovery algorithm, either randomized or
deterministic, needs to cope with collisions. A ran-
domized neighbor discovery algorithm needs to mini-
mize the probability of collisions, while a deterministic
algorithm requires determining a collision-free trans-
mission schedule among nodes.
2. In many practical settings, nodes have no knowledge
of the number of neighbors, which makes coping with
collisions even harder.
3. When nodes do not have access to a global clock, they
need to operate asynchronously and still be able to
discover their neighbors efficiently.
4. In asynchronous systems, nodes can potentially start
the neighbor discovery process at different time in-
stants and consequently, may miss each other’s trans-
missions.
5. Furthermore, when the number of neighbors is un-
known, nodes do not know apriori when/how to ter-
minate the neighbor discovery process.
In this paper, we study the neighbor discovery problem
when nodes have omni-directional antennas and propose al-
gorithms that comprehensively handle each of these chal-
lenges. Unlike existing approaches that require apriori esti-
mates of the number of neighbors or synchronization among
nodes, we propose neighbor discovery algorithms that:
P1 do not require nodes to have any apriori knowledge of
the number of neighbors,
P2 do not require synchronization among nodes,
P3 allow nodes to begin execution at different time instants,
and
P4 enable each node to detect when to terminate the neigh-
bor discovery process.
To the best of our knowledge, this is the first solution to
the neighbor discovery problem that satisfies the properties
P1-P4. We start out making a number of unrealistic as-
sumptions violating each of P1-P4. As we will see, the
analysis in such a simplistic setting provides us with valu-
able insight about the problem. Armed with this insight, we
progressively relax each of the assumptions, each time taking
a significant step towards a comprehensive and a practical
solution to the neighbor discovery problem.
Existing approaches to the neighbor discovery problem
when nodes have omni-directional antennas can be classified
into 3 categories, viz. randomized [13, 3], deterministic [9],
and multi-user detection-based [1, 11]. However, these so-
lutions require either apriori knowledge of the number of
neighbors [13, 3, 9], or node synchronization [13, 9]. The
solutions proposed in [1, 11] are based on correlating the
received signal with node signatures. However, each node is
assumed to know apriori the correspondence between nodes
and their signatures. In [4], the authors consider the prob-
lem of rendezvous between two duty cycling nodes in the ab-
sence of prior synchronization information. In comparison
to [4], we are interested in the problem of efficient discovery
of all one hop neighbors.
Neighbor discovery algorithms when nodes have direc-
tional antennas have been proposed in [19, 7, 17]. Again,
the proposed solutions assume knowledge of the number of
neighbors [19], or node synchronization [7]. In [17], the au-
thors propose antenna scanning mechanisms for directional
neighbor discovery. However, the focus in [17] is on a com-
plete systems solution for building ad hoc networks with di-
rectional antennas and no significant analysis of the neighbor
discovery algorithms is provided.
1.1 Main Results
The main results of this paper can be summarized as fol-
lows:
1. We consider the ALOHA-like neighbor discovery al-
gorithm proposed in [13] and show that its analysis
reduces to that of the Coupon Collector’s Problem.
Consequently, we show that each node discovers all
its nneighbors in an expected amount of time equal
to ne(ln n+c), for some constant c.
2. We then propose a neighbor discovery algorithm that
assumes nodes can detect collisions i.e., nodes can dis-
tinguish between collisions and idle slots. We show
that collision detection results in a ln nimprovement
over the ALOHA-like algorithm.
3. We next show that absence of an estimate of the num-
ber of neighbors results in a slowdown of no more than
a factor of two, compared to when nodes know n.
4. We further show that lack of synchronization among
nodes results in at most a factor of two slowdown in
the algorithm performance from the case when nodes
are synchronized.
5. Finally, we show that despite starting execution at
different time instants, each node can discover all its
neighbors. Furthermore, when nodes do not know n,
we show that with high probability (w.h.p), each node
can determine that it has discovered all its neighbors.
We thus have an O(ne ln n) ALOHA-like discovery algorithm
when nodes do not have a collision detection mechanism
and an O(ne) Collision Detection-based algorithm for the
case when nodes can detect collisions, both of which satisfy
properties P1-P4.
1.2 Organization of the paper
The rest of the paper is structured as follows. In Section 2,
we describe our model and its assumptions. Section 3 de-
scribes the ALOHA-like neighbor discovery algorithm and
its analysis. We next present the collision detection-based
algorithm for the case when nodes have collision detection
in Section 4. In Section 5, we consider the case when nodes
have no estimate of the number of neighbors. In Section 6,
we describe asynchronous versions of the neighbor discovery
algorithms. In Section 7, we handle initiation and termina-
tion of the neighbor discovery phase. Finally, we conclude
in Section 8, and present future directions.
2. NETWORKMODEL AND ASSUMPTIONS
In this section, we introduce our network model which
will be used throughout the rest of this paper. We make the
following assumptions about the multi-hop wireless ad hoc
network:
•Unique Node IDs: We assume that the nodes have
unique identifiers. Unlike the stronger requirement
that the identifiers be globally unique, we only require
nodes to have locally unique identifiers i.e. no two
neighbors of a given node have the same identifier. The
identifier could be the MAC address of the node, the
location of the node, or a random bit string of length
chosen to be locally unique w.h.p.
•Radio Model: Each node is equipped with a radio
transceiver that allows a node to either transmit or re-
ceive messages, but not simultaneously. Furthermore,
we assume that enough frequency or time diversity ex-
ists in the transmission of a message that the short-
scale variation due to multipath fading is averaged out.
Thus, two nodes are neighbors if the received signal
strength (after path-loss and shadowing) at one node
given a transmission from the other exceeds a decoding
threshold, and, under the assumption of a static net-
work, this neighbor designation does not change during
the neighbor discovery period.
•Collision Model: When two or more nodes transmit
concurrently, a collision occurs at the recipient node.
When a collision occurs, we assume that no partial
recovery of packets is possible at the receiving node.
•Collision Detection: A collision detection mecha-
nism allows a node to distinguish between the case
where two or more nodes are transmitting and one
where no node is transmitting. Indeed, practical solu-
tions for collision detection have been proposed in [5,
6]. In this paper, we study two neighbor discovery al-
gorithms, first when nodes do not have a collision de-
tection mechanism and next when nodes do and study
the impact of collision detection on algorithm perfor-
mance.
We observe that the radio and collision model considered in
the paper, although idealized, help in analyzing the perfor-
mance of neighbor discovery algorithms. As we will see, the
insights provided by our analysis in turn are used to design
practical algorithms for the neighbor discovery problem.
3. ALOHA-LIKENEIGHBOR DISCOVERY
ALGORITHM
In this section, we consider the ALOHA-like neighbor dis-
covery algorithm first proposed in [13], which assumes that
nodes do not have a collision detection mechanism. We start
out making several simplifying assumptions:
1. We consider a single clique of size n.
2. nis known to all nodes in the clique.
3. Time is divided into slots and nodes are synchronized
on slot boundaries.
Each of these assumptions will be relaxed as we proceed. Im-
portantly, these assumptions allow us to view the ALOHA-
like neighbor discovery as a Coupon Collector’s Problem.
Consequently, the time to discover the nneighbors is the
same as the minimum time to collect at least one of each of
ncoupon types.
3.1 Algorithm Description
The ALOHA-like neighbor discovery algorithm is a ran-
domized algorithm that operates as follows. In each time
slot, a node independently transmits with probability pt, a
parameter to be determined, and listens with probability
1−pt. A discovery is made if exactly one node transmits in
a slot; otherwise no discovery is made in that time slot.
The goal then is to choose ptso as to maximize the ex-
pected fraction of neighbors discovered in a given time slot
(as considered in [13]), or the probability of discovering a
neighbor within a given time (as considered in [19]). Not
surprisingly, the optimal choice of ptcan be shown to be
1/n, where nis the clique size. Intuitively, this choice of pt
maximizes the per-slot throughput of a given node, as has
been widely studied and well-understood in the context of
the ALOHA protocol, leading to maximization of the dis-
covery rate.
However, the crucial question of the time required to dis-
cover all the neighbors when nodes transmit with pt= 1/n
were unanswered in [13, 19]. In the remainder of this section,
we assume that nodes transmit with probability pt= 1/n
and proceed to analyze the time to discover all nneigh-
bors. Before doing so, we first describe the Coupon Collec-
tor’s Problem and subsequently describe how it relates to
the ALOHA-like discovery algorithm.
3.2 Classical Coupon Collector’s Problem
The classical Coupon Collector’s Problem 1is defined as
follows. There are ndistinct objects that are repeatedly
drawn (with replacement) from an urn with a probability of
1/n of picking an object at each trial. The question then is:
what is the minimum number of trials needed to pick each
of the nobjects at least once? If the random variable W
denotes the number of trials, it can be shown that E[W] =
n(ln n+c), for some constant c. Furthermore, it can be
shown that the random variable Wis sharply concentrated
around its mean. More formally, P[W > n ln n+cn] =
1−e−e−c, which tends to zero for large positive cand tends
to one for large negative c.
3.3 NeighborDiscoveryAs Coupon Collection
In this section, we describe how the neighbor discovery
problem maps into the Coupon Collector’s Problem. Con-
sider a clique of nnodes numbered 1,...,n. The probability
that node isuccessfully transmits in a given time slot is given
by:
ps=pt(1 −pt)n−1=1
n„1−1
n«n−1
≈1
ne (1)
Note that psis the same for each node i, 1 ≤i≤n.
The process of neighbor discovery can be then be treated
as a coupon collection problem in the following manner: con-
sider a fictitious node Cwhich can be regarded as the coupon
collector. In each slot, Cdraws one of the ncoupons (i.e.
discovers a given node) with probability ps, and draws no
coupon (corresponding to an idle slot or a collision) with
probability 1 −nps. It is easy to see that when Ccollects
ndistinct coupons, in our case, it means that each node in
the clique has discovered all of its n−1 neighbors. Most of
the following analysis proceeds in a similar manner to that
of the Coupon Collector’s Problem.
Let the random variable Wdenote the number of slots
needed for the fictitious node Cto discover all nnodes. We
1See [14] for an elegant derivation of the main results for the
Coupon Collector’s Problem.
can think of the neighbor discovery process as divided into
epochs, each epoch consisting of one or more time slots. Let
Widenote the length of epoch i, 0 ≤i≤n−1, that starts
when the i-th node is discovered and ends when the i+ 1-st
node is discovered. Thus, in the i-th epoch there are n−i
nodes yet to be discovered, each of which has a probability ps
of being discovered in a given time slot. It is easy to see that
the epoch length,Wi, is a Geometric random variable with
parameter (n−i)ps. Thus, noting that W=W0+...+Wn−1,
we get
E[W] =
n−1
X
i=0
E[Wi] = 1
(n−i)ps
=1
ps
n
X
i=1
1
i=1
ps
Hn≈neHn
where Hndenotes the n-th Harmonic number and is given
by ln n+θ(1). Therefore,
E[W] = ne(ln n+θ(1)) = ne ln n+O(n) (2)
In Appendix A.1, we obtain an upper bound on the error
introduced in psdue to the approximation in (1) and show
that the error goes to 0, for large n. In other words, E[W]→
ne, for large n.
3.4 Sharp Concentration Around The Mean
We next show that Wis sharply concentrated around its
mean. As described in [14], we use the Poisson approxima-
tion to the binomial distribution to provide an approximate
argument. A more rigorous proof similar to the one detailed
in [14][pp.61-63] is available in [20].
Let Ni(t) be a random variable that denotes the number
of successful transmissions by node iin the first ttime slots.
It is easy to see that Ni(t) is a binomial random variable
with probability mass function:
P(Ni(t) = k) = t
k!pk
s(1 −ps)t−k
Using the Poisson approximation (assuming large tand small
ps),
P(Ni(t) = k) = e−λλk
k!
where λ=tps. Let Et
idenote the event that node iis not
discovered in tslots. Therefore,
P(Et
i) = P(Ni(t) = 0) = e−tps
Substituting ps=1
ne as given by (1) into the expression for
P(Et
i) yields
P(Et
i) = e−t
ne
Therefore,
P(¬Et
i) = 1 −e−t
ne
We are interested in the probability that all nnodes are
discovered by time ti.e. P[¬(∪n
i=1Et
i)].
P[¬(∪n
i=1Et
i)] = P[∩n
i=1(¬Et
i)] (3)
We next show that Et
is can be treated as independent events.
Claim: For 1 ≤i≤n, and for any set of indices
{j1,...jk}not containing i,P[Et
i| ∩k
l=1 Et
jl]≈P[Et
i]
Proof.
P[Et
i| ∩k
l=1 Et
jl] = P[Et
i∩(∩k
l=1Et
jl)]
P[∩(∩k
l=1Et
jl]=(1 −(k+ 1)ps)t
(1 −kps)t
Using the approximation 1+ x≈exfor small x, in the above
equation yields:
P[Et
i| ∩k
l=1 Et
jl]≈e−t(k+1)ps
e−tkps=e−tps=e−t
ne =P[Et
i]
Substituting into (3), we get
P[¬(∪n
i=1Et
i)] = (1 −e−t
ne )n≈e−ne
−t
ne
Therefore,
P[W > t] = 1 −P[¬(∪n
i=1Et
i)]
Let t=ne(ln n+c) for some constant c∈ ℜ. Therefore,
P[W > t =ne(ln n+c)] = 1 −e−ne−(ln n+c)= 1 −e−e−c
Observe that e−e−cis close to 1 for large positive cand is
negligibly small for large negative c, thus implying a sharp
concentration around the mean.
3.5 Validation of Clique Assumption
Our analysis of the ALOHA-like neighbor discovery algo-
rithm was restricted to a single clique. In this section, we
show that the analytical results compare remarkably well
against results obtained from simulation of a multi-hop net-
work, even for small clique sizes. The metric used for the
comparison is the expected time required by a node to dis-
cover all its neighbors.
Our simulation setting consists of a uniform distribution
of nodes over a 2D plane of area 3km ×3km. Each node
has a fixed transmission range of 150m and is assumed to
know the average number of neighbors apriori. For instance,
with a total of 2000 nodes, the average number of neighbors
per node is 16. Hence, the transmission probability of each
node in our simulations is set to pt= 1/17. After each
run, we compute the average time required by a node to
discover all its neighbors. For each node density, we run the
simulation 20 times, each corresponding to a different node
placement. Each data point shown in Figure 1 is an average
over 20 runs. We plot the 95% confidence intervals around
each data point (too small to be visible in the graph).
Note that the x-axis in the graph denotes the expected
number of neighbors per node. To obtain the results from
our analytical model for this deployment, we set the clique
size, n, to be one more than the average number of neigh-
bors per node i.e. substitute n= 17 in equation (2). In
Figure 1, we show a comparison of the simulation and ana-
lytical results for different node densities. We immediately
observe a close match between the analytical and simula-
tion results. In fact, the analytical results are within 15%
of the simulation results, even for small values of n, e.g.
4≤n≤8. For larger values of n, the analytical results are
always within 10% of the simulation results. When n= 2,
we observe a 34% error between the analytical and simula-
tion results. However, the large percentage error for small
values of nis mainly due to the approximation in (1). Using
an exact calculation, our analytical results are within 1% of
the simulation results for n= 2 and within 3% for n= 3.
One reason for the close match between the analytical
and simulation results is that nodes in the center of the
plane have approximately the same number of neighbors,
each of which transmits with the same probability pt, which
1
10
100
1000
0 5 10 15 20 25
Expected Time To Discover All Nbrs
Average Number of Neighbors
Analytical results
Simulation results
Figure 1: Validation of the Clique assumption
is well approximated by the clique assumption. The bound-
ary nodes belong to smaller sized cliques compared to the
central nodes, but they are far fewer in number and as a
result, the average discovery time is dominated by the dis-
covery times of the central nodes. In order to eliminate the
boundary effects, we also simulate the algorithm by placing
the nodes on a torus, producing more homogeneous deploy-
ments. As expected, absence of boundary effects results in a
closer match between the simulation and analytical results
for every value of n, as compared to the simulations on a 2D
plane. For n= 2, we observe a 26% error, and less than 10%
error for n≥5. Again, the large percentage error for smaller
values of nis dominated by the approximation in (1).
4. COLLISIONDETECTION-BASEDNEIGH-
BOR DISCOVERY ALGORITHM
We next consider the scenario when nodes have a reli-
able collision detection mechanism. As will soon become
clear, collision detection allows each node to know when it
has been discovered by its neighbors. Thus, nodes can stop
transmitting once they have been discovered, producing a
significant improvement in performance over the ALOHA-
like algorithm.
We start out with the same simplifying assumptions as
described in Section 3, viz. we consider a single clique of size
n, where nis known to all nodes and nodes are synchronized
with each other.
4.1 Algorithm Description
Let the local variable i(maintained by each node) denote
the number of neighbors discovered so far. Initially, i= 0.
Each time slot is further sub-divided into two sub-slots, the
significance of which will become clear as we describe the
algorithm. The algorithm operates as follows.
At each time slot, each node does the following:
1. In the first sub-slot, transmit with probability pi=
1/(n−i) and receive with probability 1 −pi.
2. In the second sub-slot:
(a) a node in receive mode in the first sub-slot, checks
if the transmission was successful. If yes, it sets
i←i+ 1. Else, it deterministically transmits in
the second sub-slot.
(b) if a node in the transmit mode in the first sub-
slot, detects energy in the second sub-slot, it as-
sumes its transmission was unsuccessful. Else, it
will switch to the receive mode for the rest of the
discovery process.
Thus, we see that collision-detection allows each node to
keep track of the number of nodes yet to be discovered and
adapt its transmission probability at each time slot. We also
observe that, if a collision occurs in the first sub-slot, each
node needs to transmit only one bit of information in the
second sub-slot. As a result, the second sub-slot is much
smaller in comparison to the first sub-slot and introduces
only a small overhead.
There is, however, one problem with the algorithm de-
scribed above. Consider the case when i= 0. Now, if all n
nodes transmit in the first sub-slot, there is no receiver at
all to provide feedback in the second sub-slot. Consequently,
all nnodes erroneously assume that their transmissions were
successful and therefore, switch to the receive mode for the
rest of the discovery process. We next propose a solution to
handle this problem.
4.2 The Case of All Nodes Transmitting
When i= 0, the probability, pa, of all nnodes transmit-
ting in the first sub-slot equals 1/nn. When nis large, this
probability is negligibly small. For instance, when n= 5,
pa= 1/55= 0.0003. But for smaller values of n, this prob-
ability is non-negligible. In order to provide feedback to
the transmitters, we divide the second sub-slot of each time
slot into rmini-slots, where ris fixed. Each transmitter
in the first sub-slot then transmits in a randomly chosen k
of the rmini-slots. Now, if a transmitter detects energy in
any of the remaining r−kmini-slots, it knows that there
was at least one other transmitter in the first sub-slot and
its transmission must, therefore, have been unsuccessful. A
node in receive mode transmits in each of the rmini-slots
on unsuccessful transmission and remains silent otherwise.
We now derive the probability Pethat each of the nnodes
transmits in the first sub-slot and none of the nodes get feed-
back about their unsuccessful transmission. This happens
when each of the nnodes transmit in the same kof the r
mini-slots following the first sub-slot. Therefore,
Pe=1
nn
1
`r
k´n
For example, when r= 8,k= 4, and n= 2, we see that
Pe= 0.00005, which is very small. For larger values of n,Pe
is even smaller. Thus, we see that even a small ris sufficient
to keep Pevery small.
Note that the duration of each of the mini-slots can be
as small as that of a single bit. Hence, the overhead intro-
duced by the rmini-slots is very small. Furthermore, the
rmini-slots are needed only until the discovery of the first
node. As per our algorithm description, after the first node
has been discovered, it will remain in receive mode for the
rest of the discovery process and can reliably provide feed-
back to the transmitters. Based on the solution for handling
simultaneous transmissions, we henceforth assume that Pe
is negligibly small and ignore it in our analysis hereafter.
4.3 Expected Time To Discover All Neighbors
Again, we are interested in the time, W, required to dis-
cover all nnodes in the clique. As before, let us assume that
discovery is divided into “epochs”, each epoch consisting of
one or more slots. Each “epoch” i, 0 ≤i≤n−1, starts
when the i-th node is discovered and ends upon discovery
of the i+ 1-st node. Let Widenote the duration of epoch i.
Then,
W=
n−1
X
i=0
Wi
Note that as per the description of the algorithm, there are
n−iundiscovered nodes in epoch i, each of which transmits
with probability pi= 1/n −iat the beginning of each time
slot throughout the duration of the epoch. The probability
of a successful transmission in a time slot of epoch iis given
by:
ps(i) = pi(1 −pi)n−i−1=1
n−i„1−1
n−i«n−i−1
It is easy to see that each Wiis a geometrically distributed
random variable with parameter (n−i)ps(i). Therefore,
E[W] =
n−1
X
i=0
E[Wi] =
n
X
i=1
1
`1−1
i´i−1≤ne (4)
where the last inequality follows from Lemma 1 in Appendix A.
Compared to the expression for E[W] for the ALOHA-like
discovery algorithm, we observe an improvement by a factor
of at least ln n. In Appendix A.2, we show that ne −eHn≤
E[W]≤ne, where Hndenotes the n-th Harmonic number.
In other words, E[W] = Θ(ne).
4.4 Bounds on Deviation From Expectation
We next bound the probability that random variable W
is significantly greater than its mean. Let W′be another
random variable, which is a sum of niid Geometric random
variables with parameter 1/e. It follows that W′is a nega-
tive binomial random variable with parameters nand pand
has a probability mass function:
P(W′=t) = t−1
n−1!pn(1 −p)t−n, t =n, n + 1,...
Also, we know that P(W′> t) = P(X < n), where X∼
Binomial(t, p).
We now use Chernoff bounds for a binomial random vari-
able to bound the probability that P(X < n). In particular,
for a binomial random variable Xwith mean µ=tp, it can
be shown [14, pp.70] that:
P(X < (1 −δ)µ)< e−µδ 2/2,0< δ ≤1 (5)
Let δ= 1−ne/t. Note that 0 < δ < 1,∀t > ne. Substituting
into (5) yields:
P(W′> t) = P(X < n)< e
−t
2e[1−ne
t]2,∀t≥ne
Thus,
P(W′> t = 2ne)< e
−n
4
Noting that W=Pn
i=1 Wi, where each Wiis geometrically
distributed with parameter at least 1/e, it is easy to see that
P(W > t)≤P(W′> t)< e
−n
4
It is easy to see that the bound on the right hand side goes
to 0 for large values of n. In other words, W≤2ne w.h.p.
5. UNKNOWN NUMBER OF NEIGHBORS
Thus far, we assumed that each node has apriori knowl-
edge of the number of neighbors n. Knowledge of number of
neighbors allowed each node to set its transmission proba-
bility to the optimal value of 1/n. Furthermore, knowledge
of nmakes the problem of termination of neighbor discov-
ery trivial. In particular, we can configure each node to
execute the algorithm for a duration of tslots, where tis
chosen large enough that the probability of not discovering
all nneighbors by time t(as determined by our analyses in
earlier sections) is negligibly small.
We are now ready to relax the assumption that each node
knows n. In fact, we consider the most stringent condition
in which each node has no estimate of n. As we will see,
rather surprisingly, the lack of an estimate of n, results in
at most a factor of two slowdown. We postpone the prob-
lem of detecting termination when nodes do not know nto
Section 7.
5.1 ALOHA-likeNeighbor DiscoveryAlgorithm
We first show how the ALOHA-like algorithm can be ex-
tended to operate when nis unknown to the nodes.
The execution of the algorithm proceeds in phases, each
phase consisting of one or more time time slots. The al-
gorithm operation is very simple. In phase i, each node
transmits with probability 1/2i, where each phase ilasts a
duration of 2ie(ln 2i+c) slots, where cis a positive constant.
The overall idea is that nodes geometrically reduce their
transmission probabilities until they enter the desired phase
of execution. In our case, this occurs when nodes enter the
⌈log2n⌉-th phase. In this phase, each node transmits with
probability close to 1/n for a duration of ne(ln n+c) slots.
Based on our analysis in Section 3, we know that the proba-
bility that there is an undiscovered node after the ⌈log2n⌉-th
phase is 1−e−e−c. In other words, all nnodes are discovered
within ⌈log2n⌉phases w.h.p.
The total time Wspent (in terms of number of slots)
before all nodes are discovered w.h.p is then the sum of
the total number of slots in the first ⌈log2n⌉phases of the
algorithm execution and is given by:
W=
⌈log2n⌉
X
m=1
2me(ln 2m+c)
W=eln 2
⌈log2n⌉
X
m=1
m2m+ce
⌈log2n⌉
X
m=1
2m(6)
The first term in the above summation can be evaluated as
follows. Let
f(x) =
k−1
X
m=0
xm=xk−1
x−1
Differentiating f(x) with respect to x, we get:
f′(x) =
k−1
X
m=0
mxm−1=(x−1)kxk−1−(xk−1)
(x−1)2
It is easy to see that the first summand in (6) is equal to
2f′(2).
2f′(2) =
k−1
X
m=1
m2m= (k−2)2k+ 2
Substituting k=⌈log2n⌉+ 1 yields:
⌈log2n⌉
X
m=1
m2m= (log2n−1)2n+ 2
The second summand in (6) is simply a geometric series and
simplifies to:
⌈log2n⌉
X
m=1
2m= 2n−2
Simplification of the above equation yields:
W= 2ne(ln n+c)−2e(ln 2n−1+c)≤2ne(ln n+c) (7)
Thus, comparing (7) with the expression for E[W] obtained
in (2), we conclude that the lack of knowledge of the num-
ber of neighbors nresults in no more than a factor of two
slowdown.
5.2 CollisionDetection-based Neighbor Discov-
ery Algorithm
As described in Section 5.1, we next extend the collision
detection-based algorithm to the case when nodes do not
have an estimate of n.
Again, we divide the execution of the algorithm into phases.
Each node maintains a local variable i, initialized to 0, that
denotes the number of nodes discovered so far. Each phase
mlasts a duration of 2m+1eslots. The algorithm operates
as follows:
In each of the 2m+1eslots of phase m, a node does the
following:
1. In the first sub-slot, it transmits with probability pi=
1/(2m−i) and receives with probability 1 −pi.
2. In the second sub-slot:
(a) a node in receive mode in the first sub-slot deter-
ministically transmits in the second sub-slot, if a
collision occurs in the first sub-slot; else it sets
i←i+ 1 and goes to step 1.
(b) if a node in transmit mode in the first sub-slot de-
tects no energy in the second sub-slot, it switches
to receive mode for the rest of the process. Else,
it assumes its transmission was unsuccessful and
goes back to step 1.
It is easy to see that when m=⌈log2n⌉, the phase lasts
a total of 2ne time slots. For each slot in the ⌈log2n⌉-th
phase, the probability of a successful transmission in that
slot is given by:
ps(i) = 1
n−i„1−1
n−i«n−i−1
≥1
(n−i)e
where the inequality follows from Lemma 1. Assuming there
are knodes yet to be discovered at the beginning of phase
m, we can use the analysis in Section 4.4 to conclude that
P(Wk>2ne)< e−n(1−k
2n)2≤e−n
4, k = 0,1,...,n
where the random variable Wkdenotes the time required to
discover the remaining knodes, when the probability of dis-
covering a node in a time slot is at least 1/e. In other words,
all nnodes are discovered within ⌈log2n⌉phases w.h.p.
Hence, the total time Wrequired to discover all the neigh-
bors w.h.p is given by:
W=
⌈log2n⌉
X
m=1
2m+1e= 4(n−1)e(8)
If we assume that the our desired probability of not discover-
ing all nneighbors within a given time is upper bounded by
e−n
4, we know based on the analysis in Section 4.4 that when
nis known, the collision detection-based algorithm takes
2ne time slots to achieve this desired probability bound.
From (8), we conclude that lack of knowledge of nresults in
no more than a factor of two slowdown.
6. ASYNCHRONOUSNEIGHBORDISCOV-
ERY ALGORITHMS
We next relax the assumption that time is divided into
slots and that nodes are synchronized on slot boundaries.
In particular, we now consider an unslotted system in which
nodes operate asynchronously. We propose asynchronous
versions of the discovery algorithms described earlier and
show that the asynchronous algorithms are only two times
slower than their synchronous counterparts. Our results are,
therefore, consistent with other results [18] which observe a
factor of two reduction in throughput in going from slotted
to unslotted ALOHA.
For the moment, we assume that all nodes start executing
neighbor discovery at the same time instant, an assumption
which is relaxed in Section 7.1.
6.1 ALOHA-like Neighbor Discovery
The asynchronous ALOHA-like algorithm is based on a
similar algorithm described in [19]. The algorithm operates
as follows. In between successive transmissions, each node
remains in receive mode for an exponentially distributed
time interval with mean 1/λ. Each transmission lasts a du-
ration of τ, which is assumed to be small relative to 1/λ.
By trivially extending the analysis in [19] to the case of
omni-directional antennas, we can derive the optimal λthat
maximizes the rate of discovery of neighbors:
λ=1
2τn
where ndenotes the clique size.
6.1.1 Analysis For Known n
We first analyze the asynchronous ALOHA-like neighbor
discovery algorithm when each node is assumed to know n.
We derive the expected time, E[W], required for all nnodes
to be discovered.
Due to inter-transmission times being exponentially dis-
tributed, the total traffic from all the nodes constitutes a
Poisson process with rate nλ. Now, a transmission from a
node at time instant tis successful only if there is no other
transmission for the time interval [t−τ , t +τ]. The proba-
bility psof a successful transmission is therefore given by:
ps=e−2nτλ = 1/e
As in the synchronous case, we assume that neighbor dis-
covery is divided into epochs, where epoch i, of duration
Wi, starts with the discovery of i-th node and ends with the
discovery of the i+ 1-st node. Thus, W=Pn−1
i=0 Wi, as
before.
Let us restrict our attention to epoch i, in which there are
n−inodes yet to be discovered. The transmissions from
these n−inodes constitute a Poisson process with rate
(n−i)λ, each having a probability psof being successful.
In other words, Wiis exponential with mean 1/((n−i)λps).
Therefore, E[Wi] = 2τne/(n−i), and
E[W] =
n−1
X
i=0
E[Wi] = 2τneHn= 2τne(ln n+θ(1))
In other words, the loss of synchronization results only in a
factor of two slowdown, as expected.
6.1.2 Sharp Concentration Around the Mean
As described in Section 3.4, we next show that Wis
sharply concentrated around its mean. Let Ni(t) denote
the number of successful transmissions from node iby time
t. Let Qi(t) denote the total number of transmissions from
node iby time t. The conditional pmf P(Ni(t) = k|Qi(t) =
t) is then given as:
P(Ni(t) = k|Qi(t) = m) = m
k!pk
s(1 −ps)m−k
Now, Qi(t) is a Poisson random variable with rate λ. Re-
moving the conditioning, we get
P(Ni(t) = k) =
∞
X
m=0 m
k!pk
s(1 −ps)m−ke−λt (λt)m
m!
Let Et
idenote the event {Ni(t) = 0}. Therefore,
P(Et
i) =
∞
X
m=0
(1 −ps)me−λt (λt)m
m!=e−λtps=e−t
2τne
Proceeding exactly as described in Section 3.4, we get,
P[W > t] = 1 −P[¬(∪n
i=1Et
i)]
Therefore,
P[W > t = 2τ ne(ln n+c)] = 1 −e−ne−(ln n+c)= 1 −e−e−c
6.1.3 Analysis For Unknown n
We now extend the asynchronous ALOHA-like algorithm
to the case where nis not known to the nodes. As before, the
algorithm execution is divided into phases. We assume that
nodes are synchronized on phase boundaries, an assumption
which will be relaxed in Section 7.1.
The algorithm operates as follows. In phase i, each node
remains in the receive mode for an exponential amount of
time with mean 1/λi= 2i+1τbetween successive transmis-
sions. Each phase ilasts for a duration of 2i+1τ e(ln 2i+c)
time units.
It is easy to see that the ⌈log2n⌉-th phase lasts a dura-
tion of 2τne(ln n+c) time units. In this phase, each node
transmits with rate λ= 1/2τn. Based on our analysis in
Section 6.1.1, we know that the probability that a node re-
mains undiscovered at the end of this phase is 1 −e−e−c,
which is very small for large positive constant c.
Thus, the total time Wrequired to discover all neighbors
w.h.p equals the total time until and including the ⌈log2n⌉-
th phase and is given by:
W=
⌈log2n⌉
X
i=1
2i+1τ e(ln 2i+c)
A calculation similar to that in Section 5.1 yields:
W= 4τne(ln n+c)−4τe(ln 2n−1+c) (9)
Again, we observe no more than a factor of two slowdown
from the case when nis known. Furthermore, comparing W
in (9) with that in (7), we conclude that the asynchronous
algorithm is only twice as slow as its synchronous version.
6.2 CollisionDetection-based Neighbor Discov-
ery
We next present an asynchronous version of the collision
detection-based neighbor discovery algorithm. Before de-
scribing the algorithm, we illustrate the feedback mecha-
nism in an unslotted system. As before, each message is
assumed to be of duration τand is followed by a feedback
period of duration ∆ to obtain receiver status feedback. Let
κ=τ+ ∆. Consider the timeline of an asynchronous colli-
sion detection-based algorithm, as shown in Figure 2, which
consists of (i) Unsuccessful Busy Periods, during which two
or more nodes transmit concurrently; (ii) Feedback Periods
immediately following a message transmission; (iii) Idle Pe-
riods during which no transmissions occur; and (iv) Suc-
cessful Busy Periods during which exactly one transmission
occurs. We assume that at any time instant each node in
the receive mode can detect if the wireless channel is busy or
idle. As in the synchronous version, the key idea here is that
M3
M1 M2
M4 M5
Timeline
Period
Feedback
Unsuccessful Busy Period Idle Period Successful Busy
Period
Figure 2: Asynchronous Collision Detection-based
Neighbor Discovery
each node that has been successfully discovered stops trans-
mitting, thus allowing other nodes to be discovered faster.
Conversely, nodes yet to be discovered increase their trans-
mission rate as other nodes get discovered. We start by
describing our algorithm for the case when the clique size,
n, is known to all nodes.
6.2.1 Known n
Let the local variable i, initialized to 0, denote the number
of neighbors discovered thus far. The algorithm operates as
follows.
1. Each node remains in the receive mode for an expo-
nential duration with mean 1/λi= 2κ(n−i). While
in the receive mode, a node does the following:
(a) If a collision occurs, it deterministically transmits
at the end of the busy period, after which it con-
tinues to remain in the receive mode.
(b) If a message is successfully received and the node
detects no energy until the end of the feedback
period, it sets i←i+ 1.
2. A node in the transmit mode does the following:
(a) If its transmission begins in a busy period, it as-
sumes that its transmission is unsuccessful.
(b) If its transmission starts in an idle period and it
detects no energy during the feedback period, its
transmission was successful. The node switches
to the receive mode for the remainder of the dis-
covery process.
Based on the algorithm description, we make three impor-
tant observations:
1. A message transmission at time tis successful only if
no other transmission occurs within the time window
[t−κ, t +κ].
2. A node can begin a transmission during the transmis-
sion of another node, despite detecting a busy period.
The algorithm performance can be improved by sup-
pressing such transmissions. However, as we will see,
despite transmitting in a busy period, we obtain an
algorithm which is only two times slower than its syn-
chronous version. Thus, transmission suppression can
only improve this constant and not the asymptotic or-
der.
3. Unlike its synchronous version, the asynchronous colli-
sion detection-based algorithm does not require mini-
slots. In an unslotted system, the probability of two
or more nodes transmitting simultaneously is 0. This
fact and the ability of each node to distinguish between
busy and idle periods allows each transmitting node to
reliably detect the status of its transmission.
We are now ready to analyze the performance of the al-
gorithm. Let Wdenote the time to discover all nnodes.
As before, divide the discovery process into epochs, where
the i-th epoch is of duration Wi. In epoch i, there are
n−inodes yet to be discovered, each transmitting with
rate λi= 1/(2κ(n−i)). Since the transmission events of an
individual node constitute a Poisson process with rate λi,
the transmission events from the n−iyet to be discovered
nodes also follow a Poisson process with rate (n−i)λi.
Now, the probability that a transmission by one of the
n−iyet to be discovered nodes is successful is given by:
ps(i) = e−2(n−i)κλi= 1/e
Now, the successful transmission events from the n−iyet
to be discovered nodes follow a Poisson process with a rate
given by (n−i)λips(i) = 1/2κe. In other words, the random
variables Wiare iid and exponentially distributed with mean
2κe.
Noting that W=Pn−1
i=0 Wi, it follows that the random
variable Wis the sum of niid exponential random variables.
Therefore, Wis an n-stage Erlang random variable with
mean:
E[W] =
n
X
i=1
E[Wi] = 2κne
We immediately conclude that the the asynchronous version
of the collision detection-based neighbor discovery is only
twice as slow as its synchronous version.
6.2.2 Bounds on Deviation From Expectation
We now bound the probability that Wdeviates signifi-
cantly from its expectation. In particular, for any random
variable Wand any t > 0, we have the following Chernoff
bound [15]:
P(W≥a)≤inf
t>0e−taMW(t) (10)
where MW(t) = E[etW ] denotes the moment generating
function of the random variable W. For an n-stage Erlang
random variable Wwith rate λ:
MW(t) = „λ
λ−t«n
Using elementary calculus, the value of tthat minimizes the
right hand side of (10) can be obtained as:
t∗=λ−n
a
Setting a=αE[W] = αn/λ yields:
P(W > αE [W]) ≤“α
eα−1”n
When α= 2, we get
P(W > 4κne) = (2/e)n
which goes to 0 for large values of n.
6.2.3 Unknown n
We now consider the case when nodes have no knowledge
of n. Again, we divide the algorithm execution into phases.
Nodes are assumed to be synchronized on phase boundaries.
The m-th phase has a duration 2m+2κe. Each node main-
tains a variable ithat denotes the number of nodes discov-
ered so far. In phase m, a node remains in the receive mode
for an exponential duration with mean 1/λi= 2κ(2m−i)
between successive transmissions.
We see that the ⌈log2n⌉-th phase lasts a duration of 4κne
time units. Let kdenote the number of neighbors yet to be
discovered at the beginning of the ⌈log2n⌉-th phase. From
our analysis in Section 6.2.1, we know that the probability
that it takes longer than 4κne to discover the remaining k
nodes is:
P(Wk>4κne)≤“α
eα−1”k
where Wkdenotes the time to discover the remaining k
nodes. Wkis a k-stage Erlang random variable with mean
E[W] = 2κke and αis given by:
α=4κne
E[Wk]=2n
k>1
It is easy to see that P(Wk>4κne)→0 for large n. In
other words, all nnodes are discovered by the ⌈log2n⌉-th
phase w.h.p. Hence the total time Wbefore all nodes are
discovered w.h.p is given by:
W=
⌈log2n⌉
X
m=1
2m+2κe = 8(n−1)κe (11)
Thus, we observe no more than a factor two slowdown from
the case when nis known. Comparing the expression for
Win (11) with that in (8), we again conclude that the
asynchronous algorithm is only two times slower than its
synchronous version.
7. HANDLING START AND STOP TIMES
So far, we have treated neighbor discovery as if all nodes
begin at the same time. We also assumed that the nodes are
synchronized on the phase boundaries in the case of asyn-
chronous algorithms. Furthermore, when nodes do not know
n, we avoided the question of how nodes determine when
to terminate neighbor discovery. We address each of these
questions in this section.
7.1 Initiating Neighbor Discovery
It is realistic to assume that not all nodes in a wireless
network are deployed at the same time instant. In fact, the
deployment of the network may occur over a period of days.
Since wireless nodes are battery powered, minimizing energy
consumption is of utmost importance. Thus, it is appropri-
ate to deploy the nodes in a sleep mode, in which nodes
cannot send or receive messages. Suppose that the deploy-
ment of a wireless network takes place during the time inter-
val [t, t +η], where ηis an upper bound on the deployment
period and is known in advance. When nodes have access
to a global clock, as in the case of a slotted, synchronous
system, initiating neighbor discovery is trivial, as each node
can begin execution at a globally agreed upon time instant
t′≥t+η.
In an asynchronous system, however, nodes do not have
access to a global clock and furthermore, the clocks at dif-
ferent nodes may proceed at different rates resulting in clock
offset between nodes. We assume that the maximum clock
offset between any two nodes in the network is bounded by
δ. In reality, clock offset between nodes can potentially grow
unboundedly as clocks tick at different rates. However, the
neighbor discovery occurs over much shorter time scales and
therefore, it is reasonable to assume a fixed δfor the duration
of the discovery phase. Each node wakes up from the sleep
mode when its local clock reaches t′and starts executing the
neighbor discovery algorithm. To account for clock offsets,
we simply add δtime units to each phase i.e. phase ilasts for
2i+1e(ln 2i+c) + δtime units for the ALOHA-like algorithm
and 2i+1e+δtime units for the Collision Detection-based
algorithm. Thus, all nodes are simultaneously in phase ifor
at least 2i+1e(ln 2i+c) time units in the case of ALOHA-
like algorithm and 2ietime units in the case of Collision
Detection-based algorithm, thus guaranteeing all nodes are
discovered w.h.p when i=⌈log2n⌉, as desired.
To get a sense of how large δis, we consider Mica2 motes
equipped with a 32.768 kHz quartz crystal oscillator and
with a real-time clock accuracy of ±10 ppm [16]. This cor-
responds to an accuracy of ±864 milliseconds per day or a
maximum clock offset of 1.7 seconds per day between any
two nodes. Thus, if the deployment spans a period of 3 days,
δis set to 5.1 seconds. With actively compensated oscilla-
tors [12] that provide an accuracy of ±160 milliseconds/day,
δreduces to 1 second for the same deployment period.
7.2 Terminating Neighbor Discovery
We now discuss how nodes can terminate the neighbor
discovery process, when nis unknown to nodes. We start
with the ALOHA-like discovery algorithm.
7.2.1 ALOHA-like Neighbor Discovery Algorithm
We propose a probabilistic solution that allows nodes to
decide at the end of each phase of algorithm execution,
whether to proceed to the next phase, based on the num-
ber of distinct neighbors that successfully transmit in that
phase. For ease of explanation, we consider the slotted, syn-
chronous version of the discovery algorithm. The termina-
tion detection holds without change for the asynchronous
version as well.
Termination in a Clique.
We first consider the problem of termination in a clique.
To simplify discussion, we initially assume nodes are syn-
chronized on phase boundaries and relax this assumption
later. Let Xjbe the number of distinct nodes discovered by
each node in phase j, including itself. Then the termination
condition used by each node is:
TC Stop at the end of phase j+1 if Xj>2j−1∧Xj+1 ≤2j.
Let mbe the largest integer such that the clique size, n=
2m+k, 0< k ≤2m. We first argue that the algorithm ter-
minates by the end of m+2-th phase w.h.p. The probability
of successful transmission by a given node in a time slot of
phase m+ 1 is given by:
pm+1
s=1
2m+1 „1−1
2m+1 «2m+k−1
Therefore,
pm+1
s≥1
2m+1 „1−1
2m+1 «2m+1−1
≥1
2m+1e
where the second inequality follows from Lemma 1 in Ap-
pendix A. Using an analysis exactly as that in Section 3,
we immediately conclude that the event {Xm+1 =n}occurs
with probability at least e−e−c. Similarly,
pm+2
s=1
2m+2 „1−1
2m+2 «2m+k−1
≥1
2m+2e
Again, proceeding exactly as described in Section 3, we can
conclude that the event {Xm+2 =n}occurs with probabil-
ity at least e−e−c. Since the events in successive phases are
independent of each other and n > 2m∧n≤2m+1, it fol-
lows that the event {Xm+1 >2m∧Xm+2 ≤2m+1 }occurs
with probability at least e−2e−c, which goes to one for large
positive c. In other words, the algorithm is terminated by
the end of the m+ 2-th phase w.h.p.
However, it is possible that the algorithm may terminate
too early i.e. in a phase j≤m, before all nodes are discov-
ered. We next derive the probability, Pe, of the algorithm
terminating in a phase j≤m. From Section 3.4, we know
that the time between successful transmissions by each node
iis exponentially distributed. Let Yj
ibe the time of first
successful transmission by node iin phase j. Thus, Yj
iis
exponentially distributed with the following distribution:
P(Yj
i≤t) = 1 −e−tpj
where pjis the probability of a successful transmission by
node iin phase jand equals 1
2j`1−1
2j´n−1. It is easy to
see that the Yj
is are iid random variables. Let the random
variables Yj
(1) ≤ · · · ≤ Yj
(n)be obtained by permuting the
random variables Yj
is in increasing order. Thus, Yj
(k)denotes
the k-th order statistic.
Let Ajdenote the event {Xj>2j−1∧Xj+1 ≤2j}. Since
events in successive phases are independent of each other,
we get:
P(Aj) = P[Yj
(2j−1)≤tj]P[Yj+1
(2j)> tj+1] (12)
where the distribution of the k-th order statistic is given by:
P[Yj
(k)≤t] =
n
X
a=k n
a![P(Yj
i≤t)]a[1 −P(Yj
i≤t)]n−a
Therefore,
Pe=P(
m−1
[
j=1
Aj)≤
m−1
X
j=1
P(Aj) (13)
where P(Aj) is obtained from equation (12). We numeri-
cally evaluate the upper bound for Pein (13) by varying n
and setting the constant c= 8. For each nin the range
[2,100], we find that Pe≤10−5, which is clearly very small.
We simulate cliques of sizes ranging from 2 to 100, repeating
the simulation 100 times for each clique size. The simula-
tion results confirm that each node always terminates in the
m+ 2-th phase, as desired.
We finally relax the assumption that nodes are synchro-
nized on phase boundaries. We propose that each node in-
clude in its messages the phase number it is currently in.
Each node iwhich is currently in phase jdiscards any mes-
sage it receives from a neighbor which is in a phase k6=j.
Thus, Xjis computed only from the messages transmitted
during phase j, as desired.
Termination in a Multi-Hop Network.
In a multi-hop network, neighboring nodes can potentially
terminate at different time instants. Consider the case where
a node Abelongs to a smaller clique in comparison to an-
other node B, but that they are connected to each other via
an edge A−B. Thus, Ahas fewer interfering nodes com-
pared to Band is likely to discover Bbefore Bdiscovers
A. This might cause Ato terminate (as per TC), before
Bdiscovers A. In order to avoid this situation, we propose
the following change to the termination criterion in a multi-
hop environment. We double the duration of each phase i.e.
phase ilasts a duration of 2i+1e(ln 2i+c). Each phase iis
divided into two halves of duration 2ie(ln 2i+c) each. In
the first half, each node transmits with a probability 1/2i
in each time slot, as before. In the second half, however,
each node transmits in the same slots as in the first half and
announces to its neighbors, whether it will proceed to the
next phase (as determined by TC). In our example, node
Aremains in the discovery process until it has been discov-
ered by Band stops only after Bdecides to terminate the
discovery process.
We simulate the ALOHA-like discovery algorithm in a
multi-hop setting with the termination condition described
in this section. As before, nodes are uniformly distributed
in a 2D plane of size 3km ×3km. The number of nodes is
varied from 200 to 4000. For each node density, the simula-
tion is repeated 20 times, each corresponding to a different
node placement. We observe that in every simulation each
node terminates only after it has been discovered by all its
neighbors, as desired.
7.2.2 Collision Detection-based Neighbor Discovery
Algorithm
The issue of termination of neighbor discovery is trivial
for the collision detection-based algorithm. When nodes are
synchronized on phase boundaries, we dedicate a single time
slot at the end of each phase of algorithm execution. Each
node which has not been discovered by other nodes (as de-
termined by negative acknowledgments), deterministically
broadcasts in this time slot, thereby signaling to the already
discovered nodes to proceed to the next phase. Absence of
a transmission in this time slot signals the end of the neigh-
bor discovery process. In the absence of synchronization on
phase boundaries, each node that has already been discov-
ered, simply waits an additional phase duration and termi-
nates the algorithm, if it detects no energy on the channel
during the entire phase duration.
8. CONCLUSIONS
In this paper, we studied the problem of neighbor dis-
covery in wireless networks. We proposed an O(ne ln n)
ALOHA-like algorithm when nodes do not have collision
detection and an O(ne) algorithm when nodes can detect
collisions. Unlike existing approaches, our neighbor discov-
ery algorithms do not require nodes to have knowledge of
the number of neighbors and also do not require synchro-
nization among nodes. Furthermore, our algorithms allow
nodes to begin execution at different times and also allow
nodes to detect the termination of the neighbor discovery
phase.
In the future, we would like to extend the analysis to a
multi-hop network setting. Modeling physical layer phenom-
ena such as fading and multipath is another interesting fu-
ture direction.
Acknowledgments
This research was sponsored by the U.S. Army Research
Laboratory and the U.K. Ministry of Defence and was ac-
complished under Agreement Number W911NF-06-3-0001.
Any opinions, findings, and conclusions or recommendations
expressed in this material are those of the authors and do
not necessarily reflect the views of the funding agencies.
9. REFERENCES
[1] D. Angelosante, E. Biglieri, and M. Lops. Neighbor
discovery in wireless networks:a multiuser-detection
approach. In Information Theory and Applications
Workshop, pages 46–53, 2007.
[2] L. Bao and J. J. Garcia-Luna-Aceves. A new approach
to channel access scheduling for ad hoc networks. In
ACM MOBICOM, pages 210–221, 2001.
[3] S. A. Borbash, A. Ephremides, and M. J. McGlynn.
An asynchronous neighbor discovery algorithm for
wireless sensor networks. Ad Hoc Networks,
5(7):998–1016, 2007.
[4] P. Dutta and D. E. Culler. Practical asynchronous
neighbor discovery and rendezvous for mobile sensing
applications. In ACM SenSys, pages 71–84, 2008.
[5] P. Jacquet, P. Minet, P. M¨
uhlethaler, and N. Rivierre.
Priority and collision detection with active signaling -
the channel access mechanism of hiperlan. Wireless
Personal Communications, 4(1):11–25, 1997.
[6] P. Jacquet and P. M¨
uhlethaler. Data transmission
device and method for random access network having
advanced collision resolution, December 1996. http:
//www.freepatentsonline.com/EP0635184B1.html.
[7] G. Jakllari, W. Luo, and S. V. Krishnamurthy. An
integrated neighbor discovery and mac protocol for ad
hoc networks using directional antennas. IEEE
Transactions on Wireless Communications,
6(3):1114–1024, 2007.
[8] D. B. Johnson and D. A. Maltz. Dynamic source
routing in ad hoc wireless networks. In Mobile
Computing, pages 153–181. Kluwer Academic
Publishers, 1996.
[9] A. Keshavarzian and E. Uysal-Biyikoglu.
Energy-efficient link assessment in wireless sensor
networks. In IEEE INFOCOM, 2004.
[10] L. Li, J. Y. Halpern, P. Bahl, Y.-M. Wang, and
R. Wattenhofer. A cone-based distributed
topology-control algorithm for wireless multi-hop
networks. IEEE/ACM Transactions on Networking,
13(1):147–159, 2005.
[11] J. Luo and D. Guo. Neighbor discovery in wireless ad
hoc networks based on group testing. In Annual
Allerton Conference, 2008.
[12] Maxim. 32.768khz temperature-compensated crystal
oscillator. DS32kHz Data Sheet.
[13] M. J. McGlynn and S. A. Borbash. Birthday protocols
for low energy deployment and flexible neighbor
discovery in ad hoc wireless networks. In ACM
MOBIHOC, pages 137–145, 2001.
[14] R. Motwani and P. Raghavan. Randomized
Algorithms. Cambridge University Press, 1995.
[15] R. Nelson. Probability, Stochastic Processes and
Queueing Theory. Springer-Verlag, 1995.
[16] K. Pister and L. Doherty. Tsmp: Time synchronized
mesh protocol. In IASTED Distributed Sensor
Networks, pages 391–398, 2008.
[17] R. Ramanathan, J. Redi, C. Santivanez, D. Wiggins,
and S. Polit. Ad hoc networking with directional
antennas: a complete system solution. IEEE Journal
on Selected Areas in Communications, 23:496–506,
2005.
[18] L. Roberts. Aloha packet system with and without
slots and capture. Computer Communications Review,
1972.
[19] S. Vasudevan, J. F. Kurose, and D. F. Towsley. On
neighbor discovery in wireless networks with
directional antennas. In IEEE INFOCOM, pages
2502–2512, 2005.
[20] S. Vasudevan, D. Towsley, D. Goeckel, and R. Khalili.
Neighbor discovery in wireless networks and the
coupon collector’s problem. Technical Report
UM-CS-2009-032, UMass Computer Science, 2009.
APPENDIX
A. APPROXIMATION ERROR
In this section, we calculate bounds on the approximation
error for the results derived in Section 3.3 and Section 4.3.
We first prove the following lemma.
Lemma 1.
„1−1
k«k−1
≥1
e,∀k= 1,2,...
Proof. It is easy to check that the lemma holds true
when k= 1. For k > 1,
„1−1
k«k−1
=1
“1 + 1
k−1”k−1≥1
e
The last inequality follows from a well-known mathematical
fact that (1 + 1/x)x≤e, x ≥1.
A.1 ALOHA-like Neighbor Discovery
Recall from (1), we have the following approximation:
ps=pt(1 −pt)n−1=1
n„1−1
n«n−1
≈1
ne (14)
From Lemma 1, we have:
ps=1
ne +δe(n)
where δe(n)>0 denotes the approximation error in (14).
Using Taylor’s Theorem, we can write
(n−1) ln(1 −1
n) = −1 + R(n)
where R(n) represents the error term and is given by:
R(n) = 1
n−n−1
2n2(1 −c)2,0≤c≤1/n
R(n) is maximized when c= 0 and therefore,
R(n)≤n+ 1
2n2<1
n
Therefore,
0< δe(n)<1
ne (e1
n−1) (15)
It is easy to see that δe(n)→0, as n→ ∞.
Recall from (2) that E[W] = 1
psHn. Hence, we obtain:
E[W] = „1
1
ne +δe(n)«Hn
It is easy to see that E[W]→neHn, as n→ ∞.
A.2 Collision Detection-based Neighbor Dis-
covery
Recall from (4) that
E[W] =
n−1
X
i=0
E[Wi] =
n
X
i=1
1
`1−1
i´i−1≤ne
We now obtain a lower bound for E[W]. From (15), we
conclude that:
E[W] =
n
X
i=1
1
1
e+iδe(i)=
n
X
i=1
e
ieδe(i) + 1 ≥
n
X
i=1
e
e1
i
where e−1
i= 1 −1
i+1
2!i2−1
3!i3+...
It is easy to see that 1
2!i2≥1
3!i3≥1
4!i4≥.... Hence,
n
X
i=1
e−1
i≥n−Hn+c≥n−Hn
where c≥0 denotes the sum of remaining terms. Hence, we
obtain
ne −eHn≤E[W]≤ne