Presentation is loading. Please wait.

Presentation is loading. Please wait.

Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March 7-13 2005 Alessandro Panconesi University La Sapienza of Rome.

Similar presentations


Presentation on theme: "Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March 7-13 2005 Alessandro Panconesi University La Sapienza of Rome."— Presentation transcript:

1 Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March 7-13 2005 Alessandro Panconesi University La Sapienza of Rome

2 Approximation, Chance and Networks Day 1

3 Course Outline We will study some algorithmic problems that arise in the context of ad hoc networks. This will give us an opportunity to discuss: Approximation algorithms for NP-hard problems Probabilistic protocols and tools Efficient distributed algorithms Empirical evaluation thereof

4 Problem 1: Backbone formation Ad hoc networks must self-organize to set up their own routing infrastructure. A first step toward this goal is to select a subset of the nodes that will form the so-called backbone Nodes in the backbone will take care of message delivery

5 Backbone Formation Requirements for a good backbone: Each node in the network should be at distance at most one from the backbone (mandatory) To reach its destination, a packet should hop through backbone nodes only (often mandatory) It should be small (very desirable) Routes through the backbone should not be too much longer than those through the network (optional) It should be robust (optional, for now)

6 Backbone Formation We will focus on the first three requirements. In graph theoretic terminology our problem is thus the following: Devise a fast, distributed algorithm to compute a small ConDom (connected dominating set)

7 Backbone Formation What does it mean to be fast? Let us define the notion of running time in our context.

8 Model of Computation Our abstract model is the following. We have a synchronous, message-passing network in which computation proceeds in rounds In one round, each node in the network: 1. Receives messages from the neighbours 2. Computes 3. Sends messages to the neighbours

9 Model of Computation The running time of a protocol is the number of rounds until protocol termination (max over all nodes) This model charges for communication (while computation is free, at least for now) Note that if a protocol runs for t rounds, each node can receive information only from nodes at distance at most t, i.e. when t is small computation is local, and yet we will compute a global function of the network

10 Model of Computation In what follows an algorithm is fast if the number of rounds it takes is poly- logarithmic in n, the number of nodes in the network

11 Model of Computation Ad hoc networks are not necessarily synchronous (sometimes they are!). However simple algorithms that are fast according to this theoretical definition are bound to perform very well. We will see this when discussing the implementation of the protocols

12 Notation We will deal with graphs n denotes the number of vertices (or nodes) m the number of edges (or links)

13 Back to the Backbone The protocols that we will consider will be local (relying on local information alone) and simple. This is bound to translate into time and energy efficient protocols. This is crucial for ad hoc networks, where resources are scarce

14 Backbone Formation Let us see a couple of protocols of the kind we are looking for: fast and simple

15 Backbone Formation The first algorithm is based on the following approach: Compute a (possibly large) ConDom Prune away as many redundant nodes as possible

16 Backbone Formation Algorithm WuLi: If u has two neighbours not connected by an edge then u enters the backbone It cannot be simpler than this!

17 Backbone Formation Algorithm WuLi: If u has two neighbours not connected by an edge then u enters the backbone EXERCISE. Prove that if the network is not a clique then WuLi computes a ConDom

18 Backbone Formation WuLi is very local (and hence fast) and simple.It tends however to create large backbones Pruning Rule 1: if u and v are in B, u is smaller than v, and N(v) contains N(u) then u can be removed Pruning Rule 2: if u, v and w form a triangle, are in B, u’s ID is the smallest, and N(v) union N(w) contain N(u) then u can be removed Etc.

19 Backbone Formation As we will see, empirically this works pretty well..

20 Backbone Formation Let us now try the opposite approach: Compute a small dominating set Connect it up

21 Backbone Formation Step 1 can be done in the best possible way (unless P = NP) Before seeing how, let us consider another example of the kind of algorithms that we are looking for

22 Backbone Formation Maximal Independent Sets An independent set of G=(V,E) is a set I of vertices such that, for all u and v in I there is no edge between u and v An independent set is maximal if no vertex can be added to it

23 Backbone Formation While computing a maximum independent set is NP- hard, computing a maximal independent set is easy, at least sequentially: Starting from an empty set I: pick a vertex u add it to I Remove u and its vertices from G Repeat until G is non empty

24 Backbone Formation How can we parallelize this algorithm? Assume each node has its unique ID

25 Backbone Formation Parallel implementation of the sequantial algorithm for MIS: Initially each vertex is undecided If u is the smallest undecided vertex in N(u) then u decides: If u has a neighbour in the independent set then u is OUT Otherwise it is IN

26 Backbone Formation The worst case of this algorithm is when a path has sorted IDs: In practice however when IDs are distributed more or less at random, long chains of dependencies do not arise 12n3

27 Backbone Formation Notice the in general a MIS is going to be large. For the kind of graphs that model wireless networks however, ie unit disk graphs, things are pretty good: EXERCISE: Show that if I is a MIS of a unit disk graph G, then I can be of size at most 5 times the optimal dominating set

28 Backbone Connection We now focus on Step 2 of the above procedure. We assume to have a smallest possible dominating set D, and we want to connect it up by inserting new vertices while keeping it small “Best possible” means that |D| < O(log(n)) OPT This is the best possible that can be done in polynomial time, unless P=NP

29 Backbone Connection We will work with the following auxiliary graph H V(H) = D, the vertices of the dominating set computed in Step 1 E(H) is obtained by connecting all pairs of vertices in D that are at distance 1, 2 or 3 EXERCISE. Show that H is connected if G is

30 Backbone Connection An edge of H corresponds to a path of 0, 1 or 2 vertices in G. For an edge uv of H let P(uv) be the corresponding path in G The previous exercise gives us a simple way to connect D up: For each edge uv of H, add the vertices of P(uv) to D This ensures connectivity of the backbone, but it is too expensive since H can have as many as d edges 2

31 Backbone Connection The best way to connect D up is to compute a spanning tree of H and add the vertices of P(uv) for each edge in the tree. This way we have d-1 edges, and for each edge we add at most 2 nodes. The resulting condom C will have a total of |D|+2d = O(|D|) nodes, and this will preserve the approximation bound: |C| ≤ 3 |D| ≤ O(log(n)) OPT-DomSet ≤ O(log(n)) OPT-ConDom 2

32 Backbone Connection Unfortunately computing spanning trees takes linear time in a distributed setting (think of a ring). But we do not care if it is not a tree. What we need is a sub-network of H such that: It contains all vertices It is connected It is sparse, ie the number of edges is O(|H|) Let us call such a network a skeleton

33 Backbone Connection To compute a skeleton efficiently we shall make use of the following lemma by Erdös Definition: girth(G) = length of shortest cycle in G Lemma. Let g := girth(G). Then m ≤ n + n 1+2/g-1

34 Backbone Connection This lemma says that if a graph has high girth, then it is sparse In particular if g = 2 log(n)+1 then m ≤ 3n Definition. A cycle is short if it has no more than 2 log(n) +1 many edges

35 Backbone Connection The idea is then to break all cycles while at the same time preserving connectivity. The former is easy, but what about the latter?

36 Backbone Connection Consider the following simple algorithm: Assume each edge has a unique ID Algorithm: Remove the lowest ID edge in every short cycle. Running time is O(log(n)), what about correctness?

37 Backbone Connection Surely every short cycle is broken and hence by the Lemma by Erdös the resulting graph is sparse But is it connected? The answer is yes, let us see why.

38 Backbone Connection Proof that connectivity is preserved. Consider the following sequential process: Sort the edges by increasing ID At stage i, if e(i) is part of a short cycle, remove it. Otherwise keep it

39 Backbone Connection The sequential process satisfies the following: It breaks all short cycles (clear) It preserves connectivity because when edge e(i) = uv is removed the rest of the short cycle connecting u and v remains It removes exactly the same set of edges that the distributed algorithm does (think about it) End of Proof

40 Approximation, Chance and Networks End of Day 1


Download ppt "Approximation, Chance and Networks Lecture Notes BISS 2005, Bertinoro March 7-13 2005 Alessandro Panconesi University La Sapienza of Rome."

Similar presentations


Ads by Google