1
$\begingroup$

I am not entirely familiar with the equation ninja'ing involving the floor operators. Here is my problem. I need to solve for $x$. Everything is an integer, including $x$:

$$ a - 1 = \lfloor {\frac{x - b}{b - c} \rfloor} $$

The wiki has a nice page on the floor operator, but I am new at equations involving floor manipulations, so I am not really sure how to go about isolating $x$ at this point, thereby solving for it. Thanks.

EDIT: This is not a homework problem. I am writing software that needs to solve this for a seismological problem.

$\endgroup$
1
$\begingroup$

Hint: $a - 1 = \lfloor {\frac{x - b}{b - c} \rfloor}$ if and only if $a - 1\le \frac{x - b}{b - c}<a $. So you have to solve this system of inequalities.

$\endgroup$
2
  • $\begingroup$ Doesn't this mean there are possibly more than one solution to the problem? $\endgroup$ – Spacey Jan 2 '14 at 16:14
  • $\begingroup$ @Spacey Of course, this is possible, there are clearly exactly $|b-c|$ solutions. $\endgroup$ – Phira Jan 2 '14 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.