SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Algorithms for Graph Coloring Problem 
Wang Shengyi 
National University of Singapore 
November 6, 2014 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 1 / 24
Introduction Problem Description 
Problem Description 
• For a graph G = (V; E) and a color sequence c = (c0; c1; : : : ; cn), firstly 
choose a node v 2 V and populate with c0 
• Populate the rest of G in order of the rest of color sequence c such that only 
new nodes connected to a previously populated node may be populated. 
• Each populated G can be called a configuration, which can be seen as a 
function f mapping node to color. We can calculate a reward value for such 
a configuration f by the following formula: 
H = 
Σ 
All filled (i;j)2E 
1  (f(i); f(j)) where (x; y) = 
{ 
0 x̸= y 
1 x = y 
• For any G and c, develop an algorithm to generate a configuration that gives 
the maximum reward. 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 2 / 24
Introduction Data Set 
Data Set 
Set Number of Vertices Number of Edges Length of Color Sequences 
01 10 29 10 
02 153 5533 20 
03 153 5533 130 
04 590 658 400 
05 2969 3372 4000 
06 483 1358 400 
07 11748 34716 9000 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 3 / 24
Introduction Data Set 
Data Set 
We can explore more… 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 4 / 24
Introduction Data Set 
Graph Visualization: Graph 01 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 5 / 24
Introduction Data Set 
Graph Visualization: Graph 02  03 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 6 / 24
Introduction Data Set 
Graph Visualization: Graph 04 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 7 / 24
Introduction Data Set 
Graph Visualization: Graph 05 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 8 / 24
Introduction Data Set 
Graph Visualization: Graph 06 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 9 / 24
Introduction Data Set 
Graph Visualization: Graph 07 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 10 / 24
Introduction Data Set 
Color Sequence Visualization 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 11 / 24
Algorithms Representation 
States 
• Each state can be represented as a triple t = (
; p; ) 
• 
 is the subgraph which has not been populated. 
• p is the set of all permitted choices. 
•  is a sequence of nodes which have been populated chronologically. 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 12 / 24
Algorithms Representation 
State Transition Function: Transit 
• Input: An old state (
; p; ) and n 2 p 
• Output: An new state (
′; p′; ′) 
• 
′ = 
 removing n and related edges 
• p′ = p [ neighbors of n in 
  fng 
• ′ =  :: n 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 13 / 24
Algorithms Randomized Algorithms 
Search Component Generators: A Pentomino Style 
• A search component S 2 S is a stochastic algorithm. 
• Input: t = (
; p; ), Output: One or multiple final states t1; t2; : : : ; tm 
• Before running, S would check the budget. For each final state, S compares 
the reward with the best result so far and updates the budget. 
• A search component generator 	 :  ! S 
• Given a set of parameters  2 , 	() is a search component 
• Simulate, Repeat, LookAhead, Step and Select 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 14 / 24
Algorithms Randomized Algorithms 
Simulate 
Parameters: Policy simu, mapping 
from permitted set p to 
choice n. 
Algorithm: Repeatedly sampling 
nodes according to simu 
and performs transitions 
Transit until reaching 
the final state. 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 15 / 24
Algorithms Randomized Algorithms 
Repeat 
Parameters: A positive integer N  0, 
a search component S 
Algorithm: It repeats performing S 
for N times. 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 16 / 24
Algorithms Randomized Algorithms 
LookAhead 
Parameters: A search component S 
Algorithm: For each n 2 p, it 
performs S on 
Transit(t; n). 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 17 / 24
Algorithms Randomized Algorithms 
Step 
Parameters: A search component S 
Algorithm: For each remaining steps 
until the final state, it 
performs S first. Then it 
extracts the local best 
choice nl and performs 
transition 
Transit(tstep; nl). 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 18 / 24
Algorithms Randomized Algorithms 
Select 
Parameters: A selection policy sel, a 
search component S 
Algorithm: It looks like Step. But in 
each step, it chooses node 
according to sel. 
sel: UCB-1 
C 
s(t; c): Sum of rewards,from S 
with Transit(t; c) 
n(t; c): Number of times c was 
selected in state t 
n(t): Sum of n(t; c) 
arg max 
c2p 
s(t; c) 
n(t; c) 
√ 
ln n(t) 
n(t; c) 
+ C 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 19 / 24
Algorithms Randomized Algorithms 
Compisition 
• Is = Step(Repeat(N; Simulate(random))) 
• Nmc(0) = Simulate(random) 
Nmc(l) = Step(LookAhead(Nmc(l  1))) 
• Uct(C) = Step(Repeat(N; Select(UCB-1 
C ; Simulate(random)))) 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 20 / 24
Algorithms Greedy Algorithm 
Greedy Strategy 
arg max 
c2p 
Reward(fcg [ Neighbors(c; G)) 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 21 / 24
Result 
Results of Iterative Sampling (Is) 
N set01 set02 set03 set04 set05 set06 set07 
1 11 50 1981 129 1039 439 9721 
10 16 58 2091 159 1107 473 9777 
100 19 74 2127 167 1126 483 9878 
1000 19 79 2147 167 1158 489 9938 
4000 19 84 2181 175 1158 506 10006 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 22 / 24
Result 
Result of Different Algorithms for Budget 1000 
Algorithms set01 set02 set03 set04 set05 set06 set07 
Is 19 79 2147 167 1158 489 9938 
Nmc(2) 19 79 2171 171 1152 498 9953 
Nmc(3) 18 75 2158 173 1145 503 9912 
Uct(0:3) 19 98 2165 171 1141 504 9933 
Uct(0:5) 19 98 2165 171 1141 500 9933 
Greedy 19 156 2719 219 1473 737 16118 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 23 / 24
Thank you! 
Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 24 / 24

Contenu connexe

Tendances

MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submission
Ashutosh Katti
 
single source shorest path
single source shorest pathsingle source shorest path
single source shorest path
sowfi
 
[論文読み]Interpretable Coun.ng for Visual Ques.on Answering
[論文読み]Interpretable Coun.ng for Visual Ques.on Answering[論文読み]Interpretable Coun.ng for Visual Ques.on Answering
[論文読み]Interpretable Coun.ng for Visual Ques.on Answering
hirono kawashima
 
Ch 7 tutoring notes quadratics
Ch 7 tutoring notes quadraticsCh 7 tutoring notes quadratics
Ch 7 tutoring notes quadratics
srobbins4
 

Tendances (20)

Data Structure Radix Sort
Data Structure Radix SortData Structure Radix Sort
Data Structure Radix Sort
 
Radix Sort
Radix SortRadix Sort
Radix Sort
 
hospital management
hospital managementhospital management
hospital management
 
Tall-and-skinny Matrix Computations in MapReduce (ICME colloquium)
Tall-and-skinny Matrix Computations in MapReduce (ICME colloquium)Tall-and-skinny Matrix Computations in MapReduce (ICME colloquium)
Tall-and-skinny Matrix Computations in MapReduce (ICME colloquium)
 
Geometry
GeometryGeometry
Geometry
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
 
CS6491Project4
CS6491Project4CS6491Project4
CS6491Project4
 
And or graph problem reduction using predicate logic
And or graph problem reduction using predicate logicAnd or graph problem reduction using predicate logic
And or graph problem reduction using predicate logic
 
MITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submissionMITCOE 2011-12 conm-submission
MITCOE 2011-12 conm-submission
 
single source shorest path
single source shorest pathsingle source shorest path
single source shorest path
 
Analyzing the behavior of instagram with graph theories
Analyzing the behavior of instagram with graph theoriesAnalyzing the behavior of instagram with graph theories
Analyzing the behavior of instagram with graph theories
 
Lecture24
Lecture24Lecture24
Lecture24
 
[論文読み]Interpretable Coun.ng for Visual Ques.on Answering
[論文読み]Interpretable Coun.ng for Visual Ques.on Answering[論文読み]Interpretable Coun.ng for Visual Ques.on Answering
[論文読み]Interpretable Coun.ng for Visual Ques.on Answering
 
Graph applications chapter
Graph applications chapterGraph applications chapter
Graph applications chapter
 
sin cos & tan (Plot using MATLAB)
sin cos  & tan (Plot using MATLAB)sin cos  & tan (Plot using MATLAB)
sin cos & tan (Plot using MATLAB)
 
A Sweepline Algorithm for Higher Order Voronoi Diagrams
A Sweepline Algorithm for Higher Order Voronoi DiagramsA Sweepline Algorithm for Higher Order Voronoi Diagrams
A Sweepline Algorithm for Higher Order Voronoi Diagrams
 
R Bootcamp Day 3 Part 1 - Statistics in R
R Bootcamp Day 3 Part 1 - Statistics in RR Bootcamp Day 3 Part 1 - Statistics in R
R Bootcamp Day 3 Part 1 - Statistics in R
 
RBootcam Day 2
RBootcam Day 2RBootcam Day 2
RBootcam Day 2
 
JPC#8 Foundation of Computer Science
JPC#8 Foundation of Computer ScienceJPC#8 Foundation of Computer Science
JPC#8 Foundation of Computer Science
 
Ch 7 tutoring notes quadratics
Ch 7 tutoring notes quadraticsCh 7 tutoring notes quadratics
Ch 7 tutoring notes quadratics
 

En vedette

Graph coloring and_applications
Graph coloring and_applicationsGraph coloring and_applications
Graph coloring and_applications
mohammad alkhalil
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
Tech_MX
 
Application of graph theory in drug design
Application of graph theory in drug designApplication of graph theory in drug design
Application of graph theory in drug design
Reihaneh Safavi
 
Football and graph theory
Football and graph theoryFootball and graph theory
Football and graph theory
Umang Aggarwal
 

En vedette (20)

GRAPH COLORING AND ITS APPLICATIONS
GRAPH COLORING AND ITS APPLICATIONSGRAPH COLORING AND ITS APPLICATIONS
GRAPH COLORING AND ITS APPLICATIONS
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
Graph coloring and_applications
Graph coloring and_applicationsGraph coloring and_applications
Graph coloring and_applications
 
Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring
 
Graph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Graph Coloring : Greedy Algorithm & Welsh Powell AlgorithmGraph Coloring : Greedy Algorithm & Welsh Powell Algorithm
Graph Coloring : Greedy Algorithm & Welsh Powell Algorithm
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Interesting applications of graph theory
Interesting applications of graph theoryInteresting applications of graph theory
Interesting applications of graph theory
 
Graph theory in Practise
Graph theory in PractiseGraph theory in Practise
Graph theory in Practise
 
graph theory
graph theory graph theory
graph theory
 
Design and Implementation of a Procedural Content Generation Web Application ...
Design and Implementation of a Procedural Content Generation Web Application ...Design and Implementation of a Procedural Content Generation Web Application ...
Design and Implementation of a Procedural Content Generation Web Application ...
 
Coloring graphs
Coloring graphsColoring graphs
Coloring graphs
 
From minimal feedback vertex set to democracy
From minimal feedback vertex set to democracyFrom minimal feedback vertex set to democracy
From minimal feedback vertex set to democracy
 
Graph coloring Algorithm
Graph coloring AlgorithmGraph coloring Algorithm
Graph coloring Algorithm
 
Graph Theory and Databases
Graph Theory and DatabasesGraph Theory and Databases
Graph Theory and Databases
 
2 Graph Theory
2 Graph Theory2 Graph Theory
2 Graph Theory
 
Graph theory and life
Graph theory and lifeGraph theory and life
Graph theory and life
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Application of graph theory in drug design
Application of graph theory in drug designApplication of graph theory in drug design
Application of graph theory in drug design
 
Football and graph theory
Football and graph theoryFootball and graph theory
Football and graph theory
 
Time-table Scheduling
Time-table SchedulingTime-table Scheduling
Time-table Scheduling
 

Similaire à Algorithms for Graph Coloring Problem

Pagerank (from Google)
Pagerank (from Google)Pagerank (from Google)
Pagerank (from Google)
Sri Prasanna
 

Similaire à Algorithms for Graph Coloring Problem (20)

Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
Recommender Systems with Implicit Feedback Challenges, Techniques, and Applic...
Recommender Systems with Implicit Feedback Challenges, Techniques, and Applic...Recommender Systems with Implicit Feedback Challenges, Techniques, and Applic...
Recommender Systems with Implicit Feedback Challenges, Techniques, and Applic...
 
Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...Bidirectional graph search techniques for finding shortest path in image base...
Bidirectional graph search techniques for finding shortest path in image base...
 
Goprez sg
Goprez  sgGoprez  sg
Goprez sg
 
1 chayes
1 chayes1 chayes
1 chayes
 
Csci101 lect03 algorithms_i
Csci101 lect03 algorithms_iCsci101 lect03 algorithms_i
Csci101 lect03 algorithms_i
 
analysis.ppt
analysis.pptanalysis.ppt
analysis.ppt
 
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
Tall-and-skinny Matrix Computations in MapReduce (ICME MR 2013)
 
Aaex4 group2(中英夾雜)
Aaex4 group2(中英夾雜)Aaex4 group2(中英夾雜)
Aaex4 group2(中英夾雜)
 
Backtracking
BacktrackingBacktracking
Backtracking
 
Pagerank (from Google)
Pagerank (from Google)Pagerank (from Google)
Pagerank (from Google)
 
Graph Coloring using Peer-to-Peer Networks
Graph Coloring using Peer-to-Peer NetworksGraph Coloring using Peer-to-Peer Networks
Graph Coloring using Peer-to-Peer Networks
 
Lec5 Pagerank
Lec5 PagerankLec5 Pagerank
Lec5 Pagerank
 
Lec5 pagerank
Lec5 pagerankLec5 pagerank
Lec5 pagerank
 
Lec5 Pagerank
Lec5 PagerankLec5 Pagerank
Lec5 Pagerank
 
An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...
 
International Journal of Managing Information Technology (IJMIT)
International Journal of Managing Information Technology (IJMIT)International Journal of Managing Information Technology (IJMIT)
International Journal of Managing Information Technology (IJMIT)
 
An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...An improved spfa algorithm for single source shortest path problem using forw...
An improved spfa algorithm for single source shortest path problem using forw...
 
Robust and Tuneable Family of Gossiping Algorithms
Robust and Tuneable Family of Gossiping AlgorithmsRobust and Tuneable Family of Gossiping Algorithms
Robust and Tuneable Family of Gossiping Algorithms
 
Learning Convolutional Neural Networks for Graphs
Learning Convolutional Neural Networks for GraphsLearning Convolutional Neural Networks for Graphs
Learning Convolutional Neural Networks for Graphs
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Algorithms for Graph Coloring Problem

  • 1. Algorithms for Graph Coloring Problem Wang Shengyi National University of Singapore November 6, 2014 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 1 / 24
  • 2. Introduction Problem Description Problem Description • For a graph G = (V; E) and a color sequence c = (c0; c1; : : : ; cn), firstly choose a node v 2 V and populate with c0 • Populate the rest of G in order of the rest of color sequence c such that only new nodes connected to a previously populated node may be populated. • Each populated G can be called a configuration, which can be seen as a function f mapping node to color. We can calculate a reward value for such a configuration f by the following formula: H = Σ All filled (i;j)2E 1 (f(i); f(j)) where (x; y) = { 0 x̸= y 1 x = y • For any G and c, develop an algorithm to generate a configuration that gives the maximum reward. Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 2 / 24
  • 3. Introduction Data Set Data Set Set Number of Vertices Number of Edges Length of Color Sequences 01 10 29 10 02 153 5533 20 03 153 5533 130 04 590 658 400 05 2969 3372 4000 06 483 1358 400 07 11748 34716 9000 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 3 / 24
  • 4. Introduction Data Set Data Set We can explore more… Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 4 / 24
  • 5. Introduction Data Set Graph Visualization: Graph 01 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 5 / 24
  • 6. Introduction Data Set Graph Visualization: Graph 02 03 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 6 / 24
  • 7. Introduction Data Set Graph Visualization: Graph 04 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 7 / 24
  • 8. Introduction Data Set Graph Visualization: Graph 05 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 8 / 24
  • 9. Introduction Data Set Graph Visualization: Graph 06 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 9 / 24
  • 10. Introduction Data Set Graph Visualization: Graph 07 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 10 / 24
  • 11. Introduction Data Set Color Sequence Visualization Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 11 / 24
  • 12. Algorithms Representation States • Each state can be represented as a triple t = ( ; p; ) • is the subgraph which has not been populated. • p is the set of all permitted choices. • is a sequence of nodes which have been populated chronologically. Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 12 / 24
  • 13. Algorithms Representation State Transition Function: Transit • Input: An old state ( ; p; ) and n 2 p • Output: An new state ( ′; p′; ′) • ′ = removing n and related edges • p′ = p [ neighbors of n in fng • ′ = :: n Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 13 / 24
  • 14. Algorithms Randomized Algorithms Search Component Generators: A Pentomino Style • A search component S 2 S is a stochastic algorithm. • Input: t = ( ; p; ), Output: One or multiple final states t1; t2; : : : ; tm • Before running, S would check the budget. For each final state, S compares the reward with the best result so far and updates the budget. • A search component generator : ! S • Given a set of parameters 2 , () is a search component • Simulate, Repeat, LookAhead, Step and Select Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 14 / 24
  • 15. Algorithms Randomized Algorithms Simulate Parameters: Policy simu, mapping from permitted set p to choice n. Algorithm: Repeatedly sampling nodes according to simu and performs transitions Transit until reaching the final state. Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 15 / 24
  • 16. Algorithms Randomized Algorithms Repeat Parameters: A positive integer N 0, a search component S Algorithm: It repeats performing S for N times. Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 16 / 24
  • 17. Algorithms Randomized Algorithms LookAhead Parameters: A search component S Algorithm: For each n 2 p, it performs S on Transit(t; n). Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 17 / 24
  • 18. Algorithms Randomized Algorithms Step Parameters: A search component S Algorithm: For each remaining steps until the final state, it performs S first. Then it extracts the local best choice nl and performs transition Transit(tstep; nl). Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 18 / 24
  • 19. Algorithms Randomized Algorithms Select Parameters: A selection policy sel, a search component S Algorithm: It looks like Step. But in each step, it chooses node according to sel. sel: UCB-1 C s(t; c): Sum of rewards,from S with Transit(t; c) n(t; c): Number of times c was selected in state t n(t): Sum of n(t; c) arg max c2p s(t; c) n(t; c) √ ln n(t) n(t; c) + C Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 19 / 24
  • 20. Algorithms Randomized Algorithms Compisition • Is = Step(Repeat(N; Simulate(random))) • Nmc(0) = Simulate(random) Nmc(l) = Step(LookAhead(Nmc(l 1))) • Uct(C) = Step(Repeat(N; Select(UCB-1 C ; Simulate(random)))) Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 20 / 24
  • 21. Algorithms Greedy Algorithm Greedy Strategy arg max c2p Reward(fcg [ Neighbors(c; G)) Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 21 / 24
  • 22. Result Results of Iterative Sampling (Is) N set01 set02 set03 set04 set05 set06 set07 1 11 50 1981 129 1039 439 9721 10 16 58 2091 159 1107 473 9777 100 19 74 2127 167 1126 483 9878 1000 19 79 2147 167 1158 489 9938 4000 19 84 2181 175 1158 506 10006 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 22 / 24
  • 23. Result Result of Different Algorithms for Budget 1000 Algorithms set01 set02 set03 set04 set05 set06 set07 Is 19 79 2147 167 1158 489 9938 Nmc(2) 19 79 2171 171 1152 498 9953 Nmc(3) 18 75 2158 173 1145 503 9912 Uct(0:3) 19 98 2165 171 1141 504 9933 Uct(0:5) 19 98 2165 171 1141 500 9933 Greedy 19 156 2719 219 1473 737 16118 Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 23 / 24
  • 24. Thank you! Wang Shengyi (NUS) Algorithms for Graph Coloring Problem November 6, 2014 24 / 24