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),始終至少與 C(n, r) 一樣大。

設想 r 個相同的星號放入由 n − 1 個條分隔的 n 個類型格中。每種星號和條的排列就是一個多重集,計數這些排列得到 C(n + r − 1, r)。

選取零個元素只有一種結果——空選取——因此任意 n 的結果均為 1。

也稱為

可重複組合
重複組合
多重集組合
重複選取組合
stars and bars
可放回組合
combinations with repetition
隔板法

APA

TG we-Calculate Editorial Team. (2026). 可重複組合計算器 [Online calculator]. TG we-Calculate. https://we-calculate.com/zh-tw/calculator/combinations-with-repetition-calculator

Chicago

TG we-Calculate Editorial Team. "可重複組合計算器." TG we-Calculate. 2026. https://we-calculate.com/zh-tw/calculator/combinations-with-repetition-calculator.

IEEE

TG we-Calculate Editorial Team, "可重複組合計算器," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/zh-tw/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-tw/calculator/combinations-with-repetition-calculator}}, year = {2026}, note = {TG we-Calculate} }

這個計算機對您有幫助嗎?