diff --git a/lib/colored_graphs.py b/lib/colored_graphs.py index 30d89fc..9ca0b05 100644 --- a/lib/colored_graphs.py +++ b/lib/colored_graphs.py @@ -53,8 +53,8 @@ def plot_colored_graph_to_data_uri(g: Graph, coloring: VertexColoring) -> str: return f"data:image/png;base64,{base64.b64encode(png_bytes).decode()}" -def canonize_and_save_graph(g: Graph) -> Graph: - """Canonize g, save to data/graphs//graph.sobj, and return the canonical graph.""" +def canonize_and_save_graph(g: Graph) -> tuple[Graph, Path]: + """Canonize g, save to data/graphs//graph.sobj, and return the canonical graph and its folder.""" canonical = cast(Graph, g.canonical_label()) graph_id = base64.urlsafe_b64encode(canonical.graph6_string().encode()).decode() out_dir = DIR / "data" / "graphs" / graph_id @@ -63,7 +63,7 @@ def canonize_and_save_graph(g: Graph) -> Graph: canonical.is_planar(set_embedding=True, set_pos=True) canonical.plot().save(out_dir / 'graph.png') save(canonical, str(out_dir / 'graph')) - return canonical + return canonical, out_dir def save_colored_graph(g: Graph, coloring: VertexColoring) -> tuple[Graph, VertexColoring, ColoredGraphId]: diff --git a/papers/plane_depth_sequencing/paper.fdb_latexmk b/papers/plane_depth_sequencing/paper.fdb_latexmk index 28fad6d..7605e1f 100644 --- a/papers/plane_depth_sequencing/paper.fdb_latexmk +++ b/papers/plane_depth_sequencing/paper.fdb_latexmk @@ -1,6 +1,6 @@ # Fdb version 4 -["pdflatex"] 1777053383.55176 "/home/didericis/Code/math-research/papers/plane_depth_sequencing/paper.tex" "paper.pdf" "paper" 1777053383.84327 0 - "/home/didericis/Code/math-research/papers/plane_depth_sequencing/paper.tex" 1777053383.36427 4888 bd237dd4af63f4b6efd49e77e2265fe5 "" +["pdflatex"] 1777104409.51711 "/home/didericis/Code/math-research/papers/plane_depth_sequencing/paper.tex" "paper.pdf" "paper" 1777104409.7899 0 + "/home/didericis/Code/math-research/papers/plane_depth_sequencing/paper.tex" 1777104409.33562 5020 563243a3090f17940469736cc026af9c "" "/nix/store/4g7bv3lsd1r7lrfxi0x145xac0jag4hl-texlive-combined-full-2025.20250703/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map" 1 5523663 ec1f96d89b308e150332b305019a3402 "" "/nix/store/4g7bv3lsd1r7lrfxi0x145xac0jag4hl-texlive-combined-full-2025.20250703/share/texmf-var/web2c/pdftex/pdflatex.fmt" 1 3600504 177ced77725200f4fa24b79427ded12f "" "/nix/store/4g7bv3lsd1r7lrfxi0x145xac0jag4hl-texlive-combined-full-2025.20250703/share/texmf-var/web2c/texmf.cnf" 1 44455 00ca67f5a06c9c23b32559f3f48cb4e9 "" @@ -45,8 +45,8 @@ "/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsmath/amsopn.sty" 1 4474 c510a88aa5f51b8c773b50a7ee92befd "" "/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsmath/amstext.sty" 1 2444 9983e1d0683f102e3b190c64a49313aa "" "/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/l3backend/l3backend-pdftex.def" 1 30351 a2b09edc6c93a742566b222c33d0278e "" - "paper.aux" 1777053383.80427 278 6ee4d5d6b3925666e01309d058e35079 "pdflatex" - "paper.tex" 1777053383.36427 4888 bd237dd4af63f4b6efd49e77e2265fe5 "" + "paper.aux" 1777104409.75063 278 6ee4d5d6b3925666e01309d058e35079 "pdflatex" + "paper.tex" 1777104409.33562 5020 563243a3090f17940469736cc026af9c "" (generated) "paper.aux" "paper.log" diff --git a/papers/plane_depth_sequencing/paper.log b/papers/plane_depth_sequencing/paper.log index bbf3b9c..63a013d 100644 --- a/papers/plane_depth_sequencing/paper.log +++ b/papers/plane_depth_sequencing/paper.log @@ -1,32 +1,43 @@ -This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025/nixos.org) (preloaded format=pdflatex 1980.1.1) 24 APR 2026 13:56 +This is pdfTeX, Version 3.141592653-2.6-1.40.27 (TeX Live 2025/nixos.org) (preloaded format=pdflatex 1980.1.1) 25 APR 2026 04:07 entering extended mode restricted \write18 enabled. - file:line:error style messages enabled. %&-line parsing enabled. -**/home/didericis/Code/math-research/papers/plane_depth_sequencing/paper.tex -(/home/didericis/Code/math-research/papers/plane_depth_sequencing/paper.tex +**paper.tex +(./paper.tex LaTeX2e <2025-06-01> patch level 1 L3 programming layer <2025-06-09> -(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amscls/amsart.cls + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amscls/amsart.cls Document Class: amsart 2020/05/29 v2.20.6 \linespacing=\dimen148 \normalparindent=\dimen149 \normaltopskip=\skip49 -(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsmath/amsmath.sty + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsmath/amsmath.sty Package: amsmath 2025/06/16 v2.17y AMS math features \@mathmargin=\skip50 For additional information on amsmath, use the `?' option. -(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsmath/amstext.sty + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsmath/amstext.sty Package: amstext 2024/11/17 v2.01 AMS text - (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsmath/amsgen.sty + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsmath/amsgen.sty File: amsgen.sty 1999/11/30 v2.0 generic functions \@emptytoks=\toks17 \ex@=\dimen150 -)) (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsmath/amsbsy.sty +)) +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsmath/amsbsy.sty Package: amsbsy 1999/11/29 v1.2d Bold Symbols \pmbraise@=\dimen151 -) (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsmath/amsopn.sty +) +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsmath/amsopn.sty Package: amsopn 2022/04/08 v2.04 operator names ) \inf@bad=\count275 @@ -77,10 +88,15 @@ LaTeX Info: Redefining \Relbar on input line 970. LaTeX Info: Redefining \[ on input line 2949. LaTeX Info: Redefining \] on input line 2950. ) -LaTeX Font Info: Trying to load font information for U+msa on input line 397. - (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsfonts/umsa.fd +LaTeX Font Info: Trying to load font information for U+msa on input line 397 +. + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsfonts/umsa.fd File: umsa.fd 2013/01/14 v3.01 AMS symbols A -) (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsfonts/amsfonts.sty +) +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsfonts/amsfonts.sty Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support \symAMSa=\mathgroup4 \symAMSb=\mathgroup5 @@ -113,7 +129,9 @@ LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' \dth@everypar=\toks27 ) \c@theorem=\count295 - (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/l3backend/l3backend-pdftex.def + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/l3backend/l3backend-pdftex.def File: l3backend-pdftex.def 2025-06-09 L3 backend support: PDF output (pdfTeX) \l__color_backend_stack_int=\count296 ) (./paper.aux) @@ -134,15 +152,22 @@ LaTeX Font Info: ... okay on input line 52. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 52. LaTeX Font Info: ... okay on input line 52. LaTeX Font Info: Trying to load font information for U+msa on input line 52. - (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsfonts/umsa.fd + + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsfonts/umsa.fd File: umsa.fd 2013/01/14 v3.01 AMS symbols A ) LaTeX Font Info: Trying to load font information for U+msb on input line 52. - (/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.20250703-texmfdist/tex/latex/amsfonts/umsb.fd + + +(/nix/store/zwvq8i154s539b4w2fqhia83fsfng7ng-texlive-combined-full-2025.2025070 +3-texmfdist/tex/latex/amsfonts/umsb.fd File: umsb.fd 2013/01/14 v3.01 AMS symbols B ) -[1{/nix/store/4g7bv3lsd1r7lrfxi0x145xac0jag4hl-texlive-combined-full-2025.20250703/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] +[1{/nix/store/4g7bv3lsd1r7lrfxi0x145xac0jag4hl-texlive-combined-full-2025.20250 +703/share/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2] (./paper.aux) *********** @@ -151,15 +176,35 @@ L3 programming layer <2025-06-09> *********** ) Here is how much of TeX's memory you used: - 1764 strings out of 467888 - 25961 string characters out of 5405403 + 1763 strings out of 467888 + 25768 string characters out of 5405403 436018 words of memory out of 5000000 30194 multiletter control sequences out of 15000+600000 633232 words of font info for 65 fonts, out of 8000000 for 9000 1302 hyphenation exceptions out of 8191 - 71i,6n,79p,816b,238s stack positions out of 10000i,1000n,20000p,200000b,200000s - -Output written on paper.pdf (2 pages, 142375 bytes). + 71i,6n,79p,751b,238s stack positions out of 10000i,1000n,20000p,200000b,200000s + +Output written on paper.pdf (2 pages, 143149 bytes). PDF statistics: 71 PDF objects out of 1000 (max. 8388607) 42 compressed objects within 1 object stream diff --git a/papers/plane_depth_sequencing/paper.pdf b/papers/plane_depth_sequencing/paper.pdf index 034f9d3..8906baf 100644 Binary files a/papers/plane_depth_sequencing/paper.pdf and b/papers/plane_depth_sequencing/paper.pdf differ diff --git a/papers/plane_depth_sequencing/paper.synctex.gz b/papers/plane_depth_sequencing/paper.synctex.gz deleted file mode 100644 index 1cc5a6e..0000000 Binary files a/papers/plane_depth_sequencing/paper.synctex.gz and /dev/null differ diff --git a/papers/plane_depth_sequencing/paper.tex b/papers/plane_depth_sequencing/paper.tex index 2ec2ef4..5986f51 100644 --- a/papers/plane_depth_sequencing/paper.tex +++ b/papers/plane_depth_sequencing/paper.tex @@ -86,6 +86,10 @@ Let $G$ be a graph with a plane embedding, and let $C$ be the outer cycle of tha where $d(v, u)$ denotes the graph distance between $v$ and $u$ in $G$. \end{definition} +\begin{definition} +An edge $\{u, v\} \in E(G)$ is a \emph{level edge} if $\mathrm{depth}(u) = \mathrm{depth}(v)$. +\end{definition} + \begin{definition} Let $G$ be a maximal planar graph with a plane embedding and outer cycle $C$. The \emph{deep embedding} of $G$ is the graph $G'$ obtained from $G$ by the following operation: for every 3-cycle $\{u, v, w\} \subseteq V(G)$ such that \[ diff --git a/plane_depth_sequencing.py b/plane_depth_sequencing.py index 35fae3a..cf59935 100644 --- a/plane_depth_sequencing.py +++ b/plane_depth_sequencing.py @@ -68,5 +68,6 @@ def generate_example(n: int) -> DeeplyEmbeddedGraph: if __name__ == "__main__": example = generate_example(10) - canonical = canonize_and_save_graph(example['graph']) + canonical, graph_dir = canonize_and_save_graph(example['graph']) + (graph_dir / "plane_depth_sequence").mkdir(parents=True, exist_ok=True) print(canonical)