Jekyll2021-10-15T23:40:57+00:00https://11011110.github.io/blog/feed.xml11011110Geometry, graphs, algorithms, and moreDavid EppsteinLinkage2021-10-15T15:43:00+00:002021-10-15T15:43:00+00:00https://11011110.github.io/blog/2021/10/15/linkage<ul> <li> <p>I was interested to see a familiar-looking graph drawing as one of the answers to <a href="https://fractalkitty.com/2021/10/02/mathober-2021-begins/">the prompt “multiplicity” for the first entry in Mathober 2021</a> (<a href="https://mathstodon.xyz/@11011110/107030908468774953">$$\mathbb{M}$$</a>). It’s a multigraph formed by a triangle with tripled edges, and looks a lot like <a href="https://commons.wikimedia.org/wiki/File:Multigraph-edge-coloring.svg">the drawing I made</a> for <a href="https://en.wikipedia.org/wiki/Shannon_multigraph">the Wikipedia Shannon multigraph article</a>, prettied up by making an infinitely recessing sequence of these drawings rather than just one. Good choice for multiplicity.</p> </li> <li> <p><a href="https://gilkalai.wordpress.com/2021/10/03/to-cheer-you-up-in-difficult-times-32-annika-heckels-guest-post-how-does-the-chromatic-number-of-a-random-graph-vary/">Non-concentration of the chromatic number of random graphs</a> (<a href="https://mathstodon.xyz/@11011110/107040518830792599">$$\mathbb{M}$$</a>). Uniformly random graphs, $$G(n,1/2)$$ in the Erdős–Rényi–Gilbert model, turn out to have chromatic numbers that, for infinitely many $$n$$, are spread over roughly $$\sqrt{n}$$ values. But there are weird fluctuations so that, conjecturally, for some $$n$$ the concentration is much tighter, more like $$n^{1/4}$$.</p> </li> <li> <p><a href="https://www.insidehighered.com/news/2021/10/04/tenure-under-threat-georgia">University System of Georgia moves to gut tenure</a> (<a href="https://mathstodon.xyz/@11011110/107047579890149970">$$\mathbb{M}$$</a>). The proposed new policy includes procedures for removal of tenure under certain enumerated grounds, including failure to perform their jobs (this is pretty normal) but then adds a massive escape clause in which the board of regents can remove tenured faculty at any time as long as their reason for doing so is not one of the enumerated ones.</p> </li> <li> <p><a href="http://hyperbolic-crochet.blogspot.com/2010/07/story-about-origins-of-model-of.html">The first physical models of the hyperbolic plane, made in 1868 by Beltrami</a> (<a href="https://mathstodon.xyz/@11011110/107052024179327595">$$\mathbb{M}$$</a>, <a href="http://www.open.ac.uk/blogs/is/?p=731">via</a>), blog post by Daina Taimiņa from 2010. Maybe you could make something like this by wrapping and stretching a disk of wet paper in a roll around a pseudosphere (https://en.wikipedia.org/wiki/Pseudosphere)? The rolled-up photo of Beltrami’s model suggests that he did that. The via link shows this as a tangent to a story about triangulated polygons, frieze patterns, and the Farey tessellation.</p> </li> <li> <p><a href="https://www.youtube.com/watch?v=QFj-hF8XDQ0">Why do bees make rhombic dodecahedrons</a> (<a href="https://mathstodon.xyz/@11011110/107058516442920053">$$\mathbb{M}$$</a>)? Nice video from Matt Parker (Stand-up Maths) on why bees usually end the cells of their honeycombs with rhombic dodecahedron faces, why this isn’t the optimal solution to fitting two layers of cells together (in terms of minimum wax usage), and why it isn’t reasonable to expect bees to find exact optima for this problem. If I have to quibble with something, though, it’s his plural. It’s not wrong, but see <a href="https://books.google.com/ngrams/graph?content=dodecahedrons%2Cdodecahedra">Google ngrams</a>.</p> </li> <li> <p><a href="https://www.quantamagazine.org/mathematicians-prove-melting-ice-stays-smooth-20211006/">Mathematicians prove melting ice stays smooth</a> (<a href="https://mathstodon.xyz/@11011110/107064697896988128">$$\mathbb{M}$$</a>, <a href="https://en.wikipedia.org/wiki/Stefan_problem">see also</a>). The headline is a little overstated: you’re probably familiar with thin necks of ice melting to sharp points at the instant they separate. But these singularities are instantaneous: mathematical models of ice stay smooth for all but a measure-zero set of times. Original paper: “<a href="https://arxiv.org/abs/2103.13379">The singular set in the Stefan problem</a>”, Alessio Figalli, Xavier Ros-Oton, and Joaquim Serra.</p> </li> <li> <p><a href="https://mathstodon.xyz/@JordiGH/107061930434927745">Discussion of the recent meme telling programmers and mathematicians that summation notation and for loops are the same thing</a>. They’re not quite the same, though: summations don’t have an order of evaluation. But which is easier for people who don’t already know what they are to search and find out about? And why do programmers get angry at non-programming notational conventions?</p> </li> <li> <p><a href="http://eugeniacheng.com/wp-content/uploads/2017/02/cheng-morality.pdf">Mathematics, morally</a> (<a href="https://mathstodon.xyz/@11011110/107078314739030894">$$\mathbb{M}$$</a>, <a href="https://news.ycombinator.com/item?id=28816050">via</a>), Eugenia Cheng, 2004. Somehow I hadn’t run across this before. It argues that much philosophy of mathematics is irrelevant to practice (“You can’t tell from somebody’s mathematics if they are a fictionalist, a rationalist, a platonist, a realist, an operationalist, a logicist, a formalist, structuralist, nominalist, intuitionist.”) and instead considerations of the right way of handling certain topics are more central.</p> </li> <li> <p>The SIGACT Committee for the Advancement of Theoretical Computer Science is collecting information on women in theoretical computer science (<a href="https://mathstodon.xyz/@11011110/107084102339408082">$$\mathbb{M}$$</a>). If this is you, please see <a href="https://thmatters.wordpress.com/2021/10/08/soliciting-information-about-women-in-tcs/">their announcement</a> for details of how to be counted.</p> </li> <li> <p><a href="https://pratt.duke.edu/about/news/rudin-squirrel-award">Cynthia Rudin wins major award with silly name</a> (<a href="https://mathstodon.xyz/@11011110/107089557928657710">$$\mathbb{M}$$</a>), for her work on machine learning systems that learn to predict behavior using simple, interpretable, and transparent formulas.</p> </li> <li> <p>According to the <a href="https://www.siam.org/conferences/cm/conference/soda22">SODA web site</a>, SIAM has decided that their conferences will be hybrid through July (<a href="https://mathstodon.xyz/@11011110/107090556997921608">$$\mathbb{M}$$</a>). So if (like me) you wanted to participate in SODA/SOSA/ALENEX/APOCS, but were worried about planning a trip to Virginia with another predicted winter wave of Covid, now you can stay home and conference safely. Or, if you feel hybrid conferences are problematic and organizers should do one or the other but not both, now you have another reason to be annoyed.</p> </li> <li> <p>Rarely is the question asked: <a href="https://blogs.ams.org/beyondreviews/2021/10/14/are-math-papers-getting-longer/">Are math papers getting longer?</a> (<a href="https://mathstodon.xyz/@11011110/107104144047349269">$$\mathbb{M}$$</a>). Following earlier work by Nick Trefethen, Edward Dunne provides some data suggesting that (for certain journals, at least, and not the ones with page limits) the answer is yes. I’m not convinced by the suggested explanation that it’s because they are taking more effort to explain “connections with other work”, though: is that really a big enough fraction of most papers?</p> </li> <li> <p>I haven’t been using my office desktop Mac much because I haven’t been into my office much, so it took me a while to pay attention to the fact that much of its networking had recently broken. <a href="https://eclecticlight.co/2021/09/21/el-capitan-and-older-mac-os-x-are-about-to-have-a-security-certificate-problem/">Here’s why</a> (<a href="https://mathstodon.xyz/@11011110/107107828546240163">$$\mathbb{M}$$</a>). It was still running OS X El Capitan (10.11.6) and a crucial top-level certificate expired. The machine is too old (late 2009) for the latest OS X but it looks like I can and should upgrade to High Sierra, 10.13. So much for getting anything else accomplished today…</p> </li> </ul>David EppsteinI was interested to see a familiar-looking graph drawing as one of the answers to the prompt “multiplicity” for the first entry in Mathober 2021 ($$\mathbb{M}$$). It’s a multigraph formed by a triangle with tripled edges, and looks a lot like the drawing I made for the Wikipedia Shannon multigraph article, prettied up by making an infinitely recessing sequence of these drawings rather than just one. Good choice for multiplicity.Relevant neighbors2021-10-13T23:05:00+00:002021-10-13T23:05:00+00:00https://11011110.github.io/blog/2021/10/13/relevant-neighbors<p>I have a new preprint, <a href="https://arxiv.org/abs/2110.06163">“Finding Relevant Points for Nearest-Neighbor Classification”, arXiv:2110.06163</a>, to appear in January at the <a href="https://www.siam.org/conferences/cm/conference/sosa22">SIAM Symposium on Simplicity in Algorithms (SOSA22)</a>. It’s about points in Euclidean spaces of dimension three or more, but I thought it would make a good warm-up to discuss here the one-dimensional version of the same problem, solved (together with the 2d version) by Bremner, Demaine, Erickson, Iacono, Langerman, Morin, and Toussaint in their paper <a href="http://dx.doi.org/10.1007/s00454-004-1152-0">“Output-sensitive algorithms for computing nearest-neighbour decision boundaries”, <em>Discrete Comput. Geom.</em> 2005</a>.</p> <p>So in this problem, you have a collection of real-valued data points with known discrete classifications (say, a finite set of colors), and you want to guess the color of new points whose color is not already given. Nearest neighbor classification means simply that, to guess the color of $$x$$, you find the closest known point $$y$$ and guess that $$x$$ has the same color as $$y$$. One easy way to do this would be to store the known points in a sorted list and use binary search. There’s lots more to say about this (for instance its use in combination with <a href="https://en.wikipedia.org/wiki/Random_projection">random projections</a> for high-dimensional approximate nearest neighbors) but for today I want to focus on the size of this sorted list. We can store a list that is potentially much smaller, but always produces the same results, by keeping only points that have a neighbor with a different classification.</p> <p style="text-align:center"><img src="/blog/assets/2021/1d-nnc.svg" alt="One-dimensional nearest neighbor classification on a full data set and the data set trimmed to its relevant points" /></p> <p>These points with differently-classified neighbors are the “relevant points” of the preprint title. Another way of describing them is that a point is relevant if deleting it would change the classification of some other (unknown) points in space that might later be queried. Among the set of decision boundaries, the ones separating parts of space with different classifications are the ones defined by relevant points. So if we store a nearest-neighbor data structure with only relevant points, we will get the same answer as if we store all known points. But because we’re storing fewer points, it will take less memory and less time (especially if the reduced memory allows it to fit into cache).</p> <p>If you have the points given to you in sorted order, then it’s easy enough to scan through them in that order, keeping track of which pairs have different classifications, and produce a filtered sequence of the relevant ones. Here it is in Python (with apologies for the low-contrast syntax coloring):</p> <figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="k">def</span> <span class="nf">relevant</span><span class="p">(</span><span class="n">seq</span><span class="p">,</span><span class="n">classify</span><span class="p">):</span> <span class="s">"""Filter points whose classification differs from a neighbor. Arguments are a sequence of points, and a function to classify each point. The return value is an iterator for the filtered sequence."""</span> <span class="n">prevpoint</span> <span class="o">=</span> <span class="n">prevclass</span> <span class="o">=</span> <span class="n">prevlisted</span> <span class="o">=</span> <span class="bp">None</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">seq</span><span class="p">:</span> <span class="n">xclass</span> <span class="o">=</span> <span class="n">classify</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">if</span> <span class="n">prevlisted</span> <span class="o">!=</span> <span class="bp">None</span> <span class="ow">and</span> <span class="n">xclass</span> <span class="o">!=</span> <span class="n">prevclass</span><span class="p">:</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">prevlisted</span><span class="p">:</span> <span class="k">yield</span> <span class="n">prevpoint</span> <span class="k">yield</span> <span class="n">x</span> <span class="n">prevlisted</span> <span class="o">=</span> <span class="bp">True</span> <span class="k">else</span><span class="p">:</span> <span class="n">prevlisted</span> <span class="o">=</span> <span class="bp">False</span> <span class="n">prevpoint</span> <span class="o">=</span> <span class="n">x</span> <span class="n">prevclass</span> <span class="o">=</span> <span class="n">xclass</span></code></pre></figure> <p>However, as Bremner et al observed, sorting an input to make it usable by this scan does more work than necessary, because we don’t need the sorted ordering of all the other points between the relevant ones. Instead, we can use an idea resembling <a href="https://en.wikipedia.org/wiki/Quickselect">quickselect</a>, where we modify the quicksort algorithm to stop recursing in subproblems where sorting is unnecessary. For finding relevant points, these subproblems are the homogeneous ones, in which all points have the same classification as each other. Bremner et al combined this idea with a version of quicksort that always partitions its subproblems at the exact median, in order to achieve a good worst-case time bound, but if we’re happy with expected analysis we can use the same random-pivoting idea as the more usual form of quicksort:</p> <figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="k">def</span> <span class="nf">quickrelevant</span><span class="p">(</span><span class="n">seq</span><span class="p">,</span><span class="n">classify</span><span class="p">):</span> <span class="s">"""Same output as relevant(sorted(list(seq)),classify). We assume the input sequence is sortable and has no repeat values."""</span> <span class="k">def</span> <span class="nf">supersequence</span><span class="p">():</span> <span class="s">"""Generate sorted supersequence of relevant points by quicksort-like recursive subdivision, stopping at homogeneous subproblems. We include the endpoints of each subproblem, even though some might not be relevant, so the results should be cleaned up using relevant(). We use an explicit stack to handle the recursion, avoiding the need to pass yielded outputs back through a call stack."""</span> <span class="n">liststack</span> <span class="o">=</span> <span class="p">[</span><span class="nb">list</span><span class="p">(</span><span class="n">seq</span><span class="p">)]</span> <span class="k">while</span> <span class="n">liststack</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">liststack</span><span class="p">.</span><span class="n">pop</span><span class="p">()</span> <span class="c1"># Base cases of recursion: lists of zero or one item </span> <span class="k">if</span> <span class="ow">not</span> <span class="n">L</span><span class="p">:</span> <span class="k">continue</span> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">L</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="k">yield</span> <span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">continue</span> <span class="c1"># Test whether L is homogeneous </span> <span class="c1"># and if so only generate its extreme values </span> <span class="n">homogeneous</span> <span class="o">=</span> <span class="bp">True</span> <span class="n">firstclass</span> <span class="o">=</span> <span class="n">classify</span><span class="p">(</span><span class="n">L</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">L</span><span class="p">)):</span> <span class="k">if</span> <span class="n">firstclass</span> <span class="o">!=</span> <span class="n">classify</span><span class="p">(</span><span class="n">L</span><span class="p">[</span><span class="n">i</span><span class="p">]):</span> <span class="n">homogeneous</span> <span class="o">=</span> <span class="bp">False</span> <span class="k">break</span> <span class="k">if</span> <span class="n">homogeneous</span><span class="p">:</span> <span class="k">yield</span> <span class="nb">min</span><span class="p">(</span><span class="n">L</span><span class="p">)</span> <span class="k">yield</span> <span class="nb">max</span><span class="p">(</span><span class="n">L</span><span class="p">)</span> <span class="k">continue</span> <span class="c1"># Divide and conquer with random pivot </span> <span class="n">pivot</span> <span class="o">=</span> <span class="n">L</span><span class="p">[</span><span class="n">random</span><span class="p">.</span><span class="n">randrange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="nb">len</span><span class="p">(</span><span class="n">L</span><span class="p">))]</span> <span class="n">low</span> <span class="o">=</span> <span class="p">[]</span> <span class="n">high</span> <span class="o">=</span> <span class="p">[]</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">L</span><span class="p">:</span> <span class="k">if</span> <span class="n">x</span> <span class="o">&lt;</span> <span class="n">pivot</span><span class="p">:</span> <span class="n">low</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">else</span><span class="p">:</span> <span class="n">high</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="n">liststack</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">high</span><span class="p">)</span> <span class="n">liststack</span><span class="p">.</span><span class="n">append</span><span class="p">(</span><span class="n">low</span><span class="p">)</span> <span class="k">return</span> <span class="n">relevant</span><span class="p">(</span><span class="n">supersequence</span><span class="p">(),</span><span class="n">classify</span><span class="p">)</span></code></pre></figure> <p>The time complexity of this algorithm can be analyzed much like <a href="/blog/2007/10/09/blum-style-analysis-of.html">the analysis of quickselect</a>, by observing that the time is proportional to the number of comparisons with pivots, computing the probability that each possible comparison happens, and summing. In quicksort, two distinct elements at distance $$d$$ from each other in the final sorted output are compared whenever one of them is the first to be chosen as a pivot in the interval between them, which happens with probability exactly $$2/(d+1)$$. In quickrelevant, this same probability holds for pairs that are separated by one of the decision boundaries. But pairs of elements that are within the same homogeneous block are less likely to be compared, because of the possibility that the recursion will stop before it separates or compares them.</p> <p>If a pair of elements lies within a single block, has distance $$d$$ separating them, and is $e$ units from both ends of the block, then it will only be compared if one of the two elements is first to be chosen in at least one of the two intervals of length $$d+e$$ extending from the two elements towards an end of their block. This happens with probability at most $$4/(d+e)$$, because there are two ways of choosing which element to pick first as the pivot and two ways of choosing which extended interval it is first in.</p> <p>If we sum up these probabilities, for pairs involving a single element that is $$e$$ units from its nearest block boundary among a set of $$n$$ elements, we get $$O\bigl(\log(n/e)\bigr)$$ as the expected contribution to the total time for that one element. If we sum the contributions from the elements within a block, for a block of length $$\ell_i$$, we get a total expected contribution from that block of $$O\bigl(\ell_i\log(n/\ell_i)\bigr)$$. And if we have $$k$$ relevant points and $$O(k)$$ blocks, and we sum over all blocks, the total time is maximized when all the blocks are of equal size, $$\Theta(n/k)$$, for which we get total time $$O(n\log k)$$.</p> <p>For quicksort and quickselect, it’s possible to be more careful in the analysis, derive exact formulas for the probability of making each comparison, and from them get an analysis of the expected number of comparisons that does not use $$O$$-notation for its leading term; see my linked post on the quickselect analysis. Probably it’s possible here too but it looks messier. Maybe it would make a good undergraduate research project. One thing to be careful of is that the comparisons are not over in the homogeneous case; finding the min and max simultaneously, in a block of length $$\ell_i$$, takes roughly $$3\ell_i/2$$ comparisons. But that should only be a lower-order term compared to the $$O(n\log k)$$ leading term of the analysis.</p> <p>(<a href="https://mathstodon.xyz/@11011110/107098438066916443">Discuss on Mastodon</a>)</p>David EppsteinI have a new preprint, “Finding Relevant Points for Nearest-Neighbor Classification”, arXiv:2110.06163, to appear in January at the SIAM Symposium on Simplicity in Algorithms (SOSA22). It’s about points in Euclidean spaces of dimension three or more, but I thought it would make a good warm-up to discuss here the one-dimensional version of the same problem, solved (together with the 2d version) by Bremner, Demaine, Erickson, Iacono, Langerman, Morin, and Toussaint in their paper “Output-sensitive algorithms for computing nearest-neighbour decision boundaries”, Discrete Comput. Geom. 2005.Generating fibbinary numbers, three ways2021-10-02T13:53:00+00:002021-10-02T13:53:00+00:00https://11011110.github.io/blog/2021/10/02/generating-fibbinary-numbers<p>I just added to Wikipedia two articles on the <a href="https://en.wikipedia.org/wiki/Jordan%E2%80%93P%C3%B3lya_number">Jordan–Pólya numbers</a> and <a href="https://en.wikipedia.org/wiki/Fibbinary_number">fibbinary numbers</a>, two integer sequences used in <a href="/blog/2021/09/24/which-integer-sequences.html">my recent paper on Egyptian fractions</a>. Jordan–Pólya numbers are the products of factorials, while the fibbinary numbers are the ones with binary representations having no two consecutive 1’s. The OEIS page on the fibbinary numbers, <a href="https://oeis.org/A003714">A003714</a>, lists many ways of generating this sequence algorithmically, of which most are boring or slow (generate all binary numbers and test which ones belong to the sequence; you can test if a variable <code class="language-plaintext highlighter-rouge">x</code> is fibbinary by checking that <code class="language-plaintext highlighter-rouge">x&amp;(x&gt;&gt;1)</code> is zero). I thought it might be interesting to highlight two of those methods that are a little more clever and generate these numbers in small numbers of operations.</p> <p>Some functional languages, and in part Python even though it’s mostly not functional, have a notion of a stream, a potentially infinite sequence of values generated by a coroutine. In Python, you can program these using <a href="https://www.python.org/dev/peps/pep-0255/">simple generators</a> and the <code class="language-plaintext highlighter-rouge">yield</code> keyword. I wrote here long ago about <a href="/blog/2011/10/02/generating-permutations-with.html">methods for using generators recursively</a>: a generator can call itself, manipulate the resulting sequence of values, and pass them on to its output. It’s actually a very old idea, used for instance to generate <a href="https://en.wikipedia.org/wiki/Regular_number">regular numbers</a> by Dijkstra <a href="http://web.cecs.pdx.edu/~black/AdvancedProgramming/Lectures/Smalltalk%20II/Dijkstra%20on%20Hamming%27s%20Problem.pdf">in his 1976 book <em>A Discipline of Programming</em></a>. Reinhard Zumkeller used the same idea to generate the fibbinary numbers in Haskell, based on the observation that the sequence of positive fibbinary numbers can be generated, starting from the number 1, by two operations, doubling smaller values or replacing a smaller value $$x$$ with $$4x+1$$. Here is is, translated into Python:</p> <figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="kn">from</span> <span class="nn">heapq</span> <span class="kn">import</span> <span class="n">merge</span> <span class="k">def</span> <span class="nf">affine</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">):</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">stream</span><span class="p">:</span> <span class="k">yield</span> <span class="n">x</span><span class="o">*</span><span class="n">a</span><span class="o">+</span><span class="n">b</span> <span class="k">def</span> <span class="nf">fibbinary</span><span class="p">():</span> <span class="k">yield</span> <span class="mi">1</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">merge</span><span class="p">(</span><span class="n">affine</span><span class="p">(</span><span class="n">fibbinary</span><span class="p">(),</span><span class="mi">2</span><span class="p">,</span><span class="mi">0</span><span class="p">),</span><span class="n">affine</span><span class="p">(</span><span class="n">fibbinary</span><span class="p">(),</span><span class="mi">4</span><span class="p">,</span><span class="mi">1</span><span class="p">)):</span> <span class="k">yield</span> <span class="n">x</span></code></pre></figure> <p>It’s elegant, but has a couple of minor flaws. First, it omits the number $$0$$, and while it can be modified to include $$0$$, the modifications make the code messier. But second, it takes more than a constant amount of time per element to generate each sequence element. A fibbinary number $$x$$ has to be generated from a sequence of smaller elements by repeated doubling and quadrupling, and that takes $$\log x$$ steps per element. Even if we assume those steps to take constant time each, generating the first $$n$$ elements in this way takes time $$\Theta(n\log n)$$. It’s better than the $$\Theta(n^{\log_\varphi 2})\approx n^{1.44}$$ that you would get from generate-and-test, but still not as good as we might hope for. One way to fix this would be to memoize the generator, so that the recursive calls look at a stored copy of the sequence generated by the outer call rather than generating the same sequence redundantly, but this again makes the code messier and also takes more storage than necessary.</p> <p>Instead, Jörg Arndt observed that you can generate each fibbinary number directly from the previous one by a process closely resembling binary addition. Adding one to a binary number sets the first available bit from zero to one, and zeros out all the smaller bits; here, a bit is available if it is already zero. Finding the next fibbinary number does the same thing, but with a different definition of availability: a bit is available if both it and the next larger bit are zero. We can find the available bit using binary addition on a modified word that fills in bits whose neighbor is nonzero. Using this idea, we can generate the fibbinary numbers in a constant number of bitwise binary word-level operations per number. Here it is again in Python, translated from Arndt’s C++ and simplified based on <a href="https://mathstodon.xyz/@efroach76/107037399683569338">a comment by efroach76</a>:</p> <figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="k">def</span> <span class="nf">fibbinary</span><span class="p">():</span> <span class="n">x</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">x</span> <span class="n">y</span> <span class="o">=</span> <span class="o">~</span><span class="p">(</span><span class="n">x</span> <span class="o">&gt;&gt;</span> <span class="mi">1</span><span class="p">)</span> <span class="n">x</span> <span class="o">=</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="n">y</span><span class="p">)</span> <span class="o">&amp;</span> <span class="n">y</span></code></pre></figure> <p>It’s even possible to use the same idea to generate the fibbinary numbers in a constant amortized number of bit-level operations per number, although this ends up being a little less efficient in practice because high-level languages end up translating all these bit operations into word operations anyway.</p> <figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="k">def</span> <span class="nf">fibbinary</span><span class="p">():</span> <span class="n">x</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">x</span> <span class="n">y</span> <span class="o">=</span> <span class="mi">1</span> <span class="k">while</span> <span class="n">x</span> <span class="o">&amp;</span> <span class="p">(</span><span class="n">y</span> <span class="o">|</span> <span class="p">(</span><span class="n">y</span><span class="o">&lt;&lt;</span><span class="mi">1</span><span class="p">))</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span> <span class="n">x</span> <span class="o">&amp;=~</span> <span class="n">y</span> <span class="n">y</span> <span class="o">&lt;&lt;=</span> <span class="mi">1</span> <span class="n">x</span> <span class="o">|=</span> <span class="n">y</span></code></pre></figure> <p>The inner loop ends immediately at fibbinary numbers whose successor is odd (at positions given by the ones of the <a href="https://en.wikipedia.org/wiki/Fibonacci_word">Fibonacci word</a>), whose fraction of the total is $$1-1/\varphi\approx 0.382$$, where $$\varphi$$ is the golden ratio. It ends in two steps for the remaining values when their next bit is odd, in the same proportion, and so on. So the average number of steps for the inner loop adds in a geometric series to $$O(1)$$.</p> <p>(<a href="https://mathstodon.xyz/@11011110/107034017632258123">Discuss on Mastodon</a>)</p>David EppsteinI just added to Wikipedia two articles on the Jordan–Pólya numbers and fibbinary numbers, two integer sequences used in my recent paper on Egyptian fractions. Jordan–Pólya numbers are the products of factorials, while the fibbinary numbers are the ones with binary representations having no two consecutive 1’s. The OEIS page on the fibbinary numbers, A003714, lists many ways of generating this sequence algorithmically, of which most are boring or slow (generate all binary numbers and test which ones belong to the sequence; you can test if a variable x is fibbinary by checking that x&amp;(x&gt;&gt;1) is zero). I thought it might be interesting to highlight two of those methods that are a little more clever and generate these numbers in small numbers of operations.Linkage2021-09-30T11:57:00+00:002021-09-30T11:57:00+00:00https://11011110.github.io/blog/2021/09/30/linkage<ul> <li> <p><a href="https://www.insidehighered.com/news/2021/09/15/pearson-sues-former-partner-chegg-copyright-infringement">Textbook company Pearson sues Chegg for copyright infringement, for selling solutions to textbook homework problems</a> (<a href="https://mathstodon.xyz/@11011110/106945803113477254">$$\mathbb{M}$$</a>). On the one hand, for-profit cheater-enablers like Chegg are a cancer on higher education. On the other, the solution to a problem is generally a concept, not a text, and should not be something that can be locked up under copyright. So I don’t know who to root for?</p> </li> <li> <p><a href="https://www.insidehighered.com/news/2021/09/13/future-academic-conference"><em>Inside Higher Ed</em> on the future of academic conferences</a> (<a href="https://mathstodon.xyz/@11011110/106951348197294218">$$\mathbb{M}$$</a>). A significant fraction of academics surveyed said that they still felt unsafe going to physical conferences, and with the carbon footprint and reduced expenses of virtual but greater interactivity of physical meetings, some mix of both seems likely going forward. However, trying to mix both in one conference (especially for conferences with many parallel small talks or panels) seems difficult and expensive.</p> </li> <li> <p><a href="https://www.kennethmoreland.com/color-advice/">Color map advice for scientific visualization</a> (<a href="https://mathstodon.xyz/@11011110/106955479284414863">$$\mathbb{M}$$</a>, <a href="https://news.ycombinator.com/item?id=28579720">via</a>).</p> </li> <li> <p>Three sets of talk slides from recent talks (<a href="https://mathstodon.xyz/@11011110/106962519567502209">$$\mathbb{M}$$</a>):</p> <ul> <li> <p><a href="https://www.ics.uci.edu/~eppstein/pubs/Epp-WG-21-slides.pdf">The graphs of stably matchable pairs, <em>WG 2021</em></a></p> </li> <li> <p><a href="https://www.ics.uci.edu/~eppstein/pubs/Epp-WADS-21-slides.pdf">A stronger lower bound on parametric minimum spanning trees, <em>WADS 2021</em></a></p> </li> <li> <p><a href="https://www.ics.uci.edu/~eppstein/pubs/Epp-GD-21-slides.pdf">Limitations on realistic hyperbolic graph drawing, <em>GD 2021</em></a></p> </li> </ul> <p>Unfortunately I don’t have links to recordings of the talks.</p> </li> <li> <p>I thought for sure I had posted before about <a href="https://www.thisiscolossal.com/2017/09/bold-new-geometric-cake-designs-by-dinara-kasko/">Dinara Kasko’s 3d-printed geometric food designs</a> (<a href="https://mathstodon.xyz/@11011110/106968564827718278">$$\mathbb{M}$$</a>, <a href="https://culturainquieta.com/es/arte/diseno/item/12643-la-reposteria-matematica-de-la-arquitecta-dinara-kasko.html">see also</a>, <a href="https://dinarakasko.com/">home page</a>), but grep tells me that if I ever did, it wasn’t with her name.</p> </li> <li> <p>The <a href="https://zbmath.org/">zbMATH</a> mathematics review database was broken for a day (<a href="https://mathstodon.xyz/@11011110/106971763813682368">$$\mathbb{M}$$</a>), unable to show the old scans of printed reviews, but fortunately it got better.</p> </li> <li> <p><a href="https://www.youtube.com/watch?v=-p7C5FrgAzU">Twelve threads</a> (<a href="https://mathstodon.xyz/@11011110/106982013693223792">$$\mathbb{M}$$</a>). Vi Hart’s latest video mixes up discussions of the nature of social media, the philosophy of mathematical creativity, an exploration of symmetry, and an investigation of the spot patterns of 8-sided dice (which turn out not to all be the same) and how to visualize them.</p> </li> <li> <p><a href="https://mathstodon.xyz/@mathcination/106905943747555880">Visualization of Poncelet’s porism</a>, calculated with difficulty by mathcination from Cayley’s criteria. It would have been easier to calculate a regular hendecagram and then perturb it by a projective transformation, but that wasn’t the point.</p> </li> <li> <p>I recently saw a link to <a href="https://www.w3.org/TR/MathML3/chapter1.html">Chapter 1 of the MathML 3.0 spec</a> (<a href="https://mathstodon.xyz/@11011110/107002528612296323">$$\mathbb{M}$$</a>), using as an example the quadratic formula in both layout markup and content markup. Its totally unwieldy non-human-readable expansion obscures the fact that the MathML authors didn’t even get the math right: their content markup silently replaces the plus-minus sign, by which the correct formula represents both solutions, with an addition operation, giving only one of the two. Time to re-link my old <a href="/blog/2015/08/04/mathml-considered-harmful.html">anti-MathML rant</a>?</p> </li> <li> <p><a href="https://www.thisiscolossal.com/2021/09/hacer-origami-sculptures/">Giant origami animals in Midtown Manhattan</a> (<a href="https://mathstodon.xyz/@11011110/107007549470942566">$$\mathbb{M}$$</a>). But now I want to know if they were really each fabricated from a single uncut square sheet of steel. And if so, how did they get the corners so crisp?</p> </li> <li> <p><a href="https://www.getty.edu/publications/virtuallibrary/pdf/9780892363353.pdf"><em>The Topkapı Scroll – Geometry and Ornament in Islamic Architecture</em>, by Harvard professor Gülru Necipoğlu</a> <span style="white-space:nowrap">(<a href="https://mathstodon.xyz/@11011110/107017227413204703">$$\mathbb{M}$$</a>).</span> One of many beautiful art books free for download from the <a href="https://www.getty.edu/publications/virtuallibrary/">Getty Virtual Library</a>.</p> </li> <li> <p><a href="http://www.formulas.it/formulog/wp-content/uploads/2014/12/sierpinski-aplimat.pdf">Sierpiński triangles in stone, on medieval floors in Rome</a> (<a href="https://mathstodon.xyz/@11011110/107021612310283993">$$\mathbb{M}$$</a>), Elisa Conversano and Laura Tedeschini Lalli. See also Kim Williams, “<a href="https://doi.org/10.1007%2Fbf03024339">The pavements of the Cosmati</a>”. The <a href="https://commons.wikimedia.org/wiki/Category:Sierpi%C5%84ski_triangles_in_Cosmatesque_pavements">collection of images of these on Wikimedia commons</a> is a little sad — Conversano and Tedeschini Lalli, and Williams, have a lot more.</p> </li> <li> <p>Every invertible function computable both ways in polynomial time has polynomial-size reversible logic circuits, using extra “dummy” values that are zero on both input and output (<a href="https://mathstodon.xyz/@11011110/107024956502298623">$$\mathbb{M}$$</a>): See Jacopini, Mentrasti, &amp; Sontacchi, “<a href="https://doi.org/10.1137/0403020">Reversible turing machines and polynomial time reversibly computable functions</a>”, SIAM J. Disc. Math. 1990.</p> <p><em>Theorem:</em> No circuit of reversible gates of arity less than $$n$$, without dummy values, can compute $$n$$-bit 2’s-complement negation.</p> <p><em>Proof:</em> Each gate performs an even permutation on the $$2^n$$ inputs, but negation is an odd permutation. $$\Box$$</p> </li> </ul>David EppsteinTextbook company Pearson sues Chegg for copyright infringement, for selling solutions to textbook homework problems ($$\mathbb{M}$$). On the one hand, for-profit cheater-enablers like Chegg are a cancer on higher education. On the other, the solution to a problem is generally a concept, not a text, and should not be something that can be locked up under copyright. So I don’t know who to root for?Multilayer tiles2021-09-25T00:00:00+00:002021-09-25T00:00:00+00:00https://11011110.github.io/blog/2021/09/25/multilayer-tiles<p>You’re probably familiar with the fact that you can draw a convex octagon with corners in an integer grid, fitting into a $$3\times 3$$ square. It’s not regular, because its side lengths alternate between $$1$$ and $$\sqrt 2$$, but it has the same angles as a regular octagon and looks close enough to it for some purposes.</p> <p style="text-align:center"><img src="/blog/assets/2021/7way-octagon.svg" alt="3x3 integer octagon and its 7-ply tiling of the plane" /></p> <p>It also has another interesting property: if you place copies of it at every point of the integer grid, then each edge of each copy is also the edge of another copy. Therefore, if you let $$p$$ be any point that avoids the edges of the octagons, count the number of octagons that cover any point of the plane, and then slide $$p$$ around to another edge-avoiding point, the number of covering octagons always stays unchanged. Whenever $$p$$ slides off from one octagon, it slides onto another one. Because the area of the integer octagon is seven units, and you’re placing one octagon for every unit square of the grid, the average covering depth is seven. And since the covering depth stays the same everywhere, it’s seven everywhere. You can think of this collection of octagons as forming a <span style="white-space:nowrap">$$7$$-ply</span> tiling of the plane, despite the fact that convex octagons cannot tile the plane in the usual $$1$$-ply sense of tiling.</p> <p>More generally, define a $$k$$-ply tiling to be a covering of the plane by congruent copies of some prototile (allowing rotations, even though these are not necessary for the octagon) such that, except at a subset of the plane of measure zero (the boundaries of the prototiles), every point is covered by exactly $$k$$ copies, and define the “ply” of a prototile to be the minimum $$k$$ such that it has a $$k$$-ply tiling. The integer octagon has <span style="white-space:nowrap">ply $$7$$:</span> once one octagon is placed anywhere in the plane, the rest of the tiling is forced to follow in the same way around it, in order to avoid creating seams where an octagon edge is not matched by another octagon and the ply changes. The same construction, using centrally symmetric octagons with integer vertices and longer sides, produces for any $$k\ge9$$ a convex tile of <span style="white-space:nowrap">ply $$k$$.</span></p> <p>This is the subject of my new short paper (or maybe extended abstract) “Multifold tiles of polyominoes and convex lattice polygons”, with many coauthors from the 2017 Bellairs Winter Workshop on Computational Geometry: Kota Chida, Erik Demaine, Martin Demaine, Adam Hesterberg, Takashi Horiyama, John Iacono, Hiro Ito, Stefan Langerman, Ryuhei Uehara, and Yushi Uno. You can find it in the <a href="http://www.math.science.cmu.ac.th/tjcdcggg/Book-abstract.pdf">book of abstracts of the 23rd Thailand–Japan Conference on Discrete and Computational Geometry, Graphs, and Games (TJCDCG<sup>3</sup> 2020+1)</a>, which was organized online by Chiang Mai University earlier this month.</p> <p>As well as the family of octagon $$k$$-ply tilers described above, we found that cutting the bottom row of squares off a $$3\times 3$$ octagon produces a $$5$$-ply hexagon tiler, this time requiring $$180^\circ$$-degree rotations for its tiling, and that stretching this hexagon can produce an <span style="white-space:nowrap">$$8$$-ply</span> convex tiler. We also found polyomino <span style="white-space:nowrap">$$k$$-ply</span> tilers for <span style="white-space:nowrap">all $$k\ge 2$$,</span> and three heptominoes (the smallest possible polyominoes) that can each form <span style="white-space:nowrap">$$k$$-ply</span> tilings for all $$k\ge 2$$ but not for <span style="white-space:nowrap">$$k=1$$.</span> I imagine the details will become available in a more complete paper at some point but for now the abstract just announces these results and gives pictures of these heptominoes. We still don’t know whether there can exist convex polygons whose ply is one of <span style="white-space:nowrap">$$\{2,3,4,6\}$$.</span></p> <p>The TJCDCG<sup>3</sup> abstract book has many other intriguing results in discrete geometry, graph theory, and combinatorial game theory, so do check it out if you’re interested. Tiling-related highlights include a variation on Wang tiling adding connectivity constraints and inspired by a dungeon-making mini-game in <em>The Legend of Zelda: Link’s Awakening</em> (“Tiling the Plane Connectively with Wang Tiles”, Chao Yang), signal processing using high-dimensional substitution tilings (“Generating Frames via Discretized Substitution Tilings”, Luis S. Silvestre Jr. and Job A. Nable), a partial classification of edge-to-edge monohedral tilings of the sphere (“Tiling of the Sphere by Congruent Polygons”, Yohji Akama, Hoi Ping Luk, Erxiao Wang, and Min Yan), and tilings that can be used to make arrays of joined-up origami cranes (“Renzuru Tilings with Asymmetric Quadrilaterals”, Takashi Yoshino).</p> <p>(<a href="https://mathstodon.xyz/@11011110/106995035140693185">Discuss on Mastodon</a>)</p>David EppsteinYou’re probably familiar with the fact that you can draw a convex octagon with corners in an integer grid, fitting into a $$3\times 3$$ square. It’s not regular, because its side lengths alternate between $$1$$ and $$\sqrt 2$$, but it has the same angles as a regular octagon and looks close enough to it for some purposes.Which integer sequences form denominators of Egyptian fractions?2021-09-24T15:47:00+00:002021-09-24T15:47:00+00:00https://11011110.github.io/blog/2021/09/24/which-integer-sequences<p>I have a new paper out: “<a href="https://cs.uwaterloo.ca/journals/JIS/VOL24/Eppstein/eppstein2.html">Egyptian Fractions with Denominators from Sequences Closed Under Doubling</a>”, in the <em>Journal of Integer Sequences</em>. (There should also be an arXiv version soon but despite my long association with arXiv they made me get an endorser before I could upload to the number theory category, slowing down my submission there.)</p> <p>Anyway, it’s basically a journal version of an old blog post here, “<a href="/blog/2016/11/20/egyptian-fractions-with.html">Egyptian fractions with practical denominators</a>”. That post concerned the <a href="https://en.wikipedia.org/wiki/Practical_number">practical numbers</a>, positive integers $$n$$ such that all other positive integers up to $$n$$ can be represented as sums of distinct divisors of $$n$$. This definition gives the practical numbers a natural connection to <a href="https://en.wikipedia.org/wiki/Egyptian_fraction">Egyptian fractions</a>, representations of rational numbers as sums of distinct unit fractions: if you represent a number $$k&lt;n$$ by a sum of distinct divisors of $$n$$, and then divide everything by $$n$$, you get an Egyptian fraction for $$k/n$$. Zhi-Wei Sun asked whether the practical numbers and Egyptian fractions were connected in a different way, with every positive integer having an Egyptian fraction representation in which all denominators are practical, and my blog post provides a positive answer to Sun’s question.</p> <p>The new paper simplifies the presentation of the solution, compared to the blog post, by providing direct formulas for the representation rather than an iterative computational method for finding it. But beyond that, it also shows that the same method (based on dividing by a large power of two and dealing separately with the quotient and remainder) works for many other integer sequences beyond the practical numbers. All it needs from an integer sequence is two simple properties:</p> <ul> <li> <p>The sequence should include a multiple of every integer. In order to represent $$k/p$$ as an Egyptian fraction, when $$p$$ is prime, the denominators must include at least one multiple of $$p$$, so the requirement of including multiples is pretty natural in this context.</p> </li> <li> <p>For every number $$n$$ that belongs to the sequence, $$2n$$ should also belong to the sequence. This is the “closed under doubling” of the new article’s title, and is closely connected to the method used by the article involving division by powers of two.</p> </li> </ul> <p>Whenever a sequence $$S$$ of positive integers has both properties, we can find Egyptian fractions for all positive rationals up to $$\sum_{x\in S}1/x$$, the natural limiting value for such representations. When $$\sum_{x\in S}1/x$$ diverges, we get all positive rationals. As well as the practical numbers, this works for some other nice sequences including the <a href="https://en.wikipedia.org/wiki/Odious_number">odious</a> and <a href="https://en.wikipedia.org/wiki/Evil_number">evil</a> numbers, the <a href="https://oeis.org/A001013">orders of isomorphism groups of trees</a>, and the <a href="https://oeis.org/A003714">fibbinary numbers</a>, numbers whose binary representation avoids consecutive ones. Because they’re based on binary representations, the doubling property of odious, evil, and fibbinary numbers follows from their definitions; the existence of multiples of other integers in these sequences is less obvious but was more or less already known. Isomorphism groups of trees have orders that are the products of factorials, from which (because 2 is a factorial and $$n!$$ is a multiple of $$n$$) both properties follow immediately.</p> <p>Although these two properties are sufficient for a sequence to form Egyptian fractions for rationals up to its natural limit, they are not necessary. Ron Graham’s PhD dissertation was on the same topic, and showed that the sequence of squares greater than one has the same property. (The sequence of all squares, including one, is a little more complicated: its sums of distinct reciprocals can represent all rationals in the intervals $$[0,\pi^2/6-1)$$ and $$[1,\pi^2/6)$$ but can’t cover the gap between these two intervals.) Characterizing which sequences do or do not form representations of this type more generally seems like an interesting question, but one that I don’t have much idea how to attack at this point.</p> <p>(<a href="https://mathstodon.xyz/@11011110/106989108978976649">Discuss on Mastodon</a>)</p>David EppsteinI have a new paper out: “Egyptian Fractions with Denominators from Sequences Closed Under Doubling”, in the Journal of Integer Sequences. (There should also be an arXiv version soon but despite my long association with arXiv they made me get an endorser before I could upload to the number theory category, slowing down my submission there.)Linkage2021-09-15T14:57:00+00:002021-09-15T14:57:00+00:00https://11011110.github.io/blog/2021/09/15/linkage<ul> <li> <p>Does anyone but me find it odd that <a href="https://en.wikipedia.org/wiki/Tire_code">car tire sizes</a> are measured in millimeters for width, inches for inner radius, and a dimensionless number expressed as a percentage for (difference between inner and outer radius)/width <span style="white-space:nowrap">(<a href="https://mathstodon.xyz/@11011110/106864082094813780">$$\mathbb{M}$$</a>)?</span> Imagine the fun if we tried to do solid geometry this way.</p> </li> <li> <p><a href="https://aas.org/press/aas-journals-open-access">American Astronomical Society switches to open source for all its journals</a> (<a href="https://mathstodon.xyz/@11011110/106871073920675993">$$\mathbb{M}$$</a>, <a href="https://news.ycombinator.com/item?id=28379917">via</a>). The fine print is a <a href="https://journals.aas.org/oa/#charge_comparison">hefty &gt;\$1000-paper publication charge</a> with only a vague hope of waivers for some journals and not even that for one of them. Publication is not without cost, but comparing this with the <a href="https://www.dagstuhl.de/en/publications/lipics/processing-charge/">actual-cost €60/paper charges of LIPIcs</a> suggests that there’s a lot of profit/overhead built into the AAS fees.</p> </li> <li> <p>You may have heard that <a href="https://www.math3ma.com/blog/fibonacci-sequence">Fibonacci numbers form a meet-semilattice under divisibility, and that the map from $$n$$ to $$F_n$$ is a meet-semilattice homomorphism</a> (<a href="https://mathstodon.xyz/@11011110/106880573772645015">$$\mathbb{M}$$</a>). But did you know they’re actually a lattice, almost the same as the positive integer divisibility lattice (an infinite-dimensional grid with a dimension per prime), but missing one element at the index $$2$$ (because $$F_2=F_1=1$$)? Unfortunately, because of the missing grid element, $$F$$ is not a lattice homomorphism.</p> <p style="text-align:center"><img src="/blog/assets/2021/Fibonacci-divisibility.svg" alt="Divisibility lattice of Fibonacci numbers" /></p> </li> <li> <p><a href="https://arxiv.org/abs/2109.00022">Point sets with no four collinear and no large visible island</a> (<a href="https://mathstodon.xyz/@11011110/106883568827068806">$$\mathbb{M}$$</a>). If you project a $$3\times 3\times \cdots\times 3$$ grid linearly into the plane, for a generic projection, then there are no four points in a row. But if you choose the projection carefully, you can get another property: every convex subset of the plane that hits more than a constant number of points includes at least one three-point line. New preprint by UCSD undergrad Sophie Leuchtner and Andrew Suk.</p> </li> <li> <p><a href="https://britishorigami.info/lister/egypt.php">Possibly the earliest known example of folding</a> (<a href="https://mathstodon.xyz/@11011110/106889063469591427">$$\mathbb{M}$$</a>): an Egyptian map from over 3000 years ago. The link unfortunately lacks pictures but they can be found on <a href="https://en.wikipedia.org/wiki/Turin_Papyrus_Map">the Wikipedia article on the same map</a>, which however suggests an alternative hypothesis than folding for its markings.</p> </li> <li> <p><a href="https://retractionwatch.com/2021/09/07/authors-object-after-springer-nature-journal-cedes-to-publisher-frontiers-demand-for-retraction/">Springer journal <em>Scientometrics</em> retracts a journal paper on predatory publishing after predatory publisher Frontiers objects to its use of a list of predatory publishers that lists Frontiers as a predatory publisher</a> (<a href="https://mathstodon.xyz/@11011110/106891442309422502">$$\mathbb{M}$$</a>). A followup comment connects the dots: “Notably, Springer owns a stake in Frontiers, although they rarely mention this publicly”. Editors of the Springer journal call the retraction misconduct and consider resigning from its board in protest.</p> </li> <li> <p><a href="https://www.getrevue.co/profile/shift-happens/issues/moire-no-more-688319">Removing halftoning artifacts from images by FFT+masking</a> (<a href="https://mathstodon.xyz/@11011110/106900166239796915">$$\mathbb{M}$$</a>, <a href="https://www.metafilter.com/192541/pure-old-fashioned-math-and-science">via</a>). A nice illustration of how the right piece of mathematics can seem like “some sort of witchcraft that should not be possible”. The original uses a piece of software I haven’t used called <a href="https://imagej.net/software/fiji/">Fiji</a>, but there’s also <a href="http://ft.rognemedia.no/">the “Pattern Suppressor” Photoshop plugin for similar manipulations</a>.</p> </li> <li> <p><a href="https://www.wired.com/story/one-womans-mission-to-rewrite-nazi-history-wikipedia/">Ksenia Coffman’s work stomping out Nazi-glorification on Wikipedia</a> (<a href="https://mathstodon.xyz/@11011110/106905799003035925">$$\mathbb{M}$$</a>, <a href="https://www.metafilter.com/192594/One-Womans-Mission-to-Rewrite-Nazi-History-on-Wikipedia">see also</a>).</p> </li> <li> <p><a href="https://www.quantamagazine.org/new-math-book-rescues-landmark-topology-proof-20210909/">Quanta has a new article</a> (<a href="https://mathstodon.xyz/@11011110/106911678317985799">$$\mathbb{M}$$</a>, <a href="https://mathoverflow.net/questions/87674/independent-evidence-for-the-classification-of-topological-4-manifolds">see also</a>) on the book <em>The Disc Embedding Theorem</em> by Behrens, Kalmar, Kim, Powell, and Ray, attempting to clarify Freedman’s early-1980s 4-manifold classification, which many found insufficiently rigorous. But it’s not the only book on this; there’s also Calegari’s <a href="https://math.uchicago.edu/~dannyc/books/4dpoincare/4dpoincare.html"><em>The 4-Dimensional Poincaré Conjecture</em></a>, and Freedman’s <em>Topology of 4-manifolds</em> (with Frank Quinn, 1990). Third time’s the charm?</p> </li> <li> <p><a href="https://thereader.mitpress.mit.edu/perils-of-publication-and-citation-bias/">Citation bias</a> (<a href="https://mathstodon.xyz/@11011110/106917424161901510">$$\mathbb{M}$$</a>): how the tendency to cite certain types of results over others (e.g. positive more than negative) and academic games of telephone can herd the research community towards a distorted view of what the scientific record has actually established.</p> </li> <li> <p>The annual Graph Drawing symposium really loves hybrid formats (<a href="https://mathstodon.xyz/@11011110/106921800901735764">$$\mathbb{M}$$</a>). <a href="https://algo.inf.uni-tuebingen.de/gd2021/">This year’s symposium</a> will be held this Wednesday through Friday as a hybrid of a small in-person meeting in Tübingen and online for those like me still not traveling. And, as in past years, the proceedings is a hybrid of a Springer LNCS volume (not yet out) and <a href="https://arxiv.org/abs/2109.04863">an arXiv copy, newly up at arXiv:2109.04863</a>. If anything the arXiv version is better: more timely, with appendices and color both allowed.</p> </li> <li> <p><a href="https://www.bridgetownrb.com/future/rip-jekyll/">Death of the Jekyll static site generator proclaimed</a> (<a href="https://mathstodon.xyz/@11011110/106928704495143550">$$\mathbb{M}$$</a>, <a href="https://news.ycombinator.com/item?id=28514029">via</a>), because of some open source politics I don’t understand. Meanwhile for those of us using it as a static site generator and github-pages blog springboard, Jekyll still largely just works as it always has without much need for development. Indeed, a big reason for the lack of momentum for going from Jekyll 3 to 4 is that it was an unnecessary incompatible update that would have broken too much stuff.</p> </li> <li> <p><a href="https://www.thomasclausen.net/en/but-this-is-a-weird-bibliography/">Why would someone plagiarize the bibliography of their journal paper</a> (<a href="https://mathstodon.xyz/@11011110/106934028229929325">$$\mathbb{M}$$</a>), by copying someone else’s bibliography on a totally unrelated topic, in an inconsistent format to the references in the main text of the paper (no doubt copied from somewhere else)? Thomas Clausen looks more deeply than necessary at the garbage pile that is predatory publishing, triggered by an odd citation alert.</p> </li> <li> <p><a href="https://en.wikipedia.org/wiki/Existential_theory_of_the_reals">$$\exists\mathbb{R}$$, the problem of testing the existence of solutions to polynomial real equations</a> is only a little harder than $$\mathsf{NP}$$, but $$\exists\mathbb{Z}$$ is undecidable (Matiyasevich). Today I learned from <a href="https://arxiv.org/abs/2107.11663">Marcus Schaefer’s GD talk</a> that <a href="https://en.wikipedia.org/wiki/RAC_drawing">right-angle-crossing graph drawing</a> is $$\exists\mathbb{R}$$-complete but that requiring in addition that the vertices have integer coordinates makes it $$\exists\mathbb{Q}$$-complete (<a href="https://mathstodon.xyz/@11011110/106936348796765483">$$\mathbb{M}$$</a>). That means we don’t know whether it’s decidable!</p> </li> </ul>David EppsteinDoes anyone but me find it odd that car tire sizes are measured in millimeters for width, inches for inner radius, and a dimensionless number expressed as a percentage for (difference between inner and outer radius)/width ($$\mathbb{M}$$)? Imagine the fun if we tried to do solid geometry this way.Congratulations, Dr. Maxwell!2021-09-01T17:49:00+00:002021-09-01T17:49:00+00:00https://11011110.github.io/blog/2021/09/01/congratulations-dr-maxwell<p>I took part today in the successful dissertation defense of Will Maxwell, a student of Amir Nayyeri and Cora Borradaile at Oregon State University. Will has also visited me at UC Irvine, and I’ve worked with him on two papers, on <a href="/blog/2020/04/19/stretch-average-stretch.html">low-stretch spanning trees</a> and <a href="/blog/2020/05/03/hanoi-vs-sierpinski.html">Hanoi graph treewidth</a>. But his dissertation has a different focus, his work on generalizations of graph algorithms to higher-dimensional topological spaces.</p> <p>The main idea can be seen in Will’s paper “<a href="https://doi.org/10.4230/LIPIcs.SoCG.2020.21">Minimum bounded chains and minimum homologous chains in embedded simplicial complexes</a>” (with Cora and Amir, at the 2020 Symposium on Computational Geometry), on topological generalizations of unweighted shortest paths in graphs. An <a href="https://en.wikipedia.org/wiki/Abstract_simplicial_complex">abstract simplicial complex</a> is just a family of finite sets closed under taking subsets, where we think of each set of $$d+1$$ elements as defining a $$d$$-dimensional <a href="https://en.wikipedia.org/wiki/Simplex">simplex</a>. From this point of view, an undirected graph is just a 1-dimensional simplicial complex, with 1-element subsets for its vertices and 2-element subsets for its edges. A set of $$d$$-dimensional simplices is called a $$d$$-chain (in mod-2 homology), and its boundary is a chain one dimension lower. For instance, a path in a graph has its two endpoints as its boundary, and the shortest path problem asks for the minimum-cardinality 1-chain having two given points as its boundary. More generally the <a href="https://en.wikipedia.org/wiki/Route_inspection_problem">T-join problem</a> asks for a 1-chain having any given 0-chain as its boundary.</p> <p>The SoCG paper generalizes this problem in two ways. You can either ask for the minimum <span style="white-space:nowrap">$$k$$-chain</span> with a given <span style="white-space:nowrap">$$(k-1)$$-chain</span> as boundary (the “minimum bounded chain” of the first part of the title), or you can ask for the minimum <span style="white-space:nowrap">$$k$$-chain</span> that shares a boundary with a given <span style="white-space:nowrap">$$k$$-chain</span> and belongs to the same homology class (the second part of the title). Both are $$\mathsf{NP}$$-complete and hard to approximate, even for $$k$$-dimensional complexes that are embedded into $$(k+1)$$-dimensional space (analogous to planar graphs). However, they can be approximated to within a $$\sqrt{\log n}$$ approximation ratio, and solved exactly in fixed-parameter tractable time. Both the positive and negative results involve translations to and from minimum cut completion, the problem of finding a cut that is as close as possible to a given edge set, on a dual graph of the embedding of the complex.</p> <p>This use of the dual prevents these algorithms from applying to abstract complexes that are not embedded. And testing whether a complex can be embedded into a space of one higher dimension is itself a hard problem: $$\mathsf{NP}$$-hard for 2-complexes and undecidable for sufficiently higher dimensions. But it turns out that some abstract complexes can have duals even when they cannot be embedded: as Will’s dissertation observes, a dual graph exists whenever homology defines a <a href="https://en.wikipedia.org/wiki/Graphic_matroid">cographic matroid</a> on the $$k$$-simplices, a condition that generalizes <a href="https://en.wikipedia.org/wiki/Mac_Lane%27s_planarity_criterion">Mac Lane’s planarity criterion</a> and can be tested in polynomial time.</p> <p>A newer paper, “<a href="https://doi.org/10.4230/LIPIcs.ESA.2021.69">Generalized max-flows and min-cuts in simplicial complexes</a>” (with Amir), appears at this year’s European Symposium on Algorithms. It performs a similar translation from the maximum flow and minimum cut problems on graphs to analogous problems on simplicial complexes. The generalized problems are defined in a way allowing them to be solved by linear programs, with the flow LP dual to the cut LP, so a version of the max flow min cut theorem applies automatically to this generalization. However, unlike graph max flow and min cut problems, the solutions are not always integral, and finding an optimal integral solution is $$\mathsf{NP}$$-hard.</p> <p>The SoCG 2020 and ESA 2021 papers form two chapters in the dissertation, with a final chapter on a third direction of generalization that appears not to be public yet. After finalizing his dissertation, Will will be heading to Washington, DC to work as a Department of Defense researcher on (non-classified) applications of topological computation in artificial intelligence.</p> <p>Congratulations, Will!</p> <p>(<a href="https://mathstodon.xyz/@11011110/106859447279378949">Discuss on Mastodon</a>)</p>David EppsteinI took part today in the successful dissertation defense of Will Maxwell, a student of Amir Nayyeri and Cora Borradaile at Oregon State University. Will has also visited me at UC Irvine, and I’ve worked with him on two papers, on low-stretch spanning trees and Hanoi graph treewidth. But his dissertation has a different focus, his work on generalizations of graph algorithms to higher-dimensional topological spaces.Linkage2021-08-31T16:46:00+00:002021-08-31T16:46:00+00:00https://11011110.github.io/blog/2021/08/31/linkage<ul> <li> <p>Finding a stationary point of a smooth function (as can be done, eventually, by gradient descent) is complete for $$\mathsf{PPAD}\cap\mathsf{PLS}$$ (<a href="https://mathstodon.xyz/@11011110/106772538573678641">$$\mathbb{M}$$</a>, <a href="https://www.quantamagazine.org/computer-scientists-discover-limits-of-major-research-algorithm-20210817/">via</a>) as Fearnley, Goldberg, Hollender, and Savani write in STOC 2021 best paper “<a href="https://arxiv.org/abs/2011.01929">The complexity of gradient descent</a>”. Gradient descent finds local minima quickly in many cases, but can be slow to navigate shallow labyrinthine optimization landscapes; this result suggests that there are unlikely to be much better shortcuts.</p> </li> <li> <p><a href="https://en.wikipedia.org/wiki/Dyadic_rational">Dyadic rational</a> (<a href="https://mathstodon.xyz/@11011110/106779193515008360">$$\mathbb{M}$$</a>), the fractions whose denominators are powers of two. These are among the earliest concepts of fractions to develop in schoolchildren, frequently used in systems of weights and measures, and (because they are the ones with finite binary representations) central to computing. Now a Good Article on Wikipedia.</p> </li> <li> <p><a href="https://www.ams.org/journals/notices/20210">Pentagonum pentagonorum</a> (<a href="https://mathstodon.xyz/@11011110/106789568903344596">$$\mathbb{M}$$</a>). The space of shapes of convex equiangular pentagons itself forms a right equilateral pentagon in a hyperbolic plane of self-crossing pentagon shapes, and its tiling by edge-reflections corresponds to moves that add or remove a “bowtie” on a pentagon edge. Other choices of fixed angles give other right hyperbolic pentagons, parameterized by a pentagon of pentagons of pentagons. New “short story” by Danny Calegari in the <em>Notices</em>.</p> </li> <li> <p><a href="https://www.scientificamerican.com/article/a-deep-math-dive-into-why-some-infinities-are-bigger-than-others/">A deep math dive into why some infinities are bigger than others</a> (<a href="https://mathstodon.xyz/@11011110/106796347455729012">$$\mathbb{M}$$</a>, <a href="https://3quarksdaily.com/3quarksdaily/2021/08/a-deep-math-dive-into-why-some-infinities-are-bigger-than-others.html">via</a>). Martin Goldstern and Jakob Kellner carefully explore the relations between certain infinite cardinalities, all more than countable but at most the cardinality of the continuum, defined using measure-zero and nowhere-dense subsets of the plane.</p> </li> <li> <p>Australian Research Council unexpectedly nukes any applicants for Future Fellowships and Discovery Early Career Researcher Awards who had the temerity to cite “preprints”, anywhere in their proposals, defined as pre-peer-review versions of journal papers but interpreted more broadly to cover reviewed pre-publication versions, tech reports, white papers, etc: <a href="https://www.timeshighereducation.com/news/heartbreak-research-careers-ruined-australian-rule-tweak"><em>Times Higher Education</em></a>, <a href="https://www.theguardian.com/education/2021/aug/20/devastating-career-event-scientists-caught-out-by-change-to-australian-research-council-fine-print"><em>Guardian</em></a>, <a href="https://www.researchprofessionalnews.com/rr-news-australia-government-agencies-2021-8-fury-mounts-over-arc-grants/"><em>Research Professional News</em></a>, <a href="https://twitter.com/ARC_Tracker/status/1428120670391603200"><em>ARC Tracker</em></a> <span style="white-space:nowrap">(<a href="https://mathstodon.xyz/@11011110/106803003708416295">$$\mathbb{M}$$</a>).</span></p> </li> <li> <p><a href="https://www.instagram.com/p/CSv1fVtjCbX/">A tiling of the plane by center-hinged pairs of equilateral triangles, connected at their corners, expands into a different tiling by stars, hexagons, and diamonds</a> (<a href="https://mathstodon.xyz/@11011110/106809169136660230">$$\mathbb{M}$$</a>, <a href="https://www.metafilter.com/192397/Friday-foldy-fun">via</a>).</p> </li> <li> <p><a href="https://nitter.fdn.fr/AngelikiKoutso1/status/1428795625974468623">Euclidean Geometry Street</a> (<a href="https://mathstodon.xyz/@antoinechambertloir/106810914210492431">$$\mathbb{M}$$</a>), a street in Greece decorated with geometry diagram street art.</p> </li> <li> <p><a href="https://www.cantorsparadise.com/playing-with-geometry-imo-2021-problem-4-4e534ae98146">Two equal-length quadrilaterals from a tangential quadrilateral</a> (<a href="https://mathstodon.xyz/@11011110/106826806266178026K">$$\mathbb{M}$$</a>): IMO 2021 Problem 4 explained with the help of some dynamic geometry software, by Russell Lim.</p> </li> <li>While beefing up the Wikipedia article on the handshaking lemma in graph theory (<a href="https://mathstodon.xyz/@11011110/106832642233608294">$$\mathbb{M}$$</a>), I chanced on <a href="https://www.semanticscholar.org/topic/Handshaking-lemma/637997">the Semantic Scholar page of “papers important to this topic”, supposedly extracted by artificial intelligence</a>. I see: <ul> <li>The 3-vertex model in physics</li> <li>A relevant review on general topics in graph theory</li> <li>Household goods in China</li> <li>Sociolinguistics of sexuality</li> <li>Paths on meshes (maybe relevant?)</li> <li>Workplace trust</li> <li>Famous cases of asthma</li> <li>Arthropod DNA</li> </ul> <p>Moral: AI is hard!</p> </li> <li> <p><a href="https://theconversation.com/excel-autocorrect-errors-still-plague-genetic-research-raising-concerns-over-scientific-rigour-166554">Among recent genetics papers using Excel spreadsheets for their data, roughly 30% contained autocorrect errors such as conversion of non-date text to dates, up from 20% in a 2016 study</a> (<a href="https://mathstodon.xyz/@11011110/106835013253564017">$$\mathbb{M}$$</a>, <a href="https://retractionwatch.com/2021/08/28">via</a>). “The lesson for researchers is clear: it’s past time to stop using Excel and learn to use more powerful software.”</p> </li> <li> <p><a href="https://arxiv.org/abs/2108.09832">Progress on universal covers for carpenter’s rules</a> (<a href="https://mathstodon.xyz/@11011110/106837942716544142">$$\mathbb{M}$$</a>), small-area diameter-1 shapes into which every polyline with segment lengths ≤ 1 can be folded. The new shape in this preprint by three Jiangs (at least one apparently a home-schooled high-schooler) kind of looks like the Starfleet emblem from Star Trek: a curvy triangle with a concave base and two convex sides. The sides are just involutes of the base; the harder part is finding the right base.</p> </li> <li> <p><a href="https://leosstemhacks.wordpress.com/2018/03/27/np-complete-3rd-grade-math-problems/">NP Complete 3rd Grade Math Problems</a> (<a href="https://mathstodon.xyz/@jhertzli/106836869097887100">$$\mathbb{M}$$</a>). A worksheet asks students to solve a subset sum problem with 279 valid solutions out of roughly 2 million possibilities. Maybe they expect the kids to code it on a computer?</p> </li> <li> <p>My new favorite xkcd: <a href="https://xkcd.com/2509/">some useful geometry formulas</a> (<a href="https://mathstodon.xyz/@11011110/106849244513165410">$$\mathbb{M}$$</a>).</p> </li> <li><a href="https://doi.org/10.1177/14614448211023772">Gender, notability, and inequality on Wikipedia</a> (<a href="https://mathstodon.xyz/@11011110/106853402792027473">$$\mathbb{M}$$</a>, <a href="https://en.wikipedia.org/wiki/Wikipedia:Wikipedia_Signpost/2021-08-29/In_the_media">via</a>). Study by Francesca Tripodi finds that biographies of women on Wikipedia face significantly greater pressure to be deleted than biographies of men, even when factoring out other variables by considering only the biographies that are eventually deemed worthy of inclusion.</li> </ul>David EppsteinFinding a stationary point of a smooth function (as can be done, eventually, by gradient descent) is complete for $$\mathsf{PPAD}\cap\mathsf{PLS}$$ ($$\mathbb{M}$$, via) as Fearnley, Goldberg, Hollender, and Savani write in STOC 2021 best paper “The complexity of gradient descent”. Gradient descent finds local minima quickly in many cases, but can be slow to navigate shallow labyrinthine optimization landscapes; this result suggests that there are unlikely to be much better shortcuts.Doomed apartments2021-08-18T16:46:00+00:002021-08-18T16:46:00+00:00https://11011110.github.io/blog/2021/08/18/doomed-apartments<p>The University of California, Irvine, maintains a sprawling faculty housing complex, <a href="https://en.wikipedia.org/wiki/University_Hills,_Irvine">University Hills</a>, in which I live, in order to make homes affordable in what would otherwise be a very expensive part of the country. Most of it is single-family homes, owned by faculty on long-term land leases, but it also has several clusters of rental units. The oldest of these, and the nearest to my office, is unimaginatively named Las Lomas (“the hills” in Spanish, a frequent language for California place names).</p> <p style="text-align:center"><img src="https://www.ics.uci.edu/~eppstein/pix/laslomas/C-m.jpg" alt="Las Lomas Apartments, UC Irvine" style="border-style:solid;border-color:black" /></p> <p>I haven’t spent a lot of time within Las Lomas, but I walk past it every time I go to work, as it’s the closest part of University Hills to my office. It’s mainly been used for short-term visitors: when Martin Nöllenburg was a postdoc, he lived there, and when Vijay Vazirani joined our department he stayed there until his house with Milena Mihail (who moved here a little later) became ready.</p> <p style="text-align:center"><img src="https://www.ics.uci.edu/~eppstein/pix/laslomas/G-m.jpg" alt="Las Lomas Apartments, UC Irvine" style="border-style:solid;border-color:black" /></p> <p>Already in December 2019, the university announced that it would demolish Las Lomas to make way for higher-density for-purchase faculty homes, even less imaginatively named “<a href="https://icha.uci.edu/area12/">Area 12</a>”. The last apartment residents were kicked out last Spring, and it’s been closed off to vehicles (but still open to pedestrians, with the grounds still maintained) since then. The most recent timeline I’ve seen has demolition scheduled to begin in November, with move-ins to the new homes ready in time for the 2023–2024 academic year. I’m not sure what it’s likely to end up looking like; the project site used to have two site plans (<a href="https://icha.uci.edu/wp-content/uploads/2020/04/ICHA-PA12-CONCEPTUAL-SITE-PLAN-EXHIBIT_2020-04-27-with-Ortho-Image-at-150dpi-1.pdf">1</a>, <a href="https://icha.uci.edu/wp-content/uploads/2020/04/PA12-illustrative-L1.1_Illustrative-Site-Plan-2.pdf">2</a>) and <a href="https://web.archive.org/web/20200922150048/https://icha.uci.edu/area12/">elevations</a> but they’re no longer linked and maybe no longer current.</p> <p>Because of its imminent demise, I made a project this summer of visiting Las Lomas and taking some photos. There are no residents, and some of the amenities have been slowly falling apart for lack of maintenance, but it still has a quiet residential feeling.</p> <p style="text-align:center"><img src="https://www.ics.uci.edu/~eppstein/pix/laslomas/K-m.jpg" alt="Las Lomas Apartments, UC Irvine" style="border-style:solid;border-color:black" /></p> <p><a href="https://www.ics.uci.edu/~eppstein/pix/laslomas/">The rest of the photo album</a>.</p> <p>(<a href="https://mathstodon.xyz/@11011110/106779815577019752">Discuss on Mastodon</a>)</p>David EppsteinThe University of California, Irvine, maintains a sprawling faculty housing complex, University Hills, in which I live, in order to make homes affordable in what would otherwise be a very expensive part of the country. Most of it is single-family homes, owned by faculty on long-term land leases, but it also has several clusters of rental units. The oldest of these, and the nearest to my office, is unimaginatively named Las Lomas (“the hills” in Spanish, a frequent language for California place names).