Tonalpohualli calculations

137 Views Asked by At

I was doing some math on the Tonalpohualli, the mexica ritual calendar. This calendar has 260 days divided in 13-days periods associated with 20 distinct symbols. Every 13-days period is called a trecena. The days in the calendar are marked as follows:

1 - Crocodile
2 - Wind
3 - House
...
11 - Monkey
12 - Grass
13 - Reed (We start a new trecena but continue with the rest of the 20 symbols)
1 - Jaguar
2 - Eagle
3 - Vulture
...
6 - Rain
7 - Flower (Now that we've run through the 20 symbols we start with crocodile again)
8 - Crocodile
9 - Wind
10 - House (We then run through the whole remaining days until we've completed 260 days)
...
12 - Rain
13 - Flower (This day is the 260th)

Due to the nature of 13 as a prime number, this cycle is repeated after 260 days (since $13 * 20 = 260$). The first day is, as we've seen, the 1-Crocodile and is written as $(1, 1)$; the 14th day is 1-Jaguar and is written as $(1 - 14)$ and for a last example the 21st day is 8-Crocodile and is written as $(8 - 1)$.

The general notation I will use here is $(N, S)$, standing for Number and Symbol. The 260th day is 13-xochitl (thirteen, flower) or $(13, 20)$. So, if I want to know which symbol and number will represent a day from 1 to 260 I do the following (in the example I will use $x=47$ as the day):

$N = x-13c$, where x is the day number we chose and c is the quotient of dividing $x/13$

$N = 47-13c$, where c is the quotient of dividing $47/13$, in this case 3

$$N = 47-13(3) = 8$$ (The number associated with the 47th day is 8)

And

$S = x-20q$, where x is the day number and q is the quotient of dividing $x/20$

$S = 47-20q$, where q is the quotient of $47/20$, in this case 2

$$S = 47-20(2) = 7$$ (The symbol associated with the 47th is the seventh one, the Deer or Mazatl)

Therefore, the 47th day is expressed in the Tonalpohualli as $(8, 7)$ or 8 - Deer.

My question is, if I am provided with the $(8, 7)$ pair, is it possible to recover back the original number I started with (in this case 47) by using some kind of inverse in the algorithms? For example, is it possible to determine which day number from 1 to 260 produces the $(3, 12)$ pair? Please refer to the image I've linked in the comments, I will clarify any doubt you have.

1

There are 1 best solutions below

14
On BEST ANSWER

In the image what we have is $(1,1)(2,2), (3,3).....(13,13),(14,1)....(19,12)(20,13)$.

Are you familiar with modulo notation?

You didn't describe the image well.

If $x = (N,S)$ then $x + 1 = (N+1, S+1)$ ...unless $N+1 =21$ in which case it bounces back to $1$ or if $S+1 =14$ in which case it bounces back to $1$>

This "circlular" arithmetic is called "modular arithetic" and it uses the following concept/notation:

$a \equiv b \mod n$ if $a\div n$ and $b\div n$ have the same remainder...

or in other words if $a = b + kn$ for some integer (maybe negative) $k$.....

or in other word if $a-b$ is divisible by $n$ ....

or in other words $a$ and $b$ both circle back to to the same number.

So::

If $x$ is the $x$th day of the year then $x = (N,S)$ and $N \equiv x \mod 20$ and $1 \le N \le 20$ and $S\equiv x \mod 13$ and $1 \le S \le 20$.

And that is your algorithm.

There is a theorem, called the Chinese remainder Theorem, that says:

If $\gcd(n,m) =1$ ($n$ and $m$ have no prime factors in common) then

$x \equiv a \mod n$

and $x \equiv b\mod m$. Then $x \equiv c \mod n*m$ will have one unique solution where $1 \le c \le n*m$.

You can solve it by noting that $x = a + kn = b+jm$ will have a single answer between $1$ and $n*m$.

And so for day $x$ you will have $(N,S)$ where $N \equiv x \mod 20$ and $S\equiv x \mod 13$.

So the answer to $x = (N,S)$ will be $x = N\mod 20$ and $x =S\mod 20$ is the Chinese remainder theorem.

Ex.

$(N=7, S=8)\implies x \equiv 7 \mod 20 \implies x = 7 + 20n$

And $x \equiv 8 \mod 13 \implies x = 8 + 13s$.

So $7 + 20n = 8 + 13s$ so $1 = 20n - 13s$.

$20*2 =40$ and $3*19 = 39$ and so $1 = 20(2) - 13(3)$

So $n =2; s=3$ so $x = 7+ 2*20 = 8 + 3*13 = 47$.