diff --git a/papers/coloring_nested_tire_graphs/notes/draw_3chord_example.py b/papers/coloring_nested_tire_graphs/notes/draw_3chord_example.py new file mode 100644 index 0000000..efe9003 --- /dev/null +++ b/papers/coloring_nested_tire_graphs/notes/draw_3chord_example.py @@ -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() diff --git a/papers/coloring_nested_tire_graphs/notes/fig_3chord_example.png b/papers/coloring_nested_tire_graphs/notes/fig_3chord_example.png new file mode 100644 index 0000000..55a05a3 Binary files /dev/null and b/papers/coloring_nested_tire_graphs/notes/fig_3chord_example.png differ diff --git a/papers/coloring_nested_tire_graphs/notes/menagerie.aux b/papers/coloring_nested_tire_graphs/notes/menagerie.aux index 5dd1744..3242b1d 100644 --- a/papers/coloring_nested_tire_graphs/notes/menagerie.aux +++ b/papers/coloring_nested_tire_graphs/notes/menagerie.aux @@ -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} diff --git a/papers/coloring_nested_tire_graphs/notes/menagerie.log b/papers/coloring_nested_tire_graphs/notes/menagerie.log index 541ff6d..0110919 100644 --- a/papers/coloring_nested_tire_graphs/notes/menagerie.log +++ b/papers/coloring_nested_tire_graphs/notes/menagerie.log @@ -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>] - + +File: fig_3chord_example.png Graphic file (type png) + +Package pdftex.def Info: fig_3chord_example.png used on input line 161. +(pdftex.def) Requested size: 328.82707pt x 160.37921pt. + File: fig_blocktree.png Graphic file (type 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} -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} +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) diff --git a/papers/coloring_nested_tire_graphs/notes/menagerie.pdf b/papers/coloring_nested_tire_graphs/notes/menagerie.pdf index 3323c3b..069db0d 100644 Binary files a/papers/coloring_nested_tire_graphs/notes/menagerie.pdf and b/papers/coloring_nested_tire_graphs/notes/menagerie.pdf differ diff --git a/papers/coloring_nested_tire_graphs/notes/menagerie.tex b/papers/coloring_nested_tire_graphs/notes/menagerie.tex index 8c9d27b..bbc1203 100644 --- a/papers/coloring_nested_tire_graphs/notes/menagerie.tex +++ b/papers/coloring_nested_tire_graphs/notes/menagerie.tex @@ -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}