# Wherein CLP “improves” Chinese New Year

But, now that I know those facts, I know that the Chinese year starting in 2027 CE will be the year of the goat, the next one will be the year of the monkey, and the one after that will be the year of the rooster. That’s because this calendar works on a 12-year cycle, rotating through a fixed list of animals. (There’s more to it than that, but that’s what I’m going to think about). It goes as follows:

 蛇 snake 牛 ox 馬 horse 兔 rabbit 龍 dragon 狗 dog 豬 pig 鼠 rat 羊 goat 虎 tiger 雞 rooster 猴 monkey

Now that I’ve looked up all twelve animals,I know that the rabbit comes four years before the goat, and I can work out that I went to Singapore in 1999, because I know I went more than five but less than 20 years ago and I can remember seeing a frankly unwise number of rabbits encaged underneath a massive rabbit statue.

So, it’s a pretty good calendar: time is divided up into periods of 12 years, and you can fairly easily work out when something happened in your lifetime because it’s very easy to estimate how many multiples of 12 years ago it happened, and by remembering where in the cycle you were.

But what if we made it more complicated?

At this point, if the Chinese zodiac is significant to you, I’ll have to ask you to set that aside for a moment because I’m going to mess about with it, for maths reasons.

My first thought was that I’d need a de Bruijn sequence. Given an alphabet of $k$ symbols, a de Bruijn sequence is a cyclical sequence of those symbols containing every possible subsequence of length $n$. I’ve got $k = 12$ zodiac signs, and I’d like to see every sequence of $n=2$ symbols. Job done, right?

Well, I don’t want to see the same symbol twice in a row. As much as I love 猴 (monkey), I reckon it’d start to drag after a while. Since we’re looking at subsequences of length 2, if you’ve got a de Bruijn sequence, you can just remove repeated digits and get what we’re looking for.

That’s one way of doing it. What I actually did was to not realise that fact, and go about working out my own algorithm. It goes as follows:

• Start by writing out each cyclic permutation of the numbers $1$ to $n$ in a grid.
• Begin by writing the number $1$, then repeat:
• In the row corresponding to the last number you wrote down, write down the first number which hasn’t been crossed out, and then cross it out.
• The last number you write down will be a $1$, starting the cycle again.

For 5 symbols, that process looks like this:

This works for any number of symbols(citation needed), and you can construct a de Bruijn sequence from it by just doubling up the first occurrence of each symbol.

A nice thing about the grid presentation is that you can easily see that the sequence on $n$ symbols has length $n (n-1)$.

So I’m ready to put together my new calendar, upending centuries of careful observance for the sake of a mathematical whimsy. Here’s Python code which produces the sequence of years:

def cycle(seq):
n = len(seq)
nexts = {seq[i]: [seq[(i+j)%n] for j in range(1,n)] for i in range(n)}
last = seq[0]
while len(nexts[last]):
yield last
last = nexts[last].pop(0)
sequence = list(cycle(['鼠','牛','虎','兔','龍','蛇','馬','羊','猴','雞','狗','豬']))
print(' '.join(sequence))

And that produces

This cycle has a period of $12 \times 11 = 132$ years – barring advances in medical science, nobody would see the whole thing. And could you work out when something happened just by knowing which sign was associated with the year and roughly how long ago it happened? No! I’ve ruined the best thing about the Chinese calendar.

In conclusion, if my new calendar were to be adopted, there’d be a lot more headaches, and pretty much no benefits.

• #### Christian Lawson-Perfect

Mathematician, koala fan, Aperiodical editor. Usually found paddling in the North Sea, or fiddling with computers.

### 2 Responses to “Wherein CLP “improves” Chinese New Year”

1. schmy

While I wholeheartedly support implementing this, I just want to clarify if there is something awry the formatting of zodiac sign list.
You describe that “[…] 2027 CE will be the year of the goat, the next one will be the year of the monkey, and the one after that will be the year of the rooster”, but then your list states goat, tiger, rooster, monkey. Also, the cycle doesn’t “start” with snake, unless you’re using a zodiac from … a different China, perhaps?
Maybe I will just assume that you have inserted a puzzle that is too clever for me.