How to solve these equations that involve the ceiling function

3.9k Views Asked by At

I am not sure how to solve these equations because the involve the ceiling function. I am trying to solve for $M$ and $L$ in terms of only $C$. Is there a way? If not, is there an algorithm that could calculate $M$ and $L$ values based on a given $C$ value? Here are the equations:

$$M = C + L - 1$$

$$L = \lceil\ 0.06\ M\ \rceil$$

2

There are 2 best solutions below

2
On BEST ANSWER

You can convert $L=\lceil 0.06 M \rceil$ into two inequalities,

$$0.06M\le L < 0.06M + 1\;,$$

together with the condition that $L$ is an integer. Then you can substitute $M$ from the first equation:

$$0.06(C+L-1)\le L < 0.06(C+L-1) + 1$$

and "solve" for $L$:

$$0.06(C-1)\le 0.94L < 0.06(C-1) + 1\;,$$

$$\frac{0.06(C-1)}{0.94}\le L < \frac{0.06(C-1) + 1}{0.94}\;.$$

Since the difference between the two bounds is $1/0.94\approx 1.06$, this can have either one or two integer solutions for $L$, depending on $C$, which you can substitute into the first equation to get the corresponding values for $M$.

0
On

You can rewrite your problem as the intersection of two objects. Let $x=M$ and $y=L$ then the first equation is the parametric line $y=x+1-c$ and the second equation $y = \lceil 0.06x \rceil$ can be thought as a collection of horizontal lines (I let you figure out precisely what is that collection). Now all you want is to find the intersection of these two things (which clearly will involve your parameter $c$.