图论课件--着色的计数与色多项式
- 格式:ppt
- 大小:1.04 MB
- 文档页数:19
第一章 图形理论图形理论有明确的起始点,由瑞士数学家尤拉(Leonhard Euler, 1707-1783)于1736年发表的论文开始。
其研究的主要论点,乃在于解决当时的热门问题,即有名K önigsgerg 的七桥问题。
1.1 定义与例题定义1.1:令 V 为非空集合,且E V V ⊆⨯. 序对(),V E 称为(V 上)有向图(directedgraph or digraph),其中 V 为顶点(vertex)或节点(node)的集合,E 为边(edge)的集合。
我们记(),G V E =表示此图形。
图1.1为{}, , , , V a b c d e =上有向图的例子,其中()()()(){}, , , , , , , E a a a b a d b c =。
边的方向由边上的有向箭头表示,如图所示对任意边,如(), b c ,我们说此边接合(incident)顶点, b c ;称b 邻接至(adjacent to) c ;或c 邻接自(adjacent from) b 。
此外, b 称为边的原点(origin)或源点(source), c 称为终点(terminus or terminating vertex)。
边(), a a 为一个循环(loop), 且顶点e 不与任何边接合,称为孤立点(isolated)。
若不考虑边的方向,此图称为无向图(undirected)。
定义1.2:令, x y 为无向图(), G V E =的顶点(不一定相异)。
G 中的X Y -路(x y -walk)是指选自G 的顶点及边的有限交错序列。
01122311,,,,,,...,,,,n n n n x x e x e x e e x e x y --==其中由顶点 1x 开始,终止于顶点y ,n 个边{}1,,1i i i e x x i n -=≤≤路的长度(length)是指该条路的边数n 。
图论中的图的着色与染色问题在图论中,图的着色与染色问题是一类经典的问题。
图的着色是指给图的每个顶点赋予一个颜色,要求相邻的顶点不能有相同的颜色;而图的染色是指给图的边赋予一个颜色,要求相邻的边不能有相同的颜色。
一、图的顶点着色图的顶点着色问题是图论中的经典问题之一。
给定一个无向图,要求为每个顶点分配一个颜色,使得任意两个相邻的顶点颜色不同。
这个问题的本质是将相邻的顶点划分到不同的颜色集合中。
解决图的顶点着色问题有多种算法,其中较为简单和常用的是贪心算法。
贪心算法按照某种规则为图的顶点逐个着色,每次着色时选择当前可用颜色的最小编号。
贪心算法的时间复杂度为O(n^2),其中n 为图的顶点数。
二、图的边染色图的边染色问题是另一个经典的图论问题。
给定一个无向图,要求给每条边分配一个颜色,使得任意两条相邻的边颜色不同。
这个问题的目标是将相邻的边划分到不同的颜色集合中。
解决图的边染色问题的算法有多种,其中常用的是基于回溯法和深度优先搜索的算法。
回溯法通过递归地尝试为每条边分配颜色,并根据约束条件进行回溯,直到找到可行的解或者穷尽所有可能。
深度优先搜索则通过遍历图的边,逐个给边染色,当发现某条边与相邻边颜色相同时,回溯到前一条边重新选择颜色。
三、特殊图的着色与染色问题除了一般的图的着色与染色问题,还存在一些特殊类型的图,对应着特殊的着色与染色问题。
1. 树的着色与染色:在树中,任意两个顶点之间都只有一条路径,因此树的着色与染色问题可以简化为树的边染色问题。
树的边染色问题可以使用贪心算法解决,每次为某条边选择一个未使用的颜色,直到所有边都被染色。
2. 平面图的着色与染色:平面图是指可以画在平面上,且任意两条边最多只有一个公共顶点的图。
平面图的着色与染色问题是在满足平面图约束条件下对图进行着色或染色。
对于平面图的着色与染色问题,使用四色定理可以得到解,即任何平面图最多只需要四种颜色来着色或染色。
四、应用领域图的着色与染色问题在实际应用中具有广泛的应用。
§6.5 染色应用举例—求图的边色数及色数的算法一、排课表问题—求二部图的正常)(G χ′边染色1. 问题: 有m 位教师m x x x ,,,21 ,n 个班级n y y y ,,,21 。
教师x i 每周需要给班级y j 上p ij 次(节)课。
要求制订一张周课时尽可能少的课程表。
2. 图论模型:构造二部图),(Y X G =,其中X ={m x x x ,,,21 },Y ={n y y y ,,,21 },顶点i x 与j y 之间连ij p 条边。
一个课时的安排方案对应于二部图G 的一个匹配。
排课表问题等价于:将E (G )划分成一些匹配,使得匹配的数目尽可能地少。
按)(G χ′的定义,这个最小的数目便是)(G χ′。
由定理6.2.1,()()G G χ′=Δ。
因此,排课表问题等价于:求二部图G 的边正常)(G Δ染色。
如§6.1中所述,虽然求简单图的正常(1+Δ)边染色存在多项式时间算法,但求简单图G 的边色数)(G χ′及其相应的正常边染色是一个NPC 问题[28]。
尽管如此,求二部图的边正常Δ染色却有多项式时间算法。
求图的边色数的近似算法可参考文献[29]~[51]。
[28] I. Holyer, The NP-completeness of edge-coloring, SIAM J. Computing , 10: 4(1981), 718-720.[29] E. Petrank, The hardness of approximation: gap location, Computational Complexity , 4 (1994), 133-157.[30] D. Leven and Z. Galil, NP completeness of finding the chromatic index of regular graphs, J. Algorithms , 4(1983) 35-44.[31] P. Crescenzi, V . Kann, R. Silvestri, and L. Trevisan, Structure in approximation classes, SIAM J. Comp., 28 (1999), 1759-1782.[32] J. Misra and D. Gries, A constructive proof of Vizing's theorem. Inform. Process. Lett. 41 (1992), 131-133.[33] O. Terada, and T. Nishizeki, Approximate algorithms for the edge-coloring of graphs, Trans. Inst. Eletron. Commun. Engr. Japan J65-D , 11(1982), 1382-1389.[34] M. Chrobak, and T. Nishizeki, Improved edge-coloring algorithms for planar graphs, J. Algorithms , 11(1990), 102-116.[35] I. Caragiannis, A. Ferreira, C. Kaklamanis, S. Perennes, P. Persiano and H. Rivano, Approximate constrained bipartite edge coloring, Discrete Applied Mathematics , 143(2004), 54-61[36] M. R. Salavatipour, A polynomial time algorithm for strong edge coloring of partial k -trees, Discrete Applied Mathematics , 143(2004), 285-291.[37] D.A. Grable, A. Panconesi, Nearly optimal distributed edge coloring in O (log log n ) rounds, Proceedings of the Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, January, (1997), 278–285.[38] Yijie Han, Weifa Liang and Xiaojun Shen, Very fast parallel algorithms for approximate edge coloring, Discrete Applied Mathematics, 108(2001), 227-238.[39] M. Fürer and B. Raghavachari, Parallel edge coloring approximation, Parallel Process. Lett. , 6 (1996), 321–329.[40] H.J. Karloff and D.B. Shmoys, Efficient parallel algorithms for edge coloring problems. J. Algorithms 8 (1987), 39–52.[41] W. Liang, Fast parallel algorithms for the approximate edge-coloring problem. Inform. Process. Lett. 56 (1995), 333–338.[42] W. Liang, X. Shen and Q. Hu, Parallel algorithms for the edge-coloring and edge-coloring update problems. J. Parallel Distrib. Comput. 32 (1996), 66-73.[43] R. Motwani, J. Naor and M. Naor, The probabilistic method yields deterministic parallel algorithms. J. Comput. System Sci. 49 (1994), 478-516.[44] D. Bertsimas, C-P. Teo, and R. V ohra, On dependent randomized rounding algorithms, Proc. 5th Int. Conf. on Integer Prog. and Combinatorial Optimization , Lecture Notes in Comput. Sci. 1084, Springer-Verlag, (1996), 330-344.[45] M.K. Goldberg, Edge-colorings of multigraphs: recoloring technique, J. Graph Theory , 8(1984), 123-127.[46] D.S. Hochbaum, T. Nishizeki and D.B. Shmoys, Better than “Best Possible” algorithm to edge color multi graphs, Journal of Algorithms , 7(1986), 79-104[47] T. Nishizeki and K. Kashiwagi, On the 1.1 edge-coloring of multigraphs, SIAM J. Disc. Math. , 3(1990), 391-410.[48] J. Kahn, Asymptotics of the chromatic index for multigraphs, Journal of Combinatorial Theory (Ser. B ), 68(1996), 233-254.[49] X. Zhou H. Susuki, and T. Nishizeki, A linear algorithm for edge-coloring series-parallel multigraphs, J. Algorithms , 20(1996), 174-201.[50] X. Zhou H. Susuki, and T. Nishizeki, An NC parallel algorithm for edge-coloring series-parallel multigraphs, J. Algorithms , 23(1997), 359-374.[51] B. Berger and J. Rompel, Simulating (log c n )-wise independence in NC. J. ACM 38 (1991), 1026–1046.3. 求二部图),(Y X G =的边正常)(G Δ染色的算法z 算法思想:给G 添加必要的顶点使得||||Y X =,再添加必要的边使得G 成为)(G Δ正则二部图,所得图记为*G ,然后反复运用匈牙利算法求*G 的完美匹配。