## The Majority Name

In a long list of names, one of the names appears more than half of the time. You will be read the names one at a time, without knowing how many they are, and without being able to write them down. If you have a very weak memory, how can you figure out which is the majority name?

Remember the first name and then keep track of whether it has been repeated more than half of the time. To do that, simply add 1 if you hear the name or subtract one when you hear another name. If the list finishes and your counter is positive, then the first name is the majority. If your counter drops to 0, simply restart the procedure with the next name you hear.

This algorithm, invented by R. Boyer and J. Moore, works, because if the counter ends up at 0, then each of the names up to that moment has been read at most half of the time. Therefore, the majority name appears more than half of the time in the remainder of the list.

## One to One Hundred

99 unique numbers between 1 and 100 are listed one by one, with 5 seconds pause between every two consecutive numbers. If you are not allowed to take any notes, what is the best way to figure out which is the missing number?

Keep up adding the given numbers and remember only the last two digits of the sum. In the end, if the result is less than 50, subtract it from 50. If the result is larger than 50, subtract it from 150. This method works because the sum of all numbers from 1 to 100 is 5050, so if you know the sum of all the listed numbers, you will know the missing number as well.

## Progression Banned

I give you a pen and paper and ask you to write the numbers from 1 to 100 in succession so that there are no three numbers such that twice the second one is equal to the sum of the first and the third one. The three numbers do not need to be successive in the sequence.

You have 5 minutes, what do you do?

Remark: The sequence 3, 1, 2, 5, 4 works, but the sequence 1, 4, 2, 5, 3 does not because of the numbers 1, 2, and 3.