0
$\begingroup$

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

Thanks!

  • 1
    What do you mean by compare? What are you trying to say about the variables?2017-01-06
  • 1
    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.2017-01-06
  • 1
    See [here](http://stackoverflow.com/questions/1088216/whats-wrong-with-using-to-compare-floats-in-java) for instance (particularly [this](http://stackoverflow.com/a/1088234) answer). You do have to supply the $\epsilon$ yourself.2017-01-06
  • 0
    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.2017-01-06
  • 0
    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]}$$2017-01-07
  • 0
    I also try to enter constraint as, $$|V_{i} - V_{j}|-\epsilon \leq 0$$ for sufficiently small $$\epsilon > 0$$ but the issue arises to precisely define how small $\epsilon$ should be.2017-01-07

0 Answers 0