贪心算法求着色问题(matlab版)我要分享

Greedy algorithm for coloring problem (matlab version)

关注次数: 271

下载次数: 0

文件大小: 2.80 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:该代码是利用贪心算法思想求解着色问题,先去度最大的节点,开始着色,然后用同一颜色尽可能多的着色,直到无法给节点着色,就增加颜色,直到所有节点都着色,算法结束。


English Description:

The code is to use the idea of greedy algorithm to solve the coloring problem, first go to the node with the largest degree, start coloring, and then use the same color as much as possible, until the node can not be colored, increase the color, until all nodes are colored, the end of the algorithm.


代码预览

相关推荐