# Missing assumptions in selection algorithm proof of correctness by contradiction? [duplicate]

Yes, this is homework. I need help knowing how to begin this problem:

Let A be an algorithm that finds the kth largest of n elements by a sequence of comparisons. Prove by contradiction that A collects enough information to determine which elements are greater than the kth largest and which elements are less than it. In other words, you can partition the set around the kth largest element without making more comparisons.

I'm not looking for an answer. I am confused about how to even begin this question, it's the last one on my homework and tried searching quite a bit for similar situations. My fellow students seem confused as well. I also asked the professor but he lived up to his reputation for being quite cryptic. I actually found someone else's answer online searching, which I will provide here:

Call the majority element x and say it appears i > b n/2 c times. Each time x is encountered, it is either pushed on the stack or an element (different from x) is popped off the stack. There are n − i < I elements different from x. Assume x is not on the stack at the end of the procedure. Then, each of the I elements of x must have either popped another element off the stack, or been popped off by another element. However, there are only n − i < I other elements, so this is a contradiction. Therefore, x must be on the stack at the end of the procedure

I don't remotely even know if that's correct, and I don't understand it.

How do I even approach this question? It seems like the initial question needs more information about the algorithm for me to be able to answer it. Or maybe there is an underlying implication to "sequence of comparisons" that I'm missing. I don't understand how to begin without a specific algorithm provided. None of his example problems he has done in class and none I've found in the book are like this. All the other problems have specific algorithms. I feel like maybe I am missing an important concept?