What is the smallest positive integer that will never be used?

A great question from twitter:

This is a bit like the “what is the smallest uninteresting number?” paradox, but not paradoxical: we do not have to name it (and hence make it thought about/interesting) to reason about it.

I will first give a somewhat rough probabilistic bound, and then a much easier argument for the scale of this number. TL;DR: the number is likely smaller than 10^{173}.

Probabilistic bound

If we think about k numbers with frequencies N(x), N(x) approaches some probability distribution p(x). To simplify things we assume p(x) is a decreasing function of x; this is not strictly true (see below) but likely good enough.

If we denote the cumulative distribution function P(x)=\Pr[X<x] we can use the k:th order statistics to calculate the distribution of the maximum of the numbers: F_{(k)}(x) = [P(x)]^{k}. We are interested in the point where it becomes is likely that the number x has not come up despite the trials, which is somewhere above the median of the maximum: F_{(k)}(x^*)=1/2.

What shape does p(x) have? (Dorogovtsev, Mendes, Oliveira 2005) investigated numbers online and found a complex, non-monotonic shape. Obviously dates close to the present are overrepresented, as are prices (ending in .99 or .95), postal codes and other patterns. Numbers in exponential notation stretch very far up. But mentions of explicit numbers generally tend to follow N(x)\sim 1/\sqrt{x}, a very flat power-law.

So if we have k uses we should expect roughly x<k^2 since much larger x are unlikely to occur even once in the sample. We can hence normalize to get p(x)=\frac{1}{2(k-1)}\frac{1}{\sqrt{x}}. This gives us P(x)=(\sqrt{x}-1)/(k-1), and hence F_{(k)}(x)=[(\sqrt{x}-1)/(k-1)]^k. The median of the maximum becomes x^* = ((k-1)2^{-1/k}+1)^2 \approx k^2 - 2k \ln(2). We are hence not entirely bumping into the k^2 ceiling, but we are close – a more careful argument is needed to take care of this.

So, how large is $k$ today? Dorogovtsev et al. had on the order of k=10^{12}, but that was just searchable WWW pages back in 2005. Still, even those numbers contain numbers that no human ever considered since many are auto-generated. So guessing x^* \approx 10^{24} is likely not too crazy. So by this argument, there are likely 24 digit numbers that nobody ever considered.

Consider a number…

Another approach is to assume each human considers a number about once a minute throughout their lifetime (clearly an overestimate given childhood, sleep, innumeracy etc. but we are mostly interested in orders of magnitude anyway and making an upper bound) which we happily assume to be about a century, giving a personal k across a life as about 10^{8}. There has been about 100 billion people, so humanity has at most considered 10^{19} numbers. This would give an estimate using my above formula as x^* \approx 10^{38}.

But that assumes “random” numbers, and is a very loose upper bound, merely describing a “typical” small unconsidered number. Were we to systematically think through the numbers from 1 and onward we would have the much lower x^* \approx 10^{19}. Just 19 digits!

One can refine this a bit: if we have time T and generate new numbers at a rate r per second, then k=rT and we will at most get k numbers. Hence the smallest number never considered has to be at most k+1.

Seth Lloyd estimated that the observable universe cannot have performed more than 10^{120} operations on 10^{90} bits. If each of those operations was a consideration of a number we get a bound on the first unconsidered number as <10^{120}.

This can be used to consider the future too. Computation of our kind can continue until proton decay in \sim 10^{36} years or so, giving a bound of 10^{173} if we use Lloyd’s formula. That one uses the entire observable universe; if we instead consider our own future light cone the number is going to be much smaller.

But the conclusion is clear: if you write a 173 digit number with no particular pattern of digits (a bit more than two standard lines of typing), it is very likely that this number would never have shown up across the history of the entire universe except for your action. And there is a smaller number that nobody – no human, no alien, no posthuman galaxy brain in the far future – will ever consider.

 

 

Newtonmas fractals: rose of gravity

Continuing my intermittent Newtonmas fractal tradition (2014, 2016, 2018), today I play around with a very suitable fractal based on gravity.

The problem

On Physics StackExchange NiveaNutella asked a simple yet tricky to answer question:

If we have two unmoving equal point masses in the plane (let’s say at (\pm 1,0)) and release particles from different locations they will swing around the masses in some trajectory. If we colour each point by the mass it approaches closest (or even collides with) we get a basin of attraction for each mass. Can one prove the boundary is a straight line?

User Kasper showed that one can reframe the problem in terms of elliptic coordinates and show that this implies a straight boundary, while User Lineage showed it more simply using the second constant of motion. I have the feeling that there ought to be an even simpler argument. Still, Kasper’s solution show that the generic trajectory will quasiperiodically fill a region and tend to come arbitrarily close to one of the masses.

The fractal

In any case, here is a plot of the basins of attraction shaded by the time until getting within a small radius r_{trap} around the masses. Dark regions take long to approach any of the masses, white regions don’t converge within a given cut-off time.

Gravity fractal for N=2.
Gravity fractal for N=2.

The boundary is a straight line, and surrounding the simple regions where orbits fall nearly straight into the nearest mass are the wilder regions where orbits first rock back and forth across the x-axis before settling into ellipses around the masses.

The case for 5 evenly spaced masses for r_{trap}=0.1 and 0.01 (assuming unit masses at unit distance from origin and G=1) is somewhat prettier.

Gravity fractal for N=5, trap radius = 0.1.
Gravity fractal for N=5, trap radius = 0.1.
Gravity fractal for N=5, trap radius = 0.01.
Gravity fractal for N=5, trap radius = 0.01.

As r_{trap}\rightarrow 0 the basins approach ellipses around their central mass, corresponding to orbits that loop around them in elliptic orbits that eventually get close enough to count as a hit. The onion-like shading is due to different number of orbits before this happens. Each basin also has a tail or stem, corresponding to plunging orbits coming in from afar and hitting the mass straight. As the trap condition is made stricter they become thinner and thinner, yet form an ever more intricate chaotic web oughtside the central region. Due to computational limitations (read: only a laptop available) these pictures are of relatively modest integration times.

I cannot claim credit for this fractal, as NiveaNutella already plotted it. But it still fascinates me.

 

 

Wada basins and mille-feuille collision manifolds

These patterns are somewhat reminiscent of the classic Newton’s root-finding iterative formula fractals: several basins of attraction with a fractal border where pairs of basins encounter interleaved tiny parts of basins not member of the pair.

However, this dynamics is continuous rather than discrete. The plane is a 2D section through a 4D phase space, where starting points at zero velocity accelerate so that they bob up and down/ana and kata along the velocity axes. This also leads to a neat property of the basins of attraction: they are each arc-connected sets, since for any two member points that are the start of trajectories they end up in a small ball around the attractor mass. One can hence construct a map from [0,1] to (x,y,\dot{x},\dot{x}) that is a homeomorphism. There are hence just N basins of attraction, plus a set of unstable separatrix points that never approach the masses. Some of these border points are just invariant (like the origin in the case of the evenly distributed masses), others correspond to unstable orbits.

Each mass is surrounded by a set of trajectories hitting it exactly, which we can parametrize by the angle they make and the speed they have inwards when they pass some circle around the mass point. They hence form a 3D manifold \theta \times v \times t where t\in (0,\infty) counts the time until collision (i.e. backwards). These collision manifolds must extend through the basin of attraction, approaching the border in ever more convoluted ways as t approaches \infty. Each border point has a neighbourhood where there are infinitely many trajectories directly hitting one of the masses. They form 3D sheets get stacked like an infinitely dense mille-feuille cake in the 4D phase space. And typically these sheets are interleaved with the sheets of the other attractors. The end result is very much like the Lakes of Wada. Proving the boundary actually has the Wada property is tricky, although new methods look promising.

The magnetic pendulum

This fractal is similar to one I made back in 1990 inspired by the dynamics of the magnetic decision-making desk toy, a pendulum oscillating above a number of magnets. Eventually it settles over one. The basic dynamics is fairly similar (see Zhampres’ beautiful images or this great treatment). The difference is that the gravity fractal has no dissipation: in principle orbits can continue forever (but I end when they get close to the masses or after a timeout) and in the magnetic fractal the force dependency was bounded, a K/(r^2 + c) force rather than the G/r^2.

That simulation was part of my epic third year project in the gymnasium. The topic was “Chaos and self-organisation”, and I spent a lot of time reading the dynamical systems literature, running computer simulations, struggling with WordPerfect’s equation editor and producing a manuscript of about 150 pages that required careful photocopying by hand to get the pasted diagrams on separate pieces of paper to show up right. My teacher eventually sat down with me and went through my introduction and had me explain Poincaré sections. Then he promptly passed me. That was likely for the best for both of us.

Appendix: Matlab code

showPlot=0; % plot individual trajectories
randMass = 0; % place masses randomly rather than in circle

RTRAP=0.0001; % size of trap region
tmax=60; % max timesteps to run
S=1000; % resolution

x=linspace(-2,2,S);
y=linspace(-2,2,S);
[X,Y]=meshgrid(x,y);

N=5;
theta=(0:(N-1))*pi*2/N;
PX=cos(theta); PY=sin(theta);
if (randMass==1)
s = rng(3);
PX=randn(N,1); PY=randn(N,1);
end

clf

hit=X*0; 
hitN = X*0; % attractor basin
hitT = X*0; % time until hit
closest = X*0+100; 
closestN=closest; % closest mass to trajectory

tic; % measure time
for a=1:size(X,1)
disp(a)
for b=1:size(X,2)
[t,u,te,ye,ie]=ode45(@(t,y) forceLaw(t,y,N,PX,PY), [0 tmax], [X(a,b) 0 Y(a,b) 0],odeset('Events',@(t,y) finishFun(t,y,N,PX,PY,RTRAP^2)));

if (showPlot==1)
plot(u(:,1),u(:,3),'-b')
hold on
end

if (~isempty(te))
hit(a,b)=1;
hitT(a,b)=te;

mind2=100^2;
for k=1:N
dx=ye(1)-PX(k);
dy=ye(3)-PY(k);
d2=(dx.^2+dy.^2);
if (d2<mind2) mind2=d2; hitN(a,b)=k; end
end

end
for k=1:N
dx=u(:,1)-PX(k);
dy=u(:,3)-PY(k);
d2=min(dx.^2+dy.^2);
closest(a,b)=min(closest(a,b),sqrt(d2));

if (closest(a,b)==sqrt(d2)) closestN(a,b)=k; end
end
end

if (showPlot==1)
drawnow
pause
end
end
elapsedTime = toc

if (showPlot==0)
% Make colorful plot
co=hsv(N);
mag=sqrt(hitT);
mag=1-(mag-min(mag(:)))/(max(mag(:))-min(mag(:)));
im=zeros(S,S,3);
im(:,:,1)=interp1(1:N,co(:,1),closestN).*mag;
im(:,:,2)=interp1(1:N,co(:,2),closestN).*mag;
im(:,:,3)=interp1(1:N,co(:,3),closestN).*mag;
image(im)
end

% Gravity 
function dudt = forceLaw(t,u,N,PX,PY)
%dudt = zeros(4,1);
dudt=u;
dudt(1) = u(2);
dudt(2) = 0;
dudt(3) = u(4);
dudt(4) = 0;

dx=u(1)-PX;
dy=u(3)-PY;
d=(dx.^2+dy.^2).^-1.5;
dudt(2)=dudt(2)-sum(dx.*d);
dudt(4)=dudt(4)-sum(dy.*d);

% for k=1:N
% dx=u(1)-PX(k);
% dy=u(3)-PY(k);
% d=(dx.^2+dy.^2).^-1.5;
% dudt(2)=dudt(2)-dx.*d;
% dudt(4)=dudt(4)-dy.*d;
% end
end

% Are we close enough to one of the masses?
function [value,isterminal,direction] =finishFun(t,u,N,PX,PY,r2)
value=1000;
for k=1:N
dx=u(1)-PX(k);
dy=u(3)-PY(k);
d2=(dx.^2+dy.^2);
value=min(value, d2-r2);
end
isterminal=1;
direction=0;
end

Telescoping

Wednesday August 10 1960

Robert lit his pipe while William meticulously set the coordinates from the computer printout. “Want to bet?”

William did not look up from fine-tuning the dials and re-checking the flickering oscilloscope screen. “Five dollars that we get something.”

“’Something’ is not going to be enough to make Edward or the General happy. They want the future on film.”

“If we get more delays we can always just step out with a camera. We will be in the future already.”

“Yeah, and fired.”

“I doubt it. This is just a blue-sky project Ed had to try because John and Richard’s hare-brained one-electron idea caught the eye of the General. It will be like the nuclear mothball again. There, done. You can start it.”

Robert put the pipe in the ashtray and walked over to the Contraption controls. He noted down the time and settings in the log, then pressed the button. “Here we go.” The Contraption hummed for a second, the cameras clicked. “OK, you bet we got something. You develop the film.”

 

“We got something!” William was exuberant enough to have forgotten the five dollars. He put down the still moist prints on Robert’s desk. Four black squares. He thrust a magnifying glass into Robert’s hands and pointed at a corner. “Recognize it?”

It took Robert a few seconds to figure out what he was looking at. First he thought there was nothing there but noise, then eight barely visible dots became a familiar shape: Orion. He was seeing a night sky. In a photo taken inside a basement lab. During the day.

“Well… that is really something.”

 

Tuesday August 16 1960

The next attempt was far more meticulous. William had copied the settings from the previous attempt, changed them slightly in the hope of a different angle, and had Raymond re-check it all on the computer despite the cost. This time they developed the film together. As the seal of the United States of America began to develop on the film they both simultaneously turned to each other.

“Am I losing my mind?”

“That would make two of us. Look, there is text there. Some kind of plaque…”

The letters gradually filled in. “THIS PLAQUE COMMEMORATES THE FIRST SUCCESSFUL TRANSCHRONOLOGICAL OBSERVATION August 16 1960 to July 12 2054.” Below was more blurry text.

“Darn, the date is way off…”

“What do you mean? That is today’s date.”

“The other one. Theory said it should be a month in the future.”

“Idiot! We just got a message from the goddamn future! They put a plaque. In space. For us.”

 

Wednesday 14 December 1960

The General was beaming. “Gentlemen, you have done your country a great service. The geographic coordinates on Plaque #2 contained excellent intel. I am not at liberty to say what we found over there in Russia, but this project has already paid off far beyond expectation. You are going to get medals for this.” He paused and added in a lower voice: “I am relieved. I can now go to my grave knowing that the United States is still kicking communist butt 90 years in the future.”

One of the general’s aides later asked Robert: “There is something I do not understand, sir. How did the people in the future know where to put the plaques?”

Robert smiled. “That bothered us too for a while. Then we realized that it was the paperwork that told them. You guys have forced us to document everything. Just saying, it is a huge bother. But that also meant that every setting is written down and archived. Future people with the right clearances can just look up where we looked.”

“And then go into space and place a plaque?”

“Yes. Future America is clearly spacefaring. The most recent plaques also contain coordinate settings for the next one, in addition to the intel.”

He did not mention the mishap. When they entered the coordinates for Plaque #4 given on Plaque #3, William had made a mistake – understandable, since the photo was blurry – and they photographed the wrong spacetime spot. Except that Plaque #4 was there. It took them a while to realize that what mattered was what settings they entered into the archive, not what the plaque said.

“They knew where we would look.” Robert had said with wonder.

“Why did they put in different coordinates on #3 then? We could just set random coordinates and they will put a plaque there.”

“Have a heart. I assume that would force them to run around the entire solar system putting plaques in place. Theory says the given coordinates are roughly in Earth’s vicinity – more convenient for our hard-working future astronauts.”

“You know, we should try putting the wrong settings into the archive.”

“You do that if the next plaque is a dud.”

 

Friday 20 January 1961

Still, something about the pattern bothered Robert. The plaques contained useful information, including how to make a better camera and electronics. The General was delighted, obviously thinking of spy satellites not dependent on film cannisters. But there was not much information about the world: if he had been sending information back to 1866, wouldn’t he have included some modern news clippings, maybe a warning about stopping that Marx guy?

Suppose things did not go well in the future. The successors of that shoe-banging Khrushchev somehow won and instituted their global dictatorship. They would pore over the remaining research of the formerly free world, having their minions squeeze every creative idea out the archives. Including the coordinates for the project. Then they could easily fake messages from a future America to fool his present, maybe even laying the groundwork for their success…

William was surprisingly tricky to convince. Robert had assumed he would be willing to help with the scheme just because it was against the rules, but he had been at least partially taken in by the breath-taking glory of the project and the prospect of his own future career. Still, William was William and could not resist a technical challenge. Setting up an illicit calculation on the computer disguised as an abortive run with a faulty set of punch cards was just his kind of thing. He had always loved cloak-and-dagger stuff. Robert made use of the planned switch to the new cameras to make the disappearance of one roll of film easy to overlook. The security guards knew both of them worked on ungodly hours.

“Want to bet?” William asked.

“Bet what? That we will see a hammer and sickle across the globe?”

“Something simpler: that there will be a plaque saying ‘I see you peeping!’.”

Robert shivered. “No thanks. I just want to be reassured.”

“It is a shame we can’t get better numerical resolution; if we are lucky we will just see Earth. Imagine if we could get enough decimal places to put the viewport above Washington DC.”

The photo was beautiful. Black space, and slightly off-centre there was a blue and white marble. Robert realized that they were the first people ever to see the entire planet from this distance. Maybe in a decade or so, a man on the moon would actually see it like that. But the planet looked fine. Was there maybe glints of something in orbit?

“Glad I did not make the bet with you. No plaque.”

“The operational security of the future leaves a bit to be desired.”

“…that is actually a good answer.”

“What?”

“Imagine you are running Future America, and have a way of telling the past about important things. Like whatever was in Russia, or whatever is in those encrypted sequences on Plaque #9. Great. But Past America can peek at you, and they don’t have all the counterintelligence gadgets and tricks you do. So if they peek at something sensitive – say the future plans for a super H-bomb – then the Past Commies might steal it from you.”

“So the plaques are only giving us what we need, or is safe if there are spies in the project.”

“Future America might even do a mole-hunt this way… But more importantly, you would not want Past America to watch you too freely since that might leak information to not just our adversaries or the adversaries of Future America, but maybe mid-future adversaries too.”

“You are reading too many spy novels.”

“Maybe. But I think we should not try peeking too much. Even if we know we are trustworthy, I have no doubt there are some sticklers in the project – now or in the future – who are paranoid.”

“More paranoid than us? Impossible. But yes.”

With regret Robert burned the photo later that night.

 

February 1962

As the project continued its momentum snowballed and it became ever harder to survey. Manpower was added. Other useful information was sent back – theory, technology, economics, forecasts. All benign. More and more was encrypted. Robert surmised that somebody simply put the encryption keys in the archive and let the future send things back securely to the right recipients.

His own job was increasingly to run the work on building a more efficient “Conduit”. The Contraption would retire in favour of an all-electronic version, all integrated circuits and rapid information flow. It would remove the need for future astronauts to precisely place plaques around the solar system: the future could send information as easily as using ComLogNet teletype terminals.

William was enthusiastically helping the engineers implement the new devices. He seemed almost giddy with energy as new tricks arrived weekly and wonders emerged from the workshop. A better camera? Hah, the new computers were lightyears ahead of anything anybody else had.

So why did Robert feel like he was being fooled?

 

Wednesday 28 February 1962

In a way this was a farewell to the Contraption around which his life had circulated the past few years: tomorrow the Conduit would take over upstairs.

Robert quietly entered the coordinates into the controls. This time he had done most of the work himself: he could run jobs on the new mainframe and the improved algorithms Theory had worked out made a huge difference.

It was also perhaps his last chance to actually do things himself. He had found himself increasingly insulated as a manager – encapsulated by subordinates, regulations, and schedules. The last time he had held a soldering iron was months ago. He relished the muggy red warmth of the darkroom as he developed the photos.

The angles were tilted, but the photos were more unexpected than he had anticipated. One showed what he thought was in the DC region but the whole area was an empty swampland dotted with overgrown ruins. New York was shrouded in a thunderstorm, but he could make out glowing skyscrapers miles high shedding von Kármán vortices in the hurricane strength winds. One photo showed a gigantic structure near the horizon that must have been a hundred kilometres tall, surmounted by an aurora. This was not a communist utopia. Nor was it the United States in any shape or form. It was not a radioactive wasteland – he was pretty sure at least one photo showed some kind of working rail line. This was an alien world.

When William put his hand on his shoulder Robert nearly screamed.

“Anything interesting?”

Wordlessly he showed the photos to William, who nodded. “Thought so.”

“What do you mean?”

“When do you think this project will end?”

Robert gave it some thought. “I assume it will run as long as it is useful.”

“And then what? It is not like we would pack up the Conduit and put it all in archival storage.”

“Of course not. It is tremendously useful.”

“Future America still has the project. They are no doubt getting intel from further down the line. From Future Future America.”

Robert saw it. A telescoping series of Conduits shipping choice information from further into the future to the present. Presents. Some of which would be sending it further back. And at the futuremost end of the series…

“I read a book where they discussed progress, and the author suggested that all of history is speeding up towards some super-future. The Contraption and Conduit allows the super-future to come here.”

“It does not look like there are any people in the super-future.”

“We have been evolving for millions of years, slowly. What if we could just cut to the chase?”

“Humanity ending up like that?” He gestured towards Thunder New York.

“I think that is all computers. Maybe electronic brains are the inhabitants of the future.”

“We must stop it! This is worse than commies. Russians are at least human. We must prevent the Conduit…”

William smiled broadly. “That won’t happen. If you blew up the Conduit, don’t you think there would be a report? A report archived for the future? And if you were Future America, you would probably send back an encrypted message addressed to the right person saying ‘Talk Robert out of doing something stupid tonight’? Even better, a world where someone gets your head screwed on straight, reports accurately about it, and the future sends back a warning to the person is totally consistent.”

Robert stepped away from William in horror. The red gloom of the darkroom made him look monstrous. “You are working for them!”

“Call it freelancing. I get useful tips, I do my part, things turn out as they should. I expect a nice life. But there is more to it than that, Robert. I believe in moral progress. I think those things in your photos probably know better than we do – yes, they are probably more alien than little green men from Mars, but they have literally eons of science, philosophy and whatever comes after that.”

“Mice.”

“Mice?”

“MICE: Money, Ideology, Coercion, Ego. The formula for recruiting intelligence assets. They got you with all but the coercion part.”

“They did not have to. History, or rather physical determinism, coerces us. Or, ‘you can’t fight fate’.”

“I’m doing this to protect free will! Against the Nazis. The commies! Your philosophers!”

“Funny way you are protecting it. You join this organisation, you allow yourself to become a cog in the machine, feel terribly guilty about your little experiments. No, Robert, you are protecting your way of life. You are protecting normality. You could just as well have been in Moscow right now working to protect socialism.”

“Enough! I am going to stop the Conduit!”

William held up a five dollar bill. “Want to bet?”

 

And the pedestrians are off! Oh no, that lady is jaywalking!

In 1983 Swedish Television began an all-evening entertainment program named Razzel. It was centred around the state lottery draw, with music, sketch comedy, and television series interspersed between the blocks. Yes, this was back in the day when there was two TV channels to choose from and more or less everybody watched. The ice age had just about ended.

One returning feature consisted of camera footage of a pedestrian crossing in Stockholm. A sports commenter well-known for his coverage of horse-racing narrated the performance of the unknowing pedestrians as if they were competing in a race. In some cases I even think he even showed up to deliver flowers to the “winner”. But you would get disqualified if you had a false start or went outside the stripes!

I suspect this feature noticeably improved traffic safety for a generation.

I was reminded of this childhood memory earlier today when discussing the use of face recognition in China to detect jaywalkers and display them on a billboard to shame them. The typical response in a western audience is fear of what looks like a totalitarian social engineering program. The glee with which many responded to the news that the system had been confused by a bus ad, putting a celebrity on the board of shame, is telling.

Is there a difference?

But compare the Chinese system to the TV program. In the China case the jaywalker may be publicly shamed from the billboard… but in the cheerful 80s TV program they were shamed in front of much of the nation.

There is a degree of increased personalness in the Chinese case since it also displays their name, but no doubt friends and neighbours would recognize you if they saw you on TV (remember, this was back when we only had two television channels and a fair fraction of people watched TV on Friday evening). There may also be SMS messages involved in some versions of the system. This acts differently: now it is you who gets told off when you misbehave.

A fundamental difference may be the valence of the framing. The TV show did this as happy entertainment, more of a parody of sport television than an attempt at influencing people. The Chinese system explicitly aims at discouraging misbehaviour. The TV show encouraged positive behaviour (if only accidentally).

So the dimensions here may be the extent of the social effect (locally, or nationwide), the degree the feedback is directly personal or public, and whether it is a positive or negative feedback. There is also a dimension of enforcement: is this something that happens every time you transgress the rules, or just randomly?

In terms of actually changing behaviour making the social effect broad rather than close and personal might not have much effect: we mostly care about our standing relative to our peers, so having the entire nation laugh at you is certainly worse than your friends laughing, but still not orders of magnitude more mortifying. The personal message on the other hand sends a signal that you were observed; together with an expectation of effective enforcement this likely has a fairly clear deterrence effect (it is often not the size of the punishment that deters people from crime, but their expectation of getting caught). The negative stick of acting wrong and being punished is likely stronger than the positive carrot of a hypothetical bouquet of flowers.

Where is the rub?

From an ethical standpoint, is there a problem here? We are subject to norm enforcement from friends and strangers all the time. What is new is the application of media and automation. They scale up the stakes and add the possibility of automated enforcement. Shaming people for jaywalking is fairly minor, but some people have lost jobs, friends or been physically assaulted when their social transgressions have become viral social media. Automated enforcement makes the panopticon effect far stronger: instead of suspecting a possibility of being observed it is a near certainty. So the net effect is stronger, more pervasive norm enforcement…

…of norms that can be observed and accurately assessed. Jaywalking is transparent in a way being rude or selfish often isn’t. We may end up in a situation where we carefully obey some norms, not because they are the most important but because they can be monitored. I do not think there is anything in principle impossible about a rudeness detection neural network, but I suspect the error rates and lack of context sensitivity would make it worse than useless in preventing actual rudeness. Goodhart’s law may even make it backfire.

So, in the end, the problem is that automated systems encode a formalization of a social norm rather than the actual fluid social norm. Having a TV commenter narrate your actions is filtered through the actual norms of how to behave, while the face recognition algorithm looks for a pattern associated with transgression rather than actual transgression. The problem is that strong feedback may then lock in obedience to the hard to change formalization rather than actual good behaviour.

Thinking long-term, vast and slow

John Fowler "Long Way Down" https://www.flickr.com/photos/snowpeak/10935459325
John Fowler “Long Way Down” https://www.flickr.com/photos/snowpeak/10935459325

This spring Richard Fisher at BBC Future has commissioned a series of essays about long-termism: Deep Civilisation. I really like this effort (and not just because I get the last word):

“Deep history” is fascinating because it gives us a feeling of the vastness of our roots – not just the last few millennia, but a connection to our forgotten stone-age ancestors, their hominin ancestors, the biosphere evolving over hundreds of millions and billions of years, the planet, and the universe. We are standing on top of a massive sedimentary cliff of past, stretching down to an origin unimaginably deep below.

Yet the sky above, the future, is even more vast and deep. Looking down the 1,857 m into Grand Canyon is vertiginous. Yet above us the troposphere stretches more than five times further up, followed by an even vaster stratosphere and mesosphere, in turn dwarfed by the thermosphere… and beyond the exosphere fades into the endlessness of deep space. The deep future is in many ways far more disturbing since it is moving and indefinite.

That also means there is a fair bit of freedom in shaping it. It is not very easy to shape. But if we want to be more than just some fossils buried inside the rocks we better do it.

Stuff I have been up to

I have been busy everywhere except on this blog. Here are a few highlights, mostly my public outreach:

Long term survival

On BBC Future I have an essay concluding their amazing season on long term thinking where I go really long-term: The greatest long term threats facing humanity.

The approach I take there is to look at the question “if we have survived X years into the future, what problems must we have overcome before that?” It is not so much the threats (or frankly, problems – threat seems to imply a bit more active maliciousness than the universe normally brings about) that are interesting as just how radically we need to change or grow in power to meet them.

The central paradox of survival is that it requires change, and long-term that means that what survives may be very alien. Not so much a problem for me, but I think many disagree. A solid state civilization powered by black holes in a starless universe close to absolute zero, planning billions of years ahead may sound like a great continuation of us, or something too alien to matter.

Debunking doom

Climate doom is in the air, and I am frankly disturbed by how many think that we are facing an existential threat to our survival in the next decade or so – both because it is based on a misunderstanding of the science (which is not entirely easy to read), and how it breeds fatalism. As a response to a youngster question I wrote this piece on the Conversation: Will climate change cause humans to go extinct?

Robots in space

In Quartz, I have an essay about the next 50 years of space exploration and whether we should send robots instead: We should stop sending humans into space to do a robot’s job.

As often the title (not chosen by me, I prefer “A small step for machinekind”) makes it seem I am arguing for something different than I am actually arguing. As I see it, sending machines to space makes much more sense than sending humans… but given the very human desire to be the ones exploring, we will send humans in any case. Long-term we should also become multiplanetary if only to reduce extinction risks, but that might require sending robots ahead – except that in order to do that we need a lot of cheap, low-threshold experimentation and testing.

See also my chat with John Ellis and Kierann Shah about space at the How The Light Gets In Festival.

Good versus evil, Moloch versus Maria

Last year I participated in the Nexus Instituut “intellectual opera” in Amsterdam, enjoying myself immensely. I ended up writing an essay AI, Good and Evil… and Moloch (Official version Sandberg, A. (2019) Kunstmatige intelligentie en Moloch. Tijdschrift Nexus 81: De strijd tussen goed en kwaad. Nexus Instituut, Amsterdam (Tr. Laura Weeda)).

My main point is that evil is usually seen as active maliciousness or neglecting others, suffering itself, or meaningless/removal of meaning. Bad AI is unlikely to be actively malicious and making machines that can experience suffering is likely tricky, but automation that perform bad actions without caring is all too simple. The big risk is getting systems that are effective at implementing pointless goals too efficiently, destroying value (human or other) for no gain, not even to themselves. A further problem is also that these systems are systems, not individuals. We tend to think of AI as robots, “the AI” and other individual entities, when it just as well can be an ambient functionality of the wider techno-social world – impossible to pull the plug, with everybody complicit. We need better ways of debugging adaptive technological systems.

Life extension

On Humanity 2.0 I discussed/debated digital afterlives with Steve Fuller, Sr. Mary Christa Nutt, James Madden and Matthew Harvey Sanders. Got a bit intense at some points, but there is an interesting issue in untangling exactly what we want from an extended life. Not all forms of continuity count for all people: a continuity of consciousness is very different from a continuity of memory, a continuity of social interactions or functions, or leaving the right life projects in order.

Other stuff

Polish translation of my chapter on limits of morphological freedom.

Hacking the Brain: Dimensions of Cognitive Enhancement. A paper on cognitive enhancement, the final fruit of the “comparing apples to oranges” Volkswagen foundation project I participated in.

The GoCAS existential risk project final outputs arrived in the journal Foresight. I have two pieces, There is plenty of time at the bottom: The economics, risk and ethics of time compression and the group-written Long-term trajectories of human civilization.

I have also helped a bit with an Oxford project on sensitive intervention points for a post-carbon society. Not all tipping points are bad, and sometimes cartoon heroes may help.

Grand futures

Behind the scenes, my book is expanding… whether that is progress remains to be seen.

I have given various talks about some contents, but there is so much more. I think I have to do a proper lecture series this fall.

Newtonmass fractals 2018

It is Newtonmass, and that means doing some fun math. I try to invent a new fractal or something similar every year: this is the result for 2018.

The Newton fractal is an old classic. Newton’s method for root finding iterates an initial guess z_0 to find a better approximation z_{n+1}=z_{n}-f(z_{n})/f'(z_{n}). This will work as long as f'(z)\neq 0, but which root one converges to can be sensitively dependent on initial conditions. Plotting which root a given initial value ends up with gives the Newton fractal.

The Newton-Gauss method is a method for minimizing the total squared residuals S(\beta)=\sum_{i=1}^m r_i^2(\beta) when some function dependent on n-dimensional parameters $\beta$ is fitted to m data points r_i(\beta)=f(x_i;\beta)-y_i. Just like the root finding method it iterates towards a minimum of S(\beta): \beta_{n+1} = \beta_n - (J^t J)^{-1}J^t r(\beta) where J is the Jacobian J_{ij}=\frac{\partial r_i}{\partial \beta_j}. This is essentially Newton’s method but in a multi-dimensional form.

So we can make fractals by trying to fit (say) a function consisting of the sum of two Gaussians with different means (but fixed variances) to a random set of points. So we can set f(x;\beta_1,\beta_2)=(1/\sqrt{2\pi})[e^{-(x-\beta_1)^2/2}+(1/4)e^{-(x-\beta_1)^2/8}] (one Gaussian with variance 1 and one with 1/4 – the reason for this is not to make the diagram boringly symmetric as for the same variance case). Plotting the location of the final \beta(50) (by stereographically mapping it onto a unit sphere in (r,g,b) space) gives a nice fractal:

Basins of attraction of different attractor states of Gauss-Newton's method.
Basins of attraction of different attractor states of Gauss-Newton’s method. Two Gaussian functions fitted to five random points.
Basins of attraction of different attractor states of Gauss-Newton's method. Two Gaussian functions fitted to 10 random points.
Basins of attraction of different attractor states of Gauss-Newton’s method. Two Gaussian functions fitted to 10 random points.
Basins of attraction of different attractor states of Gauss-Newton’s method. Two Gaussian functions fitted to 50 random points.

It is a bit modernistic-looking. As I argued in 2016, this is because the generic local Jacobian of the dynamics doesn’t have much rotation.

As more and more points are added the attractor landscape becomes simpler, since it is hard for the Gaussians to “stick” to some particular clump of points and the gradients become steeper.

This fractal can obviously be generalized to more dimensions by using more parameters for the Gaussians, or more Gaussians etc.

The fractality is guaranteed by the generic property of systems with several attractors that points at the border of two basins of attraction will tend to find their ways to other attractors than the two equally balanced neighbors. Hence a cut transversally across the border will find a Cantor-set of true basin boundary points (corresponding to points that eventually get mapped to a singular Jacobian in the iteration formula, like the boundary of the Newton fractal is marked by points mapped to f'(z_n)=0 for some n) with different basins alternating.

Merry Newtonmass!

A bit of existential hope for Christmas (and beyond)

Slide from the Foresight Vision Weekend 2018. Image by Robert McCall.

Existential hope is in the air. The term was coined by my collegues Toby and Owen to denote the opposite of an existential catastrophe: the chance that things could turn out much better than expected.

Recently I had the chance to attend a visioning weekend with the Foresight Institute where we discussed ways of turning dystopias into utopias. It had a clear existential hope message, largely because  it was organised by Allison Duettman who is writing a book on the topic. I must admit that I got a bit nervous when I found out since I am also writing my own grand futures book, but I am glad to say we are dealing with largely separate domains and reasons for hope.

Now I extra am glad to add a podcast to the list of hopeful messages: the Future of Life Institute had me on the podcast Existential Hope in 2019 and beyond. It includes not just me and Allison, but also Max Tegmark, Anthony Aguirre, Gaia Dempsey, and Josh Clark (who also interviewed me for his podcast series End of the World).

I also participated in the Nexus Instituut event “The Battle between Good and Evil”. I assume the good guys won. I certainly had fun. I ended up arguing that good is only weak compared to evil like how water is weak compared to solid object – in small amounts it will deform and splash. In larger amounts it is like the tide or a tsunami: you better get out of the way. In retrospect that analogy might have been particularly powerful in the Netherlands. They know their water and how many hands (and windmills) can reshape a country.

Do we really have grounds for existential hope?

A useful analysis of the concept of hope can be found in Jayne M. Waterworth’s A Philosophical Analysis of Hope. He defines that hoping for something requires (1) a conception of an uncertain possibility, (2) a desire for an objective, (3) a desire that one’s desire be satisfied, and (4) that one takes an anticipatory stance towards the objective.

One can hope for things that have a certain or uncertain probability, but also for things that are merely possible. Waterworth calls the first category “hope because of reality” or probability hope, while the second category is “hope in spite of reality” or possibility hope. I might have probability hope in fixing climate change, but possibility hope in humanity one day resurrecting the dead – in the first case we have some ideas of how it might happen and what might be involved, in the second case we have no idea even where to begin.

Outcomes can also be of different importance: hoping for a nice Christmas present is what Waterworth calls an ordinary hope, while hoping for a solution of climate change or death is an extraordinary hope.

We may speak of existential hope in the sense that “existential eucatastrophes” can occur, or that our actions can make them happen. This would represent the most extraordinary kind of hope possible.

But note that this kind of hope is potentially “hope because of reality” rather than “hope in spite of reality”. We can affect the future to some extent (there is an interesting issue of how much). There doesn’t seem to be any law of nature dooming us to early existential risk or a necessary collapse of civilization. We have in the past changed the rules for our species in very positive ways, and may do so again. We may discover facts about the world that greatly expand the size and value of our future – we have already done so in the past. These are good reasons to hope.

Hope is a mental state. The reason hope is a virtue in Christian theology is that it is the antidote to despair.

Hope is different from optimism, the view that good things are likely to happen. First, optimism is a general disposition rather than directed at particular hoped for occurrences. Second, hope can be a very small and unspecific thing: rather than being optimistic about everything going the right way, a hopeful person can see the overwhelming problems and risks and yet hope that something will happen to get us through. Even a small grain of hope might be enough to fend of despair.

Still, there may be a psychological disposition towards being hopeful. As defined by Snyder in regarding motivations towards goals this involves a sense of agency (chosen goals can be achieved) and pathways (successful plans and strategies for those goals can be generated). This trait predicts academic achievement in students beyond intelligence, personality, and past achievement. Indeed, in law students hope but not optimism was predictive for achievement (but both contributed to life satisfaction). This trait may be more about being motivated to seek out good future states than actually being hopeful about many things, but the more possibilities are seen, the more likely something worth hoping for will show up.

If there is something I wish for everybody in 2019 and beyond it is having this kind of disposition relative to existential hope. Yes, there are monumental problems ahead. But we can figure out ways around/through/over them. There are opportunities to be grabbed. There are new values to be forged.

The winter solstice has just passed and the days will become brighter and longer for the next months. Cheers!

Throwing balls on torus-earth

A question came up on Physics Stack Exchange: how does thrown object trajectories look on a toroidal planet?

Locally we should expect them to be like on Earth: there is constant gravitational acceleration orthogonal to the ground, so they will just look like parabolas.

But if the trajectory is longer the rapid rotation ought to twist it, since there is a fair Coriolis effect. So the differential equation will be \mathbf{x}''=\mathbf{g}+2\mathbf{x}'\times\mathbf{\Omega}. If we just look at the velocity vector we get \mathbf{v}'=\mathbf{g}+2\mathbf{v}\times\mathbf{\Omega}.

That is, the forcefield will twist the velocity around if it is large and orthogonal to the angular velocity vector. If the velocity is parallel it will just be affected by gravity. For a trajectory near the pole it will become twisted and tilted:

Trajectories of a ball thrown from the surface with the angular velocity vector parallel to the gravity vector.
Trajectories of a ball thrown from the surface with the angular velocity vector parallel to the gravity vector.

For a starting point on the equator the twisting gets a bit more complex:

Trajectories of a ball thrown from the surface with the angular velocity vector orthogonal to the gravity vector.
Trajectories of a ball thrown from the surface with the angular velocity vector orthogonal to the gravity vector.

One can also recognise the analogy to an electron in an electromagnetic field: $latex \mathbf{v}’ = (q/m)(\mathbf{E}+\mathbf{v}\times \mathbf{B})$. Without gravity we should hence expect thrown balls to just follow helices around the omega-vector direction just like charged particles follow magnetic field-lines. One can eliminate the electric field from the equation by using a different velocity coordinate $latex \mathbf{v_2}=\mathbf{v}-\mathbf{E}\times\mathbf{B}/B^2$. Hence we can treat ball trajectories like helices plus a drift velocity in the \mathbf{g}\times\mathbf{\Omega} direction. The helix radius will be v/2\Omega.

How large is the Coriolis effect? On Earth \Omega=2\pi/86400\approx 0.0000727. On Donut it is 0.000614 and on Hoop 0.000494, several times higher. Still, the correction is not going to be enormous: for a ball moving 10 meters per second the helix radius will be 69 km on Earth (at the pole), 8.1 km on Donut, and 10 km on Hoop. We hence need to throw the ball a suborbital distance before the twists become really visible. At these distances the curvature of the planet and the non-linearity of the gravitational field also begins to bite.

I have not simulated such trajectories since I need a proper mass distribution model of the worlds, and it is messy. However, for an infinitely thin ring one can solve orbits numerically relatively easily (you “just” have to integrate elliptic integrals):

Some orbits around a massive ring.
Some orbits around a massive ring.

Beside the “normal” equatorial orbits and torus-like orbits winding themselves around the ring, there are internal halo-orbits and chaotic tangles.

Blueberry Earth

[Update: I have a paper version of this essay on arXiv:1807.10553, extending and correcting some of the results.]

On Physics Stackexchange billybodega asked the question:

BlueberrySupposing that the entire Earth was instantaneously replaced with an equal volume of closely packed, but uncompressed blueberries, what would happen from the perspective of a person on the surface?

Unfortunately the site tends to frown on fun questions like this, so it was in my opinion prematurely closed while I was working out the answer. So here it is, with some extra extensions:

The density of blueberries has been estimated to 625.56 kg/m3, WillO on Stackexchange estimated it to 13% of Earth’s density (5510*0.13=716.3 kg/m3), so assuming it to be around \rho_{berries}=700 kg/m3 appears to be reasonable. Blueberry pulp has a density similar to water,  980 to 1050 kg per m3 although this is both temperature dependent and depends on how much solids there are. The difference to the whole berries is due to the air between the berries. Note that these are likely the big, thick-skinned “American” blueberries rather than the small wild thin-skinned blueberries (bilberries) I grew up with; the latter would have higher density due to their smaller size and break far more easily.

So instantaneously turning Earth into blueberries will reduce its mass to 0.1274 of what it was. Gravity will become correspondingly weaker, g_{BE}=0.1274 g.

However, blueberries are not particularly sturdy. While there is a literature on blueberry mechanics (of course!), I did not manage to find a great source on their compressive strength. A rough estimate is possible: stacking a sugar cube (1 g) on a berry will not break it, while a milk carton (1 kg) will; 100 g has a decent but not certain chance. So if we assume the blueberry area to be one square centimetre the breaking pressure is on the order of P_{break}=0.1 g / 10^{-4} \approx 10,000 N/m2. This allows us to estimate at what depth the berries will start to break: z=P_{break}/g_{BE}\rho_{berries} = 11.4188 m. So while the surface will be free blueberries they will start pulping within a few meters of the surface.

This pulping has an important effect: the pulp separates from the air, coalescing into a smaller sphere. If we assume pulp to be an incompressible fluid, then a sphere of pulp with the same mass as the initial berries will be \rho_{pulp} r_{pulp}^3 = \rho_{berries}r_{earth}^3, or r_{pulp} = (\rho_{berries}/ \rho_{pulp} )^{1/3}r_{earth}. In this case we end up with a planet with 0.8879 times smaller radius (5,657 km), surrounded by a vast atmosphere.

The freefall timescale for the planet is initially 41 minutes, but relatively shortly the pulping interactions, the air convection etc will slow things down in a complicated way. I expect that the the actual coalescence will take hours, with some late bubbles from the deep interior erupting fairly late.

The gravity on the pulp surface is just 1.5833 m/s2, 16% of normal gravity – almost exactly lunar gravity. This weakens convection currents and the speed with which bubbles move up. The scale height of the atmosphere, assuming the same composition and temperature as on Earth, will be 6.2 times higher. This means that pressure will decline much less with altitude, allowing far thicker clouds and weather systems. As we will see, the atmosphere will puff up more.

The separation has big consequences. Enormous amounts of air will be pushing out from the pulp as bubbles and jets, producing spectacular geysers (especially since the gravity is low). Even more dramatic is the heating: a lot of gravitational energy is released as the mass is compacted. The total gravitational energy of a constant density sphere of radius R is

\int_0^R G [4\pi r^2 \rho] [4 \pi r^3 \rho/3] / r dr  = (16\pi^2 G\rho^2/3) \int_0^R r^4 dr
=(16\pi^2 G/15)\rho^2 R^5

(the first factor in the integral is the mass of a spherical shell of radius r, the second the mass of the stuff inside, and the third the 1/r gravitational potential). If we ignore the mass of the air since it is small and we just want an order of magnitude estimate,  the compression of the berry mass gives energy

E=(16\pi^2 G/15)(\rho_{berries}^2 r_{earth}^5 - \rho_{pulp}^2R_{pulp}^5) \approx 4.3594\times 10^{29} J.

This is the energy output of the sun over half an hour, nothing to sneeze at: blueberry earth will become hot. There is about 573,000 J per kg, enough to heat the blueberries from freezing to boiling.

The result is that blueberry earth will turn into a roaring ocean of boiling jam, with the geysers of released air and steam likely ejecting at least a few berries into orbit (escape velocity is just 4.234 km/s, and berries at the initial surface will be even higher up in the potential). As the planet evolves a thick atmosphere of released steam will add to the already considerable air from the berries. It is not inconceivable that the planet may heat up further due to a water vapour greenhouse effect, turning into a very odd Venusian world.

Meanwhile the jam ocean is very deep, and the pressure at depth will be enough to cause the formation of high pressure ice even if it is warm. If the formation process is slow there will be some separation of water into ice and a concentration of other chemicals in the jam ocean, but I suspect the rapid collapse will instead make some kind of composite pulp ice. Ice VII forms above 9 GPa, so if we just use constant gravity this happens at a depth z_{ice}=P_{VII}/g_{BE}\rho_{pulp}\approx 1,909 km, about two-thirds of the radius. This would make up most of the interior. However, gravity is a bit weaker in the interior, so we need to take that into account. The pressure from all the matter above radius r is P(r) =(3GM^2/8\pi R^4)(1-(r/R)^2), and the ice core will have radius r_{ice}=\sqrt{1-P_{VII}/P(0)}  \approx 3,258 km. This is smaller, about 57% of the radius, and just 20% of the total volume.

The coalescence will also speed up rotation. The original blueberry earth would of course make one rotation every 24 hours, but the smaller result would have a smaller moment of inertia. The angular momentum conservation gives (2/5)MR_1^2(2\pi/T_1) = (2/5)MR_2^2(2\pi/T_2), or T_2 = (R_2/R_1)^2 T_1, in this case 18.9210 hours. This in turn will increase the oblateness a bit, to approximately 0.038 – an 8.8 times increase over Earth.

Another effect is the orbit of the Moon. Now the two bodies have about equal mass. Is the Moon bound to blueberry earth? A kilogram of lunar material has potential energy GM_{BE}/r_{moon} \approx 1.6925 \times 10^{5} J, while the kinetic energy is 2.6442\times 10^5 J – more than enough to escape. Had it remained the jam ocean would have made an excellent tidal dissipation mechanism that would have slowed down rotation and moved blueberry earth towards tidal lock with the moon much earlier than the 50 billion years it would otherwise have taken.

So, to sum up, to a person standing on the surface of the Earth when it turns into blueberries, the first effect would be a drastic reduction of gravity. Standing on the blueberries might be possible in theory, except that almost immediately they begin to compress rapidly and air starts erupting everywhere. The effect is basically the worst earthquake ever, and it keeps on going until everything has fallen 714 km. While this is going on everything heats up drastically until the entire environment is boiling jam and steam. The end result is a world that has a steam atmosphere covering an ocean of jam on top of warm blueberry granita.