To be completely honest, I think the puzzle is badly phrased (and the edits don't really help)
Assumptions: We have a queue of n
orders. The machine chooses n
in an unbiased fashion.
"...Forgets about any orders that were skipped"
Is either redundant, or it implies that the machine chooses
That assumes we're taking a batch of
But,
"..Instead of processing each order sequentially.."
Implying that the machine will not work sequentially. So it consumes by batches of
Therefore, new assumption:
- we have
n
orders. - The machine usually goes sequentially (no batching) and now, it simply randomly chooses an order from the top-3, recursively repeating the process.
- Whenever the machine "processes" an order, it'd be removed from the queue.
We ignore the groups initially, because they make little sense even after the edits: if there are always 3 unprocessed orders, and we're the first one in the restaurant, why the first group then already has arrived - unless there are some ghosts in the restaurant who live there just to pad up to three orders in the off-chance the machine starts worshipping the trinity.
So let's say the queue is like this: 1, 2, [3], 4, 5, ....
Our order is the square bracketed one.
Because the machine chooses top-3, as a rolling window, and it "ignores orders that were skipped" therefore, if it chooses 2
then the queue is: 1, [3], 4, 5, ...
Thus, can maximize our chances by maximizing the time we spent in the top-3 window.
Because on the 1/9 chance 1
or 2
are selected, we simply become the first order:
[3], 4, 5, ...
So, as long as we start in at any position in the top-3, we always remain in the
I'm aware this is not a real "solution" per se - its literally the obvious solution, but that's with what I think is the closest interpretation of the question.
PS: was planning to write a solution for every combination of interpretation of the question, but then half-way through realized that nobody had the time to read 5 pages plus I didn't want to be that guy: