nauty for your iPhone

How often have you been out somewhere, maybe at a restaurant or pub, and suddenly needed to generate some graphs, or determine the canonical labelling of a graph that has come up in conversation, only to be foiled because you don’t have your laptop with you.

Not often, you might say.

But just in case, here are some instructions for installing geng and nauty on your iPhone, so that you can be fully prepared in case the need suddenly arises.

It’s actually pretty easy to do. Start by installing the app iSH from the App Store – this provides a lightweight version of Linux (Alpine Linux) that you can interact with through the normal Unix command-line interface. (This is not just a terminal app making a connection to a remote server – it is actually Linux running on your iDevice.)

Conveniently, it supplies some extra keys on its virtual keyboard, including “tab” (for tab-completion), “ctrl” (for ctrl-C, etc) “esc” (for toggling modes in vi) and a key that is used like a 4-way rocker to replace the arrow keys (just drag your finger right, left, up or down to get the associated key). You may also need to turn on an option called “Disable Screen Dimming” so that the iPhone’s battery saving doesn’t interrupt long running processes like compilation.

Special keys on the iSH terminal

That said, using vi like this is a bit painful, so I used the Mac KeyPad App which you run on the Mac, connect to your iOS device, and then redirects any keystrokes from your Mac keyboard to the iOS device. So editing is now easy.

Next step is to install gcc and associated libraries in order to compile anything. This is easy to do using the iSH/Alpine package manager APK.

$ apk build-base

(Here, I am using the convention that the command-line interface uses a $-sign as a prompt awaiting user input. The actual prompt on your phone/tablet will vary from this, using some combination of the device name and current working directory – mine is “Gordons-iPhone:~#”. In any case, you don’t type the $ but just the command after it.)

Then wait for a while while it connects to the right repositories and downloads and installs the various things. For some reason, I kept getting a spurious message about “Temporary error”, but it seemed to install fine anyway.

Next download the nauty source code using wget direct from Brendan’s webpage, uncompress and extract the files from the tar archive and change into the directory that has just been created. Then run the configure tool to create a makefile.

$ wget http://users.cecs.anu.edu.au/~bdm/nauty/nauty27r3.tar.gz 
$ tar xzf nauty27r3.tar.gz
$ cd nauty27r3
$ ./configure

Now at the moment (i.e., with nauty27r3) this creates a makefile that creates a defective version of geng that crashes, due to the compiler dealing with a particular option incorrectly. So the next step is to edit the makefile manually, and remove the “-march=native” from line 6 of the makefile.

CFLAGS = -O4 -march=native

(Future versions of nauty will work around this problem.)

Now it’s time to go to lunch. Before you go, just start the compilation process.

$ make all

This is very time-consuming, taking about 45 minutes on my iPhone (12 mini), so have a reasonably long lunch. When you get back, it should be done, and now have a fully-functioning version of nauty and geng on an iPhone. (Of course, this works for iPad also.)

So now, I can generate the graphs anywhere and any time!

As you can see from the image, it takes about 4 seconds to generate, but not print out, the graphs on 9 vertices.

How does this compare to my desktop iMac?

The same task takes 0.08s – about 50 times faster. So “nauty on iOS” is not really going to be very useful on a day-to-day basis, but sometimes it’s fun to do something just because you can.

Help Wanted (PhD Scholarship)

We are advertising a PhD scholarship on the “synchronisation hierarchy of permutation groups” as part of the ARC Discovery Grant that we have for this.

https://www.scholarships.uwa.edu.au/search/?sc_view=1&id=10764

An Honours or Masters degree in Pure Maths is required, and the more experience in groups, permutation groups and geometry, the better.

Closing date is 28 Feb 2021.

Cheryl Praeger – Companion of the Order of Australia

Each Australia Day (26th January, for the time being), part of the festivities is the awarding of Honours to various people who have made exceptional contributions to the Australian community.

Often these honours go to former politicians or sportspeople whose political or sporting excellence, at least in my opinion, has primarily benefited themselves.

Sometimes though, the committee gets it right, and awards Honours to people who, in addition to excellence in their chosen profession, have used their position and their skills to benefit the wider community.

One such case is Cheryl Praeger, my PhD co-supervisor. Of course, she has outstanding personal accomplishments such as publishing hundreds of research papers, making history as the second Australian female professor of mathematics and being the recipient of numerous awards and accolades. But it is for her advocacy of the study of mathematics at all levels and her tireless efforts to enable and encourage women in particular to study mathematics that warrants this award.

The Companion of the Order of Australia is the highest Honour in the Australian system, and Cheryl is one of only four recipients this year.

For more details, see the ABC News announcement

https://www.abc.net.au/news/2021-01-26/professor-cheryl-praeger-receives-companion-order-of-australia/13089958

Gavin Brown Prize 2020

The Gavin Brown Prize is a “best paper” prize awarded annually by the Australian Mathematical Society, for work in any field of mathematics published no more than 10 years before the award.

To our great surprise but obviously immense delight, our 2010 paper “Every flock generalized quadrangle has a hemisystem” was awarded the 2020 prize.

The details of the prize can be found on the Australian Mathematical Society page, but in addition, UWA wrote a short news article about it, and the Vice-Chancellor even tweeted his congratulations.

This was the first paper that arose from our first joint ARC Discovery grant back in 2009, just after I had moved from the CS department to the Maths department at UWA, and started working with John and Michael.

I won’t discuss the actual details of the mathematics too much here, but just enough to describe what the problem is (was). A finite generalized quadrangle (GQ) is a particular type of finite point-line geometry that has no triangles, and flock generalized quadrangles are a large family of GQs. A hemisystem H is a subset of the lines of the GQ that contains exactly half of the lines on each point; from this it is essentially obvious that H must contain exactly half of the lines.

Hemisystems give rise to other interesting combinatorial and geometric objects, and so over several decades various researchers had tackled the question of when a GQ contains a hemisystem. At the time we started the work, the only recent progress that had been made was the discovery of an infinite family of hemisystems by Cossidente and Penttila in 2005.

Our paper answered the question in almost the strongest possible fashion – a construction for hemisystems in the very large family of flock GQs. The construction was elegant, the family of GQs to which it applied was large and it constructed exponentially many hemisystems. As it had previously been conjectured that hemisystems were very scarce, this was all totally unexpected.

In many areas of finite geometry, the usual case is that new interesting geometric configurations are found by intricate constructions that work in particular small families of geometries. In our ARC Discovery grant application we had “promised” to find some new small hemisystems, or possibly an infinite family for a particular class of GQs. As smashed through this goal in our first year, we were super happy at the time, and wrote a few SymOmega posts about it, such as the following one from John:

https://symomega.wordpress.com/2009/12/15/hemisystems-of-flock-generalised-quadrangles/

But to have this recognised by our colleagues and to be placed in the prestigious company of the former (and future) winners of the Gavin Brown Prize is something we could never have anticipated, but greatly appreciate.

Conferences

Long time since I (or any of us) last posted, but it would be good to get back into it again.

The winter months, especially June and July, are usually cold and rainy in Perth and this year is no exception.  So, like migratory birds heading for the sun, most of us head to the northern hemisphere for their summer conference season.

So I’m currently writing this from a student cafe at the University of Lisbon where a conference+workshop to celebrate Peter Cameron’s birthday is on its final day. But more of this particular conference later.

Continue reading “Conferences”

Baby Boom Continues

Congratulations to my postdoc Irene Pivotto and husband Robin Christian on the birth of their first child, Martin, born last week at St John of God hospital in Subiaco (which is where my daughters were both born).

 

babymartin
Irene, Robin and Martin

This is actually the second CMSC baby in a year, as Alice Devillers and Sam Norton had baby Emilia late last year – at the time I wasn’t keeping up with SymOmega at all due to pressure of work, so missed announcing it.

Better late then never though, so congratulations to both sets of parents!

Schloss Dagstuhl

It’s been a long time since posts, mainly due to the fact that logistical issues caused all my year’s teaching to be compressed into first semester (that’s late-Feb to early-June for any readers not used to Southern Hemisphere habits). It was pretty hard, especially as one of my units is a 550-student first-year Engineering Maths that I had not taken before.

But after many weeks of weekends, evenings or nights spent desperately trying to finish lecture notes, tutorials and solutions for the next day’s lectures, workshops and tutes, the semester eventually ended.

So rather than stay home to attend to the vast number of overdue non-teaching tasks (admin, refereeing, bureaucracy) that I’d had to resolutely ignore during the semsester, instead I flew straight to Germany for a week-long meeting on Graph Polynomials at Schloss Dagstuhl (in Saarland, southern Germany).

Continue reading “Schloss Dagstuhl”

Minion and hamiltonicity

Over the last few years, Minion (I’m giving the link because if you try to search for it, you’ll be swamped by Despicable Me merchandise) has become one of my “go-to” tools, mostly because for certain specific types of searches it seems to perform just as well as, or even better than, a bespoke program. And of course, writing, debugging and optimising a bespoke program is enormously time-consuming, while writing a Minion model is usually very quick.

Most recently, I had an email from Brendan (McKay), who has found three planar cubic graphs of girth 5 that are hypohamiltonian – a graph G is hypohamiltonian if it is not hamiltonian, but for every vertex v, the graph G-v is hamiltonian. Brendan’s graphs had 76 vertices, so not huge, but big enough.

Continue reading “Minion and hamiltonicity”

The shameful conjecture

This is the story of the shameful conjecture, which started with Dominic Welsh, was almost solved by Paul Seymour, and eventually resolved by my friend Fengming Dong from Nanyang in Singapore.

The conjecture concerns a graph parameter called the mean colour number defined as follows: If G is an n-vertex graph, then \mu(G) is the average number of colours used over all proper colourings of G using a palette of n colours.

As this is a slightly strange parameter, an example is probably in order, and it seems only appropriate to use the Welsh graph (that is, the graph K_4 \backslash e obtained by deleting one edge from K_4) for this purpose.

Using a palette of 4 colours, there are 4! = 24 colourings that use all four of the colours. There are 3! = 6 colourings that use a fixed set of 3 colours (the two vertices of degree two must be assigned the same colour), and there are 4 ways of choosing 3 colours of out 4, making a total of 24 colourings using three colours. So the mean colour number of the Welsh graph is 7/2 as the 48 colourings are evenly divided between 3– and 4-colourings (there are no colourings with fewer than 3 colours).

Using some straightforward identities, it can be shown that

\displaystyle \mu(G) = n \times \left( 1 - \frac{P_G(n-1)}{P_G(n)} \right)

where P_G(x) is the chromatic polynomial of G.

The chromatic polynomial of the Welsh graph is x(x-1)(x-2)^2 so for this graph the expression has the value 4 \times (1 - 6/48) = 7/2 as expected.

It is obvious that the complete graph K_n has the largest mean colour number, because every colouring requires n colours, so \mu(K_n) = n.

At the other extreme is the empty graph on n vertices, which has chromatic polynomial x^n and thus

\displaystyle \mu(E_n)= n \times (1-(n-1)^n/n^n)

and as n gets large the factor (n-1)^n/n^n famously converges to 1/e from below.

But hang on, why did I say “the other extreme”? How do I know that the empty graph E_n has the lowest mean colour number? Of course, it seems intuitively obvious that adding an edge to a graph can only increase the average number of colours required to colour it. Unfortunately, while it is intuitively obvious, it is not actually true that adding edges increases the mean colour number. Mike Mosca (yes, the quantum crypto guy from Waterloo) found an infinite family of counterexamples, of which the smallest has only 6 vertices.

So is it even true that E_n is the extreme graph? Bartels and Welsh conjectured that this is indeed the case – namely that for any n-vertex graph G

\displaystyle \frac{P_G(n)}{P_G(n-1)} \geq \frac{n^n}{(n-1)^n} > e

For a graph theorist, it is a little embarrassing to define a parameter applicable to all graphs, with the complete graph trivially at one extreme, and then be unable to show that the empty graph is the other extreme. In fact, more than just embarrassing, perhaps even positively shameful.

Thus the shameful conjecture was christened.

Now Paul Seymour enters the ring. Normally if he turns his attention to some topic, even briefly, he quickly vacuums up and solves most of the known unsolved conjectures, generates some much harder and deeper conjectures, and then moves on. In this case though, he didn’t quite knock off the shameful conjecture. Instead, he proved that for any n-vertex graph G,

\displaystyle \frac{P_G(n)}{P_G(n-1)} \geq \frac{685}{252} \approx 2.7182539 \ldots

As e \approx 2.7182818 \ldots, this value is just a little bit too low to prove the shameful conjecture.

The shameful conjecture hung on for another few years, but ultimately Fengming Dong (who has resolved quite a number of difficult chromatic and flow polynomial questions), used one of his typically intricate and ingenious proofs to show that the shameful conjecture is indeed true.

I don’t know if the shameful conjecture has stimulated any further research, or if the mean colour number has found any other uses, but I’ve always liked the story…

Written with StackEdit.