Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Steepest Ascent Hill Climbing Algorithm

Similar presentations


Presentation on theme: "The Steepest Ascent Hill Climbing Algorithm"— Presentation transcript:

1 The Steepest Ascent Hill Climbing Algorithm
Muna Shabaneh

2 Instead of winding back and forth in hill climbing algorithm
Steepest Ascent: you always take the step that increases your height the most

3 Network Flow 45 a 25 3 b s 3 t 10 40 5 c 4 We will try to find a path in the augmenting graph that would give us the Biggest Smallest Edge between all other paths from s to t.

4 Steepest Ascent Hence the amount the flow increases is the smallest augmentation capacity of any edge in this path. The Steepest Ascent Algorithm will augment this best path in each iteration. Our algorithm should be able to find such a path  and it will find the maximum flow within a instead of iterations. ( that is what we will prove)

5 Finding the augmenting path with the Biggest Smallest Edge:
The Input: 45 G: a 25 3 b s 3 t 10 40 5 c 4 The Output: The best path from s to t whose smallest weighted edge is as big as possible.

6 Easier Problem Input : 1) A path from s o t whose smallest weighted edge <u,v> ≥ 2) No path : Is an input weight, we can give it any value In our augmented graph any edge whose weight less than will be deleted from the augmented graph.

7 First we will sort the edges from biggest to smallest, after that we will choose our initial weight to be the first weight value and we will draw an edge for every weight that is ≥ . weight Edges 45 a t 1 40 s c 2 25 s a 3 10 b a 4 5 c b c t 6 a b 7 a c = = 45 = = 40 = = 25

8 The augmented graph a b s t c No path No path
45 No path a 25 b s t 40 c No path A path with the Biggest Smallest Edge < s, a, t > = F <25>

9 Running Time The algorithm for finding the path with the largest smallest edge runs Depth-First search for each weight w. We reuse the previous work so no node is marked reached more than once and no edge is traversed more than once. So we need only O(m) time for this process m : number of edges. And we need O( log m ) for sorting the edges. So we need O(m log m) for finding the biggest smallest edge.

10 Running Time for Steepest Ascent
F = 0 initially and then it may increase up to O( m ) m : number of edges l : bit capacities. : The maximum flow for the network. rate (F) : The current flow : the remaining amount the flow should increase after iteration. So the measure of progress = rate (F) : The maximum flow for the network. rate (F) : The current flow : the remaining amount the flow should increase after iteration. So the measure of progress = rate (F) OOPS WE HAVE A PROBLEM ?? ???????????????????

11 Choosing a Cut C = <U,V>
The sum of the augmentation capacities of the edges across any cut C=<U,V> acts as an upper bound to the total flow possible. =  The smallest augmentation capacity in the path whose smallest augmentation capacity is the largest. from and we know that the edge which was deleted in and now in has augmentation capacity at most The sum of the augmentation capacities in the cut C=<U,V> is at most m . Number of Iterations : O(ml + m log m) Finally the running time O(ml+m log m) x O(m log m) = O (l log m m)

12 We Did It !!!!!!


Download ppt "The Steepest Ascent Hill Climbing Algorithm"

Similar presentations


Ads by Google