We hate paying for software

When I meet new people, they often seem genuinely interested to discover that I make apps for the iPhone1. A while ago, I mentioned that when you meet new people and tell them what you do, the responses are often predictable (“I do maths” is often responded to with “I did maths at A-Level”). For the iPhone developers, I think the response is usually both of these questions, in this order:

1. Is it free?
2. What does it do?

Surely these questions should be asked in reverse order. Annoyingly, despite deriving so much value from software, we don’t think we need to pay for it, even when it costs less than £1.

1or at least a hell of a lot more interested than they were when they thought I only did a PhD in mathematics

A brief update from Reading

After nearly seven years of living in the country’s largest city, I’ve now moved away to settle (for a year at least) in the 21st most populous - Reading, in Berkshire.

Anna completed her medical degree at Imperial College in July with flying colours. Not only did she achieve the highest results on the MTAS application1 in her deanery, but she got a lot of distinctions. In fact, Imperial gave her an extra distinction for getting so many distinctions. Finally, for her efforts, she is being rewarded with 12 hour shifts and lacking lunch breaks. It’s a stressful time, but she’s doing it, and as always, going above and beyond what is asked of her, and I’m proud of her.

As for me, I am still undergoing my PhD, trying hungrily to finish the research era and move on to the writing-up stage. The biggest blow to this comes from losing the BL and milling around QMUL2 to chat to other mathematicians about my work, and theirs. Today, I’ve arrived at the University of Reading’s open-access library to work on my research (or write a blog post, as the case may be) and hopefully this environment will be conducive to progress.

Perhaps in my next post I’ll explain the current problem I’m working on; hopefully with a solution!

1As far as I can tell, all this basically proves is that Anna writes a damn good essay.
2I did contact Reading’s mathematics department to see if I could mill around their department, but my email fell on deaf ears

My Issue with Infinitely many Parallel Universes

Since posting my thoughts on Kaku’s documentary yesterday, I had another idea as to why there cannot be an infinite number of other parallel universes that we could interact with.

Lets begin by assuming that there are infinity many other universes. This means that there are infinitely many other universes that are exactly the same as ours. It also means that there are infinitely many other universes that are the same as ours, but, say, 1 day ahead of us. In fact, it means that there exists an infinite number of  copies of our universe as it was X years in the future, or even the past.  So, if we ever did figure out how to contact another civilisation in another universe, then one of these copies of us X years ahead should have contact us, but they haven’t.

Physics of the impossible: parallel universes

I’ve just listened to Michio Kaku talk about his views on universes other than our own (based on his book Physics of the Impossible) and it has left a sour taste in my mouth.The major claim is:

There exist many other (perhaps infinitely many) other universes, separated by ours by only dimension, where the laws of physics could be different. Furthermore, it is possible to get to these other universes, and even create them.

Admittedly, I don’t know anything about theoretical physics, but the claims aren’t really what bothered me. It was the way that certain ideas were conveyed to they audience. I’ll just mention three of the worst offenders here.

Firstly, Kaku bands around the word “impossible” far too freely. I can see why, it’s a very sexy word. The issue I have is that nothing that was claimed to be impossible was not then later proved possible with more advanced technology or a lot of money. The book and TV show should perhaps be renamed: “Physics of the Infeasible”.

Secondly, and closely related to the first, was the horrible line:

“But you know, there’s a loophole.  There’s a loophole in the laws of physics.”

I cringe just quoting that. I appreciate that there are some topics in physics where ambiguity rules (e.g. the uncertainty principle), but that isn’t what he meant. The context was to do with creating a brand new parallel universe from within our own. The meaning behind the loophole quote was that until recently, physicists had no idea if it was possible or not, (probably because they hadn’t given it any thought) but now they have an experiment that they believe will indeed create a new universe (the method involves heating some matter to very high temperatures, which creates a universe so small that to put anything in to it, you’d probably need some anti-matter to widen and stabilise the gap first, and even then, the new-born universe would be in the process of a big bang, billions of years away from having any star or planets etc.).

Thirdly, the experiments that Kaku claim will work, cannot be proved in their current form. For example, the final experiment he reveals requires creating a particle accelerator in space by putting laser beams on orbiting asteroids (expensive, time consuming, but probably doable) firing a double ended laser beam in opposite directions around the asteroid circle (using magnets to realign the beam), and then have the beams collide to create a temperature of at least 10^18 degrees centigrade. The result of all this is a “bubbling” of space, which forms a bridge to an arbitrary parallel universe (which could be a perfect copy of own, which would be hilarious). Once the bridge is formed, Kaku suggests injecting nano robots through the gap before it closes, with instructions to populate that universe with our DNA, creating clones of us, with all of our memories, hopes, etc. The problem is, this is a 1 way ticket, so there is no way to verify that the experiment actually worked. This sounds like Carl Sagan’s dragon in the garage; i.e. if we can’t verify that it exists, does it actually exist at all? Even if it does, if it can have no effect on us, does it matter that it exists? As my PhD supervisor Peter Cameron commented after making a documentary on infinity:

Question: Has the universe been proven to be infinite?
Certainly not, rather the reverse. We can only ever be aware of a finite portion of whatever there is out there; our best current theories say that anything else can never affect us in any way, so effectively doesn’t exist.

I like discussing the possibility of moving items over from the world of science-fiction to science-fact, but not like this.

A Markov Chain for Selecting a Transversal Uniformly at Random

Given a Latin square of order $n$, we define a diagonal as $n$ cells, no two of which lie in the same row or column. If you had $n$ non-attacking rooks placed on the grid, you’d have a diagonal. The main diagonal is defined to be the cells (row $i$, column $i$) for $1 \leq i \leq n$.

transversal is a diagonal in which all of the symbols are distinct. For example, the red squares below are a transversal of this Latin square of order 9.

7 6 3 4 2 1 8 9 5
3 5 6 2 4 7 1 8 9
2 4 8 7 6 9 5 3 1
4 8 2 1 3 5 9 6 7
8 3 7 9 5 6 2 1 4
1 2 5 3 9 8 4 7 6
5 9 1 6 7 2 3 4 8
6 1 9 5 8 4 7 2 3
9 7 4 8 1 3 6 5 2

It is easy to show that every Latin square of order $n$ has $n!$ diagonals. However, the number of transversals is not so easy to calculate; this is because a pair of different (i.e. not main class equivalent) Latin squares of order $n$ can have a different number of transversals.

Picking a transversal uniformly at random from a square of size $n$, isn’t an issue. To do this, just generate a random permutation; if it’s a transversal keep it, otherwise throw it away and generate another one. However, I like Markov chains, so I thought I’d describe how to do it by perturbing diagonals.

Begin by picking any diagonal you like; the main diagonal will do. Now repeat the following move, which we shall call a “flip”:

  1. Pick two cells on your diagonal, say $(r, c, s)$ (i.e. row r, column c contains symbol s) and $(r’,c’,s’)$.
  2. Find $u$ and $v$ such that $(r’,c,u)$ and $(r,c’,v)$ exist.
  3. With probability 1/2 STOP. Otherwise, add $(r’,c,u)$ and $(r,c’,v)$ to the diagonal and remove $(r,c,s)$ and $(r’,c’,s’)$ and then STOP.

For example, suppose I have the following square and diagonal:

1 2 3 4
2 3 4 1
3 4 1 2
4 1 2 3

If I picked the cells (row 1, column 1), (row 3, column 3) in step 1 of the flip, with probability $1/2$, I would result in the following configuration:

1 2 3 4
2 3 4 1
3 4 1 2
4 1 2 3
Claim

Performing the flip takes a random walk on a regular, non-bipartite, finite, connected, undirected graph.


If this claim is true, then it is well known that the flip is a Markov chain with a unique stationary distribution, which is equal to the uniform distribution.

Remark: Before proving this claim, we remark that every diagonal can be represented as a permutation $\pi$ by saying that row $i$, column $\pi(i)$ is contained on our diagonal. Also, notice that the flip move amounts to multiplying $\pi$ by a transposition, and every transposition can be applied from any state.

Proof

Regular: The number of moves from any state is just the number of transpositions, which is always $n \choose 2$.

Non-bipartite: With probability $1/2$, the flip move returns you to the same position you started with, so every state has a loop.

Finite: there are only $n!$ possible states.

Undirected: The flip is immediately reversible; to reverse the effect of applying the transposition $q$, simply apply the transposition $q$ again.

Connected: Let $\rho$ and $\pi$ be the permutations representing any arbitrary states. There is some permutation $\mu$ such that $\pi\mu = \rho$ . Therefore we decompose $\mu$ in to a product of transposition and for each transposition, apply the corresponding flip move.

So this Markov chain really does converge to the uniform distribution, but how many flips do we have to make before the approximation is good enough? Coupling is probably the answer here – that is, have two squares of the same size and find a diagonal in each of them. If the diagonals are not in the same location, toss a coin apply the flip move to the first square if the coin yields a head, otherwise, apply the move to the second square. The coupling time is the time it takes for the diagonals to first coincide.

Anyway, as I already said – you’d probably never want to use this method, because generating a random permutation is exactly the uniform distribution, but this is a fun toy anyway.