5D Library › Modular Numerology, Character-Stroke Hashes and Residue-Class Distributions · 中文

Chapter 4. Kangxi Strokes: Radical Restoration Is a Fixed Map

Two stroke counts

Chinese name analysis computes its grids from stroke counts, but there are at least two stroke counts. One follows today’s mainland standard, the Table of General Standard Chinese Characters and its companion norms (State Council of the People’s Republic of China 2013); the other is the “Kangxi count” used throughout books of name analysis, which takes the radical plus remaining strokes as listed in the Kangxi Dictionary (Zhang et al. 1716). The two differ for three reasons: a simplified character may have fewer strokes than its traditional form (马 3 strokes, 馬 10); a radical is often written in a variant form within the character, while the Kangxi count uses the full radical; and numerals count by their value.

The rule of radical restoration is this: if a character’s radical appears in a variant form, it is counted with the strokes of the full radical. 氵 counts as 水, 4 strokes; 艹 as 艸, 6; 辶 as 辵, 7; 阝 on the left as 阜, 8, and on the right as 邑, 7; the 王 side as 玉, 5; 月 meaning flesh as 肉, 6; 礻 as 示, 5; 衤 as 衣, 6; 扌 as 手, 4; 忄 as 心, 4; 罒 as 网, 6. Two points matter: only a variant that is the character’s radical is restored, and the same shape in another position is counted as written; and 王 standing alone counts 4. The numerals one to ten count by value: 四 is written with 5 strokes and counts 4, 五 with 4 and counts 5, 七, 八 and 九 with 2 each and count 7, 8 and 9.

These rules map every character to a definite integer. The next program writes a working table of common surnames and common given-name characters in three parts, “pinyin:simplified count:Kangxi part”: when the radical is written in full, the Kangxi part is the Kangxi count; when it is written in a variant form, the Kangxi part is “variant code + strokes outside the radical”, and the program restores the radical and adds. To keep the code lines whole in print, the program names each character by its pinyin with a tone number; the characters themselves are listed in the same order in the note below.

Note

The working table. The table was compiled by the author for this book: 90 common surnames and 78 common given-name characters, with simplified stroke counts following the Table of General Standard Chinese Characters and Kangxi counts following the radicals and remainders of the Kangxi Dictionary, entered character by character. The conclusions of the following chapters depend only on the broad shape of the stroke distribution, which differences between dictionaries for a few characters would not change.

Surnames (simplified count / Kangxi count): 王 4/4, 李 7/7, 张 (張) 7/11, 刘 (劉) 6/15, 陈 (陳) 7/16, 杨 (楊) 7/13, 黄 (黃) 11/12, 赵 (趙) 9/14, 吴 (吳) 7/7, 周 8/8, 徐 10/10, 孙 (孫) 6/10, 马 (馬) 3/10, 朱 6/6, 胡 9/11, 郭 10/15, 何 7/7, 高 10/10, 林 8/8, 罗 (羅) 8/20, 郑 (鄭) 8/19, 梁 11/11, 谢 (謝) 12/17, 宋 7/7, 唐 10/10, 许 (許) 6/11, 韩 (韓) 12/17, 冯 (馮) 5/12, 邓 (鄧) 4/19, 曹 11/11, 彭 12/12, 曾 12/12, 田 5/5, 董 12/15, 潘 15/16, 袁 10/10, 蔡 14/17, 蒋 (蔣) 12/17, 余 7/7, 于 3/3, 杜 7/7, 叶 (葉) 5/15, 程 12/12, 苏 (蘇) 7/22, 魏 17/18, 吕 (呂) 6/7, 丁 2/2, 任 6/6, 沈 7/8, 姚 9/9, 卢 (盧) 5/16, 姜 9/9, 崔 11/11, 钟 (鍾) 9/17, 谭 (譚) 14/19, 陆 (陸) 7/16, 汪 7/8, 金 8/8, 石 5/5, 廖 14/14, 贾 (賈) 10/13, 夏 10/10, 韦 (韋) 4/9, 方 4/4, 白 5/5, 邹 (鄒) 7/17, 孟 8/8, 熊 14/14, 秦 10/10, 邱 8/12, 江 6/7, 段 9/9, 雷 13/13, 侯 9/9, 龙 (龍) 5/16, 史 5/5, 黎 15/15, 贺 (賀) 9/12, 顾 (顧) 10/21, 毛 4/4, 郝 9/14, 邵 7/12, 万 (萬) 3/15, 钱 (錢) 10/16, 严 (嚴) 7/20, 武 8/8, 莫 10/13, 孔 4/4, 向 6/6, 汤 (湯) 6/13.

Given-name characters: 伟 (偉) 6/11, 芳 7/10, 秀 7/7, 英 8/11, 华 (華) 6/14, 慧 15/15, 巧 5/5, 美 9/9, 静 (靜) 14/16, 丽 (麗) 7/19, 强 (強) 12/11, 磊 15/15, 军 (軍) 6/9, 洋 9/10, 勇 9/9, 杰 (傑) 8/12, 娟 10/10, 涛 (濤) 10/18, 明 8/8, 超 12/12, 霞 17/17, 平 5/5, 刚 (剛) 6/10, 桂 10/10, 文 4/4, 辉 (輝) 12/15, 玲 9/10, 建 8/9, 志 7/7, 海 10/11, 宇 6/6, 浩 10/11, 思 9/9, 怡 8/9, 悦 (悅) 10/11, 晨 11/11, 欣 8/8, 雨 8/8, 子 3/3, 涵 11/12, 梓 11/11, 轩 (軒) 7/10, 博 12/12, 嘉 14/14, 俊 9/9, 豪 14/14, 婷 12/12, 琪 12/13, 瑶 (瑤) 14/15, 诗 (詩) 8/13, 语 (語) 9/14, 佳 8/8, 云 (雲) 4/12, 龙 (龍) 5/16, 凤 (鳳) 4/14, 国 (國) 8/11, 民 5/5, 春 9/9, 红 (紅) 6/9, 兰 (蘭) 5/23, 梅 11/11, 菊 11/14, 振 10/11, 扬 (揚) 6/13, 达 (達) 6/16, 远 (遠) 7/17, 进 (進) 7/15, 道 12/16, 福 13/14, 祥 10/11, 祺 12/13, 裕 12/13, 胜 (勝) 9/12, 能 10/12, 朋 8/8, 育 8/10, 有 6/6, 林 8/8.

Radical notes and homophone labels. Both 莫 and 萬 (万) fall under the grass radical 艸 in the Kangxi Dictionary: 莫 = 艸 6 + remainder 7 = 13, 萬 = 艸 6 + remainder 9 = 15. In the program, homophone pinyin labels carry a letter suffix in order of appearance: chen2a 陈, chen2b 晨; yang2a 杨, yang2b 洋, yang2c 扬; han2a 韩, han2b 涵; peng2a 彭, peng2b 朋; yu2a 余, yu2b 于; yao2a 姚, yao2b 瑶; jiang1a 姜, jiang1b 江; fang1a 方, fang1b 芳; yu3a 宇, yu3b 雨, yu3c 语; zi3a 子, zi3b 梓; jia1a 嘉, jia1b 佳; qi2a 琪, qi2b 祺; yu4a 裕, yu4b 育.

Calculation

# Chapter 4. Kangxi stroke counts as a deterministic map.
# Each entry is pinyin:simplified-count:Kangxi-part. The pinyin (with
# tone number) names the character; the characters themselves are
# listed in the text of this chapter, in the same order. The Kangxi part
# is either the Kangxi count itself, when the radical is written in full,
# or code+rest, when the radical is written in a variant form: the full
# radical's strokes are restored and the strokes outside it (as listed in
# the Kangxi Dictionary) are added. Restoration applies only when the
# variant is the character's radical; wang standing alone counts 4.
# Homophones carry a letter suffix (a, b, c) in order of first appearance,
# so that every label names one character.
VARIANT = {   # code: (variant as written, full radical, Kangxi strokes)
    "shui": ("water side", "shui", 4), "cao": ("grass top", "cao", 6),
    "chuo": ("walk side", "chuo", 7), "fuL": ("left ear", "fu", 8),
    "yiR": ("right ear", "yi", 7), "yuW": ("king side", "yu", 5),
    "rou": ("moon as flesh", "rou", 6), "shi": ("show side", "shi", 5),
    "yi": ("cloth side", "yi", 6), "shou": ("hand side", "shou", 4),
    "xin": ("heart side", "xin", 4), "wang": ("net top", "wang", 6)}
NUMERALS = (("yi1", 1, 1), ("er4", 2, 2), ("san1", 3, 3), ("si4", 5, 4),
            ("wu3", 4, 5), ("liu4", 4, 6), ("qi1", 2, 7), ("ba1", 2, 8),
            ("jiu3", 2, 9), ("shi2", 2, 10))   # (name, written, counted)

SURNAMES = """
wang2:4:4 li3:7:7 zhang1:7:11 liu2:6:15 chen2a:7:fuL+8 yang2a:7:13
huang2:11:12 zhao4:9:14 wu2:7:7 zhou1:8:8 xu2:10:10 sun1:6:10 ma3:3:10
zhu1:6:6 hu2:9:rou+5 guo1:10:yiR+8 he2:7:7 gao1:10:10 lin2:8:8
luo2:8:wang+14 zheng4:8:yiR+12 liang2:11:11 xie4:12:17 song4:7:7
tang2:10:10 xu3:6:11 han2a:12:17 feng2:5:12 deng4:4:yiR+12 cao2:11:11
peng2a:12:12 zeng1:12:12 tian2:5:5 dong3:12:cao+9 pan1:15:shui+12
yuan2:10:10 cai4:14:cao+11 jiang3:12:cao+11 yu2a:7:7 yu2b:3:3 du4:7:7
ye4:5:cao+9 cheng2:12:12 su1:7:cao+16 wei4:17:18 lv3:6:7 ding1:2:2
ren2:6:6 shen3:7:shui+4 yao2a:9:9 lu2:5:16 jiang1a:9:9 cui1:11:11
zhong1:9:17 tan2:14:19 lu4:7:fuL+8 wang1:7:shui+4 jin1:8:8 shi2:5:5
liao4:14:14 jia3:10:13 xia4:10:10 wei2:4:9 fang1a:4:4 bai2:5:5
zou1:7:yiR+10 meng4:8:8 xiong2:14:14 qin2:10:10 qiu1:8:yiR+5
jiang1b:6:shui+3 duan4:9:9 lei2:13:13 hou2:9:9 long2:5:16 shi3:5:5
li2:15:15 he4:9:12 gu4:10:21 mao2:4:4 hao3:9:yiR+7 shao4:7:yiR+5
wan4:3:cao+9 qian2:10:16 yan2:7:20 wu3:8:8 mo4:10:cao+7 kong3:4:4
xiang4:6:6 tang1:6:shui+9"""

GIVEN = """
wei3:6:11 fang1b:7:cao+4 xiu4:7:7 ying1:8:cao+5 hua2:6:cao+8 hui4:15:15
qiao3:5:5 mei3:9:9 jing4:14:16 li4:7:19 qiang2:12:11 lei3:15:15 jun1:6:9
yang2b:9:shui+6 yong3:9:9 jie2:8:12 juan1:10:10 tao1:10:shui+14 ming2:8:8
chao1:12:12 xia2:17:17 ping2:5:5 gang1:6:10 gui4:10:10 wen2:4:4 hui1:12:15
ling2:9:yuW+5 jian4:8:9 zhi4:7:7 hai3:10:shui+7 yu3a:6:6 hao4:10:shui+7
si1:9:9 yi2:8:xin+5 yue4:10:xin+7 chen2b:11:11 xin1:8:8 yu3b:8:8 zi3a:3:3
han2b:11:shui+8 zi3b:11:11 xuan1:7:10 bo2:12:12 jia1a:14:14 jun4:9:9
hao2:14:14 ting2:12:12 qi2a:12:yuW+8 yao2b:14:yuW+10 shi1:8:13 yu3c:9:14
jia1b:8:8 yun2:4:12 long2:5:16 feng4:4:14 guo2:8:11 min2:5:5 chun1:9:9
hong2:6:9 lan2:5:cao+17 mei2:11:11 ju2:11:cao+8 zhen4:10:shou+7
yang2c:6:shou+9 da2:6:chuo+9 yuan3:7:chuo+10 jin4:7:chuo+8 dao4:12:chuo+9
fu2:13:shi+9 xiang2:10:shi+6 qi2b:12:shi+8 yu4a:12:yi+7 sheng4:9:12
neng2:10:rou+6 peng2b:8:8 yu4b:8:rou+4 you3:6:6 lin2:8:8"""

def parse(block):
    out = []
    for tok in block.split():
        py, simp, kx = tok.split(":")
        if "+" in kx:
            code, rest = kx.split("+")
            out.append((py, int(simp), VARIANT[code][2] + int(rest), code))
        else:
            out.append((py, int(simp), int(kx), None))
    return out

if __name__ == "__main__":
    sur, giv = parse(SURNAMES), parse(GIVEN)
    print("   {} surnames, {} given-name characters".format(len(sur),
                                                         len(giv)))
    print("   restored radicals: variant -> full radical, strokes, e.g.")
    for code, (form, full, n) in VARIANT.items():
        used = [e for e in sur + giv if e[3] == code]
        if used:
            print("     {:13s} -> {:4s} {}   {}".format(
                form, full, n, " ".join("{} {}->{}".format(e[0], e[1], e[2])
                                        for e in used[:3])))
    print("   numerals count by value (written -> counted):")
    print("     " + "  ".join("{} {}->{}".format(*x) for x in NUMERALS[:5]))
    print("     " + "  ".join("{} {}->{}".format(*x) for x in NUMERALS[5:]))
    for label, pool in (("surnames", sur), ("given", giv)):
        diff = {}
        for e in pool:
            diff[e[2] - e[1]] = diff.get(e[2] - e[1], 0) + 1
        cells = ["{:+d}:{}".format(k, v) for k, v in sorted(diff.items())]
        print("   {}: Kangxi minus simplified (difference:count),"
              " {} of {} differ".format(label, len(pool) - diff.get(0, 0),
                                        len(pool)))
        for i in range(0, len(cells), 9):
            print("     " + " ".join(cells[i:i + 9]))
    lower = [e for e in sur + giv if e[2] < e[1]]
    print("   fewer Kangxi strokes than simplified: " + " ".join(
        "{} {}->{}".format(e[0], e[1], e[2]) for e in lower))
    print("\nReading: the Kangxi count is a fixed function of the")
    print("traditional form and its radical, so it can be computed, not")
    print("looked up by feel. It differs from the simplified count for")
    print("about half of the characters here, by -1 to +18 strokes.")
#    90 surnames, 78 given-name characters
#    restored radicals: variant -> full radical, strokes, e.g.
#      water side    -> shui 4   pan1 15->16 shen3 7->8 wang1 7->8
#      grass top     -> cao  6   dong3 12->15 cai4 14->17 jiang3 12->17
#      walk side     -> chuo 7   da2 6->16 yuan3 7->17 jin4 7->15
#      left ear      -> fu   8   chen2a 7->16 lu4 7->16
#      right ear     -> yi   7   guo1 10->15 zheng4 8->19 deng4 4->19
#      king side     -> yu   5   ling2 9->10 qi2a 12->13 yao2b 14->15
#      moon as flesh -> rou  6   hu2 9->11 neng2 10->12 yu4b 8->10
#      show side     -> shi  5   fu2 13->14 xiang2 10->11 qi2b 12->13
#      cloth side    -> yi   6   yu4a 12->13
#      hand side     -> shou 4   zhen4 10->11 yang2c 6->13
#      heart side    -> xin  4   yi2 8->9 yue4 10->11
#      net top       -> wang 6   luo2 8->20
#    numerals count by value (written -> counted):
#      yi1 1->1  er4 2->2  san1 3->3  si4 5->4  wu3 4->5
#      liu4 4->6  qi1 2->7  ba1 2->8  jiu3 2->9  shi2 2->10
#    surnames: Kangxi minus simplified (difference:count), 46 of 90 differ
#      +0:44 +1:7 +2:1 +3:5 +4:3 +5:10 +6:2 +7:3 +8:1
#      +9:3 +10:2 +11:4 +12:2 +13:1 +15:2
#    given: Kangxi minus simplified (difference:count), 45 of 78 differ
#      -1:1 +0:33 +1:15 +2:3 +3:9 +4:3 +5:3 +7:1 +8:4
#      +10:3 +11:1 +12:1 +18:1
#    fewer Kangxi strokes than simplified: qiang2 12->11
#
# Reading: the Kangxi count is a fixed function of the
# traditional form and its radical, so it can be computed, not
# looked up by feel. It differs from the simplified count for
# about half of the characters here, by -1 to +18 strokes.

For 46 of the 90 surnames and 45 of the 78 given-name characters the Kangxi count differs from the simplified count, by anything from −1 to +18. The only character that loses strokes is 强 (qiang2 in the program): 12 strokes simplified, while the traditional 強 counts 弓 plus 8, that is 11. The largest changes come from two kinds of character: those whose simplified and traditional forms differ (蘭 23 against 兰 5, 龍 16 against 龙 5), and those whose radical is restored by many strokes, the two forms of 阝, 艹 and 辶 (陳 16, 鄭 19, 鄧 19, 達 16).

The distribution of strokes

Calculation

# Chapter 4. How stroke counts are distributed, simplified and Kangxi.
# The lists are the counts of the previous program's table, in its order
# (90 surnames, 78 given-name characters). Each character is weighted
# equally: the table is a list of common characters, not a census.
from statistics import mean, pstdev

SUR_S = """4 7 7 6 7 7 11 9 7 8 10 6 3 6 9 10 7 10 8 8 8 11 12 7 10 6 12 5
4 11 12 12 5 12 15 10 14 12 7 3 7 5 12 7 17 6 2 6 7 9 5 9 11 9 14 7 7 8 5
14 10 10 4 4 5 7 8 14 10 8 6 9 13 9 5 5 15 9 10 4 9 7 3 10 7 8 10 4 6 6"""
SUR_K = """4 7 11 15 16 13 12 14 7 8 10 10 10 6 11 15 7 10 8 20 19 11 17 7 10
11 17 12 19 11 12 12 5 15 16 10 17 17 7 3 7 15 12 22 18 7 2 6 8 9 16 9 11
17 19 16 8 8 5 14 13 10 9 4 5 17 8 14 10 12 7 9 13 9 16 5 15 12 21 4 14
12 15 16 20 8 13 4 6 13"""
GIV_S = """6 7 7 8 6 15 5 9 14 7 12 15 6 9 9 8 10 10 8 12 17 5 6 10 4 12 9 8 7
10 6 10 9 8 10 11 8 8 3 11 11 7 12 14 9 14 12 12 14 8 9 8 4 5 4 8 5 9 6 5
11 11 10 6 6 7 7 12 13 10 12 12 9 10 8 8 6 8"""
GIV_K = """11 10 7 11 14 15 5 9 16 19 11 15 9 10 9 12 10 18 8 12 17 5 10 10 4
15 10 9 7 11 6 11 9 9 11 11 8 8 3 12 11 10 12 14 9 14 12 13 15 13 14 8 12
16 14 11 5 9 9 23 11 14 11 13 16 17 15 16 14 11 13 13 12 12 8 10 6 8"""

def nums(s):
    return [int(x) for x in s.split()]

if __name__ == "__main__":
    print("   pool      count   n   mean    sd  min  max  middle half")
    for label, s in (("surname", SUR_S), ("surname", SUR_K),
                     ("given", GIV_S), ("given", GIV_K)):
        x = sorted(nums(s))
        kind = "simp" if s in (SUR_S, GIV_S) else "Kangxi"
        q1, q3 = x[len(x) // 4], x[(3 * len(x)) // 4]
        fmt = "   {:8s}  {:6s} {:3d} {:6.2f} {:5.2f} {:4d} {:4d}   {:2d} to"
        print(fmt.format(label, kind, len(x), mean(x), pstdev(x), min(x),
                         max(x), q1), "{:2d}".format(q3))
    for label, s in (("given, Kangxi", GIV_K),):
        x = nums(s)
        hist = {}
        for v in x:
            hist[v] = hist.get(v, 0) + 1
        print("   {} histogram:".format(label))
        for v in sorted(hist):
            print("     {:2d} {}".format(v, "#" * hist[v]))
    print("\nReading: restoring radicals moves the counts up by two to three")
    print("strokes on average and spreads them out; the middle half of each")
    print("pool still falls within a band of four to seven strokes.")
#    pool      count   n   mean    sd  min  max  middle half
#    surname   simp    90   8.22  3.12    2   17    6 to 10
#    surname   Kangxi  90  11.39  4.61    2   22    8 to 15
#    given     simp    78   8.94  2.94    3   17    7 to 11
#    given     Kangxi  78  11.29  3.57    3   23    9 to 14
#    given, Kangxi histogram:
#       3 #
#       4 #
#       5 ###
#       6 ##
#       7 ##
#       8 ######
#       9 #########
#      10 ########
#      11 ############
#      12 ########
#      13 #####
#      14 #######
#      15 #####
#      16 ####
#      17 ##
#      18 #
#      19 #
#      23 #
#
# Reading: restoring radicals moves the counts up by two to three
# strokes on average and spreads them out; the middle half of each
# pool still falls within a band of four to seven strokes.
Stroke counts of the 168 characters of the working table: simplified (blue) and Kangxi (gold).

The mean surname count rises from 8.22 simplified to 11.39 Kangxi, its standard deviation from 3.12 to 4.61; for given-name characters from 8.94 to 11.29, with standard deviation from 2.94 to 3.57. Restoration lifts the counts by two to three strokes on the whole and widens their spread; yet the middle half of each group still falls within a band four to seven strokes wide. The grids of Chapter 5 are sums of these counts, so the concentration of the stroke distribution becomes the concentration of the grids.

One map, two sets of labels

The stroke count itself is not in dispute: given the form of the character and the counting convention, it is a definite function. The dispute is about which convention to use. The same name gives different grids under the simplified and the Kangxi conventions, and in Chapter 5 this difference becomes a difference of good and bad labels. Software should state which count it uses and, where it can, report both.

Summary

The Kangxi count is “strokes of the full radical plus remaining strokes”; variant radicals are restored only when they are the character’s radical, and numerals count by value; it is a definite function of the written form. In the working table of this book about half of the characters have two different counts, differing by −1 to +18, and restoration raises the average by two to three strokes and widens the distribution.

References

State Council of the People’s Republic of China. 2013. Tongyong Guifan Hanzi Biao [Table of General Standard Chinese Characters]. In Chinese; Issued 5 June 2013.
Zhang, Yushu, Tingjing Chen, et al. 1716. Kangxi Zidian [Kangxi Dictionary]. Imperial Household (Wuying Dian).

Fan, Y. (2026). Modular Numerology, Character-Stroke Hashes and Residue-Class Distributions: Digital-Root Arithmetic, Kangxi Radical Restorations, Modulo-80 Grid Mappings and Empirical Base-Rate Concentration [姓名笔画、生命灵数与手机号码的同余映射和分布论] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090178 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).