Intermediate

有重复的组合计算器

求在允许重复且顺序无关时,从 n 种类型中选择 r 个的方式数。
Distinct item categories to choose from
How many items you pick (repeats allowed)
Multiset combinations
35

Ways to choose with repetition, order ignored

公式
C(7, 3)
Without repetition C(n, r)
10
Ordered with repetition (nʳ)
125
21%
6%
74%
With repetition (multiset)
Without repetition
Ordered with repetition
Relative scale of the three counting methods
Step by step
  1. 1

    Stars + bars pool: n + r − 1

    5 + 3 − 1 = 7
  2. 2

    Multiset combinations C(pool, r)

    C(7, 3) = 35
    The number of ways to pick r items from n types allowing repeats, order ignored.
结果仅为一般参考性的估算,并非专业建议——在依赖这些重要结果之前,请务必自行独立核实。 阅读完整免责声明.
快速解答

这个计算器是如何工作的?

有重复的组合统计在允许重复且顺序无关时,从 n 种类型中选取 r 个的方式数。答案为 C(n + r − 1, r) = (n + r − 1)! / (r! · (n − 1)!),此处以乘法方式计算,并与普通组合和有序选择进行比较。

公式
C(n + r − 1, r) = (n + r − 1)! / (r! · (n − 1)!)
How this is calculated

有重复的组合(从 n 种类型中抽取大小为 r 的多重集)统计同一类型可被选取多次且选取顺序无关的选择数。输入 n(不同类型的数量,正整数)和 r(选取的物品数量,非负整数)。

计数由星条公式给出:C(n + r − 1, r) = (n + r − 1)! / (r! · (n − 1)!)。计算器以乘法方式计算二项式系数——将 r 个递增项相乘并边乘边除——避免直接计算大阶乘,使中间值保持较小。作为比较,还报告不允许重复时的 C(n, r) 和顺序也重要时的 nʳ(有重复的有序选择)。

输入取整为整数。n 必须至少为 1;r 可以为 0,此时恰好有一种选择(空多重集)。由于结果组合增长,非常大的 n 和 r 可能超出精确双精度整数范围,因此请将极端输出视为近似值。

常见问题

普通组合 C(n, r) 选取 r 个不同物品且不重复。有重复时,每种类型可被多次选取,得到 C(n + r − 1, r),总是至少与无重复情形一样大。

想象将 r 个相同的星号放入由 n − 1 条竖线分隔的 n 个类型槽中。星号和竖线的每种排列对应一个多重集,统计这些排列数得到 C(n + r − 1, r)。

选取零个物品恰好产生一种结果——空选择——因此对任意 n,结果为 1。

也称为

可重复组合
重复组合
多重集组合
隔板法
可放回选取
重复组合数

APA

TG we-Calculate Editorial Team. (2026). 有重复的组合计算器 [Online calculator]. TG we-Calculate. https://we-calculate.com/zh/calculator/combinations-with-repetition-calculator

Chicago

TG we-Calculate Editorial Team. "有重复的组合计算器." TG we-Calculate. 2026. https://we-calculate.com/zh/calculator/combinations-with-repetition-calculator.

IEEE

TG we-Calculate Editorial Team, "有重复的组合计算器," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh/calculator/combinations-with-repetition-calculator

BibTeX

@misc{wecalculate_combinations_with_repetition_calculator, title = {有重复的组合计算器}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/zh/calculator/combinations-with-repetition-calculator}}, year = {2026}, note = {TG we-Calculate} }

这个计算器对您有帮助吗?