How to calculate with $\lceil \cdot \rceil$

141 Views Asked by At

I have a problem calculating with ceils.

If I have $\frac{\lceil \frac{n}{2} \rceil}{np}$, this is not the same as $\frac{\lceil \frac{1}{2} \rceil}{p}$.

Are there some rules on how to calculate with these things in order to be able to divide?

2

There are 2 best solutions below

0
On BEST ANSWER

In this particular case, (assuming $n$ is an integer) either $n$ is even or odd, so for some integer $k$ either $$ n=2k, \qquad \frac{\lceil n/2\rceil}{np} = \frac{1}{2p}, $$ or $$ n=2k+1, \qquad \frac{\lceil n/2\rceil}{np} = \frac{k+1}{(2k+1)p}. $$

In general, for $\frac{\lceil \alpha n\rceil}{np}$, the best you can do is say that because you know that $$ x \leq \lceil x\rceil < x+1, $$ you can pick a real number $0\leq \theta<1$, so that $$ \lceil \alpha n\rceil = \alpha n+\theta, \qquad \frac{\lceil \alpha n\rceil}{np} = \frac{\alpha}{p} + \frac{\theta}{n p}, $$ where the only thing known about $\theta$ is that $0\leq \theta<1$.

0
On

Floors are generally nicer than ceilings. So, note that $\lceil x \rceil= -\lfloor -x \rfloor$.

Also note that $x = \lfloor x\rfloor + \{x\}$, where $\{x\}$ is the fractional part of $x$.

Then, your case is: \begin{align} \frac{\lceil \frac{n}{2} \rceil}{np} &= \frac{-\lfloor -\frac{n}{2} \rfloor}{np}\\ &= \frac{-\left(-\frac{n}{2}-\left\{-\frac{n}{2}\right\}\right)}{np}\\ &= \frac{n}{2np}+\frac{\left\{-\frac{n}{2}\right\})}{np}\\ &= \frac{1}{2p}+\frac{\left\{-\frac{n}{2}\right\}}{np}\\ \end{align}

If $n$ is a real number, this is about as far as you can go.