Tuesday, April 17, 2012

Sexegenary Cycles - Exploring Chinese Culture with Modulus Proofs

Today in my Chinese Literature class we started reading 运命 (transliteration: yun4ming4, translation: fate) by Lu Xun. In it, he talks about the poor fate of Japanese women born in the "丙午" (bing3wu3) year - the 43rd year of Eastern Asia's Sexegenary (60 year) Cycle. Apparently they curse their husbands, so people don't want to marry them.

Our professor talked briefly about this cycle. In China, in addition to the base 10 numerals, there are two other systems of ordinals: the 10 heavenly stems {甲乙丙丁戊己庚辛壬癸} and the 12 earthly stems {子丑寅卯辰巳午未申酉戌亥}. Each year in the cycle corresponds to a certain combination of those two stems - for example, the first year is 甲子 (1-1), and the second is 乙丑(2-2). The final year in the system is 癸亥(10-12).

This means of combination leads to 60 total combinations. Before I understood the system, I didn't see why it wasn't 120 combinations - after all, aren't there 10 of the heavenly stems and 12 of the earthly ones? 120 would be right if the years went: 甲子(1-1),甲丑(1-2),甲寅(1-3) etc. because that would indeed exhaustively go through the combinations of stems.

But that's not how it progresses: apparently half of the potential combinations don't show up. Why is this? And if we were to change the number of stems in either set, how would that effect the number of years in the cycle?

In my head in class, I played with some other examples to work out the following pattern: multiply the size of each set, and divide the result by the greatest common multiple between those sizes:

|heavenly| * |earthly| = 10 * 12 = 120
GCM(10, 12) = 2
|heavenly| * |earthly| / GCM(|heavenly|, |earthly|) = 120 / 2 = 60.

A more succinct way of explaining it would be to say that the length of the cycle is the least common multiple of the sizes of the two sets (which I worked out on the way back home).

Now let's prove it!

We clearly have some cycles going on here. We'll drop the Chinese characters because ugh, and instead replace them with English letters. The heavenly stems will thus be {A, B, C, D, E, F, G, H, I, J} and the earthly stems will be {a, b, c, d, e, f, g, h, i, j, k, l}. And integers will be proper, sensible names for the year. So the calendar looks like:

0: (A,a)
1: (B, b)
2: (C, c)
9: (J, j)
10: (A, k)
11: (B, l)
12: (C, a)
42: (C, g) (poor bingwu ladies!)
57: (H, j)
58: (I, k)
59: (J, l)
60: (A, a)

I start from 0 because I'm a meanie poo-poo face computer scientist. And because it will help out the math a bit.

The sets of stems are both "circular" sets - they loop around when we're done. In a sense, they're like clocks. The heavenly stem clock has ten hours on it, and the earthly stem one has twelve hours. If we start them both at zero hour (i.e. 10 o'clock and 12 o'clock) at the same time, how long will it be until they both reach zero hour again?

In mathy terms: given least residue system S modulo n and least residue system S' n' respectively, what is k such that k > 0 and (k ≡ 0) mod n and (k ≡ 0) mod n'?

Ew! Gross maths!

Let's break it down a bit. Why "k > 0"? Well, that's saying "how long will it be until they both reach zero hour again". We don't want to count the first time, that would say it's a 0-year cycle!

What does "(k ≡ 0) mod n" mean? In something resembling English: "k is congruent to 0 modulo n". Closer to English: "k is a number that, when you divide it by n, has a remainder of 0". Or put super simply "n divides k evenly".

So we're looking for the first number k bigger than 0 where n divides k evenly and n' divides k evenly. With our example, n is the size of the heavenly stem set, 10, and n' is the size of the earthly stem set, 12.

What are some numbers that 10 divides evenly? 10, 20, 30, 40, 50, 60, 70, 80 etc. "Multiples of 10". And the multiples of 12 are 12, 24, 36, 48, 60, 72... wait a minute, we saw 60 in both lists! So that's when they'll both strike "a" at the same time - at hour 60.

What's special about 60, relative to 10 and 12? It's their lowest common multiple - the first number such that it is a multiple of 10 and a multiple of 12. Suddenly it makes sense! But how do we calculate that number, given an arbitrary n and n'? After all, with big n and n', that could involve trying to find a match in a very long list indeed...

Well, fortunately for math, it's easy to find it (ish). Find the greatest common divisor (which is sorta kinda easy-ish, but I don't want to get into it), and divide the product of the numbers by the GCD. So, exactly the thing I came up with in class.

Alright, I can tell I'm starting to lose articulation. Still, to those who are vaguely interested, does this explanation make it clear why there aren't 120 years in the Sexegenary Cycle?

Ben Finkel

No comments: