Presentation is loading. Please wait.

Presentation is loading. Please wait.

A New Evolutionary Approach for the Optimal Communication Spanning Tree Problem Sang-Moon Soak Speaker: 洪嘉涓、陳麗徽、李振宇、黃怡靜.

Similar presentations


Presentation on theme: "A New Evolutionary Approach for the Optimal Communication Spanning Tree Problem Sang-Moon Soak Speaker: 洪嘉涓、陳麗徽、李振宇、黃怡靜."— Presentation transcript:

1 A New Evolutionary Approach for the Optimal Communication Spanning Tree Problem Sang-Moon Soak Speaker: 洪嘉涓、陳麗徽、李振宇、黃怡靜

2 Outline OCST problem Evolutionary Algorithm 4 kinds of encodings for the Spanning tree Proposed encodings & evolutionary algorithm design Experiment & conclusion

3 Outline OCST problem Evolutionary Algorithm 4 kinds of encodings for the Spanning tree Proposed encodings & evolutionary algorithm design Experiment & conclusion Speaker: 洪嘉涓

4 OCST Problem Goal: a spanning tree with minimum communication cost d T (i, j): distance between i and j on T R(i, j): communication requirements associated with each pair of nodes e.g. # of telephone calls between two cities

5 Example Example tree: 312 4 5

6 How to find it? 312 4 5 3 1 2 4 5 NP-hard problem! Search problem Search for a better solution

7 Evolutionary Algorithm One kind of local search Genetic algorithm the most popular type of EA Uses some mechanisms inspired by biological evolution Reproduction, mutation, recombination, natural selection, survival of the fittest Add some random mechanism

8 Evolutionary Algorithm Population: Start with k randomly generated individuals (i.e. states) Individual: each is represented as a string over a finite alphabet Fitness function: evaluation of the “goodness” of a given state. A successor is generated by combining two parents from the current population. Produce the next generation of states by selection, crossover, and mutation Chapter 4 Local Search, Jane Hsu, Artificial Intelligent, 2006

9 Evolutionary Algorithm 2 4 7 4 8 5 5 2 3 2 7 5 2 4 1 1 2 4 4 1 5 1 2 4 3 2 5 4 3 2 1 3 3 2 7 5 2 4 1 1 2 4 7 4 8 5 5 2 3 2 7 5 2 4 1 1 2 4 4 1 5 1 2 4 24 20 16 11 Initial population fitness function selectioncross-overmutation 3 2 7 4 8 1 5 2 2 4 7 5 2 4 1 1 3 2 2 5 2 1 2 4 2 4 4 1 5 4 1 7 4 8 5 5 2 3 2 7 5 2 4 1 1 2 4 7 2 4 4 1 5 4 1 1 3 2 7 5 2 1 2 4 next generation Chapter 4 Local Search, Jane Hsu, Artificial Intelligent, 2006

10 Evolutionary Algorithm Initialize the population Evaluate initial population Repeat Perform competitive selection Apply genetic operators to generate new solutions Evaluate solutions in the population Until some convergence criteria is satisfied

11 OCST Use EA 312 4 5 3 1 5 2 5 1 4 Encode spanning tree to a string Generate valid initial population Design selection method Design crossover and mutation operator To generate new spanning tree Evaluate the cost

12 OCST Use EA 3 1 2 4 5 3 1 5 2 4 1 5 1 4 5 2 5 3 1 3 4 5 1 2 5 4 … Encode spanning tree to a string Generate valid initial population Design selection method Design crossover and mutation operator To generate new spanning tree Evaluate the cost

13 OCST Use EA 3 1 5 2 4 1 5 1 4 5 2 5 3 1 3 4 5 1 2 5 4 … 3 1 5 2 4 1 5 4 3 4 5 1 2 5 … Encode spanning tree to a string Generate valid initial population Design selection method Design crossover and mutation operator To generate new spanning tree Evaluate the cost

14 OCST Use EA 3 1 5 2 4 1 5 4 3 4 5 1 2 5 … 3 1 5 2 1 2 5 4 3 4 5 4 1 5 … 3 1 5 2 1 2 4 4 3 4 5 2 1 5 … Encode spanning tree to a string Generate valid initial population Design selection method Design crossover and mutation operator To generate new spanning tree Evaluate the cost

15 OCST Use EA Encode spanning tree to a string Generate valid initial population Design selection method Design crossover and mutation operator To generate new spanning tree Evaluate the cost 3 1 5 2 1 2 4 4 3 4 5 2 1 5 … 3 1 5 2 4 1 3 3 1 2 4 53 1 2 4 53 1 2 4 5 Cost = 86 Cost = 75 Cost = 93 better solutions!!

16 Outline OCST problem Evolutionary Algorithm 4 kinds of encodings for the Spanning tree Proposed encodings & evolutionary algorithm design Experiment & conclusion Speaker: 陳麗徽

17 Encodings for the Spanning Tree Prüfer: –The Prüfer Encoding LNB: –The Link and Node Biased Encoding NetKey: –The Network Random Key Encoding ES: –The Edge Set Encoding

18 Prüfer Vertex set is {1, 2,3, 4, 5, 6, 7, 8} Encode in Prüfer sequence –6 3 2 5 4 1 (a line) –5 6 3 2 1 8 –1 1 1 3 3 3 (two-star) –1 1 1 1 1 1 (star)

19 Prüfer Decoding P = (3, 3, 4, 5, 4, 6) V = {1, 2, 3, 4, 5, 6, 7, 8}

20 LNB: The Link and Node Biased Encoding Encode in the bias value Decode by calculating the modified cost function – C max is the maximum link cost – b (i, j) is the link bias associated with the edge from i to j – b i is the node bias associated with node i

21 LNB Decoding Use Prim’s algorithm with the modified cost matrix C ’

22 NetKey: The Network Random Key Encoding Encode in key sequence Construct the permutation –10 → 8 → 6 → 9 → 2 → 7 → 1 → 5 → 4 → 3

23 NetKey Decoding Use Kruskal’s algorithm –10 → 8 → 6 → 9 → 2 → 7 → 1 → 5 → 4 → 3

24 ES: The Edge Set Encoding Degree constrained minimum spanning tree ES with heuristic (ESWH) ES without heuristic (ESWOH) Encode in edge set –{(a, c), (c, d), (b, d), (d, e)}

25 Evolutionary Algorithm Design: Crossover and Mutation Prüfer –Mutation: Swap LNB –Crossover: One-Point –Mutation: Random Perturbation NetKey –Crossover: Uniform –Mutation: Swap ES –Crossover: KruskalRST –Mutation: Edge Insertion

26 Outline OCST problem Evolutionary Algorithm 4 kinds of encodings for the Spanning tree Proposed encodings & evolutionary algorithm design Experiment & conclusion Speaker: 李振宇

27 A New Encoding for the OCST Each spanning tree is encoded as a string of length 2(N-1) Each elements is in the range [1, N] Each adjacency pair in the string represents an edge in G Defines the possible edge set on the spanning tree

28 How to decode the string? Cycle-Free Tree Construction Routine Add edges that do not induce a cycle Cycle-Breaking Tree Construction Routine Add edges one by one, on cycle remove the edge with the largest cost.

29 Cycle-Breaking Tree Construction Routine E = {(N 1, N 2 ), (N 2, N 3 ), …, (N 2n-2, N 2n-1 )} U = {1,2,…,n}, T={ } For i = 1..2n-2 Remove (N i, N i+1 ) from E If N i and N i+1 not in U, put (N i, N i+1 ) into T and remove N i, N i+1 from U If N i is in U but N i+1 is not, put (N i, N i+1 ) in T and remove N i+1 from U If both N i and N i+1 are not in U and (N i, N i+1 ) is in T, do nothing If both N i and N i+1 are not in U and (N i, N i+1 ) is not in T, add (N i, N i+1 ) into T and find out the largest edge in the cycle to remove

30 A New Encoding for OCST (1, 5, 2, 1, 4, 3, 2, 5) 2 415 32 5 8 7 1 9 2 415 32 5 8 7 1 9

31 Theorem 1 Any string of 2(N-1) node identifiers, which contains each node at least once, encodes a valid spanning tree when using CB-TCR Each node appears in the string and will be added into T Once a node is added, it is not removed As cycle induced, some edge is removed from T to ensure cycle-free property

32 Theorem 2 Given any spanning tree on N nodes, there is a string of at most 2(N-1) node identifiers which, when using CB-TCR, encodes precisely that tree Use induction – construct tree of n nodes from tree of n-1 nodes by adding an edge with leaf node on the tree When k = 2, the tree could be encoded in a string of length 2

33 Theorem 2 (cond.) Assume the when k = n, each n-node spanning tree could be generated by a string of length at most 2(n-1) without any edge removal in the tree-construction process At k = n+1, choose a leaf node y and its adjacency node x. If (a, x) is some edge in the representation of remaining n nodes, replace (a, x) by (a, x, y, x) to form a new string The new string has length at most 2(n-1) + 2 = 2n

34 Evolutionary Algorithm Design How to do reproduction and crossover in the new coding scheme? Reproduction: Real World Tournament Selection (RWTS) Crossover: Adjacent Node Crossover (ANX)

35 Real World Tournament Selection Score each string and give higher score ones more probability to mate Pair each 2 strings in the last generation and choose the floor(m/2) higher score ones to be the “level 1 winner” Pair “level i winner” and choose the higher score ones to generate “level i+1” winner

36 Real World Tournament Selection (cond.) Algorithm RWTS i = { } for i = 1, 2, … Generate level i winner and put it into I if |level i winner| == 1 then break If |I| < m, copy level i winner multiple times to fill up the slots.

37 Adjacent Node Crossover Construct the offspring in string format element-wise one by one Starting from some node c, check parent A 1 and A 2 for nodes adjacent to c, choose one from them to get the next node Define A i j be the set of nodes adjacent to j of tree A i

38 Adjacent Node Crossover Build adjacent map A 1 t and A 2 t Select starting point c randomly, O 1 = c For i = 2..N S <- A 1 c ∩ A 2 c, V <- A 1 c ∪ A 2 c If S is not empty then choose p = argmin_{j in S} d(c, j) remove p from A 1and2 c remove c from A 1and2 p

39 Adjacent Node Crossover else if V is not empty then choose p = argmin_{j in V} d(c, j) remove p from A 1or2 c remove c from A 1or2 p else random choose a valid p Oi <- p, c <- p

40 An example 4 4 1 26 5 3 7 1 2 6 5 3 4 1 5 3 7

41 1 2 6 5 3 1 5 3 4 7 4 1 2 5 3 7

42 Some notes Is the generated tree is always a valid spanning tree? Not necessary! Some node may not be traversed at all! Solve it by post-processing to repair this

43 Outline OCST problem Evolutionary Algorithm 4 kinds of encodings for the Spanning tree Proposed encodings & evolutionary algorithm design Experiment & conclusion Speaker: 黃怡靜

44 Experiment Each algorithm repeat 20 times Use published benchmark instances Symbol define Gap: Gen: mean # of generations to achieve best sol Time: cost time of achieving best sol Opt: # of trials that find best sol

45 Locality and Diversity Locality Phenotype distance: Mutation innovation (MI) Compare with mutant and its parent Diversity The relation between phenotype and fitness distance Fitness distance

46 Experimental results

47 Comparison of Locality High value represent low degree of locality 1.Redundancy 2.Heuristic bias of encodings

48 Diversity of CB-TCR Solutions with small fitness values can easily find the optimal solution

49 P24B35U ESWH ESWOH LNB NetKey

50 Conclusion The optimal solution of the OCST problem is biased towards the MST Propose a new encoding CB-TCR, and use EA with RWTS strategy in addressing the OCST problem CB-TCR has better performance Relative high locality Preserve the population diversity for a long generation


Download ppt "A New Evolutionary Approach for the Optimal Communication Spanning Tree Problem Sang-Moon Soak Speaker: 洪嘉涓、陳麗徽、李振宇、黃怡靜."

Similar presentations


Ads by Google