I want to compare real valued variables, $$V_{i}, V_{j}\in ℝ_{(0,1]}$$ I write a formula like, $$V_{i} - V_{j}=0$$ $$ \forall i, \forall j\in {1,2,...,J}, i \neq j$$ but someone said this formula is wrong. He said how you can compare two real numbers exactly. I also try to write as, $$(|V_{i} - V_{j}|-\epsilon)=0,$$ for sufficiently small $\epsilon$. but again the issue is that one need to define $\epsilon$ precisely which is not possible under the define problem.

Any help in defining a simple formula to compare real valued variables is appreciated


  • 1
    $\begingroup$ What do you mean by compare? What are you trying to say about the variables? $\endgroup$
    – David
    Jan 6, 2017 at 0:13
  • 1
    $\begingroup$ To expand on @David's comment, if you are speaking of pure mathematics, you just compare them: $V_i \ne V_j$ You don't need any formula; you just state what you want to say. If you are speaking of computers and you need an algorithm, well, computers cannot store real numbers; they can only store rational numbers, so your assumptions are faulty. $\endgroup$
    – Wildcard
    Jan 6, 2017 at 0:17
  • 1
    $\begingroup$ See here for instance (particularly this answer). You do have to supply the $\epsilon$ yourself. $\endgroup$
    – pjs36
    Jan 6, 2017 at 0:23
  • $\begingroup$ Also, you might say that $V_i = V_j$ if $|V_i-V_j| \leq \epsilon$ for sufficiently small $\epsilon > 0$, but you probably wouldn't require equality in that second expression. $\endgroup$
    – David
    Jan 6, 2017 at 1:42
  • $\begingroup$ Actually it was part of an optimization problem. I want to optimize a cost function of allocating channels among a set of users under the constraint that if a user get multiple channels it should get the same share on each channel. A part of the optimization problem looks like, $$Maximize f_{0}(V_{1}^{2}+...+V_{J}^{2}) \\ subject to V_{i}-V_{j}=0, \forall i, \forall j\in {1,2,...,J}, i \neq j$$ $$V_{i}, V_{j}\in ℝ_{(0,1]}$$ $\endgroup$ Jan 7, 2017 at 5:15


You must log in to answer this question.

Browse other questions tagged .