2

Context: $3$ pairs of best friends have made reservations to dine together at a long table.In how many different ways can these $6$ people be seated in a row, such that at least $1$ pair of best friends is seated side by side?

My approach:

  1. $6!$ - (No two bestfriend sit together)

    We first pick one person ($X$) out of the 6: $\binom{6}{1}$

    Our second pick ($Y$) is 1 out of 4 since the respective bestfriend cannot be included: $\binom{4}{1}$

    These two people can be swapped so: $2!$

    The person on the left of $X$ can only be 1 out 3 now: $\binom{3}{1}$

    The person on the right of $Y$ can only be 1 out 3 now: $\binom{3}{1}$

    Therefore $\binom{6}{1} \times \binom{4}{1} \times \binom{3}{1} \times \binom{3}{1} \times 2!$ = 432

So, answer = 720 - 432 = 288 ways where there is at least one pair of bestfriends sitting side by side.

I am not sure if this is right since it is off my intuition. I feel this is a tedious way to do this, and there must be some other method to do this efficiently. I would appreciate if you could crosscheck my understanding or identify any flaw in my reasoning.

Gtexx
  • 131
  • looks good to me and probably this is the easiest way to solve it – Sam Hoffman May 16 '24 at 08:57
  • 1
    It is not correct: if you look at https://math.stackexchange.com/questions/465318/showing-probability-no-husband-next-to-wife-converges-to-e-1 and the questions linked to it, inclusion-exclusion gives $(2n)!-\sum_{i=0}^n (-2)^i {n \choose i}(2n-i)!$ which here with $n=3$ would give $240$ – Henry May 16 '24 at 09:44
  • 1
    @Henry That sum from your link is $240$, which is the number of ways of not having any neighbouring pairs, so the answer to this question should be $6!-240=480$. – Jaap Scherphuis May 16 '24 at 10:14
  • @JaapScherphuis yep, you are right. – Gtexx May 16 '24 at 13:48

3 Answers3

1

Your answer is not correct.

One way of getting a correct answer is to apply inclusion-exclusion, gluing together permutable pairs, and get

At least $2$ friends together $ 2^1\binom31 5! -2^2\binom32 4!+2^3\binom33 3! = 480$


I will try and see if a shortcut method is possible in a while

PS:

I tried to find a faster method (without using heavy artillery like Laguerre polynomials or Smirnov words), but it seems good old PIE is best here.

PPS

I have found a simple way

Consider patterns of the first three and last three in the row.

For no friends together, if the first $3$ are of the pattern $ABA$, there is only one choice, $CBC$ for the last $3$

else if the first $3$ are of the pattern $ABC$ there are $2\cdot2 = 4$ choices for the last $3$

Since there are $6$ combinations possible for each of the first $3$,

ways with no friends together $= 6\cdot (1+4) \cdot 2^3 = 240$

and ways with at least two friends together $=720-240 = 480$

  • Thanks man, yeah I don't want to draw the sword to kill a fly. I really appreciate your time and efforts. – Gtexx May 16 '24 at 13:48
  • I think your PPS is off by a factor of 2, since you are counting the number of ways without pairs together, which should be 240. The problem is the "companions" factor I think. It looks like you are counting everything twice, e.g. acabcb could have b as the companion and come from the third row, or c as the companion and come from the first row. – Especially Lime May 16 '24 at 14:11
  • @EspeciallyLime: Thanks, the count was exactly double, but I wasn't able to prove why. So I have changed the PPS using a much simpler method. – true blue anil May 16 '24 at 17:02
1

Your solution is not correct. Here's how to complete it.

We first pick someone (X) to sit in seat 3 - there are $6$ choices. We now have $4$ choices for the person (Y) in seat 4. (There is no reason to multiply by $2$, since you've already counted these possibilities both ways round.)

Now it's true that there are only $3$ possibilities for the person to the left of X, and $3$ possibilities for the person to the right of Y, but this does not give $3\times 3$ choices for these two seats, since the choices are not independent.

So from here, there are really three possibilities.

  • Y's best friend sits next to X, and X's best friend sits next to Y. Now the two remaining people can sit in either order, so there are $2$ possibilities here.
  • exactly one of the above happens. There are $2$ choices for which of X and Y sits next to the other's best friend. There are then $2$ choices for who the other sits next to (either of the third pair). Now there's only one choice for the two remaining people that avoids the third pair sitting together. So there are $2\times 2=4$ possibilities here.
  • neither of the above happens. Then the third pair sit in seats 2 and 5 in some order, and X and Y's best friends in seats 1 and 6 in some order. So there are $2\times 2=4$ possibilities.

Overall, then, we have $6\times 4\times (2+4+4)=240$ ways where no two best friends sit together, giving $6!-240=480$.

0

Another way to count arrangements where at least one pair of best friends sits together is to condition on where you find the first adjacent pair of best friends as you move left to right along the row. This gives us $5$ mutually exclusive cases, each of which is fairly simple to count:

Case 1: First pair of adjacent best friends found are in seats $1$ and $2$ in the row. There are $6\cdot 1\cdot 4!=144$ ways to do this.

Case 2: First pair of adjacent best friends found are in seats $2$ and $3$. There are $6\cdot 4\cdot 1\cdot 3!=144$ ways to do this.

Case 3: First pair of adjacent best friends found are in seats $3$ and $4$. There are $6\cdot 4\cdot 2\cdot 1\cdot 2!=96$ ways to do this.

Case 4: First pair of adjacent best friends found are in seats $4$ and $5$. There are $6\cdot 4\cdot 1\cdot 2\cdot 1\cdot 1=48$ ways to do this.

Case 5: First pair of adjacent best friends found are in seats $5$ and $6$. There are $6\cdot 4\cdot 1\cdot 1\cdot 2\cdot 1=48$ ways to do this.

Since the $5$ cases are mutually exclusive, we can just add up the number of ways to get each case: $144+144+96+48+48=480$ ways to have at least one pair of besties together.

paw88789
  • 41,907