多项式系数计算器

Multinomial Coefficient Calculator

Compute the multinomial coefficient from the total and category counts.

📐 计算公式
多项式系数(本页代码口径,三组计数):C=n!÷(k1!×k2!×k3!),阶乘按 2…k 累乘迭代计算。校验:k1+k2+k3 必须等于 n,否则报错并列出当前各组之和与 n;n 须为不超过 170 的非负整数且各组数量不能为负,否则报错并中止(超 170 双精度阶乘溢出)。判据:无固定分级,主结果按整数输出(保留 0 位小数)。

输入总数 n 与三个类别数 k₁、k₂、k₃(和为 n),求多项式系数。

Formula & Standard References

Item Formula / Note Source / Standard
Multinomial coefficient n! / (n1! · n2! · ... · n_k!), where the n_i sum to n Brualdi RA, Introductory Combinatorics (5th ed.), Pearson
Multinomial theorem The coefficient of x1^n1 · ... · x_k^n_k in the expansion of (x1 + ... + x_k)^n Brualdi RA, Introductory Combinatorics (5th ed.)
Reduction to the binomial case For k = 2 it reduces to the binomial coefficient C(n, n1) Brualdi RA, Introductory Combinatorics (5th ed.)
Multiset permutations The number of permutations of a multiset where identical items are indistinguishable Feller W., An Introduction to Probability Theory and Its Applications, Vol. 1
📌 计算说明
  • 多项展开项的系数。
  • 6!/(3!2!1!) → 60。

📚 深度解析:由总数与各类别数求多项式系数

💡 常见使用场景

算例:C(5; 2, 2, 1)
= 5! / (2!×2!×1!) = 120 / (2×2×1) = 30。即把 5 个不同元素分入 3 组(规模 2、2、1)的分法数。
算例:C(6; 3, 2, 1)
= 6! / (3!×2!×1!) = 720 / (6×2×1) = 60。

❓ 常见问题(FAQ)

多项式系数和二项式系数什么关系?
二项式系数是 m=2 的特例:C(n;k,n−k) = n!/(k!(n−k)!) = C(n,k)。多项式系数是其在多类分组上的推广。
什么时候用多项式系数?
当展开式含多于两项(如 (a+b+c)ⁿ)或要把 n 个对象按既定规模分到多个组时使用。组内顺序不计、组间规模固定是其典型特征。