MHB Not an exercise, more of a question.

  • Thread starter Thread starter IHateFactorial
  • Start date Start date
  • Tags Tags
    Exercise
AI Thread Summary
To determine the unique ways to sum to a number n using u addends, where order matters and all addends are positive integers, a combinatorial approach is necessary. The problem can be framed as finding the number of integer solutions to the equation x1 + x2 + ... + xu = n, with the constraint that each xi > 0. The generating functions or the stars and bars theorem can be applied to simplify the calculations. For the example of n=6 with u=4, the formula involves calculating permutations of the partitions of n into u parts. This method avoids the tediousness of manually listing permutations and ensures all unique combinations are counted.
IHateFactorial
Messages
15
Reaction score
0
If I have a number n and I want to know all the unique ways in which I can use u addends to get that number... How do I do it?

For example: If the number is 6 and I want to see how many unique ways I can add up to it (order matters: $$1 + 1 + 2 + 2\ne 2 + 2 + 1 + 1$$) by using 4 addends, what's the formula? (This is, in fact, considering that all the addends are greater than 0 and whole numbers.)

I can do it by looking for each unique way to add up to n using u addends and then factoring in the number of ways each can be permutated, including repeated numbers, but that seems too tedious.
 
Physics news on Phys.org

Similar threads

Replies
15
Views
2K
Replies
7
Views
2K
Replies
2
Views
2K
Replies
3
Views
2K
Replies
4
Views
2K
Replies
3
Views
1K
Replies
3
Views
1K
Back
Top