03 Apr 2012

Monodromy

The past few posts talked a little bit about fundamental groups and covering spaces. When we have a coving of a space, we can look at a neighbourhood “downstairs” in the covered space and then see the disjoint open sets “upstairs” in the covering space that map onto it. This post talks about monodromy, which is about what happens upstairs when we move in a circle around a point downstairs, first in the case of coverings of finite degree, and then in the case of Riemann surfaces.

Read the rest of this post »

02 Apr 2012

Covering Spaces and Subgroups of $\pi(X)$

The last two posts defined the fundamental group of a topological space and a covering space of a topological space. It turns out that these objects are intimately related, analogous to the way that extension fields relate to Galois groups. This post describes how covering spaces correspond to subgroups of the fundamental group (but doesn’t cover the Galois correspondence).

Read the rest of this post »

02 Apr 2012

Covering Spaces

In the previous post, I defined the fundamental group of a topological space. It turns out that the covering spaces of a topological space is related in a very intimate way to the fundamental group of that space. In order to discuss that, we need to know what a covering space is. This post defines a covering space and proves that covering spaces have a nice lifting property.

Read the rest of this post »

01 Apr 2012

The Fundamental Group

The point of algebraic topology is to attach algebraic objects to topological spaces in such a way that the algebraic objects somehow carry the topogical properties of the spaces, and toplogical maps correspond to homomorphisms. One of the first examples of this technique is the fundamental group of a topological space, which is defined in this post.

Read the rest of this post »

19 Mar 2012

Robo Question Period

Recently, I wrote a twitter bot that uses a Markov chain to generate random text in the style of questions and answers from Canada’s Question Period. The bot is here. Here’s how it works (although the approach is pretty simple and can be found many places on the internet using Google).

The interesting part of the code is in two functions, build_corpus and generate. build_corpus takes a bunch of source text (lists of strings) and a level parameter. Then it generates a hash whose keys are lists of level consecutive words which appear in the source text; each level-tuple of words maps to the conditional probability distribution of word frequencies given the occurrence of the tuple. We compute this by splitting the input into a list of words and running through the list, adding data for each tuple.

def build_corpus( fragments, level=2 )
    corpus = {"level" => level}
    fragments.each do |f|
        #Pad input with nil as start/end markers
        words = [nil]*level + f.strip.split + [nil]*level
        (words.length() -level).times do |i|
            key = words[i..i+level-1]
            corpus[key] ||= []
            corpus[key] = corpus[key] << words[i+level]
        end
    end
    return corpus
end

For instance, the 2-tuple ["having", "attempted"] maps to the list ["to"], so there is only one word, whereas ["the", "Conservative"] maps to a list of 211 words with, e.g., 88 instances of “government”, 27 instances of “Party”, etc. Obviously this isn’t a very space-efficient method, but it works and it’s fast to implement for a weekend project.

The next method generates text. It’s also pretty simple. It starts with nil and then loops, each time selecting a word based on the previously-generated words.

def generate( corpus )
    level = corpus["level"]
    output = [nil]*level
    begin
        key = output[-level .. -1]
        output = output << corpus[key].sample
    end while not output[-1] == nil
    return output.join(" ")
end

The rest of the code is handling the tweeting and getting the source data — it uses a program originally written for OpenParliament.ca to parse the Hansards. It runs as a cron job on my server now, so it updates every hour.

06 Mar 2012

Elliptic Curves and the Group Law

More blog notes! In a a previous note, I mentioned that the definition of an elliptic curve as $\mathbb{C}/\Lambda$ with the group law of addition (modulo $\Lambda$) matches up with the definition of an elliptic curve as $y^2 = x^3 + ax + b$ with the group law we get from intersecting lines etc, but didn’t really go into much detail. So now let’s examine this connection a bit more closely. First, we’ll look at the two definitions, and then see how we can recover one from the other.

Read the rest of this post »

05 Mar 2012

Projective Space

What is projective space (denoted $\mathbb{P}$) and why is it important? This note is about the “what”, but for the “why”, consider the following examples:

  1. Fractional linear transformations: A fractional linear transformation or a Möbius transformations is a function of the form $$f(z) = \frac{az + b }{ cz + d} $$ for $a,b,c,d \in \mathbb{C}$ with $ad - bc \neq 0$. These are really maps $\mathbb{C} \cup \{ \infty \} \rightarrow \mathbb{C} \cup \{ \infty \}$, and we really want to think of $\mathbb{C} \cup \{\infty\}$ as the Riemann sphere $\mathbb{P}^1(\mathbb{C})$, so that we get a nice geometric interpretation of these maps.

  2. Elliptic curves: When we deal with elliptic curves, there's always a “point at infinity” that seems somewhat mysterious. It turns out to also be related to the Riemann sphere $\mathbb{P}^1(\mathbb{C})$, since any elliptic curve is isomorphic to $\mathbb{P}^1(\mathbb{C})$, as a Riemann surface.

  3. $\mathbb{P}^n$ is a compactification of $\mathbb{C}^n$.

  4. $\mathbb{P}^n$ is the right place to do “projective geometry”, the geometry inspired by the study of perspective. For instance, in a perspective drawing, parallel lines actually meet at a “point at infinity”.

  5. Lots of nice geometric objects, including all Riemann surfaces, can be found inside of projective space.

Read the rest of this post »

02 Mar 2012

Welding glass

I got a piece of welding glass to use as a neutral density filter. It’s not not really neutral since it has a strong green tint, so it's really only suitable for black and white, and the sharpness is nothing to write home about. But it’s pretty good for ten dollars.

(download)

24 Feb 2012

Contour Maps

Made with Processing.js; the code is on GitHub here. You can try Processing in your browser here.

Read the rest of this post »

24 Feb 2012

Hydro One

Hydro-one-1

The Hydro One building at University Avenue and College Street.