coloring_nested_tire_graphs: add 3-chord example calculation in menagerie §6

Adds a worked example: G = C_8 with three non-crossing chords
{(v_0,v_2), (v_3,v_7), (v_4,v_6)}.  Walks through the calculation
of P_e(G, 3) by propagating constraints:

  1. Fix chord c_0 = a (3 choices).
  2. Forces {c(e_0), c(e_7)} = {b, c} and {c(e_1), c(e_2)} = {b, c}
     at v_0 and v_2; cycle constraint at v_1 ties them together.
  3. Propagating to chord 3-7 forces c_3 = a and the adjacent
     cycle edges to alternate {b, c}.
  4. Propagating to chord 4-6 forces c_4 = a and cycle edges
     continue the alternation.

Result: cycle edges alternate b, c around C_8 (OK since |C_8| is
even); all 3 chords get the same color a.  Total proper 3-edge-
colorings: 3 (choice of a) × 2 (b/c assignment) = 6, verified by
Sage's chromatic-polynomial computation on L(G).

Note that the graph admits a UNIQUE proper 3-edge-coloring modulo
permutation of the 3 colors -- the chord structure forces all
three chords to take the "third" color absent on the polygon cycle.

Adds:
- draw_3chord_example.py
- fig_3chord_example.png

Paper grows from 4 to 5 pages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 21:30:53 -04:00
parent 56649b428d
commit dfca45e913
6 changed files with 178 additions and 32 deletions
@@ -0,0 +1,86 @@
"""Draw C_8 with three non-crossing chords {(0,2), (3,7), (4,6)}, and
overlay the unique proper 3-edge-coloring (modulo permutation of the 3
colors)."""
import math
import os
import matplotlib.pyplot as plt
def main():
here = os.path.dirname(os.path.abspath(__file__))
out = os.path.join(here, 'fig_3chord_example.png')
n = 8
pos = {}
for i in range(n):
angle = math.pi / 2 - 2 * math.pi * i / n
pos[i] = (math.cos(angle), math.sin(angle))
cycle_edges = [(i, (i + 1) % n) for i in range(n)]
chords = [(0, 2), (3, 7), (4, 6)]
# Coloring (derived in the menagerie note):
# all 3 chords = color "a" (call it color 1).
# cycle alternates "b", "c": e_0=b, e_1=c, e_2=b, e_3=c, e_4=b, e_5=c, e_6=b, e_7=c.
A = '#1f77b4' # color a (used by chords)
B = '#d62728' # color b
C = '#2ca02c' # color c
cycle_colors = [B, C, B, C, B, C, B, C]
chord_color = A
fig, ax = plt.subplots(figsize=(5.4, 4.6))
# Cycle edges
for i, (u, v) in enumerate(cycle_edges):
x1, y1 = pos[u]; x2, y2 = pos[v]
ax.plot([x1, x2], [y1, y2], color=cycle_colors[i], linewidth=3.0,
solid_capstyle='round', zorder=1)
# Chords (dashed to distinguish)
for u, v in chords:
x1, y1 = pos[u]; x2, y2 = pos[v]
ax.plot([x1, x2], [y1, y2], color=chord_color, linewidth=3.0,
linestyle=(0, (3, 2)), solid_capstyle='round', zorder=1)
# Vertices: chord endpoints (degree 3) darker; others (degree 2) lighter
chord_verts = {v for c in chords for v in c}
for v, (x, y) in pos.items():
if v in chord_verts:
ax.plot(x, y, 'o', color='#333333', markersize=22, zorder=2)
ax.annotate(f"$v_{v}$", (x, y), color='white', ha='center',
va='center', fontsize=11, fontweight='bold', zorder=3)
else:
ax.plot(x, y, 'o', color='#888888', markersize=18, zorder=2)
ax.annotate(f"$v_{v}$", (x, y), color='white', ha='center',
va='center', fontsize=10, fontweight='bold', zorder=3)
legend_items = [
plt.Line2D([], [], color=A, linewidth=3, linestyle='--',
label='chord, color $a$'),
plt.Line2D([], [], color=B, linewidth=3, label='cycle, color $b$'),
plt.Line2D([], [], color=C, linewidth=3, label='cycle, color $c$'),
plt.Line2D([], [], marker='o', color='w', markerfacecolor='#333333',
markersize=12, label='chord-endpoint (degree 3)'),
plt.Line2D([], [], marker='o', color='w', markerfacecolor='#888888',
markersize=11, label='polygon-only vertex (degree 2)'),
]
ax.legend(handles=legend_items, loc='upper left',
bbox_to_anchor=(1.02, 1.0), fontsize=9, frameon=False)
ax.set_xlim(-1.4, 2.4)
ax.set_ylim(-1.3, 1.3)
ax.set_aspect('equal'); ax.axis('off')
ax.set_title(r'$C_8$ with 3 non-crossing chords $\{02,\, 37,\, 46\}$'
+ '\n'
+ r'($P_e(G,3) = 6$; unique coloring up to permutation '
r'of $\{a,b,c\}$)',
fontsize=11)
plt.savefig(out, dpi=160, bbox_inches='tight')
plt.close()
print(f"wrote {out}")
if __name__ == '__main__':
main()
Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

@@ -1,3 +1,4 @@
\relax
\@writefile{toc}{\contentsline {paragraph}{Closed form.}{3}{}\protected@file@percent }
\gdef \@abspage@last{4}
\@writefile{toc}{\contentsline {paragraph}{Example calculation (three chords on $C_8$).}{4}{}\protected@file@percent }
\gdef \@abspage@last{5}
@@ -1,4 +1,4 @@
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=pdflatex 2022.10.5) 25 MAY 2026 21:25
This is pdfTeX, Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=pdflatex 2022.10.5) 25 MAY 2026 21:30
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@@ -296,42 +296,47 @@ File: fig_theta133.png Graphic file (type png)
Package pdftex.def Info: fig_theta133.png used on input line 118.
(pdftex.def) Requested size: 272.45877pt x 107.18588pt.
[3 <./fig_theta133.png>]
<fig_blocktree.png, id=38, 242.55618pt x 147.70181pt>
<fig_3chord_example.png, id=38, 514.92375pt x 251.13824pt>
File: fig_3chord_example.png Graphic file (type png)
<use fig_3chord_example.png>
Package pdftex.def Info: fig_3chord_example.png used on input line 161.
(pdftex.def) Requested size: 328.82707pt x 160.37921pt.
<fig_blocktree.png, id=39, 242.55618pt x 147.70181pt>
File: fig_blocktree.png Graphic file (type png)
<use fig_blocktree.png>
Package pdftex.def Info: fig_blocktree.png used on input line 157.
Package pdftex.def Info: fig_blocktree.png used on input line 211.
(pdftex.def) Requested size: 258.36668pt x 157.34296pt.
[4 <./fig_blocktree.png>] (./menagerie.aux) )
[4 <./fig_3chord_example.png>] [5 <./fig_blocktree.png>] (./menagerie.aux) )
Here is how much of TeX's memory you used:
4634 strings out of 478268
75369 string characters out of 5846347
372157 words of memory out of 5000000
22812 multiletter control sequences out of 15000+600000
4641 strings out of 478268
75554 string characters out of 5846347
373157 words of memory out of 5000000
22818 multiletter control sequences out of 15000+600000
479481 words of font info for 67 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
55i,6n,63p,245b,198s stack positions out of 10000i,1000n,20000p,200000b,200000s
{/usr/local/texlive/2022/texmf-dis
t/fonts/enc/dvips/cm-super/cm-super-ts1.enc}</usr/local/texlive/2022/texmf-dist
/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/local/texlive/2022/texmf-dist/
fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/local/texlive/2022/texmf-dist/f
onts/type1/public/amsfonts/cm/cmex10.pfb></usr/local/texlive/2022/texmf-dist/fo
nts/type1/public/amsfonts/cm/cmmi10.pfb></usr/local/texlive/2022/texmf-dist/fon
ts/type1/public/amsfonts/cm/cmmi12.pfb></usr/local/texlive/2022/texmf-dist/font
s/type1/public/amsfonts/cm/cmmi8.pfb></usr/local/texlive/2022/texmf-dist/fonts/
type1/public/amsfonts/cm/cmr10.pfb></usr/local/texlive/2022/texmf-dist/fonts/ty
pe1/public/amsfonts/cm/cmr12.pfb></usr/local/texlive/2022/texmf-dist/fonts/type
1/public/amsfonts/cm/cmr17.pfb></usr/local/texlive/2022/texmf-dist/fonts/type1/
public/amsfonts/cm/cmr6.pfb></usr/local/texlive/2022/texmf-dist/fonts/type1/pub
lic/amsfonts/cm/cmr8.pfb></usr/local/texlive/2022/texmf-dist/fonts/type1/public
/amsfonts/cm/cmsy10.pfb></usr/local/texlive/2022/texmf-dist/fonts/type1/public/
amsfonts/cm/cmsy8.pfb></usr/local/texlive/2022/texmf-dist/fonts/type1/public/am
sfonts/cm/cmti10.pfb></usr/local/texlive/2022/texmf-dist/fonts/type1/public/ams
fonts/cm/cmtt10.pfb></usr/local/texlive/2022/texmf-dist/fonts/type1/public/cm-s
uper/sfrm1095.pfb>
Output written on menagerie.pdf (4 pages, 262034 bytes).
55i,8n,63p,245b,198s stack positions out of 10000i,1000n,20000p,200000b,200000s
{/u
sr/local/texlive/2022/texmf-dist/fonts/enc/dvips/cm-super/cm-super-ts1.enc}</us
r/local/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr
/local/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/
local/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/l
ocal/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/lo
cal/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb></usr/loc
al/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></usr/local
/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/local/t
exlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/local/tex
live/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></usr/local/texli
ve/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/local/texlive/
2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/local/texlive/202
2/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb></usr/local/texlive/2022
/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy8.pfb></usr/local/texlive/2022/t
exmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></usr/local/texlive/2022/te
xmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></usr/local/texlive/2022/tex
mf-dist/fonts/type1/public/cm-super/sfrm1095.pfb>
Output written on menagerie.pdf (5 pages, 321355 bytes).
PDF statistics:
111 PDF objects out of 1000 (max. 8388607)
60 compressed objects within 1 object stream
116 PDF objects out of 1000 (max. 8388607)
62 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
31 words of extra memory for PDF output out of 10000 (max. 10000000)
36 words of extra memory for PDF output out of 10000 (max. 10000000)
@@ -151,6 +151,60 @@ chromatic polynomial computable by the same transfer-matrix idea
along the $r{+}1$ paths between consecutive chord endpoints on the
polygon, with a product constraint at each chord endpoint.
\paragraph{Example calculation (three chords on $C_8$).}
Take the polygon $C_8$ with the three non-crossing chords
$\{(v_0,v_2),\,(v_3,v_7),\,(v_4,v_6)\}$. Vertices
$v_0, v_2, v_3, v_4, v_6, v_7$ have degree $3$ (chord endpoints) and
$v_1, v_5$ have degree $2$.
\begin{center}
\includegraphics[width=0.70\textwidth]{fig_3chord_example.png}
\end{center}
We compute $P_e(G,3)$ by propagating constraints. Let $c_0, c_3, c_4$
denote the colors of the chords $(v_0v_2), (v_3v_7), (v_4v_6)$, and
let $e_i = (v_i, v_{i+1})$ for $i = 0, \dots, 7$ (indices mod $8$) be
the cycle edges.
\emph{Step 1 (fix $c_0$).} Pick the chord $0{-}2$'s color: 3 choices,
say $c_0 = a$.
\emph{Step 2 (cycle edges at $v_0, v_2$).} At $v_0$ the three edges
$\{e_0, e_7, \text{chord }02\}$ must use three distinct colors, so
$\{c(e_0), c(e_7)\} = \{b, c\}$ where $\{a,b,c\} = \{1,2,3\}$. Likewise
$\{c(e_1), c(e_2)\} = \{b, c\}$. The cycle constraint at $v_1$
(\,$c(e_0)\ne c(e_1)$\,) then forces $c(e_1) = c(e_7)$ and so
$c(e_2) = c(e_0)$. Two choices for the assignment, say $c(e_0)=b$,
giving $e_0=b, e_1=c, e_2=b, e_7=c$.
\emph{Step 3 (propagate to chord $37$).} At $v_3$: $\{c(e_2), c(e_3),
c_3\}$ distinct. We have $c(e_2)=b$, and at $v_7$ similarly
$\{c(e_6), c(e_7), c_3\}$ distinct with $c(e_7)=c$. Hence
$c_3 \ne b$ and $c_3 \ne c$, forcing $c_3 = a$. Then
$c(e_3) \ne b, a \Rightarrow c(e_3) = c$, and $c(e_6) \ne c, a
\Rightarrow c(e_6) = b$.
\emph{Step 4 (propagate to chord $46$).} At $v_4$:
$\{c(e_3), c(e_4), c_4\}$ distinct with $c(e_3) = c$; at $v_6$:
$\{c(e_5), c(e_6), c_4\}$ distinct with $c(e_6) = b$. Hence
$c_4 \ne c, b \Rightarrow c_4 = a$. Then $c(e_4) = b$ and
$c(e_5) = c$ (the unique remaining colors).
\emph{Step 5 (verify).} Cycle edges go $b, c, b, c, b, c, b, c$
around the $8$-cycle (alternating, OK since $8$ is even);
all three chords have color $a$; all degree-$3$ vertices see three
distinct colors.
Total count:
\[
\#(\text{colorings}) \;=\; \underbrace{3}_{c_0\in\{1,2,3\}}
\;\cdot\;\underbrace{2}_{\text{which of }\{b,c\}\text{ is }c(e_0)}
\;=\; 6.
\]
This matches \texttt{Sage}'s direct chromatic-polynomial computation:
$P_e(G,3) = 6$. Up to permutation of the three colors there is a
\emph{unique} proper $3$-edge-coloring of this $G$.
\subsection*{7.~Block--cut decomposition}
\begin{center}