# How many seats around the table?

This puzzle is very much inspired by a recent, excellent, one, posted here. If anyone, in particular the author of the other puzzle, prefers this one to disappear, I will immediately do so and I apologize already beforehand for plagiarism (as I am rather new here on this nice exchange but perhaps not yet fully aquainted with its etiquette).

I refer to excellent @WhatsUp 'The "Loop of rope" dilemma' puzzle #112422. That puzzle is about continuous values, this similar one is about discrete values. And attempts to add a twist.

Every evening, Alice and Bob serve their employer's guests. Those guests are seated at a round table. All seats are always occupied. In order to each time work slightly different, and, doing so, to break out of the daily routine, Bob came up with following work-plan: every day Alice may choose seat A of a guest which she would like to serve that evening, and, Bob chooses two different seats B and B'. They choose independent of one another, without knowing each other's choice. All choices have equal probability. Bob's seats B and B' could be any (but different) and Alice's favorite guest could occupy any seat A (potentially same as B or B'),

Bob's work-plan further states: either starting from seat B to seat B' (not including B'), or, in same rotation sense, starting from seat B' to seat B (not including B), Alice serves those guests to whom her choice seat A belongs, and, Bob serves the other guests. The number of guests that are being served by Alice or Bob, and the location of their seats, can vary every day, and, therefore, one working day is not always like another one, ... sometimes more, sometimes less work, and, ... sometimes more, sometimes less time to spend time on the (favorite) guest(s).

Some questions are: on average, do Alice and Bob serve the same number of guests?, or, does one serve, either on average more, or on average less guests than the other, and, if so, exactly how much more or less?

Bob had explained to Alice: B and B' are random seats whose location cuts, on average, the number of guests in half. Your (i.e. Alice's) independently chosen seat A belongs to one of both parts determined by B and B', and, on average, we both serve half of the number of guests.

But Alice, who is sensitive to work and injustice, got, after some time, the impression to have to work harder than Bob.

Alice and Bob are both paid 240 euro per working day. Their employer agreed with the variations of the work-plan and assumes that, on average, both serve an equal number of guests. But Alice calculates that, if their employer wants to pay same total 480, she (Alice), should be paid 310 euro per working day, and, he (Bob), should be paid 170 euro per working day.

More questions are: does Alice calculate and reason correctly? And, if so, how many seats are there around the table?

• It is perfectly fine to post puzzles which are inspired by previous puzzles from here, as long as something meaningful distinguishes the two, so that they're not duplicates. (Changing names etc. = non distinguishing, tweaking scenario so a previous answer doesn't apply any more = distinguishing). If you're interested, we have an official attribution FAQ, which you've more than covered by giving credit here. Nov 29, 2021 at 1:06
• What happens when B and B' are the same seat? That seat isn't in the first set (because B' is excluded), and it isn't in the second set (because B is excluded), so is that person served at all? And what if A is also that seat?
– fljx
Nov 29, 2021 at 11:32
• It might be simpler to let Bob draw lines between chairs to divide them into two sets.
– fljx
Nov 29, 2021 at 11:34
• @fljx thanks for comment, I will adjust question so that B and B' differ (if they are same there is no seat being served and such makes 'average' not well defined). The drawing of lines is equivalent then. Nov 29, 2021 at 13:02
• This question reminds me of this problem: puzzling.stackexchange.com/questions/46640/… Dec 19, 2021 at 4:06

Bob is

tricking Alice and working less than her on average.

Let's number the seats $$0$$, ... , $$n-1$$ so that B occupies seat $$0$$. If B' occupies sit $$k$$, then the guests are shared in two groups: $$G1$$ with $$k$$ people and $$G2$$ with $$n-k$$ people.

A been chosen uniformly at random and independantly from B and B',

Alice can be affected to $$G1$$ with probability $$k/n$$ (the proba that A belongs to $$G1$$) and to $$G2$$ with probability $$(n-k)/n$$ : in other words, she has a higher probability to serve the bigger group.

For a given $$k$$, she will serve on average:

$$\frac{k}{n}.k+\frac{n-k}{n}.(n-k)=\frac{k^2+(n-k)^2}{n}$$ guests.

Averaging for all $$k$$'s, she will serve:

$$\frac{1}{n-1}\sum_{k=1}^{n-1}\frac{k^2+(n-k)^2}{n}=\frac{2n-1}{3}$$ guests.
Which is more than $$n/2$$ once $$n>2$$.

If $$n$$ is very large, Alice will actually do

two thirds of the work on average, and Bob only one third.

This is coherent with the answer to the "continuous" problem.

The part with the salary leads to

$$\frac{310}{480}=\frac{(2n-1)/3}{n}$$, hence $$n=16$$.

Alice's maths is correct and there are

$$16$$ guests.

• Well done! The salary calculation was wrong indeed, I will correct it... Nov 29, 2021 at 14:12
• one way to look at this: imagine B and B' are next to each other, with no-one in between. In a classic I-cut-you-choose scenario, Bob would never do this, because he'd be stuck serving all the others. But here A must of course be in the larger stretch, so Alice has to do almost everyone and B the bare minimum. B is highly motivated to choose B and B' close together if he is choosing actual chairs, but even if he isn't, the more unequal the two sets, the more likely A has to server the larger one. Nov 30, 2021 at 19:10
• @KateGregory : thanks for your one way to look at this. Point is that Bob or Alice have no choice to do or want to do anything (and that's the sad an weak part of stories: do they match reality?). But sure we all agree larger part attracts A. Now all there is to solve is: find and give the formula and/or proof, as Evargalo did. Respect. Dec 4, 2021 at 3:36
• @Evargalo : final comment ... I really liked your saying "Bob is [...] Alice", because, that's what the puzzle wanted to make one empathize ... Dec 4, 2021 at 3:50

This isn't an official answer to the question, but rather its intent is to compliment @Evargalo's excellent existing answer.

It somewhat strikes me that:

Ratio $$r=a/b$$ between average number $$a=(2n-1)/3$$ of seats served by Alice, and, average number $$b=(n+1)/3$$ of seats served by Bob, is as simple as $$r=(2n-1)/(n+1)$$ For example: $$r=31/17$$ for $$n=16$$ (which lead to particular salary calculation). Could it be that some alternative, visual (maybe geometry or graph based), proof exists for this ratio formula and/or both average formulas? Also note that $$a+b$$ and $$a-b$$ or $$|a-b]$$ are simple formulas (in terms of $$n$$).

Here a somewhat different proof (also using standard formulas)

To calculate average distance between $$A$$ and $$B'$$ where, for convenience, we choose $$B=0$$ there are $$n(n-1)$$ pairs $$(A,B')$$ with: $$0<=A<=n-1$$ and $$1<=B'<=n-1$$ consider $$n*(n-1)$$ matrix:

$$\begin{bmatrix}|0-(n-1)| & .. & |(n-1)-(n-1)|\\: & |A-B'| & :\\|0-1| & ... & |(n-1)-1|\end{bmatrix}$$

The total of distances between $$A$$ and $$B'$$ is total of distances between all pairs in a square $$n*n$$ matrix:

$$\begin{bmatrix}|0-(n-1)| & .. & |(n-1)-(n-1)|\\: & |A-B'| & :\\|0-0| & ... & |(n-1)-0|\end{bmatrix}$$

minus the total of distances between all pairs from the excluded $$n*1$$ bottom row:

$$\begin{bmatrix}|0-0| & .. & |A-B'| & .. & |(n-1)-0|\end{bmatrix}$$

giving (using standard formulas) : $$(n-1)n(n+1)/3$$ $$-$$ $$(n-1)n/2$$ where the total amount of pairs $$(n-1)n$$ cancels and the average of the distance between $$A$$ and $$B'$$ therefore is $$(n+1)/3 - 1/2$$ = $$(2n-1)/6$$

Equally, average distance between $$A$$ and $$B$$ where, for convenience, we choose $$B'=0$$ is also $$(2n-1)/6$$ and so average distance between $$B$$ and $$B'$$ via $$A$$ is double and exactly same $$(2n-1)/3$$ as in @Evargalo's answer. This proof and reasoning is perhaps still more complex than actually required for the puzzle.