Files
DiscretMathematics/13ColoringMapsAndGraphs.tex
2023-01-04 12:36:04 +08:00

277 lines
15 KiB
TeX
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
\chapter{染色问题}
\section{区域的二色着色}
\begin{theorem}
对平面上的$n$个圆分成的区域,只需用两种颜色就可以将任意两个有公共弧的区域染成不同的颜色。
\end{theorem}
\begin{proof}
用数学归纳法。$n = 1$时,显然成立。
$n = k-1$时都成立。那么$n = k$时(见图\ref{加入一个新圆前后颜色的调整}),将新加的圆内部的所有区域的颜色互换,考察变换后区域分割线(弧)两侧区域的颜色。
\begin{enumerate}
\item 弧在新圆的外部,两侧的颜色没有变化,根据归纳假设,颜色一定是不同的;
\item 弧在新圆的内部,根据归纳假设,在变化之前颜色是不同的,互换后颜色也是不同的;
\item 弧在新圆上,弧将原先的一个区域划分为了两个,由于圆外部的颜色没有变化,内部的颜色对掉,因此弧两侧颜色也不相同。
\end{enumerate}
综上,$n = k$时结论也成立。
\end{proof}
\begin{figure}[H]
\centering
\subfloat[加入新圆前]{
\begin{tikzpicture}
\filldraw[thick, draw=black, fill=red!50, even odd rule] (50:0.7)circle(1)(170:0.7)circle(1)(290:0.7)circle(1);
\draw[dashed] (300:2) circle (1.5);
\end{tikzpicture}
}
\hspace{2cm}
\subfloat[加入新圆后]{
\begin{tikzpicture}
\filldraw[thick, draw=black, fill=red!50, even odd rule] (50:0.7)circle(1)(170:0.7)circle(1)(290:0.7)circle(1) (300:2) circle (1.5);
\end{tikzpicture}
}
\caption{加入一个新圆前后颜色的调整}
\label{加入一个新圆前后颜色的调整}
\end{figure}
\section{图的二色着色}
\begin{figure}[H]
\centering
\subfloat{
\begin{tikzpicture}
\filldraw[thick, draw=black, fill=red!50, even odd rule] (50:0.7)circle(1)(170:0.7)circle(1)(290:0.7)circle(1) (300:2) circle (1.5);
\node[draw=black, circle, inner sep=0, minimum size=5pt] (a) at (110:0.6) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (b) at (230:0.6) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (c) at (0:0.55) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (d) at (290:1) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (k) at (220:3) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (e) at (0,0) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (f) at (50:1) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (g) at (170:1) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (h) at (300:2.5) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (i) at (332:0.73) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (j) at (244:1.15) {};
\draw (a)--(e)--(b)--(g)--(a)--(f)--(c)--(e) (b)--(j)--(d)--(i)--(c) (d)--(h)--(k)--(j) (f).. controls(90:3)and(170:3.5)..(k)--(g);
\end{tikzpicture}
}
\hspace{2cm}
\subfloat{
\begin{tikzpicture}
\node[draw=black, circle, inner sep=0, minimum size=5pt] (a) at (110:0.6) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (b) at (230:0.6) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (c) at (0:0.55) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (d) at (290:1) {};
\node[draw=black, circle, inner sep=0, minimum size=5pt] (k) at (220:3) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (e) at (0,0) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (f) at (50:1) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (g) at (170:1) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (h) at (300:2.5) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (i) at (332:0.73) {};
\node[draw=black, circle, fill=red!70, inner sep=0, minimum size=5pt] (j) at (244:1.15) {};
\draw (a)--(e)--(b)--(g)--(a)--(f)--(c)--(e) (b)--(j)--(d)--(i)--(c) (d)--(h)--(k)--(j) (f).. controls(90:3)and(170:3.5)..(k)--(g);
\end{tikzpicture}
}
\caption{将区域染色转化为顶点染色}
\label{将区域染色转化为顶点染色}
\end{figure}
可以把图的每个区域看作某个图的每个顶点,两个区域相邻即图中顶点有一条边将对应的两个顶点相连。这个区域涂色问题就被转化为了在某个图的顶点上涂色使得每个相邻顶点间的颜色都不相同(图\ref{将区域染色转化为顶点染色})——可以发现,这意味着这个图是一个二部图。
\begin{definition}
对图$G = (E,V)$,对$u,v \in V$$u,v$之间的距离定义为$u,v$间最近的路path的长度。
\end{definition}
\begin{theorem}
$G$是二部图与图$G$没有奇数长度的圈等价。
\end{theorem}
\begin{proof}
不失一般性可设$G$为连通图。因此我们任取其中的一个顶点$a$,一定能长出$G$的一个生成树。依次画出与$a$的距离是$1, 2, 3, \dots$的点。(图\ref{二部图无奇圈}
\begin{figure}[H]
\centering
\begin{tikzpicture}[scale=0.9]
\node[draw=black, circle, fill=blue!50] (a) at (0,0) {};
\node[draw=black, circle] (b1) at (-4,1) {};
\node[draw=black, circle] (b2) at (1,1) {};
\node[draw=black, circle] (b3) at (3,1) {};
\draw (a)--(b1) (a)--(b2) (a)--(b3);
\node[draw=black, circle, fill=blue!50] (c1) at (-6, 3) {};
\node[draw=black, circle, fill=blue!50] (c2) at (-3,3) {};
\node[draw=black, circle, fill=blue!50] (c3) at (-1,3) {};
\node[draw=black, circle, fill=blue!50] (c4) at (1,3) {};
\node[draw=black, circle, fill=blue!50] (c5) at (3,3) {};
\node[draw=black, circle, fill=blue!50] (c6) at (4,3) {};
\node[draw=black, circle, fill=blue!50] (c7) at (6,3) {};
\draw (b1)--(c1) (b1)--(c2) (b2)--(c3) (b2)--(c4) (b2)--(c5) (b3)--(c6) (b3)--(c6) (b3)--(c7);
\node[draw=black, circle] (d1) at (-4, 5) {};
\node[draw=black, circle] (d2) at (-2, 5) {};
\node[draw=black, circle] (d3) at (-1,5) {};
\node[draw=black, circle] (d4) at (0, 5) {};
\node[draw=black, circle] (d5) at (3,5) {};
\node[draw=black, circle] (d6) at (5,5) {};
\draw (c2)--(d1) (c2)--(d2) (c3)--(d3) (c4)--(d4) (c4)--(d5) (c5)--(d6);
\node[draw=black, circle, fill=blue!50] (e1) at (-2,7) {};
\node[draw=black, circle, fill=blue!50] (e2) at (0,7) {};
\draw (d3)--(e1) (d3)--(e2);
\node at (0,7.4) {$u$};
\node at (1.4,3) {$v$};
\draw[dashed] (e2)..controls (1.5,6) and (1.5,5) .. (c4);
\node at (0.3,-0.3) {$a$};
\end{tikzpicture}
\caption{一棵以$a$为根的生成树}
\label{二部图无奇圈}
\end{figure}
$a$及与$a$的距离为偶数的点划为一组,与$a$距离为奇数的划为一组。假设在原图中存在一条连接同一组内组员的边,这会形成一个奇数长度的圈,与已知条件矛盾。因此所有的边只可能连接不同组的点。
\end{proof}
\section{多色着色}
\begin{definition}
$G$的正常着色(或简称着色)是指对它的每一个顶点指定一种颜色,使得没有两个相邻的顶点有同一种颜色。如果图在着色时用了$n$种颜色,我们称$G$$n$-色的。
对图$G$着色时,需要的最少颜色称为$G$\newnoun{色数}{chromatic number},记作$\chi(G)$
\end{definition}
例如,若$P_n$是一条$n$个顶点的路,$C_n$是一个$n$个顶点的圈,那么
\begin{align*}
& \chi(P_n) = 2, n > 1\\
& \chi(C_n) = \begin{cases}
2, n \text{为偶数}\\
3, n \text{为奇数}
\end{cases}\\
& \chi(K_n) = n
\end{align*}
对点着色的Powell方法
\begin{enumerate}
\item 将顶点按度数递减次序进行排列。
\item 用第一种颜色对排序第一的顶点着色,并按次序对与以着色点不相邻的点着同样的颜色。
\item 用第二种颜色对剩下的为着色的顶点中排序第一的点重复第二步,再用第三种、第四种颜色这么做……直到所有的点都着了色。
\end{enumerate}
\begin{theorem}[Brooks' Theorem]
若某个图中的顶点的度数最多为$d$,那么用$d+1$种颜色一定可以对它着色。
\end{theorem}
\begin{proof}
对顶点数$n$做数学归纳。$n \leq d + 1$时,显然成立。假设$n = k-1$时,结论成立。当$n = k$时,任意去掉$G$中的某个顶点$v$。那么$G - v$中的所有点的度仍旧不大于$d$,由归纳假设,$G-v$可用$d+1$种颜色着色。那么对于$v$,它最多与$d$个顶点相邻,因此一定至少有一种颜色没有被任何与它相邻的点使用,令$v$染上这些颜色中的一种即得到了一种$G$$d+1$-色的染色方法。
\end{proof}
这个定理还可以扩展:
\begin{theorem}[Szekeres-Wilf]
$\delta(H):= \min \{d(v) \mid v \in V(H)\}$,那么$\chi(G) \leq \max \{\delta(H) \mid H \subseteq G\} + 1$
\end{theorem}
\section{地图染色与四色定理}
将一个地图中相邻的国家染上不同的颜色,至少需要多少种颜色?
十九世纪中叶英国人Guthrie提出了用四种颜色即可对地图着色的猜想1879年Kempe给出这个猜想的第一个``证明''。但到1890年Heawood发现Kempe的证明是错误的同时他指出Kempe的方法虽然不能证明地图着色用四种颜色就够了但可证明用五种颜色就够了即五色定理成立。
此后四色猜想一直是数学家感兴趣而且能解决的难题。直到1976年美国数学家Appel和Haken宣布在Koch的帮助下他们利用电子计算机证明了四色猜想是成立的。因此现在四色猜想已经改称为``四色定理''了。
\begin{definition}
对具有面$F_1, F_2, \dots, F_n$的平图$G = (V, E, V)$
若图$G^\ast = (V^\ast, E^\ast)$满足下列条件:
\begin{enumerate}
\item$G$的每一个面$F_i$的内部作一个$G^\ast$的顶点$v_i^\ast$,即图$G$的任一个面$F_i$内部有且仅有一个顶点$v_i^\ast \in V^\ast$
\begin{figure}[H]
\centering
\begin{tikzpicture}
\node[draw=black, circle] (a) at (1.5,0) {};
\node[draw=black, circle] (b) at (0,1.5) {};
\node[draw=black, circle] (c) at (-1.5,0) {};
\node[draw=black, circle] (d) at (0,-1.5) {};
\node[draw=black, circle] (e) at (-3,0) {};
\node[draw=black, circle, fill=red!50] (f) at (0,0.7) {};
\node[draw=black, circle, fill=red!50] (g) at (0,-0.7) {};
\node[draw=black, circle, fill=red!50] (h) at (-4,0) {};
\draw (e)--(c)--(d)--(a)--(c)--(b)--(a);
\end{tikzpicture}
\end{figure}
\item$G$的面$F_i, F_j$有公共边$e_k$,则作$e_k^\ast = \{v_i^\ast, v_j^\ast\}$,且$e_k^\ast$$e_k$相交。
\begin{figure}[H]
\centering
\begin{tikzpicture}
\node[draw=black, circle] (a) at (1.5,0) {};
\node[draw=black, circle] (b) at (0,1.5) {};
\node[draw=black, circle] (c) at (-1.5,0) {};
\node[draw=black, circle] (d) at (0,-1.5) {};
\node[draw=black, circle] (e) at (-3,0) {};
\node[draw=black, circle, fill=red!50] (f) at (0,0.7) {};
\node[draw=black, circle, fill=red!50] (g) at (0,-0.7) {};
\node[draw=black, circle, fill=red!50] (h) at (-4,0) {};
\draw (e)--(c)--(d)--(a)--(c)--(b)--(a);
\draw[color=red!80!black] (f)..controls (-2,1.5)and (-4,1)..(h)..controls (-4,-1)and(-2,-1.5)..(g)--(f)..controls(3,4)and(-4.3,3)..(h)..controls(-4.3,-3)and(3,-4)..(g);
\end{tikzpicture}
\end{figure}
\item 当且仅当$e_k$只是一个面$F_i$的边界(即它为一个桥)时,$v_i^\ast$存在一个环$e_k^\ast$$e_k$相交。
\begin{figure}[H]
\centering
\begin{tikzpicture}
\node[draw=black, circle] (a) at (1.5,0) {};
\node[draw=black, circle] (b) at (0,1.5) {};
\node[draw=black, circle] (c) at (-1.5,0) {};
\node[draw=black, circle] (d) at (0,-1.5) {};
\node[draw=black, circle] (e) at (-3,0) {};
\node[draw=black, circle, fill=red!50] (f) at (0,0.7) {};
\node[draw=black, circle, fill=red!50] (g) at (0,-0.7) {};
\node[draw=black, circle, fill=red!50] (h) at (-4,0) {};
\draw (e)--(c)--(d)--(a)--(c)--(b)--(a);
\draw[color=red!80!black] (f)..controls (-2,1.5)and (-4,1)..(h)..controls (-4,-1)and(-2,-1.5)..(g)--(f)..controls(3,4)and(-4.3,3)..(h)..controls(-4.3,-3)and(3,-4)..(g) (h)..controls(-1.5,1.5)and(-1.5,-1.5)..(h);
\end{tikzpicture}
\end{figure}
\end{enumerate}
则图$G^\ast$称为图$G$\newnoun{对偶图}{dual of planar map}
\end{definition}
\begin{remark}
平图的对偶图仍旧是平图。
\end{remark}
有了对偶图的概念,我们可以发现,对图$G$的边和面着色的问题可以转化为对$G^\ast$的边和点着色的问题。因此,地图着色问题可以转化为试证明对于任何一个平面图,一定可以用四种颜色,对它的顶点进行着色,是的相邻的顶点都有不同的颜色。
\begin{theorem}
平面图的色数不超过4。
\end{theorem}
证明中涉及了大量的枚举,因此不做展示。
我们可以证明一个较弱的定理:
\begin{theorem}\label{五色定理}
任意平面图最多是5-色的。
\end{theorem}
为了证明这个结论,我们首先需要一个引理。
\begin{lemma}
每个平面单图必有一个顶点$u$满足$d(u) \leq 5$
\end{lemma}
\begin{proof}
$\vert V \vert = v, \vert E \vert = e$,且$G$的最小度为$\delta$,则
\[v \delta \leq \sum d(v_i) = 2 \vert E \vert = 2e \leq 2(3v - 6)\]
$\delta \leq 6 - \dfrac{12}{v}$,同时$\delta \in \integer$,所以$\delta \leq 5$
\end{proof}
现在我们来证明定理\ref{五色定理}
\begin{proof}
对顶点数进行数学归纳。
平面图$G$的顶点数不多于5时结论成立。
假设$G$有至多$k$个顶点时结论成立。那么下面考虑$G$$k+1$个顶点的情形。
现在$G$中删去最小度数的顶点$v$,所得的图$G-v$$k$个顶点且仍为平面图,根据归纳假设,$G-v$是5-色的。之后考虑$v$$G$中的度数。若$d(v) \leq 5$,则至少有一种颜色$v$的邻居没有用,$v$可以正常染色;若$d(v) = 5$,则考虑以下变换:与$v$相邻的五个点不可能两两都相邻,因为如果它们两两相邻,则形成一个五个点的团$K_5$,这与$G$是平图是矛盾的。因此一定可以找到点$u,w \in N(v)$$u,w$不相邻。因此我们可以为先把$u,w$合并看作一个点,这个新图$G^\prime$由归纳假设一定是5-色的。再把$u,w$放回$G$种观察,$v$的所有临点最多使用了四种不同的颜色,因此$v$一定至少有一种颜色可染,得证。
\end{proof}