It's very doubtful that you have helped him at all. The paper essentially provided this same explanation, but he didn't grasp it because he lacks the fundamental understanding of the first lesson in probability to do so. The worst outcome is actually that he understands the explanation well enough to be satisfied with it, because then he will think that he actually learned something about HOW to solve the problem and he hasn't. The fact that he is unable to recognize that the problems of the tallest person in a group of people in two sets of seats in a stadium, or the solitary green M&M in two jars of M&Ms, or the sole black marble in two bags of marbles is the exact same as the largest number in a set of numbers split randomly into two halves demonstrates this. But now, thinking that he DOES understand the problem because someone spoon fed the solution to him, he can go on his way only to be exactly back where he started on the very next problem he is given.OK lets settle this. You have a lot of numbers in random order. You divide them in half. There are two numbers - the highest and the second highest you are interested in. There are four equally likely possibilities:
1) both numbers are in the first half
2) both numbers are in the second half
3) the high number is in the first and the second highest is in the second half
4) the high number is in the second half and the second highest is in the first half
Since the sum of probabilities is 1 (100%) and each outcome has equal probability, each outcome has a probability of 25%. The specific outcome of interest is scenario 4) which has a probability of 25%. Hope that makes it plain.
What he needs to do is focus on gaining the ability to understand and work with the fundamental concepts of whatever the subject his, but he has no desire to put in the effort to do that -- he just wants someone to show him the solution to the problem he has right this moment and doesn't want to actually learn anything about how to solve it.
While sorting algorithms are certainly included, the paper is far more general than that. I'm guessing the course (this CS264 mentioned in the title) is probably an Analysis of Algorithms course or something similar. Based on the description in the first part of it, it is one of a series of papers/lectures on process modeling and analysis intended to present a number of different data models, explore what kinds of situations those data models are and are not applicable to, and be able to analyze different expected performance metrics based on those models. This particular set of lectures appears to be focusing on ways of performing an average case analysis of different algorithms, which is often a lot more challenging than doing a worst-case analysis.I'm not clear what the paper is about. Probably sorting algorithms. Some sorting methods assume the numbers to be sorted are truly random, and work pretty well if they are. But if they are in a specific sequence (the adversity, or worst case situation) the sort takes a lot longer. A bubble sort is probably the worst sort algorithm, but a shell sort is a modified bubble sort and normally runs much quicker. But if the input is ordered in a particular way, the shell sort takes as long as a bubble sort.
Bubble sort and shell sort don't need a lot of work space because they sort by swapping elements. If there is plenty of space other algorithms are faster and less easily disrupted by specific ordering of elements (merge sort for instance).