Before the creation of the World Series of Mahjong and during the development of the Zung Jung Mahjong Scoring System, Alan Kwan spent years examining mahjong through the lens of mathematics.
The following collection of essays explores a series of questions about mahjong pattern frequency, rarity, and game balance using elementary combinatorics. Topics include the relative frequency of sequences and triplets, knitted sets, identical and similar sequences, the comparative rarity of famous limit hands, and the relationship between pattern rarity and scoring value.
Although these articles were written independently between 1998 and 2001, together they reveal an important aspect of Kwan’s approach to mahjong design: a belief that scoring systems should be informed not only by tradition, but also by careful mathematical analysis of the game’s underlying structure.
These essays are preserved for historical and educational purposes as part of the documented history of the Zung Jung Mahjong Scoring System and Alan Kwan’s broader body of mahjong scholarship.
Table of Contents
Mah-Jong is a Game of Primarily Sequences
by Alan Kwan
- original author: Alan Kwan
- Mahjong is a Game of Primarily Sequences
- Original spelling/formatting preserved
- Wayback Machine capture link
Every mah-jong player knows that it is, in general, easier to make a sequence than a triplet. A question few have asked is, easier /by how much/? This article on simple Combinatorics attempts to offer some insights on the question. Some background in elementary Combinatorics of the reader is preferred. (Please correct any mathematical errors that may be here.)
One way of looking at the relative ease of making sets is to count how many such sets are contained in the 136-tile (counting only playable tiles) deck. (Note that this works /only/ when comparing sets which consist of the same number of tiles, namely 3 in this case.) This is what will be done in this article.
Let’s begin with sequences. There are 3 suits, and there are 7 possible sequences, from 123 to 789, in each suit. To construct each sequence, you take 1 out of the 4 tiles for each of the 3 numbers. Therefore, there are
s = 3 * 7 * (4^3)
possible 3-tile combinations in the 136-tile deck that are sequences.
Now, let’s look at triplets. There are 34 playable tile types. To make a triplet, you take 3 tiles out of the 4 of a tile type. There are C(4,3) = 4 ways to do the selection. Therefore, there are
t = 34 * 4
possible 3-tile combinations in the 136-tile deck that are triplets.
Dividing s by t, we get
s / t = 9.88…
Which means that there are about 10 times as many sequences as triplets in the deck!
Of course, this figure is only part of the story. The exact mechanisms of play affects how sequences and triplets are formed. Also, there is the important distinction that you can “chow” from only your upper seat, while you can “pong” from anybody.
The reader should be careful not to misinterpret this figure. All it means is that, if you take 3 tiles (or, as a reasonable estimate, a few tiles) randomly from the deck, it is about 10 times more likely that you get a sequence than a triplet. This figure does not represent your chances of /completing/ a set based on partial elements in the hand.
Another item of interest is the last terms in the above formulae for s and t. There are 4^3 = 64 ways to make any specific sequence, but only 4 ways to make any specific triplet, out of the 136-tile deck. The difference is a factor of 16, not (16/6) as someone will think when considering only the effects of “fewer tiles of the type left when getting the second and third tiles of a triplet”. (Again, the reader should be careful not to mis-apply this figure to completing partial sets.)
In conclusion, this is what we can safely and soundly claim: there are about 10 times as many sequences as triplets in the deck. How this is to be interpretated to answer the opening question, however, is left to the readers and players.
Knitted Sets
copyright 18 March 1998 Alan KWAN Shiu Ho
- original author: Alan Kwan
- Knitted Sets
- Original spelling/formatting preserved
- Wayback Machine capture link
In the last article, we compared the number of sequences and triplets in the deck. In this article, we will take a look at a concept popular in some Western versions of mah-jong: “knitted sets”. A knitted set is a ‘sequence’ or a ‘triplet’ that contains, instead of 3 tiles in the same suit, a tile from each of the 3 suits. We exclude Honor tiles for the purpose of this discussion. Again, some background in elementary Combinatorics of the reader is assumed.
There are 7 possible numbers for sequences: from 123 to 789. If we are asking for knitted sequences with a specific suit order, we have (following the calculations in the last article)
7 * (4^3)
of them. Compared with the total number of (regular) sequences in the deck:
s = 3 * 7 * (4^3)
we can see that the former quantity is exactly one-third of the latter.
Now for each number, there are 6 possible suit orders for a knitted sequence. Thus, if we are not specifying a specific suit order, there are a total of
6 * 7 * (4^3)
knitted sequences in the 136-tile deck, or twice as many as regular sequences.
Now let’s look at knitted triplets. There are 9 numbers for knitted triplets. Thus, there are simply
9 * (4^3)
knitted triplets in the deck. That is about 0.43 times the number of regular sequences, or about 4.24 times the number of regular triplets.
Finally, we put together a ball park figure. Adding up the numbers and taking
the ratio, we see that there are
((6 * 7 + 9) * (4^3)) / (s + t) = 2.20…
more than twice as many knitted sets in the deck as regular sets.
The interpretation of the numbers is left to the readers and players.
“Two Identical Sequences” vs. “Two Similar Sequences”
by Alan Kwan 4 March 1999
- original author: Alan Kwan
- Two Identical Sequences vs Two Similar Sequences
- Original spelling/formatting preserved
- Wayback Machine capture link
This article is a re-organization of an idea of mine earlier. It compares the “likelihood” of two New Style Mahjong patterns, “2 Identical Sequences” and “2 Similar Sequences”. I think these ‘scientific’ names are self-explanatory, but anyway here are the examples:
2 Identical Sequences:
C-234 C-234 plus 2 sets and a pair
2 Similar Sequences:
C-234 B-234 plus 2 sets and a pair
The reader is assumed to possess some background in elementary Combinatorics.
The Problem
How do we compare the “likelihood”, or “chances”, of these 2 patterns? Here I’ll illustrate the question with this simplified problem: “If we randomly draw 6 tiles from the 136-tile deck, what is the ratio of the probability of drawing 2 identical sequences to the probability of drawing 2 similar sequences?” This simple and well-defined problem looks like a reasonable approach to the question.
The Errors
Now, I’ll start by refuting several incorrect solutions.
Error #1: The ratio is 1:1, since there are “as many” identical sequences as similar ones. For each number, there are 3 cases for identical (BB, CC, DD) and 3 cases for similar (BC, CD, BD).
Refutation #1: This way of counting neglects the fact that the “cases” are not equiprobable. Every backgammon player (worth his salt) knows that one is twice as likely to get 1-2 (which includes both 1-2 and 2-1) as it is to get 1-1 on 2 dice.
Error #2: The ratio is 1:2, taking the above “backgammon dice” factor into account. That is, for each number, there are 3 cases for identical and 6 cases for similar (BC, BD, CB, CD, DB, DC).
Refutation #2: This solution still misses the problem. The “cases” are not equiprobable.
Error #3: We should not forget that there are 4 of each tile, but to get the second of 2 identical sequences, we can only take from the remaining 3 tiles. Thus there should also be a factor of (4/3)^3. So the ratio is 1:(2*(4/3)^3), or approximately 1:4.74 .
Refutation #3: Still not correct. See the correct solution.
The Correct Solution
Okay, let’s do it the full, correct way. First, we (still) reduce the problem to one number (such as 123) only, since it is obvious that, by symmetry, the probability of 2 identical sequences is 7 times that of 2 identical 123 sequences, and the same for similar sequences. So we can factor out the common factor of 7.
Take one suit, say C. There are 4 C1, C2, and C3 each, and we need to draw 2 of each to get 2 identical C-123 sequences. There are
C(4,2)^3
tile combinations we’re looking at.
Since there are 3 suits, by symmetry, there are
3C(4,2)^3 = 36^3
= 2^3 * 3^4
tile combinations for 2 identical 123 sequences.
Now, for similar sequences. Take 2 suits, say B and C. There are 4 B1, B2, B3, C1, C2, C3 each, and we need to draw 1 of each. There are
C(4,1)^6
= 4^6
tile combinations for 2 similar sequences with B-123 C-123.
Since we’re taking 2 suits out of 3, there is also a factor of C(3,2), which is 3. So there are
3*4^6
= 2^12 * 3
tile combinations for 2 similar 123 sequences.
Now we get the ratio we want:
(2^3 * 3^4) : (2^12 * 3)
= (3^3) : (2^9)
= 27 : 512
which is close to 1:19 !
Also note that the incorrect solution in Error #3 is off by exactly a factor of 4. Error #3 misses the fact that a sequence consists of 3 tiles, so the “backgammon dice” factor should be applied 3 times, not just once. Each factor is a double, and 2 doubles have been missed, so the error is a factor of 4.
Insights
A factor of 19 is generally too large a difference for 2 ‘easily comparable’ low-value patterns to be assigned the same value. We see many cases where a factor of 4 (self-draw) or 10 (/ippatsu/ in Modern Japanese) gets an extra “faan”. In fact, Perlmen & Chan suggests different values for these 2 patterns (pp. 80-81).
Thus, if we see a scoring system where these 2 patterns are assigned the same value (when the rest of the system gives credit for smaller differences), we have good reasons to believe that the designer(s) of the system has based his decision on one of the erroneous solutions above.
“Mixed Terminals 7 Pairs” vs. “13 Orphans”
by Alan Kwan 15 April 1999
- original author: Alan Kwan
- Mixed Terminals 7 Pairs vs 13 Orphans
- Original spelling/formatting preserved
- Wayback Machine capture link
(Note: This discussion pertains to Modern Japanese, though
the results may be applicable to other styles.)
Is “7 Pairs” combined with “Mixed Terminals” (i.e. 7 pairs of terminals and honors) really harder than “13 Orphans”? Let’s use the tool of Combinatorics to try to find some insight.
Since both hands are irregular hands which cannot make use of claimed discards (before going out), a straight comparison of their combinatoric multiplicity is a very good pointer (though not the entire picture).
We’ll count the number of 14-tile combinations taken from the 136-tile deck which form the respective hands. The counting is rather simple, and only basic combinatorics are involved. For the sake of brevity, “terminal” means “terminal or honor” for the remainder of the article.
Let’s start with “13 Orphans”. The hand consists of 1 pair of terminals, and 1 of each of the remaining 12 terminals. Just a standard selection exercise:
C(13,1) * C(4,2) * C(4,1)^12
= 13 * 6 * 4^12
= 1 308 622 848
Now let’s look at “7 Pairs Mixed Terminals”. Simply, 7 pairs of terminals. Another simple exercise:
C(13,7) * C(4,2)^7
= 1716 * 6^7
= 480 370 176
The first quantity is roughly 2.72 times that of the second. This means that we can say that “7 Pairs Mixed Terminals” is somewhat harder than “13 Orphans”.
In practice, the large discrepency between the two pattern values further discourages attempts at “7 Pairs Mixed Terminals”; often one would give up and settle for just “7 Pairs”. Thus we can expect “7 Pairs Mixed Terminals” to be completed a lot less frequently than “13 Orphans” in practice.
“Thirteen Orphans” vs. “Nine Gates of Heaven”
by Alan Kwan 6 September 2000
- original author: Alan Kwan
- Thirteen Orphans vs Nine Gates of Heaven
- Original spelling/formatting preserved
- Wayback Machine capture link
Introduction
Does “Thirteen Orphans” deserve to be crowned “the king of mahjong hands”? Is it really the most difficult mahjong hand? This article tries to use elementary combinatorics to compare Thirteen Orphans (Thirteen Terminals) against Nine Gates of Heaven (Sacred Lamp of Nine Lotus, Nine Connected Pieces), the mahjong hand which some hold to be the most “perfect”. The reader is assumed to possess some background in elementary combinatorics.
Here, we use the original, Chinese Classical definition for Nine Gates, which requires that the hand is actually calling for 9 tiles before it goes out. (The looser Modern Japanese definition allows any hand which includes the specified shape, even if one of the tiles in the shape is picked up as the hand goes out.) Because this hand is defined on the 13-tile calling hand instead of the 14-tile winning hand, in order to keep the calculations simple, we will be comparing the 13-tile calling hand of Thirteen Terminals with this calling hand. We’ll leave the interpretation of the result to the reader, who should take into account the fact that these two calling hands have different chances of going out.
Calculations
We do the same thing we’ve been doing before: we simplify the problem by comparing the number of 13-tile hands in the 136-tile set which are calling hands of each pattern in question. (What I call ‘finding the “combinatorial ratio”‘.)
How many 13-tile hands are calling hands of Thirteen Orphans? There are two types of such hands: the 13-way call hand with 13 different terminals, and the 1-way call hand with 1 pair and 11 different ones. There are
C(4,1)^13
= 4^13
hands of the former, and
C(13;11,1) * C(4,1)^11 * C(4,2)
= 4^11 * 936
hands of the latter.
Adding these together, there are
4^13 + 4^11 * 936
= 4^11 * (16 + 936)
= 4^11 * 952
13-tiles hand in the 136-tile set which are calling hands of Thirteen Orphans.
Now, how many hands are calling hands of Nine Gates? There are three suits, and the hand must be of the shape 1112345678999. There are a total of
3 * C(4,3)^2 * C(4,1)^7
= 3 * 4^9
such hands in the set.
Taking ratios,
4^11 * 952 : 3 * 4^9
= 16 * 952 : 3
= 5077.33… : 1
or roughly 5000 to 1 ! Nine Gates calling hands are 5000 times as ‘rare’ as Thirteen Orphans calling hands in the 136-tile set!
Interpretation & Conclusion
We should not forget that the Nine Gates calling hand is probably much easier to go out. It’s calling for 23 tiles out of the remaining 123, while the vast majority of the Thirteen Orphans calling hands are calling for only 4 tiles. But even if we are generous and take it to be a 1:6 ratio, this is clearly overwhelmed by the 5000 to 1 combinatorial ratio between the 13-tile calling hands.
Note that the Combinatoric ratio does not translate to a ratio of the practical frequency of the hands. Because of the draw-and-discard play mechanism, Thirteen Orphan calling hands occur perhaps only tens or hundreds of times as often as Nine Gates calling hands. But in any case, we can safely conclude that Nine Gates is a lot rarer and harder than Thirteen Orphans.
In practice, if one is dealt a hand with many different terminals, one often doesn’t have much choice other than attempting Thirteen Orphans. But if one is dealt a good Pure One-Suit hand, one would often prefer to go out with Pure One-Suit instead of risking it to go for Nine Gates. For this reason, we can expect an even lower frequency for the completion of Nine Gates in practice.
Before we close the discussion, let’s consider the looser, Modern Japanese definition of Nine Gates. I’m omitting the calculations here: that pattern (the 14-tile completed hand) has a ‘combinatorial ratio’ to Thirteen Orphans of roughly 1 to 151. Even the looser Modern Japanese definition of Nine Gates is a lot harder than Thirteen Orphans.
“Three Similar Triplets” vs. “Mixed One-Suit” (All Triplets)
by Alan Kwan 27 April 2001
- original author: Alan Kwan
- Three Similar Triplets vs Mixed One-Suit
- Original spelling/formatting preserved
- Wayback Machine capture link
Introduction
In Modern Japanese, “Three Similar Triplets” is usually awarded two faan, while “Mixed One-Suit” is awarded three faan if the hand is concealed, or two faan if the hand is exposed. In practice, the frequency of occurence of Three Similar Triplets is very low, without a doubt much lower than that of Mixed One-Suit
(and probably even lower than Pure One-Suit). One might suspect that the value of the pattern is too low, that its faan value ‘should’ be raised.
The most common defense against the above accusation is that, since Three Similar Triplets contains three triplets, the hand is “often” an “All Triplets” hand, so the real value of the pattern, namely “Three Similar Triplets + All Triplets”, is “often” four faan.
Does this make sense? Is four faan really a fair value for “Three Similar Triplets + All Triplets”? Let’s verify this by comparing the combination pattern with a similar (and thus easily comparable) one: “Mixed One-Suit + All Triplets”.
Calculations
Since both patterns are All Triplets hands, it is relatively easy to find their ‘combinatorial ratio’, by counting the number of possible combinations of triplets and pair in each pattern.
Three Similar Triples is easy. There are only 9 choices (9 numbers) for the three similar triplets. The remaining triplet and the pair can be anything. Thus there are:
9 * 31 * 30 = 8370
possible combinations of triplets and pair in Three Similar Triplets + All Triplets hands.
Now let’s look at Mixed One-Suit. Once we pick a suit, the triplets and pair can be taken from any of the 16 possible tiles. Hence there are:
C(16;4,1) = 21840
possible combinations of triplets and pair in Mixed One-Suit
- All Triplets hands in a given suit. Since there are three suits, the total possible combinations should be roughly three times that number. There are two complications here. One is that we’re counting a few of these hands three times this way: the All Honors hands. The other is that a small minority of these hands are Pure One-Suit hands, which score more than Mixed One-Suit. We can ignore the second issue (as well as the issue that All Honors, too, scores much more than Mixed One-Suit) in
our discussion, since doing so could only be unfavorable to the accusation (that the value of Three Similar Triplets is too low).
There are C(7;4,1) = 105 combinations for All Honors hands. If we’re counting them three times, subtracting twice the count would fix the issue. Thus there are:
21840 * 3 – 105 * 2 = 65310
possible combinations of triplets and pair in Mixed One-Suit
- All Triplets hand, in the three suits.
Taking ratios,
65310 : 8370
= 7.80… : 1
So Mixed One-Suit + All Triplets hands are 7.8 times as numerous as Three Similar Triplets + All Triplets hands. But while the latter is worth only 4 faan, the former is worth 4 or more faan.
We must not forget that unlike Three Similar Triplets, Mixed One-Suit hands do not necessarily contain at least three triplets; there are a lot of Mixed One-Suit hands which are not All Triplet hands, too. Let’s think about it: Three Similar Triplets is 7.8 times as rare as Mixed One-Suit among All Triplet hands, and a lot rarer than Mixed One-Suit among non All Triplet hands. Yet the value of the former is not any higher than the value of the latter, in both cases.
Conclusion and Thoughts
Obviously, the faan value of Three Similar Triplets is too low. The accusation is valid, after all.
As we have seen, the defense against the accusation isn’t really justifiable; it primarily stems from blind faith, in that the Modern Japanese system, as is, is “ideally and perfectly balanced”, which it definitely is not.
It is trivial to see that Three Similar Triplets has a combinatorial ratio to Big Three Dragons of 9 to 1. Since the latter is a limit pattern (albeit reportedly the “easiest” one), it’s not hard at all to suspect that the former should be worth more than 2 faan. Historically, the value of Three Similar Triplets has remained low in Japanese mahjong, probably because the pattern is so rare that it got ‘forgotten’ when pattern values were updated. Nowadays, Japanese mahjong players say /sanshoku/ (“three suits”) as the abbreviation for “Three Similar Sequences”. Won’t this be a confusing practice, when there are in fact two /sanshoku/ patterns in the system? The practice has got used and accepted because “Three Similar Triplets” is of hardly any significance within the play strategy concepts of Modern Japanese, because of its rarity coupled with its low
value; when someone mentions /sanshoku/, one won’t think about “Three Similar Triplets” because one hardly ever thinks about that pattern.
Leave a Reply