3

Let's say we are given $a$, $b$, $d$ with $1 \leq a, b, d \leq 1000$ and inequalities $x \geq a$, $y \geq b$, and $a+b < x + y \leq a+b+d$.

I need to combine all this and the following into one inequality. Is there a common factor that we can multiply to one or the other or something? Can we exploit the fact that ranges are known? How do we proceed in such a case? Any help is appreciated.

the_fox
  • 5,805
Fluvid
  • 201
  • Instead of writing $1 \leq a \leq 1000$, $1 \leq b \leq 1000$ and $1 \leq d \leq 1000$, I instead wrote $1 \leq a, b, d \leq 1000$ which is equivalent. – Michael Albanese Feb 06 '13 at 08:12

2 Answers2

2

I think we can do this with two helper functions:

Let $f(x)=1+\lfloor \frac{x}{x^2+1} \rfloor =\left\{\begin{matrix} 1&\text{if }x\ge 0\\ 0& \text{if }x<0 \end{matrix}\right.$

And let $g(x)=-\lfloor\frac{-x}{x^2+1}\rfloor=\left\{\begin{matrix} 1&\text{if }x > 0\\ 0& \text{if }x\le0 \end{matrix}\right.$

Then inequalities of the form $p\ge q$ are true if and only if $f(p-q)=1$; and inequalities of the form $p>q$ are true if and only if $g(p-q)=1$. For several inequalities to be simultaneously true, we need many factors of these types to multiply to $1$.

In your situation, we require $$f(a-1)f(b-1)f(d-1)f(1000-a)f(1000-b)f(1000-d)f(x-a)f(y-b)f(a+b+d-x-y)g(x+y-a-b)=1$$

paw88789
  • 40,402
0

The range defined for one set of value(s) is independent from the range of some other. For instance, $a+b<x+y$ can hold regardless of whether $x\ge a$ or $y \ge b$ is true. So, there is no way to combine them all into one expression using merely relational operators.

ashley
  • 1,023