Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I want to find $t_{critical}(u)$, the least $t\in\mathbb{R}^+$ for a given $u\in\left(0\ldots\dfrac{1}{s}\right]$ satisfying $$f(t)=\lfloor rt\rfloor x+\lfloor s (t-u)\rfloor y + y > h$$ for constant $h, r, s, x, y \in \mathbb{R}^+$.

It's plain to see that $f(0)=0$ and $f$ is a monotonically increasing step function.

I was able to determine that $t_{critical}(u)$ must be of the form $$\frac{j}{r}, j \in \mathbb{Z}^+$$ or $$\frac{k+u}{s}, k \in \mathbb{Z}^+$$ I suspect the formulas for $j$ and $k$ will involve ceiling or floor functions in order to end up as integers.

Is there a way to come up with a general piecewise expression for $t_{critical}(u)$?

share|cite|improve this question
FYI - not a homework question; it is about optimizing damage-per-second in an online game. – Snowbody Mar 31 '14 at 21:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.