Jekyll2020-01-22T17:11:55+00:00https://11011110.github.io/blog/feed.xml11011110Geometry, graphs, algorithms, and moreDavid EppsteinWhen does 2SAT have an integral relaxation?2020-01-18T16:31:00+00:002020-01-18T16:31:00+00:00https://11011110.github.io/blog/2020/01/18/when-does-2sat<p>In the <a href="https://en.wikipedia.org/wiki/2-satisfiability">2-satisfiability problem</a>, or 2SAT, the input is a system of constraints between pairs of Boolean variables, and the problem is to find a truth assignment satisfying all the constraints. Although the usual formulation writes the constraints as disjunctions (Boolean or), it’s convenient and equivalent to use implications instead, where each side of an implication can be either one of the variables or its negation. If you encode the variables as numbers, with <script type="math/tex">1</script> for true and <script type="math/tex">0</script> for false, then the negation of a variable <script type="math/tex">x</script> is <script type="math/tex">1-x</script> and the implication <script type="math/tex">x\rightarrow y</script> can be encoded as the linear inequality <script type="math/tex">x\le y</script>. If we forget the restriction that the values are <script type="math/tex">0</script> or <script type="math/tex">1</script>, this system of inequalities defines a convex polytope, which can be thought of as a <a href="https://en.wikipedia.org/wiki/Linear_programming_relaxation">relaxation</a> of the given 2SAT problem. Each solution to the 2SAT problem corresponds to a vertex of this polytope but there might be other vertices as well, with fractional coordinates. We don’t want those; it’s more useful to have a polytope <a href="https://en.wikipedia.org/wiki/Integral_polytope">all of whose coordinates are integers</a>, coming from solutions to the underlying 2SAT problem. When does this happen (without adding extra inequalities)?</p>
<p>I’m pretty sure the answer has been known, at least implicitly, for a long time, and that there are no new ideas in the rest of this post. See e.g. the answer to <a href="https://cstheory.stackexchange.com/a/46188/95">this very closely related question on relaxations of the vertex cover problem</a> and note that vertex cover can be formulated as 2SAT, with a variable per vertex and two constraints per edge of the input graph. But when I looked for it, I found it difficult to find references that give the answer explicitly. So here it is. The following conditions are equivalent:</p>
<ul>
<li>The given 2SAT instance has an integral relaxation.</li>
<li>The given 2SAT instance has two solutions that are the complements of each other (each variable is true in one of the solutions and false in the other).</li>
<li>The compatibility graph of the given 2SAT instance is bipartite.</li>
</ul>
<p>Here, the compatibility graph is an undirected graph defined by Feder in “Network Flow and 2-Satisfiability” (<em>Algorithmica</em> 1994). It has a vertex for each literal (a variable or its negation). The two vertices for a variable and its negation are connected by an edge, called a “trivial edge”. Additionally,
for each implication <script type="math/tex">x\rightarrow y</script>, the two literals <script type="math/tex">x</script> and <script type="math/tex">\lnot y</script> cannot both be true, and we add an edge between them.</p>
<p>If the compatibility graph is bipartite, two-color it, make the vertices of one color be true, and make the vertices of the other color be false. Then this gives a solution to the 2SAT instance whose complement is also a solution. So the third condition implies the second condition.</p>
<p>The relaxation of any 2SAT instance contains the point whose coordinates all equal <script type="math/tex">\tfrac12</script>, and if the given instance has an integral relaxation then this point can be represented as a weighted average of integer solutions. An odd cycle in the compatibility graph would prevent that from being possible. For any point in the relaxation, and any literal, we consider the value of the literal to be either its coordinate value (if it represents a variable) or one minus that value (if it represents a negated variable). If some cycle has odd length <script type="math/tex">\ell</script>, then each integer point in the weighted average could only have total value at most <script type="math/tex">(\ell-1)/2</script> on the literals of the cycle, so their weighted average would also be at most <script type="math/tex">(\ell-1)/2</script>, less than the cycle’s total value of <script type="math/tex">\ell/2</script> in the all-<script type="math/tex">\tfrac12</script> solution. So the first condition implies the third condition.</p>
<p>Finally, suppose that there are two complementary solutions, and flip the variables if necessary so that these are the all-false and all-true assignments to the variables. (This flipping simplifies the problem without changing any of the three conditions.) Consider any fractional solution <script type="math/tex">S</script>, and construct from it a probability distribution on truth assignments as follows: choose a uniformly random number <script type="math/tex">x\in [0,1]</script>, set to true the variables whose coordinate value is at least <script type="math/tex">x</script>, and set to false the remaining variables.
All truth assignments generated in this way solve the 2SAT problem, because any violation of an implication constraint in the 2SAT problem would translate to a violation of the corresponding coordinate inequality constraint in the relaxation. The given fractional solution <script type="math/tex">S</script> is a weighted average of the resulting collection of 2SAT solutions, where the weight of a solution is the probability of generating it. Therefore, the second condition implies the first condition.</p>
<p>(<a href="https://mathstodon.xyz/@11011110/103507316629491293">Discuss on Mastodon</a>)</p>David EppsteinIn the 2-satisfiability problem, or 2SAT, the input is a system of constraints between pairs of Boolean variables, and the problem is to find a truth assignment satisfying all the constraints. Although the usual formulation writes the constraints as disjunctions (Boolean or), it’s convenient and equivalent to use implications instead, where each side of an implication can be either one of the variables or its negation. If you encode the variables as numbers, with for true and for false, then the negation of a variable is and the implication can be encoded as the linear inequality . If we forget the restriction that the values are or , this system of inequalities defines a convex polytope, which can be thought of as a relaxation of the given 2SAT problem. Each solution to the 2SAT problem corresponds to a vertex of this polytope but there might be other vertices as well, with fractional coordinates. We don’t want those; it’s more useful to have a polytope all of whose coordinates are integers, coming from solutions to the underlying 2SAT problem. When does this happen (without adding extra inequalities)?Linkage2020-01-15T22:59:00+00:002020-01-15T22:59:00+00:00https://11011110.github.io/blog/2020/01/15/linkage<ul>
<li>
<p>Recently read: Robert Bosch’s <em>Opt Art: From Mathematical Optimization to Visual Design</em>, <a href="https://mathlesstraveled.com/2019/11/16/book-review-opt-art/">as reviewed in <em>The Math Less Traveled</em></a> (<a href="https://mathstodon.xyz/@11011110/103412030032115785"><script type="math/tex">\mathbb{M}</script></a>). Some others that are less mathematical: Susan Phillips <em>The City Beneath</em> (the rare book about graffiti where the words are more interesting than the photos); Kelly & Zach Weinersmith’s <em>Soonish</em>; <em>Spectrum 26: The Best in Contemporary Fantastic Art</em>.</p>
</li>
<li>
<p>I’m sad that <a href="https://en.wikipedia.org/wiki/Cambridge_Zero">Cambridge Zero</a> is not a name for the convention that, in writing a decimal number between 0 and 1, the leading 1’s digit is included (e.g. 0.618034, not .618034). (<a href="https://mathstodon.xyz/@11011110/103415602604747766"><script type="math/tex">\mathbb{M}</script></a>.)</p>
</li>
<li>
<p><a href="https://www.soue.org.uk/souenews/issue4/wallis.html">John Wallis and the Roof of the Sheldonian Theatre</a> (<a href="https://mathstodon.xyz/@11011110/103423324228262704"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://aperiodical.com/2019/11/my-adventures-in-3d-printing-wallis-sheldonian-theatre-roof/">via</a>). It’s an elegant way to build a wide roof out of short beams with no joinery. But the history is somewhat lacking: Similar structures were known much earlier to Leonardo Da Vinci, Villard de Honnecourt, and Sebastiano Serlio. See Sylvie Duvernoy, “<a href="https://doi.org/10.1007/978-3-7643-8728-0_1">An introduction to Leonardo’s lattices</a>”.</p>
</li>
<li>
<p><a href="https://hackeducation.com/2019/12/31/what-a-shitshow">The 100 worst ed-tech debacles of the decade</a> (<a href="https://mathstodon.xyz/@pkra/103427036327542926"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://www.latimes.com/business/story/2020-01-04/rhapsody-in-blue-copyright-law"><em>Rhapsody in Blue</em> (1924) just reached the public domain, showing the insanity of U.S. copyright law</a> (<a href="https://mathstodon.xyz/@11011110/103432817381841613"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://www.thisiscolossal.com/2015/11/collages-augustine-kofie/">Geometric collages by Augustine Kofie</a> (<a href="https://mathstodon.xyz/@11011110/103440293167247768"><script type="math/tex">\mathbb{M}</script></a>). More at <a href="https://augustinekofie.info/">the artist’s web site</a>.</p>
</li>
<li>
<p><a href="https://math.stackexchange.com/questions/2869725/minimal-surfaces-for-planar-octagons-and-nonagons">How few <script type="math/tex">k</script>-gons can make a polyhedron, for different choices of <script type="math/tex">k</script>? </a> (<a href="https://mathstodon.xyz/@11011110/103446222145063436"><script type="math/tex">\mathbb{M}</script></a>, <a href="http://www.mathpuzzle.com/">via</a>, <a href="https://mathstodon.xyz/@christianp/103425156116096450">via</a>.) The answers include an amazing high-genus polyhedron with 12 faces, each of which is an 11-gon, posted Nov 2018 by Ivan Neretin (sadly, with multiple adjacencies for some pairs of faces, dubious by some definitions of polyhedra, rather than having one edge per face pair).</p>
</li>
<li>
<p><a href="https://newsroom.publishers.org/researchers-and-publishers-oppose-immediate-free-distribution-of-peer-reviewed-journal-articles">Information about ACM’s opposition to mandatory open access of publicly-funded research</a> (<a href="https://mathstodon.xyz/@patmorin/103448005171034417"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://www.sciencemag.org/news/2020/01/russian-journals-retract-more-800-papers-after-bombshell-investigation">Russian Academy of Science cleans house</a> (<a href="https://mathstodon.xyz/@11011110/103457148027652979"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://boingboing.net/2020/01/09/antiplagiat.html">via</a>). Their investigation finds 2528 plagiarized papers in 541 Russian-language journals, gets roughly 1/3 of them retracted, and threatens uncooperative journals with de-listing from their indexes. They also recommended blackballing 56 candidates for academy membership over plagiarism and other misbehavior.</p>
</li>
<li>
<p><a href="https://www.vice.com/en_us/article/qjd8j3/the-mta-is-going-after-an-etsy-artist-over-a-new-york-subway-map-it-didnt-make">The New York subway system thinks it has copyright on any stylized geometric map of its system and is sending takedown notices to the artist of the unofficial map used by Wikipedia</a> (<a href="https://mathstodon.xyz/@11011110/103463673345804837"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://news.ycombinator.com/item?id=22002272">via</a>). As the article clearly explains, none of the underlying data of the map, the approximate geographic locations of its stations, or the idea of geometric stylization are copyrightable.</p>
</li>
<li>
<p><a href="https://www.thisiscolossal.com/2020/01/paris-musees-free-digital-artworks/">Paris Musées releases 100,000 images of artworks for unrestricted public use</a> (<a href="https://mathstodon.xyz/@11011110/103469315555489525"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://www.quantamagazine.org/how-simple-math-can-cover-even-the-most-complex-holes-20200108/">How simple math can cover even the most complex holes</a> (<a href="https://mathstodon.xyz/@btcprox/103480282462508854"><script type="math/tex">\mathbb{M}</script></a>). <em>Quanta</em> on covering all diameter-one shapes with the smallest possible convex region</p>
</li>
<li>
<p><a href="https://arxiv.org/abs/2001.04383">MIP*=RE</a> or, less technically, “<a href="https://www.scottaaronson.com/blog/?p=4512">two entangled provers could convince a polynomial-time verifier than an arbitrary Turing machine halts</a>” (<a href="https://mathstodon.xyz/@11011110/103483043292500103"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://windowsontheory.org/2020/01/14/mipre-connes-embedding-conjecture-disproved/">see also</a>, <a href="https://rjlipton.wordpress.com/2020/01/15/halting-is-poly-time-quantum-provable/">see also</a>). This appears to be a major breakthrough in quantum complexity and <a href="https://en.wikipedia.org/wiki/Connes_embedding_problem">its applications in von Neumann algebra</a>. See also some <a href="https://mycqstate.wordpress.com/2020/01/14/a-masters-project/">background from an author</a>.</p>
</li>
<li>
<p><a href="https://socg20.inf.ethz.ch/cgme-cfp.html">Computational Geometry Media Exposition coming in Zurich in late June</a> (<a href="https://mathstodon.xyz/@11011110/103488449029758388"><script type="math/tex">\mathbb{M}</script></a>). It’s one of the events associated with the annual Symposium on Computational Geometry, and was formerly called the video review of computational geometry. This year it’s expanding to a much wider range of media. Submission deadline February 21; see link for details.</p>
</li>
</ul>David EppsteinRecently read: Robert Bosch’s Opt Art: From Mathematical Optimization to Visual Design, as reviewed in The Math Less Traveled (). Some others that are less mathematical: Susan Phillips The City Beneath (the rare book about graffiti where the words are more interesting than the photos); Kelly & Zach Weinersmith’s Soonish; Spectrum 26: The Best in Contemporary Fantastic Art.Counting grid polygonalizations2020-01-12T13:33:00+00:002020-01-12T13:33:00+00:00https://11011110.github.io/blog/2020/01/12/counting-grid-polygonalizations<p>A <em>polygonalization</em> of a point set is a simple polygon having all the points as its vertices. Another way to think about it is that it’s a non-crossing Hamiltonian cycle in a complete geometric graph. <a href="/blog/2019/03/12/counting-polygon-triangulations.html">My recent work on the hardness of counting polygon triangulations</a> was motivated in large part by the problem of counting polygonalizations. Counting polygonalizations should also be hard, but I don’t know how to prove it, and I was hoping that proving other similar problems hard might either lead to more insights or at least provide something to prove a reduction from.</p>
<p>More recently I’ve been attacking the problem from a different direction: looking at the number of polygonalizations for special point sets that are structured enough to make it possible to compute the answer easily while not being completely trivial. The point sets I chose were the <script type="math/tex">3\times n</script> integer grids. Smaller grids are uninteresting: <script type="math/tex">1\times n</script> grids don’t have any polygonalizations and <script type="math/tex">2\times n</script> grids have only one, the outer rectangle.</p>
<p>In a <script type="math/tex">3\times n</script> grid, any polygonalization must touch the outer points of the grid in clockwise order. And any subset of the inner <script type="math/tex">n-2</script> points that are between the same pair of outer points can only be connected in consecutive order. So, to describe a polygonalization, we only need to determine for each inner point which pair of outer points it is between. One way to do this is to assign letters to the consecutive pairs of outer points (for instance <script type="math/tex">labc\dots r</script> along the upper left, top, and upper right, and <script type="math/tex">LABC\dots R</script> along the lower left, bottom, and lower right).
Then, identify each polygonalization with a sequence of letters describing the positions of its <script type="math/tex">n-2</script> inner points, in their left-to-right order.</p>
<p style="text-align:center"><img src="/blog/assets/2020/gridcycles.svg" alt="Polygonalizations of a 2x5 grid labeled by the positions of the three inner points in the cyclic sequence of outer points" /></p>
<p>This gives a one-to-one correspondence between polygonalizations and strings, where:</p>
<ul>
<li>Each string has length <script type="math/tex">n-2</script>.</li>
<li>The letters of the strings are drawn from the alphabet <script type="math/tex">labc\dots rLABC\dots R</script>.</li>
<li>If a letter appears in a string, all its appearances are consecutive.</li>
<li>The subsequence of letters from <script type="math/tex">labc\dots r</script> appear in that order, as does the subsequence of letters from <script type="math/tex">LABC\dots R</script>.</li>
<li>It is not allowed to have both <script type="math/tex">l</script> and <script type="math/tex">L</script>, nor to have both <script type="math/tex">r</script> and <script type="math/tex">R</script>.</li>
</ul>
<p>These conditions are a little messy, but it’s possible to set up a recurrence for the number <script type="math/tex">S_z^x(y)</script> of strings that don’t use the left and right side symbols, with <script type="math/tex">x</script> choices for the top (lower case) symbols, <script type="math/tex">z</script> choices for the bottom (upper case) symbols, and <script type="math/tex">y</script> labeled points in the middle.
In the recurrence below, <script type="math/tex">i</script> represents the number of symbols in the last contiguous block of equal letters, and <script type="math/tex">x'</script> or <script type="math/tex">z'</script> represents the number of letters that remain available with values earlier in the alphabetic order than the one that was used for this block. The recurrence is:</p>
<script type="math/tex; mode=display">S_z^x(y) = \sum_{i=1}^y \left(
\sum_{x'=0}^{x-1} S_z^{x'}(y-i) +
\sum_{z'=0}^{z-1} S_{z'}^{z}(y-i) \right),</script>
<p>with base case <script type="math/tex">S_z^x(0)=1</script>. Then the total number of polygonalizations can be found by splitting up the overall length <script type="math/tex">n-2</script> of the string into substrings of left, top or bottom, and right symbols, using this recurrence to count the number of ways of filling in the middle part, multiplying by two for each nonempty left or right part (because there is a choice of upper or lower case for each of these parts), and summing over all splits. <a href="/blog/assets/2020/gridcycles.py">My code to do this</a> tells me that the sequence of numbers of polygonalizations for <script type="math/tex">3\times n</script> grids, for <script type="math/tex">n=2,3,4,\dots</script>, is</p>
<script type="math/tex; mode=display">1, 8, 62, 532, 4846, 45712, 441458, 4337468, 43187630, \dots</script>
<p>(<s>not yet in OEIS but I will submit it</s> update 2020-01-14: <a href="https://oeis.org/A331235">OEIS A331235</a>).</p>
<p>The next question is: how quickly does this sequence grow? It’s singly exponential (because that’s true of all 2d non-crossing geometric graph counting problems) but what is the base of the exponential? We can make a rough estimate by ignoring faxtors that are polynomial or smaller. The first estimate I tried was wrong: it was that there are roughly <script type="math/tex">2^n</script> ways of choosing whether each letter is upper or lower case, most of which assign roughly half of the letters to each case, and roughly <script type="math/tex">(3\sqrt{3}/2)^n</script> ways of choosing an upper or lower case substring of length <script type="math/tex">n/2</script>, for a total of <script type="math/tex">13.5^n</script> choices. But this is an overestimate, because it doesn’t take into account the requirement that each letter be contiguous. It would allow strings like <script type="math/tex">aBa</script> which don’t correspond to polygonalizations, and that turns out to matter in the estimation.</p>
<p>To get a better estimate, we need to break down how we choose a string in a different way:</p>
<ul>
<li>First, choose how many of the lower case letters are actually used, and then which subset of them is used.</li>
<li>Second, do the same thing with the upper case letters.</li>
<li>Finally, repeat <script type="math/tex">n-2</script> times choosing for each letter of the string whether it repeats the previous letter, takes the next lower case letter from the chosen subset, or takes the next upper case letter from the chosen subset, making sure that the first choice is not a repeat and that the total number of next-letter choices matches the number of different letters to choose from.</li>
</ul>
<p>There are polynomially many choices for how many letters of each type to use,
so the total number of choices is within a polynomial factor of the number of choices after we fix these numbers of letters to a single value, the one that maximizes the number of remaining choices. And we can estimate the number of remaining choices using Stirling’s approximation. Estimating the number of polygonalizations in this way shows that it is within a polynomial factor of <script type="math/tex">q^n</script>, where</p>
<script type="math/tex; mode=display">% <![CDATA[
q=\max_{0 < p < 1/2}\left(
p^{-4p} (1-p)^{-2(1-p)} (1-2p)^{-(1-2p)}
\right) %]]></script>
<p>and where the number of letters we use from each case is <script type="math/tex">pn</script>. Here, some magic happens: It doesn’t look like <script type="math/tex">p</script> and <script type="math/tex">q</script> should have nice simple formulas, but they do. With <script type="math/tex">\varphi=\tfrac{1+\sqrt{5}}{2}</script> (the golden ratio), we get a maximum at <script type="math/tex">p=2-\varphi</script>, for which <script type="math/tex">q=\varphi^5</script>. So our sequence is approximately asymptotic to <script type="math/tex">\varphi^{5n}</script>.</p>
<p>Probably if you go through the same estimation process more carefully, you can recover the polynomial factor as well. I wasn’t so careful; instead I just computed how far off from <script type="math/tex">\varphi^{5n}</script> the numbers in my sequence are, fit a line to these factors on a log-log scale, and observed that its exponent was approximately 1. So, the polynomial factor is <script type="math/tex">n</script>, and numerically the sequence of numbers of polygonalizations above is a very good fit to</p>
<script type="math/tex; mode=display">\frac{\varphi^{5n}}{66n}.</script>
<p>Why the golden ratio? I don’t know.</p>
<p>(<a href="https://mathstodon.xyz/@11011110/103472952839621766">Discuss on Mastodon</a>)</p>David EppsteinA polygonalization of a point set is a simple polygon having all the points as its vertices. Another way to think about it is that it’s a non-crossing Hamiltonian cycle in a complete geometric graph. My recent work on the hardness of counting polygon triangulations was motivated in large part by the problem of counting polygonalizations. Counting polygonalizations should also be hard, but I don’t know how to prove it, and I was hoping that proving other similar problems hard might either lead to more insights or at least provide something to prove a reduction from.Year-end linkage2019-12-31T21:23:00+00:002019-12-31T21:23:00+00:00https://11011110.github.io/blog/2019/12/31/year-end-linkage<ul>
<li>
<p><a href="https://www.shapeways.com/shops/jankrhaugland">Reign in graphs</a> (<a href="https://mathstodon.xyz/@11011110/103321651787290257"><script type="math/tex">\mathbb{M}</script></a>). Interesting collection of 3d models of graphs</p>
</li>
<li>
<p><a href="https://euro-math-soc.eu/news/19/12/17/zbmath-become-open-access">Zentralblatt going open access</a> (<a href="https://mathstodon.xyz/@11011110/103324328632714865"><script type="math/tex">\mathbb{M}</script></a>). I mostly use a mix of Google Scholar (for searching), MathSciNet (for more targeted searches, reviews, and high-quality bibtex), and DBLP (for bibtex of CS papers not in MathSciNet) but maybe this will convince me to add ZB into the mix.</p>
</li>
<li>
<p><a href="https://mathstodon.xyz/@christianp/103328394093228909">Christian Lawson-Perfect can’t explain why the Wikipedia article for “Author” was illustrated by a Ukrainian copyright certificate for a supposed proof of Fermat’s last theorem</a>. It seems to have been added in good faith there, but maybe as self-promotion to the “Copyright” article. Whatever, it’s now on “<a href="https://en.wikipedia.org/wiki/Pseudomathematics">Pseudomathematics</a>” where it belongs.</p>
</li>
<li>
<p><a href="https://lemire.me/blog/2019/12/19/xor-filters-faster-and-smaller-than-bloom-filters/">Xor filters</a> (<a href="https://mathstodon.xyz/@11011110/103338548071725282"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://arxiv.org/abs/1912.08258">preprint</a>, <a href="https://news.ycombinator.com/item?id=21840821">via</a>): A new alternative to Bloom filters and cuckoo filters for approximate set membership with a controlled rate of false positives and no false negatives. It’s fast and (for realistic error rates) uses fewer bits than Bloom or cuckoo. Cuckoo still wins if you need your sets dynamic, though: you can insert or delete elements easily, while Bloom can only insert and xor can’t handle any change.</p>
</li>
<li>
<p><a href="https://www.jamisbuck.org/mazes/">Visualizations of several maze-generation algorithms</a> (<a href="https://mathstodon.xyz/@11011110/103349055666314448"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://news.ycombinator.com/item?id=21828903">via</a>). They all appear to generate random tree-like mazes in a square grid, but with different probability distributions on the trees. E.g. Kruskal and Prim generate minimum spanning trees for random weights, different from the uniformly random trees of Aldous–Broder and Wilson, and many others appear quite different from both.
The alternative algorithm at the main link of the via link is probably not the best choice.</p>
</li>
<li>
<p><a href="https://twitter.com/johncarlosbaez/status/1208768265830354945">It’s easy for mathematical physics crackpottery to get published in a prestigious-sounding pay-to-publish journal from an actually-prestigious publisher, <em>Nature Scientific Reports</em></a> (<a href="https://mathstodon.xyz/@11011110/103355963066100289"><script type="math/tex">\mathbb{M}</script></a>).
In the ensuing discussion, Flavio Nogueira reports that <a href="https://twitter.com/F_S_Nogueira/status/1208787145911152640">editors rejected papers only to see them published anyway</a>. Should we start treating <em>Nature</em> as a predatory publisher?</p>
</li>
<li>
<p><a href="https://en.wikipedia.org/wiki/Convex_hull_of_a_simple_polygon">Convex hull of a simple polygon</a> (<a href="https://mathstodon.xyz/@11011110/103360225573578914"><script type="math/tex">\mathbb{M}</script></a>). I’ve been working on cleaning up Wikipedia’s main convex hull article (not yet finished) and added this one to fill in some details. The problem has an interesting history: it’s been known to be solvable in linear time since 1979, and many different algorithms for the same problem have been published before and since, but most of them are wrong.</p>
</li>
<li>
<p><a href="https://mathoverflow.net/q/349228/440">Open convex hull of a closed set</a> (<a href="https://mathstodon.xyz/@11011110/103365014241600450"><script type="math/tex">\mathbb{M}</script></a>). I can prove that (in Euclidean spaces) such sets are always Cartesian products of a line with a lower-dimensional set. But is there a reference in the literature for this, so I can add it to the Wikipedia article? If you know, please leave an answer on the MathOverflow link.</p>
</li>
<li>
<p><a href="https://youtu.be/fhBPhie1Tm0">David Bachman, Saul Schleimer and Henry Segerman finally explain what their cohomology fractals are</a> (<a href="https://mathstodon.xyz/@henryseg/103341309414601843"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://www.theguardian.com/world/2019/dec/26/turkish-court-wikipedia-block-lifted">Turkish supreme court rules that the country’s two-year block on Wikipedia is unconstitutional</a> (<a href="https://mathstodon.xyz/@11011110/103378814260578782"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://news.ycombinator.com/item?id=21888759">also</a>, <a href="https://www.washingtonpost.com/world/europe/court-rules-turkey-violated-freedoms-by-banning-wikipedia/2019/12/26/880f263c-27de-11ea-9cc9-e19cfbc87e51_story.html">also</a>, <a href="https://www.nytimes.com/2019/12/26/world/europe/wikipedia-ban-turkey.html">also</a>).</p>
</li>
<li>
<p><a href="https://www.quantamagazine.org/mathematician-makes-euler-equations-blow-up-20191218/">Famous fluid equations spring a leak</a> (<a href="https://mathstodon.xyz/@11011110/103384319532164607"><script type="math/tex">\mathbb{M}</script></a>). We still don’t know whether the differential equations governing fluid flow lead to consistent and unique solutions for all time. But if you simplify the equations to throw away viscosity and compressability, and you allow the initial state of the fluid to have discontinuous boundaries between volumes of fluid with very different motion, you can cause it to reach a point at which it spins infinitely quickly.</p>
</li>
<li>
<p><a href="https://en.wikipedia.org/wiki/Relative_convex_hull">Relative convex hull</a> (<a href="https://mathstodon.xyz/@11011110/103390220528024772"><script type="math/tex">\mathbb{M}</script></a>). Another new article related to my revision of the Wikipedia convex hull article. These are the shapes you get by stretching a rubber band around one set while fencing it inside a polygon. You don’t always get a simple polygon as a result, but it’s “weakly simple”.</p>
</li>
<li>
<p><a href="https://www.nytimes.com/2019/12/28/climate/trump-administration-war-on-science.html">Science under attack: How Trump is sidelining researchers and their work</a> (<a href="https://mathstodon.xyz/@11011110/103393997740330853"><script type="math/tex">\mathbb{M}</script></a>). The fact that this link was <a href="https://news.ycombinator.com/item?id=21905957">flagged and censored from ycombinator hacker news</a> is also interesting, in its own way. Fortunately my RSS aggregator copied the link before it was taken down.</p>
</li>
<li>
<p><a href="https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2019-12-27/Special_report">Are reputation management operatives scrubbing Wikipedia articles</a> (<a href="https://mathstodon.xyz/@11011110/103399857216270322"><script type="math/tex">\mathbb{M}</script></a>). Answer: duh. The linked report has details of one such case, involving Theranos.</p>
</li>
<li>
<p><a href="https://johncarlosbaez.wordpress.com/2019/12/30/compositionality-first-issue/">New open-access journal <em>Compositionality</em></a> (<a href="https://mathstodon.xyz/@11011110/103406379623694356"><script type="math/tex">\mathbb{M}</script></a>), on the mathematics of “how complex things can be assembled out of simpler parts”. It’s not a good fit for my own research, and the word “fuzzy” in the title of one of the initial papers is kind of a red flag for me, but I think it’s a good thing that the move towards diamond-model open access is continuing.</p>
</li>
</ul>David EppsteinReign in graphs (). Interesting collection of 3d models of graphsAsymptotics of Recamán’s sequence2019-12-20T00:02:00+00:002019-12-20T00:02:00+00:00https://11011110.github.io/blog/2019/12/20/asymptotics-recamans-sequence<p><a href="https://en.wikipedia.org/wiki/Recam%C3%A1n%27s_sequence">Recamán’s sequence</a> is a sequence of natural numbers in which the zeroth number is zero and the <script type="math/tex">n</script>th number adds or subtracts <script type="math/tex">n</script> from the previous number, subtracting if that would lead to a new value and adding otherwise. It was popularized in a 2018 Numberphile video that showed both an interesting visualization of it using nested circles and a spooky piano composition obtained by using its values as notes.</p>
<iframe src="https://www.youtube.com/embed/FGC5TdIiT9U" allowfullscreen="" style="width:560px;height:315px;display:block;margin:auto;border:0"></iframe>
<p>In <a href="https://oeis.org/A005132">the OEIS entry for this sequence</a> Benjamin Chaffin claims to have computed and plotted its first <script type="math/tex">10^{230}</script> numbers. Can it really be done this fast?
And until recently, the sequence’s Wikipedia article claimed that when computing this sequence, each number takes <script type="math/tex">O(n^2)</script> time to compute, sourced to the analysis in <a href="https://blogs.mathworks.com/cleve/2018/07/09/the-oeis-and-the-recaman-sequence/">a blog post with a MATLAB implementation</a>. Can it really be this slow?</p>
<p>In analyzing the complexity of computing integer sequences, it’s often important to consider numerical precision. The standard computational model used for algorithm analysis, the unit-cost RAM, allows constant-time arithmetic on <script type="math/tex">O(\log n)</script>-bit integers, enough to allow the model to index its memory. Models of computing with larger word sizes are less standard. And some sequences need linearly many bits just to represent a single sequence value, too many to handle in constant time. But that’s not an issue for Recamán’s sequence. Even a sequence that always added <script type="math/tex">n</script> at each step, rather than sometimes, subtracting, would grow at most quadratically, allowing the first <script type="math/tex">n</script> numbers to be computed using only <script type="math/tex">O(\log n)</script>-bit arithmetic.</p>
<p>Using this model, we can analyze a naive algorithm for the sequence that directly implements its recurrence while maintaining a set data structure to keep track of what has been seen already.</p>
<figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="k">def</span> <span class="nf">recaman</span><span class="p">():</span>
<span class="n">visited</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>
<span class="n">a</span> <span class="o">=</span> <span class="n">n</span> <span class="o">=</span> <span class="mi">0</span>
<span class="k">while</span> <span class="bp">True</span><span class="p">:</span>
<span class="k">yield</span> <span class="n">a</span>
<span class="n">n</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="k">if</span> <span class="n">a</span> <span class="o">></span> <span class="n">n</span> <span class="ow">and</span> <span class="n">a</span> <span class="o">-</span> <span class="n">n</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">visited</span><span class="p">:</span>
<span class="n">a</span> <span class="o">-=</span> <span class="n">n</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">a</span> <span class="o">+=</span> <span class="n">n</span>
<span class="n">visited</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">a</span><span class="p">)</span></code></pre></figure>
<p>If sets are represented using hash tables with provable constant expected time per operation (say, <a href="https://en.wikipedia.org/wiki/Linear_probing#Choice_of_hash_function">linear probing with tabulation hashing</a>), then this takes constant expected time per number, or <script type="math/tex">O(n)</script> for the first <script type="math/tex">n</script> numbers. So much for being quadratic. Alternatively, if we knew that the sequence grew only linearly, we could avoid hashing and expected time analysis by using a bitvector to get deterministic constant time per number.</p>
<p>So the next question to ask is: does the sequence grow only linearly, or more quickly? Before running an experiment to test this, my intuition was that if the choice to add or subtract were uniformly random, then the sequence would grow like a random walk, typically <script type="math/tex">\Theta(\sqrt n)</script> steps away from the origin, which with step size <script type="math/tex">\Theta(n)</script> would give growth <script type="math/tex">\Theta(n^{3/2})</script>. On the other hand, to achieve equal probability of going up or down you need roughly half of the integers to be visited, and for that to happen the sequence should grow only as <script type="math/tex">\Theta(n)</script>. For any faster growth rate, the density of visited integers would be less than half and the sequence would be pulled downward. So I expected that the true growth rate should be at a level where the upward pressure of a uniform random walk and the downward pressure of less-than-half occupancy balance each other, but I didn’t have a strong a priori feeling whether this meant linear growth (with constant but somewhat less than half occupancy) or slightly superlinear growth.</p>
<p>This is something we can check experimentally, so I used the naive algorithm to generate a quarter-billion sequence elements, sampled them down to 629 pairs of <script type="math/tex">(n,a_n)</script> by keeping only elements at cubic positions, and fit a line to their log-log plot using Siegel’s repeated median estimator in R. The result has weird stripy patterns that don’t look much like a line, but its exponent looks a lot like a 1 to me.</p>
<p style="text-align:center"><img src="/blog/assets/2019/recaman/density.png" alt="Log-log plot of samples from Recamán's sequence" /></p>
<p>We can get a cleaner curve (and a more informative picture of how big a bitvector we might need) by plotting only the points where the sequence reaches a new high point. There were too many data points to fit easily, so I thinned them out by including only high points that were half a percent higher than the previous one, giving me 254 data points. To look more carefully at near-linear growth rates, I plotted <script type="math/tex">a_n/n</script> against <script type="math/tex">\log n</script> this time. Again, the results had weird stripy patterns that I didn’t expect (I thought filtering for the high points would have eliminated that), but the plot seems to clearly show that the growth rate of the sequence is nonlinear. Although the fit line shows growth of the form <script type="math/tex">\Theta(n\log n)</script>, I don’t think the data is clear enough to conclude that this is the right growth rate.</p>
<p style="text-align:center"><img src="/blog/assets/2019/recaman/highpoint.png" alt="Plot of high points of Recamán's sequence, divided by n" /></p>
<p>So, sadly, the bitvector solution doesn’t appear to give us a deterministic solution with constant time per element. It takes a nonlinear amount of time to initialize a nonlinear number of bits. Maybe instead some deterministic choice of hash function allows the hashing solution to work without randomization, but proving that seems difficult. On the other hand there’s a lot of other structure in the sequence. Maybe we can take advantage of it and get even faster, computing an implicit representation of the sequence (rather than an explicit list of each of its elements) in time sublinear in the number of elements generated? Surely, if the claim of having generated <script type="math/tex">10^{230}</script> elements is to be believed, this must be possible.</p>
<p>A hint comes from the plots in the MATLAB post showing that Recamán’s sequence contains long alternations between addition and subtraction that fill in two contiguous blocks of integers. A comment by Jan Van lent from <a href="https://mathlesstraveled.com/2016/06/12/the-recaman-sequence/">a 2016 blog post on <em>The Math Less Traveled</em></a> suggests that there should be few (maybe <script type="math/tex">\Theta(\sqrt{n})</script>) of these blocks, and that we can save space using a data structure that stores blocks rather than individual numbers. This would have advantages even in the naive algorithm: when I tried bumping my data sets to a full billion elements they bogged down, not because I didn’t have enough time to run four times slower, but because I ran out of memory for the hash table.</p>
<p>We can use a data structure that allows for integer predecessor queries to store only the starting endpoints of each block of occupied integers, associating with each start the end of the same block. Then, we could test whether a query integer <script type="math/tex">q</script> is in one of the blocks by finding the predecessor of <script type="math/tex">q</script> (the first block start at or before <script type="math/tex">q</script>) and checking whether its block extends as far as <script type="math/tex">q</script>. A similar but more complicated calculation could also be used, for each sequence element, to find the length of the alternation starting at that element (stopping the alternation when the negative steps in the alternation run into another block), and then to update the collection of blocks to cover all of the elements encountered during this alternation. The obvious choice of predecessor data structure would be a balanced binary search tree, but (because we’re dealing with integers of polynomial magnitude) it’s better in theory to use a <a href="https://en.wikipedia.org/wiki/Van_Emde_Boas_tree">Van Emde Boas tree</a>, which can handle each data structure operation in time <script type="math/tex">O(\log\log n)</script>. If we generate Recamán’s sequence one alternation at a time in this way, and it has <script type="math/tex">A(n)</script> alternations and <script type="math/tex">B(n)</script> blocks in its first <script type="math/tex">n</script> elements, then the improved generation algorithm will take time <script type="math/tex">O(A(n)\log\log n)</script> and space <script type="math/tex">O(B(n))</script>. I have a VEB-tree implementation, but it lacks predecessor queries, and four times more elements are only a small step on my log plots, so I haven’t tested this. But we can still use the naive algorithm to compute <script type="math/tex">A(n)</script> and <script type="math/tex">B(n)</script> and study how they grow. Here, first, is <script type="math/tex">A(n)</script>.</p>
<p style="text-align:center"><img src="/blog/assets/2019/recaman/alternations.png" alt="Plot of number of alternating subsequences of Recamán's sequence" /></p>
<p>The number of alternations looks like a reasonable fit for <script type="math/tex">\sqrt{n}</script>.
The number of blocks can be at most twice the number of alternations, but it could well be smaller as blocks coalesce after they are formed. The plot of numbers of blocks looks almost the same as the one above, so instead I plotted a ratio. I don’t think the fit line in the plot is particularly convincing. Nevertheless to me this looks like <script type="math/tex">A(n)</script> and <script type="math/tex">B(n)</script> have the same exponent but differ by a lower-order factor like a log or log-log.</p>
<p style="text-align:center"><img src="/blog/assets/2019/recaman/blocks.png" alt="Plot of ratio of alternating subsequences to contiguous occupied blocks for Recamán's sequence" /></p>
<p>So what have we learned?</p>
<ul>
<li>
<p>Even the obvious hashtable-based methods can achieve constant expected time per element. But their limiting factor is memory, not time.</p>
</li>
<li>
<p>It’s tempting to use bitvectors instead, and that might not be a bad choice in practice, but in theory that appears to take more than constant time per element. Deterministic hashing might take constant time per element but this is unproven.</p>
</li>
<li>
<p>Generating the sequence implicitly in terms of its alternations, and using a data structure that represents the generated elements in terms of their blocks, looks like it can achieve something like <script type="math/tex">O(\sqrt n)</script> in both time and space,
but again this is unproven.</p>
</li>
<li>
<p>This is still not anywhere near fast enough to get <script type="math/tex">10^{230}</script> elements, nor even <script type="math/tex">10^{230}</script> as the largest generated value. So either something is wrong with that claim (most likely a typo in the number of elements), or there are significant algorithmic improvements possible beyond just using alternations and blocks.</p>
</li>
</ul>
<p>For the source code for these plots, see <a href="/blog/assets/2019/recaman/density.py">density generation</a>/<a href="/blog/assets/2019/recaman/density.R">analysis</a>, <a href="/blog/assets/2019/recaman/highpoint.py">high point generation</a>/<a href="/blog/assets/2019/recaman/highpoint.R">analysis</a>, <a href="/blog/assets/2019/recaman/alternations.py">alternation generation</a>/<a href="/blog/assets/2019/recaman/alternations.R">analysis</a>, and <a href="/blog/assets/2019/recaman/blocks.py">block generation</a>/<a href="/blog/assets/2019/recaman/blocks.R">analysis</a>.</p>
<p>(<a href="https://mathstodon.xyz/@11011110/103339144033179034">Discuss on Mastodon</a>)</p>David EppsteinRecamán’s sequence is a sequence of natural numbers in which the zeroth number is zero and the th number adds or subtracts from the previous number, subtracting if that would lead to a new value and adding otherwise. It was popularized in a 2018 Numberphile video that showed both an interesting visualization of it using nested circles and a spooky piano composition obtained by using its values as notes.Linkage2019-12-15T15:41:00+00:002019-12-15T15:41:00+00:00https://11011110.github.io/blog/2019/12/15/linkage<ul>
<li>
<p><a href="https://www.theguardian.com/education/2019/dec/01/lib-dems-brexit-brain-drain-eu-academics">Figures show 11,000 academics have left UK universities in the three years since the Brexit referendum</a>.</p>
</li>
<li>
<p><a href="https://www.latimes.com/california/story/2019-12-02/american-computer-expert-arrested-north-korea-talk-cryptocurrency">US arrests an American computer scientist for giving a talk at a conference</a> (<a href="https://mathstodon.xyz/@11011110/103242730915859586"><script type="math/tex">\mathbb{M}</script></a>). It was in North Korea, on cryptocurrency, but from the story doesn’t appear to have covered anything that isn’t widely known elsewhere.</p>
</li>
<li>
<p>Mathematicians get riled up about mandatory diversity statements and recommendations that above-average contributions to diversity be used as a hard filter for all faculty job candidates (<a href="https://mathstodon.xyz/@11011110/103248639071738786"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://www.insidehighered.com/news/2019/11/19/mathematician-comes-out-against-mandatory-diversity-statements-while-others-say-they">via</a>, <a href="https://mathstodon.xyz/@pkra/103237286846736065">via2</a>, <a href="https://cybre.space/@zardoz/103310868212435260">via3</a>): <a href="https://www.ams.org/journals/notices/201911/rnoti-p1778.pdf">Abigail Thompson sees mandated loyalty to political positions (such as prioritizing diversity) as anti-academic freedom</a>, kicking off the debate. <a href="https://ilaba.wordpress.com/2019/12/01/diversity-statements/">Izabella Laba disagrees but prefers institutional action to lip-service statements of good intentions</a> and argues that unrealistic expectations on faculty (like that they all be simultaneously outstanding in teaching, research, and now also diversity) can backfire by favoring the kind of male faculty member who takes advantage of an unpaid wife as his assistant. <a href="https://www.ams.org/journals/notices/202001/rnoti-o1.pdf">Many others weigh in</a> in the letters to the editor of the <em>Notices</em>.</p>
</li>
<li>
<p><a href="https://www.chronicle.com/article/5-Ways-to-Welcome-Women-to/247541">Five ways to welcome women to computer science</a> (<a href="https://mathstodon.xyz/@11011110/103256355399857427"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://theaggie.org/2019/12/05/yuval-peres-math-professor-with-series-of-sexual-misconduct-allegations-levied-against-him-gives-lecture-at-uc-davis/">Davis student newspaper provides thorough roundup of sexual harassment charges against Yuval Peres</a> (<a href="https://mathstodon.xyz/@11011110/103259258824223410"><script type="math/tex">\mathbb{M}</script></a>). They missed the <a href="https://en.wikipedia.org/wiki/Wikipedia:Sockpuppet_investigations/Pedantisch/Archive">side drama of sockpuppets and meatpuppets cleaning this from his Wikipedia article</a>, though, or maybe omitted it for lack of evidence connecting it to Peres himself. This is sad. Why would someone with so much to give to the field be so self-destructive and so destructive of the lives and careers of others around him?</p>
</li>
<li>
<p>More stupid commercial journal publisher tricks (<a href="https://mathstodon.xyz/@11011110/103264128297632805"><script type="math/tex">\mathbb{M}</script></a>): Wiley won’t honor my institutional subscription unless I enable third-party cookies in my browser. So I can</p>
<ol>
<li>
<p>decrease my browser security on all sites,</p>
</li>
<li>
<p>not read papers by László Babai on J. Graph Theory,</p>
</li>
<li>
<p>ask my librarian for a copy, making much more work and delay for all but maybe letting the publisher know how much negative value-added they’re providing, or</p>
</li>
<li>
<p>become a pirate.</p>
</li>
</ol>
<p><a href="https://en.wikipedia.org/wiki/Sci-Hub">Sci-Hub</a> to the rescue! Yo ho!</p>
<p>Also while I’m picking on Wiley, how did <a href="https://doi.org/10.1002/cpe.5484">He et al., “A polynomial‐time algorithm for simple undirected graph isomorphism”</a> ever pass peer review for their journal <em>Concurrency and Computation, Practice and Experience</em>, or even a basic sanity check that it has a coherent topic that fits the mission of the journal?</p>
</li>
<li>
<p><a href="https://blogs.scientificamerican.com/roots-of-unity/the-surprising-link-between-recreational-math-and-undecidability/">The surprising link between recreational math and undecidability</a> (<a href="https://mathstodon.xyz/@11011110/103267941967518229"><script type="math/tex">\mathbb{M}</script></a>). Evelyn Lamb describes how a seemingly isolated fact about Fibonacci numbers (<script type="math/tex">F_n^2\vert F_m\Rightarrow F_n\vert m</script>) led to Matiyasevich’s solution to Hilbert’s 10th problem, that there is no general algorithm for solving Diophantine equations.</p>
</li>
<li>
<p><a href="https://www.maureeneppstein.com/mve_journal/?p=2028">My mother has a new book of poetry coming out</a> (<a href="https://mathstodon.xyz/@11011110/103273857130169711"><script type="math/tex">\mathbb{M}</script></a>). I think this is her fifth, after Earthward (Finishing Line Press, 2014), Rogue Wave at Glass Beach (March Street Press, 2009), Quickening (March Street Press, 2007), and A Place Called Home (Monday Press, 1995).</p>
</li>
<li>
<p><a href="https://commons.wikimedia.org/wiki/File:Osculating_circles_of_the_Archimedean_spiral.svg">This image by Adam Majewski</a> (<a href="https://mathstodon.xyz/@11011110/103279309793264877"><script type="math/tex">\mathbb{M}</script></a>) shows the osculating circles of an Archimedean spiral. The spiral itself is not shown, but you can see it anyway, where the circles become dense.</p>
<p style="text-align:center"><img src="/blog/assets/2019/archimedean-osculation.svg" alt="Osculating circles of the Archimedean spiral" /></p>
<p>It is not unusual that the circles nest. By the <a href="https://en.wikipedia.org/wiki/Tait%E2%80%93Kneser_theorem">Tait–Kneser theorem</a> this happens whenever the curvature along a curve is monotonic. And on most smooth curves, the curvature is monotonic except at a small number of points called vertices.</p>
</li>
<li>
<p><a href="http://chalkdustmagazine.com/front-page-banner/constructing-the-cover-of-issue-10/">Chalkdust magazine provides a compass-and-straightedge construction for the girih pattern on the cover of a recent issue</a> (<a href="https://mathstodon.xyz/@11011110/103284659404495472"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://twitter.com/textfiles/status/1204428311553642496">How archive.org preserves the history of the web, and why you should care</a> (<a href="https://mathstodon.xyz/@11011110/103291205125122328"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://news.ycombinator.com/item?id=21764592">via</a>). Meanwhile, <a href="https://modsandmembersblog.wordpress.com/2019/12/08/verizon-yahoo-bad-form/">Verizon sabotages efforts to archive Yahoo Groups content, in the face of their plans to shut much of it down</a> (<a href="https://news.ycombinator.com/item?id=21737696">via</a>, <a href="https://boingboing.net/2019/12/08/oath-makes-you-swear-2.html">via2</a>).</p>
</li>
<li>
<p><a href="https://randomascii.wordpress.com/2019/12/08/on2-again-now-in-wmi/"><script type="math/tex">O(n^2)</script> in Windows Management Instrumentation</a> (<a href="https://mathstodon.xyz/@11011110/103299014968956821"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://news.ycombinator.com/item?id=21743424">via</a>). This is why understanding algorithm analysis is important: even when the constant factors are very small (here, a nine-instruction loop), quadratic time can mean significant delays. The post also introduces “Dawson’s first law of computing: <script type="math/tex">O(n^2)</script> is the sweet spot of badly scaling algorithms: fast enough to make it into production, but slow enough to make things fall down once it gets there.”</p>
</li>
<li>
<p>Two recently-posted geometry puzzles (neither of which I have seriously attempted to answer (<a href="https://mathstodon.xyz/@11011110/103304781327067493"><script type="math/tex">\mathbb{M}</script></a>):</p>
<ol>
<li>
<p><a href="https://discrete-notes.github.io/polygon%20problem">If you expand a convex polygon along one coordinate axis while leaving the other coordinate unchanged, can the original polygon always fit into the expanded copy (perhaps with some rotation or translation)?</a></p>
</li>
<li>
<p><a href="https://fivethirtyeight.com/features/can-you-solve-a-particularly-prismatic-puzzle/">How many different integer rectangular cuboids have (ignoring units) volume = surface area?</a></p>
</li>
</ol>
</li>
<li>
<p><a href="http://math.ucr.edu/home/baez/permutations/">John Baez collects more than you wanted to know about the statistics of random permutations</a> (<a href="https://mathstodon.xyz/@11011110/103310641851251562"><script type="math/tex">\mathbb{M}</script></a>). The really pretty ones are Part 3 puzzle 8: What is the probability that a chosen element of an <script type="math/tex">n</script>-element permutation lies in a cycle of length <script type="math/tex">k</script>? And part 6 puzzle 7 (don’t ask me how the numbering works): What is the expected number of <script type="math/tex">k</script>-cycles in a random <script type="math/tex">n</script>-element permutation?</p>
</li>
<li>
<p><a href="https://wild.maths.org/folding-fractions">Folding fractions</a> (<a href="https://mathstodon.xyz/@11011110/103314218243317735"><script type="math/tex">\mathbb{M}</script></a>). There’s a standard compass-and-straightedge construction for dividing a line segment evenly into a given number of smaller segments, and origami folding constructions are (depending on the model of what is allowed) at least as powerful, so it shouldn’t be surprising that you can fold arbitrary even subdivisions of the side of an origami square. But this construction of <script type="math/tex">\tfrac{1}{n+1}</script> from <script type="math/tex">\tfrac{1}{n}</script> by Kazuo Haga is particularly elegant.</p>
</li>
</ul>David EppsteinFigures show 11,000 academics have left UK universities in the three years since the Brexit referendum.Linkage2019-11-30T10:10:00+00:002019-11-30T10:10:00+00:00https://11011110.github.io/blog/2019/11/30/linkage<ul>
<li>
<p><a href="https://en.wikipedia.org/wiki/Hoffman%27s_packing_puzzle">Hoffman’s packing puzzle, and its connection to the inequality of arithmetic and geometric means</a> (<a href="https://mathstodon.xyz/@11011110/103151390413241726"><script type="math/tex">\mathbb{M}</script></a>). The one I have is not quite so colorful as the illustration for this new Wikipedia article. My father-in-law made it for me some 30 years ago; you can see it in a corner of the photo at <a href="/blog/2018/05/17/book-arrival.html">this post</a>. I don’t unpack it very often, though, because I lost track of the handwritten table of solutions that I made when I first got it and it’s quite difficult to re-pack.</p>
</li>
<li>
<p><a href="https://www.wired.com/story/iran-internet-shutoff/">How the Iranian government shut off the internet</a> (<a href="https://mathstodon.xyz/@11011110/103155401533962129"><script type="math/tex">\mathbb{M}</script></a>). According to this story, they have effected “a near-total internet and mobile data blackout” in an attempt to quell gasoline-price protests.</p>
</li>
<li>
<p><a href="https://agtb.wordpress.com/2019/11/19/a-market-for-tcs-papers/">A Market for TCS Papers??</a> (<a href="https://mathstodon.xyz/@11011110/103162041586643628"><script type="math/tex">\mathbb{M}</script></a>, with Vijay Vazirani, on the “Turing’s Invisible Hand” blog.) The current situation with theoretical computer science conference reviewing is a mess of long publication delays and reviewer overload caused by repeated submissions and rejections. Vijay and I argue that it should instead be treated as a matching market with pooled submissions and stable matching, getting better results for less time and effort.</p>
</li>
<li>
<p><a href="https://www.siam.org/conferences/cm/program/accepted-papers/soda20-accepted-papers">SODA 2020 accepted papers</a> (<a href="https://mathstodon.xyz/@11011110/103167433760168313"><script type="math/tex">\mathbb{M}</script></a>). It only lists titles and authors, but if you notice a title you find intriguing you can find find more detail elsewhere. However, this depends on avoiding obscure titles; if, say, you found a breakthrough on clustered planarity showing that it’s in polynomial time, but you titled your paper “Atomic Embeddability, Clustered Planarity, and Thickenability”, others might not notice.</p>
</li>
<li>
<p>Did you know that <a href="https://en.wikipedia.org/wiki/William_Chapple_(surveyor)">William Chapple</a> (<a href="https://mathstodon.xyz/@11011110/103174753258552519"><script type="math/tex">\mathbb{M}</script></a>) discovered Euler’s formula for circumcenter-incenter distance before Euler, Poncelet’s porism on families of triangles inscribed and circumscribed by the same two circles before Poncelet, and was the first to publish a proof that Euclid missed, on the existence of orthocenters of triangles? Did you know that a street in Witheridge is named for him? Have you even heard of William Chapple before? Or Witheridge? Now you have.</p>
</li>
<li>
<p><a href="https://boingboing.net/2019/11/21/portal-icosahedron-sculpture-l.html">Portal Icosahedron by Anthony James</a> (<a href="https://mathstodon.xyz/@11011110/103177399066941274"><script type="math/tex">\mathbb{M}</script></a>). An icosahedral frame, infinity mirrors, and LED lighting create a view into an infinite icosahedral grid, creating an effect that, in the jargon of the art world, “is both esoteric and industrial, orphic and distinctly concrete”. Whatever that’s supposed to mean.</p>
</li>
<li>
<p><a href="https://www.theregister.co.uk/2019/11/20/org_registry_sale_shambles/">Get ready to change all of your bookmarks for non-profit organizations</a> (<a href="https://mathstodon.xyz/@11011110/103186257585749674"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://www.metafilter.com/184269/Seems-bad">via</a>) as the top-level .org domain name registry is sold to profiteers, drops its own non-profit status, and eliminates price caps on domain name renewals.</p>
</li>
<li>
<p><a href="ttp://thelaborastory.com/stories/professor-ian-wanless-eliyahu-rips/">Ian Wanless on mathematician Eliyahu Rips and his Ig Nobel Prize for Literature</a> (<a href="https://mathstodon.xyz/@11011110/103189764743270099"><script type="math/tex">\mathbb{M}</script></a>). An entertaining general-audience talk; audio only.</p>
</li>
<li>
<p><a href="https://math.indiana.edu/research/gallery/tree.html">Charles Darwin’s first drawing of an evolutionary tree</a> (<a href="https://mathstodon.xyz/@11011110/103196622232243519"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p><a href="https://boingboing.net/2019/11/24/bechdelgrams-are-beautiful.html">Bechdelgrams illustrate of whether a movie passes the Bechdel test</a> (<a href="https://mathstodon.xyz/@11011110/103208740086306490"><script type="math/tex">\mathbb{M}</script></a>). A nice use of color to highlight the information you’re looking for in a social network: Here, the network consists of interactions between characters in a film, and the women and conversations not about men are given distinctive colors to show the test criteria: does the film have at least two named female characters, who speak to each other, about something other than men?</p>
</li>
<li>
<p><a href="https://boingboing.net/2019/11/27/paper-sculptures-of-microorgan.html">Rogan Brown creates intricate paper sculptures inspired by microorganisms</a> (<a href="https://mathstodon.xyz/@11011110/103211347688747567"><script type="math/tex">\mathbb{M}</script></a>).</p>
</li>
<li>
<p>Some recent open-access conference proceedings (<a href="https://mathstodon.xyz/@11011110/103222522284012005"><script type="math/tex">\mathbb{M}</script></a>): <a href="http://drops.dagstuhl.de/opus/portals/lipics/index.php?semnr=16123">27th European Symp. on Algorithms (ESA)</a>; <a href="http://drops.dagstuhl.de/opus/portals/lipics/index.php?semnr=16131">30th Int. Symp. on Algorithms and Computation (ISAAC)</a>; <a href="http://www.jcdcgg.u-tokai.ac.jp/JCDCG3_2019_abstracts_v1.pdf">22nd Japan Conf. on Discrete and Computational Geometry, Graphs, and Games (JCDCGGG)</a>. JCDCGGG is not very selective (think CCCG but more so), but I have <a href="https://erikdemaine.org/papers/MinimalUnunfoldable_JCDCGGG2019/">a paper there with several co-authors on ununfoldable polyhedra with few vertices</a>.</p>
</li>
<li>
<p><a href="https://slate.com/technology/2019/11/nefertiti-bust-neues-museum-3d-printing.html">The Nefertiti bust meets the 21st century</a> (<a href="https://mathstodon.xyz/@11011110/103228129647767519"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://news.ycombinator.com/item?id=21670786">via</a>). Interesting essay on claims of intellectual property on ancient artifacts (in this case a high-resolution 3d scan of a bust of Nefertiti), clearly invalid under both US law and still-being-implemented EU law and “dangerously close to committing copy fraud”.</p>
</li>
</ul>David EppsteinHoffman’s packing puzzle, and its connection to the inequality of arithmetic and geometric means (). The one I have is not quite so colorful as the illustration for this new Wikipedia article. My father-in-law made it for me some 30 years ago; you can see it in a corner of the photo at this post. I don’t unpack it very often, though, because I lost track of the handwritten table of solutions that I made when I first got it and it’s quite difficult to re-pack.Recoloring infinite paths2019-11-27T16:11:00+00:002019-11-27T16:11:00+00:00https://11011110.github.io/blog/2019/11/27/recoloring-infinite-paths<p>Suppose you have a uniformly random 3-coloring of a doubly-infinite path graph. This can be generated by choosing any one vertex, choosing any one of the three colors for it, and then propagating the coloring outwards from it, choosing one of the two available colors for each successive vertex. It’s convenient to imagine the three colors as being represented by the three numbers 0, 1, and 2 mod 3. Now perform the following process, repeatedly: change the color of every cell whose two neighbors both have the color that is one plus its color (mod 3). In other words, the middle vertex of a triple of vertices that is colored 1–0–1 changes to color 2, the middle vertex of 2–1–2 changes to 0, and the middle vertex of 0–2–0 changes to 1. What does this do to the coloring?</p>
<p>You might think that it stays uniformly random, but it doesn’t. What happens is that you get increasingly large 2-colored regions, whose typical size is proportional to the square root of the number of recoloring steps, separated by triples of vertices that use all three colors. Within each 2-colored region, each recoloring step changes one of the two colors to the third color. The 3-colored triples form the boundaries between these regions and move leftwards or rightwards (depending on the ordering of their three colors). When two boundaries moving in opposite directions collide, they annihilate each other, leaving a larger 2-colored region.</p>
<p>I think the easiest way to see this is to use height functions for colorings. As described in <a href="/blog/2019/11/25/reconfiguring-3-colorings.html">my previous post</a>, a height function is a mapping from the vertices to integers (the heights of the vertices), so that taking the height of each vertex mod 3 gives its color, and such that neighboring vertices have heights that differ by <script type="math/tex">\pm 1</script>. It’s easy to construct these for colorings of the infinite path, again by starting from an arbitrary choice of height for a single arbitrarily-chosen vertex and propagating outwards. More strongly, for infinite bipartite graphs, the existence of height functions is equivalent to the non-existence of certain special graph homomorphisms to a six-cycle, as described for the finite case in my previous post. However in the infinite case the existence of height functions does not ensure the connectivity of the space of 3-colorings; for instance there is no way to change the infinite periodic 3-coloring …0–1–2–0–1–2… into anything else.</p>
<p>In terms of height functions, what’s happening in each recoloring step is that the height increases by two at each of its local minima. You can think of the height function as giving the height of a pile of particles over each vertex; then each recoloring step adds a particle wherever it can sit in place without rolling downhill.</p>
<p style="text-align:center"><img src="/blog/assets/2019/rule-184-deposition.svg" alt="Particle deposition view of Rule 184" /></p>
<p>The image above is one I drew several years ago for the Wikipedia article on <a href="https://en.wikipedia.org/wiki/Rule_184">cellular automaton rule 184</a>. This cellular automaton has two states per cell (which we might as well think of as 1 and 0), and it acts by repeatedly swapping the states of pairs of consecutive cells containing the pattern 10. In the figure, the 1’s and 0’s translate to pieces of surface boundary that slope downwards or upwards (respectively), so a 10 pattern is a local minimum of the surface, and filling it in gives a 10 instead.</p>
<p>Rule 184 has an amazing variety of seemingly-unrelated interpretations; for instance, you can think of the cells of the automaton as a gridlocked highway, and the cells with 1’s in them as the cars of a traffic jam (perhaps <a href="https://www.latimes.com/california/story/2019-11-27/how-405-freeway-gridlock-became-the-iconic-image-of-l-a-thanksgiving">stuck in traffic for their Thanksgiving Day travels</a>). When a 1 has an open space ahead of it (a 0 cell) it moves forward, and otherwise it stays in place. This seemingly basic model displays a lot of the same features of real traffic such as freely flowing traffic when the total number of vehicles is small but waves of stop-and-go motion when the number of vehicles is high. It forms the basis for many more-sophisticated models of traffic flow.</p>
<p>But it is a different interpretation of Rule 184 that works best for understanding the question I started with, of what happens to a random coloring under recoloring operations. These operations are exactly what happens when you apply Rule 184 to the height function of a random coloring. But you can also view Rule 184 as describing a system of two kinds of particles, left-moving ones (11 patterns) and right-moving ones (00 patterns), separated by empty space (alternating 0’s and 1’s), that annihilate each other when they collide. In terms of the coloring, these particles are just the triples of vertices colored with three colors, and the parts of the cellular automaton with no particles are the 2-colored regions. The uniformly random coloring that we started with has the convenient property that particles of both types are equally likely. A right-moving particle will survive to step <script type="math/tex">n</script> if, in every prefix of the random sequence of particles to the right of it of length proportional to <script type="math/tex">n</script>, there are more right-moving particles than left-moving particles. A standard calculation on random walks shows that this survival probability is <script type="math/tex">\Theta(1/\sqrt{n})</script>, and this is also the density of remaining particles after <script type="math/tex">n</script> steps.</p>
<p>(<a href="https://mathstodon.xyz/@11011110/103212704886997345">Discuss on Mastodon</a>)</p>David EppsteinSuppose you have a uniformly random 3-coloring of a doubly-infinite path graph. This can be generated by choosing any one vertex, choosing any one of the three colors for it, and then propagating the coloring outwards from it, choosing one of the two available colors for each successive vertex. It’s convenient to imagine the three colors as being represented by the three numbers 0, 1, and 2 mod 3. Now perform the following process, repeatedly: change the color of every cell whose two neighbors both have the color that is one plus its color (mod 3). In other words, the middle vertex of a triple of vertices that is colored 1–0–1 changes to color 2, the middle vertex of 2–1–2 changes to 0, and the middle vertex of 0–2–0 changes to 1. What does this do to the coloring?Reconfiguring 3-colorings2019-11-25T22:24:00+00:002019-11-25T22:24:00+00:00https://11011110.github.io/blog/2019/11/25/reconfiguring-3-colorings<p>I talked briefly about how to get from one 3-coloring of a grid graph to another by changing one vertex color at a time, in <a href="/blog/2019/10/16/from-one-fold.html">a recent blog post about analogous problems for origami folding patterns</a>. It turns out that this problem of reconfiguring 3-colorings has been treated in much greater generality in the 2007 doctoral dissertation of Luis Cereceda, “<a href="http://etheses.lse.ac.uk/131/">Mixing graph colourings</a>”, as I discovered when I read the dissertation in the process of writing a new Wikipedia article on <a href="https://en.wikipedia.org/wiki/Cereceda%27s_conjecture">Cereceda’s conjecture</a>, the conjecture that the space of <script type="math/tex">(d+2)</script>-colorings of <script type="math/tex">d</script>-degenerate graphs (under moves that change the color of one vertex at a time) has at most quadratic diameter. Here’s an illustration from the new article showing the space of 3-colorings of a path graph:</p>
<p style="text-align:center"><img src="/blog/assets/2019/path-3-colorings.svg" alt="The space of 3-colorings of a path graph" /></p>
<p>Cereceda proved that the following properties of a graph are equivalent:</p>
<ul>
<li>It has a connected space of 3-colorings.</li>
<li>Every 3-coloring has a height function.</li>
<li>It is bipartite and is not “pinchable” to a 6-cycle</li>
</ul>
<p>If we consider the three colors to be used for 3-colorings to be the numbers 0, 1, and 2 (mod 3) then a height function can be defined as an assignment of integers (not mod 3) to the vertices, such that taking them mod 3 produces the given coloring, and such that adjacent vertices have heights that differ by <script type="math/tex">\pm 1</script>. If it exists for a given coloring, it can be constructed easily by choosing the height of one vertex arbitrarily and then using the <script type="math/tex">\pm 1</script> requirement for adjacent heights to propagate this choice to neighbors in the graph until every vertex has a height. What can go wrong is that this propagation somehow leaves two adjacent vertices with heights that are too far apart. For instance, if the colors around a 6-cycle have the cyclic order 0–1–2–0–1–2 then you will come back to the start six units higher than you started.</p>
<p>Continuing to explain the terms in Cereceda’s equivalence, I think the 6-cycle pinchability condition is most easily explained in terms of <a href="https://en.wikipedia.org/wiki/Graph_homomorphism">graph homomorphisms</a>, maps from one graph to another that preserve adjacency. Consider a 6-cycle, 3-colored 0–1–2–0–1–2. It is also a bipartite graph, 2-colored black–white–black–white–black–white, with one vertex for each combination of colors in the 3-coloring and the 2-coloring. If you have any 3-coloring of a bipartite graph, you can map it onto the 6-cycle so that both the 3-coloring and the bipartition are preserved. If your 3-coloring does not have a height function (that is, there is a cycle that, when you propagate heights around it, comes back to its start at a different height) then the winding number of this cycle, as it maps around the 6-cycle, will tell you the difference in heights from start to end (divided by six). So a coloring without a height function gives you a homomorphism to the 6-cycle in which some cycle has nonzero winding number. On the other hand, if you have such a homomorphism, you can lift the colors from the 6-cycle back to the starting graph to give you a coloring without a height function. Cereceda’s “pinching” operations are a special type of homomorphism in which vertices at distance two from each other are repeatedly merged. Not every homomorphism comes from pinching in this way (with pinches you can only map a 12-cycle once around a 6-cycle, not twice around, for instance) so the proof that pinching homomorphisms exist for graphs without height functions is a little more complicated.</p>
<p>It’s possible to construct in polynomial time the shortest sequence of color changes to go from one 3-coloring to another, whenever the space of colorings is connected. Cereceda almost finds this algorithm but misses a small trick and ends up stating its existence only as a conjecture. As I explained in my previous post, if you choose the correct offset for the height functions of the two colorings, you can find this shortest sequence by greedily changing the color at a vertex of one color where the current height is farthest from the goal height. The trick that Cereceda misses is that if you don’t know the correct offset between the two height functions, you can just try them all (or more quickly use a median algorithm to find the optimal offset and the distance between colorings in linear time).</p>
<p>Unfortunately, as Cereceda proved, testing pinchability to a 6-cycle is <script type="math/tex">\mathsf{NP}</script>-complete and therefore testing the connectivity of the space of 3-colorings (and the applicability of the height-based shortest reconfiguration algorithm) is <script type="math/tex">\mathsf{coNP}</script>-complete. For instance, I’m pretty sure the 10-vertex Möbius ladder shown below has height functions for all its 3-colorings, but I don’t know of an elegant way to prove this, and <script type="math/tex">\mathsf{coNP}</script>-completeness suggests that not all graphs have elegant proofs for this. This graph has lots of 6-cycles, for instance formed by any diagonal and the path around the outer cycle connecting its two endpoints. But trying to map the whole graph to a 6-cycle by folding it flat across a diagonal doesn’t work because it would map some edges to non-edges, and nothing else seems to work either.</p>
<p style="text-align:center"><img src="/blog/assets/2019/Möbius-ladder-10.svg" alt="A 10-vertex Möbius ladder" /></p>
<p>To save this post from being content-free, I want to describe a more easily recognized family of graphs that meets Cereceda’s criterion, and does have height functions for all its 3-colorings (so we can quickly find the shortest reconfiguration sequences in these graphs). It is the class of graphs in which the <a href="https://en.wikipedia.org/wiki/Cycle_space">cycle space</a> is generated by the 4-cycles, or in other words the graphs in which there exists a <a href="https://en.wikipedia.org/wiki/Cycle_basis">cycle basis</a> consisting only of 4-cycles. These graphs can be recognized simply by doing some mod-2 linear algebra to test whether the space generated by the 4-cycles has the same dimension as the cycle space. For instance, the Möbius ladder above is not in this class because the dimension of its cycle space (the number of edges beyond the ones in a spanning forest) is six but its number of 4-cycles (the cycles between two consecutive diagonals) is only five. Despite this example, the graphs generated by 4-cycles include a lot of natural classes of graphs that we might want to reconfigure 3-colorings of:</p>
<ul>
<li>Trees</li>
<li>Rectangular grid graphs and higher-dimensional hyperrectangular grid graphs</li>
<li><a href="https://en.wikipedia.org/wiki/Squaregraph">Squaregraphs</a></li>
<li>The dual graphs of simple line arrangements</li>
<li>Complete bipartite graphs</li>
<li><a href="https://en.wikipedia.org/wiki/Chordal_bipartite_graph">Chordal bipartite graphs</a></li>
<li>The <a href="https://en.wikipedia.org/wiki/Cartesian_product_of_graphs">Cartesian products</a> of other graphs generated by 4-cycles</li>
</ul>
<p>To prove that Cartesian products preserve the property of being generated by 4-cycles, consider any cycle <script type="math/tex">C</script> in the product graph; we want to represent it as a mod-2 sum of 4-cycles. If two consecutive edges of <script type="math/tex">C</script> come from the two different factors, then the product of these edges is a 4-cycle, and adding this 4-cycle to <script type="math/tex">C</script> swaps the order of the two edges within <script type="math/tex">C</script>. By repeated swaps we can segregate all the edges from the two factors from each other, changing <script type="math/tex">C</script> into two cycles, one from each factor, that meet at a common vertex. Then we can represent the two cycles separately within the two factors.</p>
<p>It’s straightforward to see that when 4-cycles generate the <script type="math/tex">\mathbb{Z}</script>-homology of a graph, then height functions always exist, because the height difference around any cycle is the sum of the height differences of the 4-cycles generating it, which are all zero. But here by using the binary cycle space we’re looking at the <script type="math/tex">\mathbb{Z}_2</script>-homology, which might be a different thing. There could be graphs whose <script type="math/tex">\mathbb{Z}_2</script>-homology is generated by 4-cycles but whose <script type="math/tex">\mathbb{Z}</script>-homology isn’t. For instance I think that adding one bipartite edge to the 10-vertex Möbius ladder produces an example of this phenomenon. So we need a proof that <script type="math/tex">\mathbb{Z}_2</script>-homology is good enough. Or in simpler terms, when the cycle space is generated by 4-cycles, all 3-colorings have height functions.</p>
<p>We’ll prove this by contradiction, so let’s suppose that we have the smallest possible counterexample. That is, we have a graph <script type="math/tex">G</script>, a 3-coloring of <script type="math/tex">G</script>, and a cycle <script type="math/tex">C</script> in <script type="math/tex">G</script>, such that the cycle space of <script type="math/tex">G</script> is generated by 4-cycles but going around <script type="math/tex">C</script> using the <script type="math/tex">\pm 1</script> rule to propagate heights produces a different height than you started with. By “smallest” I mean first, that <script type="math/tex">C</script> is as short as possible, second, that for that length of <script type="math/tex">C</script> the rest of <script type="math/tex">G</script> has as few vertices as possible, and third, that the number of 4-cycles in the representation of <script type="math/tex">C</script> is as small as possible.</p>
<p>Then <script type="math/tex">C</script> cannot have any chords, because if it did then a chord plus one of the two segments of <script type="math/tex">C</script> connecting the chord endpoints would form a shorter cycle with the same inconsistent heights. Because we are assuming that <script type="math/tex">G</script> is generated by 4-cycles, consider any set <script type="math/tex">S</script> of 4-cycles whose sum is <script type="math/tex">C</script>. That is, each edge of <script type="math/tex">C</script> appears an odd number of times in cycles of <script type="math/tex">S</script>, and each other edge of <script type="math/tex">G</script> appears an even number of times (possibly zero). Each 4-cycle in <script type="math/tex">S</script> must have a coloring of the form <script type="math/tex">x</script>–<script type="math/tex">y</script>–<script type="math/tex">x</script>–<script type="math/tex">y</script> or <script type="math/tex">x</script>–<script type="math/tex">y</script>–<script type="math/tex">z</script>–<script type="math/tex">y</script> for some colors <script type="math/tex">x</script>, <script type="math/tex">y</script>, and <script type="math/tex">z</script>. If at least one of the two <script type="math/tex">y</script>-colored vertices does not belong to <script type="math/tex">C</script>, form a smaller graph <script type="math/tex">G</script> by merging these two <script type="math/tex">y</script>-colored vertices. This merger does not change <script type="math/tex">C</script> or the coloring, so <script type="math/tex">C</script> stays a bad cycle. And it doesn’t change the property of <script type="math/tex">G</script> that it is generated by 4-cycles, because any cycle in the merged graph can be lifted to a cycle in the unmerged graph (possibly passing through <script type="math/tex">y</script>–<script type="math/tex">x</script>–<script type="math/tex">y</script> in the merged 4-cycle and possibly not simple), represented by 4-cycles in <script type="math/tex">G</script> itself, and then merged back down to get a representation in the smaller graph. But because we’re assuming <script type="math/tex">G</script> was the smallest possible counterexample, this shrinkage can’t happen, so all of the 4-cycles in <script type="math/tex">S</script> have both <script type="math/tex">y</script>-vertices in <script type="math/tex">C</script>.</p>
<p>Now if we have a 4-cycle with two <script type="math/tex">y</script>-vertices in <script type="math/tex">C</script>, at least one of the other two vertices does not belong to <script type="math/tex">C</script>, because <script type="math/tex">C</script> must be longer than four edges (else it would not have a bad coloring) and we’ve already ruled out the possibility that <script type="math/tex">C</script> has the chords that would be needed to make a 4-cycle using vertices only from <script type="math/tex">C</script>. Let <script type="math/tex">v</script> be this vertex outside of <script type="math/tex">C</script>, so we have a path <script type="math/tex">y</script>–<script type="math/tex">v</script>–<script type="math/tex">y</script> connecting the two <script type="math/tex">y</script>-vertices in <script type="math/tex">C</script>. One of two things can happen: First, the two <script type="math/tex">y</script>-vertices might only be two units apart in <script type="math/tex">C</script>. But then, replacing the two-edge path between them by the path through <script type="math/tex">v</script> produces a new bad cycle of the same length, in the same graph <script type="math/tex">G</script>, representable by a smaller set of 4-cycles. This contradicts our choice of <script type="math/tex">C</script> and <script type="math/tex">G</script> as being the smallest possible counterexample. Second, when the two <script type="math/tex">y</script>-vertices are farther apart in <script type="math/tex">C</script>, there are two cycles formed by path <script type="math/tex">y</script>–<script type="math/tex">v</script>–<script type="math/tex">y</script> and by one of the two paths in <script type="math/tex">C</script> connecting the same two <script type="math/tex">y</script>-vertices. Both of these cycles are shorter than <script type="math/tex">C</script>, and at least one of them continues to have a bad coloring. So again we have found a smaller counterexample and a contradiction.</p>
<p>This case analysis leading in all cases to a contradiction shows that a smallest counterexample cannot exist, and therefore that all graphs generated by 4-cycles have height functions for all of their 3-colorings.</p>
<p>(<a href="https://mathstodon.xyz/@11011110/103202898221719422">Discuss on Mastodon</a>; see also <a href="/blog/2010/09/12/rapid-mixing-for.html">an earlier post on reconfiguring 3-colorings of cycles using stronger moves</a>; edited 2019-11-27 to correct rectraction vs pinchability in Cereceda’s characterization)</p>David EppsteinI talked briefly about how to get from one 3-coloring of a grid graph to another by changing one vertex color at a time, in a recent blog post about analogous problems for origami folding patterns. It turns out that this problem of reconfiguring 3-colorings has been treated in much greater generality in the 2007 doctoral dissertation of Luis Cereceda, “Mixing graph colourings”, as I discovered when I read the dissertation in the process of writing a new Wikipedia article on Cereceda’s conjecture, the conjecture that the space of -colorings of -degenerate graphs (under moves that change the color of one vertex at a time) has at most quadratic diameter. Here’s an illustration from the new article showing the space of 3-colorings of a path graph:Linkage2019-11-15T22:20:00+00:002019-11-15T22:20:00+00:00https://11011110.github.io/blog/2019/11/15/linkage<ul>
<li>
<p><a href="https://scholarlyoa.com/omics-group-now-charging-for-article-withdrawals/">OMICS Group now charging for article withdrawals</a> (<a href="https://mathstodon.xyz/@11011110/103069657170279386"><script type="math/tex">\mathbb{M}</script></a>): a new way for predatory journals to be predatory. It’s probably even legal: they have begun providing you with a service (reviewing of your paper) and told you up front what the charges are. Whether it’s ethical for scientific publishing is an entirely different question… So let this be a lesson to be careful where you submit, because unsubmitting could be difficult.</p>
</li>
<li>
<p><a href="https://www.shapeoperator.com/2016/12/12/sunset-geometry/">Sunset geometry</a> (<a href="https://mathstodon.xyz/@11011110/103075417779881667"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://news.ycombinator.com/item?id=21413358">via</a>). How to tell the radius of the earth from a photo of a sunset over a still body of water (knowing the height of the camera over the water). Not explained: how still the water needs to be, how badly the results are affected by atmospheric refraction, how accurately the measurements need to be performed to get a meaningful estimate, or how likely you are to see the sun meet the horizon before low clouds get in the way.</p>
</li>
<li>
<p><a href="https://www.ams.org/profession/ams-fellows/new-fellows">The new AMS fellows</a> (<a href="https://mathstodon.xyz/@11011110/103077029444407287"><script type="math/tex">\mathbb{M}</script></a>) include graph theorists Daniel Kráľ and Bojan Mohar, and fellow Wikipedia editor Marie Vitulli. Their announcement also led me to create new Wikipedia articles on new fellows <a href="https://en.wikipedia.org/wiki/Chikako_Mese">Chikako Mese</a>, <a href="https://en.wikipedia.org/wiki/Julianna_Tymoczko">Julianna Tymoczko</a>, and <a href="https://en.wikipedia.org/wiki/Jang-Mei_Wu">Jang-Mei Wu</a>, and Vitulli to create one for <a href="https://en.wikipedia.org/wiki/Tara_E._Brendle">Tara Brendle</a>. Congratulations, all!</p>
</li>
<li>
<p><a href="https://www.maa.org/programs/maa-awards/writing-awards/the-graph-menagerie-abstract-algebra-and-the-mad-veterinarian">The graph menagerie: abstract algebra and the mad veterinarian </a> (<a href="https://mathstodon.xyz/@11011110/103083916322783935"><script type="math/tex">\mathbb{M}</script></a>). Or, how to solve puzzles like: “Suppose a mad veterinarian creates a transmogrifier that can convert one cat into two dogs and five mice, or one dog into three cats and three mice, or a mouse into a cat and a dog. It can also do each of these operations in reverse. Can it, through any sequence of operations, convert two cats into a pack of dogs? How about one cat?”</p>
</li>
<li>
<p><a href="http://processalgebra.blogspot.com/2019/11/call-for-opinions-length-of-papes-in.html">LIPIcs series editor Luca Aceto polls the community on page limits</a> (<a href="https://mathstodon.xyz/@11011110/103086511516971922"><script type="math/tex">\mathbb{M}</script></a>). It used to be that conferences in theoretical computer science had page limits because you couldn’t bind volumes with too many paper pages, now long irrelevant. So now that we <em>can</em> publish much longer conference papers, should we? Limits encourage authors to publish full details in a properly refereed journal version, but unlimited length recognizes the reality that many authors are too lazy to make journal versions.</p>
</li>
<li>
<p><a href="https://understandinguncertainty.org/squaring-square-glass">Squaring the square, in stained glass</a> (<a href="https://mathstodon.xyz/@11011110/103095223291132423"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://scilogs.spektrum.de/hlf/perfect-squares/">via</a>). By David Spiegelhalter, 2013.</p>
</li>
<li>
<p><a href="https://en.wikipedia.org/wiki/Edge_tessellation">Tiling the plane by edge reflection</a> (<a href="https://mathstodon.xyz/@11011110/103099409883184951"><script type="math/tex">\mathbb{M}</script></a>). Here’s a proof sketch that there are eight ways to do this:
Each prototile vertex must have angle <script type="math/tex">2\pi/i</script> for integer <script type="math/tex">i</script>, and if <script type="math/tex">i</script> is odd, the subsequence of the remaining angles must be symmetric. For an <script type="math/tex">n</script>-gon, considering the sum of interior angles shows that</p>
<script type="math/tex; mode=display">\sum\frac{1}{i} = \frac{n-2}{n}.</script>
<p>Searching for sequences of integers with these properties (choosing the smallest integers first to make the search bounded) finds that the only cyclic sequences of integers meeting these constraints are (3,12,12), (4,8,8), (4,6,12), (6,6,6), (3,4,6,4), (3,6,3,6), (4,4,4,4), and (3,3,3,3,3,3), the sequences of the 8 known tessellations.</p>
</li>
<li>
<p><a href="https://www.insidehighered.com/news/2019/11/08/turkish-academics-sound-alarm-over-gender-segregation-plans">Turkish academics sound alarm over gender segregation plans</a> (<a href="https://mathstodon.xyz/@11011110/103103753533385831"><script type="math/tex">\mathbb{M}</script></a>). When women’s universities are set up to provide alternatives in the face of persistent discrimination against women in the existing universities (as they were in the US and Korea), that’s one thing. When the women are already successful in the existing universities but women’s universities are set up as a pathway to push them out, that’s entirely different.</p>
</li>
<li>
<p><a href="http://news.mit.edu/2019/leonardo-da-vinci-bridge-test-1010">Engineers put Leonardo da Vinci’s bridge design to the test:
proposed bridge would have been the world’s longest at the time; new analysis shows it would have worked</a> (<a href="https://mathstodon.xyz/@11011110/103111919197001339"><script type="math/tex">\mathbb{M}</script></a>, <a href="https://arstechnica.com/science/2019/10/testing-leonardo-da-vincis-bridge-his-design-was-stable-study-finds/">via</a>). I don’t think the link does justice to the scale of the thing. Da Vinci proposed a single stone arch across the Golden Horn in Istanbul, roughly 280m. That’s much longer than anything on the current <a href="https://en.wikipedia.org/wiki/List_of_longest_masonry_arch_bridge_spans">list of the world’s biggest stone arches</a>.</p>
</li>
<li>
<p><a href="https://en.wikipedia.org/wiki/Order_polytope">Order polytope</a> (<a href="https://mathstodon.xyz/@11011110/103115656245496084"><script type="math/tex">\mathbb{M}</script></a>). New Wikipedia article on a convex polytope derived from any finite partial order as the points in a unit hypercube whose coordinate order is consistent with the partial order. Its vertices come from upper sets, its faces come from quotients, its facets come from covering pairs, and its volume comes from the number of linear extensions of the partial order. Coordinatewise min and max gives its points the structure of a continuous distributive lattice.</p>
</li>
<li>
<p><a href="https://www.wired.com/story/socked-into-the-puppet-hole-on-wikipedia/">Socked into the puppet-hole on Wikipedia</a> (<a href="https://mathstodon.xyz/@11011110/103120959491226706"><script type="math/tex">\mathbb{M}</script></a>). Journalist Noam Cohen’s Wikipedia biography is collateral damage in the war on slowking4, a prolific creator of Wikipedia articles whose problematic behavior (copying content from other sites, creating sockpuppet accounts to hide their identity, and reinstating articles from another user that were so riddled with errors that they were deleted en masse) has led to delete-on-sight actions.</p>
</li>
<li>
<p><a href="https://en.wikipedia.org/wiki/Arithmetic_billiards">Arithmetic billiards</a> (<a href="https://mathstodon.xyz/@11011110/103129171790722530"><script type="math/tex">\mathbb{M}</script></a>): using billiard ball trajectories to compute number-theoretic functions.</p>
</li>
<li>
<p><a href="https://mathstodon.xyz/@olligobber/103066273568117018">olligober made a regex to match all multiples of 7</a>, but it was more than 10,000 characters long so grep couldn’t handle it. Applying <a href="https://en.wikipedia.org/wiki/Kleene%27s_algorithm">Kleene’s algorithm</a> to convert the natural DFA for this sort of problem into a regular expression blows its size up from polynomial in the modulus to exponential, but is this necessary? And if it is, what is the best possible base for the exponential?</p>
</li>
<li>
<p><a href="https://mathoverflow.net/questions/338888/dividing-a-chocolate-bar-into-any-proportions">Dividing a chocolate bar into any proportions</a> (<a href="https://mathstodon.xyz/@11011110/103140599116798730"><script type="math/tex">\mathbb{M}</script></a>). The bar has <script type="math/tex">L</script> squares, and you want to give each of <script type="math/tex">m</script> people an integer number of squares, but the integers are not known in advance. How to break the bar into few pieces so this will always be possible? Reid Hardison asked this months ago but Ilya Bogdanov answered with an efficient construction of the optimal partition much more recently.</p>
</li>
<li>
<p><a href="http://www.personal.psu.edu/sot2/books/billiardsgeometry.pdf">Geometry and Billiards</a> (<a href="https://mathstodon.xyz/@11011110"><script type="math/tex">\mathbb{M}</script></a>). An undergraduate-level textbook on the mathematics of reflection by Serge Tabachnikov.</p>
</li>
</ul>David EppsteinOMICS Group now charging for article withdrawals (): a new way for predatory journals to be predatory. It’s probably even legal: they have begun providing you with a service (reviewing of your paper) and told you up front what the charges are. Whether it’s ethical for scientific publishing is an entirely different question… So let this be a lesson to be careful where you submit, because unsubmitting could be difficult.