<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\section{Colorisation Welsh} 
%&lt;â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“ graphs with colors â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€“â€”â€“â€“&gt;
Ce chapitre montre comment colorer des sommets. Le plus simple est d'utiliser le style \tkzname{Welsh} et la macro \tkzcname{AddVertexColor} afin de colorer les sommets.

\subsection{La macro \tkzcname{AddVertexColor} } 

\begin{NewMacroBox}{AddVertexColor}{\var{color}\var{List of vertices}}

\medskip
\emph{Cette macro permet de colorer des sommets. Le premier argument est la couleur, le second une liste  de sommets.}
\end{NewMacroBox} 

\subsection{Exemple d'utilisation } 

\medskip
Une compagnie aÃ©rienne propose des vols directs entre certaines villes, notÃ©es A, B, C, D, E, F et G. Cela conduit au graphe $\mathcal{G}$ suivant, dont les sommets sont les villes et les arÃªtes reprÃ©sentent les liaisons aÃ©riennes :
 
 \begin{center}
\begin{tikzpicture}
\renewcommand*{\VertexLineWidth}{2pt}  
 \GraphInit[vstyle=Welsh]
 \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}  
 \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture} 
\end{center}

\begin{enumerate}

\item Sur les cartes d'embarquement, la compagnie attribue Ã&nbsp; chaque aÃ©roport une couleur, de sorte que deux aÃ©roports liÃ©s par un vol direct aient des couleurs diffÃ©rentes.

 Proposer un coloriage adaptÃ©â€š cette condition.
\item Que peut-on en dÃ©duire sur le nombre chromatique de $\mathcal{G}$ ?
\end{enumerate}



\begin{center}
\begin{tkzltxexample}[]
\begin{tikzpicture}
\renewcommand*{\VertexLineWidth}{2pt}  
 \GraphInit[vstyle=Welsh]
 \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}  
 \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture} 
\end{tkzltxexample}
\end{center}

\bigskip
\begin{minipage}{7cm}
 \begin{tikzpicture}
\renewcommand*{\VertexLineWidth}{2pt}  
 \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}  
 \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
 \end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}{7cm}
 \begin{tabular}{cc}
 \hline
 \itshape Sommet &amp; \itshape DegrÃ© \\
 \hline
 B &amp; $5$ \\
 E &amp; $5$ \\
 C &amp; $4$ \\
 D &amp; $4$ \\
 A &amp; $3$ \\
 G &amp; $3$ \\
 F &amp; $2$ \\
 \hline
 \end{tabular}
\end{minipage}

\begin{tkzltxexample}[]
 \begin{tikzpicture}
\renewcommand*{\VertexLineWidth}{2pt}   
 \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
 \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture}
\end{tkzltxexample}

\bigskip
\begin{minipage}{7cm}
 \begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\begin{tabular}{ccc}
\hline
\itshape Sommet &amp; \itshape DegrÃ© &amp; \itshape Couleur\\
\hline
B &amp; $5$ &amp; rouge\\
E &amp; $5$ &amp; \\
C &amp; $4$ &amp; \\
D &amp; $4$ &amp; \\
A &amp; $3$ &amp; \\
G &amp; $3$ &amp; \\
F &amp; $2$ &amp; rouge\\
\hline
\end{tabular}
\end{minipage}

\begin{tkzltxexample}[]
\begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture}
\end{tkzltxexample}

\bigskip
\begin{minipage}{7cm}
 \begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\begin{tabular}{ccc}
\hline
\itshape Sommet &amp; \itshape DegrÃ© &amp; \itshape Couleur\\
\hline
B &amp; $5$ &amp; rouge\\
E &amp; $5$ &amp; bleu\\
C &amp; $4$ &amp; \\
D &amp; $4$ &amp; \\
A &amp; $3$ &amp; bleu\\
G &amp; $3$ &amp; \\
F &amp; $2$ &amp; rouge\\
\hline
\end{tabular}
\end{minipage}

\begin{tkzltxexample}[]
\begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F}
  \AddVertexColor{blue}{E,A}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A)
  \Edges(B,E)
\end{tikzpicture}
\end{tkzltxexample}

\bigskip
\begin{minipage}{7cm}
\begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A}
  \AddVertexColor{green}{C,G}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\begin{tabular}{ccc}
\hline
\itshape Sommet &amp; \itshape DegrÃ© &amp; \itshape Couleur\\
\hline
B &amp; $5$ &amp; rouge\\
E &amp; $5$ &amp; bleu\\
C &amp; $4$ &amp; vert\\
D &amp; $4$ &amp; \\
A &amp; $3$ &amp; bleu\\
G &amp; $3$ &amp; vert\\
F &amp; $2$ &amp; rouge\\
\hline
\end{tabular}
\end{minipage}

\begin{tkzltxexample}[]
\begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F} \AddVertexColor{blue}{E,A}
  \AddVertexColor{green}{C,G}
  \Vertex[Node]{D}}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture}
\end{tkzltxexample}

\bigskip
\begin{minipage}{7cm}
\begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F}   \AddVertexColor{blue}{E,A}
  \AddVertexColor{green}{C,G} \AddVertexColor{yellow}{D}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A) \Edges(B,E)
\end{tikzpicture}
\end{minipage}
\hfill
\begin{minipage}{7cm}
\begin{tabular}{ccc}
\hline
\itshape Sommet &amp; \itshape DegrÃ© &amp; \itshape Couleur\\
\hline
B &amp; $5$ &amp; rouge\\
E &amp; $5$ &amp; bleu\\
C &amp; $4$ &amp; vert\\
D &amp; $4$ &amp; jaune\\
A &amp; $3$ &amp; bleu\\
G &amp; $3$ &amp; vert\\
F &amp; $2$ &amp; rouge\\
\hline
\end{tabular}
\end{minipage}

\begin{tkzltxexample}[]
 \begin{tikzpicture}
  \renewcommand*{\VertexLineWidth}{2pt}  
  \GraphInit[vstyle=Welsh]
  \Vertices[unit=3]{circle}{A,B,C,D,E,F,G}   
  \SetVertexNoLabel
  \AddVertexColor{red}{B,F}  \AddVertexColor{blue}{E,A}
  \AddVertexColor{green}{C,G}\AddVertexColor{yellow}{D}
  \Vertex[Node]{D}}
  \Edges(G,E,F,G,B,D,E,C,D,A,C,B,A)\Edges(B,E)
\end{tikzpicture}
\end{tkzltxexample}
\endinput</pre></body></html>