Category Archives: Good Math

Abstract Algebra and Computation – Monoids

In the last couple of posts, I showed how we can start looking at group
theory from a categorical perspective. The categorical approach gives us a
different view of symmetry that we get from the traditional algebraic
approach: in category theory, we see symmetry from the viewpoint of
groupoids – where a group, the exemplar of symmetry, is seen as an
expression of the symmetries of a simpler structure.

We can see similar things as we climb up the stack of abstract algebraic
constructions. If we start looking for the next step up in algebraic
constructions, the rings, we can see a very different view of
what a ring is.

Before we can understand the categorical construction of rings, we need
to take a look at some simpler constructions. Rings are expressed in
categories via monoids. Monoids are wonderful things in their own right, not
just as a stepping stone to rings in abstract algebra.

What makes them so interesting? Well, first, they’re a solid bridge
between the categorical and algebraic views of things. We saw how the
category theoretic construction of groupoids put group theory on a nice
footing in category theory. Monoids can do the same in the other direction:
they’re in some sense the abstract algebraic equivalent of categories.
Beyond that, monoids actually have down-to-earth practical applications –
you can use monoids to describe computation, and in fact, many of the
fundamental automatons that we use in computer science are, semantically,
monoids.

Continue reading

Clarifying Groupoids and Groups

This post started out as a response to a question in the comments of my last post on groupoids. Answering those questions, and thinking more about the answers while sitting on the train during my commute, I realized that I left out some important things that were clear to me from thinking about this stuff as I did the research to write the article, but which I never made clear in my explanations. I’ll try to remedy that with this post.

Continue reading

More Groupoids and Groups

In my introduction to groupoids, I mentioned that if you have a groupoid, you can find
groups within it. Given a groupoid in categorical form, if you take any object in the
groupoid, and collect up the paths through morphisms from that object back to itself, then
that collection will form a group. Today, I’m going to explore a bit more of the relationship
between groupoids and groups.

Before I get into it, I’d like to do two things. First, a mea culpa: this stuff is out on the edge of what I really understand. My category-theory-foo isn’t great, and I’m definitely
on thin ice here. I think that I’ve worked things out enough to get this right, but I’m
not sure. So category-savvy commenters, please let me know if you see any major problems, and I’ll do my best to fix them quickly; other folks, be warned that I might have blown some of the details.

Second, I’d like to point you at Wikipedia’s page on groupoids as a
reference. That article is quite good. I often look at the articles in Wikipedia and
MathWorld when I’m writing posts, and while wikipedia’s articles are rarely bad, they’re also
often not particularly good. That is, they cover the material, but often in a
somewhat disorganized, hard-to-follow fashion. In the case of groupoids, I think Wikipedia’s
article is the best general explanation of groupoids that I’ve seen – better than most
textbooks, and better than any other web-source that I’ve found. So if you’re interested in
finding out more than I’m going to write about here, that’s a good starting point.

Continue reading

What makes linear logic linear?

Sorry for the lack of posts this week. I’m traveling for work, and
I’m seriously jet-lagged, so I haven’t been able to find enough time
or energy to do the studying that I need to do to put together a solid
post.

Fortunately, someone sent me a question that I can answer
relatively easily, even in my jet-lagged state. (Feel free to ping me with more questions that can turn into easy but interesting posts. I appreciate it!)

The question was about linear logic: specifically, what makes
linear logic linear?

Continue reading

Capturing More Symmetry using Categories: Groupoids

Today’s entry is short, but sweet. I wanted to write something longer, but I’m very busy at work, so this is what you get. I think it’s worth posting despite its brevity.

When we look at groups, one of the problems that we can notice is that there are things
that seem to be symmetric, but which don’t work as groups. What that means is that despite the
claim that group theory defines symmetry, that’s not really entirely true. My favorite example of this is the fifteen puzzle.

fifteen.png

The fifteen puzzle is a four-by-four grid filled with 15 tiles, numbered from 1 to 15, and one empty space. You can make a move in the puzzle by sliding a tile adjacent to the empty
space into the empty. In the puzzle, you scramble up the tiles, and then try to move them back so that they’re in numerical order. The puzzle, in its initial configuration, is shown to the right.

If you look at the 15 puzzle in terms of configurations – that is, assignments of the pieces to different positions in the grid – so that each member of the group describes a single tile-move in a configuration, you can see some very clear symmetries. For example, the moves that are possible when the empty is in any corner are equivalent to the moves that are possible when the empty is in any other corner. The possible moves when the space is in any given position are the same except for the labeling of the tiles around them. There’s definitely a kind of symmetry there. There are also loops – sequences of moves which end in exactly the same state as the one in which they began. Those are clearly symmetries.

But it’s not a group. In a group, the group operation most be total – given any pair of values x and y in the group, it must be possible to combine x and y via x+y. But with the 15 puzzle, there moves that can’t be combined with other moves. If x = “move the ‘3’ tile from square 2 to square 6”, and y = “move the ‘7’ tile from square 10 to square 11”, then there’s no meaningful value for “x+y”; the two moves can’t be combined.

Continue reading

Databases are hammers; MapReduce is a screwdriver.

A bunch of people have sent me links to an article about MapReduce. I’ve hesitated to write about it, because the currently hyped MapReduce stuff was developed, and extensively used by Google, my employer. But the article is really annoying, and deserves a response. So I’m going to be absolutely clear. I am not commenting on this in my capacity as a Google employee. (In fact, I’ve never actually used MapReduce at work!) This is strictly on my own time, and it’s purely my own opinion. If it’s the dumbest thing you’ve ever read, that’s my fault, not Google’s. If it’s the most brilliant thing you’ve ever read, that’s my credit, not Google’s. I wasn’t asked to write this by Google, and I didn’t ask their permission, either. This is just me, the annoying geek behind this blog, writing solely
on my own behalf, speaking for no one but me. Got it?

The reason that I’m interested in this is because it’s related to my PhD work. Back in
grad school, what I worked on was applying parallelism to structured data in
non-scientific applications. That’s pretty much what MapReduce does. And the solution
that I proposed was a kind hierarchical scatter/gather operation – which is, very nearly, the
way that MapReduce works. The big difference? MapReduce beats what I did. The guys who designed MapReduce noticed something that I didn’t, and took advantage of it, which made M/R programs a lot cleaner and easier to write. The article that I’m going to discuss criticizes M/R for exactly that key idea.

Continue reading

Before Groups from Categories: a Category Refresher

So far, I’ve spent some time talking about groups and what they mean. I’ve also given a
brief look at the structures that can be built by adding properties and operations to groups –
specifically rings and fields.

Now, I’m going to start over, looking at things using category theory. Today, I’ll start
with a very quick refresher on category theory, and then I’ll give you a category theoretic
presentation of group theory. I did a whole series of articles about category theory right after I moved GM/BM to ScienceBlogs; if you want to read more about category theory than this brief introduction, you can look at the category theory archives.

Like set theory, category theory is another one of those attempts to form a fundamental
abstraction with which you can build essentially any mathematical abstraction. But where sets
treat the idea of grouping things together as the fundamental abstraction, category
theory makes the idea of mappings between things as the fundamental abstraction.

Continue reading

Fields, Characteristics, and Prime Numbers

When we start looking at fields, there are a collection
of properties that are interesting. The simplest one – and
the one which explains the property of the nimbers that
makes them so strange – is called the
characteristic of the field. (In fact, the
characteristic isn’t just defined for fields – it’s defined
for rings as well.)

Given a field F, where 0F is the additive
identity, and 1F is the multiplicative identity,
the characteristic of the field is 0 if and only if no
sequence of adding 1F to itself will ever result
in 0F; otherwise, the characteristic is the
number of 1Fs you need to add together to get
0F.

That sounds confusing – but it really isn’t. It’s just
hard to write in natural language. A couple of examples will
make it clear.

Continue reading

Abstract Real Numbers: Fields

When I learned abstract algebra, we very nearly skipped over rings. Basically, we
spent a ton of time talking about groups; then we talked about rings pretty much as a
stepping stone to fields. Since then, I’ve learned more about rings, in the context of
category theory. I’m going to follow the order in which I learned things, and move on
to fields. From fields, I’ll jump back a bit into some category theory, and look at
the category theoretic views of the structures of abstract algebra.

My reasoning is that I find that you need to acquire some understanding of what
the basic objects and morphisms mean, before the category theoretic view makes any
sense. Once you understand the basic concepts of abstract algebra, category theory
becomes very useful for understanding how things fit together. Many complicated things become clear in terms of category theoretic descriptions and structures – but first, you need to understand what the elements of those structures mean.

Continue reading

The Genius of Donald Knuth: Typesetting with Boxes and Glue

Today is the 70th birthday of Donald Knuth.

If you don’t know who Knuth is, then you’re not a programmer. If you’re a programmer and you don’t know who Knuth is, well… I have no idea what rock you’ve been hiding under, but you should probably be fired.

Knuth is one of the most famous and accomplished people in the computer science community. He’s done all sorts of great research, published a set of definitive textbooks on computer algorithms, and of particular interest to me, implemented a brilliant, hideous, beautiful, godawful piece of software called TeX.

When I went to grad school, instead of being a teaching assistant, I worked for the department as a sysadmin. I ended up spending close to six years doing almost nothing but technical support for TeX, which explains my mixed emotions about it in the description above.

Continue reading