├── DSJC500.5.col ├── HEA02.cpp ├── HEAD02.cpp ├── LICENSE ├── README.md └── Tabu08.cpp /HEA02.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Grasssleeve/Graph-Coloring-Problem/b465864424e0d0d318c632a7bf6b70bc9ce17464/HEA02.cpp -------------------------------------------------------------------------------- /HEAD02.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Grasssleeve/Graph-Coloring-Problem/b465864424e0d0d318c632a7bf6b70bc9ce17464/HEAD02.cpp -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Cherry Bomb 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Graph-Coloring-Problem 2 | Using 3 ways to solve the problem: Tabu Search, Hybrid Evolutionary Algorithms and HEA in Duet. 3 | 4 | ## Description 5 | 6 | *Tabu08.cpp* uses algorithm from [Using tabu search techniques for graph coloring](https://link.springer.com/article/10.1007/BF02239976). 7 | 8 | *HEA02.cpp* uses algorithm from [Hybrid Evolutionary Algorithms for Graph Coloring](https://link.springer.com/article/10.1023/A:1009823419804). 9 | 10 | *HEAD01.cpp* uses algorithm from [Variations on memetic algorithms for graph coloring problems](https://link.springer.com/article/10.1007/s10732-017-9354-9). 11 | 12 | *DSJC500.5.col* is the test instance. 13 | 14 | The last one is published in Feb, 2018 and is the fastest one among these 3 ways. And its best solution is K=47. 15 | 16 | Tabu search is the foundation of other 2 ways. 17 | 18 | Thanks for [chenfengkg](https://github.com/chenfengkg) 's article [禁忌搜索算法解决图着色问题](https://blog.csdn.net/hujinglovekmg/article/details/79203792). Tabu08.cpp borrowed his ideas and I made some changes in judgment condition to make it more concise. 19 | 20 | The main difference from his code is the way to select move, shown as following. 21 | 22 | ```c++ 23 | if (tmp_delt <= delt && ( iter> h_tabu[j]|| (tmp_delt + f)