Archive for the ‘Geekery’ Category

This has been nearly finished for a long time. I thought I should finally release it on Father’s day, in honor of my dad who has made several attempts to understand group theory despite an ocean and 8 time zones separating us.

Group Theory

I am always unsure of how to explain what I do to non-mathematicians. In order to understand my research someone first has to understand some group theory, in particular character theory of finite groups. Group theory is a part of abstract algebra that deals with symmetry. For that reason it shows up throughout mathematics as well as physics, chemistry, cryptography, etc. Today, I won’t explain group theory, but I’ll give you a pretty picture of its greatest achievement: The Classification of Finite Simple Groups.

A major goal of group theory has been to characterize what types of finite groups can exist. That is to say, what sorts of symmetries of finite objects can exist. The mathematical community has succeeded in part by classifying all the finite simple groups. Stated simply (pun intended), simple groups are groups which cannot be constructed from smaller pieces. It is not true that they are in fact simple in the conventional sense of the word. The problem of how to build groups from smaller pieces seems hopeless to understand in full generality.  This is quite similar to the problem of understanding all molecules compared to understanding all elements.

There is a good article from a few years ago about group theory and the CFSG, as it is known colloquially. It is the longest proof ever written, weighing in at over 10,000 pages in its original form of about 500 journal articles. There is currently an initiative underway to rewrite the entire proof in a more concise and relaxed style. The first 6 volumes, and 2 volumes on quasi-thin groups, have already been published, in case someone wants to get me a Christmas present. :-)

The Periodic Table

Probably more familiar to most people is Mendeleev’s Periodic Table of the Elements. This is a listing of all the known elements, in order of increasing atomic number, into a table so that the elements in a column have similar properties (due to the configuration of outer electrons). Sometimes we forget just how amazing the periodic table is. After all, why should the chemical properties of the elements repeat periodically when ordered by atomic number?

The periodic table is certainly ubiquitous in popular culture, with periodic tables of many different subjects appearing on the internet. This is no doubt due to the fact that nearly everyone is familiar with it from High School chemistry. Below are a sampling of the diverse nature of the periodic tables available.

I just threw in for free Abecedarium of Periodic Tables. Now I just need a Periodic Table of Abecedaria… or a Periodic Table of Periodic Tables. Maybe an Abecedarium of Abecedaria should be next?

A periodic table strikes me as a good way to display the finite simple groups since, apart from 26 sporadic groups and the trivial group (which in not usually included), they all fall into families which can be arranged as the columns of the table. Moreover, there is one family that is completely different than the others (the cyclic groups of prime order), which corresponds to the noble gases. The alkali metals are also fairly different and have a parallel in the alternating groups which are quite different than the groups of Lie type.

Despite the abundance of periodic tables, I could never find a Periodic Table of Finite Simple Groups. So I decided that I had to take action, and I created The Periodic Table of Finite Simple Groups.

How I created it

My guiding principles in creating the Periodic Table of Finite Simple Groups were to be visually attractive, look as much like the real periodic table as possible, and be laid out in a logical manner. Initially I was inspired by Ivan Griffin’s (nice name BTW) periodic table written in LaTeX/TikZ, and early versions of my table were based on it. At this point, our versions bear no resemblance to each other apart from the fact that they are both written in LaTeX and TikZ and they use some of the same colors.

Since I wrote it in LaTeX with TikZ, the result is a pdf. The paper size is not standard because it was easier to construct that way. However zooming to fit on A4, or other A sized paper should work well. US Letter will be slightly more awkward, but should pose no real problems.

Perhaps the most difficult part, besides deciding on a layout, was getting the orders (that means the size of the group) to look good. I wanted them formatted with spaces separating groups of 3 digits, and broken across lines. It was also obvious that they would need different sized fonts. I made the formatting automatic based on the number of digits so that, for example, less than 15 digits goes on one line, less than 40 on two lines, and so on. While such a thing is certainly possible to write in pure (La)TeX, I thought it would be much easier to write in lua using LuaLaTeX. It turns out it wasn’t too difficult. By far the hardest part was making sure that things didn’t get expanded incorrectly, a task made more difficult by my desire to keep everything in a single file.

The Table Explained

In each column the groups increase in size going down, and as a very general rule I tried to put smaller groups to the left. More important however, was that similar families be next to each other. The same logic appears in the arrangement of the sporadic groups, where, for instance, all the Mathieu groups are together despite this causing orders to skip around a bit.

I also considered the non-classical groups to be “less important” and so there are fewer rows of them to better match the look of the real periodic table. They also have larger orders so it makes sense to include fewer of them on the table.

Since there are no “sporadic” elements, I had to decide what to do with the sporadic simple groups. These are groups that don’t fall into any of the other families. At one point I put them in the upper right corner with a jagged boundary like the non-metals. This made the table resemble the real periodic table, but it had more rows and less columns so it looked rather “thick”. Unfortunately, it didn’t make as much sense from an algebraic point of view, so I placed them where the lanthanides and actinides are found instead. This is slightly misleading, because if enough new elements were to be discovered there would be another row in that section. But you can’t have everything perfect. After all, there are an infinite number of simple groups, and only a finite number of elements.

I put the legend in the lower left like many periodic tables I have seen. I had a lot of space above the table, which I filled with Dynkin diagrams. Dynkin diagrams are the starting place for classifying the groups of Lie type. Note that the twisted groups of Lie type (those with a superscript to the left of the letter) arise from symmetries in the corresponding Dynkin diagrams.

The last row contains generic information and formulas for the family as a whole. Each cell contains some information, namely the order on the bottom, and the symbol most commonly used to denote it. The upper left will contain other symbols by which they may be known. For example the family of groups A_{n}(q) is also known as PSL_{n+1}(q), and L_{n+1}(q). The same is true for the sporadic groups, the monster is known as M, M_{1}, and F_{1}. For the rest of the groups, the upper left contains “sporadic isomorphisms”, e.g. A_{8} is isomorphic to A_{3}(2). The table is large enough that all such sporadic isomorphisms are on the table, except of course for the infinite family of isomorphisms B_n(2^m)\cong C_n(2^m). Such groups are listed only once: in the left-most column to which they belong.

I have of course made every attempt to provide accurate information, but if you notice any mistakes or suggestions for improvements, please let me know: I did use wikipedia as one of my sources.

EDIT: After a few people have asked in the comments, I feel like I should just state explicitly that anyone is free to use it for non-commercial use.  The only favor I ask is that you let me see the finished product if possible.


Read Full Post »

My grandpa arranged for us to see a doctor in LA while we were there to get a second opinion on Avery’s eyes. I’m glad he did because the doctor there told us that her prescription was too strong and should only be +7 in the left eye and should be +2 in the right. He also said that she should be wearing a patch all day every day and that she might have to have surgery on that eye and to find a doctor to see when we got back to Texas.

It's not real clear, but her left eye turns in.

So we found a doctor here and were lucky to be able to be seen quickly. Unfortunately the doctor said that her eye wasn’t correcting well enough, even with the patch and that surgery would be best to weaken the muscle toward the inside of her eye that was pulling that eye toward her nose.

To make a long story short, her left eye has very poor vision and her eyes are crossed. That meant that her brain had to kind of pick an eye to see out of and it picked her right eye because it saw so much better. This meant that her brain grew seeing mostly out of her right eye and doesn’t use her left much at all. The patching forced her to use the left eye.


So we did the surgery on Wednesday and it all went fine. I talked to her about what was going to happen and she was all excited about it by the time we had finished talking about it, but she wasn’t very happy about it once we got to the hospital and she was in a strange place.

"I don't like the hostible"

They gave her some medicine to make her sleepy and then took her to another room for the rest of the anesthetic and the surgery. It took a little less than an hour. They weakened the muscles that were pulling her eye in and up so she wouldn’t have to work so hard to keep it straight.

The rest of that day she slept and pretty much refused to open her eyes.

The next day she was much happier and said her eye hurt some, but seemed fine. The third day her eye got really puffy and the white of her eye was swelling up. The doctor said that that was probably a tissue reaction, but could also be a reaction to the antibiotic eye drops, or the beginnings of an infection, so she switched eyedrops for us and gave us an oral antibiotic to start. By the next day her eye was still a little red, but not swollen anymore and she was feeling a lot better.

The glasses and the surgery will make her left eye see as well as her right physically, but the doctor says that we will still have to patch her eye at least a few hours a day for several years to teach her brain to see out of that eye again. Right now her vision is 20/70 she says, but it was probably much, much worse before we started patching and most kids will get down to normal, 20/25 or 20/30.

I think probably she’s right about the eye being much much worse before patching. It’s been interesting to watch how she uses that eye more and more and gets better with it. When she first started she had to consciously do everything and she got her eyes up to within 2 inches of anything she had to see in detail. I think she ran into a wall or two as well. Of course it didn’t help that her prescription in her glasses was off I suppose. 

So far, though, the surgery seems like it’s been really successful. Her eye hasn’t crossed once since the surgery. Two or three times I’ve noticed it looks like her eyes maybe aren’t quite focused on the same point, but before the surgery her eye would go right to her nose as soon as she could use her right eye. And especially when she was tired it seemed like her eyes were out of sync more often than they were in. We see the doctor again on Tuesday, so we’ll see what she says.

Read Full Post »

Especially today I have much to be thankful for.

For starters we had thanksgiving dinner tonight. My lovely wife cooked a 2 (two) pound turkey, stuffing, squash, her patented garlicy mashed potatoes and the ever lovely berry pie. Of the turkey we have exactly one breast left. Of the mashed potatoes we have a multitude, but I have a feeling they won’t last long.

Thanksgiving feast except for the pie.

Here's a picture of everything except for the pie. Oops.

The kids were delightful today. I don’t have prostate cancer. It’s movie night for Mommy and Daddy. And of course many other things too numerous to count.

Probably the best thing about today, or at least the most unexpected good thing, was that I was able to help a fellow student. I had offered to help her with some LaTeX problems she was having. There were tons of errors in the file she sent me and I couldn’t help thinking to myself that she wasn’t very good at LaTeX. As proof that you shouldn’t judge (and should always backup), I found out that her hard drive had crashed and the specialist had only been able to recover the pdf files (he didn’t speak English, nor she Hungarian, so perhaps there was more that could have been done but it’s too late for that now). Her earlier latex files were all missing. So she had copied and pasted all the text into a new file and was going through trying to make it all work again. She said she wasn’t too worried about the text (since she could copy/paste), but she had some large derivation diagrams or something like that. She’s studying philosophy and doing her thesis in logic of temporal what-sa-ma-hu-sit.

On a lark I asked if she still had the recovered files and she said yes. I did a quick grep and noticed that there were some files, “jpeg”s and “mp4″s mostly, that contained at least parts of her old latex files. So then I collected all the files that looked promising and ran strings on them to collect all the text into one big file. It was still working on that when I had to leave (there were about 50,000 files with LaTeX-looking parts and it was over 1 GB when I left). Of course the majority of that file is junk. I then gave her some instructions on how to proceed. Namely to run split -p to break it into smaller files containing (hopefully) either all junk or all useful information. Then she’ll use some bash and grep to delete all trash files leaving her with only her old latex files. Hopefully there won’t be too many duplicates.  If it had finished before I left I might have tried to use diff to eliminate duplicates.

Just in case your hard drive ever crashes and your latex files weren’t recovered properly, here’s what to do. First open a terminal. If you don’t know how to do this please do not follow the instructions here. Get your nephew to help you or something. :-) Please note that I am typing these from memory and haven’t actually tested them. If you don’t know what you are doing please simply read for your own enlightenment.

  1. cd /path/to/where/recovered/files/are
  2. grep -lr -e 'usepackage' * > ~/interestingfiles.txt
    • This looks for files which have the usepackage in them. This is something that all but the simplest latex files have. It saves the names in a file for later.
  3. export IFS=$'\n'
  4. for f in $(cat ~/interestingfiles.txt) do strings "$f" >> ~/strings.txt; done
    • This runs strings on each of the interesting files. Note that we need to set the Internal Field Separator to just a newline otherwise file names with spaces will cause problems.
  5. mkdir recovered
  6. split -a 100 -p '(begin|end){document}' ~/strings.txt ~/recovered/possible.
    • Here we split the file into smaller files at begin{document} or end{document}. Since this is how latex files begin and end we are hopefully separating the wheat from the chaff.  Note that we need to set the suffix length (-a) big enough to accommodate the potentially thousands of output files.  100 is almost certainly overkill, but hey, who cares.
  7. for f in ~/recovered/possible.*; do grep -E 'usepackage' "$f" || rm -i "$f"; done
    • We delete any of the newly split files which don’t have usepackage in them. They are almost certainly full of junk.

Note that the last step is potentially destructive so I added -i to the rm command, which will prompt you before deleting any of the thousands of files and hence be very annoying. After you have verified that everything is working properly you may remove the -i. Of course recovering other types of files will require changing the regular expressions used. That is left as an exercise to the reader, or at least it’s left until you actually have to do it.

It’s nice to be able to help someone who has really had a bad accident, and it’s nice to know that my computer skills aren’t completely useless now that I no longer work for Omniture.

Read Full Post »

In honor of Pi day I thought I would pull out a post from the
unfinished archives. I wrote a few posts around the beginning of this
year, and never published them since they were meant to be part of a
series, and I don’t really have time to commit to finishing it. So
here is the first largely untouched from its original state.


Sometimes I can’t get an idea out of my head until I act on it.
Sometimes it’s enough to simply add it to my ever growing list of
things that I will do “someday”. Lately that idea has been making my
Master’s and Ph.D. theses accessible to the layperson—and adding it
to the list wasn’t enough. Perhaps starting to work on it will allow
me to get it out of my mind and actually work on my
research. [Editor’s note: It did.] That means I may not finish this
series of posts—particularly if nobody else cares.

In my mind’s eye, for some reason my audience is usually my 10 year
old sister. Of course, that means that I’ll have to keep things
simple. I will also gloss over technical details and try to avoid
mathematical jargon and notation unless it’s useful, in which case I
will of course explain it. I am probably incapable of making it as
entertaining as Vi Hart makes doodling, but hopefully it will be
understandable and not too boring. At the very least I’ll try to keep
it short.


One purpose of abstract algebra (the general area of my theses) is to
generalize numbers and see what sorts of computation are possible. We
want to see what can happen if we require that only certain properties
of numbers are preserved. To begin, let’s recall some different types
of numbers and different properties that we think are important.

Below is a list of different types of numbers with their mathematical
names, and a more common name or description in parentheses. I will
try to use the non-mathematical name throughout the rest of this
series, so if I forget you can point it out in the comments.

  • Natural numbers (counting numbers) 1,2,3,4,... (This often
    includes 0 depending on the context.)
  • Integers (whole numbers) ...,-2,-1,0,1,2,...
  • Rational numbers (fractions) 1/2,0.3,-5463/23
  • Real numbers (all the other non-imaginary numbers)
  • Complex numbers (real + imaginary) 3+2\pi i

Don’t worry if you haven’t heard of all of these, we won’t be needing
much more than integers and fractions. There are also different types
of numbers that I haven’t mentioned e.g. algebraic integers, but since
they are likely unfamiliar they would just distract us from the task
at hand.

One thing to know is that each set of numbers is larger than the one
above it. This means that the earlier ones are simpler, but the later
ones “solve more problems”. A few examples of what I mean are in

Suppose that I ask how many sheep you have on your farm. You can
answer with a counting number (assuming that we include 0). But
suppose that I asked how many more sheep you had this year than last
year. You might to able to answer with a counting number, but what if
you have fewer sheep this year? In that case you will need a
negative number. In either case the answer is an integer.

Now suppose that you wished to divide your sheep amongst your children
when you die. If you are lucky (or have only 1 child) you can divide
them evenly, but in general you will have to use a fraction. (Note
that mathematicians prefer “improper fractions” to “mixed numbers”.)

Now imagine that you wish to send your sheep into space, and so you
need to solve \tfrac12 mv^2=mgr for v to determine how large of a cannon
you must buy. (You can read more details about where this equation comes from.) Unless you are exceedingly lucky, you will not be able
to answer this using a fraction, you’ll need what we are called real
numbers (technically you only need square roots for this particular
equation). It’s not important for us to know much about real numbers
at this point, but suffice it to say that there are enough to “fill
in” the number line so that there are no gaps.

To finish off our introduction to the numbers we will take advantage
of my new invention: the OTTRAW (Ovine Transfer Through RAdio Waves)
device. The OTTRAW divides the sheep into little quantum sheep,
converts them to electrical signals and beams them via radio waves to
a receiver where they are converted back into regular sheep. Quantum
mechanics, electrical circuits and some formulations of relativity all
use imaginary numbers.  Don’t worry, I won’t touch on those applications here.
A much simpler, though less motivated example is as the solution to
the equation x^{2}=-1.

The important thing to notice is that, as man’s uses for numbers have
become more complex, so have the numbers he’s forced to use. This
naturally leads mathematicians to wonder what other sorts of “numbers”
might be out there waiting to be discovered/invented which would allow
us to solve even more problems.


The problems are not intended to be difficult and so should be
considered mandatory, though of course I can’t enforce it.

  1. What useful problems can you solve without negative numbers?
    without fractions?
  2. If you didn’t have negative numbers how would you solve problems
    involving a number of sheep that fluctuates from year to year? In
    what ways is this different than negative numbers? In what ways is
    it the same?
  3. What caused the discovery/creation of negative numbers? Where
    were they discovered? fractions?
  4. Where and when was zero created/discovered? Does this surprise
    you in light of the previous answer?
  5. What other systems have existed for writing numbers? How are they
    the same, and how are they different from our modern system?
  6. How many sheep do you have on your farm?

Read Full Post »

The little things mean so much, don’t they?  I just read a blog post about playing a “happy sound” for successful git commits. Since I use mercurial more than git, I added it to my hgrc instead.  I thought clapping was a little cheesy, so I have a Dalek saying, “Exterminate, Annihilate, Destroy!” whenever I fix a bug (based on commit message), and Vader saying, “Don’t be too proud of this technological terror you’ve created,” for new features.

The best part is that when I committed the changes to my hgrc and Vader spoke to me, I was startled—I had forgotten what I had just committed!  It made me giggle maniacally as my wife can attest.  As she noted though, I didn’t quite follow Vader’s admonition.  The next time I’m the leader of a software team, I’m going to make this mandatory.

Read Full Post »

Rachel pointed me a recent article about the possibility that schizophrenia may be caused by a virus. Pretty weird, eh? But wait, there’s more. The virus might actually be part of everyone’s DNA (called a Human Endogenous RetroVirus) but something around birth triggers it since babies born in winter are more likely to develop schizophrenia. But the bizarreness is not over yet. According to the article the same retrovirus (HERV-W) is also active in people with MS.   The article claims that we have over 100,000 retrovirus sequences in our DNA making up over 40%. According to another source 8 percent of our genome is retrovirus DNA, but another 42% is made of retrotransposons.  My mind is still boggling.

Naturally, I began to wonder if retroviruses are involved in rheumatoid arthritis and other autoimmune diseases. However, according to two articles, of which I only read the abstracts, that does not seem to be the case. I have to admit that I was a little disappointed. A newer study, however, “showed significant increases in HERV-K (HML-2) gag activity in RA patients”. I’m quite interested in the last article, but unfortunately the full text won’t be available until June of 2011, and I don’t think CEU subscribes to Clinical and Experimental Immunology. Nevertheless, I have added some further reading to my kindle.

If anyone knows of related articles (particularly longer, and targeted at a lay audience) I would be very happy to hear about then.  Or if you have access to the journals and want to send me the full text of some of the articles that would be great too.

Read Full Post »

I recently wrote about how I dislike case insensitive file systems because they lead to sloppy coding. I have since found some more evidence.

Exhibit A. I decided to try Optimism to keep track of my RA symptoms. It wouldn’t run on my machine, which I tracked down to it asking for Carbon.Framework when the file I have is Carbon.framework. So, I pulled an Ivan, and opened it up in Emacs and lowercased it. Interestingly, the string Carbon.framework was in there as well, so I don’t know exactly what was going on. Apparently it fixed the problem though and it now works fine. (Note to kids at home: Do not try to change strings in an executable unless you keep the exact same number of bytes in the string. In fact, unless you understood why I told you that, don’t do it.)

Exhibit B. I have been working a little on a Cocoa GUI for Sage and so I thought I would put together a binary distribution with the new GUI. I did so, but got feedback that it couldn’t copy onto a case insensitive filesystem. It turns out that during the build process Singular is copied to singular for convenience. They are exactly the same file, and on a case insensitive filesystem the copy will fail, but the desired effect is still there since it can be called as either Singular or singular. This and a few similar things mean that it’s not possible to build on a case sensitive filesystem and run on an insensitive one or vice versa. To do this we would at least have to audit the code and see whether Singular is called as Singular, or singular and convert to one, potentially breaking people’s code at home.

If you ever find the man who thought case insensitive filesystems (or languages—I’m looking at you LISP, and you too AppleScript) let him know I have a bug with his name on it.

Read Full Post »

Older Posts »