There are $n$ coins. You have a scale that, between two sets of coins, tells you which set is heavier, or if they are equal. What is the worst-case minimum number of weighings after which you can divide the coins into three sets with the property that between any two sets $A,B$, there exists a coin in $B$ that if you remove it, then $A$ weights at least as much as $B$?
This is possible using $O(n)$ weighings in the following way. Start with three empty sets. For each coin, put it into the set that is currently the lightest. After putting in each coin, use the scale twice to determine which set is now the lightest. We can check that the property is satisfied for any pair of set: If it is not satisfied for some pair $A,B$, then the last coin put in $B$ should have been put in $A$.
I suspect finding an exact bound will be difficult, so an asymptotic bound is good enough. For example, can we do better than $O(n)$ weighings?
Edit: I haven't found a solution yet, but here is another way of looking at the problem:
Suppose we have $n$ coins, numbered $1\ldots n$. The possible weights of the coins form a convex cone $\mathcal{C}=(0,\infty)^n$, which means that any positive linear combinations of points is in the space.
Let $P_n$ be the set of all ways of partitioning $\{1,\ldots,n\}$ into 3 sets. For any given assignment of weights $w\in\mathcal{C}$, some of these partitions will be the kind we are looking for (where each pile is either empty or has a single coin you can remove, etc. etc.). Let us define $$f(w) = \{p\in P_n : p \text{ partitions }w\text{ in the desired way.}\}$$ (And we know because of the $O(n)$ algorithm that $f(w)$ is always nonempty.)
Consider how $f$ labels the space of possible weighings $\mathcal{C}$. Note that $f$ behaves nicely under certain transformations:
Multiplying all the weights by a positive amount doesn't change the set of partition solutions. That is, if $\alpha >0$ is any constant and $w$ is any weight assignment, then $f(w) = f(\alpha\cdot w)$.
If two weightings $w_1, w_2$ have a solution in common, then $w_1 + w_2$ has it, too. Formally, this means that $f(w_1)\cap f(w_2) \subseteq f(w_1+w_2)$.
By symmetry, the best case scenario is when all weights are equal— for all $w$, $f(w) \subseteq f([1,1,1,\ldots,1])$.
In this setup, weighing a particular set of coins means drawing a linear boundary $$[a_1, a_2, \ldots, a_n]\cdot \vec{w} = 0$$ in $\mathcal{C}$, where each $a_i \in \{1,0,-1\}$. Depending on which way the balance tips, you are either on one side of the boundary or the other (or exactly on the boundary in the case of a tie.)
The boundary splits the space; subsequent boundaries subdivide these spaces.
A deterministic solution to this problem amounts to a choice of subdivisions of this kind such that the resulting regions each have a partition in common.
This suggests that an optimal algorithm might be found using a decision tree or branch-and-bound search procedure: given a collection of weighings from the $n$-dimensional unit sphere, find the collection of planes that most efficiently subdivides the sphere into regions that have at least one successful partition in common.
Here is a partial answer, containing the start of an idea for an algorithm to run in a logarithmic number of weighing operations.
The starting point is to consider a simpler problem: making two sets instead of three. Here, there's a straightforward algorithm to do so with a number of weighings which is logarithmic in the number of coins:
We could use a linear algorithm— that is, move the boundary one coin at a time, weighing both subdivisions after each movement. However, this takes a linear number of weighings. Instead, we will use binary search, taking a logarithmic number of weighings.
To do binary search, call the lighter region A and the heavier region B. Initialize a pointer halfway into region B. At the start of the loop, check whether B has become no heavier than A. If so, we are finished. Otherwise, move the A/B boundary to where the pointer is. Weigh the two regions with their new boundary. If B is still strictly heavier than A, move the pointer halfway into the new region B and continue the loop. Otherwise, revert the A/B boundary to where it just was, and move the pointer midway between its current position and the A/B boundary. Then continue the loop. (A picture helps.)
This algorithm only terminates when we find a single coin that makes the difference between A being strictly lighter than B, versus being no heavier than B.
Remove that decisive coin from the lineup so that it's not included in A's weight or B's weight. We need to decide whether it should belong to A or to B. If, without the decisive coin, A is strictly lighter than B, we add the decisive coin to A (making it heavier than B). Otherwise, we add it to B (making B heavier than A). This guarantees that our two regions have the desired property: if we remove the decisive coin from the heavier region, it becomes the lighter region. If we remove any coin from the lighter region, it remains the lighter region.
This is the two-pile algorithm. The trick is to adapt it, if we can, to make three piles in logarithmic time. Here is the initial attempt to do so; I am still figuring out whether it is fully possible in detail.
First, we apply the encroach subroutine to $P_1 \leftarrow P_3$.
In the three-pile version of the problem, it turns out that the decisive coin can cause any of the possible reorderings to happen: by gaining the decisive coin, the lightest pile can become the heaviest or the second-heaviest; the heaviest pile can become the lightest or the second lightest; and the middle pile can remain the middle or become the lighest or heaviest. (See note [*] for examples of each.)
Let us consider the easiest possible case. In the easiest possible case, the following happens: the decisive coin we find has the property that when it is transferred from $P_3$ to $P_1$, $P_1$ becomes the heaviest pile and $P_3$ becomes the lightest; and if the decisive coin is removed altogether (excluded from the weight calculations of both $P_1$ and $P_3$), $P_3$ is the lightest pile and $P_1$ is the heaviest pile. In this easy case, the subroutine tells us to put the decisive coin into pile $P_3$. Afterwards, we apply the encroach subroutine to $P_1\leftarrow P_2$. If the decisive coin again should be allocated to the heavier region (here, $P_2$), we are done: all three of the regions have the property that removal of a single coin makes it lighter than the other two regions.
I hope (but have not proven!) that this algorithm can be extended to handle the less-easy cases as well. However, even if this is not possible, we may still be able to borrow the idea of a "binary search" subroutine in another way. For example, a different approach entirely would be to form three arbitrary stacks of coins, then use binary search to find the minimum number of coins you can remove from the top of the heaviest stack before it is no heavier than the lightest stack. Leave the decisive coin on top (the coin that, if removed, makes the heavest pile lighter than the lightest pile). Similarly use binary search on the middle stack to make it just a single coin heavier than the lightest stack. The result will be three piles with the desired property property, though some coins may be left over. There may be an efficient way to "merge" these leftover coins into the three piles so as to preserve the desired property.
[*] Examples of reorderings. Here are concrete numerical examples that show that a single decisive coin can result in any possible reordering of the piles' relative weights.
In each case, we have three piles arranged in increasing order of weight, and a single decisive coin of a particular weight will be transferred from the heaviest pile to the lightest.
In these examples, the effect of transferring the decisive coin is that:
These are the four possibilities for a decisive coin $P_1 \leftarrow P_3$.
It also matters, but I do not consider, what the effect is of removing the decisive coin altogether.