Tool to generate partitions of a number (integer). A partition of an integer N is a decomposition of N into a set of numbers (inferior to N) which sum is N.

Number Partitions - dCode

Tag(s) : Arithmetics

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

Definition: in mathematics, a partition $ p(N) $ of a number $ N $ is a set of numbers (less than or equal to $ N $) whose sum is $ N $.

__Example:__ The number $ 5 $ can be decomposed into $ 7 $ distinct partitions, the additions are: $ 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, 1+1+1+1+1 $

Permutations are ignored: $ 4+1 $ and $ 1+4 $ are considered identical

__Example:__ The number $ 10 $ has $ 42 $ partitions/decompositions, and the number $ 100 $ has $ 190569292 $.

Due to servers' computation's cost with large lists, free generations are limited.

In 1918, Hardy and Ramanujan have found an approximation of $ p(n) $ for big numbers $ n $ :

$$ p(n) \sim \frac{1}{4n \sqrt{3}} ~ e^{\pi \sqrt{\frac{2n}{3}}} $$

Partitions of a number are used to solve the change-making problem and to list the ways of give back money.

__Example:__ There are 49 ways to make $100 with $5, $10, $20 or $50 notes

The generation is very costful in resources (which are expensive) as soon as the quantity of solution becomes large. dCode offers exhaustive lists, ask for prices!

dCode retains ownership of the "Number Partitions" source code. Except explicit open source licence (indicated Creative Commons / free), the "Number Partitions" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or the "Number Partitions" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Number Partitions" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!

Reminder : dCode is free to use.

The copy-paste of the page "Number Partitions" or any of its results, is allowed as long as you cite dCode!

Cite as source (bibliography):

*Number Partitions* on dCode.fr [online website], retrieved on 2022-12-09,

partition,decomposition,sum,set,number,integer

https://www.dcode.fr/partitions-generator

© 2022 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback