Friday, January 13, 2012

About the Mayan Calendar Part 3: Modular Arithmetic and the the Tzolk'in


[I meant to get to the Haab' and the Calendar Round this post, but I ran out of time.]

I should have introduced this last post since that was about concepts rather than actual calendars, but I was tired and for some reason it didn't occur to me that this would be a good thing to introduce. So here's the last thing before we get to the actual calendars: Modular arithmetic.

Modular arithmetic is something you're already familiar with. It's just very basic math on cycles. Hours exist in cycles (be they 12 or 24) so whenever you do math with them you're doing modular arithmetic. Weeks are seven day cycles so if you've ever had to figure out, say, what day of the week ten days from now is then you've done modular arithmetic.

The way it works is pretty simple, doing math on a cycle of a given length, say, “N,” is called doing math “modulo N” which is written “(mod N)” for equations. In math modulo N there are only N numbers, and the way that works is that every number that has the same remainder when divided by N is considered the same number*.

So, for example, the hours in 12 hour time work as modulo 12. We could call the hour before 1, “Zero,” (and in 24 hour time we do just that) but calling it 12 instead of 0 makes no difference in 12 hour time because 0 = 12 (mod 12). It's easy enough to see this because 12 goes into 0 zero times with a remainder of 0, and 12 goes into 12 one time with a remainder of 0. Same remainder when divided by 12 means that they're the same number modulo 12. If you wanted to know what is three hours after Ten, 3+10 = 13, and 13 = 1 (mod 12).

Addition, subtraction, and multiplication all act exactly how you'd expect in modular arithmetic.

Ok, now that we've done that, onto the calendars.

The Tzolk'in is the kind of calendar I was thinking about when I decided to make a post about the Mayan Calendar. It is made by having two smaller cycles run at the same time.

There is a series of 13 days which are simply numbered one to thirteen. There is a series of 20 days that have names. (Imix', Ik', Ak'b'al, K'an, Chikchan, Kimi, Manik', Lamat, Muluk, Ok, Chuwen, Eb', B'en, Ix, Men, K'ib', Kab'an, Etz'nab', Kawak, Ajaw) I'm just going to call them 1 to 20.

A day is written “Number Name”, so 1 Imix or 12 Kawak, I'll be writing those as 01;01 and 12;19 respectively. (Semicolon because a dash looked too much like subtraction and a colon looked too much like time of day.  Using a space to separate them doesn't feel right.)

13 and 20 are relatively prime so they combine to make a 260 day calendar. It's immediately obvious that 260 isn't even close to the number of the days in the solar year. Some speculate that it might have to do with the length of a human pregnancy, or the planet Venus, or a certain season, or it might just be that they liked 13 and 20. It's possible that none of these things are correct. It is also possible that all of them are. (If you were deciding on a new calendar, would you rather have one that had one thing going for it, or twenty seven?) I don't know enough about the Maya, or the other Mesoamerican cultures that used similar calendars, to meaningfully speculate. So, back to the math.

(For the record, I'll be calling the 20 day cycle a month.)

20 is 7 mod 13, so the 20th day of the calendar would be 07;20. The 21st would be 08;01, if you were wondering what the first day of the second month would be.

I've mentioned before that it is completely reasonable to add and subtract dates. If you want to know what the 15th day of the calendar is you can simply add the 5th day to the 10th day, for example. It is worth noting that some dates are easier to add than others.

If you wanted to know what was one month from a given day you could add 07;20 to it. Now that 20 might as well be a zero because the second number operates in mod 20. So that's a nice thing to add since you only have to add one number instead of two. Take a date, add seven to the first number, and you get something that's one month later. That's handy, but not nearly as handy as noticing what happens when you add two months.

7+7 = 14 = 1 (mod 13) Which means that to find out what's two months from a given date you can just add one to the first number, to find out what's two months before a given date, just subtract one.

That makes it much easier to figure out how far into the calendar a date is than I imagined. You just take a date, say 08;03, and do the following:

The second number, 3, is how many days into the month the day is. Now that we know that, we want to know how many months into the year we are, so we subtract three days. That puts us at 05;20, but since we'll be dealing with whole months now we don't care about the month number anymore, we just care about the five.

Every two months changes that number by one, so that five represents ten months.

That means that we're ten months and three days into the year, or 203 days into the year.

It is important to remember that if you do it exactly like that sometimes you'll get a number larger than 13 for the number of months. That happens when the you start with is larger than seven, which happens on odd numbered months. If you just subtract 13 from the number of months you do get, everything will work out fine.

To find out how far apart two days are, you subtract the first one from the second, and then do the above to the result. Originally I picked two dates and did needlessly complex math. Those dates, chosen with my closest approximation of randomness** were 05;18 and12;06. I was wondering far after 05;18 12;06 is.  I put myself through way more trouble than I should have to figure out because I had yet to realize the above.

12;06 - 05;18 = 07;08         (because 6 - 18 = -12 = 8 (mod 20))

So now we just do the same stuff as above.
7 – 8 = -1 = 12 (mod 13)

12*2= 24.  24-13 = 11.

12;06 is 11 months and 8 days (228 days total) after 05;18.

That's not nearly as daunting and scary as I expected it to be. If I wanted to figure out how far apart two days are in our calendar I'd probably have to resort to the “Thirty days has September” rhyme. (And that wouldn't work because I've forgotten it.)  But I think most people other than me actually know how many days are in each of the months.

Even though it isn't as hard as I expected, it's nice to be able to look at something and immediately know that it's (approximately) X months away the way we do when see, say, that a date is in August. Also it's nice to have a calendar where the year approximates a solar year. I have no idea if either of these things is the reason that the Maya had a calendar that did just that, but the Maya had a calendar that did just that.

I've run out of day, so next time the Haab' and the Calendar Round.

-

* It is actually a little more complicated than that. They aren't considered equal they're considered congruent, and technically I shouldn't be using an equal sign but instead a similar sign with three bars instead of two. For our purposes it is sufficient to say that 12 = 0 (mod 12).  Certainly if you think of them as the hours on a clock face the 0th hour is the 12th our and the 13th is the 1st.


** I'm sure that there are random number generators just a google away, but I have yet to do that googling and thus I just punch keys and pretend the result is truly random.  Part of the reason I can do this is that I'm almost never in a situation where I would actually need a random number.  Certainly if I'd specifically selected the numbers in this post it wouldn't have changed much.

-

1 comment:

  1. I tend to use actual dice, but I'm a role-player so I have dice with numbers of sides other than six.

    The way I remember the numbers of days in months is to use knuckles. Start on the index finger, then count from there: January (peak), February (trough), March (middle finger peak), until you get to July (little finger/pinkie peak). Then August is the same one again, and you go back - September trough, October peak, and so on. That tells you whether each month is long or short, and then all you have to remember that February is special.

    ReplyDelete