There is an unsorted list of $n$ items $x_1, \ldots, x_n$. Until you can sort the list, you are given one of the ${n \choose 2}$ possible binary comparisons uniformly at random (with replacement).
On average, how many of these random comparisons will you need to be able to sort the list?
Some follow-up questions:
- What does the distribution for the number of comparisons needed look like?
- What is the answer if you use $k$-ary comparisons instead of binary ones.
- What is the answer if the comparisons are made without replacement (i.e. you won't get the same comparison twice)?
- Given a set of comparisons, how can one check if the list is sort-able? I'm almost certain the answer is to construct a DAG and topological sort, but I just want to confirm.
An exact-ish answer would be nice, but a big $O$ answer is fine too, I suppose.