← Matemática

Order-sensitive sums

Calculadora de composição de números inteiros (o pedido é importante)

Explore composições de números inteiros onde a ordem é importante. Alternar entre contagens exatas, composições de k-part, partes limitadas e variantes de k-part não negativas.

Todos os cálculos são executados locally in your browser.

Outros idiomas 日本語 | English | 简体中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

Como usar (3 passos)

  1. Choose Composition or Partition, then pick the constraint you need.
  2. Enter n (and k/a/b when required), then select count, table, enumeration, or sample.
  3. Exportar CSV (arquivo de planilha)/TSV or Copiar a Compartilhável URL for reuse.

Entradas

--

Key formulas and notes

Perguntas frequentes

O que é the difference between partitions and compositions?

Partitions ignore order while compositions treat different orders as distinct.

Why is composition count 2^(n-1)?

Each of the n-1 gaps is a divider or not, giving 2^(n-1) combinations.

How Devo count compositions with exactly k parts?

Select exactly k parts to Calcular C(n-1, k-1).

O que é the nonnegative k-part formula?

It is C(n+k-1, k-1), the stars and bars count.

Posso restrict parts to a range?

Use bounded parts to restrict each part to [a, b].

Why is enumeration limited for large n?

The number of compositions grows quickly, so enumeration is capped.

Posso Calcular modulo m?

Yes. Switch to modulo mode and enter the modulus.

Do these samples use a fixed seed?

Yes. The same seed reproduces the same list of samples.