Presentation is loading. Please wait.

Presentation is loading. Please wait.

Local Search Algorithms & Optimization Problems

Similar presentations


Presentation on theme: "Local Search Algorithms & Optimization Problems"— Presentation transcript:

1 Local Search Algorithms & Optimization Problems
Based on: Stuart J. Russel, Peter Norvig, Artificial Intelligence, A modern Approach 2nd Ed. p110-p116

2 Why Search algorithms are problematic?
The solution is mostly a path, so we have to keep one, more paths in memory. State space may be VERY large (grows exponentially). What if there is no solution and there is an INFINITE state space?

3 But what if the path to the goal is irrelevant?
8 queens problem Final configuration is of importance, NOT the path! Other examples: VLSI design, factory floor layout, network topology optimization….

4 If no path to the goal matters…..
Lets consider a different approach: Forget about the path GENERALLY: Iteratively move from one state to a neighbor state until reaching the goal. Not retaining the path at all.

5 2 key advantages: A Light-memory search method (usually a constant amount) No search tree; only the current state is represented! OFTEN find reasonable solution in large/infinite state spaces !!! Only applicable to problems where the path is irrelevant (e.g., 8-queen, Optimization problems)

6 But how to find the “best” neighbor???
What we need some kind of “sense of smell” A HEURISTIC FUNCTION (also called objective function) evaluating the “fitness” of all possible neighbor states. Seek for the MINIMUM or MAXIMUM When to stop? Which problems arise?

7 State space landscape (here: 1 dimentional)
shoulder Global maximum Local maximum Flat local maximum State space Objective function

8 Hill Climbing (steepest ascent)
current  MakeANode(initialState(problem)) Repeat: neighbor  highest valued succesor of current if value(neighbor) ≤ value(current) then return State(current) current neighbor Trying to find the top of Mount Everest while suffering from amnesia. IS THIS COMPLETE???

9 All next minimal states
Application: 8-Queen (complete state formulation), h=pairs of queens attacking each other Repeat n times: Pick an initial state S at random with one queen in each column Repeat k times: S’ pick a column and move the queen to one of the best spots If (no better state exists) return S. S S’ All next minimal states 12 12 12 12 12 12 5 steps 12 12 h=17

10 This is GREEDY! We do not try to think ahead (also called greedy local search).
GREED is one of the 7 deadly sins!! But this works usually quite well and VERY RAPID. Why? It is in general easy to improve a bad state. States are well distributed over state space.

11 Can we fail? Sure. Objective function Flat local maximum State space
shoulder Global maximum Local maximum Flat local maximum State space Objective function

12 How bad is it???? Very bad… Starting from a random state, 8-queens solution will get stuck 84% of the times. But solutions are very quickly!! Only average of 4 steps! (3 steps to failure).

13 Can we do better? Overcoming plateaus (How?).
Consider go sideways (how much?) By allowing going sideways 100 times we will solve 8-queens in 94% of trials!! But success comes at cost: 21 steps for a success and 64 for failure…

14 We still strive to completeness!!
Random restart- a series of hill climbs. complete with probability approaching 1. First choice hill climbing- If there are many successors. Stochastic hill climbing- choose among all uphill moves with probability vary with steepness. Converges more slowly but may find better solutions.

15 What about this kind of state space???
NP-hard problems typically have exponential number of local maxima to get stuck on

16 Simulated annealing

17 Simulated annealing A simple hill climbing- NOT COMPLETE
A random walk- COMPLETE but super inefficient. Let’s try to combine the two. “Try to throw a ping pong ball into the deepest narrow crack.” Shake the surface just enough.

18 Simulated annealing S  initial state Repeat forever:
T = mapping of time If (T= 0) then return S S’  successor of S picked at random Dh = h(S’) - h(S) if(Dh ≥0) then S  S’ else S  S’ with probability ~ e(∆H/t) where T is called the “temperature” Simulated annealing lowers T over the k iterations. It starts with a large T and slowly decreases T. “bad” moves are more likely to be allowed at start. Proven: Will find a global maximum at probability approaching 1.

19 Questions???

20 K-clustering in Wireless Ad Hoc Networks using local search
Rachel Ben-Eliyahu-Zohary Software Engineering Department Jerusalem College of Engineering Hello, my name is Yaacov Fernandess I’m a master student at the Hebrew University of Jerusalem and in the following presentation I’ll present a joint work of Dahlia Malkhi and mine: K-clustering in Mobile ad hoc networks. Joint work with Ran Giladi (BGU) and Stuart Sheiber and Philip Hendrix (Harverad)

21 Minimum k-clustering. Problem Statement:
Minimum k-clustering: given a graph G = (V,E) and a positive integer k, find the smallest value of ƒ such that there is a partition of V into ƒ disjoint subsets V1,…,Vƒ and diam(G[Vi]) <= k for i = 1…ƒ. The algorithmic complexity of k-clustering is known to be NP-complete for simple undirected graphs. A formal definition of the problem dealt in this presentation Minimum k-clustering: given a graph G = (V,E) and a positive integer k, find the smallest value of ƒ such that there is a partition of V into ƒ disjoint subsets V1,…,Vƒ and diam(G[Vi]) <= k for i = 1…ƒ. The algorithmic complexity of k-clustering is known to be NP-complete for simple undirected graphs.

22 K-clustering K = 3 1 2 1 2 2 1 1 2 1 2 1 2 2 An example of k-clustering (k = 3) on a given graph. 1 2 2

23 MOTIVATION!!!

24 Cluster-based Routing Protocol
The network is divided to non overlapping sub-networks (clusters) with bounded diameter. Intra-cluster routing: pro-actively maintain state information for links within the cluster. Inter-cluster routing: use a route discovery protocol for determining routes. Route requests are propagated via peripheral nodes. One example of a hybrid routing protocol is cluster-based routing protocol. In cluster-based routing protocols the network is divided to non overlapping sub-networks (clusters) with bounded diameter, where intra-cluster routing is done using proactive routing protocol, whereas inter-cluster routing is done using reactive routing protocol with a slight difference that route request are propagate via cluster’s border nodes.

25 Cluster-based Routing Protocol
Limit the amount of routing information stored and maintained at individual hosts. Clusters are manageable. Node mobility events are handled locally within the clusters. Hence, far-reaching effects of topological changes are minimized. Cluster based routing protocols limit the amount of routing information stored and maintained at individual hosts. In addition, cluster-base routing protocols were proposed for routing in large networks because clusters are manageable - node mobility events are handled locally within the cluster. Hence, far-reaching effects of topological changes are minimized. Furthermore, In order to overcome nodes mobility one can adjust cluster size according to network stability.

26 System Model Two general assumptions regarding the state of the network’s communication links and topology: The network may be modeled as an unit disk graph. The network topology remains unchanged throughout the execution of the algorithm. Our system model consists of two general assumptions regarding the state of the network’s communication links and topology: The first - the network may be modeled as a unit disk graph. This is not necessary true. Communication between nodes is dynamic function of few factors such as interference such as physical obstacles. The network topology remains unchanged throughout the execution of the algorithm. We ignore any topological changes during algorithm execution.

27 Unit Disk Graph The distance between adjacent nodes <= 2
F H J D C G I K M N L O The distance between adjacent nodes <= 2 The distance between non adjacent nodes is > 2 B A S E F H J D C G I K M N L O An ad hoc network can be viewed as a unit disk graph by viewing every transmitter/receiver in the broadcast network as a point in the graph and by representing the effective broadcast range of each point as a unit disk. We use intersection model – n unit disk in the plane is represented by n-node graph, where every node corresponds to a unit disk and there is an edge between two nodes if the corresponding unit disks intersect or tangent.

28 Contribution of Fernandess and Malkhi
A two phase distributed asynchronous polynomial approximation for k-clustering where k > 1 that has a competitive worst case ratio of O(k): First phase – constructs a spanning tree of the network. Second phase – partitions the spanning tree into sub-trees with bounded diameter. Our contribution Is a two phase distributed asynchronous polynomial approximation for k-clustering where k > 1 that has a competitive worst case ratio of O(k): First phase – constructs a spanning tree of the network. Second phase – partitions the spanning tree into sub-trees with bounded diameter. Note our algorithm achieves flexibility by choosing k as a dynamic parameter of the network.

29 Second Phase: K-sub-tree
Given a tree T=(V,E) the algorithm finds a sub-tree whose diameter exceeds k, it then detaches the highest child of the sub-tree and repeats over on the reduced tree. root of the sub-tree detach highest sub-tree sub-tree In the second phase we solve the k-clustering problem on special class of graphs, trees. We implement, in a distributed manner, a simple polynomial sequential algorithm, which solves the problem at hand, k-sub tree. Given a tree T=(V,E) the algorithm finds a minimal sub-tree whose diameter exceeds k, where minimalism means that no child sub-tree already has a diameter larger than k. It then detaches the highest child of the sub-tree and repeats over on the reduced tree. sub-tree k- r k

30 K-sub-tree Converge-cast (K=4)
2 5 3 leaf 6 4 1 3 5 root 4 2 6 5 Each node v sends its height, The height of tree is the longest path from the root to a leaf. Therefore, height(v) is the height of the sub tree rooted at v. 3 The tree rooted at this node exceeds k  detach the highest child 4 6 Denote MCDS spanning tree edge.

31 K-sub-tree Converge-cast (K=4)
The tree rooted at this node exceeds k  detach the highest child. 2 5 3 leaf 6 4 1 3 5 root 2 6 Denote MCDS spanning tree edge.

32 K-sub-tree Converge-cast (K=4)
2 1 3 root 2 Denote MCDS spanning tree edge.

33 Random Decent- reminder
RANDOM_DESCENT(problem, terminate) returns solution state inputs: problem, a problem termination condition, a condition for stopping local variables: current, a solution state next, a solution state current ← Initial State (problem( while (not terminate) next ← a selected neighbor of current ∆ E← Value(next) - Value(current) if ∆ E <0 then current ←next

34 Initial State (k=2)

35 K is even (e.g. 2)

36 K = 2 (cont.)

37 K = 2 (cont.)

38 K = 2 (cont.)

39 K = 2 (cont.)

40 K = 2 Total: 8 clusters

41 A better State

42 Building the neighbor

43 Building the neighbor

44 Building the neighbor

45 Building the neighbor

46 Experimental Evaluation
Randomly Generated Graphs (Unit disk graph model) Grid Graphs

47 Randomly Generated Graphs
Parameters: n – number of nodes l – length of a unit Graph Generation: - n points are placed randomly on a 1X1 square - two vertices are connected iff the distance between them is less than l.

48 400 nodes, k=5

49 Experiments on Grids

50 In general, number of nodes in a maximal cluster:
If K is even, If k is odd, e.g. 13 if k=4 e.g. 8 if k=3

51 A maximal cluster on grid
x-y=s x+y=r x+y=r+k x-y=s-k

52 A maximal cluster on grid
x-y=s x+y=r x+y=r+k x-y=s-k

53 A maximal cluster – k is even
x-y=s x+y=r x+y=r+4 x-y=s-4

54 A maximal cluster – k is odd
x-y=s x+y=r x+y=r+3 x-y=s-3

55 Optimal Clustering for k=4

56 Optimal Clustering for k=3

57

58 Related Work Local search techniques were used for network partitioning Simulated annealing and genetic algorithms were tested on a very limited network size : nodes. We present solid criteria for evaluating the local search

59 Conclusions A new local search algorithm for k-clustering was introduced It outperforms existing distributed algorithm for large k and dense networks. Grids can be built using optimal clustering Clustering on grids needs improvement.

60 Future Work Improve the algorithm, perhaps by using other methods like simulated annealing and genetic algorithms. Change the algorithm for local search Find an efficient way to fix a solution – e.g. by merging small clusters Use local search for other optimization problems in networking


Download ppt "Local Search Algorithms & Optimization Problems"

Similar presentations


Ads by Google