260 likes | 275 Views
Explore efficient strategies for preparing dishes and finding gas stations on a road trip to minimize time and cost. Discover algorithms and solutions for energy-efficient monitoring in wireless sensor networks.
E N D
Set K-Cover Algorithmsfor Energy Efficient Monitoring in Wireless Sensor Networks Dileep Kumar HMCL 1st June, 2014
Cooking example Salad: 25m prep, 0m cooking Chicken noodle: 10m prep, 40 min cooking Rice pudding: 15 mins prep, 20m cooking
In what order should Martha make the dishes? • Martha can work on preparing one dish at a time, however once something is cooking, she can prepare another dish. • How quickly can she get all the dishes ready? • She starts at 5pm, and her guests will arrive at 6pm….
First try Prep time Cook time (10,40) (25,0) (15,20) 5:00pm 5:25pm 5:35pm 5:50pm 6:15pm 6:10pm
Second try (15,20) (10,40) (25,0) 5:00pm 5:10pm 5:25pm 5:50pm 5:50pm 5:45pm First work on dishes with shortest preparation time?
This rule may not work all the time Suppose the required times are: Bulgur (5,10) Lentils (10, 60) Lamb (15, 75) Shortest prep time order: start at 5pm, and finish lamb at 6:45pm Longest cooking time first: food ready at 6:30pm.
What if she had to make several dishes? • For 3 dishes, there are only 6 possible orders. SCR,SRC,RSC,RCS,CSR,CRS. • The number of possible orderings of 10 dishes is 3,628,800. • For 15 dishes the number of possible orderings is 1,307,674,368,000!
Key Idea • Order dishes in longest cooking time order. • Chicken noodle soup goes first (40 mins of cook time), next is the Rice pudding (20 mins of cook time), followed by the Salad (0 mins of cook time). • This is the best ordering. In other words, no other order can take less time.
Where to fill gas? • Suppose you want to go on a road trip across the US. You start from New York City and would like to drive to San Francisco. • You have : • roadmap • gas station locations and their gas prices • Want to: • minimize travel cost The Gas Station Problem (Khuller, Malekian,Mestre), Eur. Symp. of Algorithms
Structure of the Optimal Solution • Two vertices s & t • A fixed path v1 vn v2 v3 t s 1.00$ 2.99$ 2.98$ 2.97$
Key Property Suppose the optimal sequence of stops is u1,u2,…,u. • If c(ui) < c(ui+1) Fill up the whole tank • If c(ui) > c(ui+1) Just fill enough to reach ui+1. ui+1 ui c(ui) c(ui+1)
C1={(s1,r2)(s2,r2)} C2={(s1,r2)(s3,r2)} C3={(s2,r2)(s3,r2)} C4={(s4,r2)} C5={(s4,r2)} • Lifetime = 5
C1={(s1,r1)(s2,r2)} C2={(s1,r2)(s3,r1)} C3={(s2,r1)(s3,r2)} C4={(s4,r2)} C5={(s1,r1)(s2,r1)(s3,r1)} C6={(s4,r2)} • Lifetime = 6
Distributed Greedy Algorithm • Preprocessing Phase • Each sensor determine the interest area • Sensor’s neighbors • Partition Phase • Few assumptions, running time nk|Smax|, • ½ approximation ratio.
Distributed Greedy Algorithm Distributed Greedy Algorithm at sensor j • While t < j • Receive message that location v is covered by sensor t in cover ci if Sj covers v. • If t = j • Choose ci that has the smallest intersection with Sj. • Assigns self to cover ci. • Broadcast this assignment to neighbors.
Distributed Greedy Algorithm Proof Greedy Sensor Partition Areas Red Cover Green Cover = Number of elements newly covered by adding .
OPT Sensor Partition Iterate back through sensors. = Number of elements newly covered by adding . Distributed Greedy Algorithm ProofContribution of OPT Greedy Sensor Partition Areas Red Cover Green Cover = Number of elements newly covered by adding .
Proof Conclusion for Distributed Greedy Algorithm Recall, = Number of elements newly covered by adding . = Number of elements newly covered by adding . Two Observations: 1. 2. Therefore,
Centralized Greedy Algorithm Centralized Greedy Algorithm • Each area is weighted according to how likely it is to be chosen in a future iteration. • Many assumptions, running time 2nk|Smax|, deterministic approximation ratio 1-1/e. • Initialize C={c1:=empty,….Ck:=empty} • For j = 1 until n • Assign Sj to cover ci
Objective Function Simulation Results • |S| = 1000 and k = 10. • Deterministic algorithms perform far above their worst case bounds (consistently more than 72% of OPT).
Fairness Simulation Results Number of covers that cover location v in solution divided by k k = 10 |S| = 200 n = 100 |E| = 2000 Number of sensors that cover location v