| New Reply |
Finding all combination of portions of a number. |
Share Thread |
| Aug7-12, 10:29 PM | #1 |
|
|
Finding all combination of portions of a number.
Is there a way to define in how many ways can I form a number by it's portions?
e.g: the number 5 has 6 ways: 1+1+1+1+1I was trying to program that and would appreciate any help! Thanks. |
| Aug7-12, 11:21 PM | #2 |
|
|
|
| Aug7-12, 11:29 PM | #3 |
|
|
This not-commented code is really hard to understand, could you explain the solution please?
Thanks |
| Aug8-12, 01:08 AM | #4 |
|
Recognitions:
|
Finding all combination of portions of a number.
Also search web for 'partition numbers'
|
| Aug8-12, 05:17 PM | #5 |
|
|
The basic idea is, think of your number as 1+1+1+... and think of all the different ways to put brackets in this expression.
|
| New Reply |
| Tags |
| number, portions, programming |
Similar discussions for: Finding all combination of portions of a number.
|
||||
| Thread | Forum | Replies | ||
| Creating a number using a combination of two numbers | General Math | 5 | ||
| Relating portions of Poiseille's Law to concepts of pressure/radius | Introductory Physics Homework | 4 | ||
| finding a combination discrete and continuous cdf to make a new cdf | Calculus & Beyond Homework | 1 | ||
| Finding non-trivial linear combination | Calculus & Beyond Homework | 5 | ||
| Finding the total resistance-combination circuit | Introductory Physics Homework | 0 | ||