Pigeonhole Principle Calculator
Free online pigeonhole principle calculator. Enter your values and get instant results with the formula, step-by-step working, a worked example and FAQs — everything runs locally in your browser on Calcton, no signup required.
中文版:鸽笼原理下界计算器
原理:鸽笼原理(抽屉原理):n + 1 个对象放进 n 个盒子,必有一个盒子装至少 2 个。一般形式:n 个对象、m 个类别,必有一类至少含 ⌈n/m⌉ 个对象。它不告诉你哪个笼子、也不给出具体分配,只保证「最满笼」的下界。反过来的加强形式(k+1 只鸽 n 个笼 → 必有笼 ≥ 2)是无数存在性证明的核心:13 人中必有两人同星座(12 星座)、任意 367 人中必有两人同天生日(闰年 366 天)。
步骤:输入对象数 n 与类别数 m,工具输出 ⌈n/m⌉ 下界、平均值 n/m 与结论文字;n ≤ m 时提示原理不激活。
示例:10 只袜 3 种颜色 → 至少 4 只同色;13 人 12 星座 → 至少 2 人同星座;100 球 7 箱 → 至少 15 球同箱;52 张牌 4 花色 → 至少 13 张同花色;366 天中任取 367 人 → 至少 2 人同天生日。
注意事项:下界 ⌈n/m⌉ 是保证值而非典型值——实际最满笼可能更多;「保证同色对」要看清对象:10 只袜 3 色「至少 4 只同色」才保证 2 双(4 只同色可配 2 对 + 剩余另配,需按对数重算);大数输入用上取整而非浮点(10¹² / 3 的浮点误差会把 333333333333.33… 取错);鸽笼原理也适用于无穷版本(无穷只鸽放进有限笼必有笼含无穷只)。
相关:生日悖论工具研究「碰撞概率」的概率版(鸽笼的定量近似);排列组合工具计算对象与类别的精细分配;概率工具把「至少」从确定保证放宽为高概率;骰子工具的重复点数是鸽笼原理的随机实验版。
How to use the Pigeonhole Principle Calculator
- Fill in the inputs with your own numbers — every field shows what it expects.
- The result updates instantly as you type; no "Calculate" click needed.
- Read the result card for the main figure, the step-by-step formula, and practical notes.
Frequently asked questions
Is the Pigeonhole Principle Calculator free?
Yes — all math calculators on Calcton are free, with no sign-up required. Your inputs are processed in your browser and never sent to a server.
Is there a Chinese version of this tool?
Yes. Use the Chinese version link above — it is the same calculator with the interface in Simplified Chinese.
References
Formulas and benchmarks used by this calculator follow these published sources.
KevinContent LeadCalcton Editorial Team · Last updated 2026-10-02
Kevin maintains Calcton's formula verification and content: every calculator cites the standard it implements, worked examples are recomputed programmatically, and health benchmarks follow WHO and international guidelines.
Related calculators
More in this category: Math calculators
About math calculators
Free online math calculators for algebra, statistics, number theory and everyday arithmetic — from quadratic equations and matrices to percentages, fractions and prime factorization, each with step-by-step formulas.