Tuesday, May 1, 2012

Reading and Writing

It is quite unfortunate that English teachers are the ones who teach young children about the importance of reading. The only things I ever saw English teachers read were novels, and I found it difficult to believe that reading novels is that important.

Fast forward a couple of years, almost everything I learn is from books, blog posts, or other forms of written media. Reading has been the easiest way to get inside the best minds.

Since I've founded the data visualization startup Polychart, I've been spending a considerable amount of time learning enough business-ish concepts to get by. Books I've recently enjoyed include:
  • The Lean Startup by Eric Ries: a book that everyone in the startup world talks about and references. The case studies included are interesting.
  • The Personal MBA by Josh Kaufman: a really dense book about many aspects of business; claims to contain all the fundamental principles taught in an MBA program.
  • The Art of Profitability by Adrian Slywotzky: thoughts about profitability in an almost novel-like format. It's hard not to read many chapters in one sitting, even though you're not supposed to.
  • Ignore Everybody by Hugh MacLeod: fun read but really only learned one thing from it, which is to separate one's work from one's hobby. This goes against the conventional wisdom that you should follow your passions and make it your career.
  • Purple Cow by Seth Godin: again a fun read but it seems like the ideas in this book are already well-received enough that they are no longer surprising.
  • Don't Just Roll The Dice by Neil Davidson: a short read on software pricing. Page 37 onwards contain a lot of not-so-obvious psychological nuances about how people react to pricing. There is also a free PDF version.
It is also quite amazing how much time I'm spending writing. I spend maybe 10-20% of my time on email, and at least 30% of my time writing. This includes writing things like documentations, blog posts, emails, and other necessary documents.

So if you're still in grade school, don't neglect to practise reading and writing.

End of Entry

Wednesday, March 7, 2012

Pure and applied math

I had several questions about my majoring in pure math and applied math. To people not acquainted with the different branches of mathematics, this is the picture they have in mind:


Here, pure math is thought to be the kind of math that has no foreseeable application, and applied math consists of everything else. Fortunately (for me), the actual picture looks more like this:

Applied math is about modelling systems (e.g. physical systems) using calculus and tools derived from calculus. Pure math can be thought of as a combination of two sub-fields: algebra and analysis. Algebra deals with properties of sets objects that can be operated on (i.e. added/subtracted/composed), and analysis provides a rigorous basis for calculus (i.e. a lot of epsilon-delta proofs). Since applied math relies on calculus, analysis is a topic of interest to applied mathematicians as well. Thus pure and applied math intersects. 

A lot of times, we consider other branches of math that are "applied" as their own branches. In that case, the picture looks more like this:
Computer science uses many ideas from pure math, and some computer science theorems and proofs read like theorems and proofs from algebra. Machine learning, a computer science discipline, is really just another name for statistical learning. There are other topics in mathematics, but I don't know about them enough to come up with a full taxonomy.

Moral of the story is: pure math and applied math do intersect. In fact, if you pick any two branches of math, there is probably an overlap.

End of Entry

Monday, January 16, 2012

SOPA/UBB and NDAA

It's pretty awesome to see ordinary people speak up for the Internet to prevent the passage of SOPA. The whole "black-out" campaigns and boycotts were quite nicely played out. It reminds me of a year ago when telecom companies in Canada tried to introduce Usage Based Billing to charge Canadians more for internet use, and squeeze out independent ISP's. Canadians won in a similar manner: by making their voices heard on the internet.

Yes this is great, but there's something unsettling as well. All this activism to stop the politicians from mingling around with the beloved Internet, and dead silence on NDAA, which allows indefinite detention without trial to be codified into law. Rights and freedoms? Sure, take them! But god help you if you try to charge more for Internet.

End of Entry

Saturday, December 31, 2011

Reword your resolutions

I had various degrees of (lack of?) success setting goals. Most of the goals I had were pretty standard and dryly worded: "one tweet per day", "finish reading data viz books", etc. Even though these are things I really want to do, just reading the list was a little draining.

But one goal was different. It was written:
Meet Colbert.
This was in reference to the Hacking Education contest. Entering the contest was really an excuse to practise playing with data and writing about the results in my new data blog. Colbert wasn't even relevant. Even then, those two words made me smile. It excited me, so much that I just had to work on it... Although I didn't end up meeting Colbert, I accomplished what I was really after.

It's so much easier to stick to goals that make you smile, that motivate you, and that capture the desired result rather than the hard work required (even though the hard work is just as important). So if you're setting goals, make them interesting. Make them playful. Make them funny. Figure out what excites you, then use that as a proxy for what you actually want to accomplish (e.g. "meeting colbert" as a proxy for "start a data blog and write stuff in it").

Happy 2012 and if you have some resolutions in mind, good luck!

End of Entry

Tuesday, December 13, 2011

Galois Theory in 1500 Words

[This is a very brief overview of Galois theory. It's not meant to be rigorous, so apologies in advance for leaving out a lot of details and avoiding some delicacies. It was meant to be intuitive and light on math, but it turned out to be neither. If you aren’t familiar with field and group theory, well... proceed at your own risk...]

For a long time, people wondered whether it is possible to write down something like the "quadratic formula" for cubic, quartic and quintic polynomials with integer coefficients. We now know that for cubic and quartic polynomials, this is possible. But for degree 5 polynomials and beyond, it isn't. A proof of this was scribbled down hastily by Galois the night before his duel. Galois linked together field theory and group theory in a beautiful way to answer this very question.

Galois’s Approach: The Big Idea

What does writing down a “formula” for roots of a polynomial really mean? For one, we’d be writing down the roots in terms of rational numbers and a combination of +, -, x, ÷, and radicals (taking n-th roots). This is a very limited set of operations, and certainly not all real numbers can be written this way -- π, for example, can’t be written this way. We say that π is not solvable in radicals.

Are the roots of polynomials with integer coefficients solvable in radicals? Those roots aren’t just any real number, and certainly π is not a root of any polynomial with integer coefficients. Yet Galois showed that there are some degree-5 polynomials with roots that are not solvable in radicals. To see how he did this, we first need some terminology about fields, field extensions, and groups.

Fields

The set of rational numbers Q is an example of a field: a set of things you can add, subtract, multiply and divide. We can “extend” Q into bigger fields by adjoining things to it. For example, L=Q(√2) -- pronounced "Q adjoined root two" -- is defined to be the smallest field that contains both Q and √2, and is closed under +, -, x, and ÷. Here elements of Q(√2) are exactly numbers that can be written in the form (a+b√2)/(c+d√2) where a, b, c, d are integers. We call such a field L a (field) extension over Q (written L/Q).

When we're adjoining √2 to Q to construct Q(√2), what we're really doing is adjoining to Q a root of the polynomial f(x)=x² -2. We could do this with other higher-degree polynomials. Let p(x) be a polynomial with integer coefficients (and no repeating roots). We define the splitting field K of p(x) to be the smallest field containing both Q and all the roots of p(x). For example, the splitting field of p(x)=x²+1 has roots i and -i so a splitting field K of p(x) is K=Q(i,-i)=Q(i). (The last equality is true because 0 and i are in Q(i), so -i=0-i is also in Q(i)).
Conversely, we call an extension K/Q a Galois extension if it is the splitting field of some polynomial p(x). From before, Q(i)/Q is a Galois extension.

Q-Fixing Automorphisms

An automorphism F of a field K is an isomorphism from K to itself, where the algebraic structure is preserved -- specifically, F(a+b)=F(a)+F(b), F(ab)=F(a)F(b). In the case that K is an extension of Q, we’re more interested in automorphisms of K that has F(x)=x for all x in Q (or that F fixes elements of Q). An automorphism F of K is a Q-fixing automorphism if it has this property.

There are two Q-fixing automorphisms of L=Q(√2): the identity automorphism (call it e) that takes each element of Q(√2) to itself, and an automorphism (call it t) that takes anything from Q to itself, and √2 to -√2. It is possible to show that there is exactly one such automorphism t.

Groups

A group is a set with a "composition" operation • with an identity element. From above, the set of Q-fixing automorphisms of K, denoted G(K/Q) is a group with • being function composition, and e being the identity element. Observe that we do not require • to be commutative (so a•b may not be the same as b•a in this case).

Two groups are isomorphic if they have the same algebraic structure -- i.e. they’re essentially the same group except the elements have different names. It is useful to see whether G(K/Q) is isomorphic to a group that we know and understand. Two important classes of groups that are well understood are cyclic groups and permutation groups.

Examples of Groups

The cyclic group C(n) of order n is the set {0,1,2,3,..,n-1}, with • being addition mod n. From the example of L=Q(√2), L has G(L/Q)={e,t} with • being function composition. This is actually isomorphic to C(2)={0, 1}.

Permutation groups consist of functions that permute some "letters". We'll use S(n) to denote the group of permutations of n letters. For example, S(3) is all the permutations of letters {a, b, c}. A function F that takes ab, ba, cc is one such permutation (and hence an element of S(3)).

The Fundamental Theorem of Galois Theory

Galois noticed that for a Galois extension K/Q, there is a link between "subfields" of K containing Q, and "subgroups" of  G=G(K/Q). The quoted words mean exactly what you might think -- a subfield of K is a field L that is contained in K (and is closed under +, -, x, ÷). For example, Q is a subfield of R, and Q is a subfield of Q(√2). A subgroup of G is a group H that is contained in G (that is closed under • and contains the identity element).  For example, the subset {0,2,4} is a subgroup of C(6) = {0,1,2,3,4,5}.

More concretely, there is a 1-1 correspondence between subfields of L and subgroups of H:
  • For a subfield L of K containing Q, there is a subgroup H of G corresponding exactly to the automorphisms that fix all of L -- i.e. f(x)=x for all x in L, not just Q.
  • The reverse is true as well: if H is a subgroup of G, then there is some subfield L of K containing Q that is fixed by all of H.
In particular, whenever L/Q is itself a Galois extension, H is a normal subgroup of G. Think of H being normal as H being well-behaved enough that the quotient G/H is another group. We won't get into what this means, but this group G/H turns out to be isomorphic to G(L/Q).

For a concrete example, let’s take K=Q(i, ∛2). It’s possible to show that K/Q is a Galois extension, and that G=G(K/Q) is isomorphic to S(3). In particular, the subfields of K are Q(i) and Q(∛2), and they correspond to subgroups of S(3) isomorphic to C(3) and S(2). We saw before that Q(i) is a Galois extension, and C(3) happens to be normal in S(3).

Linking Back to the Big Idea

Suppose p(x) is a degree 5 polynomial, and that it has a root x that is solvable in radicals. Then really, x is in some field K containing Q, where K can be "built up" from Q by successively adjoining (n√α), the n-th root of α, for some n and α. For example, take  x=√(2+ √5). We set L=Q(√5) and K=L(√(2+√5)) to "build up" K in this manner.

Solvable Fields

In general, we call an extension K/Q solvable if K=K0⊇K1⊇K2⊇...⊇Q, where each K(i-1)=Ki(n√α) for some n and α. This is exactly the construction we had a paragraph ago. As another example, K=Q(i, ∛2) is a solvable extension since Q(i, ∛2)=Q(i)(∛2)⊇Q(i)⊇Q is in the desired form (recall i=√(-1)).

For a polynomial p(x) in Q, the splitting field K of p(x) is the smallest field containing all the roots of p(x), so the roots of p(x) are solvable in radicals if and only if K is solvable.

Solvable Groups

We can actually assume (ignoring some subtleties) that each K(i-1)/Ki from above is a Galois extension. In this case each G(K(i-1)/Ki) is actually isomorphic to C(n) for some n.

Thus in order for a field extension K/Q to be solvable, G=G(K/Q) must be in a particular form: there has to be a chain of subgroups,  G=G0⊇G1⊇G2⊇...⊇{e}, where each Gi is a normal subgroup of G(i-1) and Gi/G(i-1)=C(n) for some n, and {e} is the trivial group with just the identity element. In the case of K=Q(i, ∛2), the chain of subgroups looks like G(K/Q)=S(3)⊇C(3)⊇{e}.

A Quintic Formula Cannot Exist

To recap, roots of p(x) being solvable in radicals requires the splitting field K of p(x) to be a solvable field, which in turn requires G(K/Q) to be a solvable group.

But with a little group theory, we can show that S(5) is not solvable. Further, any quintic polynomial with two non-real roots has Galois group S(5). These last facts require some more concepts to develop, but in any case -- not all roots of quintic polynomials are solvable in radicals.

End of Entry