Skip to content →

neverendingbooks Posts

artisanal integers

Summer of 2012. Suddenly several “integer-as-a-service-providers” spring from nowhere. They deliver “artisanal integers”. Integers which (they claim) are “hand-crafted and guaranteed to be unique and hella-beautiful”.

Are you still with me?

Perhaps it helps to have a look at one of the three such services still operational today: Brooklyn Integers, Mission Integers (after San Francisco’s historic Mission District), and London Integers.

Still in the dark?

Here’s my very own, freshly minted, unique integer: $420557015$.

Anyone can check that this is a genuine Brooklyn-integer by looking up its corresponding number-site. In our case the URL would be: http://www.brooklynintegers.com/int/420557015/.

Please pause a moment to admire the hipster-style web-design and the wonderful tagline:

we have infinity on our side (Brooklyn Integers)

Why do we need integer-as-a-service-providers?

This story starts in 2010 when Aaron Straup Cope wants to play with all of the buildings encoded in OpenStreetMap.

Each of these 67 million buildings was added to the database by first creating four or more “nodes” and then grouping them together in a “way”. Aaron wanted to build a catalog of all of these buildings. Because the “ways” had already a numeric ID in the OpenStreetMap-database (using 32-bit integers), he generated a new numeric ID for each and every building, starting at 32-bits plus one, to avoid collisions between the two databases.

He met a similar problem one year later while working on a project called parallel Flickr. Here the idea is to allow individuals to run and maintain their own local copy of Flickr, consisting of their own photos, those of their close friends as well as photos they like.

Assume a fair number of people have set up their local Flickr site and the very worst happens: Flickr itself shuts down. Can we recover the (to us) relevant part of Flickr from all our local copies?

Yes. That is if all of us had the discipline to maintain the original Flickr-IDs and metadata in our parallel Flickrs. A collision between two or more of our databases would only mean we share a copy of the same photo.

If however (and this is infinitely more likely) we all used our own idiosyncratic system to name files, rebuilding the network from our little Flickrs would quickly become hopeless.

Parallel Flickr is an exercise in how individual people can take control and responsibility to archive material they leave on global social media sites such as Facebook, Google+, YouTube, Instagram and the likes. How can we collectively maintain generated content in case the service pulls the plug?

Another example. Consider a large group of people, each of them geotagging and archiving their own tiny part of a larger collective neighbourhood. What’s needed to construct the bigger picture from their individual efforts?

When Aaron asked his pal Mike over coffee in San Francisco’s Mission District, the reply was: “So, are you suggesting that we need something like a centralized ‘integers as a service’ platform?” As a gag Mike also suggested that rather than any old unique integers, there would probably be a demand for hand-crafted artisanal integers.

It’s how Mission Integers was born. And immediately forgotten. There already exist methods to deliver unique IDs, such as the UUID scheme.

The idea was rekindled when Aaron moved to New York and started the Gowanus Heights Neighborhood Project. Here again they needed unique IDs. Because the long strings of alphanumerical characters and dashes provided by UUID are less efficient at the database layer, they needed Mission integers, or perhaps Brooklyn integers, or both.

In order to avoid collisions between these two artisanal integer providers, Mike claimed the even numbers for Mission (as San Francisco is on the ‘left hand’ coast) and Aaron the odd ones for Brooklyn (New York lying on the ‘right hand’ coast).

Remember all of this started in order to empower individuals against the frills of global players, type Facebook.

And now, this new system would depend on a two-party US-based monopoly? Most certainly not!

Along came Dan Catt who created London Integers, using a rather different look-and-feel. “Both Mission and Brooklyn have gone for a hipster boutique type of look, which I wanted to eschew. The London I know is dirty, gritty, beautiful and punk.”

London ‘artisan’ Integers would be multiples of $9$ and in order to avoid collisions with the others he took the maximal integer minted by both Brooklyn or Mission, added a couple of millions to it, and just started distributing integers.

Someone could look at an artisan integer and work out if it was a London Integer by adding up the digits, repeatedly if necessary to get to single digit. If that’s $9$ it’s a London Integer.

If it's not a London Integer then you can tell if it's Brooklyn or Mission on the odd, even front.

Where’s the math in all this?

Ideally, integers-as-a-service-providers will be set up in all major cities, and why not, even in small communities.

Nelson Minar solved two of the most imminent problems arising from having multiple providers of artisanal integers:

  • all parties producing integers should be aware of one another and honour their respective offsets.
  • given an artisanal integer one should be able to figure out where it came from

Nelson did this using secret magical powers better known as “maths”. (Aaron Straup Cope)

He used the Cantor pairing to generate a unique integer $z$ corresponding to the $y$-th number produced by the $x$-th foundry:

$z = \frac{(x+y)(x+y+1)}{2} + y$

Conversely, if you’re given the artisanal integer $z$, you can work out its integer-provider by following these rules:

$w=\lfloor \frac{\sqrt{8z+1}-1}{2} \rfloor,~t = \frac{w^2+w}{2},~y=z-t,~x=w-y$



Elegant as this is, there’s a serious flaw. The number of providers will always be significantly smaller than the number of integers they mint. Therefore, most integers will not be used, ever.

Here’s my two-pence worth of advice to build a slightly more economic system:

  • The $x$-th foundry should only mint multiples of $p(x)$, the $x$-th prime number.
  • As any time $t$ one should know the product $T$ of all prime numbers of foundries in operation.
  • In order to decide whether the $x$-th foundry can distribute its $y$-th number $n = y \times p(x)$ one computes $gcd(n,T)$ and look at its largest prime divisor. If this is $p(x)$, the number $n$ can safely be minted. If not it will eventually be distributed by the foundry corresponding to that largest prime factor.
  • With a little bit of extra work one gets a fairer system. Decompose $gcd(n,T)=p(x_1)^{e_1} p(x_2)^{e_2} \dots p(x_k)^{e_k}$. Then $n$ will be minted by the foundry having the largest exponent. If there are $m$ equal maximal exponents $e$ corresponding to $p(x_{i_1}), p(x_{i_2}) \dots p(x_{i_m})$, then $n$ will be minted by foundry $x_{i_j}$ where $j = e~mod(m)$.
  • A new foundry will be associated to the next prime number, will advertise its existence to the existing services (changing $T$) and respect as initial offset the smallest prime multiple larger than the maximum integer already minted by the others.

No doubt you will come up with a much cleverer idea! Please leave it in the comments.

Sources:

– H/T Christian Lawson-Perfect via Twitter

– Aaron Straup Cope: “The “Drinking Coffee and Stealing Wifi” 2012 World Tour”

– Rev Dan Catt: “London Artisan Integers; distribution, Hotel Infinity, punk, an excuse & explanation of sorts”

One Comment

The Log Lady and the Frobenioid of $\mathbb{Z}$

“Sometimes ideas, like men, jump up and say ‘hello’. They introduce themselves, these ideas, with words. Are they words? These ideas speak so strangely.”

“All that we see in this world is based on someone’s ideas. Some ideas are destructive, some are constructive. Some ideas can arrive in the form of a dream. I can say it again: some ideas arrive in the form of a dream.”

Here’s such an idea.

It all started when Norma wanted to compactify her twisted-prime-fruit pies. Norma’s pies are legendary in Twin Peaks, but if you never ate them at Double R Diner, here’s the concept.

Start with a long rectangular strip of pastry and decorate it vertically with ribbons of fruit, one fruit per prime, say cherry for 2, huckleberry for 3, and so on.

For elegance, I argued, the $p$-th ribbon should have width $log(p)$.

“That may very well look natural to you,” she said, “but our Geometer disagrees”. It seems that geometers don’t like logs.

Whatever. I won.

That’s Norma’s basic pie, or the $1$-pie as we call it. Next, she performs $n$ strange twists in one direction and $m$ magical operations in another, to get one of her twisted-pies. In this case we would order it as her $\frac{m}{n}$-pie.

Marketing-wise, these pies are problematic. They are infinite in length, so Norma can serve only a finite portion, limiting the number of fruits you can taste.

That’s why Norma wants to compactify her pies, so that you can hold the entire pastry in your hands, and taste the infinite richness of our local fruits.

“Wait!”, our Geometer warned, “You can never close them up with ordinary scheme-dough, the laws of scheme-pastry prohibit this!” He suggested to use a ribbon of marzipan, instead.

“Fine, then… Margaret, before you start complaining again, how much marzipan should I use?”, Norma asked.

“Well,” I replied, “ideally you’d want it to have zero width, but that wouldn’t close anything. So, I’d go for the next best thing, the log being zero. Take a marzipan-ribbon of width $1$.”

The Geometer took a $1$-pie, closed it with marzipan of width $1$, looked at the pastry from every possible angle, and nodded slowly.

“Yes, that’s a perfectly reasonable trivial bundle, or structure sheaf if you want. I’d sell it as $\mathcal{O}_{\overline{\mathbf{Spec}(\mathbb{Z})}}$ if I were you.”

“In your dreams!  I’ll simply call this  a $1$-pastry, and an $\frac{m}{n}$-pie closed with a $1$-ribbon of marzipan can be ordered from now on as an $\frac{m}{n}$-pastry.”

“I’m afraid this will not suffice,” our Geometer objected, ” you will have to allow pastries having an arbitrary marzipan-width.”

“Huh? You want me to compactify an $\frac{m}{n}$-pie  with marzipan of every imaginable width $r$ and produce a whole collection of … what … $(\frac{m}{n},r)$-pastries? What on earth for??”

“Well, take an $\frac{m}{n}$-pastry and try to unravel it.”

Oh, here we go again, I feared.

Whereas Norma’s pies all looked and tasted quite different to most of us, the Geometer claimed they were all the same, or ‘isomorphic’ as he pompously declared.

“Just reverse the operations Norma performed and you’ll end up with a $1$-pie”, he argued.

So Norma took an arbitrary $\frac{m}{n}$-pastry and did perform the reverse operations, which was a lot more difficult that with pies as now the marzipan-bit produced friction. The end-result was a $1$-pie held together with a marzipan-ribbon of width strictly larger or strictly smaller than $1$, but never gave back the $1$-pastry. Strange!

“Besides”, the Geometer added, “if you take two of your pastries, which I prefer to call $\mathcal{L}$ and $\mathcal{M}$, rather than use your numerical system, then their product $\mathcal{L} \otimes \mathcal{M}$ is again a pastry, though with variable marzipan-width.

In the promotional stage it might be nice to give the product for free to anyone ordering two pastries.”

“And how should I produce such a product-pastry?”

“Well, I’m too lazy to compute such things, it must follow trivially from elementary results in Picard-pastry. Surely, our log lady will work out the details in your notation. No doubt it will involve lots of logs…”

And so I did the calculations in my dreams, and I wrote down all formulas in the Double R Diner log-book, for Norma to consult whenever a customer ordered a product, or power of pastries.

A few years ago we had a Japanese tourist visiting Twin Peaks. He set up office in the Double R Diner, consulted my formulas, observed Norma’s pastry production and had endless conversations with our Geometer.

I’m told he categorified Norma’s pastry-bizness, probably to clone the concept to the Japanese market, replacing pastries by sushi-rolls.

When he left, he thanked me for working out the most trivial of examples, that of the Frobenioid of $\mathbb{Z}$…

Added december 2015:

I wrote this little story some time ago.

The last couple of days this blog gets some renewed interest in the aftermath of the IUTT-Mochizuki-Fest in Oxford last week.

I thought it might be fun to include it, if only in order to decrease the bounce rate.

If you are at all interested in the maths, you may want to start with this google+ post, and work your way back using the links curated by David Roberts here.

Leave a Comment

Two lecture series on absolute geometry

Absolute geometry is the attempt to develop algebraic geometry over the elusive field with one element $\mathbb{F}_1$. The idea being that the set of all prime numbers is just too large for $\mathbf{Spec}(\mathbb{Z})$ to be a terminal object (as it is in the category of schemes).

So, one wants to view $\mathbf{Spec}(\mathbb{Z})$ as a geometric object over something ‘deeper’, the “absolute point” $\mathbf{Spec}(\mathbb{F}_1)$.

Starting with the paper by Bertrand Toen and Michel Vaquie, Under $\mathbf{Spec}(\mathbb{Z})$, topos theory entered this topic.

First there was the proposal by Jim Borger to view $\lambda$-rings as $\mathbb{F}_1$-algebras. More recently, Alain Connes and Katia Consani introduced the arithmetic site.

Now, there are lectures series on these two approaches, one by Yuri I. Manin, the other by Alain Connes.

.

Yuri I. Manin in Ghent

On Tuesday, February 3rd, Yuri I. Manin will give the inaugural lectures of the new $\mathbb{F}_1$-seminars at Ghent University, organised by Koen Thas.

Coffee will be served from 13.00 till 14.00 at the Department of Mathematics, Ghent University, Krijgslaan 281, Building S22 and from 14.00 till 16.30 there will be lectures in the Emmy Noether lecture room, Building S25:

14:00 – 14:25: Introduction (by K. Thas)
14:30 – 15:20: Lecture 1 (by Yu. I. Manin)
15:30 – 16:20: Lecture 2 (by Yu. I. Manin)

Recent work of Manin related to $\mathbb{F}_1$ includes:

Local zeta factors and geometries under $\mathbf{Spec}(\mathbb{Z})$

Numbers as functions

Alain Connes on the Arithmetic Site

Until the beginning of march, Alain Connes will lecture every thursday afternoon from 14.00 till 17.30, in Salle 5 – Marcelin Berthelot at he College de France on The Arithmetic Site (hat tip Isar Stubbe).

Here’s a two minute excerpt, from a longer interview with Connes, on the arithmetic site, together with an attempt to provide subtitles:

——————————————————

(50.36)

And,in this example, we saw the wonderful notion of a topos, developed by Grothendieck.

It was sufficient for me to open SGA4, a book written at the beginning of the 60ties or the late fifties.

It was sufficient for me to open SGA4 to see that all the things that I needed were there, say, how to construct a cohomology on this site, how to develop things, how to see that the category of sheaves of Abelian groups is an Abelian category, having sufficient injective objects, and so on … all those things were there.

This is really remarkable, because what does it mean?

It means that the average mathematician says: “topos = a generalised topological space and I will never need to use such things. Well, there is the etale cohomology and I can use it to make sense of simply connected spaces and, bon, there’s the chrystaline cohomology, which is already a bit more complicated, but I will never need it, so I can safely ignore it.”

And (s)he puts the notion of a topos in a certain category of things which are generalisations of things, developed only to be generalisations…

But in fact, reality is completely different!

In our work with Katia Consani we saw not only that there is this epicyclic topos, but in fact, this epicyclic topos lies over a site, which we call the arithmetic site, which itself is of a delirious simplicity.

It relies only on the natural numbers, viewed multiplicatively.

That is, one takes a small category consisting of just one object, having this monoid as its endomorphisms, and one considers the corresponding topos.

This appears well … infantile, but nevertheless, this object conceils many wonderful things.

And we would have never discovered those things, if we hadn’t had the general notion of what a topos is, of what a point of a topos is, in terms of flat functors, etc. etc.

(52.27)

——————————————————-

I will try to report here on Manin’s lectures in Ghent. If someone is able to attend Connes’ lectures in Paris, I’d love to receive updates!

Leave a Comment