If the only options left are ones where a person can't make it, their
ballot shouldn't influence the result any more. Similarily when there
are only options which are questionable that ballot should have a lower
weight.
We do this by attaching a weight to each option, where real
choices get a weight of 1 and pseudo-choices (like "none of the
above") get a lower weight (theoretically that should be 0, but let's
keep that configurable). When constructing the ballots each vote gets a
monotonically decreasing weight. As options are eliminated in each
round, the weight of the ballot is recalculated as the maximum weight of
all remaining options. So this starts at 1 for all ballots, but drops as
more favourable options are eliminated, possibly down to 0 where a
ballot ceases to have an effect.
Since we expect very few votes there is a high probability that several
candidates will be not be ranked first by anybody. Which one is
eliminated is essentially random, so it could happen that a candidate
which is ranked second by everybody (and therefore would probably be the
winner) is eliminated in the first round and never considered again.
To prevent this, we sort by all ranks in order. So among those with the
same number of first ranks the one with the most second ranks wins, if
those are also the same we use the third rank etc. This should ensure
that each round really eliminates the worst candidate (ties are still
possible, but only if the votes at all ranks are the same - in which
case no objective distinction is left and random choice is acceptable).