Skip to content
Symi Docs
Kotlin
On this page

Combinatorics

Same convention as integer number theory: integer-leaf expressions in, integer-leaf expressions out; non-integer input raises, as do arguments outside each function's domain (negative counts, …).

falling_factorial#

Explicit context

fun fallingFactorial(
    value: UniffiExpression,
    order: UniffiExpression,
): UniffiExpression

base⁡(base⁡−1)⋯(base⁡−length⁡+1)\operatorname{base}(\operatorname{base}-1)\cdots(\operatorname{base}-\operatorname{length}+1); length must be a non-negative integer, base may be any integer.

rising_factorial#

Explicit context

fun risingFactorial(
    value: UniffiExpression,
    order: UniffiExpression,
): UniffiExpression

base⁡(base⁡+1)⋯(base⁡+length⁡−1)\operatorname{base}(\operatorname{base}+1)\cdots(\operatorname{base}+\operatorname{length}-1) (the Pochhammer symbol on integers).

stirling_first_signed#

Explicit context

fun stirlingFirstSigned(
    upper: UniffiExpression,
    lower: UniffiExpression,
): UniffiExpression

Signed Stirling number of the first kind s(n, k).

stirling_second#

Explicit context

fun stirlingSecond(
    upper: UniffiExpression,
    lower: UniffiExpression,
): UniffiExpression

Stirling number of the second kind S(n, k).

bell_number#

Explicit context

fun bellNumber(argument: UniffiExpression): UniffiExpression

The n-th Bell number.

catalan_number#

Explicit context

fun catalanNumber(argument: UniffiExpression): UniffiExpression

The n-th Catalan number.

fibonacci_number#

Explicit context

fun fibonacciNumber(argument: UniffiExpression): UniffiExpression

The n-th Fibonacci number (F(0) = 0, F(1) = 1).

partition_count#

Explicit context

fun partitionCount(argument: UniffiExpression): UniffiExpression

Number of integer partitions p(n).

multinomial#

Explicit context

fun multinomial(parts: List<UniffiExpression>): UniffiExpression

Multinomial coefficient (∑parts⁡)!/∏(part⁡i!)(\sum \operatorname{parts})! / \prod (\operatorname{part}_i!); parts must be non-negative integers.

Example#

Symi documentation · Kotlin