# MaxMatch

**MaxMatch** 在计算与游戏领域指若干互不相同的主题：Ludii 通用游戏系统中的一个图论桌游、一种用于匹配市场的确定性机制、一种 2022 年的[半监督学习](https://www.edgepedia.org/zh/semi-supervised-learning)方法，以及一组围绕最大匹配构建的竞赛编程题目与函数名。本文逐一介绍。

| 关键事实 | 详情 |
|---|---|
| Ludii 游戏 | MaxMatch，标识符 DLP.Game.546，作者 Tahmina Begum，归类为现代与数学、图论<sup>[1](https://ludii.games/library.php)</sup> |
| 匹配市场机制 | MaxMatch 是一种确定性、伪单调算法，具有 2-秩近似保证，而 2 是任何确定性算法所能达到的最佳秩近似<sup>[2](https://www.math.uwaterloo.ca/~cswamy/papers/ordmech-itcsfnl.pdf)</sup> |
| 半监督学习 | *MaxMatch：具有最坏情况一致性的半监督学习*，arXiv 2209.12611，2022 年 9 月 26 日提交<sup>[3](https://arxiv.org/abs/2209.12611)</sup> |
| SPOJ 题目 | MAXMATCH（最大自匹配）：长度不超过 10^5 的字符串，字母表为 a、b、c；求使字符串与其 i-移位之间匹配字符数最大的移位 i<sup>[4](https://www.spoj.com/problems/MAXMATCH/en/)</sup> |
| 编程惯用法 | MaxMatch 是匈牙利算法实现二分图最大匹配时广泛使用的函数名<sup>[5](https://www.cise.ufl.edu/~sahni/papers/part.pdf)</sup> |

## Ludii 图论游戏

Ludii 通用游戏系统由马斯特里赫特大学的数字游戏元素项目开发，用于建模和游玩各类传统与抽象游戏。在该系统中，MaxMatch 是一款属于图论类别的现代数学游戏，与 [DisPath](https://www.edgepedia.org/zh/dispath)、Sim、点格棋、[哈肯布什](https://www.edgepedia.org/zh/hackenbush)等图论游戏并列<sup>[1](https://ludii.games/library.php)</sup><sup> • </sup><sup>[6](https://ludii.games/)</sup>。其数据库标识符为 DLP.Game.546，归功于 Tahmina Begum，她创作了该系统若干实验性图论游戏，包括 DisPath（DLP.Game.548）、Radran（DLP.Game.589）和 Ciri Amber（DLP.Game.563）<sup>[1](https://ludii.games/library.php)</sup><sup> • </sup><sup>[7](https://ludii.games/details.php?keyword=DisPath)</sup>。Ludii 数据库以 DLP.T.N 形式的标识符标记每个条目，其中 T 为表名，N 为条目的 Id 字段，因此对该游戏的外部引用使用 DLP.Game.546<sup>[8](https://ludii.games/downloads/DLP_Database_Guide.pdf)</sup>。

## 匹配市场机制

在市场设计中，MaxMatch 是一种用于匹配市场的确定性算法。匹配市场是指包含代理与物品的场景，其结果是将代理与物品匹配，且每个代理对物品有偏好排序<sup>[2](https://www.math.uwaterloo.ca/~cswamy/papers/ordmech-itcsfnl.pdf)</sup>。该算法在代理上固定一个打破平局的规则，并分 m 个阶段分配物品：在第 r 阶段，它在代理与物品上构建二分图 G_r，若物品 i 是代理 j 的前 r 个偏好物品之一，则代理 j 到物品 i 有一条边，并基于该图进行分配<sup>[2](https://www.math.uwaterloo.ca/~cswamy/papers/ordmech-itcsfnl.pdf)</sup>。

该机制的保证以秩近似来表述，秩近似衡量所分配物品在代理偏好列表中的靠后程度。MaxMatch 是伪单调的——这一性质与能否通过诚实机制实现有关——并达到 2-秩近似。同一分析表明，2 是任何确定性算法所能达到的最佳秩近似，因此该保证是紧的；同时，确定性诚实机制根本无法达到任何常数秩近似<sup>[2](https://www.math.uwaterloo.ca/~cswamy/papers/ordmech-itcsfnl.pdf)</sup>。

## 半监督学习

MaxMatch 也是一篇 arXiv 论文所提出的半监督学习方法的名称，论文题为《MaxMatch：具有最坏情况一致性的半监督学习》，于 2022 年 9 月 26 日提交<sup>[3](https://arxiv.org/abs/2209.12611)</sup>。半监督学习利用小型标注数据集与大型未标注数据集共同训练模型，这一研究方向关注此类方法中所用一致性正则化的最坏情况行为。

## 竞赛编程与字符串匹配

若干评测题目与算法惯用法使用了这一名称。SPOJ 题目 MAXMATCH（题为“最大自匹配”）给定一个由字母 a、b、c 组成、长度在 2 到 10^5 之间的字符串 s，定义匹配函数 m_s(i) 为：当 s 的第 0 个字符与 s 的一个副本的第 i 个字符对齐时，相匹配的字符数。任务是计算 m_s(i) 在 1 到 |s| 所有移位上的最大值，并按递增顺序输出每个最优移位；对于样例输入 caccacaa，答案为 4，在移位 3 处取得<sup>[4](https://www.spoj.com/problems/MAXMATCH/en/)</sup>。CodeChef 上同名题目则要求在一个二分图中求最大加权匹配，该图两侧分别为集合 {1, 2, ..., n} 的排列，以及描述每个排列升降模式的 I、D 字符串<sup>[9](https://discuss.codechef.com/t/maxmatch-editorial/10976)</sup>。

这一名称也作为例程名和变量名出现在匹配与抄袭检测代码中。在竞赛编程中，MaxMatch 是匈牙利算法函数的常见名称，该函数计算二分图的最大匹配；[佛罗里达大学](https://www.edgepedia.org/zh/university-of-florida)一篇关于区间图的论文同样给出了过程 MaxMatch(G, M)，用于计算一侧为凸的二分图的最大匹配<sup>[5](https://www.cise.ufl.edu/~sahni/papers/part.pdf)</sup><sup> • </sup><sup>[10](https://intrepidgeeks.com/tutorial/1422-air-raidmaxmatch)</sup>。在程序抄袭检测系统 JPlag 中，maxmatch 是贪心字符串平铺算法中的变量，存储当前阶段找到的最长匹配长度，只要该长度超过最小匹配长度，该阶段便重复进行<sup>[11](https://citeseerx.ist.psu.edu/document?doi=193a1c482b89dcea0cd8ab109d674d5747bb567a&repid=rep1&type=pdf)</sup>。

## References

1. [Ludii Portal game library (MaxMatch, DLP.Game.546)](https://ludii.games/library.php)
2. [Welfare Maximization and Truthfulness in Matching Markets (MaxMatch mechanism), University of Waterloo](https://www.math.uwaterloo.ca/~cswamy/papers/ordmech-itcsfnl.pdf)
3. [MaxMatch: Semi-Supervised Learning with Worst-Case Consistency, arXiv:2209.12611](https://arxiv.org/abs/2209.12611)
4. [SPOJ Problem MAXMATCH - Maximum Self-Matching](https://www.spoj.com/problems/MAXMATCH/en/)
5. [Maximum matching algorithm for convex bipartite graphs (Procedure MaxMatch), University of Florida](https://www.cise.ufl.edu/~sahni/papers/part.pdf)
6. [Ludii Portal home](https://ludii.games/)
7. [Ludii Portal: DisPath game details](https://ludii.games/details.php?keyword=DisPath)
8. [Digital Ludeme Project Database Guide](https://ludii.games/downloads/DLP_Database_Guide.pdf)
9. [CodeChef MAXMATCH Editorial](https://discuss.codechef.com/t/maxmatch-editorial/10976)
10. [Air Raid // MaxMatch bipartite matching implementation](https://intrepidgeeks.com/tutorial/1422-air-raidmaxmatch)
11. [JPlag: Finding plagiarisms among a set of programs (Greedy String Tiling)](https://citeseerx.ist.psu.edu/document?doi=193a1c482b89dcea0cd8ab109d674d5747bb567a&repid=rep1&type=pdf)

---
*Initially written Oct 21, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Algorithms and computational methods › Graph and network algorithms › Matching and assignment

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/maxmatch

English original: https://www.edgepedia.org/maxmatch
