1

You have g groups and o object. Determine a formula to calculate all possibilities. For example, if we set g = 3 and o = 3 we should get 10.

3 0 0

0 3 0

0 0 3

2 1 0

2 0 1

1 2 0

1 0 2

1 1 1

0 1 2

0 2 1

I came to this answer by brute force counting all the possibilities, but do not understand how to generate a general formula if there even is one. A group of 0 doesn't make sense, but I am including them to see how they would be accounted for.

  • 2
    Based on your brute force list, you seem to be reaching for $\binom{p+t-1}{t-1}$. For your example $\binom{3+3-1}{3-1}=\binom{5}{2}=10$. That said, this is a bizarre interpretation of your problem's wording as people are almost always considered to be distinct and teams often require at least one person on them to be viable. – JMoravitz Mar 23 '22 at 23:07
  • 1
    For your interpretation, see stars and bars. – peterwhy Mar 23 '22 at 23:09
  • For the problem as I would have interpreted it, people distinct, teams labeled, teams must have at least one member each, the answer would be $t!{p\brace t}$ where the curly brackets are in reference to Stirling Numbers of the Second Kind – JMoravitz Mar 23 '22 at 23:10
  • The specific scenario is difficult to describe but the possibility of there being 0 people in a team is possible for my problem – Cousins Nerdnee Mar 24 '22 at 00:27
  • Then your question is equivalent to solving $x_1+x_2+x_3=3$ in non-negative integers, which, as @peterwhy notes, is readily solved using stars and bars. – Robert Shore Mar 24 '22 at 00:30
  • I reworded the question to better convey it for future viewers, but it seems like the star and bars thing answer it. Thank you. – Cousins Nerdnee Mar 24 '22 at 00:41

0 Answers0