Title: CPSC 689: Discrete Algorithms for Mobile and Wireless Systems
1CPSC 689 Discrete Algorithms for Mobile and
Wireless Systems
- Spring 2009
- Prof. Jennifer Welch
2Lecture 19
- Topic
- Location-Based Routing
- Sources
- Ko, Vaidya. Geocasting.
- Ko, Vaidya. Location-aided routing (LAR).
- Kranakis, Singh, Urrutia. Compass routing.
- Karp, Kung. GPSR Greedy perimeter stateless
routing. - Bose, Morin, et al. Routing with guaranteed
delivery. - Kuhn, Wattenhofer, Zhang, Zollinger. Geometric
ad hoc routing. - Barriere, Fraignaud, Narayanan. Robust
position-based routing. - MIT 6.885 Fall 2008 slides
3Location-based Routing
- Deliver message to a particular geographical
region, in 2D or sometimes 3D (Geocast). - Use in combination with a location service, to
implement point-to-point message delivery. - Algorithms use geographical location information.
- Well study several different strategies
- Constrained flooding
- Compass routing
- Greedy perimeter routing
- Compact routing with Euclidean metrics
- Opportunistic routing
- First Ko, Vaidya Constrained flooding
4Constrained Flooding
- Two closely-related papers Ko, Vaidya, with
similar algorithms, for two slightly different
problems - Geocast
- Route discovery for a moving device.
- Assumptions
- 2D only.
- Nodes have exact (or almost exact) knowledge of
their own geographical locations. - Based on GPS or a localization algorithm.
- Known constraints on motion patterns of mobile
devices, which make it possible to guess
approximately where they are. - Basic idea is to flood a geocast message, or RREQ
message throughout the network, to try to reach
the target geographical area. - However, dont flood everywhere---use
geographical information to bound the flooding
area.
5Geocast with Constrained Flooding
- Could solve the problem using network-wide
flooding, but inefficient. - Ko, Vaidya solutions involve flooding,
constrained by geography. - Target multicast region neednt be one-hop
radius, so some flooding may be needed at the end
anyway. - Not clear that flooding along the way is
best---e.g., might try to pass just one copy. - Flooding may work well if many messages get lost,
obstacles arise, etc.
6Completeness Metric
- Which they call accuracy.
- Fraction of the nodes that were in the multicast
region at the time of the sending event, that
receive the message.
7Forwarding Zones
- Main idea Constrain flooding using forwarding
zones, which limit where the message should be
rebroadcast. - Their algorithms define particular forwarding
zones. - Forwarding zones represent locations that are on
the way from the sender to the multicast region. - Should include the senders location and the
entire multicast region. - Large forwarding zones introduce more flooding
overhead, but may improve completeness.
8Geocasting Algorithm 1
- Identical to general flooding, except that only
nodes in the forwarding zone rebroadcast. - Forwarding zone is the smallest rectangle that
- Includes both the sender and the multicast
region, and - Has sides parallel to x and y axes.
- Animation shows only the first message arriving
at each node. - Flooding means many nodes receive the message
several times.
9Geocasting Algorithm 2
- Again, only nodes in the forwarding zone
retransmit. - But now forwarding zone is determined
on-the-fly. - Forwarding zone includes entire multicast region.
- Along the way
- Sender sends its own coordinates, and the
coordinates cm of the center of the multicast
region. - Everyone who retransmits sends its own
coordinates, plus cm. - When node j receives a packet from node i, j
decides that it is in the forwarding zone exactly
if its distance to cm is smaller (technically,
not too much larger) than is distance to cm. - Thus, actual forwarding decisions are not based
on predetermined region, but on one-hop
improvement. - Overall region of possible forwarding is the
multicast region, plus the entire circle centered
at cm, radius dist(sender, cm).
10Geocasting Algorithm 2
- Message keeps getting closer to cm.
- Does not flood through larger rectangle, but may
flood around the multicast region.
11Geocasting Evaluation
- Simulation results, comparing their algorithms to
basic, unconstrained flooding. - Both algorithms achieve completeness comparable
to basic flooding, but with much less
communication overhead. - Dont compare to non-flooding approaches.
- Q Is the flooding approach an efficient way to
get a message to the multicast region? Is it
better to send one, or a limited number of
copies, to the multicast region, then flood
through the multicast region? Tradeoffs?
12Route Discovery Using Constrained Flooding
- Location-Aided Routing (LAR).
- Now the problem is to establish a route to a node
with an unknown location, as in DSR or AODV. - Use constrained flooding methods, flooding RREQ
messages instead of data messages. - Q But how to constrain? Now we dont know the
target location - A Guess current location of target node based
on previous location and known limitations on
motion patterns (speed, direction, etc.) - Use standard RREQ, RREP on reverse route.
- Establish routes on-demand, like AODV.
- Sender reinitiates route discovery when active
route breaks.
13Route Discovery
- Multicast region
- An area that sender S thinks is likely to contain
the location of the target node D. - S calculates this based on most recent knowledge
of Ds location, plus knowledge of (maximum or
average) speed, direction, etc. - The more info S has, the smaller the multicast
region can be. - Requires synchronized clocks---info originating
from D about its position at some time must be
correlated with a time on S's clock. - Forwarding zone
- As before, used to constrain who forwards the
message a node forwards exactly if it is in the
forwarding zone. - Forwarding zone includes S and the multicast
region, plus enough other area to allow a path
between them. - If route discovery fails, S retries with a larger
forwarding zone---perhaps the entire plane
(unconstrained flooding).
14The LAR Algorithms
- LAR Algorithm 1
- Forwarding zone is smallest axis-aligned
rectangle, as before. - S includes info about the forwarding zone in the
RREQ message. - When D sends a RREP, includes its current
position, which S could use to help in future
route discoveries. - Might want to send Ds position info more
frequently, to reduce size of future multicast
regions for route discovery for D. - LAR Algorithm 2
- Try to get closer to Ds last known position
(take cm last known position, in previous
Algorithm 2). - Use some slack---at each hop see if new distance
is approximately better than previous distance. - No estimation of Ds current location, so doesnt
require clock synchronization.
15LAR Evaluation
- Simulations, comparing to unconstrained flooding
save communication overhead. - Improvement is most pronounced with high density,
large transmission ranges. - In this case, more route discoveries succeed.
- When route discoveries dont succeed, fall back
on unconstrained flooding anyway. - For route discovery, some type of flooding seems
necessary limiting flooding by using any
available info about the targets position seems
like a good idea. - Moral Geographical information can help in
message routing, even if it isnt accurate and
up-to-date.
16Compass Routing Kranakis, Singh, Urrutia
- Network model is an (undirected) geometric graph
- Vertices Points in the 2D-plane.
- Edges Straight-line segments between some of
the points. - Consider planar graphs only (no edge crossings).
- Assume source node s, destination node t.
- Problem Pass a message from s to t.
- Now consider algorithms that involve passing one
copy of the message only, no flooding. - The question is which path to follow.
- Would like an algorithm that is guaranteed to
deliver the message (perhaps for some subclass of
all geometric graphs). - Ideally, using a close-to-shortest path.
17Compass Routing Relevance
- Use in wireless ad hoc networks?
- By superimposing graph model on broadcast model,
e.g., unit disk model, or more general neighbor
discovery. - Suitable for static networks extend to dynamic?
18Local Algorithms
- Require algorithms to be local
- Message includes
- Coordinates of current node and of destination t.
- Extra storage, for a constant number of node
identifiers cannot store entire network
topology. - Each node knows identity and coordinates of its
neighbors. - Node information doesn't change during the
execution of the algorithm. - Choose next edge based just on info in message
and info at current node. - Q Why not let the node information change
during the algorithm? E.g., node could remember
visit history, detect when a message is following
a cycle. - A To save space---algorithm could be used
concurrently for many messages, requiring lots of
storage.
19Impossibility Claim
- Remember, constraints for a local algorithm
- Claim In ordinary planar graphs, without
geometric coordinates, this problem is not
solvable in general with a local algorithm (with
deterministic rules). - Proof LTTR
20Compass Routing I
- From any node, always forward message over the
adjacent edge that points most closely in the
direction of the target t (closest slope). - Example
s
t
21Compass Routing I
s
- Not every planar geometric graph supports compass
routing. - Example
t
22Delaunay Triangulation
- Delaunay triangulation of a set P of n points in
the plane - Take the convex hull (smallest convex set)
containing all the points in P. - Divide this into a set of triangles whose
vertices are exactly the points in P. - So that, for each triangle, the circle passing
through its vertices has no other point of P in
its interior.
23Delaunay Triangulation
- Theorem A unique Delaunay triangulation can
always be constructed, provided that no four
points are cocircular. - Example if 4 points are cocircular
24Delaunay Triangulation
- Be careful though not every triangulation will
be a Delaunay triangulation
25Compass Routing on Delaunay Triangulation Graphs
- Theorem 2.1 A Delaunay triangulation of any set
P of points supports compass routing. - Proof Show that, if compass routing traverses
edge (s,v) then d(v,t) lt d(s,t), strictly
decreasing. - Since there are only finitely many vertices, this
is enough to show the message reaches t. - Argument is based on simple geometric case
analysis, e.g., suppose s wants to reach t, can
travel to either x or y. - Claim
- If ? lt ? then d(x,t) lt d(s,t).
- If ? ? ? then d(y,t) lt d(s,t).
26Compass Routing, Delaunay
- Draw circle(s, x, y) t is outside.
- Draw center line to t.
- WLOG, s is above the center line, and so d(x,t) lt
d(s,t). - Suppose that ? ? ?, so y is chosen must show
that d(y,t) lt d(s,t) in this case. - Reflect s to get s.
- Use the fact that ? ? ? (and some inequalities
involving angles) to conclude that y is
counterclockwise of s. - Then d(y,t) lt d(s,t) d(s,t).
s
27Compass Routing II (Face Routing)
- First consider graphs that are constructed out of
convex polygons, then remove the restriction. - Graphs of convex polygons,
where entire collection is
also a convex polygon. - Line from s to t passes through a sequence of
convex polygons. - Normally, passes through successive edges.
- Could pass through vertices, or along edges.
- These two cases are ignored in the paper, though
probably the algorithm can be extended to handle
them.
28Compass Routing II (Face Routing)
- In the algorithm, the message moves
systematically around the successive polygons in
this sequence, until it reaches t (guaranteed). - Can do this with the limited available
information - Could alternate moving clockwise and
counterclockwise around the faces. - The message contains s and t.
- Can check whether a traversed edge crosses edge
st.
29Arbitrary Planar Geometric Graphs
- Such a graph induces a partitioning of the plane
into polygonal regions, but now - The faces needn't be convex.
- Entire collection neednt be convex.
- Some edges could stick out.
-
30Face Routing Algorithm
- p s
- repeat
- let f be face of G with p on boundary that
intersects pt - for each edge (u,v) of f do
- if uv intersects pt at p' and d(p',t) lt
d(p,t) then - p p'
- endif
- endfor
- traverse f until reaching the edge (u,v)
containing p - // traverse f counterclockwise / clockwise if
f is the outer face - until p t
31Face Routing Example
t
s
32Evaluation
- Guaranteed message arrival.
- Number of edge traversals bounded by 4 E
- Each edge can be traversed as part of two faces.
- Double again because algorithm traverses all the
way around each face before deciding. - Restriction to planar graphs
- Algorithm given for planar graphs only.
- But mobile ad hoc network communication graphs
aren't necessarily planar---typically have many
crossed edges. - How to apply the results to non-planar graphs?
33Summary of Compass Paper
- Compass Routing I Follow edge pointing in the
direction closest to that of the target. - Guaranteed arrival, for subclasses of graphs such
as Delaunay triangulations. - Similar to Follow the edge whose other endpoint
is closest to the target. Compare behavior? - Compass Routing II Face routing.
- Guaranteed arrival.
- No fault-tolerance
- Algorithms pass just one copy of the message,
subject to loss if nodes fail/move. - How to make them more fault-tolerant?
- Dynamic case
- What happens when the network topology changes?
34Greedy Perimeter Stateless Routing (GPSR) Karp,
Kung
- Similar results proved (a year earlier) by Bose,
Morin, Stojmenovic, Urrutia - Problem Geographical routing, as before.
- Basic ideas
- Forward a single copy of a message.
- Use greedy routing when possible.
- When this fails, default to (a version of) face
routing. - Each node keeps only local information.
- Claim the algorithm scales well to large
networks, and adapts well to changes in topology.
35GPSR
- Assumptions
- 2D
- Everyone knows their own positions (exactly).
- Each message source knows the (exact) position of
the message target. - Unit disk model Edges between all nodes that
are at most distance r apart reliable
communication on all edges. - Sometimes (but not usually), they consider
changing topology. - Measures
- Communication cost number of hops traversed.
- Message delivery success ratio.
- Per-node state.
36Greedy Forwarding
- Packets marked by originator with target location
t. - Forwarding node u makes locally optimal, greedy
choice of next hop the neighbor geographically
closest to t, provided that it is closer to t
than u is. - Requires nodes to know their neighbors, and their
neighbors locations - Nodes exchange (id, position) information with
neighbors. - If topology changes are considered, must do this
periodically, at a frequency based on rate of
mobility and radio range r - Periodically, each node transmits its (id,
position). - Others update their neighbor info based on the
messages they receive. - Use timeout to remove nodes from the neighbor
set. - State size depends on density of nodes in the
network, but not on the total number of nodes. - But, sometimes greedy doesn't work
37Greedy Forwarding Can Fail
- x has no neighbor closer to t than x is.
- Even if x were allowed to pass the message to its
neighbor y, y would just pass it back. - When a void is encountered, switch to face
routing mode (perimeter mode). - Could return to greedy mode, if face routing ever
reaches a node that the regular algorithm would
consider an improvement.
t
void
y
x
38Planarizing the Graph
- But face routing is defined only for planar
graphs! - Mobile network unit disk graphs arent
necessarily planar. - So they construct a planar subgraph of the UDG
(ignore some of the edges). - Two approaches
- Relative Neighborhood Graph (RNG)
- Gabriel Graph (GG)
39Relative Neighborhood Graph
- Relative Neighborhood Graph RNG(V), for a set V
of points - Nodes V.
- Edge (u, v) included iff there is no w ? u, v
such that d(u, w) and d(w, v) are both lt d(u, v). - That is, the interior of the lune is empty.
40RNG(V)
- Example KK
- RNG(V) is planar (no crossing edges) - prove later
41Algorithm to Produce an RNG
- Using local rules, identify the set of edges in
RNG(V) ? UDG(V), where V is the set of mobile
nodes. - That is, the edges in the RNG that have length
r. - Resulting graph is still planar (of course).
- Theorem If UDG(V) is connected, then so is
RNG(V) ? UDG(V).
42Algorithm to Produce an RNG
- Distributed algorithm for constructing RNG(V) ?
UDG(V) - Start with UDG(V) and remove edges.
- Each node u begins with its UDG edges, and
removes any UDG edge (u, v) for which theres
another (neighboring) node w with - max(d(u,w), d(w,v) ) lt
d(u,v). - Note the edges can all be removed in
parallel---removal condition depends solely on
distances, and not on what other edges are
removed.
43Algorithm to Produce an RNG
- Preserving connectivity
- Eliminating edges that aren't part of the RNG
can't disconnect a connected UDG - An edge is removed only if there is some other
node that is closer to both endpoints. - Use an inductive argument, based on removing one
edge at a time, in order from longest to
shortest. LTTR. - Consistency issue
- Both endpoints of an edge (u, v) should make the
same decision about whether to include edge (u,
v). - Depends on symmetry of neighbor relationship, and
accuracy of geographical information. - This works fine for the unit-disk model, in
static situations. - How to extend to weaker or more dynamic models?
44Gabriel Graph GG(V)
- Similar to RNG(V)
- Nodes V.
- Edge (u, v) included iff there is no w ? u, v
such that - (d(u,w))2 d(w,v)2 d(u,v)2.
- That is, the closed disk contains no nodes except
u and v. - A superset of the edges in RNG(V).
45GG(V)
- Example KK
- original graph Gabriel Graph
Relative Neigh. Graph
46Gabriel Graph GG(V)
- Theorem GG(V) is planar.
- Proof
- If not, we have a crossing pattern.
- But then both b and d are outside the disk with
diameter ac, and both a and c are outside the
disk with diameter bd. Means that all the four
outer angles are lt ?/2. Impossible. - Corollary RNG(V) is planar.
47Algorithm to Produce a GG
- Using local rules, identify the set of edges in
GG(V) ? UDG(V), where V is the set of mobile
nodes. - That is, the edges in the GG that have length
r. - Resulting graph is planar.
- Theorem If UDG(V) is connected, then so is
GG(V) ? UDG(V). - Proof Follows from connectivity of the RNG,
which is sparser.
48Algorithm to Produce a GG
- Distributed algorithm for constructing GG(V) ?
UDG(V) - Start with UDG(V) and remove edges.
- Each node u begins with its UDG edges, and
removes any UDG edge (u, v) for which theres
another (neighboring) node w with - (d(u,w))2 d(w,v)2 d(u,v)2.
- Edges can be removed in parallel---condition
depends solely on distances. - Again, consistency depends on symmetry of
neighbor relationship, and accuracy of
geographical information.
49Putting the Pieces Together
- For the static case, assuming UDG(V) is
connected. - Predetermine a planar connected subgraph---RNG(V)
or GG(V). - Start traversing the entire graph UDV(V) using
greedy mode. - When the message reaches a node x with no
neighbors closer to t, then start traversing the
planar subgraph in perimeter mode (using face
routing). - Do this until
- Reach t then done.
- Revisit a node then failed.
- Reach a node y with d(y,t) lt d(x,t) then resume
in greedy mode.
50What if the Topology is Dynamic?
- The UDG depends on the current set of neighbors,
which changes continually in response to
mobility, failures, recoveries. - Must recalculate the planar subgraph in response
to these changes. - KK recalculate the subgraph upon every
acquisition of a new neighbor and every loss of a
former neighbor. - But this isn't really enough The choices of
links to remove in the RNG and GG algorithms
could change even in the face of minute movements
that don't change the neighbor relation. - Needs more work!
51Evaluation
- Local state Small
- Simulation results KK
- Assumptions
- Mobility, random waypoint model.
- Use pause length to capture degree of mobility.
- Dense networks.
- Recalculate the planar graph only when neighbor
sets change. - Results
- Packet delivery success rate High, especially
with frequent neighbor updates. - Communication overhead Small, because the
algorithm is local. - Path length Delivers vast majority in optimal
number of hops. But thats because greedy
routing works almost always in dense networks. - Effect of network diameter Little effect,
because most of the processing is local. - Needed work
- Better handling of asymmetric communication,
dynamic networks.
52Kuhn, Wattenhofer,
- Face routing algorithm with guaranteed upper
bound, assuming density bound and bounded
stretch. - Worst-case lower bound of d2.
- Simulation results, for combination of face and
greedy routing.
53RobustBarriere, et al.
- Allows fixed edges, but of lengths that need not
always fit the UDG assumptions. Face routing
still works.