<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:11011110</id>
  <title>0xDE</title>
  <subtitle>0xDE</subtitle>
  <author>
    <name>0xDE</name>
  </author>
  <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom"/>
  <updated>2013-05-24T01:18:26Z</updated>
  <lj:journal userid="7784841" username="11011110" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://11011110.livejournal.com/data/atom" title="0xDE"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:268863</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/268863.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=268863"/>
    <title>Congratulations, Dr. Trott!</title>
    <published>2013-05-24T01:17:10Z</published>
    <updated>2013-05-24T01:18:26Z</updated>
    <category term="uci"/>
    <content type="html">Lowell Trott, one of the theory students here at UCI, successfully defended his thesis yesterday. Lowell's Ph.D. advisor is Mike Goodrich, but I've also &lt;a href="http://www.ics.uci.edu/~eppstein/pubs/a-trott"&gt;worked with him&lt;/a&gt; on several publications related to both social networks and road networks. (Although the vertices in road networks are not people, the networks still come from a social structure.) Specifically, he:&lt;ul&gt;&lt;li&gt;&lt;a href="http://arxiv.org/abs/0909.2891"&gt;Showed that road networks have the property that any line of sight crosses only a small number of roads&lt;/a&gt;, both empirically and in a mathematical model of these networks based on circle packings;&lt;/li&gt;&lt;li&gt;&lt;a href="http://arxiv.org/abs/1009.0783"&gt;Developed data structures for taking a census of different kinds of small subgraphs in a social network&lt;/a&gt;, with efficiency bounded by a parameter that is small for real-world networks;&lt;/li&gt;&lt;li&gt;&lt;a href="http://arxiv.org/abs/1108.4675"&gt;Showed how greedy routing can be used by actors in a social network&lt;/a&gt; using estimates of the distance to a destination based on shared characteristics rather than geometric coordinates; and&lt;/li&gt;&lt;li&gt;&lt;a href="http://arxiv.org/abs/1209.0748"&gt;Used gravitational forces to move the more important vertices in a social network towards the center of its drawing&lt;/a&gt;, also providing more compact graph layouts that allow the size of individual features to be larger relative to the overall layout area.&lt;/li&gt;&lt;/ul&gt;My understanding is that he has accepted a position at Google, starting in the fall. Congratulations, Lowell!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:268793</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/268793.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=268793"/>
    <title>Cheap fountain pen comparison</title>
    <published>2013-05-21T00:02:43Z</published>
    <updated>2013-05-21T00:02:43Z</updated>
    <category term="tools"/>
    <content type="html">For the past few years I've been carrying around a small notebook to jot down notes from talks, research ideas, expenses, etc. (I guess I could do it on my phone but I prefer pen and paper.) I like writing with fountain pens, but don't care to carry around an expensive one: I don't feel I need to impress people with how much I spend on accessories, and I don't want to worry about losing it. I had been using disposable Pilot Varsity pens, but occasionally (especially if I took them on airplanes) I would end up with ink all over my fingers, so I recently tried switching to an inexpensive refillable pen, the Lamy Safari (fine point, with refilling attachment and Noodler's forest green ink). Below is a comparison of how my notes look with the two pens:&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/0xDE/PilotVarsity.jpg"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/0xDE/LamySafari.jpg"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The Lamy feels less scratchy than the Pilots, but I didn't really mind the scratchiness. The more important differences in the way it feels to me are that the Lamy's bigger size fits my hand better and lets me hold my fingers a little farther away from the tip (making inky fingers less likely), and its triangular cross-section gives me a more consistent orientation, so I find myself holding the pen the wrong way less often. The writing comes out less blotchy, with better control of the line weight, and I don't feel that I have to write as large to make it legible. There's also significantly less bleed-through on the Moleskine square-ruled paper I've been using, although it's still nonzero.&lt;a name='cutid1-end'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I still don't know if these pens are more reliable in the air, but on the whole I'd say this is a big step up in writing quality.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:268458</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/268458.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=268458"/>
    <title>Some polyhedral combinatorics</title>
    <published>2013-05-17T07:37:36Z</published>
    <updated>2013-05-17T07:37:36Z</updated>
    <category term="wikipedia"/>
    <category term="geometry"/>
    <content type="html">Today's new Wikipedia articles: &lt;a href="http://en.wikipedia.org/wiki/Hanner_polytope"&gt;Hanner polytopes&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Kalai%27s_3%5Ed_conjecture"&gt;Kalai's 3&lt;sup&gt;&lt;i&gt;d&lt;/i&gt;&lt;/sup&gt; conjecture&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The 3&lt;sup&gt;&lt;i&gt;d&lt;/i&gt;&lt;/sup&gt; conjecture states that a centrally symmetric &lt;i&gt;d&lt;/i&gt;-dimensional polytope must have at least 3&lt;sup&gt;&lt;i&gt;d&lt;/i&gt;&lt;/sup&gt; faces (of all dimensions including the &lt;i&gt;d&lt;/i&gt;-dimensional polytope itself as a face but not including the –1-dimensional empty set). For instance, the cube has 8 vertices, 12 edges, 6 squares, and 1 cube as faces; &lt;nobr&gt;8 + 12 + 6 + 1 = 27 = 3&lt;sup&gt;3&lt;/sup&gt;&lt;/nobr&gt;.&lt;br /&gt;&lt;br /&gt;The Hanner polytopes include the cubes, are closed under Cartesian products and duality, and if the conjecture is true have the fewest possible numbers of faces of all centrally symmetric &lt;i&gt;d&lt;/i&gt;-dimensional polytopes. They also have some other interesting properties. In 3d there are only the cube and the octahedron, but in higher dimensions there are a lot more of them.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:268225</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/268225.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=268225"/>
    <title>Pair programming meets group testing</title>
    <published>2013-05-02T06:04:56Z</published>
    <updated>2013-05-02T06:04:56Z</updated>
    <category term="group testing"/>
    <category term="papers"/>
    <content type="html">I have another new preprint: &lt;a href="http://arxiv.org/abs/1305.0110"&gt;Combinatorial Pair Testing: Distinguishing Workers from Slackers&lt;/a&gt; (with Mike Goodrich and Dan Hirschberg), arXiv:1305.0110, to appear at WADS.&lt;br /&gt;&lt;br /&gt;The story in this one is that we have students in a pair programming class, some of whom will do the work and some of whom will let their partner do all the work. But if two of the slackers get paired together, we can catch them, because then nobody does the work. So how do we choose partners for the assignments to be sure of catching everyone, with an assumption that only a small fraction of the students are slackers?&lt;br /&gt;&lt;br /&gt;Actually, we started out working on a different (but related) puzzle. We've been having a weekly tea with our theory students and faculty, at which we drink tea and also try to solve puzzles. &lt;a href="http://www.cs.cmu.edu/puzzle/puzzle1.html"&gt;The first one from the Puzzle TOAD&lt;/a&gt; is on distinguishing engineers (who always tell the truth) from managers (who will either tell the truth or lie, whichever of the two will confuse you the most) using as as few questions as possible about who is whom. It caught our attention at one of these teas, especially after we had some ideas for solving part 3 and saw that there was no official solution already given. Sadly, &lt;a href="http://www.math.iupui.edu/~bleher/Papers/1983_On_a_logical_problem.pdf"&gt;someone else with a time machine already got there first&lt;/a&gt;, so we had to find something else to work on.&lt;br /&gt;&lt;br /&gt;Speaking of time machines, if you like time travel movies and get a chance to see &lt;i&gt;Young Gun In The Time&lt;/i&gt;, do. It's a fun South Korean time-travel detective farce. I'd like to rewatch it to get a clearer idea of exactly what happened, but at this point the easiest way to do that seems to be to find a time machine of my own.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:267999</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/267999.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=267999"/>
    <title>A median graph of 213-avoiding permutations</title>
    <published>2013-04-23T18:23:25Z</published>
    <updated>2013-04-23T20:51:06Z</updated>
    <category term="media theory"/>
    <category term="permutohedron"/>
    <content type="html">If you make a graph with a vertex for each permutation of length &lt;i&gt;n&lt;/i&gt;, and an edge for two permutations related by a swap of adjacent values, it looks like this:&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/0xDE/inv-perm-color-on-gray.png"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;It has some nice properties: it's a &lt;a href="http://en.wikipedia.org/wiki/Hamiltonian_path"&gt;Hamiltonian&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Partial_cube"&gt;partial cube&lt;/a&gt; with isometric dimension &lt;i&gt;n&lt;/i&gt;(&lt;i&gt;n&lt;/i&gt;&amp;nbsp;&amp;minus;&amp;nbsp;1)/2, and the graph of an &lt;i&gt;n&lt;/i&gt;&amp;nbsp;&amp;minus;&amp;nbsp;1-dimensional polytope (the &lt;a href="http://en.wikipedia.org/wiki/Permutohedron"&gt;permutohedron&lt;/a&gt;) There's an easy way to compute distances in this graph (count the &lt;a href="http://en.wikipedia.org/wiki/Inversion_(discrete_mathematics)"&gt;inversions&lt;/a&gt;). But what if we consider a subset of the permutations, the ones avoiding the &lt;a href="http://en.wikipedia.org/wiki/Permutation_pattern"&gt;permutation pattern&lt;/a&gt; 213?&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;We get an induced subgraph of the permutohedron, but not an isometric subgraph: its distances may be very different. Here's what it looks like for &lt;i&gt;n&lt;/i&gt;&amp;nbsp;=&amp;nbsp;5:&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/0xDE/213-len5-swaps.png"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;(The colors come from a recursive construction in which the graph is decomposed into Cartesian products of smaller graphs of the same type, one for each possible position of the 1.)&lt;br /&gt;&lt;br /&gt;This turns out to also have nice properties, but different ones. It has a &lt;a href="http://en.wikipedia.org/wiki/Catalan_number"&gt;Catalan number&lt;/a&gt; of vertices, and a &lt;a href="http://en.wikipedia.org/wiki/Fibonacci_number"&gt;Fibonacci number&lt;/a&gt; of degree-one vertices. (The degree-one vertices all either start with 1 or start with 2 and end with 1, and are degree-one vertices in the smaller graph of swaps on the remaining subsequence after removing these boundary values, from which we get the Fibonacci recurrence.) And it's again a partial cube, but more strongly a &lt;a href="http://en.wikipedia.org/wiki/Median_graph"&gt;median graph&lt;/a&gt;. That is, every three 213-avoiding permutations &lt;i&gt;x&lt;/i&gt;, &lt;i&gt;y&lt;/i&gt;, and &lt;i&gt;z&lt;/i&gt; of the same length have a unique median &lt;i&gt;m&lt;/i&gt;(&lt;i&gt;x&lt;/i&gt;,&lt;i&gt;y&lt;/i&gt;,&lt;i&gt;z&lt;/i&gt;) that lies on a shortest path between each pair.&lt;br /&gt;&lt;br /&gt;I think the easiest way to show that this is a median graph is to express it as the system of solutions to a &lt;a href="http://en.wikipedia.org/wiki/2-satisfiability"&gt;2SAT&lt;/a&gt; problem. Given a 213-avoiding permutation &lt;i&gt;p&lt;/i&gt;, define an &lt;i&gt;upward set&lt;/i&gt; of &lt;i&gt;p&lt;/i&gt; to be a set &lt;i&gt;S&lt;/i&gt; of two or more elements of the permutation that occur in ascending sorted order in &lt;i&gt;p&lt;/i&gt;, with the additional property that, if the second-largest element of &lt;i&gt;S&lt;/i&gt; is &lt;i&gt;x&lt;/i&gt;, no element smaller than &lt;i&gt;x&lt;/i&gt; can be added to &lt;i&gt;S&lt;/i&gt; while preserving this sorted property. For instance, the permutation 654321 has no upward sets, but the permutation 651243 has five: {1,4}, {1,3}, {1,2}, {1,2,4}, and {1,2,3}. The set {2,3} is in ascending order in this permutation, but is not an upward set, because it is part of a larger set {1,2,3}. If you know the upward sets of a permutation, you can identify the permutation itself, as the largest and second largest element of each of these sets tell you which pairs of elements you need to swap relative to the downward-sorted permutation. Again, in the same example, to get the permutation 651243 from the downward permutation 654321, we should swap pairs 14, 13, 12, 24, and 23 (but only those pairs).&lt;br /&gt;&lt;br /&gt;In a 213-avoiding permutation, if &lt;i&gt;x&lt;/i&gt; is any element, then the elements that are smaller than and left of &lt;i&gt;x&lt;/i&gt; must be in ascending order and the upward sets with &lt;i&gt;x&lt;/i&gt; as largest element must be formed by adding &lt;i&gt;x&lt;/i&gt; to prefixes of this order. Therefore, if &lt;i&gt;S&lt;/i&gt; and &lt;i&gt;T&lt;/i&gt; are upward sets with the same largest element &lt;i&gt;x&lt;/i&gt;, then either the remaining elements of &lt;i&gt;S&lt;/i&gt; must form a prefix of the remaining elements of &lt;i&gt;T&lt;/i&gt; or vice versa; any other pair of sets &lt;i&gt;S&lt;/i&gt; and &lt;i&gt;T&lt;/i&gt; are incompatible. If &lt;i&gt;S&lt;/i&gt; is an upward set with three or more elements, then the set &lt;i&gt;U&lt;/i&gt; formed by removing the second largest element is also an upward set (formed by the prefix with one fewer element). And if &lt;i&gt;S&lt;/i&gt; is an upward set in which the largest two elements differ by more than one, then the set &lt;i&gt;V&lt;/i&gt; formed from &lt;i&gt;S&lt;/i&gt; by decrementing its largest element must also be upward, for the 213-avoiding property implies that the decremented value can only be to the right of the second-largest value.&lt;br /&gt;&lt;br /&gt;If a family of upward sets obeys these constraints and describes a permutation &lt;i&gt;p&lt;/i&gt;, then &lt;i&gt;p&lt;/i&gt; must be 213-avoiding. For, if not, and elements &lt;i&gt;x&lt;/i&gt;&amp;nbsp;&amp;lt;&amp;nbsp;&lt;i&gt;y&lt;/i&gt;&amp;nbsp;&amp;lt;&amp;nbsp;&lt;i&gt;z&lt;/i&gt; appear in &lt;i&gt;p&lt;/i&gt; in order &lt;i&gt;yxz&lt;/i&gt;, forming a 213 pattern, it would have an upward set whose largest two elements are &lt;i&gt;xz&lt;/i&gt;, and repeated application of the decrement-max operation would lead to an upward set whose largest two elements are &lt;i&gt;xy&lt;/i&gt;, which do not appear in that order in &lt;i&gt;p&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Any family of upward sets that does obey these constraints does describe a 213-avoiding permutation. By induction on the number of elements, the subfamily of upward sets that do not involve the largest element of the permutation describes a permutation on one fewer element. The position of the largest element can then be determined by the longest upward set &lt;i&gt;S&lt;/i&gt; containing it. The remove-second-largest and decrement-max operations can be used to show that the set formed by removing the largest element from &lt;i&gt;S&lt;/i&gt; must appear in sorted order at the start of the smaller permutation, from which it follows that adding the largest element to the permutation in the appropriate place gives the correct family of upward sets.&lt;br /&gt;&lt;br /&gt;Therefore, if we make a 2SAT instance whose variables are the sets of two or more elements, with implications from &lt;i&gt;S&lt;/i&gt; to &lt;i&gt;U&lt;/i&gt;, to &lt;i&gt;V&lt;/i&gt;, and to the negation of &lt;i&gt;T&lt;/i&gt;, for each of the sets &lt;i&gt;U&lt;/i&gt;, &lt;i&gt;V&lt;/i&gt;, and each incompatible set &lt;i&gt;T&lt;/i&gt; described above, then the satisfying truth assignments of this instance are exactly the families of upward sets of 213-avoiding permutations, and the swap graph of these permutations is exactly the graph of single-variable changes to satisfying truth assignments. Since the graph of every 2SAT instance is a median graph, the swap graph of 213-avoiding permutations is also a median graph.&lt;br /&gt;&lt;br /&gt;The distance between any two permutations in this graph is the number of upward sets that belong to one but not both of them. The median of any three permutations can be found by choosing the family of upward sets that belong to at least two of them. And this method also allows us to immediately read off the isometric dimension of the graph of 213-avoiding permutations on &lt;i&gt;n&lt;/i&gt; elements: it is an &lt;a href="http://en.wikipedia.org/wiki/Eulerian_number"&gt;Eulerian number&lt;/a&gt;, 2&lt;sup&gt;&lt;i&gt;n&lt;/i&gt;&lt;/sup&gt;&amp;nbsp;&amp;minus;&amp;nbsp;&lt;i&gt;n&lt;/i&gt;&amp;nbsp;&amp;minus;&amp;nbsp;1.&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:267767</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/267767.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=267767"/>
    <title>Parameterized complexity of 1-planarity</title>
    <published>2013-04-23T02:57:29Z</published>
    <updated>2013-04-23T02:57:29Z</updated>
    <category term="graph algorithms"/>
    <category term="graph drawing"/>
    <category term="papers"/>
    <content type="html">I have a new preprint out with Michael Bannister and Sergio Cabello, "Parameterized complexity of 1-planarity", &lt;a href="http://arxiv.org/abs/1304.5591"&gt;arXiv:1304.5591&lt;/a&gt;, to appear at &lt;a href="http://www.wads.org/"&gt;WADS&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;A graph is 1-planar if it can be drawn in the plane with at most one crossing per edge; the hope is that this style of drawing can be more versatile than completely forbidding crossings while still being constrained enough to keep the drawings readable. However, finding a 1-planar drawing is NP-hard. Our goal in this paper was to explore restrictions on input graphs that might make the problem easier, focusing on parameterized analysis rather than on special classes of graphs. We found some parameters that, when bounded, allow the problem to be solved by a polynomial time algorithm (with a small polynomial exponent but huge constant factors): &lt;a href="http://en.wikipedia.org/wiki/Vertex_cover"&gt;vertex cover number&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Tree-depth"&gt;tree-depth&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Circuit_rank"&gt;circuit rank&lt;/a&gt;. The main idea for these algorithms is to reduce the input to a kernel whose size is bounded by a function of the parameter, before switching to a brute force algorithm. For instance, the kernelization for vertex cover number involves eliminating degree-one vertices and reducing the size of sets of degree-two vertices that all have the same two neighbors:&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/0xDE/cover-kernel.png"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;A more commonly seen parameter for this sort of problem is &lt;a href="http://en.wikipedia.org/wiki/Treewidth"&gt;treewidth&lt;/a&gt;. Many problems (and several important general families of problems) are known to be polynomial for graphs of bounded treewidth, but 1-planarity turns out not to be one of them. As we show the problem remains NP-complete in this case, as well as for graphs of bounded pathwidth and bounded bandwidth. The proof is just a standard gadget-based reduction, but not an easy one, and unfortunately we won't have space to include it in the conference version of the paper. One of the key ideas is the following construction, which (using some additional gadgets) forces a graph of bounded pathwidth to be drawn in a spiral pattern, providing a grid-like substrate over which the rest of the reduction can be forced to spread.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/0xDE/low-bandwidth-2x-spiral.png"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;There are still some interesting parameters as well as special classes of graphs for which we don't know whether 1-planarity is polynomial time. For instance, parameterizing by feedback vertex set size would generalize both our vertex cover and circuit rank results. We also don't know whether testing 1-planarity is polynomial for chordal graphs, or for distance-hereditary graphs.&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:267323</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/267323.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=267323"/>
    <title>WADS acceptances</title>
    <published>2013-04-15T05:38:50Z</published>
    <updated>2013-04-15T05:38:50Z</updated>
    <category term="conferences"/>
    <category term="papers"/>
    <content type="html">The &lt;a href="http://134.117.54.232/wads/program"&gt;list of accepted papers&lt;/a&gt; for &lt;a href="http://wads.org/"&gt;WADS 2013&lt;/a&gt; is out. No abstracts, just titles and authors, but some of the papers can be found online elsewhere as preprints. (Not mine yet, but soon.)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:267146</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/267146.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=267146"/>
    <title>Bending Reality</title>
    <published>2013-04-14T22:34:41Z</published>
    <updated>2013-04-14T22:34:41Z</updated>
    <category term="graph drawing"/>
    <category term="conferences"/>
    <category term="art"/>
    <category term="photography"/>
    <content type="html">The Dagstuhl workshop I just attended included an art exhibit, &lt;a href="http://www.dagstuhl.de/no_cache/en/about-dagstuhl/news/detail/meldung/475/"&gt;&lt;i&gt;Bending Reality: Where arc and science meet&lt;/i&gt;&lt;/a&gt;, of maps and illustrations featuring curved graphs; I had several pieces in it. It was lots of fun to see images such as &lt;a href="http://commons.wikimedia.org/wiki/File:Petersen_family.svg"&gt;this one&lt;/a&gt; and &lt;a href="http://commons.wikimedia.org/wiki/File:Nauru_graph_3d.png"&gt;this one&lt;/a&gt; printed out in a large size (70 x 100 cm) and framed as art, rather than just used as technical illustrations.&lt;br /&gt;&lt;br /&gt;The space the exhibit was shown in consisted of four long corridors with lots of natural light from windows into an atrium area; it worked well for viewing the art, but not so well for photographing the exhibit (and my failure to bring a wide angle lens didn't help, either). Anyway, the images in the show are all better viewed directly online rather than as photographs of framed printouts. So I only kept &lt;a href="http://www.ics.uci.edu/~eppstein/pix/bending-reality/"&gt;a few photos as an impression of what the exhibit was like&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/pix/bending-reality/OldBerlinAndNewDagstuhl-m.jpg" border="2" style="border-color:black;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Supposedly there's a plan to make a web site of the exhibit catalog; I'll link it here once it exists.&lt;br /&gt;See also &lt;a href="http://ongraphs.de/blog/2013/04/drawings-of-metro-maps/"&gt;André Schulz's blog post on the metro maps in the exhibit&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:266987</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/266987.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=266987"/>
    <title>The Golden Ticket</title>
    <published>2013-04-13T15:55:17Z</published>
    <updated>2013-04-13T15:57:31Z</updated>
    <category term="complexity theory"/>
    <category term="books"/>
    <content type="html">As airplane reading to and from my recent trip to Dagstuhl, I used a review copy of Lance Fortnow's new popularization of the P vs NP problem, &lt;i&gt;The Golden Ticket: P, NP, and the Search for the Impossible&lt;/i&gt;. It's well written and explains the problem well in layman's terms, something I think has been sorely needed.&lt;br /&gt;&lt;br /&gt;As Lance carefully explains towards the end of Chapter 7, the inference from the assertion that we can only find a complete solution to an NP-complete problem by performing a brute force search of all solutions, to the assertion that P ≠ NP, forms one of the most common ways of writing a fallacious solution of the P vs NP problem. It is fallacious not because it is an invalid inference, but because it does not get rid of the need to prove something difficult: it might not be true that brute force search is the best way we can solve such problems. But it was a little disappointing that Lance did not go on to say that it is &lt;i&gt;already proven&lt;/i&gt; that a naive brute force search is not always the best solution. Indeed, several times Lance seems to imply the equally fallacious reverse inference, from P ≠ NP to the idea that the best complete solution to an NP-complete problem must be a brute force search. For instance, this attitude is embodied in his equation of NP-completeness to "Perebor". &lt;a href="http://cacm.acm.org/magazines/2013/3/161189-exact-exponential-algorithms"&gt;This recent CACM article&lt;/a&gt; provides a welcome antidote, by describing several instances of surprising solutions to NP-complete problems that are not brute force searches and that are significantly faster than brute force (although of course not polynomial).&lt;br /&gt;&lt;br /&gt;Despite this quibble (and smaller ones, for instance: who but a theoretician would recommend Floyd–Warshall for finding all-pairs unweighted shortest paths when one can just use repeated breadth first searches?) I think this book has an important role to play, in clearly explaining to the rest of the world just why computer scientists find the P vs NP problem so interesting and important.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:266622</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/266622.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=266622"/>
    <title>A brief history of curves in graph drawing</title>
    <published>2013-04-08T19:34:47Z</published>
    <updated>2013-04-09T06:51:41Z</updated>
    <category term="graph drawing"/>
    <category term="conferences"/>
    <category term="talks"/>
    <content type="html">I'm in Dagstuhl this week for a workshop on &lt;a href="http://www.dagstuhl.de/en/program/calendar/semhp/?semnr=13151"&gt;Drawing Graphs and Maps with Curves&lt;/a&gt;. I gave a talk today surveying the use of curved edges in graph drawing, which may be older than you might think. For instance, did you know that &lt;a href="https://en.wikipedia.org/wiki/Linear_embedding"&gt;arc diagrams&lt;/a&gt;, named from a 2002 paper by Wattenberg in information visualization, actually go back to two papers from the 1960s on crossing minimization? &lt;a href="http://www.ics.uci.edu/~eppstein/pubs/Dagstuhl-curves.pdf"&gt;Here are my talk slides&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:266302</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/266302.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=266302"/>
    <title>Jaffas</title>
    <published>2013-04-06T06:50:23Z</published>
    <updated>2013-04-06T06:50:23Z</updated>
    <category term="photography"/>
    <category term="family"/>
    <content type="html">...and a nice bowl my aunt and uncle brought us — thanks, Geoff and Josephine!&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/pix/jaffas/Jaffas-m.jpg" border="2" style="border-color:black;" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;I still haven't found an easy way to obtain these outside NZ.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:266205</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/266205.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=266205"/>
    <title>Fixing the wrong song problem</title>
    <published>2013-04-05T04:35:19Z</published>
    <updated>2013-04-05T04:35:19Z</updated>
    <category term="tools"/>
    <category term="music"/>
    <content type="html">My car dealer was clueless and my internet searches were fruitless, but I've finally fixed the issues I was having with my driving music. It was all Apple's fault. In the hope that this reaches someone else with the same problem, I'm posting my story here.&lt;br /&gt;&lt;br /&gt;I have a large library of pop music of various genres on my iPod, and I usually listen to it in random mode. It was working fine that way via the headphones. But &lt;a href="http://11011110.livejournal.com/250407.html"&gt;my new Mini Cooper&lt;/a&gt; comes with a sound system that I can plug the iPod into, simultaneously powering the iPod and providing a digital feed of music to the car sound system. It shows me what it's playing on the car display, and it allows me to control the iPod from the dash or (for simple things like skipping to the next song) from the steering wheel. Much nicer than the usual auxiliary input jack. I'm guessing that some other car makes, especially BMWs, also use a similar system.&lt;br /&gt;&lt;br /&gt;The problem was, about half of the time my car stereo was displaying the wrong song title. This wouldn't be so bad, but it was also getting other bad metadata (in particular the length of the song), causing it to cut the song short or run long into the next track and then cut that short. I was thinking maybe it was a firmware bug in the stereo that that would need me to take it in for an upgrade, or a bad line in the connector cable, or something. But no. This week, I tried reformatting the iPod and reloading all of its music. Now it works perfectly. So I assume some internal index on the iPod (used by the digital connection but not when I'm on headphones) had somehow become corrupted, that iTunes never noticed the corruption, and that reloading it rebuilt that index from scratch in an uncorrupted form.&lt;br /&gt;&lt;br /&gt;In any case, the short version is: car stereo showing the wrong song title? Reformat your iPod.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:265871</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/265871.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=265871"/>
    <title>A Gray code for involutions</title>
    <published>2013-03-30T00:54:11Z</published>
    <updated>2013-03-30T01:06:43Z</updated>
    <category term="combinatorial enumeration"/>
    <content type="html">An involution is a permutation that equals its inverse; thought of another way, it's a &lt;a href="http://en.wikipedia.org/wiki/Matching_(graph_theory)"&gt;matching&lt;/a&gt; on an &lt;i&gt;n&lt;/i&gt;-vertex complete graph, where a position in the permutation is mapped to its partner in the matching (or itself if it is unmatched). Here are the 26 involutions on 5 elements (26 is a &lt;a href="http://en.wikipedia.org/wiki/Telephone_number_(mathematics)"&gt;telephone number&lt;/a&gt;, the numbers that count involutions):&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;&lt;pre&gt;[0, 1, 2, 3, 4]
[1, 0, 2, 3, 4]
[2, 1, 0, 3, 4]
[0, 2, 1, 3, 4]
[0, 3, 2, 1, 4]
[3, 1, 2, 0, 4]
[3, 2, 1, 0, 4]
[2, 3, 0, 1, 4]
[1, 0, 3, 2, 4]
[0, 1, 3, 2, 4]
[0, 1, 4, 3, 2]
[0, 4, 2, 3, 1]
[4, 1, 2, 3, 0]
[4, 2, 1, 3, 0]
[2, 4, 0, 3, 1]
[1, 0, 4, 3, 2]
[1, 0, 2, 4, 3]
[2, 1, 0, 4, 3]
[3, 1, 4, 0, 2]
[3, 4, 2, 0, 1]
[4, 3, 2, 1, 0]
[4, 1, 3, 2, 0]
[0, 4, 3, 2, 1]
[0, 3, 4, 1, 2]
[0, 2, 1, 4, 3]
[0, 1, 2, 4, 3]&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In this sequence, each two consecutive involutions differ from each other in a simple way: two consecutive elements mapped to themselves may become mapped to each other or vice versa, one of the elements of a pair of items mapped to each other may shift position by one, or two consecutive elements that belong to two different pairs may swap partners. These types of changes generate an (&lt;i&gt;n&lt;/i&gt;&amp;nbsp;&amp;minus;&amp;nbsp;1)-regular multigraph on the set of involutions, but it's not a simple graph because sometimes it's possible to get the same change in two different ways.&lt;br /&gt;&lt;br /&gt;The overall structure of the sequence is that it starts with all of the involutions that keep the last item fixed (recursively generated as the involutions on one fewer item), and then as in the &lt;a href="http://en.wikipedia.org/wiki/Steinhaus%E2%80%93Johnson%E2%80%93Trotter_algorithm"&gt;Steinhaus–Johnson–Trotter algorithm&lt;/a&gt; it sweeps the partner of the last item back and forth over the remaining items, at the end of each sweep performing a step in the recursive sequence for two fewer items. Because of the low ratio of recursive steps to sweep steps, the time to generate the sequence is constant per involution. This algorithm demonstrates the existence of a Hamiltonian cycle in the multigraph of involutions and their changes.&lt;br /&gt;&lt;br /&gt;My implementation of all this is now towards the end of &lt;a href="http://www.ics.uci.edu/~eppstein/PADS/Permutations.py"&gt;PADS/Permutations.py&lt;/a&gt;. I'm very glad that it was easy to do some thorough unit testing for this one; without that, I would have had a difficult time convincing myself both that the algorithm is correct and that my implementation is correct, because the details are a bit messy.&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:265544</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/265544.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=265544"/>
    <title>An early reference on crossing minimization</title>
    <published>2013-03-28T04:32:23Z</published>
    <updated>2013-03-28T04:32:23Z</updated>
    <category term="graph drawing"/>
    <category term="graph theory"/>
    <content type="html">The &lt;a href="https://en.wikipedia.org/wiki/Crossing_number_(graph_theory)"&gt;crossing number&lt;/a&gt; of a graph is the minimum number of edge crossings with which it can be drawn. A lot of research in graph drawing has involved algorithms or heuristics for minimizing this number, because drawings with more crossings tend to be less understandable.&lt;br /&gt;&lt;br /&gt;The traditional story of crossing numbers is that they began with Turán's "brick factory problem", named after the brick factory in which Hungarian mathematician &lt;a href="https://en.wikipedia.org/wiki/P%E1l_Tur%E1n"&gt;Pál Turán&lt;/a&gt; was imprisoned by the Nazis during World War II, and his musings on how to design a system of tracks that would have as few crossings as possible. But it turns out (as I found today while looking for something else) the same problem was percolating at the same time in an entirely different field of study: sociology. In 1934, J. L. Moreno invented the &lt;a href="https://en.wikipedia.org/wiki/Sociogram"&gt;sociogram&lt;/a&gt;, and in 1944, &lt;a href="https://en.wikipedia.org/wiki/Urie_Bronfenbrenner"&gt;Urie Bronfenbrenner&lt;/a&gt; wrote (about how to place the vertices in such a drawing): "The arrangement of subjects on the diagram, while haphazard in part, is determined largely by trial and error with the aim of minimizing the number of intersecting lines." Crossing numbers!&lt;br /&gt;&lt;br /&gt;I haven't yet tracked down an online copy of Moreno's original publication, or what he says about vertex placement in it (the 1953 second edition is &lt;a href="http://www.asgpp.org/docs/WSS/WSS.html"&gt;here&lt;/a&gt;), but Bronfenbrenner's can be found at JSTOR: Bronfenbrenner, Urie (1944). "&lt;a href="http://www.jstor.org/stable/2785096"&gt;The graphic presentation of sociometric data&lt;/a&gt;". Sociometry 7 (3): 283–289.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:265340</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/265340.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=265340"/>
    <title>On stating the obvious</title>
    <published>2013-03-25T21:37:59Z</published>
    <updated>2013-03-25T22:53:28Z</updated>
    <category term="graph drawing"/>
    <category term="wikipedia"/>
    <content type="html">I've been working on a new Wikipedia article on &lt;a href="http://en.wikipedia.org/wiki/Circular_layout"&gt;circular layouts&lt;/a&gt; in graph drawing, and I wanted to say something in it about &lt;a href="http://www.planarity.net/"&gt;Planarity&lt;/a&gt;, a puzzle that involves moving the vertices of a graph drawing around, starting from a circular layout, to show that the graph is planar. However, despite the existence of quite a bit of academic work that explicitly states that it's inspired by Planarity, I couldn't find any published source that describes the initial layout of the puzzle.&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;Oleg Verbitsky's paper "On the obfuscation complexity of planar graphs" (&lt;i&gt;Theor. Comput. Sci.&lt;/i&gt; 2008 and &lt;a href="http://arxiv.org/abs/0705.3748"&gt;arXiv:0705.3748&lt;/a&gt;) says in the first sentence of the abstract that it's motivated by Planarity. The paper proves that a randomly permuted circular layout (like the one used as the initial state in Planarity) approximates the maximum possible number of crossings to within an approximation ratio of three, in expectation. But it doesn't actually say that Planarity uses this kind of layout, or conclude from its theoretical results that this kind of layout is a good choice for this puzzle.&lt;br /&gt;&lt;br /&gt;Several authors have been studied the problem of planarizing a nonplanar layout by moving as few vertices as possible, and (although the problem predates the Planarity game) the paper on this problem by &lt;a href="http://dx.doi.org/10.1007/s00454-008-9130-6"&gt;Goaoc et al. 2009&lt;/a&gt; mentions Planarity, and mentions results involving initial vertex sets in convex position, but does not mention that this is the initial position of Planarity.&lt;br /&gt;&lt;br /&gt;"&lt;a href="http://alexandria.tue.nl/openaccess/Metis225962.pdf"&gt;Perceptual organization in user-generated graph layouts&lt;/a&gt;", by van Ham and Rogowitz in IEEE TVCG 2008, studied user experiences with perceptual tasks in graph visualization within an interactive environment inspired by and similar to the game play in Planarity. They compare how well the users were able to rearrange the graphs and perform their set tasks for several different starting layouts, one of which is the randomized circular layout of Planarity. Unsurprisingly, they find that using this deliberately-tangled layout slows the users down. But they don't say that this layout is the one used by Planarity.&lt;br /&gt;&lt;br /&gt;"&lt;a href="http://homepage.cs.uiowa.edu/~hourcade/sdg-vs-mt-final.pdf"&gt;Comparing Multi-Touch Tabletops and Multi-Mouse SingleDisplay Groupware Setups&lt;/a&gt; (Hansen and Hourcade, MexIHC'10) comes very close to what I want: in a paragraph that begins "inspired by Planarity" they write about a task of "untangling a ring graph with randomly placed vertices". But I think here "ring" may be a description of the network connectivity rather than the initial placement, and in any case again they don't say how similar or different their system is to planarity.&lt;br /&gt;&lt;br /&gt;There are also mainstream media sources for Planarity itself, but I didn't find any descriptions of its initial configuration there, either. And the Planarity site goes into great detail about how it generates its graphs but says nothing about how they are placed into the initial configuration.&lt;a name='cutid1-end'&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the absence of good enough sources for the circularity of its layouts, I ended up mentioning Planarity in a see-also link of the circular layout article, rather than actually including it in the main text of the article. It's obvious to anyone who spends any amount of time playing Planarity that its initial layout is circular. But sometimes, being obvious isn't enough: you have to say it.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:264979</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/264979.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=264979"/>
    <title>Generating Stirling permutations</title>
    <published>2013-03-18T21:28:22Z</published>
    <updated>2013-03-18T21:28:22Z</updated>
    <category term="python"/>
    <category term="combinatorial enumeration"/>
    <content type="html">In contrast to &lt;a href="http://11011110.livejournal.com/264539.html"&gt;Cayley permutations&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Stirling_permutation"&gt;Stirling permutations&lt;/a&gt; turn out to be very easy to generate by very small modifications to the &lt;a href="http://en.wikipedia.org/wiki/Steinhaus%E2%80%93Johnson%E2%80%93Trotter_algorithm"&gt;Steinhaus–Johnson–Trotter algorithm&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A Stirling permutation is a permutation of a multiset with two copies of each value, with the property that between these two copies only larger values can appear. In particular, the two largest values must appear consecutively. The algorithm simply sweeps this consecutive largest pair back and forth across the sequence, recursing when the largest pair reaches one of the ends of the sequence. Each step is a swap of two items that are two positions apart; it isn't possible to move the two largest items by a swap of contiguous items.&lt;br /&gt;&lt;br /&gt;For details see the updated &lt;a href="http://www.ics.uci.edu/~eppstein/PADS/Permutations.py"&gt;PADS.Permutations&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:264901</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/264901.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=264901"/>
    <title>Stevens Creek Park</title>
    <published>2013-03-18T06:23:59Z</published>
    <updated>2013-03-18T06:23:59Z</updated>
    <category term="photography"/>
    <category term="landscape"/>
    <category term="family"/>
    <content type="html">I was up in the Bay Area this weekend with my family for a memorial service for my wife's cousin &lt;a href="http://blog.roblox.com/2013/02/in-memory-of-erik-cassel/"&gt;Erik Cassel&lt;/a&gt;, who died recently at a young age. Before leaving we stopped by Stevens Creek Park, a place I used to visit frequently long ago when I lived in Cupertino, and where my brother-in-law now works. &lt;a href="http://www.ics.uci.edu/~eppstein/pix/scp/"&gt;Some photos&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;img src="http://www.ics.uci.edu/~eppstein/pix/scp/TreeLimbs-m.jpg" border="2" style="border-color:black;" /&gt;&lt;/div&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:264539</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/264539.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=264539"/>
    <title>Cayley Permutations</title>
    <published>2013-03-13T22:57:33Z</published>
    <updated>2013-03-13T22:57:33Z</updated>
    <category term="combinatorial enumeration"/>
    <content type="html">A Cayley permutation of order &lt;i&gt;n&lt;/i&gt; (so named by &lt;a href="http://dx.doi.org/10.1016/0012-365X(84)90136-5"&gt;Mor and Fraenkel in 1984&lt;/a&gt;) is a sequence of &lt;i&gt;n&lt;/i&gt; positive integers whose set of values forms an interval [1,&lt;i&gt;k&lt;/i&gt;] for some &lt;i&gt;k&lt;/i&gt;&amp;nbsp;≤&amp;nbsp;&lt;i&gt;n&lt;/i&gt;; for instance the ones for which &lt;i&gt;k&lt;/i&gt;&amp;nbsp;=&amp;nbsp;&lt;i&gt;n&lt;/i&gt; are just the usual permutations. The number of Cayley permutations is counted by the &lt;a href="http://en.wikipedia.org/wiki/Ordered_Bell_number"&gt;ordered Bell numbers&lt;/a&gt;, but how can the permutations themselves be generated efficiently?&lt;br /&gt;&lt;br /&gt;&lt;a name="cutid1"&gt;&lt;/a&gt;A Cayley permutation of order &lt;i&gt;n&lt;/i&gt; may be transformed into one of order &lt;i&gt;n&lt;/i&gt;&amp;nbsp;&amp;minus;&amp;nbsp;1 by removing its largest value (breaking ties by choosing the last copy of the largest value). This transformation may be viewed as the parent relation of an infinite tree, and traversing this tree recursively leads to the following algorithm:&lt;pre&gt;def CayleyPermutations(n):
    """Generate sequence of Cayley permutations of length n"""
    if n &amp;lt; 2:
        yield [1]*n
        return
    for P in CayleyPermutations(n-1):
        m = max(P)
        i = n-1
        P = P + [m+1]
        pastMax = False
        yield P
        while i &amp;gt; 0:
            if not pastMax:
                P[i] = m
                yield P
                if P[i-1] == m:
                    pastMax = True
            P[i] = P[i-1]
            P[i-1] = m+1
            i -= 1
            yield P&lt;/pre&gt;For instance, for &lt;i&gt;n&lt;/i&gt;&amp;nbsp;=&amp;nbsp;3 it produces as output the sequence of 13 Cayley permutations [1, 2, 3], [1, 2, 2], [1, 3, 2], [3, 1, 2], [1, 1, 2], [1, 1, 1], [1, 2, 1], [2, 1, 1], [2, 1, 3], [2, 1, 2], [2, 3, 1], [2, 2, 1], [3, 2, 1].  Each of the smaller permutations it generates leads to &lt;i&gt;n&lt;/i&gt; or more output permutations, so the linear amount of work that it does when it finds the max of the smaller permutation and then copies it can be amortized away, showing that this algorithm takes constant average time per output. But the time per output is not constant in the worst case: in some of the steps of the algorithm there is a big delay between one output and the next.&lt;br /&gt;&lt;br /&gt;For ordinary permutations, constant worst-case time per output is achieved by the &lt;a href="http://en.wikipedia.org/wiki/Steinhaus%E2%80%93Johnson%E2%80%93Trotter_algorithm"&gt;Steinhaus&amp;ndash;Johnson&amp;ndash;Trotter algorithm&lt;/a&gt;, which generates the permutations in a Gray code (meaning that two consecutive permutations differ by a single swap of adjacent elements).&lt;br /&gt;&lt;br /&gt;For Cayley permutations, swaps are not enough for a Gray code (they don't change &lt;i&gt;k&lt;/i&gt;). And although the Cayley permutations can be given the structure of a connected graph by operations that change a single value by one, those also don't form a Gray code (each ordinary permutation has degree one in this graph). But maybe swaps together with adding or subtracting one together are enough to define a Gray code. If so, can it be used to generate the Cayley permutations in constant time per permutation?&lt;br /&gt;&lt;br /&gt;The obvious idea is to emulate the Steinhaus&amp;ndash;Johnson&amp;ndash;Trotter algorithm by sweeping the largest value back and forth across the sequence, recursing whenever this sweep reaches one of the ends of the sequence, but this doesn't work; I implemented it using similar but messier code to the one above, but it gave me the non-Gray-code sequence [1, 2, 3], [1, 2, 2], [1, 3, 2], [3, 1, 2], [2, 1, 1], [1, 1, 1], [1, 2, 1], [1, 1, 1], [1, 1, 2], [2, 1, 3], [2, 1, 2], [2, 3, 1], [2, 2, 1], [3, 2, 1]. The problem is that when it recurses, the max of the sequence might be forced to change as well, leading to more than one change in a single step.&lt;a name='cutid1-end'&gt;&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:264318</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/264318.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=264318"/>
    <title>Why we still need real peer review</title>
    <published>2013-03-10T20:35:00Z</published>
    <updated>2013-03-10T20:35:00Z</updated>
    <category term="academia"/>
    <content type="html">&lt;a href="http://scholarlyoa.com/2012/12/06/bealls-list-of-predatory-publishers-2013/"&gt;Predatory publishers&lt;/a&gt; that pretend to peer-review your papers (but really accept all comers to maximize their profits) lead to sad-but-funny situations like this one: &lt;a href="http://www.michelehumes.com/2013/03/09/i-have-no-words/"&gt;&lt;i&gt;Onion&lt;/i&gt; article about a children's menu found on the back of the original copy of the U.S. Constitution cited seriously by scientific article&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It may be entertaining, but it's not good for the literature for it to be cluttered up with this sort of cargo-cult imitation of research, and it's not good for universities and academics (and the students they teach) to be pressured into publishing this sort of junk in order to keep up a pretense of being a research university. (Also, before you say that &lt;a href="http://en.wikipedia.org/wiki/Impact_factor"&gt;impact factors&lt;/a&gt; will sort these things out, someone on &lt;a href="http://www.journalfen.net/community/random_lounge/227065.html"&gt;the post I found this on&lt;/a&gt; has already commented that this journal's impact factor is pretty high; impact factors are easily manipulated and there's a lot of motivation for doing so.)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:264051</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/264051.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=264051"/>
    <title>More on grid minors</title>
    <published>2013-03-06T01:17:02Z</published>
    <updated>2013-03-06T01:17:02Z</updated>
    <category term="graph theory"/>
    <content type="html">I made a preprint out of my earlier post here on &lt;a href="http://11011110.livejournal.com/259804.html"&gt;grid minors in damaged grids&lt;/a&gt;: it is &lt;a href="http://arxiv.org/abs/1303.1136"&gt;arXiv:1303.1136&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Somewhere along the way I learned of an interesting related result in infinite graph theory, &lt;a href="http://en.wikipedia.org/wiki/Halin%27s_grid_theorem"&gt;Halin's grid theorem&lt;/a&gt;. In finite graphs the size of the largest grid minor is bounded above and below by (two different) functions of the &lt;a href="http://en.wikipedia.org/wiki/Treewidth"&gt;treewidth&lt;/a&gt;, and the treewidth of a finite graph may be characterized by the maximum order of a &lt;a href="http://en.wikipedia.org/wiki/Haven_(graph_theory)"&gt;haven&lt;/a&gt;, a certain kind of strategy for a cops-and-robbers game on the graph. In infinite graphs this breaks down, because a haven with infinite order exists whenever the graph has an infinite path (even if its treewidth is one and it has no nontrivial grid minors). Rather, the infinite-order havens correspond to the &lt;a href="http://en.wikipedia.org/wiki/End_(graph_theory)"&gt;ends&lt;/a&gt; of the graph (equivalence classes of infinite paths that, intuitively, all go the same direction, in the sense that one can bounce back and forth between any two equivalent paths infinitely often). An end is "thick" if it includes an infinite set of disjoint paths, and Halin's theorem states that a graph has a thick end if and only if it has an infinite grid minor.&lt;br /&gt;&lt;br /&gt;Because of the tight connections between havens, treewidth, and grid minors in finite graphs, and the less-direct but still present connections between havens, ends, and infinite grid minors, it makes me think that maybe there should be something like a haven but more constrained, or a different parameterization of havens than their order, that should work for both finite and infinite graphs, that gives both upper and lower bounds on the size of the grid minor for graphs in which this is bounded, and that could distinguish those graphs from the graphs in which all grid minors are finite but with unbounded size, and from the graphs with infinite grid minors.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:263840</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/263840.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=263840"/>
    <title>Universal permutations</title>
    <published>2013-03-02T23:07:45Z</published>
    <updated>2013-03-03T20:14:34Z</updated>
    <category term="combinatorics"/>
    <content type="html">Let's say that a permutation on the numbers from 1 to &lt;i&gt;n&lt;/i&gt; is &lt;i&gt;k&lt;/i&gt;-universal if its subsequences of &lt;i&gt;k&lt;/i&gt; items have all of the &lt;i&gt;k&lt;/i&gt;! possible different patterns that they could have. For instance, 25314 is 3-universal: the six possible patterns 123, 132, 213, 231, 312, and 321 appear in it as 234, 253, 314, 231, 514, and 531 respectively. How short can a &lt;i&gt;k&lt;/i&gt;-universal pattern be?&lt;br /&gt;&lt;br /&gt;It's not hard to find upper and lower bounds within a constant factor of each other. In one direction, the sequence k, 2k, 3k, ... k&amp;minus;1, 2k&amp;minus;1, 3k&amp;minus;1, ..., k&amp;minus;2, 2k&amp;minus;2, 3k&amp;minus;2, ... etc of length &lt;i&gt;k&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt; is universal. (This is the same tilted grid pattern that gives the lower bound in the &lt;a href="http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem"&gt;Erdős–Szekeres theorem&lt;/a&gt;.) In the other direction, the length &lt;i&gt;n&lt;/i&gt; of the universal permutation must be at least some constant times &lt;i&gt;k&lt;/i&gt;&lt;sup&gt;2&lt;/sup&gt;, in order for it to have at least &lt;i&gt;k&lt;/i&gt;! different subsets of size &lt;i&gt;k&lt;/i&gt;. But what is the constant?&lt;br /&gt;&lt;br /&gt;A computer search found that there is no 4-universal permutation on 8 items (the best is 51862473 which has 23 out of the 24 possible patterns), but the 9-item permutation 162975384 is universal. So the sequence of lengths of the shortest k-universal patterns begins 1, 3, 5, 9, ... But although there are simple quadratically-growing sequences like &lt;a href="http://oeis.org/A080827"&gt;ceiling((k^2+1)/2)&lt;/a&gt; that begin like this, it's not really long enough to identify this in OEIS and see whether it matches anything known.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:263505</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/263505.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=263505"/>
    <title>Antimatroids and Balanced Pairs</title>
    <published>2013-02-26T02:02:55Z</published>
    <updated>2013-02-26T02:06:04Z</updated>
    <category term="antimatroids"/>
    <content type="html">I have a new preprint out, "Antimatroids and Balanced Pairs", &lt;a href="http://arxiv.org/abs/1302.5967"&gt;arXiv:1302.5967&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;A partially ordered set (or almost equivalently a directed acyclic graph) can often be used as a concise representation of a much larger set of linear orderings on a set of elements (the linear extensions of the partial order or the topological orderings of the DAG). But my feeling is that, in many cases where this has been done, it is worthwhile to consider generalizing partial orders to &lt;a href="http://en.wikipedia.org/wiki/Antimatroid"&gt;antimatroids&lt;/a&gt;, and generalizing the linear extensions of the partial order to the basic words of an antimatroid. In this way, you get to represent sets of orderings that would not be possible to represent by partial orders, while still retaining enough structure to be able to prove interesting things about these sets. (My older preprint "&lt;a href="http://arxiv.org/abs/0803.4030"&gt;Learning Sequences&lt;/a&gt;" is related, but sort of the opposite, as it is instead about using sets of linear orderings to represent antimatroids.)&lt;br /&gt;&lt;br /&gt;This paper is part of this program of replacing partial orders by antimatroids. It considers the &lt;a href="http://en.wikipedia.org/wiki/1/3%E2%80%932/3_conjecture"&gt;1/2&amp;ndash;2/3 conjecture&lt;/a&gt;, an unsolved problem about partial orders according to which, if you choose a linear extension at random, then there should be a pair of elements that are nearly equally likely to be in either possible order relative to each other. Of course, it's not any easier to prove this for antimatroids than it is for partial orders, but as far as I can tell it's also true when generalized in this way. The paper provides proofs that several types of antimatroids obey the conjecture, along the way simplifying the proofs of some of the results on partial orders that it generalizes, and it reports on a computer search (using the algorithms I described &lt;a href="http://11011110.livejournal.com/58994.html"&gt;here&lt;/a&gt;) by which I verified that all antimatroids on six or fewer elements obey the conjecture.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:263262</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/263262.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=263262"/>
    <title>Congratulations to Jeff Westbrook (again)!</title>
    <published>2013-02-18T04:55:15Z</published>
    <updated>2013-02-18T04:55:15Z</updated>
    <content type="html">Back when he was an algorithms researcher, &lt;a href="http://en.wikipedia.org/wiki/Jeff_Westbrook"&gt;Jeff Westbrook&lt;/a&gt; was a co-author on one of my earliest papers, on &lt;a href="http://portal.acm.org/citation.cfm?id=320177"&gt;dynamic planar graph algorithms&lt;/a&gt;. Now &lt;a href="http://www.hollywoodreporter.com/news/wga-awards-winners-list-422048"&gt;he's won his third WGA Award&lt;/a&gt; for his television writing. Congratulations, Jeff!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:263003</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/263003.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=263003"/>
    <title>Splitting the buckyball</title>
    <published>2013-02-07T02:12:52Z</published>
    <updated>2013-02-07T02:12:52Z</updated>
    <category term="geometry"/>
    <category term="graph theory"/>
    <content type="html">Here's a geometric graph puzzle for you. Start with the graph of the &lt;a href="http://en.wikipedia.org/wiki/Truncated_icosahedron"&gt;truncated icosahedron&lt;/a&gt;, with 60 vertices and 90 edges. Delete a matching (a set of edges that do not touch each other) consisting only of edges that belong to pentagons in the truncated icosahedron, in order to maximize the number of connected components of the remaining graph. How many components can you make?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:11011110:262685</id>
    <link rel="alternate" type="text/html" href="http://11011110.livejournal.com/262685.html"/>
    <link rel="self" type="text/xml" href="http://11011110.livejournal.com/data/atom/?itemid=262685"/>
    <title>CFP for Int. Symp. Voronoi Diagrams</title>
    <published>2013-02-04T16:09:20Z</published>
    <updated>2013-02-04T16:09:20Z</updated>
    <category term="computational geometry"/>
    <category term="conferences"/>
    <content type="html">I've had a couple of past papers in the &lt;a href="http://bioinf.spbau.ru/isvd2013/"&gt;International Symposium on Voronoi Diagrams&lt;/a&gt;; this year I'm on the program committee. It will be in St. Petersburg, Russia, in July, during their &lt;a href="http://en.wikipedia.org/wiki/White_Nights_Festival"&gt;White Nights festival&lt;/a&gt;, so a great time to visit there. Proceedings published by IEEE. &lt;a href="http://bioinf.spbau.ru/isvd2013/call-for-papers"&gt;Submission deadline March 20&lt;/a&gt;.</content>
  </entry>
</feed>
