Made hands are very rare in mahjong. Is there a table that lists the possibilities of starting with a complete hand?
I wrote a program to simulate mahjong hand dealings.
It's not verified yet, but so far, the ratio appears to be around 1 in 100,000 games. (The output was the chance that the case happened to at least 1 out of 4 players)
I had the fixed program run for a bit (1.7 billion draws):
3004 mahjong in 1057000000 random draws: 0.00028%, 1 in 351864 4392 mahjong in 1526000000 random draws: 0.00029%, 1 in 347449 4930 mahjong in 1695000000 random draws: 0.00029%, 1 in 343813
At this point, the state space of the random number generator is likely rather close to exhausted, so further research requires a different implementation (this is easy, I just did not bother yet).
If the math of @Jan is correct, it would be pretty easy to replace the RNG with a permutator and just perform a whole-space search to calculate a precise result. The above program calculates around 2m hands per second on my box, so it would take 40-ish hours.
Update: I implemented a proper RNG, optimized the program slightly and let it search through 25 billion random draws:
737s: 15433 mahjong in 5000m random draws: 0.00031 %, 1 in 323981. 6.78m checks/s 1557s: 31080 mahjong in 10140m random draws: 0.00031 %, 1 in 326254. 6.51m checks/s 2281s: 46008 mahjong in 15000m random draws: 0.0003067%, 1 in 326030. 6.58m checks/s 3116s: 60971 mahjong in 20000m random draws: 0.0003049%, 1 in 328024. 6.42m checks/s 4020s: 75921 mahjong in 25000m random draws: 0.0003037%, 1 in 329289. 6.22m checks/s
The last line is the current state (previous lines for picturing variance).
Not sure I know what a 'made hand' is. Are you asking what are the odds of being dealt the Nine Gates? If yes, the odds are about 5000:1 in a 136 tile set. This page has a combinatorial treatment of the 13 orphans vs the Nine Gates.
I wrote a program that draws a random 14-tile set from a reservoir of all possibles tiles (expect flowers and seasons, sorry):
then the program checks if the hand is a mahjong. So far here are my results:
This means that for 71 millions random hands, I got 151 mahjong hands. We can say it has converged (almost).
Conclusion: You will get a "tinwu", "tenhou", "heavenly hand" aka a wining hand by chance, once every ~471 000 draws, on average.
Here are example of drawn mahjong hands: r: dots d: dragons (b: white, v: green, r: red) v: winds b: bamboos c: characters
hand number 433035 mahjong! ['b1', 'b1', 'b3', 'b4', 'b5', 'c6', 'c7', 'c8', 'r5', 'r5', 'r5', 'r7', 'r8', 'r9']
hand number 443206 mahjong! ['b1', 'b2', 'b3', 'c3', 'c4', 'c5', 'r2', 'r3', 'r4', 'r6', 'r7', 'r8', 'v4', 'v4']
hand number 833989 mahjong! ['b2', 'b2', 'b6', 'b7', 'b8', 'r1', 'r2', 'r3', 'r4', 'r5', 'r6', 'r7', 'r8', 'r9']
hand number 2194755 mahjong! ['b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'c6', 'c7', 'c8', 'r1', 'r1', 'r7', 'r8', 'r9']
hand number 2338547 mahjong! ['b6', 'b7', 'b8', 'c7', 'c8', 'c9', 'dr', 'dr', 'r1', 'r2', 'r3', 'r6', 'r7', 'r8']
hand number 3803349 mahjong! ['b2', 'b3', 'b4', 'b9', 'b9', 'c6', 'c7', 'c8', 'r3', 'r4', 'r5', 'r8', 'r8', 'r8']
EDIT: My simulation continues to converge. I have now drawn 2186 mahjong hands from 966 millions random draws. I did fit a distribution on my dataset. I got an exponential distribution of parameter mu= 442501 +/- 9466.47 (that a 2% error) According to wikipedia, the exponential distribution is the probability distribution of the time between events in a Poisson point process, i.e., a process in which events occur continuously and independently at a constant average rate. This is coherent I think, at least qualitatively. It could be awesome if someone could deduce this theoretically (that's too difficult for me). Then we could write a paper!
Note: I am basing this answer on Japanese Mahjong rules; Chinese rules will probably lead to a different outcome.
Tenhou, Chihou or Renhou hands must be valid hands, i.e. they must satisfy the requirement of having four groups of three and one pair; except for Chiitoi (seven pairs) and Kokushi Musou (13 orphans) which we must treat separately.
The four groups of three can technically be kan, pon or chi. For a kan-containing hand to qualify, this would imply Rinshan Kaihou which complicates the picture a little. However, combinatorically it does not matter whether we draw the winning tile first and the kan-completing tile second or vice-versa (there is no confounding discard) so even if Saki is playing the outcome should be the same and the discussion can be limited to pons instead of including kans.
This leads us to the following cases:
Kokushi Musou: there are 13 possible hands
Chiitoi: the pairs can be taken from 1–9 in three colours, four winds and three dragons (34 tile faces). As most rules specify that no pair can be repeated, this gives us 34C7 = 5,379,616 possibilities
Four chi: there are 21 possible starting tiles for the chis (1 through 7).
- If each starts on a different tile that gives 21C4 = 5985 possibilities.
- If two chi are identical (Iipeikou), that gives us an additional 21C3 × 3 = 3990 possibilities. It is not possible to have exactly three chi identical as that would be a three pon + chi hand. Further, it is not possible to have all four identical as that would be a special case of a three pon + chi hand.
- However, there are an additional 21C2 = 210 hands of Ryanpeikou (two pairs of identical chis that are distinct from each other).
- The final pair makes it slightly more complicated. Naively, one might assume that there are 34 possible pairs but the real number may be smaller for a given hand due to chi using three or four of a number tile.
- If all chis start on different tiles: a given number 4 through 6 will be the only one used three times in exactly 16 hands; 3 and 7 add another 17 hands each for a total of 82 per suit. In addition, there are 6 hands per suit in which two consecutive numbers are used three times (e.g. 1-2-2-3-3-3-4-4-4-5-5-6 composed of the chi 1-2-3, 2-3-4, 3-4-5, 4-5-6)
- If the hand has Iipeikou, each number 3 through 7 will be unavailable in exactly 10 × 16 = 160 hands per suit. Two consecutive numbers are unavailable for pairs in 76 (2/3 and 7/8), 72 (3/4 and 6/7) and 68 (4/5 and 5/6) hands per suit or 216 overall. There are 3 possible combinations per suit which render two non-consecutive numbers unavailable (e.g. 1-2-3-3-3-4-4-5-5-5-6-7), meaning there are 219 hands per suit with two pairs unavailable. Finally, three consecutive numbers can be unavailable; for 3/4/5 through 5/6/7, three hands each, for 2/3/4 and 6/7/8 two hands each.
- If the hand has Ryanpeikou, each number 3 through 7 is not available for pairing in exactly 1 hand per suit and two consecutive numbers beginning on 2 through 7 are not available in exactly 1 hand per suit.
- (It is not possible to remove the 1’s or 9’s from the list of possible pairs using only chis)
- therefore, including the pair there are:
3 × 6 × 32 + 3 × 5 × 33 + (210 – 3 × 6 – 3 × 5) × 34 = 7089 Ryanpeikou hands
3 × 13 × 31 + 3 × 219 × 32 + 3 × 160 × 33 + (3990 – 3 × 13 – 3 × 219 – 3 × 160) × 34 = 133,749 Iipeikou hands 3 × 6 × 32 + 3 × 82 × 33 + (5985 – 3 × 6 – 3 × 82) × 34 = 203,208 hand that have neither
7089 + 133,749 + 203,208 = 344,046 all-chi hands.
One pon: again, assuming three different starting numbers there are 21C3 or 1330 ways to choose the chis plus an additional 21 × 20 = 420 Iipeikou options.
With Iipeikou, the numbers 3 through 7 can be unavailable for pairing in two cases per suit. Two consecutive numbers from 2/3 to 7/8 are also unavailable in two cases per suit. As only the choice of Iipeikou matters for which tiles can be pon, there are 3 × 10 × 31 = 930 hands where one can choose from 32 possible pairs and 3 × 12 × 31 = 1116 hands where one can choose from 31 possible pairs.
Without Iipeikou, the only way to make a digit unpairable is for the three chis to start on three consecutive digits; this gives 5 options per suit and leaves 31 choices for the pons.
The more difficult case is when the pons are restricted but not the pair.
- If one wishes to remove exactly one possible pon, this restricts the possible placement of the third chi:
When removing 5, the third chi must have a different suit (14 options)
When removing 4 or 6, the third chi can be one of the same suit or a different suit (15 options)
When removing 3 or 5, there are two possibilities within that suit for the third chi (16 options)
Overall 76 options
- If one wishes to remove two consecutive pons, the following restrictions are in place:
When removing 4/5 or 5/6, one option remains in that suit for the third chi (15 possibilities)
When removing 3/4 or 6/7, two remain within that suit (16 overall)
When removing 1/2 or 7/8, three remain (17 overall)
Overall 96 options
- Two non-consecutive pons can be removed; there are three options to do this per suit and it requires all three chis
- There are eight options per suit to remove three consecutive numbers from being ponable and this uses all three chis; e.g. 1-2-2-3-3-4-4-5-6 (individual chis: 1-2-3, 2-3-4, 4-5-6).
- If one wishes to remove exactly one possible pon, this restricts the possible placement of the third chi:
Therefore, there are:
930 × 32 + 1116 × 31 + (420 – 30 – 36) × 31 × 33 = 422,406 Iipeikou options
3 × 5 × 31 × 32 + 3 × 76 × 33 × 33 + 3 × 99 × 32 × 33 + 3 × 8 × 31 × 33 + (1330 – 3 × 5 – 3 × 76 – 3 × 99 – 3 × 8) × 34 × 33 = 1,460,808 options without Iipeikou
Altogether 422,406 + 1,460,808 = 1,883,214 one-pon options.
Two pons: it’s best to decide where to put the two chis first.
Assuming Iipeikou, there are 21 possible chis. Furthermore, there are 31 remaining tiles that can be the pons (pons and Iipeikou cannot overlap), so 31C2 × 21 = 9765 main hands. The pair is only restricted by the pons (Iipeikou will leave two of each number) so there are 32 possible pairs per hand giving 312,480 hands.
Assuming all independent chis, there are 21C2 = 210 ways to choose the chis. We now have to decide how we can choose the pons. As above, the pons will be the only thing restricting the pair so there will always be 32 possible pairs.
- For each number 3 through 7, there is exactly one combination of chis that will make this and only this number unavailable for pons. This means 15 × 33C2 = 7920 main hands.
- For each number 2 through 7, there is exactly one combination of chis that will make this and the consecutive number unavailable for pons. This means 18 × 32C2 = 8928 main hands.
- Thus, for chis, pons and pair there are 7920 × 32 + 8928 × 32 + (210 – 15 – 18) × 34C2 × 32 = 3,716,640
- Overall, that is 3,716,640 + 312,480 = 4,029,120 hands with two pons.
Sanankou: It is impossible for the pons to interfere with the chi, so it is safe to say that the main hand has 34C3 × 21 = 125,664 possibilities. The pair might seem to pose a problem but actually it does not as there is no way a single chi would remove any number from the pair pool in addition to the pons; thus there are 125,664 × 31 = 3,895,584 possible Sanankou hands.
Toitoi/Suuankou: finally something easy! There are 34C4 = 46,376 options for the four triplets and each leaves 30 possible pairs giving 1,391,280 Toitoi/Suuankou hands.
Assuming there is no error in my maths, there should thus be 16,922,873 hands that can win Tenhou, Chihou or Renhou.
To determine how likely it is to win, consider that there are 136 tiles in the game of which you choose 14. This is the same for Tenhou and Chihou and it doesn’t matter that your tile picks are non-consecutive. 136C14 = 4,250,305,029,168,220,000 = 4.250 × 1018 so there are 4 quintillion 250 quadrillion possible starting hands. A quick division of the two values shows that the probability of Tenhou or Chihou is around 3.982 × 10–12 or somewhere around 1 in two trillion.
The above chain of thought is incorrect. It assumes that all tiles are individual but there are four identical copies of each tile.
I was dreading having to calculate how many combinations with limited repetitions (drawing 14 from 34 distinct tiles but allowing each tile to be repeated a maximum of 4 times) because it seemed a daunting task but thankfully JMoravitz over at Maths.SE already did that work for me and showed me a shortcut. Using their method, there are in fact only:
47C14 – 42C9 × 34 – 37C4 × 34C2 = 326,446,402,010 or 326 billion possible hands.
Thus, the odds of getting Chihou or Tenhou are much better than my initial estimate and come in at around 5.18 × 10–5 or 0.005183967 % or a 1 in 20,000 chance.
As part of an old running joke from over at Chemistry.SE, I will add: or 5 m%.
Renhou is essentially like Chihou except you get one, two or three tries at the 14th tile depending on whether you are South, West or North wind. Thus, naively I want to assume that the probability of Renhou is somewhere between Chihou and 3 × Chihou but I would have to confirm that with a mathematician.
The https://tenhou.net/sc/prof.html page contains statistics on yaku. As I understand it, Tenhou (天和) is found in 0.00046% of the hands that ended in someone victory, and Chiihou (地和) in 0.00091%. Thus, one case is obtained for approximately 100,000 or less.
Here is yet another answer from this page. 以上により、天和の確率は12859078207674÷4250305029168216000 ＝約0.000003025 (約1/330530)となります。
I think it means that the probability to get a tenhou=tenwu is 1/330530. Unfortunately i don't follow precisely the derivation because it is written in Japanese.
So far the answers are:
- 1/350000 according to @mafu's program ==> Is the program counting everything?
- 1/19290 according to @Jan's maths ==> Is the maths correct?
- 1/442501 according to @Pierebean's program ==> Is the program counting everything?
- 1/217391 according to tenhou.net ==> Is N large enough? As Mafu says: 650k is not much.
- 1/330530 according to rascalhp ==> Can someone who speaks Japanese check the maths and compare it to Jan's ?
Come on people, we can crack this!
"Made" hands are those that satisfy certain requirements, specifically four "sets" of either triplets or "three in a row," plus a pair. There are also a handful of "special cases" of "made hands" that don't meet these requirements. If, after taking a tile, you don't have a "made hand" (in either regard), you need to discard a tile and try again.
The "special cases" are easily countable. The more common cases can be counted using a branch of math called "combinatorics" (the math of combinations). Increasingly powerful software programs can do this easily.
The older "authorities" probably lacked "combinatoric" capabilities, hence no tables from them. The answer (in the form of a table, or a descriptive function), could now well exist somewhere in the world. That may or may not include the western world, depending on how popular the topic of mahjong is among western problem solvers. But the answer appears attainable, and may soon be, if it hasn't been already.