urn:lj:livejournal.com:atom1:110111100xDE0xDE0xDE2016-12-01T04:30:27Zurn:lj:livejournal.com:atom1:11011110:338897Linkage2016-12-01T04:30:27Z2016-12-01T04:30:27Z<ul><li><a href="http://rin.io/im-not-good-at-math/">"I'm not good at math",</a> car conversation with a 10-year-old girl about what math really is (illustrated, but with dubiously-reliable image hosting; <a href="https://plus.google.com/100003628603413742554/posts/iwVqxLz8zb9">G+</a>)</li><br /><li><a href="https://www.youtube.com/watch?v=ixduANVe0gg">Video on sphere eversion (based on a double-Klein-bottle trick) with a paperfolding challenge at the end</a> (<a href="https://plus.google.com/100003628603413742554/posts/T2eVjGWc5zE">G+</a>)</li><br /><li><a href="http://www.spoon-tamago.com/2016/11/14/graphic-wire-sculpture-mitsuru-koga/">Minimalist wire sculptures of 3d shapes by Mitsuru Koga</a> (<a href="https://plus.google.com/100003628603413742554/posts/GByPKZ7iF8a">G+</a>)</li><br /><li><a href="https://www.youtube.com/attribution_link?a=NPulBOW7ppI&u=%2Fwatch%3Fv%3DciM6wigZK0w%26feature%3Dshare">Video on hypersphere packing, and the strange behavior of hyperspheres inside hypercubes</a> (<a href="https://plus.google.com/100003628603413742554/posts/C3JnVvDPAHz">G+</a>)</li><br /><li><a href="http://www.forbes.com/sites/quora/2016/11/22/a-lesson-from-particle-physics-on-why-things-around-us-dont-start-randomly-liquefying/#2de554604309">What it takes to get systems of solid particles to act like a liquid: polishing them helps, but isn't enough by itself.</a> (<a href="https://plus.google.com/100003628603413742554/posts/cmrcL7pAXDH">G+</a>)</li><br /><li><a href="https://www.newscientist.com/article/2113283-crowdsourced-prime-number-could-help-solve-a-50-year-old-problem/">One of the six remaining candidates for the smallest odd k such that no number of the form k 2^n + 1 is prime has been knocked out</a> (<a href="https://plus.google.com/100003628603413742554/posts/HQqntgB9bCw">G+</a>)</li><br /><li><a href="https://plus.google.com/102991298250177867939/posts/RP4ZuNB9PyP">Mathematician Michel Deza has died</a> (<a href="https://plus.google.com/100003628603413742554/posts/SDK1QpLAHEH">G+</a>)</li><br /><li><a href="https://blog.wikimedia.org/2016/11/25/wiki-loves-earth-2016-winners/">The top fifteen winning photos from Wiki Loves Earth</a> (<a href="https://plus.google.com/100003628603413742554/posts/F2qwY955PWh">G+</a>)</li><br /><li><a href="http://aperiodical.com/2013/10/an-enneahedron-for-herschel/">The Herschel enneahedron</a>, a nice symmetric geometric realization of the simplest non-Hamiltonian polyhedron (<a href="https://plus.google.com/100003628603413742554/posts/C7PQvUReGrS">G+</a>)</li><br /><li><a href="https://www.youtube.com/watch?v=lUONqAJu8EQ">Antiparallelogram-based linkage traces out a three-lobed curve</a> (more linkage curves linked from <a href="https://plus.google.com/100003628603413742554/posts/5tDmEkjSAdL">G+</a>)</li><br /><li><a href="https://gowers.wordpress.com/2016/11/29/time-for-elsexit/">Secret deal for funneling UK university money to Elsevier</a> (<a href="https://plus.google.com/100003628603413742554/posts/BCfZzF4USSu">G+</a>)</li><br /><li><a href="https://arxiv.org/abs/1611.08740">On the number of ordinary lines determined by sets in complex space</a> (<a href="https://plus.google.com/100003628603413742554/posts/9PvAvuwbE11">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:338464Happy Thanksgiving2016-11-24T21:59:33Z2016-11-24T21:59:50ZHappy Thanksgiving to all. Here's a photo from a walk I took this morning at the San Joaquin Wildlife Sanctuary.<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/pix/sjws7/GreenStream-m.jpg" border="2" style="border-color:black;" /></div><br /><br /><a href="http://www.ics.uci.edu/~eppstein/pix/sjws7/">The gallery has a few more</a>.urn:lj:livejournal.com:atom1:11011110:338196Egyptian fractions with practical denominators2016-11-20T23:32:06Z2016-11-20T23:57:54ZWhile looking something else up on <a href="https://oeis.org/">OEIS</a> I ran across <a href="http://maths.nju.edu.cn/~zwsun/UnitFraction.pdf">a conjecture by Zhi-Wei Sun from September 2015</a> that every positive rational number has an Egyptian fraction representation in which every denominator is a <a href="https://oeis.org/A005153">practical number</a>. The conjecture turns out to be true; here's a proof.<br /><br />First, some background. An <a href="https://en.wikipedia.org/wiki/Egyptian_fraction">Egyptian fraction</a> is a representation of a given number as a sum of distinct unit fractions. And a <a href="https://en.wikipedia.org/wiki/Practical_number">practical number</a> is a number <i>n</i> such that all other numbers up to <i>n</i> can be represented by sums of distinct divisors of <i>n</i>. These two concepts were already connected: if <i>n</i> is practical then all fractions <i>m</i>/<i>n</i> have Egyptian fractions formed by representing <i>m</i> as a sum of divisors of <i>n</i> and then dividing each term of the sum by <i>n</i>. If <i>n</i> is not itself practical you can apply the same trick to <i>mp</i>/<i>np</i> where <i>p</i> is a large enough practical number (large enough to make <i>np</i> also be practical). But these methods don't control the divisors of the unit fractions that they produce, so they don't answer Sun's question.<br /><br />Instead, to prove Sun's conjecture, let's first restrict our attention to rationals <i>m</i>/<i>n</i> with <i>m</i> < <i>n</i> (we'll handle the rest later), and turn to a different method for generating Egyptian fractions, the <a href="http://www.ics.uci.edu/~eppstein/numth/egypt/binary.html">binary remainder method</a>. To make a more concrete example, let's use <i>m</i>/<i>n</i> = 117/129. The binary remainder method can be thought of as greedily removing power-of-two fractions:<br /><br />117/129<br />= 1/2 + 105/(2*129)<br />= 1/2 + 1/4 + 81/(4*17)<br />= 1/2 + 1/4 + 1/8 + 33/(8*17)<br />= 1/2 + 1/4 + 1/8 + 66/(16*17)<br />= 1/2 + 1/4 + 1/8 + 1/32 + 3/(32*17)<br />= 1/2 + 1/4 + 1/8 + 1/32 + (2+1)/(32*17)<br />= 1/2 + 1/4 + 1/8 + 1/32 + 1/2064 + 1/4128<br /><br />Each step in this sequence doubles the final denominator, and replaces the final numerator by its double mod <i>n</i>. For instance, in the third line above, 81 = 2*105 (mod 129). We include another power of two in the expansion whenever doubling the previous numerator causes it to exceed <i>n</i>, causing a nontrivial reduction mod <i>n</i>. So the numerators stay below <i>n</i>. Eventually we reach a point where the binary expansion of the numerator (its representation as a sum of powers of two, here 3=2+1) uses powers of two smaller than the ones in the denominator, and we can perform this expansion and stop.<br /><br />Unfortunately, this doesn't quite work for Sun's problem. The power-of-two fractions are practical, but the ones formed at the end from the binary expansion of the numerator might not be (although in this example they are). But there's an easy fix: continue greedily taking off powers of two until reaching a denominator of the form 2<sup><i>i</i></sup><i>n</i> where 2<sup><i>i</i></sup> > <i>n</i><sup>2</sup>/2. Then, when we do the binary expansion, each denominator of one of the resulting unit fractions will itself be of the form 2<sup><i>j</i></sup><i>n</i> where <i>j</i> is still large, large enough that 2<sup><i>j</i></sup> > <i>n</i>/2. This is a large enough power of two to make the denominator 2<sup><i>j</i></sup><i>n</i> be practical.<br /><br />Let's try this on another simple example:<br /><br />14/17<br />= 1/2 + 11/(2*17)<br />= 1/2 + 1/4 + 5/(4*17)<br />= 1/2 + 1/4 + 10/(8*17)<br />= 1/2 + 1/4 + 1/16 + 3/(16*17)<br />= 1/2 + 1/4 + 1/16 + 6/(32*17)<br />= 1/2 + 1/4 + 1/16 + 12/(64*17)<br />= 1/2 + 1/4 + 1/16 + 1/128 + 7/(128*17)<br />= 1/2 + 1/4 + 1/16 + 1/128 + 14/(256*17)<br />= 1/2 + 1/4 + 1/16 + 1/128 + (8+4+2)/(256*17)<br />= 1/2 + 1/4 + 1/16 + 1/128 + 1/544 + 1/1088 + 1/2176<br /><br />We didn't stop at 5/(4*17) and expand it into (4+1)/(4*17) = 1/17 + 1/68 because those denominators are impractical. Instead we waited until reaching a big enough power of two (256 > 17<sup>2</sup>/2) to guarantee that the binary expansion would produce practical denominators.<br /><br />That method finds practical expansions for all rational numbers that are less than one. What about larger rationals? For those, we need to know that the practical numbers are distributed roughly like the prime numbers, close enough to the same distribution that the sum of inverse practical numbers diverges. So we can use a greedy algorithm that repeatedly subtracts the largest unused inverse-practical number, and this will eventually leave the remaining fraction smaller than all already-used practical numbers. At this point we can switch to the binary method. Let's try this for the rational number 19/9:<br /><br />19/9<br />= 1/1 + 10/9<br />= 1/1 + 1/2 + 11/18<br />= 1/1 + 1/2 + 1/4 + 13/36<br />= 1/1 + 1/2 + 1/4 + 1/6 + 7/36<br />= 1/1 + 1/2 + 1/4 + 1/6 + 1/8 + 5/72<br /><br />and now since 5/72 < 1/8, it's safe to switch to the binary method without worrying that it will produce any of the same fractions:<br /><br />5/72<br />= 5/(8*9)<br />= 1/16 + 1/(16*9)<br />= 1/16 + 2/(32*9)<br />= 1/16 + 4/(64*9)<br />= 1/16 + 1/144<br /><br />where, in the second-to-last line, the power of two (64) is big enough to match the half-square of the odd part (9<sup>2</sup>/2 = 40.5). Therefore,<br /><br />19/9 = 1/1 + 1/2 + 1/4 + 1/6 + 1/8 + 1/16 + 1/144<br /><br />Sun also made a similar conjecture with the numbers formed by subtracting one from a prime in place of the practical numbers. Perhaps similar methods will work there too, but this seems harder to prove. Sun offered $1000 for a proof, so it might be worthwhile to try.<a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:337934A better-behaved subtraction game2016-11-16T21:33:06Z2016-11-19T08:14:18ZI used the <a href="http://11011110.livejournal.com/337587.html">sieving algorithm for subtract-a-square</a> to generate its P-positions (the ones you want to move to) in order to estimate how quickly this sequence of positions grows. Based on some assumptions that the sequence was basically random and on considerations involving the coupon collector problem, I was expecting its growth rate (the number of P-positions up to <i>n</i>) to be roughly <i>O</i>(sqrt <i>n</i> log <i>n</i>). But that seems to be inconsistent with the data. Instead (based on generating the first 350k or so of these numbers) it seems to be more like <i>O</i>(<i>n</i><sup>0.69</sup>), a surprisingly high growth rate.<br /><br />Below is a table of some P-positions (the middle column), the number of P-positions up to that value (left column), and the exponent one would infer from those two numbers:<pre>22 109 0.658881526366
39 204 0.688882847768
66 425 0.692265864743
99 827 0.684021054309
158 1625 0.684757862413
255 3209 0.686333836589
419 6414 0.688764172045
682 12812 0.689885260226
1087 25647 0.688637867852
1752 51202 0.688752703605
2821 102517 0.688593820775
4497 204817 0.687755821596
7436 409687 0.689776813171
12068 819267 0.69023196924
19659 1638632 0.690896170477
31742 3276892 0.690915578787
51489 6553775 0.691222814299
83851 13107272 0.691745659235
136858 26215012 0.692354994835
221074 52429275 0.69233584282
358248 104857942 0.692489695744</pre>In any subtraction game like this one, the growth rates of the move set and the P-position set must multiply together to at least linear. But it occurred to me to wonder: maybe they are always superlinear? That is, maybe there is some more general reason why the winning positions in subtract-a-square seem to be significantly more dense than the squares? But the answer is no. There's a different subtraction game where both number of moves up to <i>n</i> and the number of winning positions up to <i>n</i> are proportional to the square root, with some oscillation in the constant of proportionality.<br /><br />To define such a game, let the available moves be the <a href="http://oeis.org/A000695">Moser–de Bruijn sequence</a> of sums of distinct powers of 4: 0, 1, 4, 5, 16, 17, 20, 21, 64, ... Any integer <i>n</i> can be decomposed into its even part <i>n</i> & 0x55555555, a member of its sequence, and its odd part <i>n</i> & 0xaaaaaaaa, which is two times a member of the sequence.<br />The P-positions for the game defined by these moves are the ones whose even part is zero, and the unique winning move (when the even part is nonzero) is to subtract off the even part.<br /><br />Another way of looking at this, in number theoretic terms, is that the Moser–de Bruijn sequence is something like a <a href="https://en.wikipedia.org/wiki/Sidon_sequence">Sidon sequence</a>. A Sidon sequence is defined by the property that the sums <i>x</i> + <i>y</i> of pairs of numbers <i>x</i>, <i>y</i> from the sequence are all distinct. To achieve this property, the number of elements in an infinite Sidon sequence up to <i>n</i> must (for infinitely many <i>n</i>) grow strictly smaller than the square root of <i>n</i>. Instead, the Moser–de Bruijn sequence has distinct sums of the form <i>x</i> + 2<i>y</i>, and because this form is a little different it can grow proportionally to the square root.<br /><br />So, any explanation of the high growth rate of P-positions in subtract-a-square will need to depend on the actual distribution of square numbers, and not just on their frequency.<br /><br /><b>Update Nov. 18:</b> Compare <a href="http://www.ics.uci.edu/~eppstein/cgt/subsquare.html">these old messages</a> on modular behavior of the subtract-a-square positions with Ruzsa's lower bound technique in the <a href="https://en.wikipedia.org/wiki/Furstenberg%E2%80%93S%C3%A1rk%C3%B6zy_theorem">Furstenberg–Sárközy theorem</a>. Then look at the table below, of what happens when we represent subtract-a-square positions in base 5 and count digit frequencies for each digit position of these numbers (here, for positions up to 4 million):<pre>digit 0 : 15179 8 18520 36 2803
digit 1 : 7369 7280 7277 7351 7268
digit 2 : 11273 3903 10586 6161 4614
digit 3 : 7230 7303 7360 7470 7160
digit 4 : 7863 6726 7524 7453 6894
digit 5 : 7094 7278 7346 7280 7302</pre> It looks very much to me like the greedy algorithm is trying to emulate Ruzsa's strategy in base 5 (that is, to use a square-difference-free set of digits in even positions and arbitrary digits in odd positions), which would already give it approximately <i>n</i><sup>0.715338</sup> positions. If it could bring in other prime factors to the base it could do even better. Maybe it emulates Ruzsa for all bases simultaneously?<a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:337735Linkage2016-11-16T06:54:03Z2016-11-16T06:54:56ZGah LiveJournal's new post page is broken and I can't preview. Let's hope this works.<br /><ul><li><a href="https://www.miraikan.jst.go.jp/en/exhibition/tsunagari/authagraph.html">Tetrahedral area-preserving world map projection</a> (<a href="https://plus.google.com/100003628603413742554/posts/jcr8Wj7hUmq">G+</a>)</li><br /><li><a href="http://www.kenyonreview.org/kr-online-issue/2016-fall/selections/jamie-zvirzdin-656342/">Tips for popular-audience science writing</a> (<a href="https://plus.google.com/100003628603413742554/posts/VYLrKVTUrpB">G+</a>)</li><br /><li><a href="https://www.propublica.org/article/google-has-quietly-dropped-ban-on-personally-identifiable-web-tracking">Google opts in to matching personal info to web trackers. Here's how to opt out.</a> (<a href="https://plus.google.com/100003628603413742554/posts/iTgiTPLcoeU">G+</a>)</li><br /><li><a href="https://en.wikipedia.org/wiki/Paracompact_uniform_honeycombs">New spherical renders of hyperbolic honeycombs</a> (<a href="https://plus.google.com/100003628603413742554/posts/YKwfy2hw13r">G+</a>)</li><br /><li><a href="http://www.theatlantic.com/science/archive/2016/11/math-women/506417/">How a corrosive culture keeps women out of leadership positions on math journals</a> (<a href="https://plus.google.com/100003628603413742554/posts/fwidsbqU5A8">G+</a>)</li><br /><li><a href="http://www.ams.org/profession/ams-fellows/new-fellows">New AMS Fellows</a> (<a href="https://plus.google.com/100003628603413742554/posts/jJhZHVtnLcz">G+</a>)</li><br /><li><a href="https://arxiv.org/abs/1611.01661">Spanning trees in multipartite geometric graphs</a> (<a href="https://plus.google.com/100003628603413742554/posts/ajK9WDVQRvG">G+</a>)</li><br /><li><a href="https://www.youtube.com/watch?v=ikAb-NYkseI">Inspirational speech to turn your fear and loathing into constructive energy</a> (<a href="https://plus.google.com/100003628603413742554/posts/1QvM1JSr6gJ">G+</a>)</li><br /><li><a href="https://medium.com/message/never-trust-a-corporation-to-do-a-librarys-job-f58db4673351">The failure of Google's mission to preserve the information from the past, and the alternative provided by archive.org</a> (<a href="https://plus.google.com/100003628603413742554/posts/ChWApSXsKCA">G+</a>)</li><br /><li><a href="http://blog.plover.com/2016/11/11/">Bad citation practices on Wikipedia</a> (<a href="https://plus.google.com/100003628603413742554/posts/brQc4rNfcWz">G+</a>)</li><br /><li><a href="http://www.konradvoelkel.com/2015/05/git-for-math">How and why mathematicians should use git for their papers</a> (<a href="https://plus.google.com/100003628603413742554/posts/SxTGFbHpnuC">G+</a>)</li><br /><li><a href="http://fractaldonana.blogspot.co.uk/2009/05/island-of-enmediowetlands-of-el-odiel.html">Spanish photographer Héctor Garrido's fractal landscapes</a> (<a href="https://plus.google.com/100003628603413742554/posts/gKXKHjiMSHr">G+</a>)</li><br /><li><a href="https://www.youtube.com/watch?v=49KvZrioFB0">Cute puzzle about subdividing a square into different but nearly-equal-area rectangles</a> (<a href="https://plus.google.com/100003628603413742554/posts/Dyek8ju5vsZ">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:337587Shaving a superpolylog from subtract-a-square2016-11-15T06:24:44Z2016-11-16T21:37:49Z<p>The game of <a href="https://en.wikipedia.org/wiki/Subtract_a_square">subtract-a-square</a> is played by two players with a pile of coins. They take turns taking a square number of coins until none are left. The last player to move wins. So how can we play this game optimally and efficiently? As it turns out, there's some deep number theory lurking in the answer.</p>
<p>I covered this game in my undergraduate algorithms class today, as an example of dynamic programming. It's perhaps unusual among dynamic programming algorithms as having a fractional exponent. If you define the value of a position to be +1 if the player about to move wins, and –1 otherwise, then you get the usual dynamic programming recurrence for any game: the value of any position is the maximum, over available moves, of the negated values of the positions resulting from each move. A position with <i>n</i> coins has <i>O</i>(sqrt <i>n</i>) moves available, so evaluating each position takes <i>O</i>(sqrt <i>n</i>) time. Looping over all positions and evaluating each of them in this way takes a total amount of time that is <i>O</i>(<i>n</i><sup>3/2</sup>).</p>
<p>In Python, <a href="https://oeis.org/A030193">the set of winning positions</a> (the ones you want to move to, with value –1) can be listed by the following code, which essentially follows this algorithm:</p>
<pre>def A030193():
winners = set()
def win(n):
i = 1
while i*i <= n:
if n - i*i in winners:
return False
i += 1
return True
n = 0
while True:
if win(n):
yield n
winners.add(n)
n += 1</pre>
<p>But then after the lecture I realized that there's a different way of doing this, closer in spirit to the sieve of Eratosthenes. Rather than looking backward from each position to all the numbers that are smaller than it by a square difference, let's look forward from each winning position we find to the ones that are larger by a square. After we knock all of those positions out, the remaining ones are the winners.</p>
<pre>def A030193():
walkers = {}
steps = {}
n = 0
while True:
if n not in walkers:
yield n
walkers[n] = [n]
steps[n] = 0
for w in walkers[n]:
steps[w] += 1
next = w+(steps[w]*steps[w])
if next not in walkers:
walkers[next] = [w]
else:
walkers[next].append(w)
n += 1</pre>
<p>What's the running time of this sieving algorithm? I don't know, but it seems to depend on some deep questions in number theory!</p>
<p>It's easy to see that, when generating the winning positions up to <i>n</i>, it takes time <i>O</i>(sqrt <i>n</i>) per winning position. This is an improvement on the dynamic program, which multiplied the same factor by <i>n</i> rather than by the number of winning positions. But how many winning positions are there?</p>
<p>I don't know of any actual analysis of this (beyond an observation of Golomb that shows that there must be at least sqrt <i>n</i> of them), but there has been a lot of work in number theory on square-difference-free sets: sets of numbers no two of which differ by a square. And that's true here, so we can plug in the upper bounds that are known for the more general square-difference-free problem to analyze our algorithm.</p>
<p>Unfortunately the best of these bounds that I know of, by Pintz, Steiger, and Szemerédi (see the Wikipedia link for the precise bounds and reference) are pretty weak and also tricky to prove. They show that the number of elements in any square-difference-free set is sublinear, but only by a slightly-superpolylogarithmic factor. So the sieving algorithm is faster than the dynamic programming algorithm by at least the same factor.</p>
<p>Maybe the fact that we care about a single specific square-difference-free set (the winning positions in subtract-a-square) can save us, and allow for a simpler and stronger analysis than what we have for general square-difference-free sets? Again, I don't know. The sieving idea can also be combined with FFT-based bit-vector convolution to give a provably near-linear algorithm for subtract-a-square but one that's much more complicated and less implementable. I'm more interested in learning more about the complexity of the simple sieving method implemented above.</p><a name='cutid1-end'></a>
Update: See <a href="http://11011110.livejournal.com/337934.html">a later post</a> for some experiments on the growth rate of this set.urn:lj:livejournal.com:atom1:11011110:337178Things to say goodbye to2016-11-09T05:24:18Z2016-11-09T06:11:07ZMost or all of the following seem destined to be gone, in the US and (for some) the world:<br /><br />Climate change countermeasures and continued research.<br />A coordinated response to extreme climate events.<br />Regulation of carbon dioxide as a pollutant.<br />National parks and wildlife preserves.<br />Guaranteed health care.<br />State-level limits on how predatory the health care industry can be.<br />A recovering economy and continuing tech boom.<br />Internet neutrality.<br />The minimum wage.<br />Social security and medicare.<br />The Supreme Court.<br />Abortion rights and access to contraception.<br />Anti-discrimination laws and same-sex marriage.<br />The truth defense from libel.<br />No wholesale legal persecution of opposition parties.<br />Restrictions on gun ownership.<br />Religious freedom for anyone other than Christians.<br />Limits on how blatantly Christianity can be used as an excuse for bigotry.<br />Redistricting rules that prevent continued gerrymandering.<br />Anything resembling adequate polling places in poor and minority districts.<br />Universal voter registration.<br />Pressure to reduce sexual harassment and sexual assaults in our universities, or anywhere else.<br />Reduced or free college tuition for anyone.<br />Any hope of reining in the out-of-control racists in our police forces.<br />Farm workers, housecleaners, construction workers, food service workers, and all those other people who do the things nobody else wants to do.<br />The ability to bring in talented students and workers from other countries.<br />NATO and the free Baltic states.<br />Nuclear non-proliferation.<br />A president who wouldn't start a nuclear war based on a whim or personal slight.<br /><br />Clinton could still pull this out, mathematically, but barring a miraculous turnaround in Wisconsin or Arizona there doesn't seem to be any remaining path to 270 electoral votes. And with the House and Senate in Republican hands and a free slot on the court there are no checks and balances left; the voters were the last line of defense.<br /><br />Anyone in a nice safe part of the world looking for academic computer scientists? Canada? Iceland? New Zealand?urn:lj:livejournal.com:atom1:11011110:336922Linkage for Halloween2016-11-01T05:54:35Z2016-11-01T05:54:35Z<ul><li><a href="http://jjj.de/fxt/fxtpage.html">Jörg Arndt's library and book of bit-manipulation programming techniques</a> (<a href="https://plus.google.com/100003628603413742554/posts/LiFy3yVuhUY">G+</a>)</li><br /><li><a href="http://mathoverflow.net/q/240186/440">The geometric median of a solid triangle</a>, another triangle center whose lack of closed form is keeping it out of <a href="http://faculty.evansville.edu/ck6/encyclopedia/ETC.html">ETC</a> (<a href="https://plus.google.com/100003628603413742554/posts/M4ahu8Nbrn3">G+</a>)</li><br /><li><a href="http://www.thisiscolossal.com/2016/10/polygons-a-versatile-measuring-spoon-inspired-by-origami-folds/">Rigid-origami variable-capacity measuring spoon</a> (<a href="https://plus.google.com/100003628603413742554/posts/BVTwSjt8pMR">G+</a>)</li><br /><li><a href="http://www.math.uwaterloo.ca/tsp/pubs/">"Easily the largest road-distance TSP that has been solved to date", a pub-crawl with 24727 stops</a> (<a href="https://plus.google.com/100003628603413742554/posts/YZohQx3N7Lz">G+</a>)</li><br /><li><a href="https://github.com/MGunlogson/CuckooFilter4J">High performance Java implementation of a Cuckoo filter</a> (<a href="https://plus.google.com/100003628603413742554/posts/NeSGLpg1MkX">G+</a>)</li><br /><li><a href="https://www.theguardian.com/science/2016/oct/22/nonsense-paper-written-by-ios-autocomplete-accepted-for-conference#comment-85925997">OMICS conference accepts a paper written by autocomplete</a> (<a href="https://plus.google.com/100003628603413742554/posts/P9uBSYymhh3">G+</a>)</li><br /><li><a href="https://www.youtube.com/watch?v=DelH1S32dOg">Matt Parker makes mathematical sculpture from office supplies</a> (<a href="https://plus.google.com/100003628603413742554/posts/YLGNzQCz2iG">G+</a>)</li><br /><li><a href="https://en.wikipedia.org/wiki/Rule_90">The Rule 90 cellular automaton on Wikipedia</a> (<a href="https://plus.google.com/100003628603413742554/posts/gZPtrzWY9By">G+</a>)</li><br /><li><a href="http://www.cs.technion.ac.il/~gershon/personal/EscherForReal/">3d objects that look like Escher's impossible objects</a> (<a href="https://plus.google.com/100003628603413742554/posts/FZPdf91mGos">G+</a>)</li><br /><li><a href="https://en.wikipedia.org/wiki/Dual_graph">Dual graph on Wikipedia</a> (<a href="https://plus.google.com/100003628603413742554/posts/c5dPKWgvJD1">G+</a>)</li><br /><li><a href="http://finance.yahoo.com/news/turnitin-announces-content-partnership-world-174100638.html">ArXiv uses Turnitin to detect plagiarized submissions; Turnitin gains access to arXiv content to detect plagiarism elsewhere</a> (<a href="https://plus.google.com/100003628603413742554/posts/2rpDueDNXzn">G+</a>)</li><br /><li><a href="http://boingboing.net/2016/10/25/beautifully-color-coded-waters.html">Using the Strahler number to visualize watersheds</a> (<a href="https://plus.google.com/100003628603413742554/posts/99zYcFGaLzs">G+</a>)</li><br /><li><a href="https://rjlipton.wordpress.com/2016/10/29/absolute-firsts/?utm_source=twitterfeed&utm_medium=twitter">The many women in computing who have been the the first X, no qualifier</a> (<a href="https://plus.google.com/100003628603413742554/posts/XgXnsqGvGtt">G+</a>)</li><br /><li><a href="http://www.popularmechanics.com/science/g2816/5-simple-math-problems/">Five easy-to-state but hard-to-solve problems in mathematics</a> (<a href="https://plus.google.com/100003628603413742554/posts/EUoWNBK5bY7">G+</a>)</li><br /><li><a href="https://plus.google.com/+MichaelNelson/posts/H9DNomHQuvq">Symmetries of the permutohedron</a> (<a href="https://plus.google.com/100003628603413742554/posts/WQ1gvuCb4qh">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:336685Tridecenary frustum tree2016-10-24T00:51:22Z2016-10-24T00:52:29Z<p>In <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Conway's Game of Life</a>, and <a href="https://en.wikipedia.org/wiki/Life-like_cellular_automaton">other cellular automata with the same neighborhood structure</a>, you can determine the values of the cells in any 2<i>x</i> × 2<i>x</i> square of cells from their values <i>x</i> steps earlier in a bigger 4<i>x</i> × 4<i>x</i> square. If we view this as a time-space diagram, with two of the dimensions as the spatial dimensions of the Life grid and the third dimension as time, we can view the bigger starting square and the smaller resulting square as the bottom and top of a sort of stepped pyramid formed by stacking concentric squares. The values of the cells in each layer of the pyramid are determined by the ones in the layer below. The squares shrink inward as they rise upward, because the other cells outside the pyramid need more information (outside the base of the pyramid) to determine their values. The image below shows this construction for <i>x</i> = 1, 2, and 4, with each time-space state of a cell represented as a cube.</p>
<p align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/Stepped-Pyramids.svg" style="background-color:white;"></p>
<p>The shape that these stepped pyramids approximate, for large values of <i>x</i>, is a square pyramid with its top point chopped off. It's called a <a href="https://en.wikipedia.org/wiki/Frustum">frustum</a> (plural frusta).</p>
<p>The <a href="https://en.wikipedia.org/wiki/Hashlife">Hashlife</a> algorithm for simulating Conway's Game of Life is often described as being based on a quadtree, a two-dimensional structure of squares divided into smaller squares, but really it's a three-dimensional recursive decomposition based on these shapes. The hash table that gives the algorithm its name stores a collection of these frusta of different sizes (all powers of two), with their initial state (the values of the cells in the bottom face) as their hash keys and with their final state (the values in the top face) as the associated hash values. With this structure you can quickly jump from a square of cells whose values form one of the keys to the resulting state some number of steps later, without having to simulate all the steps in between.</p>
<p>What about when you encounter an initial state that you don't recognize, because it's not already in the hash table? Then you need to make a new frustum and store it in the hash table. To do so, divide the top face of the new frustum into four smaller squares, and divide the bottom face into sixteen smaller squares (all smaller by a factor of two than the top square of the new frustum).
Place four overlapping small frusta under the four small squares on the top face, connecting them to nine small squares in the middle plane of the new frustum, and nine more small frusta connecting these nine squares to the base.
Then the top face values for the new frustum can be found by looking up the values of the nine smaller frusta on the bottom, and then using the results to look up the values for the four smaller frusta on top. In this way, we have decomposed one big frustum into 13 smaller frusta, which can in turn be decomposed recursively in the same way.</p>
<p align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/13-Frusta.svg" style="background-color:white;"></p>
<p>In fact, you don't need to know the actual values of any of the cells, except in the smallest frusta (the ones with 16 inputs and 4 outputs) to make this all work. At any higher level, you can represent each square of inputs or outputs symbolically, by a pointer to the frusta that have each of its four quarters as their bottom faces. In this way, each different frustum in the hash table can be represented by only a constant number of pointers, without also needing to store any big grids of cells.</p>
<p>The conventional wisdom, I think, is that Hashlife is good only for automata whose patterns begin in a sparse state and then stay that way (with lots of repeated substructures that the hash table can take advantage of). But actually, even for an automaton whose evolution is chaotic and structureless, Hashlife can provide a speedup. If you stop building new frusta when they become too big (where too big means that the surface area is logarithmic in the size of the grid you're simulating) then the total number of distinct frusta in the hash table is linear, no bigger than the grid itself. This method lets you simulate an <i>n</i> × <i>n</i> grid by decomposing it into only <i>O</i>(<i>n</i><sup>2</sup>/log <i>n</i>) overlapping frusta, whose height (number of time steps jumped) is proportional to the square root of the logarithm. Therefore, the algorithm time per cellular automaton time step is <i>O</i>(<i>n</i><sup>2</sup>/log<sup>3/2</sup> <i>n</i>), which compares favorably to the <i>O</i>(<i>n</i><sup>2</sup>/<i>w</i>) time per step of a conventional bit-parallel simulation on a machine with <i>w</i> bits per word. Of course, the random memory access pattern of the hash table could eat up most of the savings, making the comparison less clear in practice than it is in theory...</p>
<p>This 13-way decomposition of frusta into overlapping smaller frusta seems like it could also be useful in some scientific simulation problems, when there is a fixed speed at which information from one part of the simulation can propagate to another. But I don't know of any actual uses of this structure outside of cellular automaton simulation.</p><a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:336554Linkage2016-10-16T05:18:50Z2016-10-16T05:18:50Z<ul><li><a href="https://www.quantamagazine.org/20160929-ghissi-altarpiece-and-mathematics/">Restoring the St. John Altarpiece...with mathematics!</a> (<a href="https://plus.google.com/100003628603413742554/posts/GMvZq1Sz8XJ">G+</a>)</li><br /><li><a href="https://plus.google.com/+IsaacCalder/posts/KrBP46dbWXP">Nonconvex equilateral hecatontetracontahedron</a> (<a href="https://plus.google.com/100003628603413742554/posts/iHr7G1oFBUn">G+</a>)</li><br /><li><a href="http://mathtourist.blogspot.com/2007/05/integral-heptagons.html">Sets of seven non-cocircular points with integral distances</a> (<a href="https://plus.google.com/100003628603413742554/posts/SdF6QLCdy7A">G+</a>)</li><br /><li><a href="http://lathisms.org/">Biographies of prominent Latin and Hispanic mathematicians</a> (<a href="https://plus.google.com/100003628603413742554/posts/2e7gjEfzew2">G+</a>)</li><br /><li><a href="https://www.theguardian.com/uk-news/2016/oct/04/rudd-announces-crackdown-on-overseas-students-and-new-work-visas">UK cuts off the flow of foreign students</a>, because British higher education hasn't imploded quickly enough in the wake of Brexit and needs a push (<a href="https://plus.google.com/100003628603413742554/posts/jSHVx9YJcDr">G+</a>)</li><br /><li><a href="http://news.mit.edu/2016/automating-dna-origami-opens-door-many-new-uses-0526">DNA origami: programmable matter for making nano-scale shapes and structures</a> (<a href="https://plus.google.com/100003628603413742554/posts/A71t5NSxX9H">G+</a>)</li><br /><li><a href="https://medium.com/i-data/trumpwon-trend-vs-reality-16cec3badd60#.hvq0e0vyl">How political hoaxes spread on twitter</a> (<a href="https://plus.google.com/100003628603413742554/posts/VRdGXqiygEA">G+</a>)</li><br /><li><a href="http://mathoverflow.net/questions/215211/what-algebraic-structures-are-related-to-the-mcgee-graph">The McGee graph animated in 3d to show off its symmetries</a> (<a href="https://plus.google.com/100003628603413742554/posts/QBiCfQdksbm">G+</a>)</li><br /><li><a href="https://en.wikipedia.org/wiki/2-satisfiability">2-satisfiability</a>, now a Good Article on Wikipedia (<a href="https://plus.google.com/100003628603413742554/posts/W9aYxXETMPp">G+</a>)</li><br /><li><a href="https://www.thestar.com/news/world/2016/09/29/canadian-medical-journals-hijacked-for-junk-science.html">OMICS hijacks two previously-reputable publishers and their journals</a> (<a href="https://plus.google.com/100003628603413742554/posts/3j6SiJPd83P">G+</a>)</li><br /><li><a href="http://sechel.de/reuleaux.html">The Reuleaux triangle tetrahedron</a>, what you get if you glue four Reuleaux triangles edge-to-edge (<a href="https://plus.google.com/100003628603413742554/posts/MYgATQDGwcU">G+</a>)</li><br /><li><a href="http://www.computational-geometry.org/documents/2017_cfp.pdf">Symposium on Computational Geometry call for papers</a> (abstracts Nov. 28, papers Dec. 5; <a href="https://plus.google.com/100003628603413742554/posts/HWKVRMNRuES">G+</a>)</li><br /><li><a href="https://plus.google.com/117663015413546257905/posts/1M6eqp6s8k5">The McGee graph, again, as a non-rigid unit distance graph</a> (<a href="https://plus.google.com/100003628603413742554/posts/iLKAfybLG6x">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:336374The Kolakoski sequence via bit tricks instead of recursion2016-10-14T23:25:10Z2016-10-16T19:14:28Z<p>After posting about <a href="http://11011110.livejournal.com/335937.html">a recursive generator for the Kolakoski sequence</a> yesterday, I found the following alternative and non-recursive algorithm, which generates the same sequence in a linear number of bit operations with a logarithmic number of bits of storage.</p>
<pre>def Kolakoski():
x = y = -1
while True:
yield [2,1][x&1]
f = y &~ (y+1)
x ^= f
y = (y+1) | (f & (x>>1))</pre>
<p>Like the previous one, this can be understood as traversing an infinite tree. The tree is defined using essentially the same rules as before: two consecutive nodes on the same level of the tree have the same number of children if and only if they have the same parent. However, it extends infinitely upward rather than infinitely downward, with two children for each node on the leftmost path. Each level of the tree has the same sequence of degrees, which equals the Kolakoski sequence starting from its second position (the missing first position is why this starts at x = y = -1 rather than zero).</p>
<p align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/Upward-Kolakoski.svg" style="background-color:white;"></p>
<p>The algorithm traverses the bottom level of the tree in left-to-right order. As it does, the variable x maintains, in its binary representation, the numbers of children modulo 2 of the path of nodes extending infinitely upwards from the current leaf. All but finitely many (logarithmically many as a function of the position of the leaf) of these bits are zero, so (after the first step) x is a non-negative finite number with logarithmically many bits. The variable y, similarly, maintains a sequence of bits corresponding to the nodes on the same path that are 0 when the node is a left child of a degree-2 node and 1 otherwise. Again, finitely many of these bits are 1, so y is non-negative with logarithmically many bits. The bit manipulation tricks of the algorithm merely update these two variables to describe the next path in the traversal.</p>
<p>Update 10/16: <a href="http://jjj.de/fxt/demo/bits/#kolakoski-seq">Fast C++ implementation</a> by Jörg Arndt</p>urn:lj:livejournal.com:atom1:11011110:335937The Kolakoski tree2016-10-13T23:46:17Z2016-10-14T23:35:27Z<p>Draw an infinite tree according to the following rules:</p>
<ul>
<li>Each tree node is labeled 1 or 2, and has a number of children equal to its label.</li>
<li>If the nodes are placed into their breadth-first search ordering, then two consecutive nodes have the same label if and only if they have the same parent.</li>
</ul>
<p>There are two choices for the root label, but the trees they produce are almost the same as each other, so let's say the root is labeled 2, giving the tree shown below together with its <a href="http://11011110.livejournal.com/171440.html">spiraling breadth first search</a> order. (If the root were labeled 1, the only difference would be to add one more node labeled 1 above the node that is the root in the drawing.)</p>
<p align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/Kolakoski-tree.svg" style="background-color:white;"></p>
<p>Then the breadth-first sequence of labels that we obtain is exactly the <a href="https://en.wikipedia.org/wiki/Kolakoski_sequence">Kolakoski sequence</a>, starting from its third term. The Kolakoski sequence begins 1,2,2,1,1,2,1,2,2,1,2,2... and has the property that it equals the sequence of run-lengths in itself: the numbers 1, 2, 2, etc. are exactly the numbers of consecutive 1's, 2's, 1's, etc. in the sequence. Our tree is defined in such a way that each run of consecutive equal labels comes from the same parent, so the run-lengths of the sequence equal the numbers of children of the nodes, which equal the labels of the nodes, which define the sequence itself.</p>
<p>The fact that this tree encodes the Kolakoski sequence in its breadth-first ordering is closely related to the fact that <a href="http://code.activestate.com/recipes/231503/">breadth first search on a tree can be encoded recursively</a> as the following algorithm: first, output the root node. Then, for each node in a recursive breadth-first search, output its children. Applying this technique to the Kolakoski tree gives us the following Python recursive generator for the Kolakoski sequence itself:</p>
<pre>def recurse():
yield 2
output = 1
for x in recurse():
for i in range(x):
yield output
output = 3 - output
def Kolakoski():
yield 1
yield 2
for x in recurse():
yield x</pre>
<p>(The only reason we need two separate functions is to handle the first two terms in the sequence, the ones that are not part of the tree.) If this algorithm is used to generate the first <i>n</i> terms of the sequence, then it calls itself recursively <i>O</i>(log <i>n</i>) levels deep, with each level of recursion tracking one level higher in the tree and generating approximately 2/3 as many values as its caller. Each level of recursion has only a constant amount of storage for its local variables. Therefore, it takes <i>O</i>(<i>n</i>) time and <i>O</i>(log <i>n</i>) space to generate the whole sequence.</p>
<p>Something very similar to this algorithm, with the same analysis, is described in the paper "<a href="http://www.emis.ams.org/journals/JIS/VOL15/Nilsson/nilsson5.pdf">A space-efficient algorithm for calculating the digit distribution in the Kolakoski sequence</a>", by Johan Nilsson in <i>J. Integer Sequences</i> 2012. But he replaces the chain of recursive calls by an explicit data structure, which makes the algorithm's description longer and I think more confusing. And instead of making a single tree from all but the first two numbers in the sequence, Nilsson uses a forest with infinitely many trees, with each level of the forest being labeled by its own copy of the Kolakoski sequence.</p><a name='cutid1-end'></a>
<p><b>ETA:</b> <a href="http://11011110.livejournal.com/336374.html">See next post</a> for an alternative algorithm that avoids the recursion.</p>urn:lj:livejournal.com:atom1:11011110:335859Voting on a Turing machine using constant-amortized-time counters2016-10-02T05:54:45Z2016-10-02T06:05:55ZWhile fixing up <a href="https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_majority_vote_algorithm">the Wikipedia article on the constant-space streaming majority algorithm of Boyer and Moore</a> I ran across <a href="http://stackoverflow.com/questions/39182402/memory-complexity-of-boyer-moore-majority-vote-algorithm">a stackoverflow question complaining about some sloppy analysis</a> that I had already removed from the Wikipedia article. As a quick reminder, the algorithm stores one element from its input sequence, uses comparisons of that element with input values to decide whether to increment or decrement a counter, and uses comparisons of the counter with zero to decide when to replace the stored element.<br /><br />Usually in algorithm analysis we use a unit cost random access machine model in which "reasonable" sized objects such as input identifiers and counters take a single word of memory and basic operations on them like comparisons and arithmetic take constant time. We can argue about what "reasonable" means but I think it's good enough both mathematically and in practice to assume that there's a word size <i>w</i> that is unknown but big enough to index the input (<i>w</i> ≥ log <i>n</i>) and that the input values are machine words. So in this model the algorithm clearly takes linear time and constant space, and the old version's claim that the space is logarithmic is wrong.<br /><br />On the other hand, the complexity theorists still seem to want to stick to a Turing machine model of computing. The same voting algorithm still makes sense on a Turing machine as long as we assume a separate long read-only input tape and short read-write working memory tape, with enough space to store both a counter and a single input value. The old <i>O</i>(log <i>n</i>) space claim is still wrong, though, because you don't know how many bits long the input values are, and it might be a lot. But that's easily fixed. What about the Turing machine runtime?<br /><br />The comparisons of the stored value with the input values take linear total time, but now it's linear in the input length which is probably something larger than <i>n</i>. The counter increments and decrements are more of a problem, though. They could take as much as <i>O</i>(log <i>n</i>) time per increment or decrement, and (if there are not many distinct input values, so their lengths are much shorter than logarithmic) these times could sum to much larger than the input length. Repeatedly incrementing a binary number is a constant-amortized-time operation, but mixing increments and decrements is not. So what can we do?<br /><br />It turns out that there's a simple trick to reduce the amortized time per increment, decrement, or compare-with-zero to constant, while only blowing up the space by a constant factor. Instead of storing one counter, store two of them, with their bits interleaved with each other, and with the low-order bits on the end closest to the stored input value. let's call the two counters <i>x</i> and <i>y</i>. To increment, add one to <i>x</i>, and to decrement, add one to <i>y</i>. But if either of these add-one operations causes the two interleaved bit sequences to become completely equal to each other, reset them both to zero. Now, the usual amortized analysis of increment-only counters works, and shows that all counter operations take amortized constant time.<br /><br />Using this data structure, the Turing machine version of the majority voting algorithm really does take linear time. But not <i>O</i>(<i>n</i>) time, so that's one more detail <a href="https://en.wikipedia.org/w/index.php?title=Boyer%E2%80%93Moore_majority_vote_algorithm&oldid=739074025">the old version of the article</a> got wrong or at least inconsistent with the stated form of the space bound. Maybe they had in mind bit-space-complexity for a RAM algorithm whose time is still measured in word operations? Does anyone actually use that combination?<a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:335510Linkage for the new school year2016-10-01T06:26:47Z2016-10-01T06:26:47Z<ul><li><a href="http://www.thisiscolossal.com/2016/09/geometric-watercolors-by-artist-jacob-van-loon/">Geometric Watercolors by artist Jacob Van Loon</a> (<a href="https://plus.google.com/100003628603413742554/posts/UJgteQjdvH8">G+</a>)</li><br /><li><a href="http://www.newyorker.com/news/news-desk/the-house-science-committees-anti-science-rampage">Congressman Lamar Smith's campaign of intimidation against global-warming researchers</a> (<a href="https://plus.google.com/100003628603413742554/posts/b1JTEHYFiAj">G+</a>)</li><br /><li><a href="http://www.ocregister.com/articles/irvine-729359-asian-city.html">Irvine has become the largest predominantly-Asian city in the continental US</a> — yay diversity! (<a href="https://plus.google.com/100003628603413742554/posts/co1QbTFkE5t">G+</a>)</li><br /><li><a href="https://www.insidehighered.com/news/2016/09/20/berkeley-may-remove-free-online-content-rather-complying-disability-law">Online course materials must be accessible to the blind and the hearing impaired</a>; uncaptioned videos are not good enough (<a href="https://plus.google.com/100003628603413742554/posts/Lr54utzQbTv">G+</a>)</li><br /><li><a href="http://doai.io/">Search engine for free versions of papers from their DOIs</a> (<a href="https://plus.google.com/100003628603413742554/posts/fsYzZjWpJRg">G+</a>)</li><br /><li><a href="https://www.insidehighered.com/quicktakes/2016/09/22/academics-win-macarthur-genius-fellowships">Subhash Khot declared a genius</a> (<a href="https://plus.google.com/100003628603413742554/posts/hWWesEkvShd">G+</a>)</li><br /><li><a href="http://www.npr.org/sections/alltechconsidered/2016/09/22/494925885/where-did-national-forests-go-green-spaces-disappear-from-google-maps">Disappearing national forests on online maps</a> highlight our dependence on an information monoculture in the cloud (<a href="https://plus.google.com/100003628603413742554/posts/Dwh8Cp2Srst">G+</a>)</li><br /><li><a href="http://www.latimes.com/local/lanow/la-me-wikipedia-science-classes-adv-snap-story.html">College students help edit Wikipedia</a> (<a href="https://plus.google.com/100003628603413742554/posts/j1HDmWbjPe3">G+</a>)</li><br /><li><a href="https://youtu.be/zahFj4AGthI">Levels of space-filling curves as cross-sections of a 3d-printed surface</a> (<a href="https://plus.google.com/100003628603413742554/posts/DTzBAtVQBsU">G+</a>)</li><br /><li><a href="http://www.graphdrawing.de/contest2016/results.html">Winner of the draw-the-Greek-gods'-genealogy contest</a> and others from Graph Drawing (<a href="https://plus.google.com/100003628603413742554/posts/HsDn7VFbLVp">G+</a>)</li><br /><li><a href="https://www.quantamagazine.org/20160928-off-the-shelf-lens-assists-dark-matter-find/">Canon DSLR telephoto lens array as a serious astronomical instrument</a> (<a href="https://plus.google.com/100003628603413742554/posts/8YXNvLTwFEM">G+</a>)</li><br /><li><a href="http://blog.computationalcomplexity.org/2016/09/give-second-order-statement-true-in-r.html">Distinguish the additive reals from the rationals in monadic second-order logic</a> (<a href="https://plus.google.com/100003628603413742554/posts/7aBbm9Ko9jN">G+</a>)</li><br /><li><a href="http://boingboing.net/2016/09/29/women-competitors-must-wear-hi.html">Female chess championship contenders protest being forced to wear hijabs</a> (<a href="https://plus.google.com/100003628603413742554/posts/VXPiDehvEGN">G+</a>)</li><br /><li><a href="http://boingboing.net/2016/09/30/eff-to-court-dont-let-us-go.html">EFF tells court that DMCA's preventing publication of academic crypto research should be unconstitutional</a> (<a href="https://plus.google.com/100003628603413742554/posts/LYsoxBvmttA">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:335228Directing traffic2016-09-16T23:55:44Z2016-09-16T23:55:44ZI have another new arXiv preprint: "Scheduling Autonomous Vehicle Platoons Through an Unregulated Intersection", <a href="http://arxiv.org/abs/1609.04512">arXiv:1609.04512</a>, with Juan Besa, Will Devanny, and Mike Goodrich. The same paper also <a href="http://doi.org/10.4230/OASIcs.ATMOS.2016.5">appeared at ATMOS 2016</a>; the two versions differ only in formatting and their theorem numbering scheme.<br /><br />The paper is on how to direct vehicle traffic through a road intersection while minimizing the longest waiting time. We assume that the traffic comes in variable-length platoons, and that we shouldn't try to break up these platoons. We also assume (perhaps less reasonably) that we know about all of the traffic that will cross the intersection in advance. This turns out to be susceptible to dynamic programming, but for a different optimization criterion: minimize the completion time of a given prefix of the schedule, subject to a fixed limit on the waiting time. But then, using the magic of <a href="https://en.wikipedia.org/wiki/Parametric_search">parametric search</a> we can turn this algorithm for the wrong criterion into one for the right criterion.<br /><br />Some of the time bounds, although polynomial, have high exponents, and we didn't succeed in handling some common types of intersections. For instance, there's one that I walk through most days, which at times of light traffic is a four-way stop and at other times has a human traffic director (one of the student jobs on my campus). In the more major of the two roads that cross there, each direction has a through lane and a separate left turn pocket. On the other road, each direction only has one lane, which combines cross traffic and left-turning traffic. Here's a screenshot from Google Earth; the building at the top is the one I work in, and at the bottom is the edge of the housing complex I live in.<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/PeltasonLosTrancos.png"></div><br /><br />The difficulty is that, for this type of intersection, one can direct traffic in such a way that there is no "synchronization point" when nobody is crossing the intersection, for instance by allowing through traffic in both directions on the main road interleaved with phases where one of those two directions has both through traffic and left-turning traffic. Our dynamic programming algorithm relies on these synchronization points. And of course it would be a better fit to the real-world problem to allow the input to be online instead of known in advance. So I think there's still a lot more to do on these problems.<a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:334957Linkage for the end of the summer break2016-09-16T06:05:35Z2016-09-16T06:06:55Z<ul><li><a href="http://math.andrej.com/2015/08/05/provably-considered-harmful/">"Provably" considered harmful</a> (<a href="https://plus.google.com/100003628603413742554/posts/GfNYn4yfWEE">G+</a>)</li><br /><li><a href="https://github.com/david-gpu/srez">Superresolution image enhancement through deep learning</a> (<a href="https://plus.google.com/100003628603413742554/posts/EsHt7V9qLvZ">G+</a>)</li><br /><li><a href="https://plus.google.com/+IsaacCalder/posts/dPKm19ADYok">Isohedral isosceles-triangle torus</a> (<a href="https://plus.google.com/100003628603413742554/posts/YTsk2tetQG3">G+</a>)</li><br /><li><a href="http://doi.org/10.1126/science.aah6493">30x bigger impact factor still not enough to give your paper a statistically significant chance of more citations</a> (<a href="https://plus.google.com/100003628603413742554/posts/QM7f4neTqtc">G+</a>)</li><br /><li><a href="http://arxiv.org/abs/1609.01042">Forbidden minors for infinite DFS trees depend on set-theoretic axioms</a> (<a href="https://plus.google.com/100003628603413742554/posts/cp3nqbbMiwb">G+</a>)</li><br /><li><a href="http://www.adl.org/combating-hate/hate-on-display/c/88.html">Why non-deplorable people should avoid saying they have 88 of anything</a> (<a href="https://plus.google.com/100003628603413742554/posts/BNPwavJ85L7">G+</a>)</li><br /><li><a href="http://mujeresconciencia.com/2016/09/07/alba-rojo-cama-la-matematica-escultora/">Premature death of geometric artist Alba Rojo Cama</a> (<a href="https://plus.google.com/100003628603413742554/posts/iwXqmYZbXHi">G+</a>)</li><br /><li><a href="http://arxiv.org/html/1609.02443v1">Graph Drawing 2016 proceedings mirror</a> (<a href="https://plus.google.com/100003628603413742554/posts/gA1cSWGdtDp">G+</a>)</li><br /><li><a href="http://www.acm.org/media-center/2016/september/knuth-prize-2016">Noam Nisan wins Knuth Prize</a> (<a href="https://plus.google.com/100003628603413742554/posts/GcdhQ434o48">G+</a>)</li><br /><li><a href="https://youtu.be/YIFO9dg83MA">Short video on how the Royal Society is trying to move away from being a boys-only club</a> (<a href="https://plus.google.com/100003628603413742554/posts/ajr8HHXqty7">G+</a>)</li><br /><li><a href="http://doi.org/10.1126/science.aah4571">Open-access legal quagmire re making a preprint available and then signing away copyright</a> (<a href="https://plus.google.com/100003628603413742554/posts/dLN2rn4uB85">G+</a>)</li><br /><li><a href="https://christophercliff.com/eppstein/">OpenStreetMap demo of k-shortest paths in a road network</a> (<a href="https://plus.google.com/100003628603413742554/posts/NG74efy1Kg4">G+</a>)</li><br /><li><a href="http://arxiv.org/abs/1602.07220">Optimal packing in the plane for regular pentagons</a> (<a href="https://plus.google.com/100003628603413742554/posts/YVFqPj1yX2h">G+</a>)</li><br /><li><a href="http://bit.ly/2cYdI6J">More than phi: Mathematical artist Lun-Yi London Tsai captures the feel of mathematicians' blackboards</a> (<a href="https://plus.google.com/100003628603413742554/posts/Ujt6wu3FQ51">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:334654Drawing 2d modular lattices2016-09-07T07:17:55Z2016-09-07T07:17:55ZIt's pretty well known that a finite <a href="https://en.wikipedia.org/wiki/Lattice_(order)">lattice</a> has <a href="https://en.wikipedia.org/wiki/Order_dimension">order dimension</a> ≤ 2 if and only if its Hasse diagram is an <a href="https://en.wikipedia.org/wiki/St-planar_graph"><i>st</i>-planar graph</a> (below left), and every <a href="https://en.wikipedia.org/wiki/Transitive_reduction">transitively reduced</a> <i>st</i>-planar graph defines a 2-dimensional lattice in this way. The reference I know of for this is Platt, "Planar lattices and planar graphs", <i>J. Comb. Th.</i> 1976. And I don't know who first observed that the 2-dimensional finite <a href="https://en.wikipedia.org/wiki/Distributive_lattice">distributive lattices</a> are the ones that can be drawn as grid graphs (below right) but my guess would be Garrett Birkhoff.<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/stplanar+grid.png" /></div><br /><br />My own paper "<a href="http://arxiv.org/abs/cs.CG/0607094">Upright-quad drawing of st-planar learning spaces</a>" described an analogous geometric representation for <a href="https://en.wikipedia.org/wiki/Antimatroid">antimatroids</a> (which in this context can be seen as another special type of lattice). So <a href="http://cstheory.stackexchange.com/questions/36510/subclasses-or-characterizations-of-modular-or-pseudo-modular-planar-graphs">a recent CS-theory stack-exchange question about planar modular graphs</a> got me wondering: what do the graphs of 2-dimensional <a href="https://en.wikipedia.org/wiki/Modular_lattice">modular lattices</a> (a subclass of the planar modular graphs) look like?<br /><br />As it turns out there is a nice answer. They are the graphs that can be drawn as grid graphs (like the distributive lattices) but then adding extra vertices within some of the grid squares, connected only to the top and bottom of the square. Like this:<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/2d-modular.png" /></div><br /><br />In one direction, it's straightforward to verify that the lattices drawn this way satisfy the <a href="https://en.wikipedia.org/wiki/Semimodular_lattice">semimodular law</a>. But they have the same shape when you flip them upside down, so they're both upper and lower semimodular and therefore modular.<br /><br />In the other direction, we need to show that 2d modular lattices always form subdivided grids. Any 2d modular lattice (ignoring the modularity) comes from an <i>st</i>-planar graph, and in any <i>st</i>-planar graph the faces are partially ordered from left to right. So we can construct the graph by first drawing its leftmost path and then adding faces one at a time. The fact that the graph has a drawing as a grid with subdivided squares follows by induction on the number of faces we add. Each face must be a quadrilateral, adding a two-edge path to the right of an existing path of the same length, for if one side of the face were shorter the graph would not be transitively reduced and if one were longer then the elements of that face would violate modularity. If the path on the left side of the new face is concave, we can add the face as a new grid square. If it is convex, we can make it the new right side of a grid square by moving the previous right corner into the square. And if either edge of the left side of the face was previously a bridge, we can shift the grid below it to make the left side concave or convex, reducing to a previous case. So the only case that causes trouble is when the left side of the new face is straight, and has two grid squares on the opposite side of it. But when this happens, these squares together with the new face form a seven-element non-modular sublattice. So in all cases, we can either form a subdivided grid drawing as described, or find a violation of modularity.<br /><br />What about modular graphs more generally? Does the same operation of subdividing a quadrilateral by adding a degree-two vertex inside it preserve modularity? Unfortunately, no. <i>K</i><sub>2,3</sub> (a grid with one square and one subdivision point) is modular. But adding a horizontal subdivision to each of its three quadrilaterals (the outer one too) produces a non-modular graph: the three new subdivision points have no median.<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/non-modular.png" /></div><a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:334348Linkage2016-09-01T04:59:21Z2016-09-01T05:00:54Z<ul><li><a href="https://plus.google.com/118320887831309218676/posts/gAaH5uXHBSQ">Honeycomb generated by interlocking hexagonal tilings</a> (<a href="https://plus.google.com/100003628603413742554/posts/BQ1dBEVSTFF">G+</a>)</li><br /><li><a href="https://siddbanpsu.github.io/publications/ijcai16-banerjee.pdf">Computer-written new Wikipedia articles</a> <a href="https://en.wikipedia.org/w/index.php?title=Wikipedia:Administrators%27_noticeboard/Incidents&oldid=734875096">didn't work as well as the programmers thought</a> (<a href="https://plus.google.com/100003628603413742554/posts/YdsQ9mi2d8b">G+</a>)</li><br /><li><a href="http://www.woodyblackwell.com/portfolio.html">Woody Blackwell's portfolio of glass and stone knapping</a> (<a href="https://plus.google.com/100003628603413742554/posts/gn9rWeHKNyp">G+</a>)</li><br /><li><a href="http://blogs.scientificamerican.com/roots-of-unity/a-few-of-my-favorite-spaces-the-olympic-rings/">A more mathematically interesting five-ring link</a> than the Olympic one (<a href="https://plus.google.com/100003628603413742554/posts/SqK5s7Na5Qj">G+</a>)</li><br /><li><a href="http://www.abc.net.au/news/2016-08-21/102yo-researcher-told-to-leave-his-edith-cowan-university-job/7769422">102-year-old researcher and honorary professor forced off campus</a> (<a href="https://plus.google.com/100003628603413742554/posts/AekU6uSXt4F">G+</a>)</li><br /><li><a href="http://www.maureeneppstein.com/mve_journal/?p=1340">A newspaper article from the early days</a> of pioneering computer programmer <a href="https://en.wikipedia.org/wiki/Steve_Shirley">Dame Stephanie Shirley</a> (<a href="https://plus.google.com/100003628603413742554/posts/BjJRMeA7mpW">G+</a>)</li><br /><li><a href="http://blog.andreahawksley.com/6osme/">A report from the 6th meeting on Origami, Science, Math, and Education</a> (<a href="https://plus.google.com/100003628603413742554/posts/RL2wjxCZBb4">G+</a>)</li><br /><li><a href="https://geometricolor.wordpress.com/2012/04/16/twofold-color-symmetry-in-translation/">Self-similar colorings of aperiodic tilings</a> (<a href="https://plus.google.com/100003628603413742554/posts/AkMJ3hLEg87">G+</a>)</li><br /><li><a href="https://plus.google.com/+DanPiponi/posts/EGefvErd54R">Counting grid graph matchings by continued fractions</a> (<a href="https://plus.google.com/100003628603413742554/posts/jTtL5vh3Khj">G+</a>)</li><br /><li><a href="http://retractionwatch.com/2016/08/26/u-s-government-group-sues-publisher-charging-it-with-deceiving-researchers/">US FTC takes action against predatory scientific publisher OMICS</a> (<a href="https://plus.google.com/100003628603413742554/posts/WBsfCEG86Dt">G+</a>)</li><br /><li><a href="https://arxiv.org/abs/1608.00152">A mathematical history of taffy pullers</a> (<a href="https://plus.google.com/100003628603413742554/posts/ChDb4cxPERh">G+</a>)</li><br /><li><a href="http://www.latimes.com/business/la-fi-rand-elliott-20160824-snap-story.html">Feds use Rand formula to spot discrimination; the GOP calls it junk science</a> (<a href="https://plus.google.com/100003628603413742554/posts/cxBqWakpVgk">G+</a>)</li><br /><li><a href="http://eatcs.org/index.php/component/content/article/1-news/2333-eatcs-ipec-nerode-prize-2016">Congratulations to Andreas Björklund, Nerode prize winner 2016</a> (<a href="https://plus.google.com/100003628603413742554/posts/6i6GT6Vj2Pz">G+</a>)</li><br /><li><a href="http://touch-geometry.karazin.ua/sitemap">The geometric models collection of V. N. Karazin Kharkiv National University, Ukraine</a> (<a href="https://plus.google.com/100003628603413742554/posts/42kLNxR4ou7">G+</a>)</li><br /><li><a href="https://www.eff.org/deeplinks/2016/08/stupid-patent-month-elsevier-patents-online-peer-review">Elsevier patents online peer review</a> (<a href="https://plus.google.com/100003628603413742554/posts/VTP2CatXgs4">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:334167A game of cop and robber2016-08-19T01:33:31Z2016-08-19T01:49:21ZSuppose we play the following game. We place a bunch of hexagonal game board tiles on a table, edge-to-edge, to form our playing field. On the field, we place two game pieces, a cop (blue) and a robber (red). The cop and robber take turns, either moving to an adjacent hex or passing (staying put). The cop wins if he can end a turn on the same hex as the robber. The robber wins by evading the cop forever. Who has the advantage?<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/polyhex-cop-win.png"></div><br /><br />It turns out to depend on what game board shapes are allowed. If the hexes of the board can completely surround a hole (a shape where one or more hexes could have been placed, but weren't) then the robber can win by keeping the hole between himself and the robber. But if there are no holes, then the cop always wins.<br /><br />Probably there is a direct strategy that shows this, but it's also possible to prove that the cop wins by using the theory of <a href="https://en.wikipedia.org/wiki/Cop-win_graph">cop-win graphs</a>, graphs in which the cop wins a generalized version of this game, with the players moving on the vertices of a graph rather than the hexes of a game board. Cop-win graphs are the same as dismantlable graphs, the graphs that can be reduced to a single vertex by repeatedly removing a vertex whose closed neighborhood is a subset of another vertex's closed neighborhood. And the adjacency graphs of systems of hexes with no holes are always dismantlable.<br /><br />To see this, consider the tree of 2-vertex-connected components of the adjacency graph of the hexes. For instance, the example above has five 2-connected components: the hexagonal shape formed by the seven hexes in the lower left, a big mass of 18 hexes in the center and right, and three single-hex components in the upper left. (Two of these single hexes are connected to the rest of the board only by a single edge; the other single-hex component lies between the two big components.) Choose arbitrarily a single leaf component of this tree (the 18-vertex component, or the two single-hex components connected to the rest by a single edge). If this component is a single hex, then its closed neighborhood is a two-hex set, consisting of itself and its one neighbor. In this case, its neighborhood is always a subset of its neighbor's component.<br /><br />Otherwise, if the leaf component that you picked is a nontrivial 2-connected component, such as the 18-vertex component of the example, walk counterclockwise around its boundary. The angles that you turn always have to add up to 2pi, so you must have passed at least three points where your walk turns counterclockwise by an angle of pi/3 (a boundary hex adjacent to two others, such as the starting point of the cop in the example) or 2pi/3 (a boundary hex adjacent to three others). In particular, one of these three hexes is not the one that connects your component to the rest of the game board. If it has two neighbors, its neighborhood is a subset of either of its neighbors' neighborhoods. And if it has three neighbors, its neighborhood is a subset of its middle neighbor's neighborhood. So either way, we can find a hex to remove. By repeating this process, we can show that the adjacency graph of the hexes is always dismantlable. More strongly, it's dismantlable with any distinguished vertex (such as the cop's starting location) as its final vertex.<br /><br />Unfortunately, I don't know of a simple explicit strategy for the cop, even on a polyhex board rather than a general graph. The cop's strategy in the publications on this subject is: remove a removable vertex, and then follow the optimal strategy (recursively) for the remaining graph, pretending that the robber is on the parent of the removed vertex whenever it is actually on the removed vertex. Then, when you think you've won according to this strategy, you will either have actually won, or achieved a position where the robber is on the removed vertex and you're on its parent (where you're pretending that the robber is). But in this case, you can win in one more move.<br /><br />One way to visualize this strategy is to draw a tree representing the parent of each removed vertex, together with numbers indicating the order in which the vertices were removed:<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/polyhex-cop-tree.png"></div><br /><br />Then, at each turn, add back one more vertex (in the reverse of the order that they were removed) and move to the lowest-numbered ancestor of the robber's current position among the ones that have been added back so far. For instance, in the position shown, to figure out what to do on your first move, you would add back hex 28, realize that the lowest-numbered ancestor of the robber's position is hex 29 (the one you're already on), and pass. After the robber moves, you would add back hex 27, and (since all moves for the robber land in the subtree of hex 27) move there. Etc.<br /><br />But this strategy involves keeping track of a spanning tree, a numbering, and a current set of added-back tiles. Maybe for the hex board there's a simpler strategy based only on your position and the position of the robber?<br /><br />And finally, what about other kinds of game tiles? Square tiles don't work with edge-to-edge adjacency: the robber can evade the cop by staying on the opposite side of a 4-cycle. But for squares with corner adjacency (and no holes) the cop can always win; for instance, consider cops and robbers that move like kings on a chessboard. Being planar with only three game tiles meeting at a corner isn't good enough for the cop to win: the robber always wins on a dodecahedron by staying as far as possible from the cop. Maybe some other polyforms than polyhexes will also allow the cop to always win.<a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:334024Linkage2016-08-16T06:26:40Z2016-08-16T06:26:40Z<ul><li><a href="https://en.wikipedia.org/wiki/Cap_set">Cap sets on Wikipedia</a> (mathematical models of stuck games of Set; <a href="https://plus.google.com/100003628603413742554/posts/RkVX65trjwZ">G+</a>)</li><br /><li><a href="https://www.quantamagazine.org/20160802-unified_theory_of_randomness">A unified theory of random shapes</a> (<a href="https://plus.google.com/u/0/100003628603413742554/posts/6FffXg7DdUe">G+</a>)</li><br /><li><a href="https://plus.google.com/100749485701818304238/posts/iDZ6KHwmF6S">Visualization of star polyhedra as surfaces of nonzero genus</a> (<a href="https://plus.google.com/100003628603413742554/posts/fZPUFz9odyg">G+</a>)</li><br /><li><a href="https://williamspaniel.com/2014/05/25/game-theory-is-really-counterintuitive/">Game theory weirdness</a> (<a href="https://plus.google.com/100003628603413742554/posts/QFEzWhmzbUk">G+</a>)</li><br /><li><a href="http://www.designboom.com/art/ventricle-installations-softlab-festival-love-london-uk-07-30-2016/">Ventricle by softlab</a>, hanging meshed membrane artwork (<a href="https://plus.google.com/100003628603413742554/posts/iEAbqWJn1r4">G+</a>)</li><br /><li><a href="https://www.insidehighered.com/news/2016/08/08/letter-publishers-group-adds-debate-over-sci-hub-and-librarians-who-study-it">A publishing industry association tries to spread FUD over open-access research</a> (<a href="https://plus.google.com/100003628603413742554/posts/8dQAY4YN4JZ">G+</a>; see also <a href="http://www.metafilter.com/161645/Association-of-American-Publishers-Pick-on-Wrong-Librarian">MF</a>)</li><br /><li><a href="http://www.atlasobscura.com/articles/the-secret-polish-university-for-women-where-marie-curie-got-her-start">Marie Curie and the underground university for women</a> (<a href="https://plus.google.com/100003628603413742554/posts/ERfXAuoy2YR">G+</a>)</li><br /><li><a href="http://www.designboom.com/architecture/hypargate-installation-stereotomy-italy-08-09-2016/">Stone hypar stereotomy</a> (<a href="https://plus.google.com/100003628603413742554/posts/aXgiY3PkaFs">G+</a>)</li><br /><li><a href="http://logo.twentygototen.org/LKqy-IDM">Run Logo programs in your browser</a> (<a href="https://plus.google.com/100003628603413742554/posts/LSnaCLLyh31">G+</a>)</li><br /><li><a href="http://gizmodo.com/internet-access-is-now-a-basic-human-right-1783081865">Internet access is a human right</a> which <a href="http://www.metafilter.com/161606/Indian-government-blacks-out-internet-in-Kashmir">India is violating</a> (<a href="https://plus.google.com/100003628603413742554/posts/HzWHiLyxDU7">G+</a>)</li><br /><li><a href="http://www.cmog.org/collection/exhibitions/blaschka">Leopold Blaschka's glass sea creatures</a> (<a href="https://plus.google.com/100003628603413742554/posts/8jMJ77h6S2b">G+</a>)</li><br /><li><a href="http://gizmodo.com/amazing-photographs-capture-the-microscopic-iridescence-1768121093">Peacock feather macrophotography</a> (<a href="https://plus.google.com/100003628603413742554/posts/NeTjtAg4txc">G+</a>)</li><br /><li><a href="https://spacesymmetrystructure.wordpress.com/2014/05/15/force-polygons-of-equilibrium-structures/">Force polygons of equilibrium structures</a> (<a href="https://plus.google.com/100003628603413742554/posts/eR3FHt4RCFn">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:333802Bichromatic Euclidean minimum spanning trees2016-08-07T23:37:46Z2016-08-07T23:37:46ZOne of the talks at CCCG was by Ahmad Biniaz, on <a href="http://www.cglab.ca/~biniaz/papers/Red-Blue-Purple.pdf">red-blue-purple spanning graphs</a>: given a partition of a point set into red, blue, and purple points, find a minimum-weight graph such that the red-purple and blue-purple subsets induce connected subgraphs. It can be solved by <a href="https://en.wikipedia.org/wiki/Matroid_intersection">matroid intersection</a>, but this is slow and Biniaz talked about a faster special case. Anyway, in his talk, Ahmad mentioned a different colored spanning problem: find a minimum spanning tree of the complete bipartite geometric graph determined by a set of red and blue points in the Euclidean plane (with no purple this time). He noted that bichromatic closest pairs can be used to solve it in time <i>O</i>(<i>n</i> log<sup>8</sup> <i>n</i>), and asked whether a faster algorithm is possible. The illustration below gives an example of this problem and its solution.<br /><br /><div align="center"><img src="http://www.ics.uci.edu/~eppstein/0xDE/BCMST.png"></div><br /><br />Although Ahmad didn't go into detail, the <i>O</i>(<i>n</i> log<sup>8</sup> <i>n</i>) bound that he mentioned is not hard to achieve by a form of the Prim–Dijkstra–Jarník minimum spanning tree algorithm. This algorithm maintains a tree on a subset of the input graph vertices (red and blue points in our case) and at each step adds to it the shortest edge to a new vertex. We split the problem of finding the shortest edge into two subproblems, one of finding the shortest distance between a red point in the tree and a blue point outside the tree, and a second one with the colors reversed. For both problems, we need to maintain a dynamic red-blue point set and find the closest red-blue pair, which is exactly the bichromatic closest pair problem. My paper <a href="http://www.ics.uci.edu/~eppstein/pubs/Epp-DCG-95.pdf">"Dynamic Euclidean minimum spanning trees and extrema of binary functions" (DCG 1995)</a> shows how to solve dynamic bichromatic closest pairs using another data structure for dynamic (uncolored) nearest neighbor queries, in <i>O</i>(log<sup>2</sup> <i>n</i>) nearest-neighbor operations per closest-pair update, and Chan's paper <a href="https://cs.uwaterloo.ca/~tmchan/dch3d.pdf">"A dynamic data structure for 3-d convex hulls and 2-d nearest neighbor queries" (SODA 2006)</a> gives a randomized method for dynamic nearest neighbor queries with <i>O</i>(log<sup>6</sup> <i>n</i>) time per update. Putting these two data structures together and using them to find each successive edge to add to the tree in the Prim–Dijkstra–Jarník minimum spanning tree algorithm gives the claimed <i>O</i>(<i>n</i> log<sup>8</sup> <i>n</i>) (randomized) time bound.<br /><br />But of course, Prim–Dijkstra–Jarník is not the only way to compute minimum spanning trees, and for this problem it turns out to work better to use Borůvka's algorithm. This algorithm maintains a forest (initially with each vertex in its own one-node tree) and at each stage of the algorithm adds a set of edges, the shortest edges connecting each tree to a vertex outside of it. The number of trees goes down by a factor of two or more in each stage, so there are <i>O</i>(log <i>n</i>) stages. To solve this efficiently for red-blue point sets, the problem we need to solve is the following: given a partition of the points into subsets (the current trees), find for each point the nearest oppositely-colored point that's not in its own tree. Let's call this the "nearest unrelated point" problem, as a convenient shorthand.<br /><br />To solve the nearest unrelated point problem, number the subsets of the partition, and represent each of these numbers in binary as a sequence of <i>O</i>(log <i>n</i>) bits. Define a "canonical set" <i>C</i>(<i>p</i>,<i>b</i>,<i>c</i>) to be the subset of points that belong to a set whose label's <i>p</i>th bit is <i>b</i>, and whose color is <i>c</i>. Then for a point <i>q</i>, the subset of points that are unrelated to <i>q</i> can be expressed as a union of logarithmically many canonical sets <i>C</i>(<i>p</i>,<i>b</i>,<i>c</i>), one for each possible value of <i>p</i>, where <i>b</i> is the complement of the <i>p</i>th bit of the label for <i>q</i>'s subset, and <i>c</i> is the opposite color to <i>q</i>. Therefore, we can solve the nearest unrelated point problem by computing a Voronoi diagram for each canonical set, and building a point location data structure for each Voronoi diagram. For each point <i>q</i> we query the canonical sets whose union is the set of unrelated points to <i>q</i>, and combine the result of the queries to find <i>q</i>'s nearest unrelated point. There are <i>O</i>(log <i>n</i>) Voronoi diagrams, each of which takes logarithmic time to build, after which we take <i>O</i>(log<sup>2</sup> <i>n</i>) time per point to query these diagrams. So the total time for all nearest unrelated points is <i>O</i>(<i>n</i> log<sup>2</sup> <i>n</i>).<br /><br />Since Borůvka's algorithm takes logarithmically many stages, and each stage can be performed using a single computation of all nearest unrelated points, the total time to construct the bichromatic minimum spanning tree is <i>O</i>(<i>n</i> log<sup>3</sup> <i>n</i>). I'm not entirely satisfied with this bound, though. Although much improved from the bichromatic closest pair solution, it still has too many logs. And what I'd really prefer would be a construction like the usual Euclidean minimum spanning tree one, where we find a single sparse graph guaranteed to contain the optimal spanning tree, and then just run a graph algorithm on that graph. So I think there's still more to do on this problem.<a name='cutid1-end'></a>urn:lj:livejournal.com:atom1:11011110:333508Some recent talk slides2016-08-06T00:14:47Z2016-08-06T00:14:47ZThis week I've been in Vancouver for the Canadian Conference on Computational Geometry, where I spoke about <a href="http://11011110.livejournal.com/332331.html">radius-sum optimization</a>. This seemed like a good occasion to post a pointer to the slides from my recent conference talks (and to go back through the talks to make sure their slides were all online), so here they are:<br /><ul><li><a href="http://www.ics.uci.edu/~eppstein/pubs/BalDamEpp-SODA-15-slides.pdf">"Minimum forcing sets for Miura folding patterns"</a>, SODA 2015.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/BokCabEpp-GD-15-slides.pdf">"Finding all maximal subsequences with hereditary properties"</a>, SoCG 2015.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/AlaEppKau-WADS-15-slides.pdf">"Contact graphs of circular arcs"</a>, WADS 2015.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/EppMcCPar-WADS-15-slides.pdf">"Rooted cycle bases"</a>, WADS 2015.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/Epp-WADS-15-slides.pdf">"The parametric closure problem"</a>, WADS 2015.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/DujEppWoo-GD-15-slides.pdf">"Genus, treewidth, and local crossing number"</a>, GD 2015.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/Epp-SODA-16-slides.pdf">"Treetopes and their graphs"</a>, SODA 2016.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/EppKinKob-LATIN-16-slides.pdf">"On the planar split thickness of graphs"</a>, LATIN 2016.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/EppHir-LATIN-16-slides.pdf">"From discrepancy to majority"</a>, LATIN 2016.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/Epp-SWAT-16-slides.pdf">"Cuckoo filter: simplification and analysis"</a>, SWAT 2016.</li><br /><li><a href="http://www.ics.uci.edu/~eppstein/pubs/Epp-CCCG-16-slides.pdf">"Maximizing the sum of radii of disjoint balls or disks"</a>, CCCG 2016.</li></ul>urn:lj:livejournal.com:atom1:11011110:333234Linkage2016-08-01T05:13:28Z2016-08-01T05:14:55Z<ul><li><a href="https://en.wikipedia.org/wiki/Kate_Claghorn">Kate Claghorn</a>, forgotten giant of the Progressive Era (<a href="https://plus.google.com/100003628603413742554/posts/61km89LT2Mo">G+</a>)</li><br /><li><a href="https://github.com/jipsen/latexmathjax">latexmathjax</a>, turn latex sources into nicely formatted web pages by putting them in the same folder as a short html stub (<a href="https://plus.google.com/100003628603413742554/posts/ayYApNQXe39">G+</a>)</li><br /><li><a href="https://www.quantamagazine.org/20150408-a-grand-theory-of-wrinkles/">The physics of wrinkles vs dimples</a> (<a href="https://plus.google.com/100003628603413742554/posts/HNX79qcDo35">G+</a>)</li><br /><li><a href="http://www.reuters.com/article/turkey-security-universities-idUSI7N1A1000">The post-coup crackdown in Turkey extends to higher education</a> (<a href="https://plus.google.com/100003628603413742554/posts/CSCyusj2ztp">G+</a>)</li><br /><li><a href="https://www.insidehighered.com/blogs/mama-phd/plagiarism-rubric">A plagiarism rubric</a>, or maybe a catalog of excuses (<a href="https://plus.google.com/100003628603413742554/posts/7HK2dVmgFB3">G+</a>)</li><br /><li><a href="http://www.polyscene.com/curved/index.htm">Curved folds by Polly Verity</a> (<a href="https://plus.google.com/100003628603413742554/posts/HaqAX4hWLDf">G+</a>)</li><br /><li><a href="http://www.amstat.org/newsroom/pdfs/2016-ASAFellows.pdf">Fellows of the American Statistical Association</a> (<a href="https://plus.google.com/100003628603413742554/posts/MUr1G3hDqbq">G+</a>)</li><br /><li><a href="http://processalgebra.blogspot.com/2016/07/report-on-eatcs-general-assembly-at.html">ICALP business meeting report</a> with discussions on the health of Track C and on strictness of proceedings formatting (<a href="https://plus.google.com/100003628603413742554/posts/cAY68TiYKcs">G+</a> with more discussion)</li><br /><li><a href="https://heatst.com/politics/wikileaks-posts-and-deletes-anti-semitic-tweet-as-it-does-putins-bidding-for-trump/">Wikileaks squanders its legacy for a mess of pottage</a> (<a href="https://plus.google.com/100003628603413742554/posts/ftNG6UwZhNL">G+</a>)</li><br /><li><a href="http://www.dw.com/en/dont-call-me-a-prodigy-the-rising-stars-of-european-mathematics/a-19421389">Former refugee Sara Zahedi</a> and the other winners of the EMS Prize (<a href="https://plus.google.com/100003628603413742554/posts/fk2odrRHMRa">G+</a>)</li><br /><li><a href="http://algo.math.ntua.gr/~gd2016/index.php?id=accepted-papers">Accepted papers for Graph Drawing</a> (<a href="https://plus.google.com/100003628603413742554/posts/SYFwbLWpq5f">G+</a>)</li><br /><li><a href="http://chronicle.com/article/1999-Opening-Lab-Doors-to/237194">Fighting anti-women discrimination in science in 1999</a> (<a href="https://plus.google.com/100003628603413742554/posts/PiJckREzWoN">G+</a>)</li><br /><li><a href="https://www.theguardian.com/science/gallery/2016/jul/27/astronomy-photographer-of-the-year-2016-shortlist-in-pictures">Astronomy photo of the year candidates</a> (<a href="https://plus.google.com/100003628603413742554/posts/WMaZGPCSHeU">G+</a>)</li><br /><li><a href="http://phys.org/news/2016-07-refutes-famous-physical.html">Reversible logic unnecessary for ultra-low power</a> (<a href="https://plus.google.com/100003628603413742554/posts/K4U8kWKkyaX">G+</a>)</li><br /><li><a href="https://www.technologyreview.com/s/602025/how-vector-space-mathematics-reveals-the-hidden-sexism-in-language/">When AIs learn language from human texts, they pick up human sexism</a> (<a href="https://plus.google.com/100003628603413742554/posts/dJwsyEu2fk4">G+</a>)</li><br /><li><a href="https://www.youtube.com/watch?v=IqrsptUdxHs">Promotional video</a> on the algorithmic design of caustics (<a href="https://plus.google.com/100003628603413742554/posts/9hachv2Fn3y">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:332980Linkage2016-07-16T05:51:38Z2016-07-16T05:51:38ZMore actual posts from the last couple of weeks means fewer links.<br /><ul><li><a href="https://www.youtube.com/watch?v=oWfFco7K9v8">Squircle illusion</a>: now 3d printing can make things round and square at the same time (<a href="https://plus.google.com/100003628603413742554/posts/bBUP52zARpB">G+</a>)</li><br /><li><a href="http://archive.bridgesmathart.org/">The latest wonders of mathematical art from Bridges 2016</a> (<a href="https://plus.google.com/100003628603413742554/posts/NBbD7gkShq2">G+</a>)</li><br /><li><a href="https://sympa.inria.fr/sympa/arc/compgeom-announce/2016-07/msg00002.html">CCCG accepted papers</a> (<a href="http://www.sfu.ca/~shermer/CCCG2016/schedule.pdf">or now there's an actual schedule</a>; <a href="https://plus.google.com/100003628603413742554/posts/Xyv25CoLuzu">G+</a>)</li><br /><li><a href="http://chronicle.com/article/The-U-of-California-s/237044">Low faculty uptake of the University of California's all-subjects open access repository</a> (<a href="https://plus.google.com/100003628603413742554/posts/HBAEJQsmb3M">G+</a>, many good comments)</li><br /><li><a href="https://www.youtube.com/watch?v=WMqmKHcI38A">20-minute nontechnical video documentary about recent hacking culture</a> (<a href="https://plus.google.com/100003628603413742554/posts/eueyjuz7ncr">G+</a>)</li><br /><li><a href="http://blog.wolfram.com/2013/03/28/from-close-to-perfect-a-triangle-problem/">How can you divide a square into finitely many similar acute triangles?</a> (<a href="https://plus.google.com/100003628603413742554/posts/hvYyP72KT34">G+</a>)</li><br /><li><a href="http://blogs.plos.org/plos/2016/07/impact-factors-do-not-reflect-citation-rates/">No article can be judged on the basis of the Impact Factor of the journal in which it is published</a> (<a href="https://plus.google.com/100003628603413742554/posts/GsFnL16BcJX">G+</a>)</li><br /><li><a href="https://www.quantamagazine.org/20160712-hyperuniformity-found-in-birds-math-and-physics">Uniformly-spaced point sets in nature</a> (see also <a href="https://en.wikipedia.org/wiki/Delone_set">Wikipedia on Delone sets</a>; <a href="https://plus.google.com/100003628603413742554/posts/E5vzYhkWpoB">G+</a>)</li><br /><li><a href="http://blog.plover.com/math/17-puzzle.html">A trickier variant of the 4 4's puzzle</a> (<a href="https://plus.google.com/100003628603413742554/posts/4HWgNELfx3A">G+</a>, with spoilers in the comments)</li><br /><li><a href="http://www.theestablishment.co/2016/07/11/even-doing-academic-research-on-video-games-puts-me-at-risk/">Researchers keeping a low online profile</a> in the face of persistent harassment of anyone who criticizes misogyny in computer gaming (<a href="https://plus.google.com/100003628603413742554/posts/YKUU5XJxW6T">G+</a>)</li></ul>urn:lj:livejournal.com:atom1:11011110:332617Preprocessing arrays for fast sorted-subarray queries2016-07-14T01:02:11Z2016-07-14T01:02:11ZSuppose you have an array of <i>n</i> real numbers (or other totally ordered values that you can compare but not treat as small integers). You want to answer queries that specify a contiguous subarray and return the sorted sequence of values within that subarray. Without any preprocessing you could query a subarray of length <i>k</i> in time <i>O</i>(<i>k</i> log <i>k</i>), by pulling out the subarray and then comparison sorting it. With preprocessing, how much better can we do?<br /><br />The obvious answer would be to sort the input, and replace each real number by an integer, its position in the sorted sequence. Doing this would allow us to use <a href="https://en.wikipedia.org/wiki/Integer_sorting">integer sorting</a> algorithms to handle each query. This works particularly well for long queries (longer than <i>n</i><sup><i>ε</i></sup> for some <i>ε</i> > 0), because then you can use <a href="https://en.wikipedia.org/wiki/Radix_sort">radix sort</a> to answer the query in linear time. But it is still somewhat problematic for shorter queries, where we don't have time to set up and then take down the big arrays used by radix sort, and where other integer sorting algorithms are both less practical than radix sort and slower than linear time.<br /><br />So here's a trick that works better. For each <i>i</i> from 1 to log<sup>*</sup> <i>n</i>, divide the array into sub-arrays of size 2<sup>2<sup><i>i</i></sup></sup>. Sort these subarrays (by merging the smaller subarrays from the next smaller value of <i>i</i>) and, for each element, write down its position in the sorted subarray; this is a 2<sup><i>i</i></sup>-bit binary number. Then, for each element of the whole big array, write down one number, the concatenation of these numbers for all the subarrays. (It works best if the bigger subarrays get more-significant bits of the concatenation.) That way, each of the original inputs gets an index number that is still only <i>O</i>(log <i>n</i>) bits long. By doing the recursive array partition top-down instead of bottom-up you can make the number of bits at most 2 log <i>n</i>, and by using a larger base than 2 you can make it at most (1 + <i>ε</i>)log <i>n</i> for any <i>ε</i> > 0.<br /><br />Then, to handle any query subarray of length <i>k</i>, decompose the query into at most two of the subarrays of the recursive decomposition above that are both of length <i>O</i>(<i>k</i><sup>2</sup>). Mask off the higher order bits of the index numbers within those subarrays so that the remaining number of bits is <i>O</i>(log <i>k</i>), small enough that radix sort can be used to sort these numbers in linear time. Merge the two sorted subarrays to give the answer to the query.<br /><br />The time to preprocess the input is <i>O</i>(<i>n</i> log <i>n</i>), unsurprising since we have to comparison sort somewhere. But the space for the resulting data structure is only <i>O</i>(<i>n</i>), and it allows sorted-subarray queries in time linear in the length of the subarray.<a name='cutid1-end'></a>