solving of g raph c oloring p roblem with p article s warm o ptimization
DESCRIPTION
Solving of G raph C oloring P roblem with P article S warm O ptimization. Amin Fazel Sharif University of Technology Caro Lucas February 2005. Computer Engineering Department, Sharif University of Technology. Outline. Introduction Graph Coloring Problem Particle Swarm Optimization - PowerPoint PPT PresentationTRANSCRIPT
Solving of Graph Coloring Problem
withParticle Swarm Optimization
Amin FazelSharif University of Technology
Caro Lucas
February 2005
Computer Engineering Department, Sharif University of Computer Engineering Department, Sharif University of TechnologyTechnology
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
2/20
• Introduction
• Graph Coloring Problem
• Particle Swarm Optimization
• Using of PSO for solving GCP
• Experimental Results
Outline
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
3/20
Introduction
• Evolutionary algorithms (EAs) search– Genetic programming (GP), which evolve programs – Evolutionary programming (EP), which focuses on optimizing
continuous functions without recombination – Evolutionary strategies (ES), which focuses on optimizing
continuous functions with recombination – Genetic algorithms (GAs), which focuses on optimizing general
combinatorial problems
• EAs differ from more traditional optimization techniques– They involve a search from a "population" of solutions, not
from a single point
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
4/20
Introduction
• Swarm Intelligence is an AI technique– Is based on social behavior– Applied successfully to solve real-world
optimization problems
• Swarm-like algorithms– Ant Colony Optimization (ACO)– Particle Swarm Optimization (PSO)
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
5/20
Introduction
• PSO shares many similarities with EAs – Population-based – Optimization function– Local and global optima
• PSO also has dissimilarities to EAs – No evolution operators– Sharing information– PSO is easier to implement
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
6/20
Introduction
• Graph Coloring Problem
• Particle Swarm Optimization
• Using of PSO for solving GCP
• Experimental Results
Outline
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
7/20
Graph Coloring Problem
• A proper coloring of a graph G = (V;E) is a function from V to a set C of colors such that any two adjacent vertices have different colors
• The minimum possible number of colors for which a proper coloring of G exists is called the chromatic number of G.
• It is NP-complete
• Has many applications– scheduling and timetabling– telecommunications
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
8/20
Introduction
Graph Coloring Problem
• Particle Swarm Optimization
• Using of PSO for solving GCP
• Experimental Results
Outline
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
9/20
Classical PSO
• PSO applies to concept of social interaction to problem solving
• A set of moving particles (the swarm) is initially "thrown" inside the search space
• It was developed in 1995 by James Kennedy and Russ Eberhart
• It has been applied successfully to a wide variety of search and optimization problems
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
10/20
Classical PSO
• Each particle has the following features: – It has a position and a velocity– It knows its position, and the objective
function value for this position– It knows its neighbours, best previous
position and objective function value (variant: current position and objective function value)
– It remembers its best previous position
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
11/20
Classical PSO
• At each time step – Follow its own way– Go towards its best previous position– Go towards the best neighbour's best
previous position, or towards the best neighbour (variant)
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
12/20
Classical PSO
• This compromise is formalized by the following equations:
11
,3,21
ttt
ttbestttbestttt
vxx
xgcxpcvwv
xt gbest
vt
xt+1
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
13/20
Classical PSO
• The three social/cognitive coefficients respectively quantify:– how much the particle trusts itself now– how much it trusts its experience– how much it trusts its neighbours
• Social/cognitive coefficients are usually randomly chosen, at each time step
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
14/20
Introduction
Graph Coloring Problem
Particle Swarm Optimization
• Using of PSO for solving GCP
• Experimental Results
Outline
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
15/20
Solving GCP with PSO
• What we really need for using PSO – a search space of positions/states
– a cost/objective function f on S, into a set of values, whose minimums are on the solution states.
– an order on C, or, more generally, a semi-order, so that for every pair of elements of C, we can say we have either
• • or
S f C c i
ji cc ci c j
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
16/20
Solving GCP with PSO
• The position of each particle is a sequence of colors– For solving GCP with five vertices
• <1,2,3,4,1>
– Position vector is N-dimensional vector which N is the number of vertices in the graph
V1
V2
V3 V4
V5
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
17/20
Solving GCP with PSO
• Position of a particle is
• Cost function
– Conflict is the number of vertices whose colors are the same
else )(max
0 conflict if )(max
1
1
ii
N
ii
N
npconflict
nxf
Nnnnx ,,, 21
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
18/20
Introduction
Graph Coloring Problem
Particle Swarm Optimization
Using of PSO for solving GCP
• Experimental Results
Outline
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
19/20
Experimental Results
• Results for random graphs per 5 runs.– Stop conditions:
• Getting to the chromatic number • Or, getting to a maximum iteration number
– Population is a very important factor
Vertices Edges Chromatic
NumberSucc (fail)
11 33 22 22 1010
22 33 33 33 1010
33 44 44 33 1010
44 44 66 44 1010
55 55 66 22 1010
66 1010 1919 33 9(1)9(1)
Thursday, February 19, 2005
Computer Engineering DepartmentComputer Engineering DepartmentSharif University of TechnologySharif University of Technology
20/20
Introduction
Graph Coloring Problem
Particle Swarm Optimization
Using of PSO for solving GCP
Experimental Results
Outline
Thanks for your patience !