Finding Maximum in a Set of Numbers If I have a set of $n$ numbers: $(a_1,..., a_n)$, then how can I find the two maximum numbers in the set? Suppose that all the numbers are positive integers.

Completely edited (Misread your question, and you changed your question). The minimum of two numbers is given by:
$\min(a,b) = \large \frac{|a+b|- |a-b|}2$
Of three numbers thus:
$$\min(a,b,c) = \min(\min(a,b),c) = \frac{\left| \frac{|a+b|- |a-b|}2 + c \right| - \left| \frac{|a+b|- |a-b|}2 - c\right| }2 $$
Since you want to find the two maximum numbers out of $3$, just find the minimum and exclude it. 
For $n$ numbers, define an algorithm to find the minimum and keep removing each one until two numbers remain (you probably know that).
