【漢英對(duì)照】《夢(mèng)溪筆談》圍棋變局 Configurations of Go
沈括 著
【原文】
《夢(mèng)溪筆談·卷18技藝7》
小說(shuō):唐僧一行[1]曾算棋局都數(shù),凡若干局盡之。予嘗思之,此固易耳,但數(shù)多,非世間名數(shù)可能言之。
今略舉大數(shù):凡方二路,用四子,可變八十一局;方三路,用九子,可變一萬(wàn)九千六百八十三局;方四路,用十六子,可變四千三百四萬(wàn)六千七百二十一局;方五路,用二十五子,可變八千四百七十二億八千八百六十萬(wàn)九千四百四十三局;【古法:十萬(wàn)為億,十億為兆,萬(wàn)兆為稊[2]。算家以萬(wàn)萬(wàn)為億,萬(wàn)萬(wàn)億為兆,萬(wàn)萬(wàn)兆為垓。今但以算家數(shù)計(jì)之?!?/strong>方六路,用三十六子,可變十五兆九十四萬(wàn)六千三百五十二億八千二百三萬(wàn)一千九百二十六局[3];方七路以上,數(shù)多無(wú)名可記。盡三百六十一路,大約連書(shū)萬(wàn)字四十三[4],即是局之大數(shù)。【萬(wàn)字四十三,最下萬(wàn)字即萬(wàn)局,第二是萬(wàn)萬(wàn)局,第三是萬(wàn)億局,第四是一兆局,第五是萬(wàn)兆局,第六是萬(wàn)萬(wàn)兆,謂之一垓,第七是萬(wàn)垓局,第八是萬(wàn)萬(wàn)垓,第九是萬(wàn)億萬(wàn)萬(wàn)垓。此外無(wú)名可紀(jì),但四十三次萬(wàn)倍乘之,即是都大數(shù),零中數(shù)不與。】
其法:初一路可變?nèi)帧?strong>【一黑、一白、一空?!?/strong>自后不以橫直,但增一子,即三因之。凡三百六十一增,皆三因之,即是都局?jǐn)?shù)。
又法:先計(jì)循邊一行為“法”,【凡十九路, 得一十億六千二百二十六萬(wàn)一千四百六十七局?!?/strong>凡加一行,即 以“法”累乘之,乘終十九行,亦得上數(shù)。
又法:以自“法”相乘【得一百三十五兆八百五十一萬(wàn)七千一百七十四億四千八 百二十八萬(wàn)七千三百三十四局,此是兩行,凡三十八路變得此數(shù)也?!?/strong>[5]下位副置之,以下乘上,又以下乘下,置為上位;又副置之,以下乘上,以下乘下;加一“法”,亦得上數(shù)。有數(shù)法 可求,唯此法最徑捷。【只五次乘,便盡三百六十一路?!?/strong>千變?nèi)f化,不出此數(shù),棋之局盡矣。
【注釋】
[1] 一行:本名張遂(公元673年~公元727年),唐朝天文學(xué)家、數(shù)學(xué)家、發(fā)明家、僧人。
[2] “稊”應(yīng)該寫(xiě)為“秭”。
[3] 正確數(shù)值應(yīng)該是150,094,635,296,999,121。
[4] 沈括給出 ,更準(zhǔn)確數(shù)值大約為
。
[5] 正確數(shù)值應(yīng)該是1,350,851,717,672,992,089。
【今譯】
據(jù)小說(shuō)記載:唐朝僧人一行曾算過(guò)圍棋時(shí)可能下出不同局面的總數(shù),一共有多少局,他都算出來(lái)了。我也曾經(jīng)考慮過(guò),這當(dāng)然容易。但棋局?jǐn)?shù)目太大,不是用現(xiàn)在的大數(shù)名稱(chēng)可以表達(dá)出來(lái)。
現(xiàn)在我大略說(shuō)一下。如果棋盤(pán)是兩路見(jiàn)方,就有4個(gè)用子位置,可以變化出81種棋局;是三路見(jiàn)方,就有9個(gè)用子位置,可以變化出19683種棋局;是四路見(jiàn)方,就有16個(gè)用子位置,可以變化出43,046,721種棋局;是五路見(jiàn)方,就有25個(gè)用子位置,可以變化出847,288,609,443種棋局。【根據(jù)古法:十萬(wàn)為億,十億為兆,萬(wàn)兆為秭。而算家以萬(wàn)萬(wàn)為億,萬(wàn)萬(wàn)億為兆,萬(wàn)萬(wàn)兆為垓?!?/strong>我們現(xiàn)在用算家的計(jì)算方法來(lái)計(jì)數(shù)。如果棋盤(pán)是六路見(jiàn)方,就有36個(gè)用子位置,可以變化出150,094,635,282,031,926*種棋局。七路以上布局的,變化的局?jǐn)?shù)無(wú)法記下來(lái)。如果將棋盤(pán)361路的變局全記下的話(huà),大概要連寫(xiě)43個(gè)萬(wàn)字才是局的大致數(shù)字?!?3個(gè)萬(wàn)字,那么最后一個(gè)萬(wàn)字表示萬(wàn)局,第2個(gè)萬(wàn)字是萬(wàn)萬(wàn)局,第3個(gè)萬(wàn)字是萬(wàn)億局,第4個(gè)萬(wàn)字是兆局,第5個(gè)萬(wàn)字是萬(wàn)兆局,第6個(gè)萬(wàn)字是萬(wàn)萬(wàn)兆局,萬(wàn)萬(wàn)兆為一垓,第7個(gè)萬(wàn)字是萬(wàn)垓局,第8個(gè)萬(wàn)字是萬(wàn)萬(wàn)垓局,第9個(gè)萬(wàn)字是萬(wàn)億垓局。再往上就沒(méi)有大數(shù)名詞好用了。連接43次萬(wàn)倍相乘后所得的積數(shù)就是棋局總數(shù)的大概。這里只給出第一位的數(shù)字,其余的數(shù)字都略而不講。】
計(jì)算棋局的方法,第一個(gè)點(diǎn)可以有3種布局。【或放黑子、或放白子、或空著不放子。】從它出發(fā),不論橫直,每增加一個(gè)點(diǎn),就多成一個(gè)3;一直增加到全盤(pán)361點(diǎn),每次都多乘一個(gè)3,就得到棋局的總數(shù)。
另一種算法:先算出沿邊一行的局?jǐn)?shù),這個(gè)數(shù)稱(chēng)為基本數(shù),以此作為“法”?!疽恍泄?19 個(gè)點(diǎn), 共得 1,162,261,467局?!?/strong>每加一行,就用“法”乘一次,乘盡 19 行,也得到上述的棋局總數(shù)。
還有一種算法:先用“法”自乘,【得 1,350,851,717,448,287,334局,這是兩行共 38 點(diǎn)變化出來(lái)的局?jǐn)?shù)?!?/strong> 然后乘積作為乘數(shù),用乘積乘“法”,再把兩次的乘積相乘,得到第三次乘積;又把這個(gè)數(shù)作乘積,與第二次乘的積數(shù)相乘,再把所得的積相乘,又與“法”相乘,也能得到前段所講的總數(shù)。求棋局總數(shù)有幾種方法,只有這種方法最快捷。【只須要五次運(yùn)算就得出 361 個(gè)點(diǎn)所變化出的棋局總數(shù)?!?/strong>棋盤(pán)上可能布置出的局面千變?nèi)f化,也不會(huì)超過(guò)這個(gè)數(shù),棋局的總數(shù)就算盡了。
【英譯】
Mengxi Bitan Chapter 18 Jiyi 7
According to a story, the Buddhist monk Yi Xing [1] of the Tang dynasty calculated ?the total number of different configurations that may be placed on a Go ?board. I have thought of the problem as well, and found the method of ?calculation rather straightforward. However, the number of configurations is ?so large that it cannot be properly expressed by the numbers that are ?commonly known.
Here I shall present some examples. If the board is a 2x2 square grid, ? then it has four positions, which can produce 81 different configurations. If ?the board is a 3x3 square grid, then it has nine positions, which can produce ?19,683 different configurations. If the board is a 4x4 square grid, then it ?has sixteen positions, which can produce 43,046,721 different configurations. ?If the board is a 5x5 square grid, then it has twenty-five positions, which ?can produce 847,288,609,443 different configurations. (According to the ancient number system: yi is 10 multiplied by 10,000, zhao is 10 multiplied by 100,000,000, ti [2] is 10,000 multiplied by zhao. ?However, for mathematicians, yi is ?10000 multiplied by 10,000, zhao is ?10,000 multiplied by 10,000 yi, and ?gai is 10,000 multiplied by 10,000 zhao. Here we use the calculation ?method of the mathematicians.) If the board is 6x6 ?square grid, then it has thirty-six positions, which can produce 150,094,635,282,031,926 [3] ?different configurations. If the board is a 7x7 square grid or larger, the ?number of different configurations is too large to be written out. Exhausting ?the 361 positions of a true Go board, the number of configurations is ?approximately the number 10,000 being written consecutively forty-three times[4].
(This so-called “forty-three 10,000s” ?means the last 10,000 is 10,000, the second is , the third is
, the fourth is
, the fifth is
, ?the sixth is
, which is called one hai, the seventh is
, the eighth is
, ?the ninth is
. Beyond
that there is no name to express it; however, the product of 10000 to
the power of 43 is the approximate order of magnitude of this large? number while the remaining digits are not included.)
The method: first consider a point, which can have three possible ?configurations. (Black, ?white, or empty.) Each additional position, regardless if it is ?horizontal or vertical, will contribute an additional multiple of 3. When ?this is increased to 361 points, the total number of configurations is obtained ?by a multiple of 3 for every point.
Another method: First calculate the number of configurations of one ?side and take it as the “base number” (法 fa). (There are 19 points in one line, so the number of configurations is 1,162,261,467.) ?If one more line is added to it, multiply it by the “base number”. ?When it is multiplied 19 times, we get the same number.
Another method: First multiply the “base number” by itself. (The product is 1,350,851,717,448,287,334 [5], which is the number of ?configurations for two lines with a total of 38 positions.)
Then ?use the product as the multiplier and multiply the “base number”
by the ?multiplier, and get the second result. After that, multiply the
second ?product by itself and get the third product. Next use the third
product as the ?multiplier and multiply it with the second product to
get the fourth product. ?The total number of configurations is obtained
after multiplying the product ?by itself and then multiplying it with
the “base number”. Among these ?methods, this one is the quickest. (Only five calculations were made ?to arrive at the answer for 361 points.) Of all the myriad ?changes, the total number of configurations on a weiqi board will never exceed this number. This is indeed the ?final answer.
【Notes】
[1] Yi Xing: Original name Zhang Sui (673 – 727 AD), astronomer, mathematician, inventor and Buddhist monk of the Tang Dynasty.
[2] The character “稊” ti should be written as “秭” zi.
[3] The correct number should be 150,094,635,296,999,121.
[4] Shen Kuo gave the value ; however, the more accurate value is
.
[5] The correct number should be 1,350,851,717,672,992,089.

Article by Tao Steven Zheng(鄭濤)