meteor314 / intergerPartition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integer-partition JS or C (recommanded)

In number theory and combinatorics, a partition of a positive integer n, also called an integer partition, is a way of writing n as a sum of positive integers. Two sums that differ only in the order of their summands are considered the same partition. (If order matters, the sum becomes a composition.) For example, 4 can be partitioned in five distinct ways:

4
3 + 1
2 + 2
2 + 1 + 1
1 + 1 + 1 + 1

Image of partition

This program is made from the JS and could be optimized.

For ease of calculation, we do not recommend to use a number greater than 20 (because the number of partitions increases exponentially)!

You can create a copy of this program, in local !

$ git clone https://github.com/meteor314/Integer-partition-JavaScript
$ cd Integer-partition-JavaScript

Enjoy guys ! For more information (please visit wikipédia web site : https://en.wikipedia.org/wiki/Partition_(number_theory).

About


Languages

Language:JavaScript 52.2%Language:C 29.9%Language:HTML 17.9%