polymerist.maths.combinatorics.partitions ========================================= .. py:module:: polymerist.maths.combinatorics.partitions .. autoapi-nested-parse:: For explicitly enumerating partitions of sets and multisets Functions --------- .. autoapisummary:: polymerist.maths.combinatorics.partitions.int_partitions polymerist.maths.combinatorics.partitions.multiset_partition polymerist.maths.combinatorics.partitions.make_change_greedy Module Contents --------------- .. py:function:: int_partitions(n: int, _pivot: int = 1) -> Generator[tuple[int], None, None] Enumerates all integer partitions of n .. py:function:: multiset_partition(n: int, k: int) -> Generator[tuple[int], None, None] Enumerates all multisets of k integers whose sum is n (respects order and includes 0s) .. py:function:: make_change_greedy(n: int, denoms: Sequence[int]) -> dict[int, int] Greedy algorithm for making change for a given total