Sorting a set in least number of steps

66 Views Asked by At

Question: Given a totally ordered set $S = \{ a_1, a_2, a_3, \cdots a_{32} \}$. Assume that we don't know the order but can determine the order between two elements by a query. Show that we can determine the relations between all the $32$ elements it completely in $15$ 'steps'. Where a 'step' is defined below:

One step involves any number of queries of the form is $a_i > a_j$. The only condition is that in a particular step each $a_i may occur in at most one such.

Progress so far: I have not been able to make any significant progress I think. I have tried recurrences, matchings and so on. But I think the main problem is, I have not been able to exploit the transitivity of orders to minimize my steps needed.