Posts Tagged mathematics

Things


There are things that I can imagine
that are worse than what happens to me.
And there are things that I cannot imagine
that are worse than my mind’s eye can see,
and there are things that I cannot imagine
that are worse than even those things can be,
and there are things that are worse than the things in this verse,
and so on, into infinity.

But  there are things that are better than all of these things,
and these things, they have happened to me.
And there there are things that are better than any of that,
even things that my mind’s eye can see,
and there are things that I can’t even wonder about
that are wonderful as things can be,
and still better than that: it’s things all the way up
into heavens of infinity,
and things even more great than infinity states:
aleph one, aleph two, aleph three.

Read the rest of this entry »

, , , , ,

Leave a comment

Drabble: I sure appreciate the way you’re working with me.


“I… I th… thought you’d left,” I stammered.

“I came back,” he replied nonchalantly. “It’s not as if I died.” He looked at me accusingly.

“Well, I…”

Such lively eyes staring at me from a deathly face were unnerving. I gave in, and went to get some textbooks.

“Let’s work on something together,” he suggested. “My brain is open.” Indeed it was, but I tried not to look.

Uncertain though I was about the feasibility of living and undead working together, I could not refuse his offer of collaboration. And that’s how I got a late Erdős number of one.

Read the rest of this entry »

, , , , , , , , ,

Leave a comment

Unintentional Haiku in the Princeton Companion to Mathematics


I’ve had a copy of the Princeton Companion to Mathematics for a while, and intended to start a series called ‘forms and formulae’, where I’d write about some of the articles using poetic forms from the Princeton Encyclopaedia of Poetry and Poetics (addendum: I have since started a series called Forms and Formulae doing just that.) However, both books are huge and difficult to read on the bus, and the articles are long, so so far all I’ve managed to do in that vein is write a poem about platonic solids in a duel, and procrastinate my way out of writing about the entries whose names were alphabetically closest to Emmental. So I was excited to discover this morning that there is a pdf of the Princeton Companion to Mathematics available for free, apparently legally. Finally I can carry it around with me on my iPad and write poems about it whereever I want. But I don’t even need to do that, now; thanks to Haiku Detector, I can easily find the poems that are already in it. And boy are there some nice ones. Some were missed because Haiku Detector doesn’t know how to pronounce Greek letters and a lot of other mathematical notation, and the book sometimes hyphenates at the ends of lines so it looks like they’re good places for line breaks when they’re not. But these are the best ones I found. First off, some which don’t even sound like they’re about mathematics:

Watch your hand as it
reaches out gracefully to
pick up an object.

The difference between
the two definitions of
a secret is huge.

These ideas will
occupy us for the rest
of the article.

This opens you up
to new influences and
opportunities.

In our case, there are
two natural properties
that one should ask for.

Suppose that households
are able to observe one
another’s outputs.

Everything is now
a martingale and there can
be no arbitrage.

The magician can
at once identify which
digit has been changed.

This definition
has the advantage of great
flexibility.

Let us briefly sketch
the argument, since it is
an instructive one.

Moreover, it was
a thought that took many years
to be clarified.

The blocks are the sets
of seed varieties used
on the seven farms.

If you didn’t know where it came from, this could be about anything, but it also sums up the appeal of mathematics:

But then again, who
can deny the power of
a glimpse at the truth?

And a more transparent statement about the nature of mathematics:

“All roads lead to Rome,”
and the mathematical
world is “connected.”

But I really love it when you can’t tell it’s about mathematics until the last line:

The answer turns out
to be that we should weaken
our hypotheses.

It is important
to have a broad awareness
of mathematics.

We will focus on
the most important special
case: vector bundles.

Sometimes relations
are defined with reference to
two sets A and B.

This remains as an
outstanding open problem
of mathematics.

Church’s thesis is
therefore often known as the
Church–Turing thesis.

How, though, can we be
sure that this process really
does converge to x?

It turns out that both
choices are possible: one
automorphism

We shall now describe
the most important of these
extra assumptions.

Several themes balance
in Hilbert’s career as a
mathematician.

Indeed, the study
of such designs predates their
use in statistics.

This turns out to be
a general fact, valid
for all manifolds.

However, it is
a well-understood kind of
singularity.

In particular,
we can define the notion
of winding numbers.

This is exactly
the task undertaken in
proof complexity.

Questions mathematicians ask themselves:

How much better would
you do if you could compound
this interest monthly?

Why are spherical
harmonics natural, and
why are they useful?

What consequence should
this have for the dimension
of the Cantor set?

Can we reduce this
computational problem
to a smaller one?

How about checking
small numbers a, in order,
until one is found?

For what values of
the edge-probability
p is this likely?

Is every even
number greater than 4 the
sum of two odd primes?

Can one make sense of
the notion of a random
continuous path?

Perhaps this is the answer:

In mathematical
research now, there’s a very
clear path of that kind.

This one sounds like some kind of ‘how many roads must a man walk down’ question:

How many walks of
length 2n are there that start
and end at 0?

And while this isn’t actually a haiku, I can imagine it being sung in response to that song, with ‘the number of such walks’ to the tune of ‘the answer my friend’:

The number of such
walks is clearly the same as
W (k − 1).

Mathematicians don’t always answer questions in ways that other people find useful:

If instead we were
to ask each person “How big
is your family?”

In particular,
the average family size
becomes infinite

It follows that at
some intermediate r
the answer changes.

Things only a mathematician would feel the need to state explicitly:

This is a sum of
exponentials — hence the phrase
“exponential sums.”

What makes them boring
is that they do not surprise
us in any way.

Proof is left as an exercise for the reader; it probably takes several pages, but:

If you do know it,
then the problem becomes a
simple exercise.

Once this relative
primality is noticed,
the proof is easy.

All we have to do
is use one more term in the
Taylor expansion.

Doing things this way
seems ungainly to us, but
it worked very well.

It is not hard to
see that the two approaches
are equivalent.

(Of course, one needs to
check that those two expressions
really are equal!)

But this subtlety
is not too important in
most applications.

Some interesting statements:

For every person
P there exists a drink D
such that P likes D.

That is exactly
what a sphere is: two disks (or
cups) glued together!

Thus, recursion is
a bit like iteration
but thought of “backwards.”

Nevertheless, it
turns out that there are games that
are not determined.

(It can be shown that
there is exactly one map
with this property.)

The remainders get
smaller each time but cannot
go below zero.

There are other ways
to establish that numbers
are transcendental.

(The term “Cartesian
plane” for R2 is therefore
anachronistic.)

As usual, we
identify R2 with
the complex plane C.

Note that a block of
size 1 simply consists of
an eigenvector.

The upshot is that
we should always use a prime
number as our base.

Among the other
important number fields are
the cyclotomic fields.

Thus we obtain a
number that is less than the
quantity we seek.

So we might define
the “points” of a ring R to
be its prime ideals.

(For both halves, the pinched
equator is playing the
part of the point s.)

Thus, we have deduced
that length-minimizing curves
are geodesics.

For example, the
geodesics on the sphere
are the great circles.

The generators
correspond to loops around each
of the two circles.

The image of this
map will be a closed loop C
(which may cross itself).

We consider what
happens to C if we add
a small ball to it.

It is not hard to
show that the orbits form a
partition of X.

There are many ways
of combining groups that I
have not mentioned here.

I have thrown classes
of groups at you thick and fast
in this last section.

To apply Newton’s
method, one iterates this
rational function.

A quick overview
of physics will be useful
for the discussion.

can get away with
not understanding quantum
mechanics at all.

The quantum version
of Hamilton’s principle
is due to Feynman.

These encapsulate
the idea of a proof
by contradiction.

(A graph is simple
if it has neither loops nor
multiple edges.)

It is really an
algorithm that inputs
n and outputs an.

(An involution
is a permutation that
equals its inverse.)

If the tree has 2
vertices, then its code is
the empty sequence.

But the number of
possible orders of A,
B, and C is 6.

Number theory is
one of the oldest branches
of mathematics.

The percolation
and Ising models appear
to be quite different.

First, Albert shouts out
a large integer n and
an integer u.

This one is interesting if you imagine it’s about lines of poetry:

Another affine
concept is that of two lines
being parallel.

A mathematical protest slogan:

equality if
and only if x and y
are proportional.

A title of the mathematician’s equivalent of a song about unrequited love:

5.1.5
Why Is It so Difficult
to Prove Lower Bounds?

A series of short films:

10 Differences in
Economic Life among
Similar People

And something said in a soothing tone after a litany during a maths/mass:

Now let us return
to polynomials with
n variables.

The probability of finding a good haiku in the end matter is low, but I think this one’s pretty neat, even if it only has the right syllable counts if you say the ‘and’ in 906 but not 753:

law of large numbers,
753,
906

, , , , , , , ,

8 Comments

VI of Hearts: The Cantor Ternary Set Cantor Ternary Set


It’s self-referential! It’s self-similar! It would give Jonathan Coulton nightmares! It’s the Cantor Ternary Set Cantor Ternary Set: a representation of six steps in the construction of the Cantor ternary set using sped-up and slowed-down samples of Jonathan Coulton singing ‘Cantor ternary set’ in his song Mandelbrot Set, in which he professes to fear said set. I suppose you could say Jonathan Coulton is the cantor, but would it make him turn a reset?

Six of Hearts on a Jonathan Coulton Mandelbrot Floyd shirtI added a Wilhelm scream to the end, because that seemed appropriate. Here’s the audio-only version.

The Cantor ternary set is what you get if you take a line (technically a line segment, but we’ll call it a line), cut out the middle third, then cut out the middle third of the lines that remain, then cut out the middle thirds of those, and so on. If you continue doing this forever, you end up with just as many points as you started with (isn’t infinity grand?) but they’re nowhere near each other. I made the ‘lines’ at each stage out of clips of Jonathan singing ‘Cantor ternary set’ at different speeds; first at one 27th normal speed, then at one ninth, then one third, then normal speed, then three, nine, and 27 times normal speed. Then I put all the lines (i.e. audio clips) from the different steps on top of each other, positioned according to where each line came from in the original line, to make the full canticle (cantorcle?) You can see how it works in the video. To make it easier to differentiate the different layers, I put the second and fifth layers (counting from the slowest one at the bottom) toward the left ear and the third and sixth toward the right, leaving the other three (1/27-speed, original-speed, and 27-times speed) in the centre.

This didn’t take very long to make, in the end, but there were a lot of false starts. A long time ago I decided to make some kind of song about mathemusician Vi Hart using snippets of the various source tracks I have of Jonathan Coulton songs — a Hart-shaped box, on the table, and far too late you see the one inside the box is Vi Hart, who’s not a real heart but is a real bad-ass mathematician… that kind of thing. I realised some time ago that it would have to be the six of hearts, because in Roman numerals that’s the vi of Hearts. But that didn’t stop me from putting off starting it till about a week after the last minute. It’s a good thing I set my own deadlines.

A couple of days ago I finally started to actually work on this. I cut some sounds together (‘my heart’ and a ‘v’ sound from When You Go) to make Jonathan sing Vi Hart’s name, and collected relevant phrases from other songs. But I needed some kind of musical background track to tie it all together (like the Mr. Fancy Pants choir I used in my ‘Code Monkey Like…’ thingy.) I had considered using Vi’s piano music that she played on JoCo Cruise Crazy 2, but in the moment I didn’t feel like looking for it, and also didn’t feel like I could do it justice; I’ve just recently started listening to a basic and hilariously over-dramatic audio course on music theory, but most of what little I know about music, I learnt from Douglas HofstadterLeonhard Euler, Leon Harkleroad, and Vi Hart herself. While I’m okay with the mathematical side of things, I don’t think I remember enough to make a fitting musical tribute. So I asked myself, as I often do, what would Vi Hart do? Probably something symmetrical, mathematical, brilliant. So I hit on the idea of making a Cantor ternary set of Jonathan Coulton singing Vi Hart’s name, and using that as a backing track for the song.

Well, that was interesting, but it sounded terrible. The gap in the middle (the middle middle, not all the other gaps in middles which make the Cantor set what it is) sounded like a lawnmower, most of the rest sounded like a bad choir being massacred by a possessed lawnmower, and the 3x-speed ‘Vi Harts’ were more prominent and understandable than the ones at the original speed. I fiddled with levels for a while, and tried to make the lawnmower sound better by adding more words from other songs, but no dice. The fact was, using a Cantor ternary set of Vi Hart’s name (sung in that particular way) as a backing track was a terrible idea. And now that I think of it, I seem to recall that Hofstadter mentioned experimenting with fractal music and finding it didn’t work very well. That’s fine, though; I’m no musician, so I figured I could make it work to my low standards eventually. But just to take a break, on a whim I decided to try making a Cantor ternary set out of Jonathan singing ‘Cantor ternary set’.

Five minutes later, I discovered that the greater variety in syllables and pitches makes this sound quite interesting even without added lyrics, and you can fairly easily hear the words at several different speeds, so you can tell what’s happening well enough for it to be a demonstration of the Cantor ternary set in itself rather than just a backing track. Plus it’s a Cantor ternary set made up of the words ‘Cantor ternary set’. Why on Earth did I not think of that in the first place? Sorry Vi Hart; you’ll get your tribute song some day, and hopefully from someone better at music than I am.

On the subject of Vi Hart, last weekend I was at my physicist friend Aidan‘s place and noticed he had made some pretty neat things with Geomag, so I asked him to explain it all on video. He did mention Vi at one point. Here’s the video, in which we talk about RF cavities, conservation of angular momentum, triangles, and various kinds of pole, among other things:

Aidan also makes a lot of videos explaining particle physics; you should check them out.

Also on the subject of physics, and cool people I’ve met on JoCo Cruise Crazy (Vi Hart being one of them) here’s an LHC-related comic that Randall Munroe from xkcd drew for me on JoCo Cruise Crazy 3.

, , , , , , , ,

1 Comment

Six of Clubs: Birthday Monduckenen-duckenen


First, check out Vi Hart‘s video about the Thanksgiving turduckenen-duckenen:

Now have a look at Mike Phirman‘s song, Chicken Monkey Duck:

Okay, there are monkeys instead of turkeys, and the mathematics isn’t quite as explicit, but it’s pretty similar, don’t you think? Now, let’s imagine that Mike Phirman is actually singing the recipe for a fractal turducken, or rather, monducken. You can imagine all the monkeys are turkeys if you’d rather eat the result than present it to some pretty thing to please them. (Note: Please do not kill any actual monkeys.) Monkeys, like birds, belong in trees, so I wrote an AppleScript to draw binary trees in OmniGraffle based on the text of the song. You can try it for yourself if you like; all you need is a Mac, OmniGraffle, and a text file containing some words. See the bottom of this post for links and instructions.

If Mike’s reading the binary tree recipe layer by layer, like the first example in Vi’s video, one possible tree for the first stanza of Chicken Monkey Duck looks like this, where the orange ovals are monkeys, blue hexagons are chickens and green clouds are ducks. You can click it (or any other diagram in this post) for a scalable pdf version where you can read the words:

First stanza breadth-first tree

I added numbers so you can easily tell the chickens, monkeys and ducks apart and see which way to read the tree. It’s simple enough now, but the numbers will be useful for reading later trees which are not in such a natural reading order. This is called a breadth-first traversal of the tree, in case you’re interested. Now, what do birds and monkeys do in trees? They nest! So I wrote another script that will take any tree-like diagram in OmniGraffle and draw what it would look like if the birds, monkeys, or whatever objects they happen to be (the drawing is pretty abstract) were nested inside each other, just like the quails inside the chickens inside the ducks inside the turkey. This is what the monducken described by the first stanza of Chicken Monkey Duck, in the tree structure shown above, would look like:

First stanza breadth-first tree nested

The Monducken script allows using a different shape for each animal as redundant coding for colourblind people, even though it already chooses colours which most colourblind people should be able to distinguish. But that makes the nested version look a little messy, so here’s the above diagram using only ovals:

First stanza breadth-first tree nested ovals only

If you named this particular recipe in the other way, going down the left side of the tree and then reading each branch in turn in what is known as a pre-order traversal, it would be called a Monenmonenduckduckmon-monmonducken-enenmonduckmon-enmonduck-enduckmonducken-enmonen-duckenenmon-monenmon. It doesn’t sound nearly as nice as Turduckenailailenailail-duckenailailenailail because Mike Phirman didn’t take care to always put smaller animals inside large ones. I’m not holding that against him, because he didn’t realise he was writing a recipe, and besides, it’s his birthday. For reasons I’m not sure I can adequately explain, it’s always his birthday.

But what if I completely misunderstood the song, and his recipe is already describing the fractal monducken as a pre-order traversal, always singing a bird or monkey immediately before the birds and monkeys inside it? Well, don’t worry, I added a ‘pre-order’ option to the script, so you can see what that would look like. Here’s the tree:


First stanza preorder tree

and here’s how the actual birds/monkeys would look if you cut them in some way that showed all the animals, dyed them the correct colours, and looked through something blurry (here’s the version with different shapes):

First stanza preorder tree nested ovals only

Okay, but that’s only the first stanza. What if we use the whole song? If we pretend the recipe is breadth-first, this just means all the extra monkeys and birds will be at the bottom levels of the tree, so the outer few layers of our monducken will be the same, but they’ll have a whole lot of other things inside them:

Entire song breadth-first

Entire song breadth-first nested

Here’s a close-up. Isn’t it beautiful?

breadth-first close-up

If the entire song were treated as a pre-order monducken recipe, we’d still have the same monkey on the outside, but the rest would be quite different:

Entire song preorder

Entire song preorder nested

We could also read the birds and monkeys from left to right, as Vi did in her video. That’s what’s called an in-order tree traversal. But as delicious as they are mathematically, none of these orderings make much sense from a culinary perspective. Even if the monkeys were turkeys, it’s obvious that a nice big goose should be the outer bird. Vi suggested that herself. Of course, we could put the goose on the outside simply by reversing the song so it started with goose. But it would be much more fun and practical to pretend that Mike is naming the two inner birds before the one that contains them. This is called a post-order traversal, because you name the containing bird after the two birds or monkeys it will contain. It makes sense for a recipe. First you prepare a monkey (or turkey) and a chicken, then you immediately prepare a chicken and put them into it. You don’t have your workspace taken up with a whole lot of deboned birds you’re not ready to put anything into yet. Here’s one way the recipe could be done:

entire song postorder

Note that no matter what kind of traversal we use, there are actually several ways the recipe could be interpreted. If Mike says ‘monkey chicken chicken’ you know you should take a monkey and a chicken and put them in a chicken. But if the next words are ‘monkey chicken’, do you take that stuffed chicken and a monkey and put them inside a chicken? Do you debone the monkey and the chicken and wait for the next bird to find out what to put them into? What if there’s no next bird? What if there’s only one more bird (let’s say a duck) and you end up with a stuffed chicken, a stuffed duck, and nothing to stuff them into? You’d have to throw one of them out, because obviously your oven only has room for one monducken. Assuming you want two things in each thing, and you don’t know how long the song’s going to be, the best way to minimise this kind of problem is to always take your latest stuffed thing and the next, unstuffed thing, and put them inside the thing after that. The worst that’ll happen is you’ll have to throw out one unstuffed bird or monkey. But then you end up with a really unbalanced monducken, with a whole lot of layers in one part and lonely debonely birdies floating around in the rest.

It helps to have a robot chef on hand to figure out how many full layers of monducken you can make without it being too asymmetric. Mine makes the trees completely balanced as deeply as possible, and then does whatever was easiest to program with the remaining birds and monkeys. In this case it was easiest for my program to stuff a whole lot of extra animals into that one monkey on the left. This is what it looks like, with the varied shapes this time. Luckily, geese are rectangular, so they fill your oven quite efficiently:

entire song postorder nested

I like how you can see the explosion of duck radiating out from the inner left, engulfing all the other birds and monkeys before itself being swallowed by a goose. Such is life.

IFIf you would like to make diagrams like this yourself, there are two AppleScripts you can use. Both of them require OmniGraffle 5 for Mac, and if you want to make trees with more than 20 nodes you’ll probably need to register OmniGraffle.

The first is Monducken diagrammer, which you can download either as a standalone application (best if you don’t know what AppleScript is) or source code (if you want to tweak and critique my algorithms, or change it to use OmniGraffle Professional 5 instead of OmniGraffle 5.) Because it’s AppleScript, it works by telling other applications what to do, rather than doing things itself. So when you run it, TextEdit will ask you to open the text file you want to turn into a tree. Once you’ve opened one, OmniGraffle will start up (you may need to create a new document if it’s just started up) and ask you two things. First it will ask what kind of tree traversal the text file represents. Then it will ask you what kinds of shapes you want to use in your tree. You can select several shapes using the shift and command keys, just as you would for selecting multiple of just about anything on your Mac. Then you can sit back and watch as it creates some shapes and turns them into a tree.

The other one is Tree nester (standalone application/source code) You should have an OmniGraffle document open with a tree-like diagram in it (I suggest a tree generated using Monducken diagrammer; it has not been tested on anything else, and will probably just duplicate most of the shapes that aren’t trees or end up in an infinite loop if there’s a loopy tree) before you run this. It won’t ask any questions; it’ll just create a new layer in the front OmniGraffle document and draw nested versions of any trees into that layer.

If you’re looking at the source code, please bear in mind that I wrote most of this while on a train to Cologne last weekend, based on some code I wrote a while ago to draw other silly diagrams, and I really only dabble in AppleScript, and I forgot about the ‘outgoing lines’ and ‘incoming lines’ properties until I’d almost finished, so it probably isn’t the best quality AppleScript code. Not the worst either though. I welcome any tips.

, , , , , , , , , , , , , , ,

2 Comments

Seven of Spades: The Duel


At dawn, separated by twenty two paces,
their vertices pointed in each other’s faces,
the cube and its foe Octahedron stood still,
as fair Tetrahedron urged ‘fire at will!’
For Cube fought with earth, Octahedron with air,
and to win Tetrahedron with fire’s not fair.
“Fight fire with fire, that’s what we agreed on!”
said seconds, Dodeca- and Icosahedron.
But they paused, and they wavered, and called, “Toi ou moi?
Who’ll live for now, and who forever, like Galois?”

They each made a face, for they’d each made a point.
Was dying or living the upper adjoint?
The Galois connection was hard to ignore;
he’d dueled over shapely wee solids before,
and though he was shot, we can’t name his opponent,
while Galois’ last writings became a component
of fields (and of groups) of mathematics that show
among other things, what these two solids should know:
That Cube and its friend Octahedron are dual,
and no four-faced loner should cause them to duel.

At once, the two shook off their anthropomorphism,
and saw from their faces to points, isomorphism.
“You cannot kill me,” they each said to the other,
“For if I am a martyr, then so are you, brother,
and even though I’d be like Évariste too,
I’d rather not share such an honour with you.”
So they and their seconds proposed to their bride
that four eager suitors could each pick a side.
The pyramid’s answer was sweet but ironic:
“Of course you can share, but my love is Platonic.”

Read the rest of this entry »

, , , , , , , , , ,

7 Comments