Formulate A Minimizing Function that Prefers A Minimal Variable Over Another I have a problem, which has $n$ variables. Let's call these variables as $a_1$, $a_2$, $a_3$ ... $a_n$. Each of these variables have their own range (i.e, $a_{i\min} \leq a_i \leq a_{i\max}$ for all $i$).  And most importantly, each $a_n$ is ranked in terms of importance. Without a loss of generality one can assume that that $a_1$ is more important than $a_2$, which in turn is more important than $a_3$, and so on. This means that as long as the constraint is satisfied, it is better to have a smaller $a_1$ compare to have a smaller $a_2$, and a smaller $a_3$ is better compare to a smaller $a_4$
These variables are required to fulfill one ( yes, just one!!) constraint function
$$F_{\min} \leq f(a_1,a_2,a_3, .... a_n) \leq F_{\max}$$
The question now is, how to construct a minimizing function that satisfy the above condition? If I have two variables ($a_1$ and $a_2$), and both of them are between or equal to 0 and 9, then I can easily write the minimizing function as
$$L=10a_1 + a_2$$
given that $a_1$ is more important than $a_2$. 
But for complicated case, I am a bit confused. 
Edit: Maybe I should clarify further. My point is, for the above case, if $a_1=3, a_2=4$ and $a_1=4, a_2=3$ both satisfy the constraint equation, $a_1=3, a_2=4$ should be selected. So how to construct $L$ in this case to reflect the situation?
Edit 2 : Referring to the answer by Rahul, it seems that it is not possible to formulate such a minimizing function. Is there other methods of attack I can use?
Edit 3: alext87 answer is a good start, it contains general guidelines on how to proceed. But I want a hard, quantitative rule that tells me how to select for $lambda_i$ for all $i$. 

The kind of ordering you specify is known to economists as 'lexicographic preferences'. There is no objective function which can represent these preferences. Here is an outline of the proof for two variables:
Assume on the contrary that there is such a function $f(x,y)$. It must be the case for any $x$ that
$f(x,0) < f(x,1),$
so we can find a rational number, say $q(x)$ such that
$f(x,0) < q(x) < f(x,1) $
Now if $x < y$, then
$q(x) < f(x,1) < f(y,0) < q(y)$
So, $q(\cdot)$ is a one-to-one mapping from the set of real numbers into the set of rational numbers which is impossible since the set of real numbers is uncountable while the set of rational numbers is countable.
