Useful conformal mappings

This post is to be a list of conformal mappings, so that I can get better at answering questions like “Find a conformal mapping from <this domain> to <this domain>”. The following Mathematica code is rough-and-ready, but it is designed to demonstrate where a given region goes under a given transformation.

whereRegionGoes[f_, pred_, xrange_, yrange_] := 

whereRegionGoes[f, pred, xrange, yrange] = 
 With[{xlist = Join[{x}, xrange], ylist = Join[{y}, yrange]},
  ListPlot[
   Transpose@
    Through[{Re, Im}[
     f /@ (#[[1]] + #[[2]] I & /@ 
      Select[Flatten[Table[{x, y}, xlist, ylist], 1], 
       With[{z = #[[1]] + I #[[2]]}, pred[z]] &])]]]]
  • Möbius maps - these are of the form \(z \mapsto \dfrac{az+b}{c z+d}\). They keep circles and lines as circles and lines, so they are extremely useful when mapping a disc to a half-plane. A map is defined entirely by how it acts on any three points: there is a unique Möbius map taking any three points to any three points (and hence any circle/line to circle/line). (Some of the following are Möbius maps.)
  • To take the unit disc to the upper half plane, \(z \mapsto \dfrac{z-i}{i z-1\)}
  • To take the upper half plane to the unit disc, \(z \mapsto \dfrac{z-i}{z+i}\) (the Cayley transform)
  • To rotate by 90 degrees about the origin, \(z \mapsto i \)z
  • To translate by \(a\), \(z \mapsto a+\)z
  • To scale by factor \(a \in \mathbb{R}\) from the origin, \(z \mapsto a \)z
  • \(z \mapsto exp(z)\) takes a vertical strip to an annulus - but note that it is not bijective, because its domain is simply connected while its range is not.
  • \(z \mapsto exp(z)\) takes a horizontal strip, width \(\pi\) centred on \(\mathbb{R}\) onto the right-half-plane.

Maps which might not be conformal

These maps are useful but we can only use them when the domain doesn’t include a point where \(f’(z) = 0\) (as that would stop the map from being conformal).

Discovering a proof of Heine-Borel

I’m running through my Analysis proofs, trying to work out which ones are genuinely hard and which follow straightforwardly from my general knowledge base. I don’t find the Heine-Borel Theorem “easy” enough that I can even forget its statement and still prove it (like [I can with the Contraction Mapping Theorem][2]), but it turns out to be easy in the sense that it follows simply from all the theorems I already know. Here, then, is my attempt to discover a proof of the theorem, using as a guide all the results I know but can’t necessarily prove without lots of effort.

How to discover the Contraction Mapping Theorem

A little while ago I set myself the exercise of stating and proving the Contraction Mapping Theorem. It turned out that I mis-stated it in three different aspects (“contraction”, “non-empty” and “complete”), but I was able to correct the statement because there were several points in the proof where it was very natural to do a certain thing (and where that thing turned out to rely on a correct statement of the theorem).

A roundup of some board games

It has been commented to me that it’s quite hard to find out (on the Internet) what different games involve. For instance, Agricola is a game about farming (and that’s easy to find out), but what you actually do while playing it is not easy to discover. Here, then, is a brief overview of some games.

Agricola

Agricola is a game in which you control a farm, and are aiming to make your farm thrive. It is a multiplayer game (for two to five) divided into turns. During each turn, you can make several actions (the number of actions you can make is determined by the number of people you have on your farm; you start out with two, and some actions increase the number of people you have). The actions are shared between all players - that is, if I make an action, you may not make that same action this turn. There is no other inter-player interaction - no attacking or anything, and you all have your own farm to manage. Your aim is to use actions to gather resources, build and extend your house, and plough fields; at the end of the game (after fourteen rounds, which is about forty minutes) everyone scores their own farm according to a set checklist, and the winner is the one who has the most prosperous farm.

Rage, rage against the poet’s hardest sell

I feel that I can write a sonnet well.
While sonnets are an easy thing to spout,
It’s really hard to write a villanelle.

By rhyming, any story I can tell:
in couplets, rhyme and rhythm evens out.
I feel that I can write a sonnet well.

But alternately-structured verse is hell.
The poet struggles, juggles words about:
It’s really hard to write a villanelle.

Enthusiasm’s difficult to quell.
An acolyte of Shakespeare, I’m devout:
I feel that I can write a sonnet well.

Writing essays

The aim of this post is twofold: to find out whether a certain mental habit of mine is common, and to draw parallels between that habit and the writing of essays.

I don’t know whether this is common or not, but when I’m feeling particularly not-alert (for instance, when I’m nearly asleep, or while I’m doing routine tasks like cooking), I sometimes accidentally latch onto a topic and mentally explain it to myself, as if I were teaching it to the Ancient Greeks (who, naturally, speak English). As an example, last night’s topic of discourse was “the composition of soil”, in which I “talked” about soil, in a manner roughly according to the following diagram. It is laid out so as to display roughly what occurred to me, and the order in which it occurred to me to “say” it.

Introduction to functional programming syntax of Mathematica

Recently, I was browsing the Wolfram Community forum, and I came across the following question:

What are the symbols @, #, / in Mathematica?

I remember that grasping the basics of functional programming took me quite a lot of mental effort (well worth it, I think!) so here is my attempt at a guide to the process.

In Mathematica, there are only two things you can work with: the Symbol and the Atom. There is only one way to combine these things: you can provide them as arguments to each other. We denote “\(x\) with arguments \(y\) and \(z\)” by “x[y,z]”.

Denouement of Myst III: Exile

A long time ago, in a galaxy far far away, I completed Myst III: Exile. It’s a stupendously good puzzle game. For some reason, it popped into my mind again a couple of days ago. This post contains very hefty spoilers for that game (it will completely ruin the ending - I will be discussing information-exchange protocols which are key to completing it), so if you’re ever going to play it, don’t read this post yet. It’s a brilliant game - I highly recommend it.

The Creation

Once upon a time, before this bountiful age of Matter and Light, there was only the Fell. A single being, surrounded by Chaos, content to remain alone forever (for it did not know what a “friend” was). It had not the power to shape the Chaos; neither had it the inclination, for it needed nothing and had no desires. For seething unchanging aeons, it persisted.

Then Chaos bore new fruit. A single electron, a point source of charge. The electric field thereby induced resonated throughout all of Chaos, propagating yet further, every second by the same amount; and so the Fell recognised distance. The Fell experienced curiosity then: for an electromagnetic field was entirely a novel sensation to it. The place it inhabited was changed, from isotropic to merely spherically symmetric: now the Fell identified direction. It began to move towards the point charge, first slowly, and then faster, until its velocity approached that of the electric field itself. All this was for to discover the nature of the descendant of Chaos.

Smartphone Charter

I am shortly to receive a new Nexus 5. I am determined not to become a smartphone zombie, and so I hereby commit to the following Charter.

  • I will keep my phone free of social networking apps, and I will ensure that I do not know the passwords to access their web interfaces. While they can be really quite handy, they are usually simply a distraction. People are used to the fact that I am present on the Internet only when I have my computer with me; there’s no need for that to change.
  • I will only look at text messages when I’m not talking to someone already.
  • I will never look at reddit or Hacker News or suchlike on my phone, unless there is no-one else around. Similarly, I will not access my news feeds from my phone. It’s far too easy to waste time and attention on them, when such attention is expected from the people I’m with.
  • If I am doing something on my phone, and someone asks me to stop, I will do one of the following (with number 1 being heavily preferred, and number 3 only in emergency):
    1. I will stop using my phone within ten seconds
    2. I will explain what I am doing, and ask permission to continue
    3. I will explain what I am doing (or say that an explanation will be forthcoming as soon as possible), and continue.
  • I will keep my phone out of reach of my bed when I go to sleep. It’s easy to become lost in the Internet, especially when you’re tired and not really concentrating.
  • I will be able to access emails on my phone, but I will set it up so that it only checks manually.
  • I will not install games on my phone. It’s not there as “something to keep me entertained when I’m bored” but as “something to be useful when needed”, and in my experience, games seem to intrude.

If I break any of these, you’re allowed to get annoyed with me. (The converse is false in general.)

Three explanations of the Monty Hall Problem

Earlier today, I had a rather depressing conversation with several people, in which it was revealed to me that many people will attempt to argue against the dictates of mathematical and empirical fact in the instance of the Monty Hall Problem. I present a version of the problem which is slightly simpler than the usual statement (I have replaced goats with empty rooms).

Monty Hall is a game show presenter. He shows you three doors; behind one of the three is a car, and the other two hide empty rooms. You have a free choice: you pick one of the doors. Monty Hall then opens a door which you did not pick, which he knows is an empty-room door. Then he gives you the choice: out of the two doors remaining, you may switch your choice to the other door, or stick with the one you first picked. You will get whatever is behind the door you end up with. You want to pick the car; do you stick with your first choice, or do you switch to the other door?

The Training Game

The book Don’t Shoot the Dog, by Karen Pryor, contains a simple exercise in demonstrating clicker training. This is a very successful technique used to produce behaviour in animals: having first associated the sound of a click with the reward of attention or food, one can then use the click as an immediate substitute for the reward (so that one can train more complicated, time-critical actions through positive reinforcement; a click is instant, but food or attention requires the trainer approaching the trainee). The demonstration exercise involves a person designated the Trainer, and a person designated the Trainee. The trainer has a goal in mind, but cannot communicate that goal to the trainee; the only interaction allowed is a click when the trainee is doing something vaguely correct. As an example, the trainee can be made to move towards a light switch by dint of a click when ey is pointing towards the switch, then a click when ey moves in that direction (ignoring any attempts to move in a different direction); the trainer then draws attention to the general area of the light by clicking whenever the trainee looks in the right direction, and then for any hand movement, then for hand movement in the direction of the light switch. This kind of incremental reinforcement can be used to achieve all sorts of interesting behaviour. (I seem to remember, from Don’t Shoot the Dog, that it has been used in chickens to make them do hundred-step dances, although I may have mis-remembered that.)

The Jean-Paul Sartre Cookbook

Many thanks to the Guru Bursill-Hall for bringing this tract to my attention through his weekly History of Maths bulletins. It was originally written in 1987 by Marty Smith, according to the Internet.

The Jean-Paul Sartre Cookbook

October 3.   Spoke with Camus today about my cookbook. Though he has never actually eaten, he gave me much encouragement. I rushed home immediately to begin work. How excited I am! I have begun my formula for a Denver omelet.

Markov Chain card trick

In my latest lecture on Markov Chains in Part IB of the Mathematical Tripos, our lecturer showed us a very nice little application of the theorem that “if a discrete-time chain is aperiodic, irreducible and positive-recurrent, then there is an invariant distribution to which the chain tends as time increases”. In particular, let \(X\) be a Markov chain on a state space consisting of “the value of a card revealed from a deck of cards”, where aces count 1 and picture cards count 10. Let \(P\) be randomly chosen from the range \(1 \dots 5\), and let \(X_0 = P\). Proceed as follows: define \(X_n\) as “the value of the \(\sum_{i=0}^{n-1} X_i\)-th card”. Stop when the newest \(X_n\) would be greater than \(52\).

My quest for a new phone

This post is unfinished, and may never be finished - I have decided that the Nexus 5 is sufficiently cheap, nice-looking and future-proof to outweigh the boredom of continuing the research here, especially given that such research by necessity has a very short lifespan. I am one of those people who hates shopping with a fiery passion.

My current phone is a five-year-old Nokia 1680. It has recently developed a disturbing tendency to turn off when I’m not watching it. This puts me in the market for a new phone. Having looked over the Internet for guides to which phone to buy, I’ve become lost in the swamp of information, so I am using this post to order my thoughts.

How to do Analysis questions

This post is for posterity, made shortly after Dr Paul Russell lectured Analysis II in Part IB of the Maths Tripos at Cambridge. In particular, he demonstrated a way of doing certain basic questions. It may be useful to people who are only just starting the study of analysis and/or who are doing example sheets in it.

The first example sheet of an Analysis course will usually be full of questions designed to get you up and running with the basic definitions. For instance, one question from the first example sheet of Analysis II this year is as follows:

The Ravenous

Once upon a midnight dreary, while I pondered, weak and weary,
I required a snack to feed me. Reaching in the kitchen drawer -
With the scissors, cut the wrapping, I revealed a jar of tapen-
Ade of olives. Gently snapping, snapping off the lid, I saw:
Lines of mouldy olive scored the tapenade. The lid I saw
Speckled with each mocking spore.

How the pangs of hunger rumbled while I cursed the jar I’d fumbled;
Indistinct, I faintly mumbled, “May this torture last no more!”
Suddenly I saw the bread bin; eagerly towards it edging,
Bravely to my stomach pledging, pledging food would be in store.
Opening that sacred vessel, only crumbs were left in store.
Savagely the bag I tore.

Training away mental bias

In which I recount an experiment I have been performing. Please be aware that in this article I am in “[meaning what I say][1]” mode.

For the past year or so, I have been consciously trying to identify and counteract places in the “natural”, everyday use of language in which gender bias is implicitly assumed to be correct. The kind of thing I mean is:

A: I called the plumber.

Meaning what you say

In conversation with (say, for the purposes of propagating a sterotype) humanities students, I am often struck by how imprecisely language is used, and how much confusion arises therefrom. A case in point:

A: I think that froogles should be sprogged!

B: Sprogging froogles would make the bimmers go plog.

A: But I use froogles all the time - I don’t care about the bimmers! Why are you so caught up on the plogging of bimmers?

Plot Armour

Wherein I dabble in parodic fiction. The title refers to the TV Tropes page on Plot Armour, but don’t follow that link unless you first resolve not to click on any links on that page. TV Tropes is the hardest extant website from which to escape.

Jim, third-in-command of the Watchers, ducked behind the Warlord’s force-field, desperately trying to catch his breath in the face of an inexorable onslaught. His attackers, the hundred-strong members of the Hourglass Collective, had never been defeated in pitched battle. As testament to their ability, two thousand of the finest troops the Watchers had to offer stood motionless around him, suspended in time; even now, even with five of the most experienced Watchers still fighting, the Hourglass forces were calmly and efficiently slitting the throats of the frozen soldiers. Skilled in cultivating terror, they were working in from afar, and it looked to Jim as though he would have to endure another half-hour of helplessness before they got to him at last. Jim and the Warlord had only survived this far by virtue of an accidental and uncontrollable burst of power from the Founder of the Watchers, released at a fortuitous moment to counter the time-suspension channelled by the Hourglass. That had given the Warlord time to protect five people, before the Founder had collapsed.