Skip to content

Main content

Cyclic Composition Part Count Tool

Count positive-part compositions of a total into a fixed number of parts modulo cyclic rotation using Burnside’s lemma, including periodic compositions.

Loading tool…

Description

Count positive compositions up to cyclic rotation.

Combinatorial counts depend on whether objects are labeled, order matters, repetitions are permitted and a prefix is already fixed. Local counts, exact integer factors and feasibility bounds answer specific questions and need not enumerate complete objects.

Count positive compositions up to cyclic rotation.

When to use this tool

Use Cyclic Composition Part Count when checking the stated word, set, multiset or composition convention.

How to use the tool and how it works

  1. Enter total, parts. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read countDecimal. Use the output convention below.

Count positive compositions up to cyclic rotation. Require whole 1 <= parts <= total <= 256; sum phi(d)*binomial(total/d-1,parts/d-1) over common divisors d, divide by parts and return exact decimal text.1

Ordinary compositions preserve part order. This tool additionally identifies cyclic rotations; that equivalence is narrower than reflection equivalence.2

Input fieldMeaning and unitsAccepted input
totalTotalRequired. Safe integer; minimum 1; maximum 256.
partsPartsRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
countDecimalCount DecimalRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "total": 6,
    "parts": 3
  },
  "output": {
    "countDecimal": "4"
  }
}

Limitations and assumptions

  • Rotations of ordered part positions are identified; reflections are distinct and zero parts are excluded.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use complete objects and an appropriate exact counting, ranking or enumeration method when the local contribution is insufficient.

References

  1. Calculation and input contract: combinatorics/cyclic-composition-part-count — tool.io

  2. DLMF: compositions — NIST

Similar or alternative tools