1

You have n people from Group 1, n' people from Group 2, and n'' people from Group 3. You want to place them in a line so that no 2 people from the same group are adjacent. Consider that people from the same group are not distinct. How many ways are there to do this? Can you generalize to k groups?

I was thinking of using stars and bars and I can see how you could do that with 2 groups, but I don't know how to add in the third group after. I also considered doing this with complimentary counting, but I don't know what would be an overcount/undercount. Would appreciate any help.

Mike Earnest
  • 75,930
agous
  • 61
  • How would you use Stars and Bars with two groups? – lulu Jul 22 '23 at 17:40
  • Well the bars would be the people from 1 group, and in the slots between I would force 1 person from the other group to go in each slot. Then there would be 2 places for the last star to go, in the front or in the back, so there would be 2 ways. – agous Jul 22 '23 at 17:46
  • So...nothing to do with Stars and Bars, right? You pick someone to start the list and the rest are then forced. – lulu Jul 22 '23 at 17:50
  • I suggest: solve the problem for small $n$, look for patterns. – lulu Jul 22 '23 at 17:52
  • here is a special case. – lulu Jul 22 '23 at 17:56
  • Sorry, I mistyped the question when copying it down. There's a different number of people in each group so my answer would be wrong. Actually it would be n+n'-1 choose (n'-(n-1)) right? – agous Jul 22 '23 at 17:57
  • 2
    Well, with different numbers there might be $0$ solutions. If, say, $n_1=n_2=1$ and $n_3=100$, there are no solutions at all. – lulu Jul 22 '23 at 18:03
  • Well what if we assume $n + n' \geq n''$ – agous Jul 22 '23 at 18:12
  • What about the relationship between $n$ and $n'$ ? – true blue anil Jul 22 '23 at 18:16
  • Well we can say $a+b \geq c$ and a, b, c can be any of n, n', n'' – agous Jul 22 '23 at 18:24
  • You can as well use the symbols $a, b, c$ and say $a\leq b\leq c$, with $a+b>c$. Can you work this out ? – true blue anil Jul 22 '23 at 18:31
  • What do you mean? – agous Jul 22 '23 at 18:34
  • I suggest studying the special case I linked to, $(n_1,n_2,n_3)=(3,3,3)$. That's already a fair bit of work. – lulu Jul 22 '23 at 18:35
  • Instead of $n, n',n"$, I am suggesting simplified notatiom: $a$ of one group, $b$ of another and $c$ of the third with simple constraints given so that you are absolutely certain that you can find a solution – true blue anil Jul 22 '23 at 18:39
  • I am reading that post now too and I think the answer about Laguerre series could be applicable to my question but I'm not advanced enough to understand it. I do understand how you can use PIE when you have numbers for each group though – agous Jul 22 '23 at 18:39

1 Answers1

-2

Given a total of ( n + n' + n'' ) people represented by the empty spaces:

{ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ }

For the first empty place, you have 3 choices (either from Group 1, Group 2, or Group 3). And for the next empty place, you only have 2 choices. For the subsequent empty places, you again have only 2 choices (different from the last one). This way, you have a total of 3 * 2^{n+n'+n''-1} ways to arrange this.

For any number of ( k ) groups, you can do the same:

k * (k-1)^{(total number of people) - 1}

skiez
  • 1